public class XQParser extends Lexer
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
axisNames |
static CastableAs |
castableAs |
Namespace[] |
functionNamespacePath |
static QuoteExp |
getExternalFunction |
static InstanceOf |
instanceOf |
static QuoteExp |
makeChildAxisStep |
static QuoteExp |
makeDescendantAxisStep |
static Expression |
makeText |
static Convert |
treatAs |
static boolean |
warnHidePreviousDeclaration |
static boolean |
warnOldVersion |
nesting, port, tentative, tokenBuffer, tokenBufferLength
Constructor and Description |
---|
XQParser(gnu.kawa.io.InPort port,
SourceMessages messages,
XQuery interp) |
Modifier and Type | Method and Description |
---|---|
void |
appendNamedEntity(java.lang.String name) |
static Expression |
booleanValue(Expression exp)
Coerce the value of an expresison to a boolean value.
|
Expression |
declError(java.lang.String message) |
void |
eofError(java.lang.String msg) |
void |
error(char severity,
java.lang.String message) |
void |
error(char severity,
java.lang.String message,
java.lang.String code) |
void |
fatal(java.lang.String msg,
java.lang.String code) |
void |
getDelimited(java.lang.String delimiter)
Scan until a given delimiter.
|
java.lang.String |
getStaticBaseUri() |
void |
handleOption(Symbol name,
java.lang.String value) |
static Expression |
makeFunctionExp(java.lang.String className,
java.lang.String name) |
static Expression |
makeFunctionExp(java.lang.String className,
java.lang.String fieldName,
java.lang.String name) |
void |
mark()
Start tentative parsing.
|
boolean |
match(java.lang.String word) |
void |
maybeSetLine(Declaration decl,
int line,
int column) |
void |
maybeSetLine(Expression exp,
int line,
int column) |
void |
maybeSetLine(Expression exp,
int startLine,
int startColumn,
int endLine,
int endColumn) |
protected Symbol |
namespaceResolve(java.lang.String name,
boolean function) |
Expression |
parse(Compilation comp)
Parse an expression.
|
Expression |
parseDataType() |
Expression |
parseFLWRExpression(boolean isFor) |
Expression |
parseFLWRInner(boolean isFor)
Parse a let- or a for-expression.
|
Expression |
parseFunctionDefinition(int declLine,
int declColumn) |
Expression |
parseIfExpr() |
Expression |
parseItemType() |
Expression |
parseMaybeKindTest() |
Expression |
parseNamedNodeType(boolean attribute) |
Expression |
parseOptionalTypeDeclaration()
Parse: ["as" SequenceType]
|
Expression |
parseQuantifiedExpr(boolean isEvery)
Parse a some- or an every-expression.
|
java.lang.Object |
parseVariable()
Parse a Variable.
|
Declaration |
parseVariableDeclaration() |
java.lang.Object |
readObject() |
void |
reset()
Stop tentative parsing.
|
java.lang.String |
resolveAgainstBaseUri(java.lang.String uri) |
void |
setInteractive(boolean v) |
void |
setStaticBaseUri(java.lang.String uri) |
Expression |
syntaxError(java.lang.String message) |
Expression |
syntaxError(java.lang.String message,
java.lang.String code)
Handle syntax errors (at rewrite time).
|
checkErrors, checkNext, clearErrors, close, eofError, error, error, fatal, getColumnNumber, getErrors, getLineNumber, getMessages, getName, getPort, isInteractive, isTentative, peek, popNesting, pushNesting, read, read, readCodePoint, readDelimited, readDigits, readDigitsInBuffer, readIntDigits, readOptionalExponent, readUnicodeChar, seenErrors, setMessages, setTentative, skip_quick, skip, tokenBufferAppend, tokenBufferString, unread_quick, unread, unread
public static boolean warnOldVersion
public static boolean warnHidePreviousDeclaration
public static final InstanceOf instanceOf
public static final CastableAs castableAs
public static final Convert treatAs
public Namespace[] functionNamespacePath
public static QuoteExp makeChildAxisStep
public static QuoteExp makeDescendantAxisStep
public static Expression makeText
public static final QuoteExp getExternalFunction
public static final java.lang.String[] axisNames
public XQParser(gnu.kawa.io.InPort port, SourceMessages messages, XQuery interp)
public void setStaticBaseUri(java.lang.String uri)
public java.lang.String getStaticBaseUri()
public java.lang.String resolveAgainstBaseUri(java.lang.String uri)
public void mark() throws java.io.IOException
Lexer
public void reset() throws java.io.IOException
Lexer
public void getDelimited(java.lang.String delimiter) throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public void appendNamedEntity(java.lang.String name)
public void setInteractive(boolean v)
setInteractive
in class Lexer
public Expression parseNamedNodeType(boolean attribute) throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression parseOptionalTypeDeclaration() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression parseDataType() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression parseMaybeKindTest() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression parseItemType() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public static Expression booleanValue(Expression exp)
public Expression parseIfExpr() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public boolean match(java.lang.String word)
public java.lang.Object parseVariable() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Declaration parseVariableDeclaration() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression parseFLWRExpression(boolean isFor) throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression parseFLWRInner(boolean isFor) throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression parseQuantifiedExpr(boolean isEvery) throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression parseFunctionDefinition(int declLine, int declColumn) throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public java.lang.Object readObject() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
protected Symbol namespaceResolve(java.lang.String name, boolean function)
public Expression parse(Compilation comp) throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public void handleOption(Symbol name, java.lang.String value)
public static Expression makeFunctionExp(java.lang.String className, java.lang.String name)
public static Expression makeFunctionExp(java.lang.String className, java.lang.String fieldName, java.lang.String name)
public void error(char severity, java.lang.String message, java.lang.String code)
public Expression declError(java.lang.String message) throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression syntaxError(java.lang.String message, java.lang.String code) throws java.io.IOException, SyntaxException
message
- an error message to print outjava.io.IOException
SyntaxException
public Expression syntaxError(java.lang.String message) throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public void eofError(java.lang.String msg) throws SyntaxException
eofError
in class Lexer
SyntaxException
public void fatal(java.lang.String msg, java.lang.String code) throws SyntaxException
SyntaxException
public void maybeSetLine(Expression exp, int line, int column)
public void maybeSetLine(Expression exp, int startLine, int startColumn, int endLine, int endColumn)
public void maybeSetLine(Declaration decl, int line, int column)