Dennis Roberts
7/15/2005 5:32:00 AM
Ahh. Makes sense. Thanks for the clarification.
On 7/14/05, why the lucky stiff <ruby-talk@whytheluckystiff.net> wrote:
> Dennis Roberts wrote:
>
> >Dan could you explain the difference between using regular expressions
> >and a bonafide parser?
> >
> >
> He's just distinguishing between a parser which obeys an overall grammar
> and a parser made of regexps (little grammars).
>
> Ruby's parser, for instance, leverages a parser generator (yacc) which
> is given the rules used to parse Ruby source code.
>
> However, Regexps are often used in conjunction with Racc, a parser
> generator for Ruby. So Regexps aren't always a bad thing, and in fact
> they can be used to add great flexibility (such as in feedparser.org),
> they just tend to leave lots of holes in the overall soundness of the
> parser.
>
> _why
>
>