|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.util.InputParser
org.basex.query.QueryParser
public class QueryParser
Parser for XQuery expressions.
Field Summary | |
---|---|
java.util.ArrayList<StaticFunc> |
funcs
Parsed functions. |
TokenSet |
modules
Modules loaded by the current file. |
TokenMap |
namespaces
Namespaces. |
java.util.ArrayList<StaticVar> |
vars
Parsed variables. |
Fields inherited from class org.basex.util.InputParser |
---|
file, input, length, mark, pos |
Constructor Summary | |
---|---|
QueryParser(java.lang.String in,
java.lang.String path,
QueryContext c)
Constructor. |
Method Summary | |
---|---|
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. |
void |
module(byte[] path,
byte[] uri)
Parses the specified module. |
LibraryModule |
parseLibrary(boolean check)
Parses a library module. |
MainModule |
parseMain()
Parses a main module. |
Methods inherited from class org.basex.util.InputParser |
---|
consume, consume, consume, curr, curr, file, found, info, mark, more, next, quote, rest |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final TokenSet modules
public final java.util.ArrayList<StaticVar> vars
public final java.util.ArrayList<StaticFunc> funcs
public final TokenMap namespaces
Constructor Detail |
---|
public QueryParser(java.lang.String in, java.lang.String path, QueryContext c) throws QueryException
in
- inputpath
- file path (if null
, Prop.QUERYPATH
will be assigned)c
- query context
QueryException
- query exceptionMethod Detail |
---|
public final MainModule parseMain() throws QueryException
QueryException
- query exceptionpublic final LibraryModule parseLibrary(boolean check) throws QueryException
check
- if functions and variables should be checked
QueryException
- query exceptionpublic void module(byte[] path, byte[] uri) throws QueryException
path
- file pathuri
- module uri
QueryException
- 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 arguments
QueryException
- query exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |