]> git.saurik.com Git - bison.git/blobdiff - examples/variant.yy
examples: minor improvements
[bison.git] / examples / variant.yy
index 25f476a5baa9dda70b8c9ee5955cc8890e8bf46f..eef2080dbabbe188c884bf21c5eae47a8e4e1665 100644 (file)
@@ -19,8 +19,8 @@
 %skeleton "lalr1.cc"
 %defines
 %define api.token.constructor
+%define api.value.type variant
 %define parse.assert
-%define variant
 %locations
 
 %code requires // *.hh
@@ -70,8 +70,7 @@ typedef std::list<std::string> strings_type;
 
 %token <::std::string> TEXT;
 %token <int> NUMBER;
-%printer { debug_stream () << $$; }
-   <int> <::std::string> <::std::list<std::string>>;
+%printer { yyoutput << $$; } <*>;
 %token END_OF_FILE 0;
 
 %type <::std::string> item;