Re: Suggestion for dynamic grammar/parser - pls advise

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
29 Mar 2007 23:07:47 -0400

          From comp.compilers

Related articles
Suggestion for dynamic grammar/parser - pls advise jsassojr@nospam.com (John Sasso) (2007-03-29)
Re: Suggestion for dynamic grammar/parser - pls advise mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2007-03-29)
Re: Suggestion for dynamic grammar/parser - pls advise DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-03-29)
Re: Suggestion for dynamic grammar/parser - pls advise cfc@shell01.TheWorld.com (Chris F Clark) (2007-03-29)
Re: Suggestion for dynamic grammar/parser - pls advise mefrill@yandex.ru (mefrill) (2007-03-30)
Re: Suggestion for dynamic grammar/parser - pls advise nicola.musatti@gmail.com (Nicola Musatti) (2007-03-30)
Re: Suggestion for dynamic grammar/parser - pls advise jsassojr@nycap.rr.com (John Sasso) (2007-03-30)
Re: Suggestion for dynamic grammar/parser - pls advise jsassojr@nycap.rr.com (John Sasso) (2007-03-30)
[3 later articles]
| List of all articles for this month |

From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Newsgroups: comp.compilers
Date: 29 Mar 2007 23:07:47 -0400
Organization: cbb software GmbH
References: 07-03-106
Keywords: parse
Posted-Date: 29 Mar 2007 23:07:47 EDT

On 29 Mar 2007 01:02:19 -0400, John Sasso wrote:


> Suppose we have a language (for example, a language to describe the
> configuration of a server), which is versioned (1, 2, 3, etc...);


[...]


> As a very simple example, suppose version 1 of our language (L_1) can
> recognize the following program statement:
>
> set disk id 1 name "system" nparts 4


Why don't you treat it as a subprogram call instead of a statement? That
would fix you language. The variety of fields in the statement looks much
like a record aggregate passed to the subprogram Set. The language "change"
in your example is basically a change of some record type of which
aggregate is passed to Set. This could be easily made by swapping the
library package, leaving both the parser and the code generator intact.


> My thought is that implementing a parser based on a dynamic
> grammar/parser scheme is the answer (I am not an expert on compiler
> design or theory).


(who will write the code generator?)


--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


Post a followup to this message

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