On Jul 3, 2010, at 2:58 PM, Matt Palmer wrote:

> Well, this gets wierder, and to my mind seems to point to a bug in
> Antlrworks itself.
> 
> I verified that I could consistently run the debugger using one simple
> grammar, but not another.  On the non-working grammar, I commented out rules
> and tokens (starting from the most complex), until, lo-and-behold, after one
> rule went the debugger started working.  I then re-enabled all the other
> rules one by one, and the grammar kept working.  The lexer rule that wasn't
> working was  a literal followed by a fragment, looking like this:
> 
> BITMASK :   '&' HEX_BYTE ;
> 
> I then re-enabled this rule... and the debugger kept working.  The only
> difference at this point between where I started with a non-working debugger
> and where I finished with a working debugger is I moved a couple of rules to
> the end (comments and whitespace both going to hidden channels) to simplify
> commenting them out.
> 
> I've faced this problem before, I still have no idea what causes it and how
> to fix it.  Maybe this will make sense to someone.
> 
> Matt.
<snip>

Normally I would expect bitmask to be a syntactic element not a lexical 
element. If so then change all occurrences of BITMASK to bitmask. Otherwise 
have youm marked HEX_BYTE as a fragment?

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to