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