ca.uwaterloo.cs.ql.interp
Class Interp

java.lang.Object
  extended by ca.uwaterloo.cs.ql.interp.Interp
All Implemented Interfaces:
InterpConstants

public class Interp
extends java.lang.Object
implements InterpConstants


Field Summary
static Token jj_nt
           
static boolean lookingAhead
           
static Token token
           
static InterpTokenManager token_source
           
 
Fields inherited from interface ca.uwaterloo.cs.ql.interp.InterpConstants
ADDRESS, AND, ARGN, ASSIGN, ASSIGN_DIVIDE, ASSIGN_MINUS, ASSIGN_MULTIPLY, ASSIGN_PLUS, ATTR, cmd_delete, cmd_exit, cmd_help, cmd_print, cmd_quit, COLON, COLUMN, COMMA, COMPOSE, CROSS, DEFAULT, DIGIT, DIVIDE, DOLLAR, ELSE, EOF, EQ, FALSE, FLOAT_LITERAL, FOR, GE, GT, IDENTIFIER, IF, IN, INT_LITERAL, INTERSECT, IOAPPEND, IOTOFILE, LBRACE, LBRACKET, LE, LETTER, LINE_CONTINUE, LPAREN, LT, ME, MINUS, MOD, MULTIPLY, NE, NOT, op_dom, op_ent, op_id, op_inv, op_rng, OR, PLUS, POUND, PROJECT, RBRACE, RBRACKET, RCOMPOSE, RETURN, RPAREN, SEMICOLON, STRING_LITERAL, TILDE, tokenImage, TRUE, UE, WHILE
 
Constructor Summary
Interp()
          Constructs a command-line Interp.
Interp(java.io.File f)
          Constructs a script-file Interp, which evaluates the specified file.
Interp(java.io.InputStream stream)
           
Interp(InterpTokenManager tm)
           
Interp(java.io.Reader stream)
           
 
Method Summary
static ExpressionNode AdditiveExpression()
           
static ArgumentsNode Arguments()
           
static StatementNode Assignment()
           
static void AssignmentLookahead()
          Part of Statements: Assignment syntax follows
static StatementNode BlockStatement()
           
static boolean BooleanLiteral()
           
 void bootstrapEvaluate(Env env, java.lang.String[] args)
          Bootstrap an Env with a given script.
static void ClosureLookahead()
           
static ColumnNode Column()
           
static CommandNode CommandDelete()
           
static CommandNode CommandHelp()
           
static CommandNode CommandPrint()
           
static CommandNode CommandQuit()
           
static StatementNode CommandStatement()
           
static void CommandStatementLookahead()
          Part of Statements: CommandStatement syntax follows
static ExpressionNode ConditionalAndExpression()
           
static ExpressionNode ConditionalExpression()
           
static ExpressionNode ConditionalOrExpression()
           
static StatementNode ControlStatement()
           
static void ControlStatementLookahead()
          Part of Statements: ControlStatement syntax follows
static void disable_tracing()
           
static void enable_tracing()
           
static ExpressionNode Expression()
           
static void ExpressionLookahead()
           
 void fileEvaluate(Env env, java.lang.String[] args)
           
static StatementNode ForStatement()
           
static ParseException generateParseException()
           
static Token getNextToken()
           
static Token getToken(int index)
           
static StatementNode IfStatement()
           
static Interp instance()
           
static ExpressionNode Literal()
           
static ExpressionNode MultiplicativeExpression()
           
 ScriptUnitNode parse()
           
static ExpressionNode PrefixExpression()
           
static ExpressionNode PrimaryExpression()
           
static StatementNode PrologClause()
           
static void PrologClauseLookahead()
          Part of Statements: Prolog syntax follows
static StatementNode PrologExpression()
           
static void PrologExpressionLookahead()
           
static Interp reinit(java.io.File f)
           
static void ReInit(java.io.InputStream stream)
           
 void ReInit(InterpTokenManager tm)
           
