Re: Inherited attributes in YACC

Raul Deluth Miller-Rockwell <rockwell@socrates.umd.edu>
Tue, 5 Nov 91 02:46:50 est

          From comp.compilers

Related articles
Inherited attributes in YACC LOCKS@sunvax.sun.ac.za (Graeme Lockley) (1991-11-15)
Re: Inherited attributes in YACC rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell) (1991-11-05)
| List of all articles for this month |
Newsgroups: comp.compilers
From: Raul Deluth Miller-Rockwell <rockwell@socrates.umd.edu>
Keywords: yacc, attribute
Organization: Compilers Central
References: 91-11-010
Date: Tue, 5 Nov 91 02:46:50 est

Graeme Lockley:
      I am very intrested to know how does one, assuming it is possible,
      use/implement inherited attributes in YACC.


Well, if you grant that yacc is already rather ugly, and uses global
variables all over the place, you might be happy just implementing a
[global] stack, and keeping track of these attributes there. [e.g. I
usually use a stack of symbol tables when implementing something using
yacc.]


Error recovery won't always be graceful, but then, with yacc it never
is. [Bison is much better here.]


--
Raul Deluth Miller-Rockwell
<rockwell@socrates.umd.edu>
--


Post a followup to this message

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