Closed pictyeye closed 10 years ago
The first patterns "| x | y ->" is easy to implement.
Concerning ranges, "| x .. y ->" can not directly be parsed by camlp4, so the pattern representing ranges will be "| x, y ->"
The last idea will be left as a possible future enhancement in another ticket.
Two simple patterns should be recognized : the multiple pattern and the interval.
Exemple of multiple pattern from tar.ml
Exemple of interval pattern from dvi.ml
Other ideas would be to allow for non-constant constructors in enums, for example, in dvi.ml :
but this would need changes in the internal enum representation and for now, the case has only been encountered in DVI file format.