On 6/2/10 5:38 PM, "John B. Brodie" <[email protected]> wrote:

> On Wed, 2010-06-02 at 17:03 -0500, Ken Williams wrote:
>> Yeah, probably I should be using parser rules.  I was trying to keep things
>> "simple" by making everything a linear stream of tokens from the point of
>> view of the Java caller, while still having high-level constructs like DATE.
> 
> just be aware that when you make date a parser rule WS will be silently
> accepted between the DIGITS and SLASHes comprising the date
> non-terminal. 

Yeah, good point.  In this case that's fine.  It would be nice, though, if
there were a per-rule parser directive to control which channel(s) to pay
attention to, something like this:

date    
options {channel=ALL;}
:    DIGITS SLASH DIGITS SLASH DIGITS ;


Not sure whether that's feasible or not though.

-- 
Ken Williams
Sr. Research Scientist
Thomson Reuters
Phone: 651-848-7712
[email protected]



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