X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/9bf32be3a065900ecb103ce1b5fbbd210f7ca5ea..7172e23e8ffb95b8cafee24c4f36c46ca709507f:/tests/calc.at diff --git a/tests/calc.at b/tests/calc.at index d245dd18..069ca54d 100644 --- a/tests/calc.at +++ b/tests/calc.at @@ -336,17 +336,7 @@ main (int argc, const char **argv) ]AT_SKEL_CC_IF([], [m4_bmatch([$4], [%debug], [ yydebug = 1;])])[ -]AT_PUSH_IF([ - { - struct yypstate *pstate = yypstate_new (); - YYSTYPE my_lval; - ]AT_LOCATION_IF([YYLTYPE my_lloc;])[ - do { - status = yypush_parse (pstate, yylex (&my_lval]AT_LOCATION_IF([[, &my_lloc]])[), &my_lval]AT_LOCATION_IF([[, &my_lloc]])[); - } while (status == YYPUSH_MORE); - yypstate_delete (pstate); - }],[ - status = yyparse (]AT_PARAM_IF([[&result, &count]])[);])[ + status = yyparse (]AT_PARAM_IF([[&result, &count]])[); fclose (input); if (global_result != result) abort (); @@ -572,7 +562,7 @@ AT_CHECK_CALC_LALR([%yacc]) AT_CHECK_CALC_LALR([%error-verbose]) AT_CHECK_CALC_LALR([%pure-parser %locations]) -AT_CHECK_CALC_LALR([%push-parser %locations %skeleton "push.c"]) +AT_CHECK_CALC_LALR([%push-pull-parser %pure-parser %locations %skeleton "push.c"]) AT_CHECK_CALC_LALR([%error-verbose %locations]) AT_CHECK_CALC_LALR([%error-verbose %locations %defines %name-prefix "calc" %verbose %yacc]) @@ -581,7 +571,7 @@ AT_CHECK_CALC_LALR([%debug]) AT_CHECK_CALC_LALR([%error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc]) AT_CHECK_CALC_LALR([%pure-parser %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc]) -AT_CHECK_CALC_LALR([%push-parser %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc %skeleton "push.c"]) +AT_CHECK_CALC_LALR([%push-pull-parser %pure-parser %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc %skeleton "push.c"]) AT_CHECK_CALC_LALR([%pure-parser %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count}]) @@ -628,12 +618,15 @@ AT_CHECK_CALC_GLR([%pure-parser %error-verbose %debug %locations %defines %name- AT_BANNER([[Simple LALR(1) C++ Calculator.]]) +# First let's try using %skeleton +AT_CHECK_CALC([%skeleton "lalr1.cc" %defines %locations]) + # AT_CHECK_CALC_LALR1_CC([BISON-OPTIONS]) # --------------------------------------- # Start a testing chunk which compiles `calc' grammar with # the C++ skeleton, and performs several tests over the parser. m4_define([AT_CHECK_CALC_LALR1_CC], -[AT_CHECK_CALC([%skeleton "lalr1.cc" %defines %locations] $@)]) +[AT_CHECK_CALC([%language "C++" %defines %locations] $@)]) AT_CHECK_CALC_LALR1_CC([]) AT_CHECK_CALC_LALR1_CC([%error-verbose %name-prefix "calc" %verbose %yacc]) @@ -652,12 +645,15 @@ AT_CHECK_CALC_LALR1_CC([%pure-parser %error-verbose %debug %name-prefix "calc" % AT_BANNER([[Simple GLR C++ Calculator.]]) +# Again, we try also using %skeleton. +AT_CHECK_CALC([%skeleton "glr.cc" %defines %locations]) + # AT_CHECK_CALC_GLR_CC([BISON-OPTIONS]) # ------------------------------------- # Start a testing chunk which compiles `calc' grammar with # the GLR C++ skeleton, and performs several tests over the parser. m4_define([AT_CHECK_CALC_GLR_CC], -[AT_CHECK_CALC([%skeleton "glr.cc" %defines %locations] $@)]) +[AT_CHECK_CALC([%language "C++" %glr-parser %defines %locations] $@)]) AT_CHECK_CALC_GLR_CC([]) AT_CHECK_CALC_GLR_CC([%error-verbose %name-prefix "calc" %verbose %yacc])