Skip to content

Ocaml: generated printer has syntax error #330

@andreasabel

Description

@andreasabel

Bug can be triggered e.g. with BNFC's own grammar.

$ runbnfc.sh ocaml BNFC.cf
...
writing new file ocaml/PrintBNFC.ml
...
ocamlc  -o TestBNFC BNFC_Util.ml AbsBNFC.ml SkelBNFC.ml ShowBNFC.ml PrintBNFC.ml ParBNFC.mli ParBNFC.ml LexBNFC.ml TestBNFC.ml
File "PrintBNFC.ml", line 112, characters 2-3:
112 |   | (_,x::xs) -> (concatD [prtDef 0 x ; render ";" ; prtDefListBNFC 0 xs])
        ^
Error: Syntax error

This problem exists at least in versions 2.8.1 -- 2.9.0.

Metadata

Metadata

Assignees

Labels

OCamlprinterConcerning the generated printer

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions