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

Generation of stackless LR(1) parser #2

Open
objmagic opened this issue Dec 25, 2015 · 2 comments
Open

Generation of stackless LR(1) parser #2

objmagic opened this issue Dec 25, 2015 · 2 comments

Comments

@objmagic
Copy link
Owner

Good news:
I finally decide to spend some time and dive into LR parsing again. The result is we have a stackless LR(1) parser for grammar 4.55 in ASU86. The idea of course comes from Ralf Hinze's paper. This is particular cool because no explicit stack data structure is present now. The procedure of how to write such stackless parser is also clear to me.

Bad news:

  1. MetaOCaml still cannot generate pattern matching.
  2. Even if 1 is resolved, the program to generate such parser could be horribly complex. I expect there will tons of GADT, memorization tricks, code generation hacks, etc... Anyway, it will definitely be a triumph if I can finish it
  3. Consider 2 is done. Menhir, as a very mature and advanced parser generator, has many advantages over our technique. Although the aim of this project is different, I still expect our parser can be usable in real world, which means extra tons of effort to bring it to usable condition. I still remember to original goal of this project, which is to design a more PEG-like parser generator.

any opinion? @yallop

@Storyyeller
Copy link

Hi, I just came across this project and noticed that the readme says that it is an "improvement" to Derivation of a Typed Functional LR Parser. In what ways do you improve on the algorithm described in the paper?

I've been studying stackless LR parsing recently as well, so I'm curious what you found.

@objmagic
Copy link
Owner Author

@Storyyeller sorry, this project started two years ago and was kind of abandoned. I couldn't give you a good answer now...

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

No branches or pull requests

2 participants