On Thu, 22 Sep 2005 11:13:50 +0200
Akim Demaille <akim(a)lrde.epita.fr> wrote:
2. The strategies
=================
First of all, why the heck should the alltd be in the rules? And BTW,
why the rules are strategies here? As a first improvement, I propose
to move the alltd down to the prepost strategy.
Then you see that there are two alltd. Although this allows to have
declarations after the implementation (which is indeed a feature) it
goes against the spirit of C.
I think you are right.
Also, *save the space*! What is this fashion of
starting to implement
immediately after `='?
I don't know but some code I wrote shows the same phenomenon. It
maybe comes from code that I read in papers about Stratego/XT (so,
code not indented in the same way that real source code) or from the
Stratego/XT, Tiger Compiler and particularly Transformers source
code... Yes, I *think* that Transformers code inspired me more than others.
3. The rules
============
The rules exist, and that's because they make sense. Why just making
strategies? I know, they are equivalent, but so are for and while
loops, and you do use both.
What is the InitDeclarator that we start by matching? Apparently it
is only for debugging, but that's cluttering the code. What are all
these oncetd doing here? This is *so wrong*: the code is trying to
match various piece instead of just matching what it's looking for.
IMNSHO it should look like:
InitDeclarator is not only used for debugging. The term projection is
important for the rest of the code to work. It enables us to know that
a function declaration is found (where the pre- and postconditions are).
What is to be done is to create a dynamic rule *that
performs the
replacement*!!! Not some pseudo table, which completely defeats the
whole point of dynamic rules.
Yes, I understood when you told me that. It was only for commiting an
understandable file. Thus Jesus modified the code to show me how to
use concrete syntax with our grammars and tools with a simple example.
We want to write something like:
where
I didn't understand, or something is missing here...
--
Alexandre Borghi
"Freedom is the right of all sentient beings." Optimus Prime
alexandre.borghi(a)lrde.org