Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #1810
| Path | csiph.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder1.iad1.usenetexpress.com!216.166.98.84.MISMATCH!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end |
|---|---|
| From | George Neuner <gneuner2@comcast.net> |
| Newsgroups | comp.compilers |
| Subject | Re: Alternatives to Syntax Trees |
| Date | Mon, 16 Jan 2017 06:11:27 -0500 |
| Organization | A noiseless patient Spider |
| Lines | 31 |
| Sender | news@iecc.com |
| Approved | comp.compilers@iecc.com |
| Message-ID | <17-01-004@comp.compilers> (permalink) |
| References | <17-01-002@comp.compilers> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 8bit |
| Injection-Info | miucha.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="32746"; mail-complaints-to="abuse@iecc.com" |
| Keywords | parse, optimize |
| Posted-Date | 16 Jan 2017 09:22:14 EST |
| X-submission-address | compilers@iecc.com |
| X-moderator-address | compilers-request@iecc.com |
| X-FAQ-and-archives | http://compilers.iecc.com |
| Xref | csiph.com comp.compilers:1810 |
Show key headers only | View raw
On Sun, 15 Jan 2017 16:52:15 -0500 (EST), Seima Rao <seimarao@gmail.com> wrote: > Are there alternatives to syntax trees(i.e. the tree data structure) > when compiling via yacc or yacc like tools ? Parser tools don't limit the structure of the intermediate representation. >[There's quadruples, doubly linked lists of data structures. They >make it easier to rearrange code, but harder to do just about anything >else. There's also DAGs, which are trees that can have shared subtrees, >useful when you're doing common subexpressions or tail merging. -John] To add a bit to John's excellent response: You can use a combined representation: e.g., a graph to represent control - function defintions, loops, conditionals, etc. - and within the graph use 3-address form to represent basic blocks (straight line code). Some analyses, e.g., determining dominance for EBB def/kill chains, require both the basic blocks and the graph of their connectivity. Also, "quadruples" are one form of 3-address representation. There are other forms of 3-address and you can implement them using either lists or arrays. Quadruples are the most commonly used because - as John mentioned - they are the easiest to rearrange. George
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Alternatives to Syntax Trees Seima Rao <seimarao@gmail.com> - 2017-01-15 16:52 -0500
Re: Alternatives to Syntax Trees Kaz Kylheku <221-501-9011@kylheku.com> - 2017-01-15 22:31 +0000
Re: Alternatives to Syntax Trees George Neuner <gneuner2@comcast.net> - 2017-01-16 06:11 -0500
Re: Alternatives to Syntax Trees rpw3@rpw3.org (Rob Warnock) - 2017-01-16 12:12 +0000
Alternatives to Syntax Trees Seima Rao <seimarao@gmail.com> - 2017-01-17 14:16 +0530
Re: Alternatives to Syntax Trees Kaz Kylheku <221-501-9011@kylheku.com> - 2017-01-17 22:39 +0000
Re: Alternatives to Syntax Trees George Neuner <gneuner2@comcast.net> - 2017-01-17 22:08 -0500
csiph-web