-
Notifications
You must be signed in to change notification settings - Fork 60
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
Implement indentation-sensitive grammar #37
Comments
I'm definitely conceptually interested in this (I too, like indentation based grammars, and hate the hack in between my lexer and parser). Are you interested in working on implementing this? |
I would if I had much of a clue what I was doing. :) I only have a rough grasp of parsers (still in the "fake it" stage) and the specifically mathematical bits tend to leave me behind - I was webcrawling to see if anyone had any more elegant solutions to the problem when I found the paper. |
I'm also not really good with the academic papers, most of the code here is On Wed Nov 12 2014 at 7:13:46 PM Thomas Winwood notifications@github.com
|
I, too, am resorting to some ugly hacking of tokens in order to get my rply-based grammars to recognize indentation as scope changes. More complete support for indentation-sensitive grammar would be an incredibly nice feature to include. (My esolang, unlike Python, doesn't use colons to indicate a scope increase… nor braces. Only tab-based indentation.) |
This would be a nicde addition to rply |
This paper presents a formalism for expressing indentation-sensitive grammars in GLR and LR(k) parsers which they claim easily generalises to various other parsers including LALR.
Would it be possible to extend the production syntax accepted by ParserGenerator to accept this and DTRT? I'd prefer not to insert a hack between the lexing and parsing stages of my compiler to convert whitespace into INDENT/DEDENT tokens.
The text was updated successfully, but these errors were encountered: