[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Conversion of semantic values to string objects
From: |
Markus Elfring |
Subject: |
Conversion of semantic values to string objects |
Date: |
Fri, 27 Sep 2013 20:22:42 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 |
Hello,
I try to develop a small grammar that I derive from descriptions in your C++
tutorial.
http://www.gnu.org/software/bison/manual/html_node/A-Complete-C_002b_002b-Example.html
Unfortunately, I stumble on error messages like the following during the build
process on my openSUSE system.
...
Building parser with bison 3.0
parser.ypp:109.64-65: error: $5 of ‘assignment’ has no declared type
driver.parameters[($1 += '.') += $3] = string_cast($5);
^^
parser.ypp:111.79-80: error: $3 of ‘assignment’ has no declared type
| "identifier" ASSIGN value { driver.parameters[$1] =
string_cast($3); }
^^
parser.ypp:112.83-84: error: $4 of ‘assignment’ has no declared type
| "identifier" DOT ASSIGN value { driver.parameters[$1] =
string_cast($4); }
^^
make[2]: *** [parser.cpp] Error 1
...
I guess that I need a bit more help with the handling of semantic values in
grammar actions when it seems that I do eventually not want to use a
specification like "%token <std::string> IDENTIFIER ..." for the detection of a
"rvalue" in my use case.
http://www.gnu.org/software/bison/manual/html_node/Calc_002b_002b-Parser.html
http://www.gnu.org/software/bison/manual/html_node/Action-Types.html
I would appreciate your advices.
Regards,
Markus
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Conversion of semantic values to string objects,
Markus Elfring <=