Hi Franck,

On Fri, Nov 25, 2011 at 9:47 PM, franck102 <franck...@yahoo.com> wrote:

> ...

containOperator : CONTAINS_TEXT | CONTAINS_MATCH
>
> CONTAINS_TEXT
>        :       'contains' WS+ ( 'match' { $type=CONTAINS_MATCH }
>        |                              'text' )
>        ;
>
> // CONTAINS_MATCH:;  // causes "token definitions can never be matched"
> error
>
>
Add CONTAINS_MATCH to your @tokens{...} and create an empty fragment rule
called CONTAINS_MATCH to silence the warning:

-----------------------------

tokens {
  CONTAINS_MATCH;
}

...

CONTAINS_TEXT
  :  'contains' WS+ ( 'match' CONTAINS_MATCH
                    | 'text' )
  ;

...

fragment CONTAINS_MATCH : ;

-----------------------------

Regards,

Bart.

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 il-antlr-inter...@googlegroups.com.
To unsubscribe from this group, send email to 
il-antlr-interest+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to