return 92
end
- init(loc: Location)
+ init init_tk(loc: Location)
do
_text = ""
_location = loc
init init_error(message: String, loc: Location)
do
- init(loc)
+ init_tk(loc)
_message = message
end
end
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
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
end
class EOF
super Token
-private init noinit do end
redef fun to_s
do
return "end of file"
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
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
$ 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
return ${tokens/eof/@parser_index}
end
- init(loc: Location)
+ init init_tk(loc: Location)
do
_text = ""
_location = loc
init init_error(message: String, loc: Location)
do
- init(loc)
+ init_tk(loc)
_message = message
end
end