2 instantiations of XPathScanner
System.Xml (2)
System\Xml\XPath\Internal\XPathParser.cs (2)
25
XPathScanner scanner = new
XPathScanner
(xpathExpresion);
35
XPathScanner scanner = new
XPathScanner
(xpathPattern);
90 references to XPathScanner
System.Xml (90)
System\Xml\XPath\Internal\XPathParser.cs (90)
18
XPathScanner
scanner;
20
private XPathParser(
XPathScanner
scanner) {
25
XPathScanner
scanner = new XPathScanner(xpathExpresion);
28
if (scanner.Kind !=
XPathScanner
.LexKind.Eof) {
35
XPathScanner
scanner = new XPathScanner(xpathPattern);
38
if (scanner.Kind !=
XPathScanner
.LexKind.Eof) {
95
this.scanner.Kind ==
XPathScanner
.LexKind.Eq ? Operator.Op.EQ :
96
this.scanner.Kind ==
XPathScanner
.LexKind.Ne ? Operator.Op.NE :
114
this.scanner.Kind ==
XPathScanner
.LexKind.Lt ? Operator.Op.LT :
115
this.scanner.Kind ==
XPathScanner
.LexKind.Le ? Operator.Op.LE :
116
this.scanner.Kind ==
XPathScanner
.LexKind.Gt ? Operator.Op.GT :
117
this.scanner.Kind ==
XPathScanner
.LexKind.Ge ? Operator.Op.GE :
135
this.scanner.Kind ==
XPathScanner
.LexKind.Plus ? Operator.Op.PLUS :
136
this.scanner.Kind ==
XPathScanner
.LexKind.Minus ? Operator.Op.MINUS :
154
this.scanner.Kind ==
XPathScanner
.LexKind.Star ? Operator.Op.MUL :
170
while (this.scanner.Kind ==
XPathScanner
.LexKind.Minus) {
188
if (this.scanner.Kind !=
XPathScanner
.LexKind.Union) {
199
private static bool IsNodeType(
XPathScanner
scaner) {
217
if (this.scanner.Kind ==
XPathScanner
.LexKind.Slash) {
221
else if (this.scanner.Kind ==
XPathScanner
.LexKind.SlashSlash) {
236
while (this.scanner.Kind ==
XPathScanner
.LexKind.LBracket) {
250
PassToken(
XPathScanner
.LexKind.LBracket);
252
PassToken(
XPathScanner
.LexKind.RBracket);
259
if (this.scanner.Kind ==
XPathScanner
.LexKind.Slash) {
268
else if (this.scanner.Kind ==
XPathScanner
.LexKind.SlashSlash) {
283
if (
XPathScanner
.LexKind.SlashSlash == this.scanner.Kind) {
287
else if (
XPathScanner
.LexKind.Slash == this.scanner.Kind) {
299
private static bool IsStep(
XPathScanner
.LexKind lexKind) {
301
lexKind ==
XPathScanner
.LexKind.Dot ||
302
lexKind ==
XPathScanner
.LexKind.DotDot ||
303
lexKind ==
XPathScanner
.LexKind.At ||
304
lexKind ==
XPathScanner
.LexKind.Axe ||
305
lexKind ==
XPathScanner
.LexKind.Star ||
306
lexKind ==
XPathScanner
.LexKind.Name // NodeTest is also Name
313
if (
XPathScanner
.LexKind.Dot == this.scanner.Kind) { //>> '.'
317
else if (
XPathScanner
.LexKind.DotDot == this.scanner.Kind) { //>> '..'
324
case
XPathScanner
.LexKind.At: //>> '@'
328
case
XPathScanner
.LexKind.Axe: //>> AxisName '::'
341
while (
XPathScanner
.LexKind.LBracket == this.scanner.Kind) {
353
case
XPathScanner
.LexKind.Name :
367
PassToken(
XPathScanner
.LexKind.LParens);
370
if (this.scanner.Kind !=
XPathScanner
.LexKind.RParens) { //>> 'processing-instruction (' Literal ')'
371
CheckToken(
XPathScanner
.LexKind.String);
377
PassToken(
XPathScanner
.LexKind.RParens);
388
case
XPathScanner
.LexKind.Star :
399
private static bool IsPrimaryExpr(
XPathScanner
scanner) {
401
scanner.Kind ==
XPathScanner
.LexKind.String ||
402
scanner.Kind ==
XPathScanner
.LexKind.Number ||
403
scanner.Kind ==
XPathScanner
.LexKind.Dollar ||
404
scanner.Kind ==
XPathScanner
.LexKind.LParens ||
405
scanner.Kind ==
XPathScanner
.LexKind.Name && scanner.CanBeFunction && ! IsNodeType(scanner)
414
case
XPathScanner
.LexKind.String:
418
case
XPathScanner
.LexKind.Number:
422
case
XPathScanner
.LexKind.Dollar:
424
CheckToken(
XPathScanner
.LexKind.Name);
428
case
XPathScanner
.LexKind.LParens:
434
PassToken(
XPathScanner
.LexKind.RParens);
436
case
XPathScanner
.LexKind.Name :
450
PassToken(
XPathScanner
.LexKind.Name);
451
PassToken(
XPathScanner
.LexKind.LParens);
452
if (this.scanner.Kind !=
XPathScanner
.LexKind.RParens) {
455
if (this.scanner.Kind ==
XPathScanner
.LexKind.RParens) {
458
PassToken(
XPathScanner
.LexKind.Comma);
461
PassToken(
XPathScanner
.LexKind.RParens);
524
if (this.scanner.Kind !=
XPathScanner
.LexKind.Union) {
537
case
XPathScanner
.LexKind.Slash :
540
if (this.scanner.Kind ==
XPathScanner
.LexKind.Eof || this.scanner.Kind ==
XPathScanner
.LexKind.Union) {
544
case
XPathScanner
.LexKind.SlashSlash :
548
case
XPathScanner
.LexKind.Name :
553
case
XPathScanner
.LexKind.Slash :
556
case
XPathScanner
.LexKind.SlashSlash :
578
PassToken(
XPathScanner
.LexKind.LParens);
579
CheckToken(
XPathScanner
.LexKind.String);
582
PassToken(
XPathScanner
.LexKind.RParens);
587
PassToken(
XPathScanner
.LexKind.LParens);
588
CheckToken(
XPathScanner
.LexKind.String);
591
PassToken(
XPathScanner
.LexKind.Comma);
592
CheckToken(
XPathScanner
.LexKind.String);
595
PassToken(
XPathScanner
.LexKind.RParens);
606
if (
XPathScanner
.LexKind.SlashSlash == this.scanner.Kind) {
610
else if (
XPathScanner
.LexKind.Slash == this.scanner.Kind) {
623
case
XPathScanner
.LexKind.At: //>> '@'
627
case
XPathScanner
.LexKind.Axe: //>> AxisName '::'
642
while (
XPathScanner
.LexKind.LBracket == this.scanner.Kind) {
650
void CheckToken(
XPathScanner
.LexKind t) {
656
void PassToken(
XPathScanner
.LexKind t) {
667
this.scanner.Kind ==
XPathScanner
.LexKind.Name &&
761
private Axis.AxisType GetAxis(
XPathScanner
scaner) {
762
Debug.Assert(scaner.Kind ==
XPathScanner
.LexKind.Axe);