On Jan 18, 2010, at 12:56 PM, Stanislas Rusinsky wrote: > Hi Terence, hi List, > > 1) since you opened the door I would happily push once more the incremental > lexer and parser with hooks/callbacks/listener/whatever :).
added to list. incr parsing is easy. incr lexing is hard. :( > It is not a simple piece, but would be so much appreciated for IDE > integrations, the example that comes to my mind is Xtext: what a joy it would > be to be able to plug any antlr grammar as the base defintion for grammar > highlighting, autocompletion, etc. Could be useful for command line > autocompletion too! I'm just dreaming of a one grammar-does-it-all so there > is no more rewrite and duplication of purpose. I remember you once talked > about adding a pointer to the current position in the DFA with a state > attached in v3. > > It would also require some work with the grammar actions, actions that would > they have their "reverse" counterpart, that could be undone if they maintain > a symbol table for example. The same for Init and after blocks. Probably we'd limit it to building syntax trees. > Incremental lexer/parser is also very good publicity, it is very much visible > to the "outside" world, Xtext gains a lot of traction thanks to that single > feature, it helps adoption. Does it use the berkeley paper's algorithm for lexing? > Here is a nice paper I found googling (in the even absolutely remote > possibility it might be of interest): > http://www.google.be/search?q=General+Incremental+Lexical+Analysis+TIM+A.+WAGNER+and+SUSAN+L.+GRAHAM+University+of+California%2C+Berkeley&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a > ( http://harmonia.cs.berkeley.edu/papers/twagner-lexing.ps.gz ) i find it extremely complicated. > 2) For what concerns the rewrite, I'm in favor of it, if you have the luxury > to do it the proper way, hell yeah! :) > Wish you fun in the process and thank you for lending an ear to external > inputs, my pleasure. it's going to be a really big undertaking. Ter _______________________________________________ antlr-dev mailing list [email protected] http://www.antlr.org/mailman/listinfo/antlr-dev
