|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.expr.ExpressionParser com.saxonica.expr.XPath30Parser
public class XPath30Parser
Parser extension for new syntax in XPath 3.0.
This contains code duplicated with the XQuery1.1 parser. This is handled by putting the common code into static methods of this class, which are invoked from both the XPath30Parser and the XQuery11Parser.
Nested Class Summary | |
---|---|
static class |
XPath30Parser.InlineFunctionDetails
|
Nested classes/interfaces inherited from class net.sf.saxon.expr.ExpressionParser |
---|
ExpressionParser.FLWORClause, ExpressionParser.ForClause, ExpressionParser.TemporaryContainer |
Field Summary |
---|
Fields inherited from class net.sf.saxon.expr.ExpressionParser |
---|
allowXPath30Syntax, compileWithTracing, defaultContainer, env, language, nameChecker, rangeVariables, scanOnly, SEQUENCE_TYPE, t, XPATH, XQUERY, XSLT_PATTERN |
Constructor Summary | |
---|---|
XPath30Parser()
|
Method Summary | |
---|---|
static Binding |
findOuterRangeVariable(StructuredQName qName,
Stack<XPath30Parser.InlineFunctionDetails> inlineFunctionStack)
|
protected Binding |
findRangeVariable(StructuredQName qName)
Locate a range variable with a given name. |
int |
getPermittedFunctions()
Get the permitted set of standard functions in this environment |
protected boolean |
isNamespaceTestAllowed()
Ask whether the syntax namespace-node() is allowed in a node kind test. |
protected Expression |
makeCurriedFunction(FunctionCall fcall,
Expression[] args,
IntSet placeMarkers)
Process a function call in which one or more of the argument positions are represented as "?" placemarkers (indicating partial application or currying) |
static Expression |
makeCurriedFunction(StaticContext env,
Container container,
FunctionCall fcall,
Expression[] args,
IntSet placeMarkers)
|
protected Expression |
parseDynamicFunctionCall(Expression functionItem)
Parse a dynamic function call |
static Expression |
parseDynamicFunctionCall(Expression functionItem,
ExpressionParser p)
|
protected Expression |
parseFunctionArgument()
Parse a function argument. |
ItemType |
parseFunctionItemType()
Parse the item type used for function items (XQuery 1.1 higher order functions) Syntax (changed by WG decision on 2009-09-22): function '(' '*' ') | function '(' (SeqType (',' SeqType)*)? ')' 'as' SeqType For backwards compatibility with Saxon 9.2 we allow the "*" to be omitted for the time being TODO: remove support for the old syntax The "function(" has already been read |
static ItemType |
parseFunctionItemType(ExpressionParser p)
|
protected Expression |
parseInlineFunction()
Parse an inline function "function" "(" ParamList? ")" ("as" SequenceType)? EnclosedExpr On entry, "function (" has already been read |
static Expression |
parseInlineFunction(ExpressionParser p,
Stack<XPath30Parser.InlineFunctionDetails> inlineFunctionStack)
|
protected Expression |
parseLiteralFunctionItem()
Parse a literal function item (introduced in XQuery 3.0 and XPath 3.0) Syntax: QName # integer The QName and # have already been read |
static Expression |
parseLiteralFunctionItem(ExpressionParser p)
|
protected ItemType |
parseParenthesizedItemType()
Parse a parenthesized item type (allowed in XQuery 3.0 and XPath 3.0 only) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XPath30Parser()
Method Detail |
---|
public int getPermittedFunctions()
protected Expression parseLiteralFunctionItem() throws XPathException
parseLiteralFunctionItem
in class ExpressionParser
XPathException
public static Expression parseLiteralFunctionItem(ExpressionParser p) throws XPathException
XPathException
public ItemType parseFunctionItemType() throws XPathException
parseFunctionItemType
in class ExpressionParser
XPathException
public static ItemType parseFunctionItemType(ExpressionParser p) throws XPathException
XPathException
protected Expression parseFunctionArgument() throws XPathException
parseFunctionArgument
in class ExpressionParser
XPathException
protected ItemType parseParenthesizedItemType() throws XPathException
parseParenthesizedItemType
in class ExpressionParser
XPathException
protected Expression parseDynamicFunctionCall(Expression functionItem) throws XPathException
parseDynamicFunctionCall
in class ExpressionParser
XPathException
public static Expression parseDynamicFunctionCall(Expression functionItem, ExpressionParser p) throws XPathException
XPathException
protected Expression parseInlineFunction() throws XPathException
parseInlineFunction
in class ExpressionParser
XPathException
- if a syntax error is foundpublic static Expression parseInlineFunction(ExpressionParser p, Stack<XPath30Parser.InlineFunctionDetails> inlineFunctionStack) throws XPathException
XPathException
protected Expression makeCurriedFunction(FunctionCall fcall, Expression[] args, IntSet placeMarkers) throws XPathException
makeCurriedFunction
in class ExpressionParser
fcall
- the function call (as if there were no currying)args
- the arguments (with EmptySequence in the placemarker positions)placeMarkers
- the positions of the placemarkers
XPathException
public static Expression makeCurriedFunction(StaticContext env, Container container, FunctionCall fcall, Expression[] args, IntSet placeMarkers) throws XPathException
XPathException
protected Binding findRangeVariable(StructuredQName qName)
findRangeVariable
in class ExpressionParser
qName
- identifies the name of the range variable
public static Binding findOuterRangeVariable(StructuredQName qName, Stack<XPath30Parser.InlineFunctionDetails> inlineFunctionStack)
protected boolean isNamespaceTestAllowed()
isNamespaceTestAllowed
in class ExpressionParser
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |