Open andreasabel opened 2 years ago
Given grammar:
Priv. Decl ::= "private" "{" [Decl] "}" ; separator Decl ";" ; layout "private" ;
The following is accepted but should not, without top-level layout:
private private
This is parsed as:
Priv [Priv []]
One could argue that this is a case of NondecreasingIndentation, but it is not in line with the following example:
NondecreasingIndentation
private private private
This gives, as naturally expected:
Priv [Priv [],Priv []]
Finally, this fails (as naturally expected):
private private private private
EDIT: Apparently, this is a feature, not a bug: https://github.com/BNFC/bnfc/blob/19151603ff5b0fd8fab3b1a6892321246362e76c/testing/regression-tests/194_layout/good05.in
Given grammar:
The following is accepted but should not, without top-level layout:
This is parsed as:
One could argue that this is a case of
NondecreasingIndentation
, but it is not in line with the following example:This gives, as naturally expected:
Finally, this fails (as naturally expected):
EDIT: Apparently, this is a feature, not a bug: https://github.com/BNFC/bnfc/blob/19151603ff5b0fd8fab3b1a6892321246362e76c/testing/regression-tests/194_layout/good05.in