On May 2, 2008, at 3:32 PM, Johannes Luber wrote:

> Terence Parr schrieb:
>>> What do you need fragment rules then for? Otherwise, I'd accept  
>>> this  proposal.
>> to break up big rules and to reuse chunks...might need Digit and   
>> Letter etc... don't want type set.  I guess that is most common case.
>
> But why should one make a lexer rule fragment if you can use the  
> same rule without it?

some are helper rules that must not be considered tokens returned to  
parser.  It causes conflicts:

INT : Digit+ ;

Digit : '0'..'9'+ ;

is a problem.  9 matches both rules.

Ter
> What are the behaviour differences beyound not emitting a token? And  
> not emitting a token and subsuming an emitted token look to me as  
> identical in the result.
>
> Johannes

_______________________________________________
antlr-dev mailing list
[email protected]
http://www.antlr.org:8080/mailman/listinfo/antlr-dev

Reply via email to