Re: Syntax tree generation under different parsing techniques

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
28 Apr 2004 14:35:37 -0400

          From comp.compilers

Related articles
Syntax tree generation under different parsing techniques better_cs_now@yahoo.com (Dave) (2004-04-21)
Re: Syntax tree generation under different parsing techniques mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2004-04-28)
Re: Syntax tree generation under different parsing techniques thp@cs.ucr.edu (2004-05-16)
| List of all articles for this month |
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Newsgroups: comp.compilers
Date: 28 Apr 2004 14:35:37 -0400
Organization: Compilers Central
References: 04-04-069
Keywords: analysis
Posted-Date: 28 Apr 2004 14:35:37 EDT

On 21 Apr 2004 00:50:47 -0400, "Dave" <better_cs_now@yahoo.com> wrote:


>I would like to decouple my parsing and translation (here, "translation"
>consists only of interpreting; I'm not actually generating code).
>Currently, I'm doing predictive recursive descent parsing, but I have to do
>some kludgy backtracking because there is one spot in the grammar that is
>not suitable for this parsing technique. My goal is to employ some other
>parsing technique and to generate a syntax tree while doing so (which I
>don't currently do; as I opened with, the translation is inline with the
>parsing).
>
>My question is: Regardless of the parsing technique used, is it always
>possible to generate a syntax tree? It just seems intuitive to me that some
>techniques don't lend themselves to the generation of a syntax tree. It's
>hard for me to articulate why, but it seems that way. For example, if I
>were to take the easy route and implement CYK, how well would it lend itself
>to generate a syntax tree? What about other techniques?


You might take at the infix expression parser in:
http://www.dmitry-kazakov.de/ada/components.htm


It does not use parsing tree, but can generate it. The technique uses
no grammar (at least explicitly) and based on an old infix to postfix
notation conversion algorithm.


--
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de


Post a followup to this message

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