[antlr-interest] (no subject)

Terence Parr parrt at cs.usfca.edu
Fri Apr 20 10:54:50 PDT 2007


On Apr 20, 2007, at 7:49 AM, Wincent Colaiuta wrote:

> El 20/4/2007, a las 16:06, craig at palantir.co.za escribió:
>
>> When I run with
>> test, testing, testagain
>>
>> It is not ignoring the whitespace? Should $channel=HIDDEN not do  
>> the trick here?
>
> Are you running under the ANTLRWorks interpreter by any chance?
>
> I am very new to ANTLR myself, but one thing I've discovered is  
> that running things under the ANTLRWorks "Interpreter" tab is not  
> the same as running them under the debugger or from a compiled tool.
>
> Things like setting the channel don't work in the interpreter,  
> presumably because nothing is actually compiled before the  
> interpreter starts; as such any actions you define that set  
> channels or do anything else will have no effect. This is why your  
> rules fail to work when you have whitespace in your input.

Ah. you have to tell AW which rules of the whitespace or tell it to  
guess which ones.
Ter



More information about the antlr-interest mailing list