Skip to content

Commit

Permalink
fix building-issues on linux
Browse files Browse the repository at this point in the history
* Passing `struct statement_t *` to yy_parse() will cause compiler error.
* Rename gemfile.
  • Loading branch information
sinkinben committed Mar 9, 2022
1 parent 79d82eb commit 812aee1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions sql-parser/sqlparser.y
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

extern int yyparse();
extern int yylex();
void yyerror(const char *);

schema_node_t *schema_list; // create table tbl (`schema_list`)
schema_node_t *select_list; // select `select_list` from tbl
Expand All @@ -18,7 +17,7 @@ condition_t *condition_tree; // select `select_list` from tbl where `condition_

int yywrap() { return 1; }

void yyerror(const char *msg) { fprintf(stderr, "[tinydb] SQL Parser: %s\n", msg); }
void yyerror(void *parm, const char *msg) { fprintf(stderr, "[tinydb] SQL Parser: %s\n", msg); }

#define YYPARSE_PARAM parm

Expand Down Expand Up @@ -68,6 +67,7 @@ void yyerror(const char *msg) { fprintf(stderr, "[tinydb] SQL Parser: %s\n", msg
%type <condition_tree> conditionfactor
%type <condition_tree> conditions

%parse-param {void *parm}

%%

Expand Down

0 comments on commit 812aee1

Please sign in to comment.