[Top][All Lists]

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

GLR C++ Variants

From: Ookami
Subject: GLR C++ Variants
Date: Sat, 11 Jan 2020 12:38:16 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

Hello! Five years ago was a feature request about C++ variants for GLR. The Bison documentation says that C++ Variants are not supported in GLR, and C++17 variants will not be supported to maintain backward compatibility with older versions of C++ standards.

I know, that Valentin implementing C++ GLR variants. Is there any progress?

I wish to implement at least C++17 variants, and then move forward for backward compatibility. Or I thought about another feature. Something like attributes, that can be attached to rules (for example, I can attach a needed type, like it already implemented by variants in Bison — %type <my_type> rule1 ...), and then in C++ code handling the rule I would like to read this attribute, to access the value from C++17 std::any or std::variant. For example:

%attr rule1 {type}
rule2: rule1 {$$ = std::get<$a1>($1);}

And yes, I want help with implementing C++ GLR variants.

reply via email to

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