|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.saxon.expr.parser.ExpressionParser
net.sf.saxon.query.QueryParser
com.saxonica.expr.Query30Parser
public class Query30Parser
Parser extension for new syntax in XQuery 3.0 (was 1.1). Note this cannot currently be used at the same time as the XQuery Update extensions.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.sf.saxon.expr.parser.ExpressionParser |
|---|
ExpressionParser.TemporaryContainer |
| Field Summary |
|---|
| Fields inherited from class net.sf.saxon.query.QueryParser |
|---|
executable, FUNCTION_IS_NONDETERMINISTIC, FUNCTION_IS_PRIVATE, FUNCTION_IS_UPDATING, importedModules, queryVersion, XQUERY10, XQUERY30 |
| Fields inherited from class net.sf.saxon.expr.parser.ExpressionParser |
|---|
allowXPath30Syntax, defaultContainer, env, language, languageVersion, nameChecker, rangeVariables, scanOnly, SEQUENCE_TYPE, t, XPATH, XQUERY, XSLT_PATTERN |
| Constructor Summary | |
|---|---|
Query30Parser()
|
|
| Method Summary | |
|---|---|
protected void |
checkForClauseAllowingEmpty(ForClause clause)
Check a ForClause for an "outer for" |
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(int offset,
StructuredQName name,
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) |
QueryParser |
newParser()
Create a new parser of the same kind |
protected int |
parseAnnotations()
Parse the annotations that can appear in a variable or function declaration |
protected void |
parseContextItemDeclaration()
Parse a context item declaration. |
protected void |
parseCountClause(List clauseList)
Parse a LetClause. |
protected void |
parseDecimalFormatDeclaration()
Parse a named decimal format declaration. |
protected void |
parseDefaultDecimalFormat()
Parse a default decimal format declaration "declare" "default" "decimal-format" (property "=" string-literal)* |
protected Expression |
parseDynamicFunctionCall(Expression functionItem)
Parse a dynamic function call |
Expression |
parseFunctionArgument()
Parse a function argument. |
ItemType |
parseFunctionItemType()
Parse the item type used for function items (XQuery 3.0 higher order functions) Syntax (changed by WG decision on 2009-09-22): function '(' '*' ') | function '(' (SeqType (',' SeqType)*)? ')' 'as' SeqType The "function(" has already been read |
protected void |
parseGroupByClause(List<Clause> clauseList)
Parse a Group By clause. |
protected Expression |
parseInlineFunction()
Parse an inline function "function" "(" ParamList? ")" ("as" SequenceType)? EnclosedExpr On entry, "function (" has already been read |
protected Expression |
parseLiteralFunctionItem()
Parse a literal function item (introduced in XQuery 3.0) Syntax: QName # integer The QName and # have already been read |
protected Expression |
parseMapExpression()
Parse a map expression. |
ItemType |
parseMapItemType()
Parse the item type used for function items (XPath 3.0) Syntax: map '(' '*' ') | map '(' ItemType ',' SeqType ')' 'as' SeqType For backwards compatibility with Saxon 9.2 we allow the "*" to be omitted for the time being The "function(" has already been read |
protected Expression |
parseNamedNamespaceConstructor(int offset)
Parse a namespace node constructor of the form namespace name { expr } |
protected Expression |
parseNamespaceConstructor(int offset)
Parse a computed namespace constructor of the form namespace {expr}{expr} |
protected ItemType |
parseParenthesizedItemType()
Parse a parenthesized item type (allowed in XQuery 3.0 and XPath 3.0 only) |
protected Expression |
parseSwitchExpression()
Parse a Switch Expression. |
protected Expression |
parseTryCatchExpression()
Parse a Try/Catch Expression. |
protected void |
parseWindowClause(List<Clause> clauseList)
Parse a tumbling or sliding window clause. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Query30Parser()
| Method Detail |
|---|
public QueryParser newParser()
newParser in class QueryParserpublic int getPermittedFunctions()
getPermittedFunctions in class QueryParser
protected int parseAnnotations()
throws XPathException
parseAnnotations in class QueryParserXPathException
protected Expression parseLiteralFunctionItem()
throws XPathException
parseLiteralFunctionItem in class ExpressionParserXPathException - if a static error is encountered
public ItemType parseFunctionItemType()
throws XPathException
parseFunctionItemType in class ExpressionParserXPathException - if a static error occurs (including the case
where XPath 3.0 syntax is not enabled)
public Expression parseFunctionArgument()
throws XPathException
parseFunctionArgument in class ExpressionParserXPathException - if the argument expression does not parse correctly
public ItemType parseMapItemType()
throws XPathException
parseMapItemType in class ExpressionParserXPathException - if a parsing error occurs or if the map syntax
is not available
protected ItemType parseParenthesizedItemType()
throws XPathException
parseParenthesizedItemType in class ExpressionParserXPathException - if a syntax error is found
protected Expression parseDynamicFunctionCall(Expression functionItem)
throws XPathException
parseDynamicFunctionCall in class ExpressionParserfunctionItem - the expression that determines the function to be called
XPathException - if a static error is found
protected Expression parseInlineFunction()
throws XPathException
parseInlineFunction in class ExpressionParserXPathException - if a syntax error is found
protected Expression makeCurriedFunction(int offset,
StructuredQName name,
Expression[] args,
IntSet placeMarkers)
throws XPathException
makeCurriedFunction in class ExpressionParseroffset - name - the function name (as if there were no currying)args - the arguments (with EmptySequence in the placemarker positions)placeMarkers - the positions of the placemarkers @return the curried function
XPathException
protected Expression parseMapExpression()
throws XPathException
parseMapExpression in class ExpressionParserXPathExceptionprotected Binding findRangeVariable(StructuredQName qName)
findRangeVariable in class ExpressionParserqName - identifies the name of the range variable
protected Expression parseTryCatchExpression()
throws XPathException
parseTryCatchExpression in class ExpressionParserXPathException - if a static error is found
protected void checkForClauseAllowingEmpty(ForClause clause)
throws XPathException
checkForClauseAllowingEmpty in class QueryParserclause - the clause to be checked
XPathException - if invalid
protected void parseCountClause(List clauseList)
throws XPathException
parseCountClause in class QueryParserclauseList - - the components of the parsed LetClause are appended to the
supplied list
XPathException
protected void parseGroupByClause(List<Clause> clauseList)
throws XPathException
parseGroupByClause in class QueryParserclauseList - the list of clauses for the expression, to which this
clause will be added
XPathException
protected void parseWindowClause(List<Clause> clauseList)
throws XPathException
parseWindowClause in class QueryParserclauseList - the list of clauses for the expression, to which this
clause will be added
XPathException
protected Expression parseNamespaceConstructor(int offset)
throws XPathException
parseNamespaceConstructor in class QueryParseroffset -
XPathException
protected Expression parseNamedNamespaceConstructor(int offset)
throws XPathException
parseNamedNamespaceConstructor in class QueryParseroffset -
XPathExceptionprotected boolean isNamespaceTestAllowed()
isNamespaceTestAllowed in class ExpressionParser
protected Expression parseSwitchExpression()
throws XPathException
parseSwitchExpression in class ExpressionParserXPathException - if a static error is found
protected void parseContextItemDeclaration()
throws XPathException
parseContextItemDeclaration in class QueryParserXPathException
protected void parseDecimalFormatDeclaration()
throws XPathException
parseDecimalFormatDeclaration in class QueryParserXPathException
protected void parseDefaultDecimalFormat()
throws XPathException
parseDefaultDecimalFormat in class QueryParserXPathException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||