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

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

public class SyntaxTreeBuilder
extends java.lang.Object
implements SyntaxTreeBuilderTreeConstants, SyntaxTreeBuilderConstants


Field Summary
 Token jj_nt
          Next token.
protected  JJTSyntaxTreeBuilderState jjtree
           
 Token token
          Current token.
 SyntaxTreeBuilderTokenManager token_source
          Generated Token Manager.
 
Fields inherited from interface org.openrdf.query.parser.serql.ast.SyntaxTreeBuilderTreeConstants
JJTAND, JJTARGLIST, JJTBASICPATHEXPR, JJTBASICPATHEXPRTAIL, JJTBNODE, JJTBOOLEANCONSTANT, JJTBOUND, JJTCOMPARE, JJTCOMPAREALL, JJTCOMPAREANY, JJTCOMPOPERATOR, JJTCONSTRUCT, JJTCONSTRUCTQUERY, JJTDATATYPE, JJTEDGE, JJTEXISTS, JJTFROM, JJTFUNCTIONCALL, JJTGRAPHINTERSECT, JJTGRAPHMINUS, JJTGRAPHUNION, JJTIN, JJTINLIST, JJTISBNODE, JJTISLITERAL, JJTISRESOURCE, JJTISURI, JJTLABEL, JJTLANG, JJTLANGMATCHES, JJTLIKE, JJTLIMIT, JJTLITERAL, JJTLOCALNAME, JJTNAMESPACE, JJTNAMESPACEDECL, JJTNODE, JJTNODEELEM, jjtNodeName, JJTNOT, JJTNULL, JJTOFFSET, JJTOPTPATHEXPR, JJTOPTPATHEXPRTAIL, JJTOR, JJTORDERBY, JJTORDEREXPR, JJTPATHEXPRLIST, JJTPATHEXPRUNION, JJTPROJECTIONELEM, JJTQNAME, JJTQUERYBODY, JJTQUERYCONTAINER, JJTREGEX, JJTREIFIEDSTAT, JJTSAMETERM, JJTSELECT, JJTSELECTQUERY, JJTSTR, JJTSTRING, JJTTUPLEINTERSECT, JJTTUPLEMINUS, JJTTUPLEUNION, JJTURI, JJTVAR, JJTVOID, JJTWHERE
 
Fields inherited from interface org.openrdf.query.parser.serql.ast.SyntaxTreeBuilderConstants
ALL, ALPHA, AND, ANY, AS, ASC, BASECHAR, BNODE, BOUND, BY, CASE, COMBINING_CHAR, COMMA, CONSTRUCT, CONTEXT, DATATYPE, DATATYPED_LITERAL, DECIMAL, DEFAULT, DESC, DIGIT, DISTINCT, EOF, EQ, ESCAPED_CHAR, EXISTS, EXTENDER, FALSE, FROM, GE, GT, HEX, IDEOGRAPHIC, IGNORE, IN, INTERSECT, ISBNODE, ISLITERAL, ISRESOURCE, ISURI, LABEL, LANG, LANG_LITERAL, LANG_TAG, LANGMATCHES, LBRACE, LBRACK, LE, LETTER, LIKE, LIMIT, LOCALNAME, LPAREN, LT, MINUS, NAMESPACE, NCNAME, NCNAME_CHAR, NE, NEG_INTEGER, NOT, NULL, NUM, OFFSET, OR, ORDER, POS_INTEGER, PREFIX_NAME, QNAME, RBRACE, RBRACK, REDUCED, REGEX, RPAREN, SAFE_CHAR, SAMETERM, SCHEME, SELECT, SEMICOLON, SINGLE_LINE_COMMENT, STAR, STR, STRING, tokenImage, TRUE, UNICODE_ESC, UNION, URI, USING, WHERE
 
Constructor Summary
SyntaxTreeBuilder(java.io.InputStream stream)
          Constructor with InputStream.
SyntaxTreeBuilder(java.io.InputStream stream, java.lang.String encoding)
          Constructor with InputStream and supplied encoding
