18 Sep 2005 00:44:15 -0400

Related articles |
---|

Parsing fully context-free grammars lowell@coasttocoastresearch.com (Lowell Thomas) (2005-09-17) |

Re: Parsing fully context-free grammars haberg@math.su.se (2005-09-18) |

Re: Parsing fully context-free grammars lowell@coasttocoastresearch.com (Lowell Thomas) (2005-09-22) |

Re: Parsing fully context-free grammars haberg@math.su.se (2005-09-23) |

Re: Parsing fully context-free grammars paul@parsetec.com (Paul Mann) (2005-10-02) |

Re: Parsing fully context-free grammars haberg@math.su.se (2005-10-02) |

Re: Parsing fully context-free grammars drikosv@otenet.gr (Evangelos Drikos) (2005-10-03) |

Re: Parsing fully context-free grammars paul@parsetec.com (Paul Mann) (2005-10-04) |

[3 later articles] |

From: | haberg@math.su.se (Hans Aberg) |

Newsgroups: | comp.compilers |

Date: | 18 Sep 2005 00:44:15 -0400 |

Organization: | Mathematics |

References: | 05-09-067 |

Keywords: | parse |

"Lowell Thomas" <lowell@coasttocoastresearch.com> wrote:

*> Also, APG always disambiguates to a single parse tree. However,*

*> looking at the "dangling else", I've found that is easy to get either*

*> translation from the single parse tree. That is,*

*>*

*> if(expr) then {if(expr) then {stmt} else {stmt}}*

*> or*

*> if(expr) then {if(expr) then {stmt}} else {stmt}.*

*>*

*> It seems to me that this could be generalized to say, in effect, that*

*> any tree from the forest can be emulated by any other. Does anyone*

*> know of a contradiction to this?*

This is somewhat unspecific. You have two different parses, which generate

two different parse trees. What do you mean with emulating these two

different parse trees from a single one?

--

Hans Aberg

Post a followup to this message

Return to the
comp.compilers page.

Search the
comp.compilers archives again.