[antlr-interest] issue with antlr requiring a whitespace at a specific place

Olivier Sallou olivier.sallou at irisa.fr
Wed Jun 8 04:04:54 PDT 2011


For the same, I have mismatched token. I simplified it to maximum (see
first line of attached screenshot)

However I see in my editor (antlrworks) in interpreter tab: "Ignore
rules: WHITESPACE".

I wonder why, I did not ask for such ignore, and I do not see how to
remove this.

Maybe this occurs in generated code too.

Olivier

Le 6/8/11 12:58 PM, Bart Kiers a écrit :
> Hi Olivier,
>
> I can't reproduce it. I tested with ANTLRWorks 1.4.2 as well.
> See the attached screenshot.
>
> Regards,
>
> Bart.
>
>
> On Wed, Jun 8, 2011 at 11:23 AM, Olivier Sallou <olivier.sallou at irisa.fr>wrote:
>
>> Hi,
>> I have an issue with antlrworks (1.4.2), where for a specific grammar,
>> it requires a whitespace.
>> I upgraded from antlrworks 1.1.7 where the same did not asked for the
>> whitespace.
>>
>> example:
>>        '?' string
>>        | '%' string ':' percentage=INT
>>        | ...
>>
>> string    : '"' LOWID '"';
>> LOWID    : ('a'..'z'|'\-')+;
>> INT :   ('0'..'9')+ ;
>>
>> If I call my example rules with:
>>  ?\"acgt\"
>> it works fine
>> but if I call
>>  %\"acgt\":30
>>
>> If fails.
>>
>> At least if I add a whitespace between % and \"acgt\", it works:
>>  % \"acgt\":30
>>
>> I really can't understand why a whitespace is required here, and only
>> here....
>>
>> Thanks for your help
>>
>> Olivier
>>
>>
>> --
>> gpg key id: 4096R/326D8438  (pgp.mit.edu)
>> Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438
>>
>>
>>
>> List: http://www.antlr.org/mailman/listinfo/antlr-interest
>> Unsubscribe:
>> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>>

-- 
gpg key id: 4096R/326D8438  (pgp.mit.edu)
Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen shot 2011-06-08 at 1.03.33 PM.png
Type: image/png
Size: 107520 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20110608/d4a58023/attachment.png 


More information about the antlr-interest mailing list