great, that's working :-D
I tried something like
IMPL : '{' (COMMENT|IMPL|~'}')* '}' ;
before, but without the predicates it was not working either.
Thanks a lot!
On Wed, 03 Sep 2008 09:46:09 -0700, Jim Idle <[EMAIL PROTECTED]>
wrote:
> On Wed, 2008-09-03 at 18:34 +0200, Jenny Balfer wrote:
>
>> No, it is too long. But I reproduced the error in a short one.
>> An example for the occuring error would be the following string:
>
>
> OK - well it would be searching for the } because you didn't tell the
> IMPL about comments :-). You need this (as well as the other stuff being
> fragments):
>
> IMPL
> : '{' (
>
> (SLCOM|MLCOM)=> COMMENT
> | ('{')=> IMPL
> | ~'}'
> )*
> '}' {skip();}
> ;
>
> Also, in your grammar the paramLists in implementation need to be
> optional.
>
> Jim
>
>>
>> isWorking = function(param1,param2) {
>> some implementation;
>> some expressions;
>> }
>>
>> function throwsError(param1, param2) {
>> // this is a nasty comment {
>> something else
>> }
>>
>> function isIgnored() {
>> // lexer is still searching for a closing brace
>> }
List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org:8080/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
-~----------~----~----~----~------~----~------~--~---