]> granicus.if.org Git - re2c/commitdiff
- Fix a warning (no more need to pass around out stream)
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sat, 25 Feb 2006 12:41:41 +0000 (12:41 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sat, 25 Feb 2006 12:41:41 +0000 (12:41 +0000)
bootstrap/parser.cc
bootstrap/scanner.cc
parser.y
scanner.h
scanner.re

index b1c4e0041814c9c09d9baaed2ecfe1f63a63afab..9ceb1af33bbd7249753a9b8d3cd60369c8653b26 100644 (file)
@@ -1621,7 +1621,7 @@ void parse(Scanner& i, std::ostream& o)
        o << " */\n";
        o << sourceFileInfo;
        
-       while(i.echo(o))
+       while(i.echo())
        {
                yyparse();
                if(spec)
index 27fbefb974da9880e7e62facbc28c1cd5498256d..9759502b9953119e28f3d59e3b216a959121c13d 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.10.0.rc1 on Wed Feb  1 00:27:14 2006 */
+/* Generated by re2c 0.10.1.dev on Sat Feb 25 13:38:57 2006 */
 #line 1 "scanner.re"
 /* $Id$ */
 #include <stdlib.h>
@@ -79,12 +79,12 @@ char *Scanner::fill(char *cursor)
 #line 95 "scanner.re"
 
 
-int Scanner::echo(std::ostream &out){
+int Scanner::echo()
+{
     char *cursor = cur;
     bool ignore_eoc = false;
 
-    // Catch EOF
-    if (eof && cursor == eof)
+    if (eof && cursor == eof) // Catch EOF
        {
        return 0;
        }
index c9d3109b022abaced040accba25cd7e38df53fb1..8df671bf756001aa5bc1ba804489b6b2a72bf43f 100644 (file)
--- a/parser.y
+++ b/parser.y
@@ -195,7 +195,7 @@ void parse(Scanner& i, std::ostream& o)
        o << " */\n";
        o << sourceFileInfo;
        
-       while(i.echo(o))
+       while(i.echo())
        {
                yyparse();
                if(spec)
index ce09f4b9010e60ec16971749ad997b472dc21b9e..5644eb7fcaf899277f0a04e5be5a433424b9e430 100644 (file)
--- a/scanner.h
+++ b/scanner.h
@@ -27,7 +27,7 @@ private:
 
 public:
        Scanner(std::istream&, std::ostream&);
-       int echo(std::ostream&);
+       int echo();
        int scan();
        
        void fatal(const char*) const;
index bbc9380356972fa64bbac3f002ff300cb4b76d74..aaf376ae6925776473c1be245fb0b919cfba9fba 100644 (file)
@@ -94,12 +94,12 @@ config  = "re2c" cname+;
 value   = [^\r\n; \t]* | dstring | sstring;
 */
 
-int Scanner::echo(std::ostream &out){
+int Scanner::echo()
+{
     char *cursor = cur;
     bool ignore_eoc = false;
 
-    // Catch EOF
-    if (eof && cursor == eof)
+    if (eof && cursor == eof) // Catch EOF
        {
        return 0;
        }