Method Parser.LR.Parser()->parse()
- Method parse
mixed parse(object|function(void:string|array(string|mixed)) scanner, void|object action_object)
- Description
Parse the input according to the compiled grammar. The last value reduced is returned.
- Note
The parser must have been compiled (with compile()) prior to calling this function.
- Bugs
Errors should be throw()n.
- Parameter scanner
The scanner function. It returns the next symbol from the input. It should either return a string (terminal) or an array with a string (terminal) and a mixed (value). EOF is indicated with the empty string.
- Parameter action_object
Object used to resolve those actions that have been specified as strings.