-
Notifications
You must be signed in to change notification settings - Fork 81
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
4.1.14 Full grammar is not accurate #861
Comments
I've used Bison 3.8.1 in the following script to extract a MiniZinc grammar:
The resulting report file: |
The grammar in the handbook is hand-written in a simplified format, in order to have a cleaner document that's easier to read for humans. The bison I have fixed the |
The declaration of
|
Ah, you're right. And now I also remember why the full grammar is so complicated. We have to distinguish, syntactically, between expressions in types and all other kinds of expressions, and I think the only way is to duplicate the entire expression part of the grammar. |
Section 4.1.14 of the Handbook, Full grammar, is not accurate. It may have been in sync with the actual grammar once, but certainly is not any more. Nonterminals, e.g.,
annotation-item
,base-ti-expr-tail
, are not accurate. That causes problems if you for some reason need to write your own parser.I found a source file
parser.yxx
that appears to define the grammar that the toolchain actually uses. It would be great if the Handbook could be brought in sync with that, ideally automatically.The text was updated successfully, but these errors were encountered: