From: Tanaka Akira Date: 2003-04-17T02:40:40+09:00 Subject: Re: regular expressions In article <041c01c3042f$2105ad20$0300a8c0@austin.rr.com>, "Hal E. Fulton" writes: > I would have done it something like this: > > myreg = RegexLang.new(< # This would be a full-featured regex > # language "script" with keywords instead > # of punctuation; comments allowed; etc. > blah blah blah... > EOF > > myreg.is_a? Regexp # true > > # And so on... I wrote such library: [RAA:abnf]. It can be used as myreg = /\A#{ABNF.regexp <<'End'}\z/o ... ABNF(RFC2234) description ... End myreg.is_a? Regexp # true Of course, it handles only some (regular) subset of ABNF. -- Tanaka Akira