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

Formal grammar #497

Open
binarycow opened this issue Apr 3, 2023 · 2 comments
Open

Formal grammar #497

binarycow opened this issue Apr 3, 2023 · 2 comments

Comments

@binarycow
Copy link
Contributor

I think it would be useful to have a formal grammar for Scriban.

It may also be useful to tie in this work with updating the parser and lexer to ensure that we have agreement between documentation, grammar, and code.

Then, all future updates to any of the three, would necessitate updating all three.

@ranger-turtle
Copy link
Contributor

Yeah! Understanding, how lexer works in details, I would add string interpolation (#476) much easier!

@xoofx
Copy link
Member

xoofx commented May 1, 2023

It is likely that Scriban has a few cases in its grammar that can lead to incorrect parsing, so that would be nice to have a formal grammar, but I will personally never have time/incentive to work on this.

Yeah! Understanding, how lexer works in details, I would add string interpolation (#476) much easier!

Frankly, I doubt that would help. Adding string interpolation requires to modify both the lexer and parser, and this can be done relatively easily. These two buddies are well identified in the source code, they are - almost - very conventional lex & parser, so the bulk of the work should be mostly laborious, but nothing complicated.

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

3 participants