org.openrdf.query.parser.sparql.ast
Class SyntaxTreeBuilder

java.lang.Object
  extended by org.openrdf.query.parser.sparql.ast.SyntaxTreeBuilder
All Implemented Interfaces:
SyntaxTreeBuilderConstants, SyntaxTreeBuilderTreeConstants

public class SyntaxTreeBuilder
extends Object
implements SyntaxTreeBuilderTreeConstants, SyntaxTreeBuilderConstants


Field Summary
 Token jj_nt
           
protected  org.openrdf.query.parser.sparql.ast.JJTSyntaxTreeBuilderState jjtree
           
 boolean lookingAhead
           
 Token token
           
 SyntaxTreeBuilderTokenManager token_source
           
 
Fields inherited from interface org.openrdf.query.parser.sparql.ast.SyntaxTreeBuilderTreeConstants
JJTAND, JJTASKQUERY, JJTBASEDECL, JJTBASICGRAPHPATTERN, JJTBLANKNODE, JJTBLANKNODEPROPERTYLIST, JJTBOUND, JJTCOLLECTION, JJTCOMPARE, JJTCONSTRAINT, JJTCONSTRUCT, JJTCONSTRUCTQUERY, JJTDATASETCLAUSE, JJTDATATYPE, JJTDESCRIBE, JJTDESCRIBEQUERY, JJTFALSE, JJTFUNCTIONCALL, JJTGRAPHGRAPHPATTERN, JJTGRAPHPATTERNGROUP, JJTIRI, JJTISBLANK, JJTISIRI, JJTISLITERAL, JJTLANG, JJTLANGMATCHES, JJTLIMIT, JJTMATH, jjtNodeName, JJTNOT, JJTNUMERICLITERAL, JJTOBJECTLIST, JJTOFFSET, JJTOPTIONALGRAPHPATTERN, JJTOR, JJTORDERCLAUSE, JJTORDERCONDITION, JJTPREFIXDECL, JJTPROPERTYLIST, JJTQNAME, JJTQUERYCONTAINER, JJTRDFLITERAL, JJTREGEXEXPRESSION, JJTSAMETERM, JJTSELECT, JJTSELECTQUERY, JJTSTR, JJTSTRING, JJTTRIPLESSAMESUBJECT, JJTTRUE, JJTUNIONGRAPHPATTERN, JJTVAR, JJTVOID, JJTWHERECLAUSE
 
Fields inherited from interface org.openrdf.query.parser.sparql.ast.SyntaxTreeBuilderConstants
ALPHA, AND, ANON, ASC, ASK, BASE, BLANK_NODE_LABEL, BOUND, BY, COMMA, CONSTRUCT, DATATYPE, DECIMAL, DECIMAL_NEGATIVE, DECIMAL_POSITIVE, DECIMAL1, DECIMAL2, DEFAULT, DESC, DESCRIBE, DISTINCT, DOT, DOUBLE, DOUBLE_NEGATIVE, DOUBLE_POSITIVE, DOUBLE1, DOUBLE2, DOUBLE3, DT_PREFIX, ECHAR, EOF, EQ, EXPONENT, FALSE, FILTER, FROM, GE, GRAPH, GT, HEX, INTEGER, INTEGER_NEGATIVE, INTEGER_POSITIVE, IS_A, IS_BLANK, IS_IRI, IS_LITERAL, LANG, LANGMATCHES, LANGTAG, LBRACE, LBRACK, LE, LIMIT, LPAREN, LT, MINUS, NAMED, NE, NIL, NOT, NUM, OFFSET, OPTIONAL, OR, ORDER, PLUS, PN_CHAR, PN_CHARS_BASE, PN_CHARS_U, PN_END_CHAR, PN_LOCAL, PN_PREFIX, PN_START_CHAR, PNAME_LN, PNAME_NS, PREFIX, Q_IRI_REF, RBRACE, RBRACK, REDUCED, REGEX, RPAREN, SAFE_CHAR_LONG1, SAFE_CHAR_LONG2, SAFE_CHAR1, SAFE_CHAR2, SAMETERM, SELECT, SEMICOLON, SINGLE_LINE_COMMENT, SLASH, STAR, STR, STRING_LITERAL_LONG1, STRING_LITERAL_LONG2, STRING_LITERAL1, STRING_LITERAL2, tokenImage, TRUE, UNION, VAR_CHAR, VAR1, VAR2, VARNAME, WHERE, WHITESPACE, WS_CHAR
 
Constructor Summary
SyntaxTreeBuilder(InputStream stream)
           
SyntaxTreeBuilder(InputStream stream, String encoding)
           
SyntaxTreeBuilder(Reader stream)
           
SyntaxTreeBuilder(SyntaxTreeBuilderTokenManager tm)
           
 
Method Summary
 void AdditiveExpression()
           
 void ArgList()
           
 void AskQuery()
           
 void BaseDecl()
           
 void BasicGraphPattern()
           
 void BlankNode()
           
 void BlankNodePropertyList()
           
 void BooleanLiteral()
           
 void Bound()
           
 void BrackettedExpression()
           
 void BuiltInCall()
           
 void Collection()
           
 void ConditionalAndExpression()
           
 void ConditionalOrExpression()
           
 void Constraint()
           
 void Construct()
           
 void ConstructQuery()
           
 void DatasetClause()
           
 void Datatype()
           
 void Describe()
           
 void DescribeQuery()
           
 void disable_tracing()
           
 void enable_tracing()
           
 void Expression()
           
 void Filter()
           
 void FunctionCall()
           
 ParseException generateParseException()
           
 Token getNextToken()
           
 Token getToken(int index)
           
 void GraphGraphPattern()
           
 void GraphNode()
           
 void GraphPattern()
           
 void GraphPatternNotTriples()
           
 void GraphTerm()
           
 void GroupGraphPattern()
           
 void GroupOrUnionGraphPattern()
           
 void IRI()
           
 void IRIref()
           
 void IsBlank()
           
 void IsIRI()
           
 void IsLiteral()
           
 void Lang()
           
 void LangMatches()
           
 void Limit()
           
 void LimitOffsetClauses()
           
 void MultiplicativeExpression()
           
 void NumericExpression()
           
 void NumericLiteral()
           
 void NumericLiteralNegative()
           
 void NumericLiteralPositive()
           
 void NumericLiteralUnsigned()
           
 void Object()
           
 void ObjectList()
           
 void Offset()
           
 void OptionalGraphPattern()
           
 void OrderClause()
           
 void OrderCondition()
           
static ASTQueryContainer parseQuery(String query)
          Parses the supplied SPARQL query and builds a syntax tree from it.
 void PrefixDecl()
           
 void PrefixedName()
           
 void PrimaryExpression()
           
 void Prolog()
           
 void PropertyList()
           
 void Query()
           
 ASTQueryContainer QueryContainer()
           
 void RDFLiteral()
           
 void RegexExpression()
           
 void ReInit(InputStream stream)
           
 void ReInit(InputStream stream, String encoding)
           
 void ReInit(Reader stream)
           
 void ReInit(SyntaxTreeBuilderTokenManager tm)
           
 void RelationalExpression()
           
 void SameTerm()
           
 void Select()
           
 void SelectQuery()
           
 void Str()
           
 void String()
           
 void TriplesBlock()
           
 void TriplesNode()
           
 void TriplesSameSubject()
           
 void UnaryExpression()
           
 void UnaryMinus()
           
 void ValueLogical()
           
 void Var()
           
 void VarOrIRIref()
           
 void VarOrTerm()
           
 void Verb()
           
 void WhereClause()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jjtree

protected org.openrdf.query.parser.sparql.ast.JJTSyntaxTreeBuilderState jjtree

token_source

public SyntaxTreeBuilderTokenManager token_source

token

public Token token

jj_nt

public Token jj_nt

lookingAhead

public boolean lookingAhead
Constructor Detail

SyntaxTreeBuilder

public SyntaxTreeBuilder(InputStream stream)

SyntaxTreeBuilder

public SyntaxTreeBuilder(InputStream stream,
                         String encoding)

SyntaxTreeBuilder

public SyntaxTreeBuilder(Reader stream)

SyntaxTreeBuilder

public SyntaxTreeBuilder(SyntaxTreeBuilderTokenManager tm)
Method Detail

parseQuery

public static ASTQueryContainer parseQuery(String query)
                                    throws TokenMgrError,
                                           ParseException
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.

QueryContainer

public final ASTQueryContainer QueryContainer()
                                       throws ParseException
Throws:
ParseException

Prolog

public final void Prolog()
                  throws ParseException
Throws:
ParseException

BaseDecl

public final void BaseDecl()
                    throws ParseException
Throws:
ParseException

PrefixDecl

public final void PrefixDecl()
                      throws ParseException
Throws:
ParseException

Query

public final void Query()
                 throws ParseException
Throws:
ParseException

SelectQuery

public final void SelectQuery()
                       throws ParseException
Throws:
ParseException

Select

public final void Select()
                  throws ParseException
Throws:
ParseException

ConstructQuery

public final void ConstructQuery()
                          throws ParseException
Throws:
ParseException

Construct

public final void Construct()
                     throws ParseException
Throws:
ParseException

DescribeQuery

public final void DescribeQuery()
                         throws ParseException
Throws:
ParseException

Describe

public final void Describe()
                    throws ParseException
Throws:
ParseException

AskQuery

public final void AskQuery()
                    throws ParseException
Throws:
ParseException

DatasetClause

public final void DatasetClause()
                         throws ParseException
Throws:
ParseException

WhereClause

public final void WhereClause()
                       throws ParseException
Throws:
ParseException

OrderClause

public final void OrderClause()
                       throws ParseException
Throws:
ParseException

OrderCondition

public final void OrderCondition()
                          throws ParseException
Throws:
ParseException

LimitOffsetClauses

public final void LimitOffsetClauses()
                              throws ParseException
Throws:
ParseException

Limit

public final void Limit()
                 throws ParseException
Throws:
ParseException

Offset

public final void Offset()
                  throws ParseException
Throws:
ParseException

GroupGraphPattern

public final void GroupGraphPattern()
                             throws ParseException
Throws:
ParseException

GraphPattern

public final void GraphPattern()
                        throws ParseException
Throws:
ParseException

BasicGraphPattern

public final void BasicGraphPattern()
                             throws ParseException
Throws:
ParseException

TriplesBlock

public final void TriplesBlock()
                        throws ParseException
Throws:
ParseException

GraphPatternNotTriples

public final void GraphPatternNotTriples()
                                  throws ParseException
Throws:
ParseException

OptionalGraphPattern

public final void OptionalGraphPattern()
                                throws ParseException
Throws:
ParseException

GraphGraphPattern

public final void GraphGraphPattern()
                             throws ParseException
Throws:
ParseException

GroupOrUnionGraphPattern

public final void GroupOrUnionGraphPattern()
                                    throws ParseException
Throws:
ParseException

Filter

public final void Filter()
                  throws ParseException
Throws:
ParseException

Constraint

public final void Constraint()
                      throws ParseException
Throws:
ParseException

FunctionCall

public final void FunctionCall()
                        throws ParseException
Throws:
ParseException

ArgList

public final void ArgList()
                   throws ParseException
Throws:
ParseException

TriplesSameSubject

public final void TriplesSameSubject()
                              throws ParseException
Throws:
ParseException

PropertyList

public final void PropertyList()
                        throws ParseException
Throws:
ParseException

ObjectList

public final void ObjectList()
                      throws ParseException
Throws:
ParseException

Object

public final void Object()
                  throws ParseException
Throws:
ParseException

Verb

public final void Verb()
                throws ParseException
Throws:
ParseException

TriplesNode

public final void TriplesNode()
                       throws ParseException
Throws:
ParseException

BlankNodePropertyList

public final void BlankNodePropertyList()
                                 throws ParseException
Throws:
ParseException

Collection

public final void Collection()
                      throws ParseException
Throws:
ParseException

GraphNode

public final void GraphNode()
                     throws ParseException
Throws:
ParseException

VarOrTerm

public final void VarOrTerm()
                     throws ParseException
Throws:
ParseException

VarOrIRIref

public final void VarOrIRIref()
                       throws ParseException
Throws:
ParseException

Var

public final void Var()
               throws ParseException
Throws:
ParseException

GraphTerm

public final void GraphTerm()
                     throws ParseException
Throws:
ParseException

Expression

public final void Expression()
                      throws ParseException
Throws:
ParseException

ConditionalOrExpression

public final void ConditionalOrExpression()
                                   throws ParseException
Throws:
ParseException

ConditionalAndExpression

public final void ConditionalAndExpression()
                                    throws ParseException
Throws:
ParseException

ValueLogical

public final void ValueLogical()
                        throws ParseException
Throws:
ParseException

RelationalExpression

public final void RelationalExpression()
                                throws ParseException
Throws:
ParseException

NumericExpression

public final void NumericExpression()
                             throws ParseException
Throws:
ParseException

AdditiveExpression

public final void AdditiveExpression()
                              throws ParseException
Throws:
ParseException

MultiplicativeExpression

public final void MultiplicativeExpression()
                                    throws ParseException
Throws:
ParseException

UnaryExpression

public final void UnaryExpression()
                           throws ParseException
Throws:
ParseException

UnaryMinus

public final void UnaryMinus()
                      throws ParseException
Throws:
ParseException

PrimaryExpression

public final void PrimaryExpression()
                             throws ParseException
Throws:
ParseException

BrackettedExpression

public final void BrackettedExpression()
                                throws ParseException
Throws:
ParseException

BuiltInCall

public final void BuiltInCall()
                       throws ParseException
Throws:
ParseException

Str

public final void Str()
               throws ParseException
Throws:
ParseException

Lang

public final void Lang()
                throws ParseException
Throws:
ParseException

LangMatches

public final void LangMatches()
                       throws ParseException
Throws:
ParseException

Datatype

public final void Datatype()
                    throws ParseException
Throws:
ParseException

Bound

public final void Bound()
                 throws ParseException
Throws:
ParseException

SameTerm

public final void SameTerm()
                    throws ParseException
Throws:
ParseException

IsIRI

public final void IsIRI()
                 throws ParseException
Throws:
ParseException

IsBlank

public final void IsBlank()
                   throws ParseException
Throws:
ParseException

IsLiteral

public final void IsLiteral()
                     throws ParseException
Throws:
ParseException

RegexExpression

public final void RegexExpression()
                           throws ParseException
Throws:
ParseException

RDFLiteral

public final void RDFLiteral()
                      throws ParseException
Throws:
ParseException

NumericLiteral

public final void NumericLiteral()
                          throws ParseException
Throws:
ParseException

NumericLiteralUnsigned

public final void NumericLiteralUnsigned()
                                  throws ParseException
Throws:
ParseException

NumericLiteralPositive

public final void NumericLiteralPositive()
                                  throws ParseException
Throws:
ParseException

NumericLiteralNegative

public final void NumericLiteralNegative()
                                  throws ParseException
Throws:
ParseException

BooleanLiteral

public final void BooleanLiteral()
                          throws ParseException
Throws:
ParseException

String

public final void String()
                  throws ParseException
Throws:
ParseException

IRIref

public final void IRIref()
                  throws ParseException
Throws:
ParseException

PrefixedName

public final void PrefixedName()
                        throws ParseException
Throws:
ParseException

BlankNode

public final void BlankNode()
                     throws ParseException
Throws:
ParseException

IRI

public final void IRI()
               throws ParseException
Throws:
ParseException

ReInit

public void ReInit(InputStream stream)

ReInit

public void ReInit(InputStream stream,
                   String encoding)

ReInit

public void ReInit(Reader stream)

ReInit

public void ReInit(SyntaxTreeBuilderTokenManager tm)

getNextToken

public final Token getNextToken()

getToken

public final Token getToken(int index)

generateParseException

public ParseException generateParseException()

enable_tracing

public final void enable_tracing()

disable_tracing

public final void disable_tracing()


Copyright © 2001-2008 Aduna. All Rights Reserved.