Inherited attributes in YACC

Graeme Lockley <LOCKS@sunvax.sun.ac.za>
Mon, 4 Nov 91 09:32 SAST

          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)
yacc inherited attributes dzabel@cs.tu-berlin.de (Dirk Zabel) (1991-11-07)
| List of all articles for this month |
Newsgroups: comp.compilers
From: Graeme Lockley <LOCKS@sunvax.sun.ac.za>
Keywords: yacc
Organization: Compilers Central
Date: Mon, 4 Nov 91 09:32 SAST

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


Rumour has it that it is possible to patch backwards into the attribute
evaluation stack to achieve the desired results.


Accompanied with an explaination, a small YACC example would be greatly
appreciated.


Graeme Lockley
locks@sunvax.sun.ac.za
[In AT&T yacc you can use the poorly documented "$0" to reference an enclosing
production. The PCC C parser uses that feature when parsing declarations.
It's pretty ugly, though. -John]
--


Post a followup to this message

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