[antlr-interest] Whitespace question

Reid Rivenburgh reid at lanl.gov
Fri Oct 9 11:35:47 PDT 2009


Indhu Bharathi wrote:
> Try something like
> 
> 
> r     :     lbl=searchTerm ({spaceFollows($lbl.stop)}?=> lbl=searchTerm)*
>       ;
> 
> @members {
>       public boolean spaceFollows(Token tkn) {
>             return input.get(tkn.getTokenIndex()+1).getType()==WS;
>       }
> }

Interesting, thanks for the tip.  Since you offered a fix, then, I 
assume this isn't a situation that indicates a fundamental design flaw? 
    That's good news, at least!

Thanks,
Reid


More information about the antlr-interest mailing list