|LEX and YACC, jeff & mutt arthur@lgc.UUCP (1989-11-02)|
|Re: LEX and YACC, jeff & mutt email@example.com (1989-11-03)|
|Re: LEX and YACC, jeff & mutt firstname.lastname@example.org (1989-11-04)|
|Re: LEX and YACC, jeff & mutt joshua@athertn.Atherton.COM (1989-11-07)|
|Re: LEX and YACC, jeff & mutt email@example.com (1989-11-08)|
|Date:||Fri, 3 Nov 89 13:49:32 EST|
>If someone were to ask you for the reason/s why you wrote your SQL II
>(BNF as given by ANSI) interpreter by way of recursive descent
>parsing, as opposed to simply using tools like LEX and YACC, what
>would you say ?....
I can think of a couple of reasons in addition to the ones given. First,
many non-Unix systems have C compilers but not lex or yacc; maximal
portability requires minimizing reliance on support software. Second,
probably not applicable in this case, there are a number of languages --
C and Pascal for example -- which were designed with top-down parsing
(e.g. recursive descent) in mind and are awkward to handle bottom-up.
(Actually, C is a **** to parse no matter how you do it... but it was
definitely done with top-down parsing in mind, that being how Dennis
Ritchie's original compiler did it.)
Actually, our moderator's remarks about lex bring a third reason to
mind: if the support tools on the developer's home system are buggy
enough, it may not be cost-effective to use them, even if it would be
a reasonable thing to do in an ideal world.
Henry Spencer at U of Toronto Zoology
Return to the
Search the comp.compilers archives again.