Modifier and Type | Field and Description |
---|---|
private Parser.Operator |
currentOperator
The operator we have just scanned, in the same way that
Parser.c is the character we have
just read. |
Constructor and Description |
---|
OperatorParser() |
Modifier and Type | Method and Description |
---|---|
private void |
nextOperator()
Updates
currentOperator to be an operator read from the input,
or Parser.Operator.STOP if there is none. |
(package private) ExpressionNode |
parse(ExpressionNode lhs,
int minPrecedence)
Parse a subexpression whose left-hand side is
lhs and where we only consider
operators with precedence at least minPrecedence . |
private Parser.Operator currentOperator
Parser.c
is the character we have
just read. If we were not able to scan an operator, this will be Parser.Operator.STOP
.OperatorParser() throws java.io.IOException
java.io.IOException
ExpressionNode parse(ExpressionNode lhs, int minPrecedence) throws java.io.IOException
lhs
and where we only consider
operators with precedence at least minPrecedence
.java.io.IOException
private void nextOperator() throws java.io.IOException
currentOperator
to be an operator read from the input,
or Parser.Operator.STOP
if there is none.java.io.IOException