piglet.parser
Class PigletParser

java.lang.Object
  extended by piglet.parser.PigletParser
All Implemented Interfaces:
PigletParserConstants

public class PigletParser
extends java.lang.Object
implements PigletParserConstants


Field Summary
 Token jj_nt
          Next token.
 Token token
          Current token.
 PigletParserTokenManager token_source
          Generated Token Manager.
 
Fields inherited from interface piglet.parser.PigletParserConstants
AND, ARG, BEGIN, CALL, CJUMP, CODE, DEFAULT, DIGIT, DOT, END, EOF, EQ, ERROR, FORMAL_COMMENT, GE, GT, HALLOCATE, HLOAD, HSTORE, IDENTIFIER, INTEGER_LITERAL, JUMP, LBRACE, LE, LETTER, LPAREN, LSQPAREN, LT, MAIN, MEM, MINUS, MOVE, MULTI_LINE_COMMENT, NE, NOOP, NOT, OR, PLUS, PRINT, RBRACE, RETURN, RPAREN, RSQPAREN, SINGLE_LINE_COMMENT, TEMP, TIMES, tokenImage
 
Constructor Summary
PigletParser(java.io.InputStream stream)
          Constructor with InputStream.
PigletParser(java.io.InputStream stream, java.lang.String encoding)
          Constructor with InputStream and supplied encoding
PigletParser(PigletParserTokenManager tm)
          Constructor with generated Token Manager.
PigletParser(java.io.Reader stream)
          Constructor.
 
Method Summary
 BinOp BinOp()
           
 Call Call()
           
 CJumpStmt CJumpStmt()
           
 void disable_tracing()
          Disable tracing.
 void enable_tracing()
          Enable tracing.
 ErrorStmt ErrorStmt()
           
 Exp Exp()
           
 ParseException generateParseException()
          Generate ParseException.
 Token getNextToken()
          Get the next Token.
 Token getToken(int index)
          Get the specific Token.
 Goal Goal()
           
 HAllocate HAllocate()
           
 HLoadStmt HLoadStmt()
           
 HStoreStmt HStoreStmt()
           
 IntegerLiteral IntegerLiteral()
           
 JumpStmt JumpStmt()
           
 Label Label()
           
 MoveStmt MoveStmt()
           
 NoOpStmt NoOpStmt()
           
 Operator Operator()
           
 PrintStmt PrintStmt()
           
 Procedure Procedure()
           
 void ReInit(java.io.InputStream stream)
          Reinitialise.
 void ReInit(java.io.InputStream stream, java.lang.String encoding)
          Reinitialise.
 void ReInit(PigletParserTokenManager tm)
          Reinitialise.
 void ReInit(java.io.Reader stream)
          Reinitialise.
 Stmt Stmt()
           
 StmtExp StmtExp()
           
 StmtList StmtList()
           
 Temp Temp()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public PigletParserTokenManager token_source
Generated Token Manager.


token

public Token token
Current token.


jj_nt

public Token jj_nt
Next token.

Constructor Detail

PigletParser

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


PigletParser

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


PigletParser

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


PigletParser

public PigletParser(PigletParserTokenManager tm)
Constructor with generated Token Manager.

Method Detail

Goal

public final Goal Goal()
                throws ParseException
Throws:
ParseException

StmtList

public final StmtList StmtList()
                        throws ParseException
Throws:
ParseException

Procedure

public final Procedure Procedure()
                          throws ParseException
Throws:
ParseException

Stmt

public final Stmt Stmt()
                throws ParseException
Throws:
ParseException

NoOpStmt

public final NoOpStmt NoOpStmt()
                        throws ParseException
Throws:
ParseException

ErrorStmt

public final ErrorStmt ErrorStmt()
                          throws ParseException
Throws:
ParseException

CJumpStmt

public final CJumpStmt CJumpStmt()
                          throws ParseException
Throws:
ParseException

JumpStmt

public final JumpStmt JumpStmt()
                        throws ParseException
Throws:
ParseException

HStoreStmt

public final HStoreStmt HStoreStmt()
                            throws ParseException
Throws:
ParseException

HLoadStmt

public final HLoadStmt HLoadStmt()
                          throws ParseException
Throws:
ParseException

MoveStmt

public final MoveStmt MoveStmt()
                        throws ParseException
Throws:
ParseException

PrintStmt

public final PrintStmt PrintStmt()
                          throws ParseException
Throws:
ParseException

Exp

public final Exp Exp()
              throws ParseException
Throws:
ParseException

StmtExp

public final StmtExp StmtExp()
                      throws ParseException
Throws:
ParseException

Call

public final Call Call()
                throws ParseException
Throws:
ParseException

HAllocate

public final HAllocate HAllocate()
                          throws ParseException
Throws:
ParseException

BinOp

public final BinOp BinOp()
                  throws ParseException
Throws:
ParseException

Operator

public final Operator Operator()
                        throws ParseException
Throws:
ParseException

Temp

public final Temp Temp()
                throws ParseException
Throws:
ParseException

IntegerLiteral

public final IntegerLiteral IntegerLiteral()
                                    throws ParseException
Throws:
ParseException

Label

public final Label Label()
                  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(PigletParserTokenManager 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.