org.ilrt.inkling.query.squish
Class SquishParser

java.lang.Object
  |
  +--org.ilrt.inkling.api.Graph
        |
        +--org.ilrt.inkling.api.ComplexQuery
              |
              +--org.ilrt.inkling.query.squish.SquishParser
All Implemented Interfaces:
GraphInterface, SimpleQueryInterface, SquishParserConstants

public class SquishParser
extends ComplexQuery
implements SquishParserConstants


Field Summary
static java.util.Vector constraints
           
static java.util.Vector graphs
           
 Token jj_nt
           
static java.util.Hashtable ns
           
 Token token
           
 SquishParserTokenManager token_source
           
static java.util.Vector triples
           
static java.util.Vector variables
           
static java.util.Vector variablesWeWant
           
 
Fields inherited from interface org.ilrt.inkling.query.squish.SquishParserConstants
ASSIGN, BANG, BIT_AND, BIT_OR, BIT_XOR, BOOLEAN_LITERAL, CHARACTER_LITERAL, COLON, COMMA, DECIMAL_LITERAL, DECR, DEFAULT, DIGIT, DOT, EOF, EQ, EQSTRING, EXPONENT, FLOATING_POINT_LITERAL, FOR, FORMAL_COMMENT, FROM, GE, GT, HEX_LITERAL, HOOK, IDENTIFIER, IN_FORMAL_COMMENT, IN_MULTI_LINE_COMMENT, IN_SINGLE_LINE_COMMENT, INCR, INTEGER_LITERAL, LBRACE, LBRACKET, LE, LETTER, LIKESTRING, LPAREN, LSHIFT, LT, MINUS, MULTI_LINE_COMMENT, NEQ, NESTRING, NULL_LITERAL, OCTAL_LITERAL, OTHER, PLUS, RBRACE, RBRACKET, REM, RPAREN, RSIGNEDSHIFT, RUNSIGNEDSHIFT, SC_AND, SC_OR, SELECT, SEMICOLON, SINGLE_LINE_COMMENT, SLASH, STAR, STRING_LITERAL, SUCH_THAT, TILDE, tokenImage, URI_LITERAL, USING, WHERE
 
Constructor Summary
SquishParser()
           
SquishParser(java.io.InputStream stream)
           
SquishParser(java.io.Reader stream)
           
SquishParser(SquishParserTokenManager tm)
           
 
Method Summary
 void clean()
          can't work out how to do constructos, so this will have to do.
 void CompilationUnit()
           
 void ConstraintClause()
           
 void ConstraintList()
           
 void ConstrNumericLiteral(Query constr)
           
 void ConstrVar(Query constr)
           
 void disable_tracing()
           
 void enable_tracing()
           
 void Expression()
           
 void ForList()
           
 void ForUriLiteral(java.lang.String id)
           
 void FromClause()
           
 ParseException generateParseException()
           
 java.util.Vector getConstraints()
          A Vector of constraints in Statement form
 java.util.Vector getGraphs()
          A Vector of Graphs used in the Query
 java.util.Hashtable getNamespaces()
           
 Token getNextToken()
           
 Token getToken(int index)
           
 java.util.Vector getTriples()
          Returns a list of the triples part of the query - the WHERE clauses, as Querys
 java.util.Vector getVariables()
          All the variables used in the query.
 java.util.Vector getVariablesWeWant()
          returns the variables specified in the SELECT clause
 java.util.Vector listVariables()
           
 void Literal()
           
static void main(java.lang.String[] argv)
           
 java.lang.String nsTransform(java.lang.String shortUri)
           
 void NumericLiteral()
           
 void NumExpression(Query constr)
           
static SquishParser parse(java.lang.String query)
          libby added this - need to update .jj.
 void Query()
           
 void ReInit(java.io.InputStream stream)
           
 void ReInit(java.io.Reader stream)
           
 void ReInit(SquishParserTokenManager tm)
           
 void SelectClause()
           
 void setQuery(java.lang.String query)
           
 void SomeFunction(Query constr)
           
 void StringExpression(Query constr)
           
 void TextLiteral()
           
 void TripleLiteral(Query trip, int position)
           
 void TripleNumericLiteral(Query trip, int position)
          fixme
 void TriplePattern()
           
 void TriplePatternClause()
           
 void TriplePatternList()
           
 void TripleTextLiteral(Query trip, int position)
           
 void TripleUriLiteral(Query trip, int position)
           
 void TripleVar(Query trip, int position)
           
 void TripleVarOrLiteral(Query trip, int position)
           
 void UriList()
           
 void UriLiteral()
           
 void UsingClause()
           
 void Var()
           
 void VarList()
           
 void VarOrLiteral()
           
 
Methods inherited from class org.ilrt.inkling.api.ComplexQuery
setVariablesWeWant
 
Methods inherited from class org.ilrt.inkling.api.Graph
ask, ask, askForObjects, askForSubjects, askQuery, askSquish, delete, getBase, getDefault, getEdges, getID, getNodes, getObjects, getPredicates, getSize, getStatements, getSubjects, getType, inspect, load, load, removeAll, setBase, setID, setType, size, tell, tellAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ilrt.inkling.api.GraphInterface
ask, ask, askSquish, delete, getBase, getStatements, removeAll, setBase, tell, tellAll
 

