[antlr-interest] Context Sensitive Keyword Support?

Michael Bedward michael.bedward at gmail.com
Thu Feb 17 16:50:14 PST 2011


On 18 February 2011 09:52, chris king <kingces95 at gmail.com> wrote:
> For my 2c I like Scott's proposal. Build a lexer that generates tokens given
> (1) a lexical grammar and (2) the set of possible tokens the parser could
> consume.

It's horses for courses I guess, with either approach seeming easier
or more intuitive given the particulars of the task (and the person
writing the code).

For my projects and style of thinking, Jim's proposal is very
appealing. The lexer just delivers what's on offer and the parser's
role is to use or reject that input.  To me this seems conceptually
simpler than the parser saying what it would like next and the lexer
working out whether it can deliver it.  I like simple things :)

Michael


More information about the antlr-interest mailing list