Groups | Search | Server Info | Login | Register
Groups > comp.compilers > #145
| From | Chris F Clark <cfc@shell01.TheWorld.com> |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Maintaining scope while parsing C with a Yacc grammar |
| Date | 2011-06-12 20:43 -0400 |
| Organization | The World Public Access UNIX, Brookline, MA |
| Message-ID | <11-06-019@comp.compilers> (permalink) |
| References | <11-04-036@comp.compilers> <11-04-038@comp.compilers> <11-05-003@comp.compilers> <11-05-007@comp.compilers> |
I'm sorry I missed this discussion. I did see the comments by Ira Baxter and Paul Mann though and found them very informative. The one thing that it prompted me to add is that there results are not contradictory. Paul Mann's grammar additions allow one to describe scoping as a S-attributed grammar problem--that's the class of calculations one can perform in one pass as one parses with an LR grammar. This matches the fact that many languages such as C & Pascal are defined to allow their declarations to be processed in one pass with define before use rules. The system Ira Baxter described was a general attribute solving system. Thus, it includes Paul's model, but being more general requires more work to do so. The general system does allow parsing languages like PL/I where the declaration can appear after some (or all) of the uses. Hope this helps, -Chris ****************************************************************************** Chris Clark email: christopher.f.clark@compiler-resources.com Compiler Resources, Inc. Web Site: http://world.std.com/~compres 23 Bailey Rd voice: (508) 435-5016 Berlin, MA 01503 USA twitter: @intel_chris
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar
Maintaining scope while parsing C with a YACC grammar eliben <eliben@gmail.com> - 2011-04-25 05:14 -0700
Re: Maintaining scope while parsing C with a YACC grammar Robert A Duff <bobduff@shell01.TheWorld.com> - 2011-04-26 12:22 -0400
Re: Maintaining scope while parsing C with a YACC grammar Robert A Duff <bobduff@shell01.TheWorld.com> - 2011-04-26 14:08 -0400
Re: Maintaining scope while parsing C with a YACC grammar eliben <eliben@gmail.com> - 2011-04-28 23:20 -0700
Re: Maintaining scope while parsing C with a YACC grammar Robert A Duff <bobduff@shell01.TheWorld.com> - 2011-05-02 20:19 -0400
Re: Maintaining scope while parsing C with a YACC grammar "Ira Baxter" <idbaxter@semdesigns.com> - 2011-05-13 17:46 -0500
Maintaining scope while parsing C with a Yacc grammar Chris F Clark <cfc@shell01.TheWorld.com> - 2011-06-12 20:43 -0400
Re: Maintaining scope while parsing C with a YACC grammar torbenm@diku.dk (Torben Ægidius Mogensen) - 2011-05-03 09:51 +0200
Re: Maintaining scope while parsing C with a YACC grammar Paul B Mann <paul@paulbmann.com> - 2011-05-06 10:43 -0700
csiph-web