[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dynamic token kinds
From: |
Akim Demaille |
Subject: |
Re: Dynamic token kinds |
Date: |
Wed, 19 Dec 2018 09:13:47 +0100 |
> Le 19 déc. 2018 à 07:34, Akim Demaille <address@hidden> a écrit :
>
> Hi Frank, Hi all,
>
>> Le 16 déc. 2018 à 10:02, Frank Heckenbach <address@hidden> a écrit :
>>
>> So to make it safe, we might need something like this:
>>
>> static inline
>> symbol_type
>> make_symbol (token_type type, b4_locations_if([const location_type& l, ])T&&
>> v);
>>
>> auto-generated for each semantic type T of any token (plus one
>> without the "v" parameter for untyped tokens) that checks (at
>> runtime) the "type" parameter against the (statically known) valid
>> token types for T.
>
> I like this idea. I have a draft for it in my repo, as "make-symbol".
> Please, try it and report about it.
>
> There are a few issues:
> - make_symbol will collide if the user has a token named symbol
> Any idea of a better name?
Or simply make them actual constructors for `symbol_type`.
- Re: Porting to typed C++ parser (was: Dynamic token kinds), (continued)
- Re: Porting to typed C++ parser (was: Dynamic token kinds), Hans Åberg, 2018/12/17
- Re: Porting to typed C++ parser (was: Dynamic token kinds), Frank Heckenbach, 2018/12/18
- Re: Porting to typed C++ parser (was: Dynamic token kinds), Hans Åberg, 2018/12/18
- Re: Porting to typed C++ parser (was: Dynamic token kinds), Frank Heckenbach, 2018/12/19
- Re: Porting to typed C++ parser (was: Dynamic token kinds), Hans Åberg, 2018/12/19
- Re: Porting to typed C++ parser (was: Dynamic token kinds), Frank Heckenbach, 2018/12/22
- Re: Porting to typed C++ parser (was: Dynamic token kinds), Hans Åberg, 2018/12/22
- Re: Porting to typed C++ parser (was: Dynamic token kinds), Frank Heckenbach, 2018/12/22
- Re: Porting to typed C++ parser (was: Dynamic token kinds), Hans Åberg, 2018/12/22
Re: Dynamic token kinds, Akim Demaille, 2018/12/19
Re: Dynamic token kinds, Frank Heckenbach, 2018/12/21
Re: Dynamic token kinds, Akim Demaille, 2018/12/22
Re: Dynamic token kinds, Frank Heckenbach, 2018/12/22
Re: Dynamic token kinds, Akim Demaille, 2018/12/23
Re: Dynamic token kinds, Frank Heckenbach, 2018/12/23
Re: Dynamic token kinds, Akim Demaille, 2018/12/23
Re: Dynamic token kinds, Frank Heckenbach, 2018/12/23