A class to read xquery forms.
axisNames
public static final String[] axisNames
castableAs
public static final CastableAs castableAs
functionNamespacePath
public Namespace[] functionNamespacePath
getExternalFunction
public static final QuoteExp getExternalFunction
instanceOf
public static final InstanceOf instanceOf
makeChildAxisStep
public static QuoteExp makeChildAxisStep
makeDescendantAxisStep
public static QuoteExp makeDescendantAxisStep
treatAs
public static final Convert treatAs
warnHidePreviousDeclaration
public static boolean warnHidePreviousDeclaration
warnOldVersion
public static boolean warnOldVersion
appendNamedEntity
public void appendNamedEntity(String name)
booleanValue
public static Expression booleanValue(Expression exp)
Coerce the value of an expresison to a boolean value.
error
public void error(char severity,
String message)
- error in interface Lexer
error
public void error(char severity,
String message,
String code)
getDelimited
public void getDelimited(String delimiter)
throws java.io.IOException,
SyntaxException
Scan until a given delimiter.
On success, text upto the delimiter is in then tokenBuffer (with
tokenBufferLength marking its length); the delimiter is not included.
getStaticBaseUri
public String getStaticBaseUri()
handleOption
public void handleOption(Symbol name,
String value)
makeFunctionExp
public static Expression makeFunctionExp(String className,
String name)
makeFunctionExp
public static Expression makeFunctionExp(String className,
String fieldName,
String name)
mark
public void mark()
throws java.io.IOException
- mark in interface Lexer
match
public boolean match(String word)
maybeSetLine
public void maybeSetLine(Declaration decl,
int line,
int column)
maybeSetLine
public void maybeSetLine(Expression exp,
int line,
int column)
namespaceResolve
protected Symbol namespaceResolve(String name,
boolean function)
parseFLWRInner
public Expression parseFLWRInner(boolean isFor)
throws java.io.IOException,
SyntaxException
Parse a let- or a for-expression.
Assume the 'let'/'for'-token has been seen, and we've read '$'.
If we see the 'order' keyword of an 'order by' clause then we stop
parsing, and return a result as if we instead saw a
'return make-tuple($x, ...)'. The 'order by' clause will get
parsed by the outer-most 'for' or 'let'.
parseFunctionDefinition
public Expression parseFunctionDefinition(int declLine,
int declColumn)
throws java.io.IOException,
SyntaxException
parseOptionalTypeDeclaration
public Expression parseOptionalTypeDeclaration()
throws java.io.IOException,
SyntaxException
Parse: ["as" SequenceType]
parseQuantifiedExpr
public Expression parseQuantifiedExpr(boolean isEvery)
throws java.io.IOException,
SyntaxException
Parse a some- or an every-expression.
Assume the 'some'/'every'-token has been seen, and we've read '$'.
parseVariable
public Object parseVariable()
throws java.io.IOException,
SyntaxException
Parse a Variable.
readObject
public Object readObject()
throws java.io.IOException,
SyntaxException
reset
public void reset()
throws java.io.IOException
- reset in interface Lexer
resolveAgainstBaseUri
public String resolveAgainstBaseUri(String uri)
setStaticBaseUri
public void setStaticBaseUri(String uri)
syntaxError
public Expression syntaxError(String message,
String code)
throws java.io.IOException,
SyntaxException
Handle syntax errors (at rewrite time).
message
- an error message to print out