picty / parsifal

Parsifal : an OCaml-based parsing engine
Other
61 stars 8 forks source link

Allow for non-constant constructors in enums #14

Open pictyeye opened 10 years ago

pictyeye commented 10 years ago

The idea would be to allow for non-constant constructors in enums, for example, in dvi.ml :

| 0 .. 127 as i -> OP_Char i, "Char"

but this would need changes in the internal enum representation and for now, the case has only been encountered in DVI file format.

In fact, extending enums this way seems to call for a merge between enums and unions (at least in the preprocessor code)