Re: Suggestion for dynamic grammar/parser - pls advise
- From: "Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx>
- Date: 29 Mar 2007 23:07:47 -0400
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
.
- References:
- Suggestion for dynamic grammar/parser - pls advise
- From: John Sasso
- Suggestion for dynamic grammar/parser - pls advise
- Prev by Date: Re: Bison Parser negate production rules
- Next by Date: Re: Suggestion for dynamic grammar/parser - pls advise
- Previous by thread: Suggestion for dynamic grammar/parser - pls advise
- Next by thread: Re: Suggestion for dynamic grammar/parser - pls advise
- Index(es):
Relevant Pages
|
|