bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/5] c++: improvements on symbol kinds


From: Hans Åberg
Subject: Re: [PATCH 3/5] c++: improvements on symbol kinds
Date: Tue, 14 Apr 2020 22:27:50 +0200

> On 11 Apr 2020, at 08:47, Akim Demaille <address@hidden> wrote:
> 
> Instead of
> 
>    /// (Internal) symbol kind.
>    enum symbol_kind_type
>    {
>      YYNTOKENS = 5, ///< Number of tokens.
...
> generate
> 
>    /// Symbol kinds.
>    struct symbol_kind
>    {
>      enum symbol_kind_type
>      {
>        YYNTOKENS = 5, ///< Number of tokens.
...

I use symbol table lookups of the form:
  std::optional<std::pair<my::the_parser::token_type, my::value>> x = 
mli::symbol_table.find(yylval.text);

What will the new name be?

The most logical from the user point of view would be to have 
the_parser::symbol_type.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]