|Interactive Parsing email@example.com (Marielle Fois) (2000-07-27)|
|Interactive Parsing firstname.lastname@example.org (Yves Dufournaud) (1995-08-01)|
|Re: Interactive Parsing johnm@soda.CSUA.Berkeley.EDU (1995-08-08)|
|From:||johnm@soda.CSUA.Berkeley.EDU (John D. Mitchell)|
|Keywords:||parse, syntax, PCCTS|
|Organization:||Computer Science Undergrad Assoc., Univ. of Calif. Berkeley|
|Date:||Tue, 8 Aug 1995 07:26:58 GMT|
Yves Dufournaud <email@example.com> wrote:
>I'd like to do interactive parsing, ie you parse once, the user modify
>slightly the input, the goal is to reparse as few as possible the input
>text before rebuilding the abstract tree ( speed is important). I assume I
>know where the text was changed.
The parsers generated using the PCCTS parser generator, ANTLR, have a
function for each rule in the grammar. [ANTLR generates predicated-LL(k)
parsers.] So you can invoke any ol' rule you like at any time (any side
effect dependencies that are in you're grammar actions is your own problem
:-) by calling the appropriate function (there's no particular 'start' rule
NeXT used this to great advantage in an editor which did some sort of
incremental compilation based on what you had changed. They gave a
demonstration of this at last year's PCCTS Workshop and it was very fast.
Also, note that ANTLR has a very helpful facility for building ASTs
automatically and/or manually.
Hope this helps,
Return to the
Search the comp.compilers archives again.