public class QueryParser extends InputParser
| Constructor and Description |
|---|
QueryParser(java.lang.String q,
QueryContext c)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkAxis(Axis axis)
Performs an optional axis check.
|
protected void |
checkInit()
Performs an optional check init.
|
protected void |
checkPred(boolean open)
Checks a predicate.
|
protected void |
checkTest(Test test,
boolean attr)
Performs an optional test check.
|
QueryException |
error(Err err,
java.lang.Object... arg)
Throws the specified error.
|
Expr |
module(byte[] u)
Parses the specified query and starts with the "Module" rule.
|
Expr |
parse(byte[] uri)
Parses the specified query or module.
|
public QueryParser(java.lang.String q,
QueryContext c)
throws QueryException
q - queryc - query contextQueryException - query exceptionpublic final Expr parse(byte[] uri) throws QueryException
null, the query is parsed as main module.uri - module uri.QueryException - query exceptionpublic final Expr module(byte[] u) throws QueryException
null, the query is parsed as main module.u - module uriQueryException - query exceptionprotected void checkInit()
protected void checkAxis(Axis axis)
axis - axisprotected void checkTest(Test test, boolean attr)
test - node testattr - attribute flagprotected void checkPred(boolean open)
open - open flagpublic QueryException error(Err err, java.lang.Object... arg) throws QueryException
err - error to be thrownarg - error argumentsQueryException - query exception