|
From: | Akim Demaille |
Subject: | Re: [PATCH] Change the handling of the symbols in the skeletons. |
Date: | Mon, 10 Nov 2008 14:29:21 +0100 |
Le 10 nov. 08 à 14:21, Paolo Bonzini a écrit :
Akim Demaille wrote:Le 12 août 08 à 21:48, Akim Demaille a écrit :Before we were using tables which lines were the symbols and which columns were things like number, tag, type-name etc. It is wasdifficult to extend: each time a column was added, all the numbers hadto be updated (you asked for colon $2, not for "tag"). Also, it washard to filter these tables when only a subset of the symbols (say thetokens, or the nterms, or the tokens that have and external number *and* a type-name) was of interest. Now instead of monolithic tables, we define one macro per cell. For instance "b4_symbol(0, tag)" is a macro name which contents is self-decriptive. The macro "b4_symbol" provides easier access to these cells. * src/output.c (type_names_output): Remove. (symbol_numbers_output, symbol_definitions_output): New. (muscles_output): Call them. (prepare_symbols): Define b4_symbols_number.This change should be propagated to the other skeletons as well, so thatwe keep a single access to the symbol components.Would be easier if you had a changelog entry for lalr1.cc too ;-)
Bummer :( Sorry about this.BTW, I was not asking for others (including you) to do this: this is more like a todo note, and I do plan to spend some time on this. Because I was frightened of conflicts with other files and I felt kind of protected staying in lalr1.cc, there are also many macros that should eventually move from there to more visible m4 files.
[Prev in Thread] | Current Thread | [Next in Thread] |