Contents
Interface Parser.ParsedTokenConsumer
- All Known Implementing Classes:
CompileContext
- Enclosing class:
Parser
public static interface Parser.ParsedTokenConsumer
Interface parser uses to emit operands and operators in RPN order.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddone()Called when expression parsed completely.voidprocessFunction(int argumentCount) Process a function call.voidprocessOperator(Parser.ParsedToken operator) Process a single operator.voidprocessTuple(Parser.ParsedToken openingToken, int argumentCount) Process a tuple.voidpushOperand(Parser.ParsedToken operand) Process a single operand (identifier, number or string)
-
Method Details
-
pushOperand
Process a single operand (identifier, number or string)- Parameters:
operand- ParsedToken with operand
-
processOperator
Process a single operator.- Parameters:
operator- ParsedToken with operator- Throws:
ParseException- In case of parser or lexer error
-
processFunction
Process a function call.The function name precedes the arguments on operand stack.
- Parameters:
argumentCount- number of arguments passed to function- Throws:
ParseException
-
processTuple
Process a tuple.- Parameters:
argumentCount- number of arguments passed to function
-
done
void done()Called when expression parsed completely.
-