Class SyntaxTreeBuilder
java.lang.Object
org.eclipse.rdf4j.query.parser.sparql.ast.SyntaxTreeBuilder
- All Implemented Interfaces:
SyntaxTreeBuilderConstants, SyntaxTreeBuilderTreeConstants
public class SyntaxTreeBuilder
extends Object
implements SyntaxTreeBuilderTreeConstants, SyntaxTreeBuilderConstants
-
Field Summary
FieldsModifier and TypeFieldDescriptionNext token.protected JJTSyntaxTreeBuilderStateCurrent token.Generated Token Manager.Fields inherited from interface SyntaxTreeBuilderConstants
ABS, ADD, ALL, ALPHA, AND, ANON, AS, ASC, ASK, AVG, BASE, BIND, BINDINGS, BLANK_NODE_LABEL, BNODE, BOUND, BY, CEIL, CLEAR, COALESCE, COMMA, CONCAT, CONSTRUCT, CONTAINS, COPY, COUNT, CREATE, DATA, DATATYPE, DAY, DECIMAL, DECIMAL_NEGATIVE, DECIMAL_POSITIVE, DEFAULT, DEFAULT_GRAPH, DELETE, DESC, DESCRIBE, DISTINCT, DOT, DOUBLE, DOUBLE_NEGATIVE, DOUBLE_POSITIVE, DOUBLE1, DOUBLE2, DOUBLE3, DROP, DT_PREFIX, ECHAR, ENCODE_FOR_URI, EOF, EQ, EXISTS, EXPONENT, FALSE, FILTER, FLOOR, FROM, GE, GRAPH, GROUP, GROUP_CONCAT, GT, HAVING, HEX, HOURS, IF, IN, INSERT, INTEGER, INTEGER_NEGATIVE, INTEGER_POSITIVE, INTO, INVERSE, IRI, IS_A, IS_BLANK, IS_IRI, IS_LITERAL, IS_NUMERIC, LANG, LANGMATCHES, LANGTAG, LBRACE, LBRACK, LCASE, LE, LIMIT, LOAD, LPAREN, LT, MAX, MD5, MIN, MINUS, MINUS_SETOPER, MINUTES, MONTH, MOVE, NAMED, NE, NIL, NOT, NOT_FUNC, NOW, NUM, OFFSET, OPTIONAL, OR, ORDER, PERCENT, PIPE, PLUS, PLX, PN_CHARS, PN_CHARS_BASE, PN_CHARS_U, PN_LOCAL, PN_LOCAL_ESC, PN_PREFIX, PNAME_LN, PNAME_NS, PREFIX, Q_IRI_REF, QUESTION, RAND, RBRACE, RBRACK, REDUCED, REGEX, REPLACE, ROUND, RPAREN, SAFE_CHAR_LONG1, SAFE_CHAR_LONG2, SAFE_CHAR1, SAFE_CHAR2, SAMETERM, SAMPLE, SECONDS, SELECT, SEMICOLON, SEPARATOR, SERVICE, SHA1, SHA224, SHA256, SHA384, SHA512, SILENT, SINGLE_LINE_COMMENT, SLASH, STAR, STR, STR_AFTER, STR_BEFORE, STR_ENDS, STR_STARTS, STRDT, STRING_LITERAL_LONG1, STRING_LITERAL_LONG2, STRING_LITERAL1, STRING_LITERAL2, STRLANG, STRLEN, STRUUID, SUBSTR, SUM, TIMEZONE, TO, tokenImage, TRIPLE_CLOSE, TRIPLE_OPEN, TRUE, TZ, UCASE, UNDEF, UNION, USING, UUID, VALUES, VAR_CHAR, VAR1, VAR2, VARNAME, WHERE, WHITESPACE, WITH, WS_CHAR, YEARFields inherited from interface SyntaxTreeBuilderTreeConstants
JJTABS, JJTADD, JJTAND, JJTASKQUERY, JJTAVG, JJTBASEDECL, JJTBASICGRAPHPATTERN, JJTBIND, JJTBINDINGSCLAUSE, JJTBINDINGSET, JJTBINDINGVALUE, JJTBLANKNODE, JJTBLANKNODEPROPERTYLIST, JJTBNODEFUNC, JJTBOUND, JJTCEIL, JJTCLEAR, JJTCOALESCE, JJTCOLLECTION, JJTCOMPARE, JJTCONCAT, JJTCONSTRAINT, JJTCONSTRUCT, JJTCONSTRUCTQUERY, JJTCONSTTRIPLEREF, JJTCONTAINS, JJTCOPY, JJTCOUNT, JJTCREATE, JJTDATASETCLAUSE, JJTDATATYPE, JJTDAY, JJTDELETECLAUSE, JJTDELETEDATA, JJTDELETEWHERE, JJTDESCRIBE, JJTDESCRIBEQUERY, JJTDROP, JJTENCODEFORURI, JJTEXISTSFUNC, JJTFALSE, JJTFLOOR, JJTFUNCTIONCALL, JJTGRAPHGRAPHPATTERN, JJTGRAPHORDEFAULT, JJTGRAPHPATTERNGROUP, JJTGRAPHREFALL, JJTGROUPCLAUSE, JJTGROUPCONCAT, JJTGROUPCONDITION, JJTHAVINGCLAUSE, JJTHOURS, JJTIF, JJTIN, JJTINFIX, JJTINLINEDATA, JJTINSERTCLAUSE, JJTINSERTDATA, JJTIRI, JJTIRIFUNC, JJTISBLANK, JJTISIRI, JJTISLITERAL, JJTISNUMERIC, JJTLANG, JJTLANGMATCHES, JJTLIMIT, JJTLOAD, JJTLOWERCASE, JJTMATH, JJTMAX, JJTMD5, JJTMIN, JJTMINUSGRAPHPATTERN, JJTMINUTES, JJTMODIFY, JJTMONTH, JJTMOVE, jjtNodeName, JJTNOT, JJTNOTEXISTSFUNC, JJTNOTIN, JJTNOW, JJTNUMERICLITERAL, JJTOBJECTLIST, JJTOFFSET, JJTOPTIONALGRAPHPATTERN, JJTOR, JJTORDERCLAUSE, JJTORDERCONDITION, JJTPATHALTERNATIVE, JJTPATHELT, JJTPATHMOD, JJTPATHONEINPROPERTYSET, JJTPATHSEQUENCE, JJTPREFIXDECL, JJTPROJECTIONELEM, JJTPROPERTYLIST, JJTPROPERTYLISTPATH, JJTQNAME, JJTQUADSNOTTRIPLES, JJTQUERYCONTAINER, JJTRAND, JJTRDFLITERAL, JJTREGEXEXPRESSION, JJTREPLACE, JJTROUND, JJTSAMETERM, JJTSAMPLE, JJTSECONDS, JJTSELECT, JJTSELECTQUERY, JJTSERVICEGRAPHPATTERN, JJTSHA1, JJTSHA224, JJTSHA256, JJTSHA384, JJTSHA512, JJTSTR, JJTSTRAFTER, JJTSTRBEFORE, JJTSTRDT, JJTSTRENDS, JJTSTRING, JJTSTRLANG, JJTSTRLEN, JJTSTRSTARTS, JJTSTRUUID, JJTSUBSTR, JJTSUM, JJTTIMEZONE, JJTTRIPLEREF, JJTTRIPLESSAMESUBJECT, JJTTRIPLESSAMESUBJECTPATH, JJTTRUE, JJTTZ, JJTUNIONGRAPHPATTERN, JJTUNPARSEDQUADDATABLOCK, JJTUPDATECONTAINER, JJTUPDATESEQUENCE, JJTUPPERCASE, JJTUUID, JJTVAR, JJTVOID, JJTWHERECLAUSE, JJTYEAR -
Constructor Summary
ConstructorsConstructorDescriptionSyntaxTreeBuilder(CharStream stream) Constructor with user supplied CharStream.Constructor with generated Token Manager. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidAbs()final voidAdd()final voidfinal voidfinal voidArgList()final voidAskQuery()final voidAvg()final voidBaseDecl()final voidfinal voidBind()final voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidBound()final voidfinal voidfinal voidCeil()final voidClear()final voidCoalesce()final voidfinal voidfinal voidConcat()final voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidContains()final voidCopy()final voidCount()final voidCreate()final voidfinal voidfinal voidDatatype()final voidfinal voidDay()final voidfinal voidfinal voidfinal voidDescribe()final voidfinal voidDisable tracing.final voidDrop()final voidEnable tracing.final voidfinal voidfinal voidfinal voidFilter()final voidfinal voidFloor()final voidGenerate ParseException.final TokenGet the next Token.final TokengetToken(int index) Get the specific Token.final voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidGraphRef()final voidSPARQL 1.1 Update productionsfinal voidfinal voidfinal voidfinal voidfinal Tokenfinal voidfinal voidfinal voidfinal voidHours()final voidIf()final voidIn()final voidfinal voidfinal voidfinal voidfinal voidfinal voidIRI()final voidIRIFunc()final voidIRIref()final voidIsBlank()final voidIsIRI()final voidfinal voidfinal voidLang()final voidfinal voidLimit()final voidfinal voidLoad()final voidfinal voidMax()final voidMD5()final voidMin()final voidfinal voidMinutes()final voidModify()final voidfinal voidMonth()final voidMove()final voidfinal voidfinal voidNotIn()final voidNow()final voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidObject()final voidfinal voidfinal voidfinal voidOffset()final voidfinal voidfinal voidstatic ASTQueryContainerparseQuery(String query) Parses the supplied SPARQL query and builds a syntax tree from it.static ASTUpdateSequenceparseUpdateSequence(String sequence) Parses the supplied SPARQL update sequence and builds a syntax tree from it.final voidPath()final voidfinal voidPathElt()final voidPathMod()final voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidProlog()final voidfinal voidfinal voidQuadData()final voidQuads()final voidfinal voidQuery()final ASTQueryContainerfinal voidRand()final voidfinal voidfinal voidvoidReInit(CharStream stream) Reinitialise.voidReinitialise.final voidfinal voidReplace()final voidRound()final voidSameTerm()final voidSample()final voidSeconds()final voidSelect()final voidfinal voidfinal voidSHA1()final voidSHA224()final voidSHA256()final voidSHA384()final voidSHA512()final voidfinal voidfinal voidStr()final voidStrAfter()final voidfinal voidStrDt()final voidStrEnds()final voidString()final voidfinal voidStrLang()final voidStrLen()final voidfinal voidSTRUUID()final voidfinal voidSubstr()final voidSum()final voidTimezone()final booleanTrace enabled.final voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidTz()final voidfinal voidfinal voidfinal voidUpdate()final ASTUpdateContainerfinal ASTUpdateSequencefinal voidfinal voidfinal voidUUID()final voidfinal voidVar()final voidfinal voidfinal voidVerb()final voidVerbPath()final voidfinal voidfinal voidfinal voidYear()
-
Field Details
-
jjtree
-
token_source
Generated Token Manager. -
token
Current token. -
jj_nt
Next token.
-
-
Constructor Details
-
SyntaxTreeBuilder
Constructor with user supplied CharStream. -
SyntaxTreeBuilder
Constructor with generated Token Manager.
-
-
Method Details
-
parseQuery
Parses the supplied SPARQL query and builds a syntax tree from it.- Parameters:
query- A SPARQL query string.- Returns:
- The root of the syntax tree.
- Throws:
TokenMgrError- If the query was syntactically incorrect.ParseException- If the query was syntactically incorrect.
-
parseUpdateSequence
public static ASTUpdateSequence parseUpdateSequence(String sequence) throws TokenMgrError, ParseException Parses the supplied SPARQL update sequence and builds a syntax tree from it.- Parameters:
sequence- A SPARQL update sequence string.- Returns:
- The root of the syntax tree.
- Throws:
TokenMgrError- If the update sequence was syntactically incorrect.ParseException- If the update sequence was syntactically incorrect.
-
UpdateSequence
- Throws:
ParseException
-
UpdateContainer
- Throws:
ParseException
-
QueryContainer
- Throws:
ParseException
-
Prolog
- Throws:
ParseException
-
BaseDecl
- Throws:
ParseException
-
PrefixDecl
- Throws:
ParseException
-
Query
- Throws:
ParseException
-
SelectQuery
- Throws:
ParseException
-
SubSelect
- Throws:
ParseException
-
Select
- Throws:
ParseException
-
ProjectionElem
- Throws:
ParseException
-
ConstructQuery
- Throws:
ParseException
-
Construct
- Throws:
ParseException
-
ConstructClause
- Throws:
ParseException
-
DescribeQuery
- Throws:
ParseException
-
Describe
- Throws:
ParseException
-
AskQuery
- Throws:
ParseException
-
DatasetClause
- Throws:
ParseException
-
WhereClause
- Throws:
ParseException
-
BindingsClause
- Throws:
ParseException
-
InlineData
- Throws:
ParseException
-
DataBlock
- Throws:
ParseException
-
InlineDataOneVar
- Throws:
ParseException
-
InlineDataFull
- Throws:
ParseException
-
SimpleBindingSet
- Throws:
ParseException
-
BindingSet
- Throws:
ParseException
-
BindingValue
- Throws:
ParseException
-
SolutionModifier
- Throws:
ParseException
-
GroupClause
- Throws:
ParseException
-
OrderClause
- Throws:
ParseException
-
GroupCondition
- Throws:
ParseException
-
HavingClause
- Throws:
ParseException
-
OrderCondition
- Throws:
ParseException
-
LimitOffsetClauses
- Throws:
ParseException
-
Limit
- Throws:
ParseException
-
Offset
- Throws:
ParseException
-
GroupGraphPattern
- Throws:
ParseExceptionError
-
GraphPattern
- Throws:
ParseException
-
BasicGraphPattern
- Throws:
ParseException
-
FilterOrBind
- Throws:
ParseException
-
TriplesBlock
- Throws:
ParseException
-
TriplesTemplate
- Throws:
ParseException
-
GraphPatternNotTriples
- Throws:
ParseException
-
OptionalGraphPattern
- Throws:
ParseException
-
GraphGraphPattern
- Throws:
ParseException
-
GroupOrUnionGraphPattern
- Throws:
ParseException
-
MinusGraphPattern
- Throws:
ParseException
-
ServiceGraphPattern
- Throws:
ParseException
-
Filter
- Throws:
ParseException
-
Constraint
- Throws:
ParseException
-
FunctionCall
- Throws:
ParseException
-
ArgList
- Throws:
ParseException
-
TriplesSameSubject
- Throws:
ParseException
-
PropertyList
- Throws:
ParseException
-
ObjectList
- Throws:
ParseException
-
TriplesSameSubjectPath
- Throws:
ParseException
-
PropertyListPath
- Throws:
ParseException
-
ObjectListPath
- Throws:
ParseException
-
VerbPath
- Throws:
ParseException
-
Path
- Throws:
ParseException
-
PathAlternative
- Throws:
ParseException
-
PathSequence
- Throws:
ParseException
-
PathElt
- Throws:
ParseException
-
PathPrimary
- Throws:
ParseException
-
PathNegatedPropertySet
- Throws:
ParseException
-
PathOneInPropertySet
- Throws:
ParseException
-
PathMod
- Throws:
ParseException
-
VerbSimple
- Throws:
ParseException
-
Object
- Throws:
ParseException
-
ObjectPath
- Throws:
ParseException
-
Verb
- Throws:
ParseException
-
TriplesNode
- Throws:
ParseException
-
TriplesNodePath
- Throws:
ParseException
-
BlankNodePropertyList
- Throws:
ParseException
-
BlankNodePropertyListPath
- Throws:
ParseException
-
Collection
- Throws:
ParseException
-
CollectionPath
- Throws:
ParseException
-
GraphNode
- Throws:
ParseException
-
GraphNodePath
- Throws:
ParseException
-
VarOrTerm
- Throws:
ParseException
-
VarOrIRIref
- Throws:
ParseException
-
Var
- Throws:
ParseException
-
GraphTerm
- Throws:
ParseException
-
TripleRef
- Throws:
ParseException
-
ConstTripleRef
- Throws:
ParseException
-
Expression
- Throws:
ParseException
-
ConditionalOrExpression
- Throws:
ParseException
-
ConditionalAndExpression
- Throws:
ParseException
-
ValueLogical
- Throws:
ParseException
-
RelationalExpression
- Throws:
ParseException
-
NumericExpression
- Throws:
ParseException
-
AdditiveExpression
- Throws:
ParseException
-
MultiplicativeExpression
- Throws:
ParseException
-
UnaryExpression
- Throws:
ParseException
-
UnaryMinus
- Throws:
ParseException
-
PrimaryExpression
- Throws:
ParseException
-
Aggregate
- Throws:
ParseException
-
Count
- Throws:
ParseException
-
Sum
- Throws:
ParseException
-
Min
- Throws:
ParseException
-
Max
- Throws:
ParseException
-
Avg
- Throws:
ParseException
-
Sample
- Throws:
ParseException
-
GroupConcat
- Throws:
ParseException
-
BrackettedExpression
- Throws:
ParseException
-
BuiltInCall
- Throws:
ParseException
-
StringFunction
- Throws:
ParseException
-
NumericFunction
- Throws:
ParseException
-
RDFTermFunction
- Throws:
ParseException
-
DateTimeFunction
- Throws:
ParseException
-
HashFunction
- Throws:
ParseException
-
MD5
- Throws:
ParseException
-
SHA1
- Throws:
ParseException
-
SHA224
- Throws:
ParseException
-
SHA256
- Throws:
ParseException
-
SHA384
- Throws:
ParseException
-
SHA512
- Throws:
ParseException
-
Now
- Throws:
ParseException
-
Year
- Throws:
ParseException
-
Month
- Throws:
ParseException
-
Day
- Throws:
ParseException
-
Hours
- Throws:
ParseException
-
Minutes
- Throws:
ParseException
-
Seconds
- Throws:
ParseException
-
Timezone
- Throws:
ParseException
-
Tz
- Throws:
ParseException
-
Rand
- Throws:
ParseException
-
Abs
- Throws:
ParseException
-
Ceil
- Throws:
ParseException
-
Floor
- Throws:
ParseException
-
Round
- Throws:
ParseException
-
Substr
- Throws:
ParseException
-
StrLen
- Throws:
ParseException
-
UpperCase
- Throws:
ParseException
-
LowerCase
- Throws:
ParseException
-
StrStarts
- Throws:
ParseException
-
StrEnds
- Throws:
ParseException
-
StrBefore
- Throws:
ParseException
-
StrAfter
- Throws:
ParseException
-
Replace
- Throws:
ParseException
-
Concat
- Throws:
ParseException
-
Contains
- Throws:
ParseException
-
EncodeForURI
- Throws:
ParseException
-
If
- Throws:
ParseException
-
In
- Throws:
ParseException
-
NotIn
- Throws:
ParseException
-
Coalesce
- Throws:
ParseException
-
Str
- Throws:
ParseException
-
Lang
- Throws:
ParseException
-
LangMatches
- Throws:
ParseException
-
Datatype
- Throws:
ParseException
-
Bound
- Throws:
ParseException
-
SameTerm
- Throws:
ParseException
-
IsIRI
- Throws:
ParseException
-
IsBlank
- Throws:
ParseException
-
IsLiteral
- Throws:
ParseException
-
IsNumeric
- Throws:
ParseException
-
BNodeFunc
- Throws:
ParseException
-
IRIFunc
- Throws:
ParseException
-
StrDt
- Throws:
ParseException
-
StrLang
- Throws:
ParseException
-
UUID
- Throws:
ParseException
-
STRUUID
- Throws:
ParseException
-
Bind
- Throws:
ParseException
-
RegexExpression
- Throws:
ParseException
-
ExistsFunc
- Throws:
ParseException
-
NotExistsFunc
- Throws:
ParseException
-
RDFLiteral
- Throws:
ParseException
-
NumericLiteral
- Throws:
ParseException
-
NumericLiteralUnsigned
- Throws:
ParseException
-
NumericLiteralPositive
- Throws:
ParseException
-
NumericLiteralNegative
- Throws:
ParseException
-
BooleanLiteral
- Throws:
ParseException
-
String
- Throws:
ParseException
-
IRIref
- Throws:
ParseException
-
PrefixedName
- Throws:
ParseException
-
BlankNode
- Throws:
ParseException
-
IRI
- Throws:
ParseException
-
GraphRefAll
SPARQL 1.1 Update productions- Throws:
ParseException
-
GraphOrDefault
- Throws:
ParseException
-
GraphRef
- Throws:
ParseException
-
UnparsedQuadDataBlock
- Throws:
ParseException
-
QuadData
- Throws:
ParseException
-
Quads
- Throws:
ParseException
-
QuadsNotTriples
- Throws:
ParseException
-
Update
- Throws:
ParseException
-
Load
- Throws:
ParseException
-
Clear
- Throws:
ParseException
-
Drop
- Throws:
ParseException
-
Add
- Throws:
ParseException
-
Move
- Throws:
ParseException
-
Copy
- Throws:
ParseException
-
Create
- Throws:
ParseException
-
InsertData
- Throws:
ParseException
-
DeleteData
- Throws:
ParseException
-
DeleteWhere
- Throws:
ParseException
-
DeleteClause
- Throws:
ParseException
-
InsertClause
- Throws:
ParseException
-
UsingClause
- Throws:
ParseException
-
WithClause
- Throws:
ParseException
-
ModifyWhereClause
- Throws:
ParseException
-
Modify
- Throws:
ParseException
-
ReInit
Reinitialise. -
ReInit
Reinitialise. -
getNextToken
Get the next Token. -
getToken
Get the specific Token. -
generateParseException
Generate ParseException. -
trace_enabled
public final boolean trace_enabled()Trace enabled. -
enable_tracing
public final void enable_tracing()Enable tracing. -
disable_tracing
public final void disable_tracing()Disable tracing.
-