Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/flex/dist/src Regen without #line directives
details: https://anonhg.NetBSD.org/src/rev/f2dea209e4fe
branches: trunk
changeset: 350192:f2dea209e4fe
user: christos <christos%NetBSD.org@localhost>
date: Sat Jan 07 15:43:27 2017 +0000
description:
Regen without #line directives
- nbyacc -l -d -o initparse.c parse.y
- nblex -L -t -p scan.l > initscan.c
diffstat:
external/bsd/flex/dist/src/initparse.c | 93 +------
external/bsd/flex/dist/src/initscan.c | 480 +++-----------------------------
2 files changed, 51 insertions(+), 522 deletions(-)
diffs (truncated from 2632 to 300 lines):
diff -r 0390e434781e -r f2dea209e4fe external/bsd/flex/dist/src/initparse.c
--- a/external/bsd/flex/dist/src/initparse.c Sat Jan 07 15:22:11 2017 +0000
+++ b/external/bsd/flex/dist/src/initparse.c Sat Jan 07 15:43:27 2017 +0000
@@ -19,7 +19,6 @@
#define YYPURE 0
-#line 37 "/usr/src/external/bsd/flex/dist/src/parse.y"
/* Copyright (c) 1990 The Regents of the University of California. */
/* All rights reserved. */
@@ -51,7 +50,7 @@
/* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
/* PURPOSE. */
#include "flexdef.h"
-__RCSID("$NetBSD: initparse.c,v 1.3 2017/01/02 17:45:27 christos Exp $");
+__RCSID("$NetBSD: initparse.c,v 1.4 2017/01/07 15:43:27 christos Exp $");
#include "tables.h"
@@ -101,7 +100,6 @@
*/
#define YYSTYPE int
-#line 105 "parse.c"
#if ! defined(YYSTYPE) && ! defined(YYSTYPE_IS_DECLARED)
/* Default: YYSTYPE is the semantic value type. */
@@ -606,7 +604,6 @@
} YYSTACKDATA;
/* variables for the parser stack */
static YYSTACKDATA yystack;
-#line 953 "/usr/src/external/bsd/flex/dist/src/parse.y"
/* build_eof_action - build the "<<EOF>>" action for the active start
@@ -740,7 +737,6 @@
{
(void)msg;
}
-#line 744 "parse.c"
#if YYDEBUG
#include <stdio.h> /* needed for printf */
@@ -943,7 +939,6 @@
switch (yyn)
{
case 1:
-#line 122 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ /* add default rule */
int def_rule;
@@ -972,7 +967,6 @@
}
break;
case 2:
-#line 151 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ /* initialize for processing rules */
/* Create default DFA start condition. */
@@ -980,11 +974,9 @@
}
break;
case 6:
-#line 162 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ synerr( _("unknown error processing section 1") ); }
break;
case 7:
-#line 166 "/usr/src/external/bsd/flex/dist/src/parse.y"
{
check_options();
scon_stk = allocate_integer_array( lastsc + 1 );
@@ -992,64 +984,50 @@
}
break;
case 8:
-#line 174 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ xcluflg = false; }
break;
case 9:
-#line 177 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ xcluflg = true; }
break;
case 10:
-#line 181 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ scinstal( nmstr, xcluflg ); }
break;
case 11:
-#line 184 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ scinstal( nmstr, xcluflg ); }
break;
case 12:
-#line 187 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ synerr( _("bad start condition list") ); }
break;
case 16:
-#line 198 "/usr/src/external/bsd/flex/dist/src/parse.y"
{
outfilename = xstrdup(nmstr);
did_outfilename = 1;
}
break;
case 17:
-#line 203 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ extra_type = xstrdup(nmstr); }
break;
case 18:
-#line 205 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ prefix = xstrdup(nmstr);
if (strchr(prefix, '[') || strchr(prefix, ']'))
flexerror(_("Prefix must not contain [ or ]")); }
break;
case 19:
-#line 209 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ yyclass = xstrdup(nmstr); }
break;
case 20:
-#line 211 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ headerfilename = xstrdup(nmstr); }
break;
case 21:
-#line 213 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ tablesext = true; tablesfilename = xstrdup(nmstr); }
break;
case 22:
-#line 217 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ scon_stk_ptr = yystack.l_mark[-3]; }
break;
case 23:
-#line 219 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ scon_stk_ptr = yystack.l_mark[-3]; }
break;
case 25:
-#line 224 "/usr/src/external/bsd/flex/dist/src/parse.y"
{
/* Initialize for a parse of one rule. */
trlcontxt = variable_trail_rule = varlength = false;
@@ -1062,7 +1040,6 @@
}
break;
case 26:
-#line 237 "/usr/src/external/bsd/flex/dist/src/parse.y"
{
pat = yystack.l_mark[0];
finish_rule( pat, variable_trail_rule,
@@ -1099,7 +1076,6 @@
}
break;
case 27:
-#line 273 "/usr/src/external/bsd/flex/dist/src/parse.y"
{
pat = yystack.l_mark[0];
finish_rule( pat, variable_trail_rule,
@@ -1124,7 +1100,6 @@
}
break;
case 28:
-#line 297 "/usr/src/external/bsd/flex/dist/src/parse.y"
{
if ( scon_stk_ptr > 0 )
build_eof_action();
@@ -1148,19 +1123,15 @@
}
break;
case 29:
-#line 320 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ synerr( _("unrecognized rule") ); }
break;
case 30:
-#line 324 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ yyval = scon_stk_ptr; }
break;
case 31:
-#line 328 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ yyval = yystack.l_mark[-2]; }
break;
case 32:
-#line 331 "/usr/src/external/bsd/flex/dist/src/parse.y"
{
yyval = scon_stk_ptr;
@@ -1178,15 +1149,12 @@
}
break;
case 33:
-#line 348 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ yyval = scon_stk_ptr; }
break;
case 36:
-#line 356 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ synerr( _("bad start condition list") ); }
break;
case 37:
-#line 360 "/usr/src/external/bsd/flex/dist/src/parse.y"
{
if ( (scnum = sclookup( nmstr )) == 0 )
format_pinpoint_message(
@@ -1209,7 +1177,6 @@
}
break;
case 38:
-#line 383 "/usr/src/external/bsd/flex/dist/src/parse.y"
{
if ( transchar[lastst[yystack.l_mark[0]]] != SYM_EPSILON )
/* Provide final transition \now/ so it
@@ -1266,11 +1233,9 @@
}
break;
case 39:
-#line 439 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ synerr( _("trailing context used twice") ); }
break;
case 40:
-#line 442 "/usr/src/external/bsd/flex/dist/src/parse.y"
{
headcnt = 0;
trailcnt = 1;
@@ -1314,7 +1279,6 @@
}
break;
case 41:
-#line 485 "/usr/src/external/bsd/flex/dist/src/parse.y"
{
yyval = yystack.l_mark[0];
@@ -1331,18 +1295,15 @@
}
break;
case 42:
-#line 503 "/usr/src/external/bsd/flex/dist/src/parse.y"
{
varlength = true;
yyval = mkor( yystack.l_mark[-2], yystack.l_mark[0] );
}
break;
case 43:
-#line 509 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ yyval = yystack.l_mark[0]; }
break;
case 44:
-#line 514 "/usr/src/external/bsd/flex/dist/src/parse.y"
{
/* This rule is written separately so the
* reduction will occur before the trailing
@@ -1369,7 +1330,6 @@
}
break;
case 45:
-#line 541 "/usr/src/external/bsd/flex/dist/src/parse.y"
{
/* This is where concatenation of adjacent patterns
* gets done.
@@ -1378,11 +1338,9 @@
}
break;
case 46:
-#line 549 "/usr/src/external/bsd/flex/dist/src/parse.y"
{ yyval = yystack.l_mark[0]; }
break;
case 47:
-#line 552 "/usr/src/external/bsd/flex/dist/src/parse.y"
{
varlength = true;
@@ -1411,7 +1369,6 @@
}
break;
case 48:
-#line 580 "/usr/src/external/bsd/flex/dist/src/parse.y"
{
varlength = true;
@@ -1426,7 +1383,6 @@
}
break;
case 49:
-#line 594 "/usr/src/external/bsd/flex/dist/src/parse.y"
{
/* The series could be something like "(foo)",
* in which case we have no idea what its length
@@ -1447,7 +1403,6 @@
}
break;
case 50:
-#line 616 "/usr/src/external/bsd/flex/dist/src/parse.y"
{
varlength = true;
@@ -1455,21 +1410,18 @@
}
break;
case 51:
-#line 623 "/usr/src/external/bsd/flex/dist/src/parse.y"
{
varlength = true;
yyval = mkposcl( yystack.l_mark[-1] );
}
break;
case 52:
-#line 629 "/usr/src/external/bsd/flex/dist/src/parse.y"
Home |
Main Index |
Thread Index |
Old Index