C++ GLR parser const values in user rules
Martin Cizmar <[email protected]> Sun, 10 Apr 2022 16:30:13 +0000
| Newsgroups | gmane.comp.parsers.bison.general |
|---|---|
| Message-ID | <URyg9c4nVnmNHcDJ4y7vyogs0tJJoZZwIhpQ_oQE72WeSIl1qpHV3bP8-7mOIKGt5XZBov_Mm08Wv5Qy0PTJQDEvzly9Hmx32pp8hygMyWc=@protonmail.com> |
Hello, I am trying to implement a VHDL parser using Bison/C++ combination and I am having problems with generated code. Specifically, the: yyuserAction() function. I am unable to compile the code, because all rhs values for each rule are cast as: static_cast<glr_stack_item const*>(...) I would like to move the values into resulting struct, but the I am unable to because of "constness". Are all those rhs values const because of GLR (i.e, multiple stacks)? Oh, I am using Bison 3.8.2 and "glr2.cc" skeleton. Thanks, Martin.