146 references to LexKind
System.Private.Xml (146)
System\Xml\Xsl\XPath\XPathParser.cs (53)
24
public Node Parse(XPathScanner scanner, IXPathBuilder<Node> builder,
LexKind
endLex)
66
internal static bool IsStep(
LexKind
lexKind)
69
lexKind ==
LexKind
.Dot ||
70
lexKind ==
LexKind
.DotDot ||
71
lexKind ==
LexKind
.At ||
72
lexKind ==
LexKind
.Axis ||
73
lexKind ==
LexKind
.Star ||
74
lexKind ==
LexKind
.Name // NodeTest is also Name
83
if (_scanner!.Kind ==
LexKind
.Slash)
94
else if (_scanner.Kind ==
LexKind
.SlashSlash)
127
if (_scanner!.Kind ==
LexKind
.Slash)
132
else if (_scanner.Kind ==
LexKind
.SlashSlash)
152
if (
LexKind
.Dot == _scanner!.Kind)
156
if (
LexKind
.LBracket == _scanner.Kind)
161
else if (
LexKind
.DotDot == _scanner.Kind)
165
if (
LexKind
.LBracket == _scanner.Kind)
175
case
LexKind
.Axis: // AxisName '::'
180
case
LexKind
.At: // '@'
184
case
LexKind
.Name:
185
case
LexKind
.Star:
195
while (
LexKind
.LBracket == _scanner.Kind)
251
case
LexKind
.Name:
268
scanner.PassToken(
LexKind
.LParens);
272
if (scanner.Kind !=
LexKind
.RParens)
274
scanner.CheckToken(
LexKind
.String);
283
scanner.PassToken(
LexKind
.RParens);
297
case
LexKind
.Star:
313
_scanner!.PassToken(
LexKind
.LBracket);
315
_scanner.PassToken(
LexKind
.RBracket);
379
if (_scanner!.Kind ==
LexKind
.Minus)
394
op = (_scanner.Kind <=
LexKind
.LastOperator) ? (XPathOperator)_scanner.Kind : XPathOperator.Unknown;
417
if (_scanner.Kind ==
LexKind
.Union)
423
while (_scanner.Kind ==
LexKind
.Union)
448
if (_scanner.Kind ==
LexKind
.Slash)
455
else if (_scanner.Kind ==
LexKind
.SlashSlash)
484
while (_scanner.Kind ==
LexKind
.LBracket)
496
_scanner!.Kind ==
LexKind
.String ||
497
_scanner.Kind ==
LexKind
.Number ||
498
_scanner.Kind ==
LexKind
.Dollar ||
499
_scanner.Kind ==
LexKind
.LParens ||
500
_scanner.Kind ==
LexKind
.Name && _scanner.CanBeFunction && !IsNodeType(_scanner)
513
case
LexKind
.String:
517
case
LexKind
.Number:
521
case
LexKind
.Dollar:
524
_scanner.CheckToken(
LexKind
.Name);
530
case
LexKind
.LParens:
533
_scanner.PassToken(
LexKind
.RParens);
537
_scanner.Kind ==
LexKind
.Name && _scanner.CanBeFunction && !IsNodeType(_scanner),
556
_scanner.PassToken(
LexKind
.Name);
557
_scanner.PassToken(
LexKind
.LParens);
559
if (_scanner.Kind !=
LexKind
.RParens)
564
if (_scanner.Kind !=
LexKind
.Comma)
566
_scanner.CheckToken(
LexKind
.RParens);
System\Xml\Xsl\XPath\XPathScanner.cs (60)
64
private
LexKind
_kind;
71
private
LexKind
_prevKind;
80
_kind =
LexKind
.Unknown;
86
public
LexKind
Kind { get { return _kind; } }
117
Debug.Assert(_kind ==
LexKind
.Name);
127
Debug.Assert(_kind ==
LexKind
.Name);
137
if (_kind ==
LexKind
.Eof)
152
Debug.Assert(_kind ==
LexKind
.String);
167
Debug.Assert(_kind ==
LexKind
.Name);
176
Debug.Assert(_kind ==
LexKind
.Axis);
205
_kind =
LexKind
.Eof;
215
_kind = (
LexKind
)_curChar;
222
_kind =
LexKind
.DotDot;
232
_kind =
LexKind
.Dot;
239
_kind =
LexKind
.ColonColon;
244
_kind =
LexKind
.Unknown;
248
_kind =
LexKind
.Star;
256
_kind =
LexKind
.SlashSlash;
261
_kind =
LexKind
.Slash;
265
_kind =
LexKind
.Union;
269
_kind =
LexKind
.Plus;
273
_kind =
LexKind
.Minus;
277
_kind =
LexKind
.Eq;
284
_kind =
LexKind
.Ne;
289
_kind =
LexKind
.Unknown;
296
_kind =
LexKind
.Le;
301
_kind =
LexKind
.Lt;
308
_kind =
LexKind
.Ge;
313
_kind =
LexKind
.Gt;
318
_kind =
LexKind
.String;
331
_kind =
LexKind
.Number;
337
_kind =
LexKind
.Name;
407
_kind =
LexKind
.Unknown;
416
LexKind
opKind;
420
opKind =
LexKind
.Multiply;
431
case "or": opKind =
LexKind
.Or; break;
432
case "and": opKind =
LexKind
.And; break;
433
case "div": opKind =
LexKind
.Divide; break;
434
case "mod": opKind =
LexKind
.Modulo; break;
441
if (_prevKind <=
LexKind
.LastOperator)
446
case
LexKind
.Slash:
447
case
LexKind
.SlashSlash:
448
case
LexKind
.At:
449
case
LexKind
.ColonColon:
450
case
LexKind
.LParens:
451
case
LexKind
.LBracket:
452
case
LexKind
.Comma:
453
case
LexKind
.Dollar:
463
_kind =
LexKind
.Axis;
479
default: _kind =
LexKind
.Name; return XPathAxis.Unknown;
546
public void PassToken(
LexKind
t)
552
public void CheckToken(
LexKind
t)
554
Debug.Assert(
LexKind
.FirstStringable <= t);
557
if (t ==
LexKind
.Eof)
569
private static string LexKindToString(
LexKind
t)
571
Debug.Assert(
LexKind
.FirstStringable <= t);
573
if (
LexKind
.LastNonChar < t)
581
case
LexKind
.Name: return "<name>";
582
case
LexKind
.String: return "<string literal>";
583
case
LexKind
.Eof: return "<eof>";
System\Xml\Xsl\Xslt\QilGenerator.cs (3)
2310
result = _xpathParser.Parse(scanner, _xpathBuilder,
LexKind
.Eof);
2354
result = _xpathParser.Parse(scanner, _xpathBuilder,
LexKind
.RBrace);
2468
result = _xpathParser.Parse(scanner, _xpathBuilder,
LexKind
.Eof);
System\Xml\Xsl\Xslt\XPathPatternParser.cs (28)
36
_scanner.CheckToken(
LexKind
.Eof);
56
while (_scanner!.Kind ==
LexKind
.Union)
73
case
LexKind
.Slash:
82
case
LexKind
.SlashSlash:
91
case
LexKind
.Name:
97
case
LexKind
.Slash:
101
case
LexKind
.SlashSlash:
132
_scanner.PassToken(
LexKind
.LParens);
133
_scanner.CheckToken(
LexKind
.String);
136
_scanner.PassToken(
LexKind
.RParens);
142
_scanner.PassToken(
LexKind
.LParens);
143
_scanner.CheckToken(
LexKind
.String);
146
_scanner.PassToken(
LexKind
.Comma);
147
_scanner.CheckToken(
LexKind
.String);
150
_scanner.PassToken(
LexKind
.RParens);
171
if (_scanner!.Kind ==
LexKind
.Slash)
176
else if (_scanner.Kind ==
LexKind
.SlashSlash)
201
case
LexKind
.Dot:
202
case
LexKind
.DotDot:
204
case
LexKind
.At:
208
case
LexKind
.Axis:
217
case
LexKind
.Name:
218
case
LexKind
.Star:
236
while (_scanner.Kind ==
LexKind
.LBracket)
245
while (_scanner.Kind ==
LexKind
.LBracket)
258
Debug.Assert(_scanner!.Kind ==
LexKind
.LBracket);
260
QilNode result = _predicateParser.Parse(_scanner, _ptrnBuilder!.GetPredicateBuilder(context),
LexKind
.RBracket);
261
Debug.Assert(_scanner.Kind ==
LexKind
.RBracket);
System\Xml\Xsl\Xslt\XslAstAnalyzer.cs (2)
889
XslFlags result = _xpathParser.Parse(scanner, this,
LexKind
.Eof);
930
result |= _xpathParser.Parse(scanner, this,
LexKind
.RBrace);