I'm having a problem using (reentrant) Flex + Lemon for parsing. I'm using a simple grammar and lexer here. When I run it, I'll put in a number followed by an EOF token (Ctrl-D). The printout will read:
89
found int of .
AST=0.
Where the first line is the number I put in. Theoretically, the AST value should be the sum of everything I put in.
EDIT: when I call Parse() manually it runs correctly.
Also, lemon appears to run the atom ::= INT
rule even when the token is 0 (the stop token). Why is this? I'm very confused about this behavior and I can't find any good documentation.