Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/byacc/dist regen
details: https://anonhg.NetBSD.org/src/rev/ffbcbf61c170
branches: trunk
changeset: 319145:ffbcbf61c170
user: christos <christos%NetBSD.org@localhost>
date: Sat May 19 01:53:24 2018 +0000
description:
regen
diffstat:
external/bsd/byacc/dist/btyaccpar.c | 42 +++++++++++++++++-------------------
external/bsd/byacc/dist/yaccpar.c | 6 +---
2 files changed, 22 insertions(+), 26 deletions(-)
diffs (133 lines):
diff -r d7bd20818c8e -r ffbcbf61c170 external/bsd/byacc/dist/btyaccpar.c
--- a/external/bsd/byacc/dist/btyaccpar.c Sat May 19 01:52:48 2018 +0000
+++ b/external/bsd/byacc/dist/btyaccpar.c Sat May 19 01:53:24 2018 +0000
@@ -1,10 +1,8 @@
-/* $NetBSD: btyaccpar.c,v 1.4 2017/06/05 18:54:30 christos Exp $ */
-
/* This file generated automatically using
- * @Id: skel2c,v 1.4 2016/06/07 00:26:09 tom Exp @
+ * Id: skel2c,v 1.4 2016/06/07 00:26:09 tom Exp
*/
-/* @Id: btyaccpar.skel,v 1.6 2017/04/30 23:40:34 tom Exp @ */
+/* Id: btyaccpar.skel,v 1.7 2017/05/01 00:13:19 tom Exp */
#include "defs.h"
@@ -109,17 +107,17 @@
"{ \\",
" if (n == 0) \\",
" { \\",
- " (loc).first_line = ((rhs)[-1]).last_line; \\",
- " (loc).first_column = ((rhs)[-1]).last_column; \\",
- " (loc).last_line = ((rhs)[-1]).last_line; \\",
- " (loc).last_column = ((rhs)[-1]).last_column; \\",
+ " (loc).first_line = YYRHSLOC(rhs, 0).last_line; \\",
+ " (loc).first_column = YYRHSLOC(rhs, 0).last_column; \\",
+ " (loc).last_line = YYRHSLOC(rhs, 0).last_line; \\",
+ " (loc).last_column = YYRHSLOC(rhs, 0).last_column; \\",
" } \\",
" else \\",
" { \\",
- " (loc).first_line = ((rhs)[ 0 ]).first_line; \\",
- " (loc).first_column = ((rhs)[ 0 ]).first_column; \\",
- " (loc).last_line = ((rhs)[n-1]).last_line; \\",
- " (loc).last_column = ((rhs)[n-1]).last_column; \\",
+ " (loc).first_line = YYRHSLOC(rhs, 1).first_line; \\",
+ " (loc).first_column = YYRHSLOC(rhs, 1).first_column; \\",
+ " (loc).last_line = YYRHSLOC(rhs, n).last_line; \\",
+ " (loc).last_column = YYRHSLOC(rhs, n).last_column; \\",
" } \\",
"} while (0)",
"#endif /* YYLLOC_DEFAULT */",
@@ -322,7 +320,7 @@
" newsize = YYMAXDEPTH;",
"",
" i = (int) (data->s_mark - data->s_base);",
- " newss = (YYINT *)realloc(data->s_base, newsize * sizeof(*newss));",
+ " newss = realloc(data->s_base, newsize * sizeof(*newss));",
" if (newss == 0)",
" return YYENOMEM;",
"",
@@ -387,13 +385,13 @@
"#endif",
" return p;",
" }",
- " p->yystack.s_base = (YYINT *) malloc(size * sizeof(YYINT));",
+ " p->yystack.s_base = malloc(size * sizeof(YYINT));",
" if (p->yystack.s_base == NULL) return NULL;",
- " p->yystack.l_base = (YYSTYPE *) malloc(size * sizeof(YYSTYPE));",
+ " p->yystack.l_base = malloc(size * sizeof(YYSTYPE));",
" if (p->yystack.l_base == NULL) return NULL;",
" memset(p->yystack.l_base, 0, size * sizeof(YYSTYPE));",
"#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
- " p->yystack.p_base = (YYLTYPE *) malloc(size * sizeof(YYLTYPE));",
+ " p->yystack.p_base = malloc(size * sizeof(YYLTYPE));",
" if (p->yystack.p_base == NULL) return NULL;",
" memset(p->yystack.p_base, 0, size * sizeof(YYLTYPE));",
"#endif",
@@ -438,7 +436,7 @@
"#endif /* YYBTYACC */",
#endif /* defined(YYBTYACC) */
"#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
- " YYLTYPE yyerror_loc_range[2]; /* position of error start & end */",
+ " YYLTYPE yyerror_loc_range[3]; /* position of error start&end (0 unused) */",
"#endif",
"#if YYDEBUG",
" const char *yys;",
@@ -860,7 +858,7 @@
"",
" YYERROR_CALL(\"syntax error\");",
"#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
- " yyerror_loc_range[0] = yylloc; /* lookahead position is error start position */",
+ " yyerror_loc_range[1] = yylloc; /* lookahead position is error start position */",
"#endif",
"",
"#if !YYBTYACC",
@@ -889,7 +887,7 @@
" *++yystack.l_mark = yylval;",
"#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
" /* lookahead position is error end position */",
- " yyerror_loc_range[1] = yylloc;",
+ " yyerror_loc_range[2] = yylloc;",
" YYLLOC_DEFAULT(yyloc, yyerror_loc_range, 2); /* position of error span */",
" *++yystack.p_mark = yyloc;",
"#endif",
@@ -905,7 +903,7 @@
" if (yystack.s_mark <= yystack.s_base) goto yyabort;",
"#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
" /* the current TOS position is the error start position */",
- " yyerror_loc_range[0] = *yystack.p_mark;",
+ " yyerror_loc_range[1] = *yystack.p_mark;",
"#endif",
"#if defined(YYDESTRUCT_CALL)",
#if defined(YYBTYACC)
@@ -999,10 +997,10 @@
"#endif /* YYBTYACC */",
#endif /* defined(YYBTYACC) */
" {",
- " YYLLOC_DEFAULT(yyloc, &yystack.p_mark[1-yym], yym);",
+ " YYLLOC_DEFAULT(yyloc, &yystack.p_mark[-yym], yym);",
" /* just in case YYERROR is invoked within the action, save",
" the start of the rhs as the error start position */",
- " yyerror_loc_range[0] = yystack.p_mark[1-yym];",
+ " yyerror_loc_range[1] = yystack.p_mark[1-yym];",
" }",
"#endif",
"",
diff -r d7bd20818c8e -r ffbcbf61c170 external/bsd/byacc/dist/yaccpar.c
--- a/external/bsd/byacc/dist/yaccpar.c Sat May 19 01:52:48 2018 +0000
+++ b/external/bsd/byacc/dist/yaccpar.c Sat May 19 01:53:24 2018 +0000
@@ -1,10 +1,8 @@
-/* $NetBSD: yaccpar.c,v 1.5 2017/06/05 18:54:30 christos Exp $ */
-
/* This file generated automatically using
- * @Id: skel2c,v 1.4 2016/06/07 00:26:09 tom Exp @
+ * Id: skel2c,v 1.4 2016/06/07 00:26:09 tom Exp
*/
-/* @Id: yaccpar.skel,v 1.8 2016/12/02 21:44:42 tom Exp @ */
+/* Id: yaccpar.skel,v 1.9 2017/04/30 23:28:17 tom Exp */
#include "defs.h"
Home |
Main Index |
Thread Index |
Old Index