static void ReInit(java.io.Reader stream)
           
static ExpressionNode RelationalExpression()
           
static StatementNode ReturnStatement()
           
static ScriptUnitNode ScriptUnit()
          Script syntax.
static SelectConditionNode SelectAndExpression()
           
static SelectConditionNode SelectCondition()
          Select expression syntax follows.
static SelectConditionNode SelectOrExpression()
           
static SelectConditionNode SelectRelationalExpression()
           
static ExpressionNode SetConstructor()
           
static ExpressionNode SetElement()
           
static VariableNode SpecialVariable()
           
static StatementNode Statement()
          Statement syntax follows.
static ExpressionNode SuffixExpression()
           
static void SuffixExpressionLookahead()
           
static ExpressionNode UnaryExpression()
           
static VariableNode Variable()
          Expression syntax follows
static StatementNode WhileStatement()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public static InterpTokenManager token_source

token

public static Token token

jj_nt

public static Token jj_nt

lookingAhead

public static boolean lookingAhead
Constructor Detail

Interp

public Interp()
Constructs a command-line Interp.


Interp

public Interp(java.io.File f)
       throws java.io.FileNotFoundException
Constructs a script-file Interp, which evaluates the specified file.

Throws:
java.io.FileNotFoundException

Interp

public Interp(java.io.InputStream stream)

Interp

public Interp(java.io.Reader stream)

Interp

public Interp(InterpTokenManager tm)
Method Detail

instance

public static Interp instance()

reinit

public static Interp reinit(java.io.File f)
                     throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

parse

public ScriptUnitNode parse()

bootstrapEvaluate

public void bootstrapEvaluate(Env env,
                              java.lang.String[] args)
Bootstrap an Env with a given script. After evaluation, the main ScriptUnit is not removed.


fileEvaluate

public void fileEvaluate(Env env,
                         java.lang.String[] args)

ScriptUnit

public static final ScriptUnitNode ScriptUnit()
                                       throws ParseException
Script syntax.

Throws:
ParseException

Statement

public static final StatementNode Statement()
                                     throws ParseException
Statement syntax follows.

Throws:
ParseException

ControlStatementLookahead

public static final void ControlStatementLookahead()
                                            throws ParseException
Part of Statements: ControlStatement syntax follows

Throws:
ParseException

ControlStatement

public static final StatementNode ControlStatement()
                                            throws ParseException
Throws:
ParseException

IfStatement

public static final StatementNode IfStatement()
                                       throws ParseException
Throws:
ParseException

ForStatement

public static final StatementNode ForStatement()
                                        throws ParseException
Throws:
ParseException

WhileStatement

public static final StatementNode WhileStatement()
                                          throws ParseException
Throws:
ParseException

ReturnStatement

public static final StatementNode ReturnStatement()
                                           throws ParseException
Throws:
ParseException

BlockStatement

public static final StatementNode BlockStatement()
                                          throws ParseException
Throws:
ParseException

CommandStatementLookahead

public static final void CommandStatementLookahead()
                                            throws ParseException
Part of Statements: CommandStatement syntax follows

Throws:
ParseException

CommandStatement

public static final StatementNode CommandStatement()
                                            throws ParseException
Throws:
ParseException

CommandQuit

public static final CommandNode CommandQuit()
                                     throws ParseException
Throws:
ParseException

CommandHelp

public static final CommandNode CommandHelp()
                                     throws ParseException
Throws:
ParseException

CommandPrint

public static final CommandNode CommandPrint()
                                      throws ParseException
Throws:
ParseException

CommandDelete

public static final CommandNode CommandDelete()
                                       throws ParseException
Throws:
ParseException

PrologClauseLookahead

public static final void PrologClauseLookahead()
                                        throws ParseException
Part of Statements: Prolog syntax follows

Throws:
ParseException

PrologClause

public static final StatementNode PrologClause()
                                        throws ParseException
Throws:
ParseException

