Replies: 1 comment 1 reply
-
If you the Philosophy page of the docs, you can see that separation of grammar and code/semantics is an explicit goal of lark. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've implemented support for attributed grammars (synthesized and inherited attributes) in the lalr parser, and I'd like to know if there is some interest in making it into a PR.
Code is available at https://github.com/educhesne/lark/tree/attributed_lark
At the moment it is passing the existing tests, but no test or documentation specific to attributed grammars have been added yet; besides I reckon it would need some refacto.
To give some background, I wanted to develop a PoC of guided generation for typed languages with outlines (which relies on lark's lalr parser), and I added the attributed grammar support in order to deal with bound variables and type checking at parsing time.
More details on this PoC and the added features here: https://educhesne.github.io/guiding-typed-lang/intro.html
Could someone provide some feedback on the relevance of contributing it to lark please (and/or on its implementation if possible).
Beta Was this translation helpful? Give feedback.
All reactions