Field Detail

triples

public static java.util.Vector triples

variablesWeWant

public static java.util.Vector variablesWeWant

variables

public static java.util.Vector variables

constraints

public static java.util.Vector constraints

graphs

public static java.util.Vector graphs

ns

public static java.util.Hashtable ns

token_source

public SquishParserTokenManager token_source

token

public Token token

jj_nt

public Token jj_nt
Constructor Detail

SquishParser

public SquishParser()

SquishParser

public SquishParser(java.io.InputStream stream)

SquishParser

public SquishParser(java.io.Reader stream)

SquishParser

public SquishParser(SquishParserTokenManager tm)
Method Detail

main

public static void main(java.lang.String[] argv)

parse

public static SquishParser parse(java.lang.String query)
libby added this - need to update .jj. also quite horrible

clean

public void clean()
can't work out how to do constructos, so this will have to do.

setQuery

public void setQuery(java.lang.String query)

listVariables

public java.util.Vector listVariables()

getVariablesWeWant

public java.util.Vector getVariablesWeWant()
Description copied from class: ComplexQuery
returns the variables specified in the SELECT clause
Overrides:
getVariablesWeWant in class ComplexQuery

getVariables

public java.util.Vector getVariables()
Description copied from class: ComplexQuery
All the variables used in the query. Use getVariablesWeWant for the variables in the SELECT clause.
Overrides:
getVariables in class ComplexQuery

getGraphs

public java.util.Vector getGraphs()
Description copied from class: ComplexQuery
A Vector of Graphs used in the Query
Overrides:
getGraphs in class ComplexQuery

getTriples

public java.util.Vector getTriples()
Description copied from class: ComplexQuery
Returns a list of the triples part of the query - the WHERE clauses, as Querys
Overrides:
getTriples in class ComplexQuery

getConstraints

public java.util.Vector getConstraints()
Description copied from class: ComplexQuery
A Vector of constraints in Statement form
Overrides:
getConstraints in class ComplexQuery

getNamespaces

public java.util.Hashtable getNamespaces()

nsTransform

public java.lang.String nsTransform(java.lang.String shortUri)

CompilationUnit

public final void CompilationUnit()
                           throws ParseException

Query

public final void Query()
                 throws ParseException

SelectClause

public final void SelectClause()
                        throws ParseException

FromClause

public final void FromClause()
                      throws ParseException

TriplePatternClause

public final void TriplePatternClause()
                               throws ParseException

ConstraintClause

public final void ConstraintClause()
                            throws ParseException

UsingClause

public final void UsingClause()
                       throws ParseException

TriplePatternList

public final void TriplePatternList()
                             throws ParseException

TriplePattern

public final void TriplePattern()
                         throws ParseException

VarOrLiteral

public final void VarOrLiteral()
                        throws ParseException

TripleVarOrLiteral

public final void TripleVarOrLiteral(Query trip,
                                     int position)
                              throws ParseException

TripleVar

public final void TripleVar(Query trip,
                            int position)
                     throws ParseException

Var

public final void Var()
               throws ParseException

ConstrVar

public final void ConstrVar(Query constr)
                     throws ParseException

VarList

public final void VarList()
                   throws ParseException

UriList

public final void UriList()
                   throws ParseException

ConstraintList

public final void ConstraintList()
                          throws ParseException

ForList

public final void ForList()
                   throws ParseException

Expression

public final void Expression()
                      throws ParseException

SomeFunction

public final void SomeFunction(Query constr)
                        throws ParseException

NumExpression

public final void NumExpression(Query constr)
                         throws ParseException

StringExpression

public final void StringExpression(Query constr)
                            throws ParseException

TripleLiteral

public final void TripleLiteral(Query trip,
                                int position)
                         throws ParseException

Literal

public final void Literal()
                   throws ParseException

ConstrNumericLiteral

public final void ConstrNumericLiteral(Query constr)
                                throws ParseException

NumericLiteral

public final void NumericLiteral()
                          throws ParseException

UriLiteral

public final void UriLiteral()
                      throws ParseException

ForUriLiteral

public final void ForUriLiteral(java.lang.String id)
                         throws ParseException

TripleUriLiteral

public final void TripleUriLiteral(Query trip,
                                   int position)
                            throws ParseException

TripleTextLiteral

public final void TripleTextLiteral(Query trip,
                                    int position)
                             throws ParseException

TripleNumericLiteral

public final void TripleNumericLiteral(Query trip,
                                       int position)
                                throws ParseException
fixme

TextLiteral

public final void TextLiteral()
                       throws ParseException

ReInit

public void ReInit(java.io.InputStream stream)

ReInit

public void ReInit(java.io.Reader stream)

ReInit

public void ReInit(SquishParserTokenManager tm)

getNextToken

public final Token getNextToken()

getToken

public final Token getToken(int index)

generateParseException

public final ParseException generateParseException()

enable_tracing

public final void enable_tracing()

disable_tracing

public final void disable_tracing()