X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/ef7ddeddaaafb6b648ff04c8126cc94f8ea458b6..dc2825ae898c526ea3619450112b2ea44f437151:/src/bison.simple?ds=inline diff --git a/src/bison.simple b/src/bison.simple index 0117220a..e2b5d6fb 100644 --- a/src/bison.simple +++ b/src/bison.simple @@ -78,10 +78,6 @@ # define YYSTACK_ALLOC malloc #endif -/* Note: there must be only one dollar sign in this file. - It is replaced by the list of actions, each action - as one case of the switch. */ - #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY -2 @@ -583,7 +579,7 @@ yyreduce: yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `{dollar}{dollar} = {dollar}1'. + `$$ = $1'. Otherwise, the following line sets YYVAL to the semantic value of the lookahead token. This behavior is undocumented and Bison @@ -615,7 +611,7 @@ yyreduce: fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif -$ /* The action file replaces this line marked with this dollarsign. */ +%% actions /* The action file replaces this line. */ #line yyvsp -= yylen; @@ -676,7 +672,7 @@ yyerrlab: count = 0; /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof (yytname) / sizeof (char *)); x++) + x < (int) (sizeof (yytname) / sizeof (char *)); x++) if (yycheck[x + yyn] == x) size += strlen (yytname[x]) + 15, count++; size += strlen ("parse error, unexpected `") + 1; @@ -692,7 +688,7 @@ yyerrlab: { count = 0; for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof (yytname) / sizeof (char *)); x++) + x < (int) (sizeof (yytname) / sizeof (char *)); x++) if (yycheck[x + yyn] == x) { strcat (msg, count == 0 ? ", expecting `" : " or `");