[antlr-interest] ANTLRWorks Interpreter and Debugger diagrams.
G. Richard Bellamy
rbellamy at pteradigm.com
Thu Jul 28 09:08:18 PDT 2011
I should have called out the fact that I'm a novice ANTLR user (if it
wasn't already obvious).
Given the high level of attention and consideration I received
yesterday, I'm going to go ahead and jump back in. :)
I decided it would be best if I became more familiar with the toolset.
Thus I put together the most basic arrangement I could think of to test
the rule I'm trying to understand, and that was to:
1. Create a Combined.g grammar file with a single lexer rule and a
single parser rule.
2. Target Java so I can easily Interpret and Debug input with ANTLRWorks.
Attached are the results of that attempt. One of my points of confusion
is the difference in the Interpreter and the Debugger Parser Tree/AST
diagrams. Could someone help me understand what I'm seeing here? Does
the Interpreter behave much differently than the Debugger when dealing
with MismatchedTokenExceptions?
TIA,
-rb
On 7/27/2011 1:19 PM, Bart Kiers wrote:
> But as Jim mentioned, this is not the issue here. The rule:
>
> STRING : '"' ('""' | ~'"')* '"';
>
>
> matches input like:
>
> "a b "" c"
>
>
> just fine (as a single STRING).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ANTLRWorks 1.4.2_2011-07-28_08-54-43.png
Type: image/png
Size: 38349 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20110728/5dcfab4c/attachment-0002.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ANTLRWorks 1.4.2_2011-07-28_08-51-58.png
Type: image/png
Size: 35512 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20110728/5dcfab4c/attachment-0003.png
More information about the antlr-interest
mailing list