Closed PeterTKY closed 7 years ago
A regular expression parser is hard to maintain. Using some parse tree grammar can help. Some grammar parser library available in Ruby, such as treetop (https://rubygems.org/gems/treetop/versions/1.6.8).
Rsec. Done. Treetop arguably easier to maintain because it is so much better known; but I couldn't resist Rsec being 6 times faster. :-)
A regular expression parser is hard to maintain. Using some parse tree grammar can help. Some grammar parser library available in Ruby, such as treetop (https://rubygems.org/gems/treetop/versions/1.6.8).