-
Notifications
You must be signed in to change notification settings - Fork 173
Closed
Labels
Milestone
Description
The C backend does not implement the define
pragma.
EMinus. Exp ::= Exp "-" Exp1;
EInt. Exp1 ::= Integer;
eNeg. Exp1 ::= "-" Exp1;
coercions Exp 1;
define eNeg e = EMinus (EInt 0) e;
For this example,
bnfc --c -m Foo.cf && make
fails at compilation of Printer.c
, which treats eNeg
as variant just as EInt
and EMinus
.
The backends Haskell, Java, CPP, OCaml do support define
.
Backends that do not support define
:
- Haskell
--functor
- C
- Java/ANTLR
- C++ NoSTL: Skeleton.C does not compile
- C++ with namespace