sebfisch / haskell-regexp

Regular Expression Matching in Haskell
http://sebfisch.github.com/haskell-regexp/
Other
34 stars 5 forks source link

parsing of curly braces #11

Closed sebfisch closed 14 years ago

sebfisch commented 14 years ago

Currently, curly braces are always parsed as parts of a numeric bound token and lead to a parse error if they are not. Instead, curly braces must parse as symbols representing themselves if they are not part of a bound annotation.

sebfisch commented 14 years ago

implemented (e19ca927621d7ffb0fff2f0c027d246df08e7d81).

I have also implemented unary bounds, i.e., {3} means {3,3}.

Surprise: both annotations are valid regular expressions and mean "three times nothing" because the parser recognises them as a bound annotation on epsilon.