SyntaxTreeBuilder(java.io.Reader stream)
          Constructor.
SyntaxTreeBuilder(SyntaxTreeBuilderTokenManager tm)
          Constructor with generated Token Manager.
 
Method Summary
 void And()
           
 void ArgList()
           
 void BasicPathExpr()
           
 ASTPathExprTail BasicPathExprTail()
           
 void BNode()
           
 void BooleanConstant()
           
 void BooleanElem()
           
 void BooleanExpr()
           
 void BooleanValueOp()
           
 void Bound()
           
 void CompOperator()
           
 void Construct()
           
 void ConstructQuery()
           
 void ContextID()
           
 void Datatype()
           
 void DatatypedLiteral()
           
 void DecimalLiteral()
           
 void disable_tracing()
          Disable tracing.
 void Edge()
           
 void enable_tracing()
          Enable tracing.
 void Exists()
           
 void From()
           
 void FunctionCall()
           
 ParseException generateParseException()
          Generate ParseException.
 Token getNextToken()
          Get the next Token.
 Token getToken(int index)
          Get the specific Token.
 void GraphQuery()
           
 void GraphQuerySet()
           
 void IntegerLiteral()
           
 void IsBNode()
           
 void IsLiteral()
           
 void IsResource()
           
 void IsURI()
           
 void Label()
           
 void Lang()
           
 void LangLiteral()
           
 void LangMatches()
           
 void Limit()
           
 void Literal()
           
 void LocalName()
           
 void Namespace()
           
 void NamespaceDecl()
           
 void NamespaceDeclList()
           
 void Node()
           
 void NodeElem()
           
 void Not()
           
 void Null()
           
 void Offset()
           
 void OptPathExpr()
           
 ASTPathExprTail OptPathExprTail()
           
 void Or()
           
 void OrderBy()
           
 void OrderExpr()
           
 void OrderExprList()
           
static ASTQueryContainer parseQuery(java.lang.String query)
          Parses the supplied SeRQL query and builds a syntax tree from it.
 void PathExpr()
           
 void PathExprBranch()
           
 void PathExprCont()
           
 void PathExprList()
           
 ASTPathExprTail PathExprTail()
           
 int PosInteger()
           
 void ProjectionElem()
           
 void QName()
           
 void Query()
           
 void QueryBody()
           
 ASTQueryContainer QueryContainer()
           
 void Regex()
           
 void ReifiedStat()
           
 void ReInit(java.io.InputStream stream)
          Reinitialise.
 void ReInit(java.io.InputStream stream, java.lang.String encoding)
          Reinitialise.
 void ReInit(java.io.Reader stream)
          Reinitialise.
 void ReInit(SyntaxTreeBuilderTokenManager tm)
          Reinitialise.
 void SameTerm()
           
 void Select()
           
 void SelectQuery()
           
 void SimpleLiteral()
           
 void Str()
           
 void String()
           
 void TupleQuery()
           
 void TupleQuerySet()
           
 void UnionPathExpr()
           
 void URI()
           
 void URIRef()
           
 void Value()
           
 void ValueExpr()
           
 void ValueExprOrNull()
           
 void Var()
           
 void Where()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jjtree

protected JJTSyntaxTreeBuilderState jjtree

token_source

public SyntaxTreeBuilderTokenManager token_source
Generated Token Manager.


token

public Token token
Current token.


jj_nt

public Token jj_nt
Next token.

Constructor Detail

SyntaxTreeBuilder

public SyntaxTreeBuilder(java.io.InputStream stream)
Constructor with InputStream.


SyntaxTreeBuilder

public SyntaxTreeBuilder(java.io.InputStream stream,
                         java.lang.String encoding)
Constructor with InputStream and supplied encoding


SyntaxTreeBuilder

public SyntaxTreeBuilder(java.io.Reader stream)
Constructor.


SyntaxTreeBuilder

