lex, yacc, and the programmer's guild

"Nathan K. Inada" <nathan@stc.com>
Mon, 10 Oct 1994 12:29:41 GMT

          From comp.compilers

Related articles
Why separate Lexical & Parser Generators heronj@smtplink.NGC.COM (John Heron) (1994-10-05)
Re: Why separate the lexer and parser? hbaker@netcom.com (1994-10-10)
lex, yacc, and the programmer's guild nathan@stc.com (Nathan K. Inada) (1994-10-10)
| List of all articles for this month |

Newsgroups: comp.compilers
From: "Nathan K. Inada" <nathan@stc.com>
Keywords: lex, yacc, design
Organization: Software Technologies Corporation
References: 94-10-028 94-10-078
Date: Mon, 10 Oct 1994 12:29:41 GMT

Henry G Baker <hbaker@netcom.com> writes:

> The problem with tools like lex/yacc is that they beg to be
> used, and _are_ used, 100X more often than they ought to be.
> Do we really need 10,000 different formats for the various
> parameter files in computer systems?

i have heard this before and agree whole heartedly with the overabundance
of formats around. however, it seems to me that *occasionally* the realm
problems to be solved justify the new syntax. a couple of (perhaps weak)
examples are lex and yacc themselves. lex lives in the realm
of regular expressions so it has a regular expression-ish syntax.
yacc deals with grammars and so has a bnf-ish syntax.

seems like the ease of abuse of tools implies an ease of use.
it might be true that lex/yacc are such that sytaxes designed to
be parsed with these tend to be "bad" syntaxes. if this is the
claim, the argument is well outside of my ability to back either
way. though i would be glad to hear what anyone might wish to say
about it.

> (Perhaps finite state
> machines and parsing techniques should be banned from CS
> undergraduate curricula, so that students could actually
> learn how to be part of the _solution_ to computer problems,
> instead of becoming additional parts of the _problem_.)

or perhaps more "wisdom" should be taught in CS curricula.
  "parsing tools dont proliferate esoteric syntaxes.
    programmers proliferate esoteric syntaxes."

(maybe this *is* the wisdom which is taught...that of job security ;-)

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.