[antlr-interest] Island grammar for reading shell commands

Joachim Schrod jschrod at acm.org
Wed Dec 1 05:20:25 PST 2010


Bill Lear wrote:
> On Tuesday, November 30, 2010 at 15:49:39 (-0800) Jim Idle writes:
>>REST_OF_LINE allows an empty token which will immediately match nothing and
>>continue to do so forever. You want +  not *. I think you might be doing
>>this wrong to be honest. I would probably not use ANTLR for this.
> 
> So, there is really no viable way to have Antlr read the rest of the
> line of input?

Use a different lexer that can utilize full regexps and has states.

As Jim wrote, you need to decide if the parser part is important
enough to use ANTLR. If that's the case, a different lexer will
probably help.

	Joachim

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Joachim Schrod				Email: jschrod at acm.org
Roedermark, Germany



More information about the antlr-interest mailing list