[antlr-interest] Multiple Lines with Implicit Endings in ANTLR

consiliens at gmail.com consiliens at gmail.com
Tue Feb 23 17:24:38 PST 2010


On 10-02-23 05:31 PM, Ron Burk wrote:
> Grammars are great for handling complex syntax. But when
> the definition of a token varies all over the place and there
> isn't much surrounding structure, the benefit of a parser
> generator fades, IMHO.
>
> Not sure precisely what your grammar is, but I studied the JBehave
> EBNF, and that's not something I would have ever thought to
> use a parser generator on. Something that simple and relatively
> unstructured, I would just handcode, personally.
>
> Which completely fails to answer your question, I know...
>

I currently have it hand coded in Ruby, however I'd really like to move 
to an ANTLR grammar.  I just need a way to tell ANTLR to capture all the 
text until the next keyword is found.  With an explicit end keyword the 
solution is obvious, without one I'm not sure what the proper ANTLR 
syntax is.  If Ragel can handle such a grammar, I don't see why ANTLR can't?


More information about the antlr-interest mailing list