FreeBSD Bugzilla – Attachment 5779 Details for
Bug 13562
export YYERRCODE to y.tab.h, add parameter support to yyparse
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.75 KB, created by
wghicks
on 1999-09-04 00:10:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
wghicks
Created:
1999-09-04 00:10:01 UTC
Size:
1.75 KB
patch
obsolete
>--- src/usr.bin/yacc/output.c.orig Sat Aug 28 01:08:01 1999 >+++ src/usr.bin/yacc/output.c Fri Sep 3 21:18:21 1999 >@@ -863,6 +863,15 @@ > register int c, i; > register char *s; > >+ ++outline; >+ fprintf(code_file, "#define YYERRCODE %d\n", symbol_value[1]); >+ >+ if(dflag) >+ { >+ fprintf(defines_file, "#ifndef YYERRCODE\n"); >+ fprintf(defines_file, "#define YYERRCODE %d\n", symbol_value[1]); >+ fprintf(defines_file, "#endif\n\n"); >+ } > for (i = 2; i < ntokens; ++i) > { > s = symbol_name[i]; >@@ -893,9 +902,6 @@ > if (dflag) fprintf(defines_file, " %d\n", symbol_value[i]); > } > } >- >- ++outline; >- fprintf(code_file, "#define YYERRCODE %d\n", symbol_value[1]); > > if (dflag && unionized) > { >--- src/usr.bin/yacc/skeleton.c.orig Sat Aug 28 01:08:03 1999 >+++ src/usr.bin/yacc/skeleton.c Fri Sep 3 22:42:40 1999 >@@ -67,10 +67,6 @@ > "#define yyclearin (yychar=(YYEMPTY))", > "#define yyerrok (yyerrflag=0)", > "#define YYRECOVERING() (yyerrflag!=0)", >-#if 0 >- "extern int yylex();", >- "extern int yyparse();", >-#endif > "static int yygrowstack();", > 0 > }; >@@ -163,12 +159,19 @@ > "#define YYACCEPT goto yyaccept", > "#define YYERROR goto yyerrlab", > "", >- "int", >- "#if defined(__cplusplus) || __STDC__", >- "yyparse(void)", >+ "#ifndef YYPARSE_PARAM", >+ "#define YYPARSE_PARAM", >+ "#define YYPARSE_PARAM_DECL", > "#else", >- "yyparse()", >+ "#ifndef YYPARSE_PARAM_TYPE", >+ "#define YYPARSE_PARAM_TYPE void *", >+ "#endif", >+ "#define YYPARSE_PARAM_DECL YYPARSE_PARAM_TYPE YYPARSE_PARAM;", > "#endif", >+ "", >+ "int", >+ "yyparse (YYPARSE_PARAM)", >+ " YYPARSE_PARAM_DECL", > "{", > " register int yym, yyn, yystate;", > "#if YYDEBUG",
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 13562
: 5779