Package gnu.ecmascript
Class Parser
java.lang.Object
gnu.ecmascript.Parser
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildLoop
(Expression init, Expression test, Expression incr, Expression body) void
Skip an explicit or implicit semicolon.getToken()
static void
makeCallExpression
(Expression exp, Expression[] args) makeNewExpression
(Expression exp, Expression[] args) makePropertyAccessor
(Expression exp, Expression prop) parseBinaryExpression
(int prio) Return the next non-whitespace token from the lexer.Return the next token from the lexer.final void
syntaxError
(String message)
-
Field Details
-
eofExpr
-
emptyArgs
-
errors
public int errors
-
-
Constructor Details
-
Parser
public Parser(gnu.kawa.io.InPort port)
-
-
Method Details
-
parseConditionalExpression
- Throws:
IOException
SyntaxException
-
parseAssignmentExpression
- Throws:
IOException
SyntaxException
-
parseExpression
- Throws:
IOException
SyntaxException
-
peekTokenOrLine
Return the next token from the lexer. A LineTerminator is considered a token.- Throws:
IOException
SyntaxException
-
peekToken
Return the next non-whitespace token from the lexer. LineTerminators are skipped until a non-eolToken is found.- Throws:
IOException
SyntaxException
-
getToken
- Throws:
IOException
SyntaxException
-
skipToken
public final void skipToken() -
getSemicolon
Skip an explicit or implicit semicolon.- Throws:
IOException
SyntaxException
-
parsePrimaryExpression
- Throws:
IOException
SyntaxException
-
makePropertyAccessor
-
parseArguments
- Throws:
IOException
SyntaxException
-
makeNewExpression
-
makeCallExpression
-
getIdentifier
- Throws:
IOException
SyntaxException
-
parseLeftHandSideExpression
- Throws:
IOException
SyntaxException
-
parsePostfixExpression
- Throws:
IOException
SyntaxException
-
parseUnaryExpression
- Throws:
IOException
SyntaxException
-
syntaxError
-
parseBinaryExpression
- Throws:
IOException
SyntaxException
-
parseIfStatement
- Throws:
IOException
SyntaxException
-
buildLoop
-
parseWhileStatement
- Throws:
IOException
SyntaxException
-
parseFunctionDefinition
- Throws:
IOException
SyntaxException
-
parseBlock
- Throws:
IOException
SyntaxException
-
parseStatement
- Throws:
IOException
SyntaxException
-
main
-