[bugfix] makeing a shared library failure under the version 3 of bison
This commit is contained in:
parent
ed0b02ecfa
commit
e49ddbd13b
|
@ -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
|
11
src/parse.y
11
src/parse.y
|
@ -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 *
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue