Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add incremental reparse to avoid reparsing the entire doc #9

Open
patrickhuber opened this issue Apr 30, 2015 · 5 comments
Open

add incremental reparse to avoid reparsing the entire doc #9

patrickhuber opened this issue Apr 30, 2015 · 5 comments

Comments

@patrickhuber
Copy link
Owner

patrickhuber commented Apr 30, 2015

Incremental reparsing reduces the time to compile changes into a document.

more information here (dead link)
more information here
also: here

@ArsenShnurkov
Copy link
Contributor

ArsenShnurkov commented Jul 10, 2017

the link is no longer valid

An error occurred while processing your request.
Reference #50.9584dd58.1499694555.1cf3c26f

or

Access Denied
You don't have permission to access "http://delivery.acm.org/10.1145/1700000/1697247/p61-kallmeyer.pdf" on this server.
Reference #18.9584dd58.1499703476.1d2db9d8 

full list of publications:
https://user.phil.hhu.de/~kallmeyer/publications.html

probably it was
Laura Kallmeyer and Wolfgang Maier (2009): An Incremental Earley Parser for Simple Range Concatenation Grammar. In Proceedings of IWPT 2009, Paris, 61-64.

@patrickhuber
Copy link
Owner Author

Thanks, I added an additional link and updated the link to the one you supplied.

@ArsenShnurkov
Copy link
Contributor

Please also consider bidirectional parsing (from end to start) in addition to incremental parsing. Syntax tree doesn't have direction. So it is possible to perform scanning from the end of document (and from the start of document at the same time). This will simplify syntax highlighting implementation for the use case of small changes in text editor.

@patrickhuber
Copy link
Owner Author

Reading from the stream backwards should be a trivial implementation, but does something special need to be done to the grammar for this to work with the earley algorithm?

@ArsenShnurkov
Copy link
Contributor

ArsenShnurkov commented Aug 26, 2017

reading backwards alone is not enough. Image source text like "#include int main() { return 0;}". When you read it backwards it starts from } and not from #. So definitely the grammar should be processed differently. And it's the algorithm what should be created, not grammar (the same grammar will be used for both the forward and the backward parsings).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants