|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Parser
A parser for RETRAN-2.
Field Summary | |
static int |
COMMA_SYM
|
private java.lang.String |
currentName
|
private int |
currentNumber
|
private int |
currentSym
|
static int |
DIV_SYM
|
static int |
ELSE_SYM
|
static int |
EQEQ_SYM
|
static int |
EQUAL_SYM
|
static int |
GE_SYM
|
static int |
GT_SYM
|
static int |
IF_SYM
|
static int |
LE_SYM
|
static int |
LEFT_PAREN_SYM
|
static int |
LT_SYM
|
static int |
MINUS_SYM
|
static int |
MULT_SYM
|
static int |
NAME_SYM
|
static int |
NEQ_SYM
|
static int |
NO_SYM
|
static int |
NUMBER_SYM
|
static int |
PLUS_SYM
|
static int |
RIGHT_PAREN_SYM
|
private Scanner |
scanner
|
static int |
SEMICOLON_SYM
|
static int |
THEN_SYM
|
static int |
WHERE_SYM
|
Constructor Summary | |
Parser(java.io.BufferedReader br)
Constructs a Parser. |
Method Summary | |
private boolean |
getNextSym()
|
private Expression |
parseArithExpression()
Parses an ArithExpression |
private Declaration |
parseDeclaration()
Parses a Declaration |
private DeclarationList |
parseDeclarationList()
Parses a DeclarationList |
private Expression |
parseExpression()
Parses an Expression |
private ExpressionList |
parseExpressionList()
Parses an ExpressionList |
private Expression |
parseFactor()
Parses a Factor |
private NameList |
parsenameList()
Parses a nameList |
Program |
parseProgram()
Parses the input and returns Program object corresponding to the input parsed. |
private Expression |
parseTerm()
Parses a Term |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final int NO_SYM
public static final int LEFT_PAREN_SYM
public static final int RIGHT_PAREN_SYM
public static final int NUMBER_SYM
public static final int NAME_SYM
public static final int EQUAL_SYM
public static final int SEMICOLON_SYM
public static final int IF_SYM
public static final int THEN_SYM
public static final int ELSE_SYM
public static final int WHERE_SYM
public static final int PLUS_SYM
public static final int MINUS_SYM
public static final int MULT_SYM
public static final int DIV_SYM
public static final int LT_SYM
public static final int GT_SYM
public static final int EQEQ_SYM
public static final int NEQ_SYM
public static final int LE_SYM
public static final int GE_SYM
public static final int COMMA_SYM
private int currentSym
private int currentNumber
private java.lang.String currentName
private Scanner scanner
Constructor Detail |
public Parser(java.io.BufferedReader br)
br
- BufferedReader to use as input streamMethod Detail |
private boolean getNextSym()
public Program parseProgram()
private Expression parseExpression()
private Expression parseArithExpression()
private Expression parseTerm()
private Expression parseFactor()
private ExpressionList parseExpressionList()
private DeclarationList parseDeclarationList()
private Declaration parseDeclaration()
private NameList parsenameList()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |