[antlr-interest] Re : thoughts on ANTLR v4's use of interpreters

Terence Parr parrt at cs.usfca.edu
Wed Apr 20 13:23:33 PDT 2011


On Apr 20, 2011, at 12:43 PM, Stanislas Rusinsky wrote:

> This one made my day :)
> 
> How easy will it be to hook external code or reference a position in the 
> PDA/DFA/NFA to observe passage and generate intellisense like functionality? 

That's a good question. I think it will be easy. I will have a pointer to an augmented transition network and memory with functions to return the next set of tokens etc.  Or, you can simply walk the graph to figure out what you would like to do yourself :)

I have tested, just yesterday, and interpreted lexer and parser for simple HTML. works really well, including calling out to some actions :) I'm having some evil thoughts about parsing at the moment. more later when I have time to formalize and try things out.

All indications are that this approach will yield lots of interesting things. You can expect such a beast to be in v4.

Ter


More information about the antlr-interest mailing list