-
Notifications
You must be signed in to change notification settings - Fork 32
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
Trying to validate grammar #30
Comments
Is the grammar in working order? Do you typically use some other than linux to run check_parser.sh? I noticed a different version of the grammar at the web page |
Did not intend to close. |
Here is a naive conversion (basically replace
|
Effectively the grammar on ziglang.org documentation do not match the one here, here is the EBNF for the Zig-0.7.1.ebnf:
Zig-dev.ebnf:
|
Looking through the code in
|
@mingodad you'd be better off looking at the self hosted parser in |
Thanks for pointing out ! |
No, on looking at it myself the stage1 parser adhears to the grammar in this case: |
Thank you for pointing out ! |
No problem, as usual the self hosted parser is much more readable :) |
I'm trying to write a zig parser using CocoR https://ssw.jku.at/Research/Projects/Coco/ and in doing so I'm getting lots of warnings/errors due to grammar ambiguity and recursion, for example
|
Parsing Expression Grammars such as the grammar in this repo are by definition unambiguous. I don't see recursion as an issue in general either, although that specific case of repeated |
One recursion/duplicate/ambiguity for
|
It also happen with
Output:
|
After talking with my pillow I'm convinced that one good way to make this grammar less trick/ambiguous/recursive would be to create a subgroup of
Also remove all recursive elements from |
I cannot get validation on a 20.04 cloud host, a gitpod cloud host nor in gh actions. All of the tests have 127 vs 0
The text was updated successfully, but these errors were encountered: