kanga.parser
Class KangaParser

java.lang.Object
  extended by kanga.parser.KangaParser
All Implemented Interfaces:
KangaParserConstants

public class KangaParser
extends java.lang.Object
implements KangaParserConstants


Field Summary
 Token jj_nt
          Next token.
 Token token
          Current token.
 KangaParserTokenManager token_source
          Generated Token Manager.
 
Fields inherited from interface kanga.parser.KangaParserConstants
a0, a1, a2, a3, ALOAD, AND, ARG, ASTORE, at, BEGIN, CALL, CJUMP, CODE, DEFAULT, DIGIT, DOT, END, EOF, EQ, ERROR, FORMAL_COMMENT, fp, GE, gp, GT, HALLOCATE, HLOAD, HSTORE, IDENTIFIER, INTEGER_LITERAL, JUMP, k0, k1, LBRACE, LE, LETTER, LPAREN, LSQPAREN, LT, MAIN, MEM, MINUS, MOVE, MULTI_LINE_COMMENT, NE, NOOP, NOT, OR, PASSARG, PLUS, PRINT, ra, RBRACE, RETURN, RPAREN, RSQPAREN, s0, s1, s2, s3, s4, s5, s6, s7, SINGLE_LINE_COMMENT, sp, SPILLEDARG, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, TEMP, TIMES, tokenImage, v0, v1, ZERO
 
Constructor Summary
KangaParser(java.io.InputStream stream)
          Constructor with InputStream.
KangaParser(java.io.InputStream stream, java.lang.String encoding)
          Constructor with InputStream and supplied encoding
KangaParser(KangaParserTokenManager tm)
          Constructor with generated Token Manager.
KangaParser(java.io.Reader stream)
          Constructor.
 
Method Summary
 ALoadStmt ALoadStmt()
           
 AStoreStmt AStoreStmt()
           
 BinOp BinOp()
           
 CallStmt CallStmt()
           
 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()
           
 PassArgStmt PassArgStmt()
           
 PrintStmt PrintStmt()
           
 Procedure Procedure()
           
 Reg Reg()
           
 void ReInit(java.io.InputStream stream)
          Reinitialise.
 void ReInit(java.io.InputStream stream, java.lang.String encoding)
          Reinitialise.
 void ReInit(KangaParserTokenManager tm)
          Reinitialise.
 void ReInit(java.io.Reader stream)
          Reinitialise.
 SimpleExp SimpleExp()
           
 SpilledArg SpilledArg()
           
 Stmt Stmt()
           
 StmtList StmtList()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public KangaParserTokenManager token_source
Generated Token Manager.


token

public Token token
Current token.


jj_nt

public Token jj_nt
Next token.

Constructor Detail

KangaParser

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


KangaParser

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


KangaParser

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


KangaParser

public KangaParser(KangaParserTokenManager 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

ALoadStmt

public final ALoadStmt ALoadStmt()
                          throws ParseException
Throws:
ParseException

AStoreStmt

public final AStoreStmt AStoreStmt()
                            throws ParseException
Throws:
ParseException

PassArgStmt

public final PassArgStmt PassArgStmt()
                              throws ParseException
Throws:
ParseException

CallStmt

public final CallStmt CallStmt()
                        throws ParseException
Throws:
ParseException

Exp

public final Exp Exp()
              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

SpilledArg

public final SpilledArg SpilledArg()
                            throws ParseException
Throws:
ParseException

SimpleExp

public final SimpleExp SimpleExp()
                          throws ParseException
Throws:
ParseException

Reg

public final Reg Reg()
              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(KangaParserTokenManager 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.