[bugfix] makeing a shared library failure under the version 3 of bison

This commit is contained in:
Yuichi Nishiwaki 2013-11-18 20:47:20 +09:00
parent ed0b02ecfa
commit e49ddbd13b
3 changed files with 16 additions and 14 deletions

14
include/picrin/parse.h Normal file
View File

@ -0,0 +1,14 @@
#ifndef PARSE_H__
#define PARSE_H__
struct parser_control {
pic_state *pic;
void *yyscanner;
pic_value value;
bool incomp;
int yynerrs;
struct pic_vector *yy_arena;
int yy_arena_idx;
};
#endif

View File

@ -6,6 +6,7 @@
#include "picrin.h" #include "picrin.h"
#include "picrin/pair.h" #include "picrin/pair.h"
#include "picrin/blob.h" #include "picrin/blob.h"
#include "picrin/parse.h"
#define YYERROR_VERBOSE 1 #define YYERROR_VERBOSE 1
@ -17,16 +18,6 @@ void yyset_in();
void yy_scan_string(); void yy_scan_string();
void yylex_destroy(); void yylex_destroy();
struct parser_control {
pic_state *pic;
void *yyscanner;
pic_value value;
bool incomp;
int yynerrs;
struct pic_vector *yy_arena;
int yy_arena_idx;
};
#define YY_ARENA_SIZE 50 #define YY_ARENA_SIZE 50
struct parser_control * struct parser_control *

View File

@ -3,10 +3,7 @@
#include <string.h> #include <string.h>
#include "picrin.h" #include "picrin.h"
#include "picrin/parse.h"
/* Guts! bison3 seems emit prototype declaration of yyparse in y.tab.h... */
struct parser_control;
#include "y.tab.h" #include "y.tab.h"
#define YY_DECL int yylex_(YYSTYPE *yylvalp, yyscan_t yyscanner) #define YY_DECL int yylex_(YYSTYPE *yylvalp, yyscan_t yyscanner)