Closed andreasabel closed 4 years ago
Still do not fully understand this, but the profiles feature allows two identifiers to be given as rule name, and then the second one is taken. I don't know why x
is turned into name variable x_
, though.
I don't know why x is turned into name variable x_, though.
This comes from the syntactic sugar feature. BNFC should check for the presence of the definition, like
define x = ...
instead of silently assuming there is a definition.
Currently, definitions are unusable since there is an errorneous qualification Min.Abs.x_
instead of x_
.
The situation is much better already:
$ bnfc --check test.cf
Lower case rule labels need a definition.
ERROR: undefined rule label(s): x
Aborting. (Use option --force to continue despite errors.)
We would wish for an error location.
BNFC swallows this, but then the generated parser does not compile. In the
.y
file, this grammar turns into: