in reply to Re: Comparative satisfiability of regexps.
in thread Comparative satisfiability of regexps.
Actually Friedl is making a point about how the engine would match, not that the state tables involved would be the same. IOW there is no guarantee that a DFA constructed from abc would have the same state transition tables as from [aa-a](b|b{1}|b)c.
Instead of trying to build a DFA regex engine (a non trivial task) I'd suggest just writing some code that can normalize two regexes to the same representational format. If you can normalize two regexes to the same pattern then they are the same. Of course this doesnt help when it turns out that the receivers regex can accept a superset of the emitters pattern generator. Ie: the emitting regex could be /a/ and the receiving regex could be /a|b/ which means the receiving regex can handle anything that the emitting regex can produce but vice versa is not true. IMO if you figure that problem out you are well on your way to solving the halting problem.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Comparative satisfiability of regexps.
by tall_man (Parson) on Jan 19, 2005 at 22:46 UTC | |
|
Halting problem? Sheesh, I hope not.
by Meowse (Beadle) on Jan 19, 2005 at 21:45 UTC | |
by demerphq (Chancellor) on Jan 19, 2005 at 22:01 UTC |