public SyntaxTreeBuilder(SyntaxTreeBuilderTokenManager tm)
Constructor with generated Token Manager.

Method Detail

parseQuery

public static ASTQueryContainer parseQuery(java.lang.String query)
                                    throws TokenMgrError,
                                           ParseException
Parses the supplied SeRQL query and builds a syntax tree from it.

Parameters:
query - A SeRQL 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

NamespaceDeclList

public final void NamespaceDeclList()
                             throws ParseException
Throws:
ParseException

NamespaceDecl

public final void NamespaceDecl()
                         throws ParseException
Throws:
ParseException

Query

public final void Query()
                 throws ParseException
Throws:
ParseException

TupleQuerySet

public final void TupleQuerySet()
                         throws ParseException
Throws:
ParseException

GraphQuerySet

public final void GraphQuerySet()
                         throws ParseException
Throws:
ParseException

TupleQuery

public final void TupleQuery()
                      throws ParseException
Throws:
ParseException

GraphQuery

public final void GraphQuery()
                      throws ParseException
Throws:
ParseException

SelectQuery

public final void SelectQuery()
                       throws ParseException
Throws:
ParseException

Select

public final void Select()
                  throws ParseException
Throws:
ParseException

ProjectionElem

public final void ProjectionElem()
                          throws ParseException
Throws:
ParseException

ConstructQuery

public final void ConstructQuery()
                          throws ParseException
Throws:
ParseException

Construct

public final void Construct()
                     throws ParseException
Throws:
ParseException

QueryBody

public final void QueryBody()
                     throws ParseException
Throws:
ParseException

From

public final void From()
                throws ParseException
Throws:
ParseException

Where

public final void Where()
                 throws ParseException
Throws:
ParseException

OrderBy

public final void OrderBy()
                   throws ParseException
Throws:
ParseException

Limit

public final void Limit()
                 throws ParseException
Throws:
ParseException

Offset

public final void Offset()
                  throws ParseException
Throws:
ParseException

ContextID

public final void ContextID()
                     throws ParseException
Throws:
ParseException

PathExprList

public final void PathExprList()
                        throws ParseException
Throws:
ParseException

UnionPathExpr

public final void UnionPathExpr()
                         throws ParseException
Throws:
ParseException

PathExpr

public final void PathExpr()
                    throws ParseException
Throws:
ParseException

BasicPathExpr

public final void BasicPathExpr()
                         throws ParseException
Throws:
ParseException

OptPathExpr

public final void OptPathExpr()
                       throws ParseException
Throws:
ParseException

PathExprCont

public final void PathExprCont()
                        throws ParseException
Throws:
ParseException

PathExprBranch

public final void PathExprBranch()
                          throws ParseException
Throws:
ParseException

PathExprTail

public final ASTPathExprTail PathExprTail()
                                   throws ParseException
Throws:
ParseException

BasicPathExprTail

public final ASTPathExprTail BasicPathExprTail()
                                        throws ParseException
Throws:
ParseException

OptPathExprTail

public final ASTPathExprTail OptPathExprTail()
                                      throws ParseException
Throws:
ParseException

Edge

public final void Edge()
                throws ParseException
Throws:
ParseException

Node

public final void Node()
                throws ParseException
Throws:
ParseException

NodeElem

public final void NodeElem()
                    throws ParseException
Throws:
ParseException

ReifiedStat

public final void ReifiedStat()
                       throws ParseException
Throws:
ParseException

OrderExprList

public final void OrderExprList()
                         throws ParseException
Throws:
ParseException

OrderExpr

public final void OrderExpr()
                     throws ParseException
Throws:
ParseException

BooleanExpr

public final void BooleanExpr()
                       throws ParseException
Throws:
ParseException

Or

public final void Or()
              throws ParseException
Throws:
ParseException

And

public final void And()
               throws ParseException
Throws:
ParseException

BooleanElem

public final void BooleanElem()
                       throws ParseException
Throws:
ParseException

BooleanConstant

public final void BooleanConstant()
                           throws ParseException
Throws:
ParseException

Not

public final void Not()
               throws ParseException
Throws:
ParseException

Bound

public final void Bound()
                 throws ParseException
Throws:
ParseException

SameTerm

public final void SameTerm()
                    throws ParseException
Throws:
ParseException

IsResource

public final void IsResource()
                      throws ParseException
Throws:
ParseException

IsLiteral

public final void IsLiteral()
                     throws ParseException
Throws:
ParseException

IsURI

public final void IsURI()
                 throws ParseException
Throws:
ParseException

IsBNode

public final void IsBNode()
                   throws ParseException
Throws:
ParseException

LangMatches

public final void LangMatches()
                       throws ParseException
Throws:
ParseException

Regex

public final void Regex()
                 throws ParseException
Throws:
ParseException

Exists

public final void Exists()
                  throws ParseException
Throws:
ParseException

BooleanValueOp

public final void BooleanValueOp()
                          throws ParseException
Throws:
ParseException

CompOperator

public final void CompOperator()
                        throws ParseException
Throws:
ParseException

ValueExprOrNull

public final void ValueExprOrNull()
                           throws ParseException
Throws:
ParseException

ValueExpr

public final void ValueExpr()
                     throws ParseException
Throws:
ParseException

Var

public final void Var()
               throws ParseException
Throws:
ParseException

Datatype

public final void Datatype()
                    throws ParseException
Throws:
ParseException

Lang

public final void Lang()
                throws ParseException
Throws:
ParseException

Label

public final void Label()
                 throws ParseException
Throws:
ParseException

Namespace

public final void Namespace()
                     throws ParseException
Throws:
ParseException

LocalName

public final void LocalName()
                     throws ParseException
Throws:
ParseException

Str

public final void Str()
               throws ParseException
Throws:
ParseException

FunctionCall

public final void FunctionCall()
                        throws ParseException
Throws:
ParseException

ArgList

public final void ArgList()
                   throws ParseException
Throws:
ParseException

Value

public final void Value()
                 throws ParseException
Throws:
ParseException

URIRef

public final void URIRef()
                  throws ParseException
Throws:
ParseException

URI

public final void URI()
               throws ParseException
Throws:
ParseException

QName

public final void QName()
                 throws ParseException
Throws:
ParseException

BNode

public final void BNode()
                 throws ParseException
Throws:
ParseException

Literal

public final void Literal()
                   throws ParseException
Throws:
ParseException

SimpleLiteral

public final void SimpleLiteral()
                         throws ParseException
Throws:
ParseException

LangLiteral

public final void LangLiteral()
                       throws ParseException
Throws:
ParseException

DatatypedLiteral

public final void DatatypedLiteral()
                            throws ParseException
Throws:
ParseException

IntegerLiteral

public final void IntegerLiteral()
                          throws ParseException
Throws:
ParseException

DecimalLiteral

public final void DecimalLiteral()
                          throws ParseException
Throws:
ParseException

String

public final void String()
                  throws ParseException
Throws:
ParseException

Null

public final void Null()
                throws ParseException
Throws:
ParseException

PosInteger

public final int PosInteger()
                     throws ParseException
Throws:
ParseException

ReInit

public void ReInit(java.io.InputStream stream)
Reinitialise.


ReInit

public void ReInit(java.io.InputStream stream,
                   java.lang.String encoding)
Reinitialise.


ReInit

public void ReInit(java.io.Reader stream)
Reinitialise.


ReInit

public void ReInit(SyntaxTreeBuilderTokenManager tm)
Reinitialise.


getNextToken

public final Token getNextToken()
Get the next Token.


getToken

public final Token getToken(int index)
Get the specific Token.


generateParseException

public ParseException generateParseException()
Generate ParseException.


enable_tracing

public final void enable_tracing()
Enable tracing.


disable_tracing

public final void disable_tracing()
Disable tracing.



Copyright © 2001-2010 Aduna. All Rights Reserved.