BNFC / bnfc

BNF Converter
http://bnfc.digitalgrammars.com/
587 stars 165 forks source link

Bug in the layout mechanism #77

Closed gdetrez closed 9 years ago

gdetrez commented 10 years ago

In the generated layout processor, the cases for encountering a new line and a layout starting keyword are mutually exclusive.

I.E, given the following grammar:

layout "mutual" ;
Def.       Def ::= Ident ;
DefMutual. Def ::= "mutual" "{" [Def] "}" ;
separator Def ";" ;

the following is not accepted although it should be:

mutual
  foo
  mutual

Note that the following 2 examples are correctly accepted:

mutual
  foo
  bar

&

mutual
  foo ;
  mutual

(reported by Anders, Simon, Cyril on the bnfc mailing list)

gdetrez commented 9 years ago

Closed by PR #80