* examples/variant.yy: Formatting changes.
One stage build.
+2008-11-10 Akim Demaille <demaille@gostai.com>
+
+ Update the variant example.
+ * examples/variant.yy: Formatting changes.
+ One stage build.
+
2008-11-10 Akim Demaille <demaille@gostai.com>
Support constructor with an argument.
2008-11-10 Akim Demaille <demaille@gostai.com>
Support constructor with an argument.
- yylval->build<std::string> () =
- std::string ("I have three numbers for you.");
+ yylval->build (std::string ("I have three numbers for you."));
result = yy::parser::token::TEXT;
break;
case 1:
case 2:
case 3:
result = yy::parser::token::TEXT;
break;
case 1:
case 2:
case 3:
- yylval->build<int> () = stage;
result = yy::parser::token::NUMBER;
break;
case 4:
result = yy::parser::token::NUMBER;
break;
case 4:
- yylval->build<std::string> () = std::string ("And that's all!");
+ yylval->build (std::string ("And that's all!"));
result = yy::parser::token::TEXT;
break;
default:
result = yy::parser::token::TEXT;
break;
default:
{
yy::parser p;
p.set_debug_level (!!getenv ("YYDEBUG"));
{
yy::parser p;
p.set_debug_level (!!getenv ("YYDEBUG"));