Ejemplo n.º 1
0
        public XPathParserException TokenExpectedException(Lexeme t, string actualToken)
        {
            string expectedToken = LexemeToString(t);
            var    x             = new XPathParserException(xpathExpr, lexStart, curIndex,
                                                            string.Format("Expected token '{0}', found '{1}'.", expectedToken, actualToken)
                                                            );

            x.NextAllowed = AllowedWhenExpected(t);
            return(x);
        }
Ejemplo n.º 2
0
        public XPathParserException NodeTestExpectedException()
        {
            string token = this.RawValue;
            var    x     = new XPathParserException(xpathExpr, lexStart, curIndex,
                                                    string.Format("Expected a node test, found '{0}'.", token)
                                                    );

            if (lexemeStack.Count > 0)
            {
                x.PriorToken  = this.lexemeStack.Peek();
                x.NextAllowed = AllowedFollowing(this.lexemeStack.Peek());
            }
            return(x);
        }
Ejemplo n.º 3
0
        // XPath error messages
        // --------------------

        public XPathParserException UnexpectedTokenException()
        {
            string token = this.RawValue;
            var    x     = new XPathParserException(xpathExpr, lexStart, curIndex,
                                                    string.Format("Unexpected token '{0}' in the expression.", token)
                                                    );

            if (lexemeStack.Count > 0)
            {
                x.PriorToken  = this.lexemeStack.Peek();
                x.NextAllowed = AllowedFollowing(this.lexemeStack.Peek());
            }
            return(x);
        }
Ejemplo n.º 4
0
 // XPath error messages
 // --------------------
 public XPathParserException UnexpectedTokenException()
 {
     string token = this.RawValue;
     var x = new XPathParserException(xpathExpr, lexStart, curIndex,
         string.Format("Unexpected token '{0}' in the expression.", token)
     );
     if (lexemeStack.Count > 0)
     {
         x.PriorToken = this.lexemeStack.Peek();
         x.NextAllowed = AllowedFollowing(this.lexemeStack.Peek());
     }
     return x;
 }
Ejemplo n.º 5
0
 public XPathParserException TokenExpectedException(Lexeme t, string actualToken)
 {
     string expectedToken = LexemeToString(t);
     var x = new XPathParserException(xpathExpr, lexStart, curIndex,
         string.Format("Expected token '{0}', found '{1}'.", expectedToken, actualToken)
     );
     x.NextAllowed= AllowedWhenExpected(t);
     return x;
 }
Ejemplo n.º 6
0
 public XPathParserException NodeTestExpectedException()
 {
     string token = this.RawValue;
     var x= new XPathParserException(xpathExpr, lexStart, curIndex,
         string.Format("Expected a node test, found '{0}'.", token)
     );
     if (lexemeStack.Count > 0)
     {
     x.PriorToken = this.lexemeStack.Peek();
     x.NextAllowed = AllowedFollowing(this.lexemeStack.Peek());
     }
     return x;
 }