public class PatternParser extends ExpressionParser
ExpressionParser.FLWORClause, ExpressionParser.ForClause, ExpressionParser.TemporaryContainer| Modifier and Type | Field and Description |
|---|---|
(package private) int |
inPredicate |
allowXPath30Syntax, compileWithTracing, defaultContainer, env, language, languageVersion, nameChecker, rangeVariables, scanOnly, SEQUENCE_TYPE, t, XPATH, XQUERY, XSLT_PATTERN| Constructor and Description |
|---|
PatternParser() |
| Modifier and Type | Method and Description |
|---|---|
Expression |
makeTracer(int startOffset,
Expression exp,
int construct,
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()
Parse a top-level Expression:
ExprSingle ( ',' ExprSingle )*
|
protected Expression |
parseFunctionArgument()
Parse an argument to a function call.
|
protected Expression |
parseFunctionCall()
Parse a function call.
|
Pattern |
parsePattern(java.lang.String pattern,
StaticContext env)
Parse a string representing an XSLT pattern
|
protected Expression |
parsePredicate()
Parse the expression within a predicate.
|
protected Expression |
parseUnionExpression()
Parse a UnionExpr:
IntersectExceptExpr ( "|" | "union" IntersectExceptExpr )* |
atStartOfRelativePath, currentTokenDisplay, declareRangeVariable, disallowedAtStartOfRelativePath, expect, findRangeVariable, getDefaultContainer, getLanguage, getNameChecker, getRangeVariables, getStaticContext, getTokenizer, grumble, grumble, grumble, grumble, isCompileWithTracing, isKeyword, isNamespaceTestAllowed, makeCurriedFunction, makeLocalNameTest, makeNameCode, makeNameCodeSilently, makeNamespaceTest, makeNameTest, makeStringLiteral, makeStructuredQName, nextToken, normalizeEQName, parse, parseConstructor, parseDynamicFunctionCall, parseExprSingle, parseExtensionExpression, parseForExpression, parseFunctionItemType, parseInlineFunction, parseItemType, parseLiteralFunctionItem, parseNodeTest, parseNumericLiteral, parseParenthesizedItemType, parsePathExpression, parseRelativePath, parseRemainingPath, parseSequenceType, parseSequenceType, parseStepExpression, parseStringLiteral, parseSwitchExpression, parseTryCatchExpression, parseTypeswitchExpression, parseValidateExpression, parseVariableReference, resolveFunctionName, setCompileWithTracing, setDefaultContainer, setLanguage, setLocation, setLocation, setRangeVariables, setRangeVariableStack, setScanOnly, undeclareRangeVariable, warningpublic 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 errorpublic Expression parseExpression() throws XPathException
ExpressionParserparseExpression in class ExpressionParserXPathException - if the expression contains a syntax errorprotected Expression parseUnionExpression() throws XPathException
ExpressionParserparseUnionExpression in class ExpressionParserXPathException - if any error is encounteredprotected Expression parseBasicStep(boolean firstInPattern) throws XPathException
parseBasicStep in class ExpressionParserfirstInPattern - true only if we are parsing the first step in a
RelativePathPattern in the XSLT Pattern syntaxXPathException - if any error is encounteredprotected Expression parsePredicate() throws XPathException
ExpressionParserparsePredicate in class ExpressionParserXPathExceptionprotected Expression parseFunctionCall() throws XPathException
ExpressionParserparseFunctionCall in class ExpressionParserXPathException - if any error is encounteredprotected Expression parseFunctionArgument() throws XPathException
ExpressionParserparseFunctionArgument in class ExpressionParserXPathExceptionpublic Expression makeTracer(int startOffset, Expression exp, int construct, StructuredQName qName)
ExpressionParsermakeTracer in class ExpressionParserstartOffset - the position of the expression in the soruceexp - the expression to be wrappedconstruct - integer constant identifying the kind of constructqName - the name of the construct (if applicable)