Re: WANTED: stylistic advice/guidelines for YACC and LEX

"Tribble, Louis" <ltribble@msmail4.hac.com>
9 Feb 1996 16:57:52 -0500

          From comp.compilers

Related articles
WANTED: stylistic advice/guidelines for YACC and LEX timd@Starbase.NeoSoft.COM (1996-01-27)
Re: WANTED: stylistic advice/guidelines for YACC and LEX scooter@mccabe.com (Scott Stanchfield) (1996-01-29)
Re: WANTED: stylistic advice/guidelines for YACC and LEX rmonroe@hever.demon.co.uk (Robert F. Monroe) (1996-01-31)
Re: WANTED: stylistic advice/guidelines for YACC and LEX rmonroe@hever.demon.co.uk (Robert F. Monroe) (1996-02-02)
Re: WANTED: stylistic advice/guidelines for YACC and LEX Robert@hever.demon.co.uk (Robert F. Monroe) (1996-02-04)
Re: WANTED: stylistic advice/guidelines for YACC and LEX rmonroe@hever.demon.co.uk (Robert F. Monroe) (1996-02-09)
Re: WANTED: stylistic advice/guidelines for YACC and LEX ltribble@msmail4.hac.com (Tribble, Louis) (1996-02-09)
| List of all articles for this month |
From: "Tribble, Louis" <ltribble@msmail4.hac.com>
Newsgroups: comp.compilers
Date: 9 Feb 1996 16:57:52 -0500
Organization: Compilers Central
References: 96-02-019 96-02-052 96-02-066
Keywords: yacc



Robert F. Monroe wrote:


> Do any of you see any significant gains to be made by handling yacc
> action code in this manner?


In my recent experience, yes. Because of the size of the grammar, and
because the code was targeted to several platforms (not all of which
adequately supported YACC), anything that reduced the need to rerun
YACC improved my life. Essentially, all my actions are one liners that
call the method appropriate to the rule.


Separating the actions from the grammar using inheritance seems common
in C++ and Eiffel parser generators (for example, in Yacc++ and in the
Eiffel Parse library). One cited benefit is that a parser constructed
in this way can be shared by diverse tools (e.g., a compiler and a
documentation extractor).


I don't know of any published papers describing Yacc++, but the vendor
will e-mail a technical description (see the Catalog of Compiler
Construction Tools in this newsgroup). Meyer's book on the Eiffel
libraries (Prentice-Hall, I believe "Reusable" is in the title)
includes a chapter on the Parse library (from a client perspective,
not an implementation perspective).


Louis Tribble
Hughes Aircraft Company
<ltribble@msmail4.hac.com>
--


Post a followup to this message

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