[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C++ variants
From: |
Hans Aberg |
Subject: |
Re: C++ variants |
Date: |
Mon, 19 Jan 2015 14:20:17 +0100 |
> On 19 Jan 2015, at 11:47, Akim Demaille <address@hidden> wrote:
>
>> Le 19 janv. 2015 à 11:20, Hans Aberg <address@hidden> a écrit :
>> What is the idea of the Bison static type system here?
>
> That of Yacc. When you know the current state, you always know
> the type of the symbol (because states are always reached by a single
> symbol, named the accessing symbol in Bison). So the parser does not
> explicitly store the type, it recovers it from the state number.
>
> See the yystos tables in the generated parsers.
Right. But when storing variables on the lookup table? One might have a table
that gives the type of the variable, and then going to that table. - I have
only used polymorphic tables.