[antlr-interest] Beginner questions
Kay Röpke
kroepke at classdump.org
Tue Jan 8 08:57:41 PST 2008
Hi!
On Jan 7, 2008, at 5:25 PM, Damien wrote:
> 1) My grammar runs fine on the input "d+f(-2)" but the interpreter
> fails with "FailedPredicateException". Is "backtrack=true"
> impossible in interpreted mode?
Currently not, no. I don't remember the exact problems with it, but it
isn't implemented. You can use the debugger to attach to an external
driver class, though. That should work.
>
> 2) Using the debugger on the input "d+f(-2)", the part of the parse
> tree from atom > functionExpr > .. appears in double, the one on the
> left being green. I can't find what that means.
That's a skipped parse tree when backtracking, IIRC. The last one in
green is the one that matched.
>
> 3) I'm using java as the target language. I can't find how the
> access the parse tree, only the AST with the option output=AST.
See http://www.antlr.org/wiki/pages/viewpage.action?pageId=1760
cheers,
-k
--
Kay Röpke
http://classdump.org/
More information about the antlr-interest
mailing list