From f53ca4f1c0ea08b8adea5422ff619d9e25679db5 Mon Sep 17 00:00:00 2001 From: Nick Downing Date: Sat, 19 Jan 2019 23:53:22 +1100 Subject: [PATCH] Minor consistency changes for latest pilex.git/bootstrap Python scanner --- .gitignore | 64 +++++++++++++++++++++++++++--------------------------- src/main.c | 4 ++-- src/scan.c | 4 ++-- src/scan.l | 4 ++-- 4 files changed, 38 insertions(+), 38 deletions(-) diff --git a/.gitignore b/.gitignore index 4897b84..0900334 100644 --- a/.gitignore +++ b/.gitignore @@ -2,35 +2,35 @@ *.la *.lo *.o -Makefile -autom4te.cache/ -config.log -config.status -doc/Makefile -doc/flex.taxi -examples/Makefile -examples/fastwc/Makefile -examples/manual/Makefile -lib/.deps/ -libtool -po/Makefile -po/Makefile.in -po/POTFILES -src/.deps/ -src/.libs/ -src/Makefile -src/Makefile.orig -src/config.h -src/config.h.in~ -src/flex -src/parse.c.orig -src/parse.y.xml -src/scan.c.orig -src/scan.l.xml -src/stage1flex -src/stage1scan.c -src/stage1scan.c.orig -src/stamp-h1 -tests/.deps/ -tests/Makefile -tools/Makefile +/Makefile +/autom4te.cache/ +/config.log +/config.status +/doc/Makefile +/doc/flex.taxi +/examples/Makefile +/examples/fastwc/Makefile +/examples/manual/Makefile +/lib/.deps/ +/libtool +/po/Makefile +/po/Makefile.in +/po/POTFILES +/src/.deps/ +/src/.libs/ +/src/Makefile +/src/Makefile.orig +/src/config.h +/src/config.h.in~ +/src/flex +/src/parse.c.orig +/src/parse.y.xml +/src/scan.c.orig +/src/scan.l.xml +/src/stage1flex +/src/stage1scan.c +/src/stage1scan.c.orig +/src/stamp-h1 +/tests/.deps/ +/tests/Makefile +/tools/Makefile diff --git a/src/main.c b/src/main.c index 18db943..0f889fc 100644 --- a/src/main.c +++ b/src/main.c @@ -169,7 +169,7 @@ int flex_main (int argc, char *argv[]) #if 1 void piece_append(const char *str); - piece_append(""); + piece_append("\n "); #endif readin (); @@ -191,7 +191,7 @@ int flex_main (int argc, char *argv[]) make_tables (); #if 1 /* at this point flexscan() has been called to copy section 3 to the output */ - piece_append("\n"); + piece_append("\n\n"); extern char *piece[]; extern int piece1; diff --git a/src/scan.c b/src/scan.c index 3b2b24d..eee8b15 100644 --- a/src/scan.c +++ b/src/scan.c @@ -3905,13 +3905,13 @@ YY_RULE_SETUP BEGIN(SECT2); #if 1 /* here we know yytext is not used by parser, so OK to destroy it */ - piece_flush(1); piece_pack(); + piece_flush(1); piece_append(""); piece_flush(strlen(yytext) - 1); piece_append(""); - piece_pack(); piece_flush(1); + piece_pack(); return ~NAME; #else return NAME; diff --git a/src/scan.l b/src/scan.l index c954c15..752c6b3 100644 --- a/src/scan.l +++ b/src/scan.l @@ -957,13 +957,13 @@ nmstr[yyleng - 2 - end_is_ws] = '\0'; /* chop trailing brace */ BEGIN(SECT2); #if 1 /* here we know yytext is not used by parser, so OK to destroy it */ - piece_flush(1); piece_pack(); + piece_flush(1); piece_append(""); piece_flush(strlen(yytext) - 1); piece_append(""); - piece_pack(); piece_flush(1); + piece_pack(); return ~NAME; #else return NAME; -- 2.34.1