parser: suppr `noinit`
authorJean Privat <jean@pryen.org>
Tue, 23 Jul 2013 17:35:10 +0000 (13:35 -0400)
committerJean Privat <jean@pryen.org>
Tue, 23 Jul 2013 17:35:10 +0000 (13:35 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/parser/lexer.nit
src/parser/parser_abs.nit
src/parser/parser_nodes.nit
src/parser/xss/lexer.xss
src/parser/xss/tokens.xss

index 4867685..c3e96b1 100644 (file)
@@ -1131,7 +1131,7 @@ redef class EOF
        return 92
     end
 
-    init(loc: Location)
+    init init_tk(loc: Location)
     do
         _text = ""
                _location = loc
@@ -1143,7 +1143,7 @@ redef class AError
 
     init init_error(message: String, loc: Location)
     do
-               init(loc)
+               init_tk(loc)
                _message = message
     end
 end
@@ -1605,7 +1605,7 @@ class Lexer
                                                var token = new ALexerError.init_lexer_error("Syntax error: unknown token {text}.", location, text)
                                                return token
                                        else
-                                               var token = new EOF(location)
+                                               var token = new EOF.init_tk(location)
                                                return token
                                        end
                                end
index 8c41b98..77f9f1d 100644 (file)
@@ -301,19 +301,15 @@ class TExternCodeSegment
 end
 class EOF
        super Token
-private init noinit do end
 end
 class AError
        super EOF
-private init noinit do end
 end
 class ALexerError
        super AError
-private init noinit do end
 end
 class AParserError
        super AError
-private init noinit do end
 end
 
 class AModule super Prod end
index 7f6b6b2..115c836 100644 (file)
@@ -376,7 +376,6 @@ class TExternCodeSegment
 end
 class EOF
        super Token
-private init noinit do end
        redef fun to_s
        do
                return "end of file"
@@ -384,15 +383,12 @@ private init noinit do end
 end
 class AError
        super EOF
-private init noinit do end
 end
 class ALexerError
        super AError
-private init noinit do end
 end
 class AParserError
        super AError
-private init noinit do end
 end
 
 class AModule
index 577c592..e8961ca 100644 (file)
@@ -194,7 +194,7 @@ $ end foreach
                                                var token = new PLexerError.init_lexer_error("Syntax error: unknown token {text}.", location, text)
                                                return token
                                        else
-                                               var token = new EOF(location)
+                                               var token = new EOF.init_tk(location)
                                                return token
                                        end
                                end
index e1a4e33..daf63b9 100644 (file)
@@ -25,19 +25,15 @@ $ end
 $ end
 class EOF
        super Token
-private init noinit do end
 end
 class PError
        super EOF
-private init noinit do end
 end
 class PLexerError
        super PError
-private init noinit do end
 end
 class PParserError
        super PError
-private init noinit do end
 end
 $ end template
 
@@ -81,7 +77,7 @@ redef class EOF
        return ${tokens/eof/@parser_index}
     end
 
-    init(loc: Location)
+    init init_tk(loc: Location)
     do
         _text = ""
                _location = loc
@@ -93,7 +89,7 @@ redef class PError
 
     init init_error(message: String, loc: Location)
     do
-               init(loc)
+               init_tk(loc)
                _message = message
     end
 end