Delimiting terminal symbols.
Delimiting terminal symbols. No whitespace is skipped during this tokenization. Lookahead is applied when needed to distinguish between different terminal symbols starting with the same character.
When using this object, make sure that a "-" symbol requires a symbol separator (whitespace or comments) if it follows a QName or NCName. The same holds for a "." symbol. Also, if a "." follows or precedes a numeric literal, it requires a symbol separator. (Other than that, symbol separators are only needed for non-delimiting terminal symbols.)
EQName parsing support.
EQName parsing support. Note that EQNames are non-delimiting terminal symbols. No whitespace is skipped during parsing of an EQName.
For re-usability without imposing any NoCut calls on using parsers, no cuts have been used.
NCName parsing support.
NCName parsing support. Note that NCNames are non-delimiting terminal symbols. No whitespace is skipped during parsing of an NCName.
Non-delimiting terminal symbols.
Non-delimiting terminal symbols. No whitespace is skipped during this tokenization. Lookahead is applied when needed to distinguish between different terminal symbols starting with the same characters.
Wildcard parsing support.
Wildcard parsing support. No whitespace skipping is performed. See ws:explicit constraint.
For re-usability without imposing any NoCut calls on using parsers, no cuts have been used.
XPath 3.1 AST element parsing support, using FastParse.
XPath 3.1 AST element parsing support, using FastParse.
There are parsers for many kinds of XPath AST elements. These parsers typically expect no leading whitespace, and they typically consume only part of the input string.
Example of usage:
XPathElemParser.expr.parse(xpathString)
Using the parsers in XPathElemParser may be somewhat risky in that they may "malfunction" when called in isolation, due to the lack of context (such as cuts to avoid backtracking). Usually it is safer to stick to using the XPathParser.xpathExpr parser. On the other hand, exposing parsers for specific AST elements makes it easier to "decorate" specific parsers.
TODO Make this the default implementation of a parser interface.
XPath 3.1 parsing support, using FastParse.
XPath 3.1 parsing support, using FastParse.
Usage:
XPathParser.xpathExpr.parse(xpathString)
FastParse parser of XPath expressions, returning AST objects from the 'ast' package if successful.