[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: parse tree
From: |
Akim Demaille |
Subject: |
Re: parse tree |
Date: |
19 Apr 2002 10:00:11 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) |
>>>>> "Aurelian" == Aurelian Melinte <address@hidden> writes:
Aurelian> The other way I thought of, let bison do it and this way it
Aurelian> will be there for every grammar.
I tend to agree with your deisre, but LALR(1) does not seem to be the
proper framework for this: you are obliged to write contrived
grammars, which would result in ugly AST (IMHO).
For instance, I would certainly not want Bison to create AST::If and
AST::IfElse: I would like to have only AST::IfElse, with the else
member reduced to nop when it is missing. And so forth.
Also, `(' and `)' play no role in the AST.
So, the idea is very interesting, agreed. Nevertheless, I'm not sure
that Bison is the proper framework for this.
In any case, there's a lot of preliminary work to do before starting,
precisely to tackle the problems above.