public class PatternParser extends XPathParser
XPathParser.Accelerator, XPathParser.InlineFunctionDetails, XPathParser.NestedLocation, XPathParser.ParsedLanguageallowSaxonExtensions, allowXPath30Syntax, allowXPath30XSLTExtensions, allowXPath31Syntax, allowXPath40Syntax, catchDepth, charChecker, codeInjector, env, inlineFunctionStack, language, languageVersion, parserExtension, qNameParser, rangeVariables, scanOnly, t| Constructor and Description |
|---|
PatternParser() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
customizeTokenizer(Tokenizer t)
Callback to tailor the tokenizer
|
Expression |
makeTracer(Expression exp,
StructuredQName qName)
If tracing, wrap an expression in a trace instruction
|
protected Expression |
parseBasicStep(boolean firstInPattern)
Parse a basic step expression (without the predicates)
|
Expression |
parseExpression()
Override the parsing of top-level expressions
|
Expression |
parseFunctionArgument()
Parse an argument to a function call.
|
Expression |
parseFunctionCall(Expression prefixArgument)
Parse a function call appearing within a pattern.
|
Pattern |
parsePattern(java.lang.String pattern,
StaticContext env)
Parse a string representing an XSLT pattern
|
protected Expression |
parsePredicate()
Parse an expression appearing within a predicate.
|
protected void |
testPermittedAxis(int axis,
java.lang.String errorCode) |
atStartOfRelativePath, checkLanguageVersion30, checkLanguageVersion31, checkLanguageVersion40, checkMapExtensions, checkSyntaxExtensions, currentTokenDisplay, declareRangeVariable, disallowedAtStartOfRelativePath, expect, findOuterRangeVariable, findOuterRangeVariable, findRangeVariable, generateApplyCall, getCodeInjector, getLanguage, getMissingFunctionExplanation, getPlainType, getQNameParser, getRangeVariables, getStaticContext, getTokenizer, grumble, grumble, grumble, grumble, isAllowAbsentExpression, isAllowXPath31Syntax, isKeyword, isNamespaceTestAllowed, isReservedFunctionName30, isReservedFunctionName31, isReservedInQuery, makeCurriedFunction, makeFingerprint, makeInlineFunctionValue, makeLocalNameTest, makeLocation, makeLocation, makeNamespaceTest, makeNameTest, makeNestedLocation, makeNodeName, makeQNameTest, makeStringLiteral, makeStructuredQName, makeStructuredQNameSilently, nextToken, operatorPrecedence, parse, parseAnnotationsList, parseArrayCurlyConstructor, parseArrayItemType, parseArraySquareConstructor, parseArrowPostfix, parseBinaryExpression, parseConstructor, parseDynamicFunctionCall, parseEnumType, parseExprSingle, parseExtendedItemType, parseExtendedSequenceType, parseExtensionExpression, parseFLWORExpression, parseFocusFunction, parseFunctionItemType, parseInlineFunction, parseItemType, parseLookup, parseMapExpression, parseMapItemType, parseNamedFunctionReference, parseNodeTest, parseNumericLiteral, parseOccurrenceIndicator, parseParenthesizedExpression, parsePathExpression, parsePredicate, parseRelativePath, parseRemainingPath, parseSequenceType, parseSequenceType, parseSimpleMappingExpression, parseStepExpression, parseStringConstructor, parseStringLiteral, parseSwitchExpression, parseTryCatchExpression, parseTypeswitchExpression, parseUnionType, parseValidateExpression, parseVariableReference, reportMissingFunction, resolveFunctionName, setAccelerator, setAllowAbsentExpression, setCatchDepth, setCodeInjector, setLanguage, setLocation, setLocation, setLocation, setParserExtension, setQNameParser, setRangeVariables, setRangeVariableStack, setScanOnly, undeclareRangeVariable, unescape, warning, whyDisallowedTypepublic Pattern parsePattern(java.lang.String pattern, StaticContext env) throws XPathException
pattern - the pattern expressed as a Stringenv - the static context for the patternXPathException - if the pattern contains a syntax errorprotected void customizeTokenizer(Tokenizer t)
customizeTokenizer in class XPathParsert - the Tokenizer to be customizedpublic Expression parseExpression() throws XPathException
parseExpression in class XPathParserXPathException - if the pattern is invalidprotected Expression parseBasicStep(boolean firstInPattern) throws XPathException
parseBasicStep in class XPathParserfirstInPattern - true only if we are parsing the first step in a
RelativePathPattern in the XSLT Pattern syntaxXPathException - if any error is encounteredprotected void testPermittedAxis(int axis,
java.lang.String errorCode)
throws XPathException
testPermittedAxis in class XPathParserXPathExceptionprotected Expression parsePredicate() throws XPathException
parsePredicate in class XPathParserXPathException - if the predicate is invalidpublic Expression parseFunctionCall(Expression prefixArgument) throws XPathException
parseFunctionCall in class XPathParserprefixArgument - left hand operand of arrow operator,
or null in the case of a conventional function callXPathException - if the function call is invalidpublic Expression parseFunctionArgument() throws XPathException
XPathParserparseFunctionArgument in class XPathParserXPathException - if the argument expression does not parse correctlypublic Expression makeTracer(Expression exp, StructuredQName qName)
XPathParserNB, this no longer happens. Instead of creating trace expressions in the course of parsing and buildint
the expression tree, trace code is now injected into the tree after the event, when parsing is complete.
See ExpressionTool.injectCode(Expression, CodeInjector).
However, the method has another effect, which is to set the retainedStaticContext in the node in the expression tree.
makeTracer in class XPathParserexp - the expression to be wrappedqName - the name of the construct (if applicable)Copyright (c) 2004-2022 Saxonica Limited. All rights reserved.