public class Parser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Expression[] |
emptyArgs |
static Expression |
eofExpr |
int |
errors |
Constructor and Description |
---|
Parser(gnu.kawa.io.InPort port) |
public static Expression eofExpr
public static final Expression[] emptyArgs
public int errors
public Expression parseConditionalExpression() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression parseAssignmentExpression() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression parseExpression() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public java.lang.Object peekTokenOrLine() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public java.lang.Object peekToken() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public java.lang.Object getToken() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public final void skipToken()
public void getSemicolon() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression parsePrimaryExpression() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression makePropertyAccessor(Expression exp, Expression prop)
public Expression[] parseArguments() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression makeNewExpression(Expression exp, Expression[] args)
public Expression makeCallExpression(Expression exp, Expression[] args)
public java.lang.String getIdentifier() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression parseLeftHandSideExpression() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression parsePostfixExpression() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression parseUnaryExpression() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression syntaxError(java.lang.String message)
public Expression parseBinaryExpression(int prio) throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression parseIfStatement() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression buildLoop(Expression init, Expression test, Expression incr, Expression body)
public Expression parseWhileStatement() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression parseFunctionDefinition() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression parseBlock() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public Expression parseStatement() throws java.io.IOException, SyntaxException
java.io.IOException
SyntaxException
public static void main(java.lang.String[] args)