* tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust

%printer calls to use cdebug_ when using lalr1.cc.
* data/lalr1.cc (b4_yysymprint_generate): New.
This commit is contained in:
Akim Demaille
2004-09-02 13:04:11 +00:00
parent 417141dd61
commit a5eb1ed262
3 changed files with 77 additions and 28 deletions

View File

@@ -342,8 +342,12 @@ m4_ifval([$6], , [#define YYSTYPE int])])
]m4_ifval([$6], [%type <ival> 'x' ';' thing line input])[
%printer { fprintf (yyoutput, "%d@%d-%d", $$, RANGE (@$)); }
input line thing 'x'
%printer
{
]AT_LALR1_CC_IF([cdebug_ << @$ << ": " << $$;],
[fprintf (yyoutput, "%d@%d-%d", $$, RANGE (@$))])[;
}
input line thing 'x'
%destructor
{ printf ("Freeing nterm input (%d@%d-%d)\n", $$, RANGE (@$)); }