MINGW-packages/mingw-w64-mscgen/0.20-language.patch
J. Peter Mugaas 7ec84fb214 mingw-w64-mscgen - 0.20 - complete with Cygwin patches - MSCGEN Messa… (#3590)
* mingw-w64-mscgen - 0.20 - complete with Cygwin patches - MSCGEN Message Sequence Chart Generator
mingw-w64-ttf-dejavu - 2.37 - ttf-dejavu fonts for MSCGEN and probably some other stuff

* Remove the provides line.
2018-04-12 14:07:46 +03:00

26 lines
927 B
Diff

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