On Feb 8, 2007, at 11:53 PM, Derek Peschel wrote:
On Tue, Feb 06, 2007 at 10:12:59AM -0800, Terence Parr wrote:
input" per Robert's response. I think you mean being able to reparse
only those pieces of the input that have changed while editing. For
this, you need to save the state as you say later, which is difficult
for recursive descent parsers. Well, at least in a language like
Java without continuations. Fortunately, you can fake this easily
Yes, you've described one thing I'm looking for. I noticed the term
"incremental" a while ago and started using it, but didn't look up the
exact definition. Either I'm abusing it or various people use it
differently.
I suppose PEGs traditionally can't make decisions worst case until
end of input, but parsing generally proceeds left to right committing
to decisions so I'd say let's leave "incremental" to mean "only
reparsing what changes". I've never seen it any other way actually.
with recursive descent parsers. The idea was designed/prototyped by
I'm confused... you said saving state was difficult for recursive
descent
parsers and then you said "this" (continuations? saving state?)
could be
faked easily. How can both be true?
Sorry. What I meant was: it is hard to save state, so don't ;) You
need to find a way to get the CPU and stack back to a position, but
you can't do a longjmp. There's a trick to avoiding having to save
state and longjmp. ;)
Prashant Deva, author of ANTLRStudio, and he and I will formalize,
generalize, and integrate with ANTLR v3 after I get the first release
out. Then, will write up and push out even if just to SIGPLAN
notices.
I'm looking forward to that. I'm impressed at the knowledge of the
people on the list. I find a current project on the Web and then I
sometimes discover it's represented on the list.
Have you seen SATC? (a download that extends ANTLR) It vaguely
resembles
your work, though I haven't gotten it to do anything useful so I
don't know
how sophisticated it is. Based on my brief experience getting it
working
and the number of errors the Java runtime spits out, I'd guess it's
not very
well-tested yet.
Last ref I see is from Bogdan in 2002. Not sure what's he's doing
nowadays.
Ter
_______________________________________________
PEG mailing list
PEG@lists.csail.mit.edu
https://lists.csail.mit.edu/mailman/listinfo/peg