http://linuxgazette.net/106/chirico.html In example 1 , The result is printed in example1.y but I want to handle that result in main.c . How can I do that?
Lemon parser - how to handle result from lemon parser
194 views Asked by Toan Nguyen At
1
The result is printed because the input said
program ::= ... { std::cout << ... }
. I.e. the result of parsing is processed by the top-level rule.You might want to use
%extra_argument { MyClass *pThis }
. Lemon will then add a 4th parameter toParse
which is available in action rules aspThis
.