-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

just for the archives: This worked with small one small modification
regarding the EOF-Token:

TEXT:
  {lxstate == State.NORMAL && input.LA(1) != curspecial}?=>.
{
 while (input.LA(1) != curspecial && input.LA(1) != CharStream.EOF) {
  input.consume();
 }
}
;

Thanks again
Frederic




Am 20.08.2010 18:15, schrieb Jim Idle:
> You just need to not use ANY. Once the predicate matches, your rule is
> selected and it will do whatever you tell it. So, don't use ANY+ just put
> some code in to consume until you get to some point that you don't want to
> consume any more:
> 
> TEXT: { lxstate==State.NORMAL && input.LA(1)!=curspecial} ?=> .
> {
>   while (input.LA(1) != curspecial) { input.consume(); }
> }
> ;
> 
> It is often instructive to look at the generated code and steal from it to
> get where you need to.
> 
> Jim 
> 
>> -----Original Message-----
>> From: [email protected] [mailto:antlr-interest-
>> [email protected]] On Behalf Of Frederic Beister
>> Sent: Friday, August 20, 2010 12:34 AM
>> To: [email protected]
>> Subject: Re: [antlr-interest] Lexer Rule matching member variable (Java)
>>
>>
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
email-address

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


- -- 
PGP Fingerprint = 782C 2BE7 0972 D632 8BDF 4A23 3811 174A 1530 64ED
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxxJIIACgkQOBEXShUwZO10xQCfZtRkA0b9yyfQJze4IsogkdaK
5xMAnjnIEqtmMPhGsNRKUSvyXotxf0rz
=bq0d
-----END PGP SIGNATURE-----

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