Is there some existing code (preferably ruby) which can take a regular
expression and
build a parse tree from it? e.g. I want to turn

"^(foo|(bar|baz)*|qux)$"

into something like this:

     <seq>
    /  |  \
<bol>  |   <eol>
     <alt>
   /   |   \
foo   <*>   qux
       |
     <alt>
     /   \
   bar   baz

or some equivalent representation of the regular expression itself.

(The trouble is, when you google for 'ruby regular expression parser'
you get all sorts of parsers written *using* regular expressions, not
parsers *for* regular expressions!)

Thanks,

Brian.

-- 
Posted via http://www.ruby-forum.com/.