* src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.

Adjust all callers.
(scanner_last_string_free): New.
This commit is contained in:
Akim Demaille
2002-06-11 21:45:49 +00:00
parent 44995b2e39
commit 4cdb01db9b
7 changed files with 858 additions and 1010 deletions

View File

@@ -24,7 +24,7 @@
%defines
%locations
%pure-parser
%error-verbose
// %error-verbose
%defines
%name-prefix="gram_"
@@ -38,6 +38,8 @@
#include "reader.h"
#include "conflicts.h"
#define YYERROR_VERBOSE 1
/* Pass the control structure to YYPARSE and YYLEX. */
#define YYPARSE_PARAM gram_control
#define YYLEX_PARAM gram_control
@@ -120,7 +122,8 @@ int current_prec = 0;
%token PROLOGUE EPILOGUE
%token BRACED_CODE
%type <string> CHARACTER TYPE BRACED_CODE PROLOGUE EPILOGUE epilogue.opt action STRING string_content
%type <string> CHARACTER TYPE STRING string_content
BRACED_CODE PROLOGUE EPILOGUE epilogue.opt action
%type <integer> INT
%type <symbol> ID symbol string_as_id
%type <assoc> precedence_directive
@@ -140,7 +143,10 @@ directives:
directive:
grammar_directives
| PROLOGUE { prologue_augment ($1, @1.first_line); }
| PROLOGUE
{
prologue_augment ($1, @1.first_line);
}
| "%debug" { debug_flag = 1; }
| "%define" string_content string_content { muscle_insert ($2, $3); }
| "%defines" { defines_flag = 1; }