]> granicus.if.org Git - re2c/commitdiff
- Added new option --no-generation-date.
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Wed, 21 Mar 2007 22:25:45 +0000 (22:25 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Wed, 21 Mar 2007 22:25:45 +0000 (22:25 +0000)
re2c/CHANGELOG
re2c/bootstrap/parser.cc
re2c/globals.h
re2c/htdocs/index.html
re2c/htdocs/manual.html
re2c/main.cc
re2c/parser.y
re2c/re2c.1.in

index 078c13f931193858dd2a4ceae3055b1016d4917b..30fbdf4a249ca3ae331a5faf9787b703ece32719 100644 (file)
@@ -1,5 +1,7 @@
-Version 0.11.3 (????-??-??)
+Version 0.11.3 (2007-??-??)
 ---------------------------
+- Added new option --no-generation-date.
+- Fixed issue with long form of switches.
 
 Version 0.11.2 (2007-03-01)
 ---------------------------
index 6ae84b3f72c8c26998cdfae1a628ce4997d15480..fbf03cbee144c465b7cdda48ebfddd20e78d170f 100644 (file)
@@ -1620,9 +1620,13 @@ void parse(Scanner& i, std::ostream& o)
 {
        in = &i;
 
-       o << "/* Generated by re2c " PACKAGE_VERSION " on ";
-       time_t now = time(&now);
-       o.write(ctime(&now), 24);
+       o << "/* Generated by re2c " PACKAGE_VERSION;
+       if (!bNoGenerationDate)
+       {
+               o << " on ";
+               time_t now = time(&now);
+               o.write(ctime(&now), 24);
+       }
        o << " */\n";
        o << sourceFileInfo;
        
index d38dffffca51e02eccfc68d7f52187df4d8a7016..e1ca8021430c6579aeb6a1dfe89d2633e2e1ca05 100644 (file)
@@ -25,6 +25,8 @@ extern bool sFlag;
 extern bool uFlag;
 extern bool wFlag;
 
+extern bool bNoGenerationDate;
+
 extern bool bSinglePass;
 extern bool bFirstPass;
 extern bool bLastPass;
index 07f610be88f00a8b0507014bd94465540dd5c5fa..3c35eddcf586501df54d1edbd508449a252f8bdd 100755 (executable)
@@ -79,6 +79,11 @@ fixes which were incorporated. <a href=
 </ul>
 <hr />
 <h1>Changelog</h1>
+<h2>2007-??-??: 0.11.3</h2>
+<ul>
+<li>Added new option --no-generation-date.</li>
+<li>Fixed issue with long form of switches.</li>
+</ul>
 <h2>2007-03-01: 0.11.2</h2>
 <ul>
 <li>Added inplace configuration 're2c:yyfill:parameter'.</li>
index 4cdc7f39cb57681884b12e5225688cb5a4885c81..b240847f6e278ff94277ca9056195fab5eaad035 100755 (executable)
@@ -7,7 +7,7 @@
 <body>
 <h1>RE2C</h1>
 Section: User Commands (1)<br />
-Updated: 20 Feb 2007<br />
+Updated: 21 Mar 2007<br />
 <a href="#index">Index</a>
 <hr />
 <a name="lbAB" id="lbAB">&nbsp;</a>
@@ -98,6 +98,9 @@ parser issues and states. If you use this switch you need to define a macro
 <i>YYDEBUG</i> that is called like a function with two parameters: <i>void
 YYDEBUG(int state, char current)</i>. The first parameter receives the state or
 -1 and the second parameter receives the input at the current cursor.<br /><br /></dd>
+<dt><b>--no-generation-date</b></dt>
+<dd>Suppress date output in the generated output so that it only shows the re2c
+version.</dd>
 <dt><b>-e</b></dt>
 <dd>Cross-compile from an ASCII platform to an EBCDIC one.<br /><br /></dd>
 <dt><b>-f</b></dt>
@@ -513,6 +516,6 @@ specification for each start condition (as illustrated in the above example).
 <br />
 <hr />
 <p>This document was created by man2html, using the manual pages.<br />
-Time: 00:00:00 GMT, February 20, 2007</p>
+Time: 00:00:00 GMT, March 21, 2007</p>
 </body>
 </html>
index a425fb0f2a2fb840577176a64d5874d8d5e29eaa..b8ac2fd33ade653138c44689a5b97f0d4ac4c63f 100644 (file)
@@ -31,6 +31,8 @@ bool sFlag = false;
 bool uFlag = false;
 bool wFlag = false;
 
+bool bNoGenerationDate = false;
+
 bool bSinglePass = false;
 bool bFirstPass  = true;
 bool bLastPass   = false;
@@ -89,6 +91,7 @@ static const mbo_opt_struct OPTIONS[] =
        mbo_opt_struct('V', 0, "vernum"),
        mbo_opt_struct('w', 0, "wide-chars"),      
        mbo_opt_struct('1', 0, "single-pass"),
+       mbo_opt_struct(10,  0, "no-generation-date"),
        mbo_opt_struct('-', 0, NULL) /* end of args */
 };
 
@@ -134,6 +137,9 @@ static void usage()
        "-1     --single-pass    Force single pass generation, this cannot be combined\n"
        "                        with -f and disables YYMAXFILL generation prior to last\n"
        "                        re2c block.\n"
+       "\n"
+       "--no-generation-date    Suppress date output in the generated output so that it\n"
+       "                        only shows the re2c version.\n"
        ;
 }
 
@@ -252,6 +258,10 @@ int main(int argc, char *argv[])
                        default:
                        usage();
                        return 2;
+
+                       case 10:
+                       bNoGenerationDate = true;
+                       break;
                }
        }
 
index 7edf2a386cb65df6eb5ed390184e4f4e22bc9b96..2e6f990e8e221e4f6d268ab6d538b4ebe49d193a 100644 (file)
@@ -193,9 +193,13 @@ void parse(Scanner& i, std::ostream& o)
 {
        in = &i;
 
-       o << "/* Generated by re2c " PACKAGE_VERSION " on ";
-       time_t now = time(&now);
-       o.write(ctime(&now), 24);
+       o << "/* Generated by re2c " PACKAGE_VERSION;
+       if (!bNoGenerationDate)
+       {
+               o << " on ";
+               time_t now = time(&now);
+               o.write(ctime(&now), 24);
+       }
        o << " */\n";
        o << sourceFileInfo;
        
index 748b4189d7151a269f28b12ea77b610bcf943deb..edc68e067561e8dbcb1de8783683734cdfd01828 100644 (file)
@@ -150,6 +150,10 @@ cannot be used together with \fB-e\fP switch.
 \fB-1\fP
 Force single pass generation, this cannot be combined with -f and disables 
 YYMAXFILL generation prior to last \*(re block.
+.TP
+\fb--no-generation-date\fP
+Suppress date output in the generated output so that it only shows the re2c
+version.
 .SH "INTERFACE CODE"
 Unlike other scanner generators, \*(re does not generate complete scanners:
 the user must supply some interface code.