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 Context-Sensitive Features & Implement Guided Python Generation #592

Open
lapp0 opened this issue Jan 26, 2024 · 0 comments
Open

Add Context-Sensitive Features & Implement Guided Python Generation #592

lapp0 opened this issue Jan 26, 2024 · 0 comments

Comments

@lapp0
Copy link
Contributor

lapp0 commented Jan 26, 2024

What behavior of the library made you think about the improvement?

Python's syntax isn't context-free due to indentation handling, it is context-sensitive.

It is impossible to create a CFGFSM with Python's production rules.

How would you like it to behave?

Lark provides functionality to extend beyond context-free grammars and can handle a subset of context-sensitive languages, including Python, thanks to lark.PostLex.

Example: https://github.com/lark-parser/lark/blob/master/examples/indented_tree.py#L30

Completion criteria

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