PrologExpressionLookahead

public static final void PrologExpressionLookahead()
                                            throws ParseException
Throws:
ParseException

PrologExpression

public static final StatementNode PrologExpression()
                                            throws ParseException
Throws:
ParseException

AssignmentLookahead

public static final void AssignmentLookahead()
                                      throws ParseException
Part of Statements: Assignment syntax follows

Throws:
ParseException

Assignment

public static final StatementNode Assignment()
                                      throws ParseException
Throws:
ParseException

Variable

public static final VariableNode Variable()
                                   throws ParseException
Expression syntax follows

Throws:
ParseException

SpecialVariable

public static final VariableNode SpecialVariable()
                                          throws ParseException
Throws:
ParseException

ExpressionLookahead

public static final void ExpressionLookahead()
                                      throws ParseException
Throws:
ParseException

Expression

public static final ExpressionNode Expression()
                                       throws ParseException
Throws:
ParseException

ConditionalExpression

public static final ExpressionNode ConditionalExpression()
                                                  throws ParseException
Throws:
ParseException

ConditionalOrExpression

public static final ExpressionNode ConditionalOrExpression()
                                                    throws ParseException
Throws:
ParseException

ConditionalAndExpression

public static final ExpressionNode ConditionalAndExpression()
                                                     throws ParseException
Throws:
ParseException

RelationalExpression

public static final ExpressionNode RelationalExpression()
                                                 throws ParseException
Throws:
ParseException

AdditiveExpression

public static final ExpressionNode AdditiveExpression()
                                               throws ParseException
Throws:
ParseException

MultiplicativeExpression

public static final ExpressionNode MultiplicativeExpression()
                                                     throws ParseException
Throws:
ParseException

UnaryExpression

public static final ExpressionNode UnaryExpression()
                                            throws ParseException
Throws:
ParseException

PrefixExpression

public static final ExpressionNode PrefixExpression()
                                             throws ParseException
Throws:
ParseException

SuffixExpressionLookahead

public static final void SuffixExpressionLookahead()
                                            throws ParseException
Throws:
ParseException

ClosureLookahead

public static final void ClosureLookahead()
                                   throws ParseException
Throws:
ParseException

SuffixExpression

public static final ExpressionNode SuffixExpression()
                                             throws ParseException
Throws:
ParseException

PrimaryExpression

public static final ExpressionNode PrimaryExpression()
                                              throws ParseException
Throws:
ParseException

Literal

public static final ExpressionNode Literal()
                                    throws ParseException
Throws:
ParseException

BooleanLiteral

public static final boolean BooleanLiteral()
                                    throws ParseException
Throws:
ParseException

SetConstructor

public static final ExpressionNode SetConstructor()
                                           throws ParseException
Throws:
ParseException

SetElement

public static final ExpressionNode SetElement()
                                       throws ParseException
Throws:
ParseException

Arguments

public static final ArgumentsNode Arguments()
                                     throws ParseException
Throws:
ParseException

SelectCondition

public static final SelectConditionNode SelectCondition()
                                                 throws ParseException
Select expression syntax follows.

Throws:
ParseException

SelectOrExpression

public static final SelectConditionNode SelectOrExpression()
                                                    throws ParseException
Throws:
ParseException

SelectAndExpression

public static final SelectConditionNode SelectAndExpression()
                                                     throws ParseException
Throws:
ParseException

Column

public static final ColumnNode Column()
                               throws ParseException
Throws:
ParseException

SelectRelationalExpression

public static final SelectConditionNode SelectRelationalExpression()
                                                            throws ParseException
Throws:
ParseException

ReInit

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

ReInit

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

ReInit

public void ReInit(InterpTokenManager tm)

getNextToken

public static final Token getNextToken()

getToken

public static final Token getToken(int index)

generateParseException

public static final ParseException generateParseException()

enable_tracing

public static final void enable_tracing()

disable_tracing

public static final void disable_tracing()