]> git.saurik.com Git - bison.git/blobdiff - tests/local.at
grammar: free the association tracking graph
[bison.git] / tests / local.at
index 103887d0350973b52adf5a8a3b75b175cc657cec..c1aedf39bb93d8a8679e455dd0f6a2d4c5267254 100644 (file)
@@ -186,10 +186,12 @@ m4_pushdef([AT_NAME_PREFIX],
            [m4_bregexp([$3], [\(%define api\.\(namespace\|prefix\)\|%name-prefix\) "\([^""]*\)"], [\3])],
            [yy])])
 m4_pushdef([AT_TOKEN_CTOR_IF],
-[m4_bmatch([$3], [%define api.token.constructor], [$1], [$2])])
+[m4_bmatch([$3], [%define api\.token\.constructor], [$1], [$2])])
 m4_pushdef([AT_TOKEN_PREFIX],
-[m4_bmatch([$3], [%define api.token.prefix ".*"],
-           [m4_bregexp([$3], [%define api.token.prefix "\(.*\)"], [\1])])])
+[m4_bmatch([$3], [%define api\.token\.prefix ".*"],
+           [m4_bregexp([$3], [%define api\.token\.prefix "\(.*\)"], [\1])])])
+m4_pushdef([AT_VARIANT_IF],
+[m4_bmatch([$3], [%define api\.value\.type "?variant"?], [$1], [$2])])
 m4_pushdef([AT_API_prefix],
 [m4_bmatch([$3], [%define api\.prefix ".*"],
            [m4_bregexp([$3], [%define api\.prefix "\([^""]*\)"], [\1])],
@@ -203,7 +205,7 @@ m4_pushdef([AT_API_PREFIX],
 m4_pushdef([AT_YYERROR_ARG_LOC_IF],
 [AT_LOCATION_IF([AT_PURE_IF([m4_bmatch([$3],
                                        m4_quote(m4_join([\|],
-                                                        [%define api.pure "?full"?],
+                                                        [%define api\.pure "?full"?],
                                                         [%glr-parser],
                                                         [%parse-param],
                                                         [%skeleton "?glr.c"?])),
@@ -288,6 +290,7 @@ m4_popdef([AT_YYERROR_SEES_LOC_IF])
 m4_popdef([AT_YYERROR_ARG_LOC_IF])
 m4_popdef([AT_API_PREFIX])
 m4_popdef([AT_API_prefix])
+m4_popdef([AT_VARIANT_IF])
 m4_popdef([AT_TOKEN_PREFIX])
 m4_popdef([AT_TOKEN_CTOR_IF])
 m4_popdef([AT_NAME_PREFIX])
@@ -761,23 +764,23 @@ m4_define([AT_FULL_COMPILE],
 [java],
   [AT_BISON_CHECK([-o $1.java $1.y])
    AT_LANG_COMPILE([$1],
-                    m4_join([ ],
-                            [$1.java],
-                            m4_ifval($2, [[$1-$2.java]]),
+                   m4_join([ ],
+                           [$1.java],
+                           m4_ifval($2, [[$1-$2.java]]),
                            m4_ifval($3, [[$1-$3.java]])))],
 [c++],
   [AT_BISON_CHECK([-o $1.cc $1.y])
    AT_LANG_COMPILE([$1],
-                     m4_join([ ],
-                             [$1.cc],
-                             m4_ifval($2, [[$1-$2.cc]]),
+                   m4_join([ ],
+                           [$1.cc],
+                           m4_ifval($2, [[$1-$2.cc]]),
                            m4_ifval($3, [[$1-$3.cc]])))],
 [c],
   [AT_BISON_CHECK([-o $1.c $1.y])
    AT_LANG_COMPILE([$1],
-                  m4_join([ ],
-                          [$1.c],
-                          m4_ifval($2, [[$1-$2.c]]),
+                   m4_join([ ],
+                           [$1.c],
+                           m4_ifval($2, [[$1-$2.c]]),
                            m4_ifval($3, [[$1-$3.c]])))])
 ])
 
@@ -959,7 +962,7 @@ yylex (void)
 
 m4_if(m4_index(m4_quote($3), [no-xml]), -1,
       [AT_BISON_CHECK],
-      [AT_BISON_CHECK_NO_XML])([[--report=all --defines -o input.c input.y]],
+      [AT_BISON_CHECK_NO_XML])([[-Wall --report=all --defines -o input.c input.y]],
                                [0], [], m4_dquote($7))
 
 m4_if(m4_index(m4_quote($3), [last-state]), -1,
@@ -979,8 +982,8 @@ $9
 # There is no "" around `wc` since some indent the result.
 m4_bmatch([$4], [%define lr.type canonical-lr],
 [if test 32767 -lt `wc -l < input.c`; then
-  CFLAGS=`echo " $CFLAGS " | sed -e 's/ -pedantic //'`
-  CXXFLAGS=`echo " $CXXFLAGS " | sed -e 's/ -pedantic //'`
+  CFLAGS=`echo " $CFLAGS " | sed -e 's/ -pedantic / /'`
+  CXXFLAGS=`echo " $CXXFLAGS " | sed -e 's/ -pedantic / /'`
 fi])
 AT_COMPILE([[input]])