From: helly Date: Wed, 28 Dec 2005 16:54:56 +0000 (+0000) Subject: - WS X-Git-Tag: 0.13.6~570 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=249c4221f39d3091f6c327667ad81fc06c9b8d22;p=re2c - WS --- diff --git a/bootstrap/parser.cc b/bootstrap/parser.cc index 3cc6834e..357e6dd8 100644 --- a/bootstrap/parser.cc +++ b/bootstrap/parser.cc @@ -1616,22 +1616,25 @@ void line_source(unsigned int line, std::ostream& o) void parse(std::istream& i, std::ostream &o){ - o << "/* Generated by re2c " PACKAGE_VERSION " on "; - time_t now = time(&now); - o.write(ctime(&now), 24); - o << " */\n"; - oline += 2; - - in = new Scanner(i); - - line_source(in->line(), o); - - while(in->echo(o)){ - yyparse(); - if(spec) - genCode(o, spec); + o << "/* Generated by re2c " PACKAGE_VERSION " on "; + time_t now = time(&now); + o.write(ctime(&now), 24); + o << " */\n"; + oline += 2; + + in = new Scanner(i); + line_source(in->line(), o); - } + + while(in->echo(o)) + { + yyparse(); + if(spec) + { + genCode(o, spec); + } + line_source(in->line(), o); + } } } // end namespace re2c diff --git a/parser.y b/parser.y index ce7a4b6b..6d420a31 100644 --- a/parser.y +++ b/parser.y @@ -202,22 +202,25 @@ void line_source(unsigned int line, std::ostream& o) void parse(std::istream& i, std::ostream &o){ - o << "/* Generated by re2c " PACKAGE_VERSION " on "; - time_t now = time(&now); - o.write(ctime(&now), 24); - o << " */\n"; - oline += 2; - - in = new Scanner(i); - - line_source(in->line(), o); - - while(in->echo(o)){ - yyparse(); - if(spec) - genCode(o, spec); + o << "/* Generated by re2c " PACKAGE_VERSION " on "; + time_t now = time(&now); + o.write(ctime(&now), 24); + o << " */\n"; + oline += 2; + + in = new Scanner(i); + line_source(in->line(), o); - } + + while(in->echo(o)) + { + yyparse(); + if(spec) + { + genCode(o, spec); + } + line_source(in->line(), o); + } } } // end namespace re2c