Module Name:    src
Committed By:   christos
Date:           Sat May 19 01:53:24 UTC 2018

Modified Files:
        src/external/bsd/byacc/dist: btyaccpar.c yaccpar.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/byacc/dist/btyaccpar.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/byacc/dist/yaccpar.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/byacc/dist/btyaccpar.c
diff -u src/external/bsd/byacc/dist/btyaccpar.c:1.4 src/external/bsd/byacc/dist/btyaccpar.c:1.5
--- src/external/bsd/byacc/dist/btyaccpar.c:1.4	Mon Jun  5 14:54:30 2017
+++ src/external/bsd/byacc/dist/btyaccpar.c	Fri May 18 21:53:24 2018
@@ -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 @@ const char *const hdr_defs[] =
     "{ \\",
     "    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 @@ const char *const body_1[] =
     "        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 @@ const char *const body_1[] =
     "#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 @@ const char *const body_2[] =
     "#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 @@ const char *const body_3[] =
     "",
     "    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 @@ const char *const body_3[] =
     "                *++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 @@ const char *const body_3[] =
     "                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 @@ const char *const body_3[] =
     "#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",
     "",

Index: src/external/bsd/byacc/dist/yaccpar.c
diff -u src/external/bsd/byacc/dist/yaccpar.c:1.5 src/external/bsd/byacc/dist/yaccpar.c:1.6
--- src/external/bsd/byacc/dist/yaccpar.c:1.5	Mon Jun  5 14:54:30 2017
+++ src/external/bsd/byacc/dist/yaccpar.c	Fri May 18 21:53:24 2018
@@ -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"
 

Reply via email to