A liste_const
is just a list of constante
with no intervening punctuation:
constante constante constante constante
And a declar
might be a liste_const
What then happens if you have a liste_data
(which is really a liste_declar
, no?). That could be a list of lists of constante
, but there is no way to know where the first list of constante
ends and the next one begins. So the above could be parsed as
<list_const <constante constante>> <list_const <constante>> <list_const <constante>>
or
<list_const <constante constante constante constante>>
or a large number of other possibilities.
The situation with liste_type
is analogous.
In other words, you don't want a liste_data
to be a list of lists of constants and types; you want it to be a list of (constant or type).
Personally, I'd just change:
declar: def_type | constante;
and get rid of liste_type
and list_const
.