-
Notifications
You must be signed in to change notification settings - Fork 52
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
Bnf file #1
Comments
Hey man, don't know if it helps, but I think this file can supply the info you need: |
@florianpirchner Unfortunately, this does not exist yet. |
If i summarize:
Right? |
Wow, a lot of work. |
btw, here you can see the grammar documentation of d-lang. https://dlang.org/spec/grammar.html In my opinion it is neccessary to have a grammar file for every language. Otherwise people have a hard month to get into the syntax and semantics. |
For the lexer part we can probably pick some things from the D grammar, as the starting point for the lexer was a lexer for D. The Silq syntax is not particularly large. I am not sure why semantic would be relevant. I would rather go over the files that define the AST (expression.d, type.d, declaration.d), and make the grammar based on their toString functions, getting some more details by searching for the names of the respective classes in parser.d. If no one else picks it up, I will do it at some point. |
Figure 12 of another of our PLDI papers has a (simplified) grammar for a language that is based on the same parser code base: https://files.sri.inf.ethz.ch/website/papers/pldi20-lpsi.pdf |
Thx, i will take a look. I am not sure why semantic would be relevant You could say a semantic model is the AST with the capability of crossreferences. |
Did you evaluate this project. It is written in dlang and provides a parser builder/generator. Using grammar files ensures, that the language is normalized. Out there are several programming languages, that are not. Some years ago i talked to a senior (Phd) working at SAP. And he told me, that abap ist not normalized and there is no way right now, to create a proper grammar model-file. Means, that in the language there are several exceptions made with the language, which inhibit to normalize it. So it is a good idea, to ensure normalization at the beginning... |
Dear Team,
is there a bnf-file (grammar file) for this language?
Would appreciate to get one. Then I can start to write full Semantic IDE support.
Even for 3rd party products like Sublime text. Based on language server.
Best Flo
The text was updated successfully, but these errors were encountered: