| Description: Use %parse-param to ensure that yyparse is generated |
| with the proper prototype. |
| |
| diff --git a/src/language.y b/src/language.y |
| index 1b6db52..d2c466f 100644 |
| --- a/src/language.y |
| +++ b/src/language.y |
| @@ -48,7 +48,7 @@ int yylex_destroy(void); |
| * Error handling function. The TOK_XXX names are substituted for more |
| * understandable values that make more sense to the user. |
| */ |
| -void yyerror(const char *str) |
| +void yyerror(void *unused, const char *str) |
| { |
| static const char *tokNames[] = { "TOK_OCBRACKET", "TOK_CCBRACKET", |
| "TOK_OSBRACKET", "TOK_CSBRACKET", |
| @@ -224,6 +224,8 @@ Msc MscParse(FILE *in) |
| |
| %} |
| |
| +%parse-param {void *YYPARSE_PARAM} |
| + |
| %token TOK_STRING TOK_QSTRING TOK_EQUAL TOK_COMMA TOK_SEMICOLON TOK_OCBRACKET TOK_CCBRACKET |
| TOK_OSBRACKET TOK_CSBRACKET TOK_MSC |
| TOK_ATTR_LABEL TOK_ATTR_URL TOK_ATTR_ID TOK_ATTR_IDURL |