Open nuernbergk opened 3 weeks ago
Fixed in the "restructure" branch.
ghci> pretty (union (singleton 'e') (singleton 'E') <> plus digit)
State(s): fromList [0,2,3,4]
Initial: 3
Final(s): fromList [0]
Transition(s):
0 -> ['\NUL'-'/'':'-'\1114111'] 4 | ['0'-'9'] 0;
2 -> ['\NUL'-'/'':'-'\1114111'] 4 | ['0'-'9'] 0;
3 -> ['\NUL'-'D''F'-'d''f'-'\1114111'] 4 | ['E''e'] 2;
4 -> ['\NUL'-'\1114111'] 4
ghci> pretty (union (singleton 'e' <> plus digit) (singleton 'E' <> plus digit))
State(s): fromList [2,5,6,9]
Initial: 6
Final(s): fromList [2]
Transition(s):
2 -> ['\NUL'-'/'':'-'\1114111'] 9 | ['0'-'9'] 2;
5 -> ['\NUL'-'/'':'-'\1114111'] 9 | ['0'-'9'] 2;
6 -> ['\NUL'-'D''F'-'d''f'-'\1114111'] 9 | ['E''e'] 5;
9 -> ['\NUL'-'\1114111'] 9
In the code
parseExp
andparseExp'
should parse the same values (simply by the definition of the automata). However, they don't. The latter parses"E3"
, while the latter gives the following error message:Unfortunately, couldn't figure out how to print the grammars using
pretty
(type bounds couldn't be resolved automatically).