parser: regenerate with safe call `x?.foo`
[nit.git] / src / parser / lexer.nit
index 8726fab..efad425 100644 (file)
@@ -1,29 +1,19 @@
 # Lexer and its tokens.
 # This file was generated by SableCC (http://www.sablecc.org/).
-package lexer
+module lexer is generated, no_warning("missing-doc")
 
 intrude import parser_nodes
+intrude import lexer_work
 private import tables
 
-redef class Token
-    readable var _text: String
-
-    fun parser_index: Int is abstract
-
-    redef fun to_s: String do
-        return "'{_text}'"
-    end
-end
-
 redef class TEol
     redef fun parser_index: Int
     do
        return 0
     end
 
-    init init_tk(text: String, loc: Location)
+    init init_tk(loc: Location)
     do
-        _text = text
                _location = loc
     end
 end
@@ -34,27 +24,25 @@ redef class TComment
        return 1
     end
 
-    init init_tk(text: String, loc: Location)
+    init init_tk(loc: Location)
     do
-        _text = text
                _location = loc
     end
 end
 
-redef class TKwmodule
+redef class TKwpackage
     redef fun parser_index: Int
     do
        return 2
     end
 
-    init init_tk(text: String, loc: Location)
+    init init_tk(loc: Location)
     do
-        _text = text
                _location = loc
     end
 end
 
-redef class TKwimport
+redef class TKwmodule
     redef fun parser_index: Int
     do
        return 3
@@ -62,12 +50,11 @@ redef class TKwimport
 
     init init_tk(loc: Location)
     do
-        _text = once "import"
                _location = loc
     end
 end
 
-redef class TKwclass
+redef class TKwimport
     redef fun parser_index: Int
     do
        return 4
@@ -75,12 +62,11 @@ redef class TKwclass
 
     init init_tk(loc: Location)
     do
-        _text = once "class"
                _location = loc
     end
 end
 
-redef class TKwabstract
+redef class TKwclass
     redef fun parser_index: Int
     do
        return 5
@@ -88,12 +74,11 @@ redef class TKwabstract
 
     init init_tk(loc: Location)
     do
-        _text = once "abstract"
                _location = loc
     end
 end
 
-redef class TKwinterface
+redef class TKwabstract
     redef fun parser_index: Int
     do
        return 6
@@ -101,12 +86,11 @@ redef class TKwinterface
 
     init init_tk(loc: Location)
     do
-        _text = once "interface"
                _location = loc
     end
 end
 
-redef class TKwuniversal
+redef class TKwinterface
     redef fun parser_index: Int
     do
        return 7
@@ -114,12 +98,11 @@ redef class TKwuniversal
 
     init init_tk(loc: Location)
     do
-        _text = once "universal"
                _location = loc
     end
 end
 
-redef class TKwspecial
+redef class TKwenum
     redef fun parser_index: Int
     do
        return 8
@@ -127,12 +110,11 @@ redef class TKwspecial
 
     init init_tk(loc: Location)
     do
-        _text = once "special"
                _location = loc
     end
 end
 
-redef class TKwend
+redef class TKwsubset
     redef fun parser_index: Int
     do
        return 9
@@ -140,12 +122,11 @@ redef class TKwend
 
     init init_tk(loc: Location)
     do
-        _text = once "end"
                _location = loc
     end
 end
 
-redef class TKwmeth
+redef class TKwend
     redef fun parser_index: Int
     do
        return 10
@@ -153,12 +134,11 @@ redef class TKwmeth
 
     init init_tk(loc: Location)
     do
-        _text = once "fun"
                _location = loc
     end
 end
 
-redef class TKwtype
+redef class TKwmeth
     redef fun parser_index: Int
     do
        return 11
@@ -166,12 +146,11 @@ redef class TKwtype
 
     init init_tk(loc: Location)
     do
-        _text = once "type"
                _location = loc
     end
 end
 
-redef class TKwinit
+redef class TKwtype
     redef fun parser_index: Int
     do
        return 12
@@ -179,12 +158,11 @@ redef class TKwinit
 
     init init_tk(loc: Location)
     do
-        _text = once "init"
                _location = loc
     end
 end
 
-redef class TKwredef
+redef class TKwinit
     redef fun parser_index: Int
     do
        return 13
@@ -192,12 +170,11 @@ redef class TKwredef
 
     init init_tk(loc: Location)
     do
-        _text = once "redef"
                _location = loc
     end
 end
 
-redef class TKwis
+redef class TKwredef
     redef fun parser_index: Int
     do
        return 14
@@ -205,12 +182,11 @@ redef class TKwis
 
     init init_tk(loc: Location)
     do
-        _text = once "is"
                _location = loc
     end
 end
 
-redef class TKwdo
+redef class TKwis
     redef fun parser_index: Int
     do
        return 15
@@ -218,12 +194,11 @@ redef class TKwdo
 
     init init_tk(loc: Location)
     do
-        _text = once "do"
                _location = loc
     end
 end
 
-redef class TKwreadable
+redef class TKwdo
     redef fun parser_index: Int
     do
        return 16
@@ -231,12 +206,11 @@ redef class TKwreadable
 
     init init_tk(loc: Location)
     do
-        _text = once "readable"
                _location = loc
     end
 end
 
-redef class TKwwritable
+redef class TKwvar
     redef fun parser_index: Int
     do
        return 17
@@ -244,12 +218,11 @@ redef class TKwwritable
 
     init init_tk(loc: Location)
     do
-        _text = once "writable"
                _location = loc
     end
 end
 
-redef class TKwvar
+redef class TKwextern
     redef fun parser_index: Int
     do
        return 18
@@ -257,12 +230,11 @@ redef class TKwvar
 
     init init_tk(loc: Location)
     do
-        _text = once "var"
                _location = loc
     end
 end
 
-redef class TKwintern
+redef class TKwpublic
     redef fun parser_index: Int
     do
        return 19
@@ -270,12 +242,11 @@ redef class TKwintern
 
     init init_tk(loc: Location)
     do
-        _text = once "intern"
                _location = loc
     end
 end
 
-redef class TKwextern
+redef class TKwprotected
     redef fun parser_index: Int
     do
        return 20
@@ -283,12 +254,11 @@ redef class TKwextern
 
     init init_tk(loc: Location)
     do
-        _text = once "extern"
                _location = loc
     end
 end
 
-redef class TKwprotected
+redef class TKwprivate
     redef fun parser_index: Int
     do
        return 21
@@ -296,12 +266,11 @@ redef class TKwprotected
 
     init init_tk(loc: Location)
     do
-        _text = once "protected"
                _location = loc
     end
 end
 
-redef class TKwprivate
+redef class TKwintrude
     redef fun parser_index: Int
     do
        return 22
@@ -309,12 +278,11 @@ redef class TKwprivate
 
     init init_tk(loc: Location)
     do
-        _text = once "private"
                _location = loc
     end
 end
 
-redef class TKwintrude
+redef class TKwif
     redef fun parser_index: Int
     do
        return 23
@@ -322,12 +290,11 @@ redef class TKwintrude
 
     init init_tk(loc: Location)
     do
-        _text = once "intrude"
                _location = loc
     end
 end
 
-redef class TKwif
+redef class TKwthen
     redef fun parser_index: Int
     do
        return 24
@@ -335,12 +302,11 @@ redef class TKwif
 
     init init_tk(loc: Location)
     do
-        _text = once "if"
                _location = loc
     end
 end
 
-redef class TKwthen
+redef class TKwelse
     redef fun parser_index: Int
     do
        return 25
@@ -348,12 +314,11 @@ redef class TKwthen
 
     init init_tk(loc: Location)
     do
-        _text = once "then"
                _location = loc
     end
 end
 
-redef class TKwelse
+redef class TKwwhile
     redef fun parser_index: Int
     do
        return 26
@@ -361,12 +326,11 @@ redef class TKwelse
 
     init init_tk(loc: Location)
     do
-        _text = once "else"
                _location = loc
     end
 end
 
-redef class TKwwhile
+redef class TKwloop
     redef fun parser_index: Int
     do
        return 27
@@ -374,12 +338,11 @@ redef class TKwwhile
 
     init init_tk(loc: Location)
     do
-        _text = once "while"
                _location = loc
     end
 end
 
-redef class TKwloop
+redef class TKwfor
     redef fun parser_index: Int
     do
        return 28
@@ -387,12 +350,11 @@ redef class TKwloop
 
     init init_tk(loc: Location)
     do
-        _text = once "loop"
                _location = loc
     end
 end
 
-redef class TKwfor
+redef class TKwin
     redef fun parser_index: Int
     do
        return 29
@@ -400,12 +362,11 @@ redef class TKwfor
 
     init init_tk(loc: Location)
     do
-        _text = once "for"
                _location = loc
     end
 end
 
-redef class TKwin
+redef class TKwand
     redef fun parser_index: Int
     do
        return 30
@@ -413,12 +374,11 @@ redef class TKwin
 
     init init_tk(loc: Location)
     do
-        _text = once "in"
                _location = loc
     end
 end
 
-redef class TKwand
+redef class TKwor
     redef fun parser_index: Int
     do
        return 31
@@ -426,12 +386,11 @@ redef class TKwand
 
     init init_tk(loc: Location)
     do
-        _text = once "and"
                _location = loc
     end
 end
 
-redef class TKwor
+redef class TKwnot
     redef fun parser_index: Int
     do
        return 32
@@ -439,12 +398,11 @@ redef class TKwor
 
     init init_tk(loc: Location)
     do
-        _text = once "or"
                _location = loc
     end
 end
 
-redef class TKwnot
+redef class TKwimplies
     redef fun parser_index: Int
     do
        return 33
@@ -452,7 +410,6 @@ redef class TKwnot
 
     init init_tk(loc: Location)
     do
-        _text = once "not"
                _location = loc
     end
 end
@@ -465,7 +422,6 @@ redef class TKwreturn
 
     init init_tk(loc: Location)
     do
-        _text = once "return"
                _location = loc
     end
 end
@@ -478,7 +434,6 @@ redef class TKwcontinue
 
     init init_tk(loc: Location)
     do
-        _text = once "continue"
                _location = loc
     end
 end
@@ -491,7 +446,6 @@ redef class TKwbreak
 
     init init_tk(loc: Location)
     do
-        _text = once "break"
                _location = loc
     end
 end
@@ -504,7 +458,6 @@ redef class TKwabort
 
     init init_tk(loc: Location)
     do
-        _text = once "abort"
                _location = loc
     end
 end
@@ -517,7 +470,6 @@ redef class TKwassert
 
     init init_tk(loc: Location)
     do
-        _text = once "assert"
                _location = loc
     end
 end
@@ -530,7 +482,6 @@ redef class TKwnew
 
     init init_tk(loc: Location)
     do
-        _text = once "new"
                _location = loc
     end
 end
@@ -543,7 +494,6 @@ redef class TKwisa
 
     init init_tk(loc: Location)
     do
-        _text = once "isa"
                _location = loc
     end
 end
@@ -556,7 +506,6 @@ redef class TKwonce
 
     init init_tk(loc: Location)
     do
-        _text = once "once"
                _location = loc
     end
 end
@@ -569,7 +518,6 @@ redef class TKwsuper
 
     init init_tk(loc: Location)
     do
-        _text = once "super"
                _location = loc
     end
 end
@@ -582,7 +530,6 @@ redef class TKwself
 
     init init_tk(loc: Location)
     do
-        _text = once "self"
                _location = loc
     end
 end
@@ -595,7 +542,6 @@ redef class TKwtrue
 
     init init_tk(loc: Location)
     do
-        _text = once "true"
                _location = loc
     end
 end
@@ -608,7 +554,6 @@ redef class TKwfalse
 
     init init_tk(loc: Location)
     do
-        _text = once "false"
                _location = loc
     end
 end
@@ -621,7 +566,6 @@ redef class TKwnull
 
     init init_tk(loc: Location)
     do
-        _text = once "null"
                _location = loc
     end
 end
@@ -634,7 +578,6 @@ redef class TKwas
 
     init init_tk(loc: Location)
     do
-        _text = once "as"
                _location = loc
     end
 end
@@ -647,7 +590,6 @@ redef class TKwnullable
 
     init init_tk(loc: Location)
     do
-        _text = once "nullable"
                _location = loc
     end
 end
@@ -660,7 +602,6 @@ redef class TKwisset
 
     init init_tk(loc: Location)
     do
-        _text = once "isset"
                _location = loc
     end
 end
@@ -673,12 +614,11 @@ redef class TKwlabel
 
     init init_tk(loc: Location)
     do
-        _text = once "label"
                _location = loc
     end
 end
 
-redef class TOpar
+redef class TKwwith
     redef fun parser_index: Int
     do
        return 51
@@ -686,12 +626,11 @@ redef class TOpar
 
     init init_tk(loc: Location)
     do
-        _text = once "("
                _location = loc
     end
 end
 
-redef class TCpar
+redef class TKwdebug
     redef fun parser_index: Int
     do
        return 52
@@ -699,12 +638,11 @@ redef class TCpar
 
     init init_tk(loc: Location)
     do
-        _text = once ")"
                _location = loc
     end
 end
 
-redef class TObra
+redef class TKwyield
     redef fun parser_index: Int
     do
        return 53
@@ -712,12 +650,11 @@ redef class TObra
 
     init init_tk(loc: Location)
     do
-        _text = once "["
                _location = loc
     end
 end
 
-redef class TCbra
+redef class TKwcatch
     redef fun parser_index: Int
     do
        return 54
@@ -725,12 +662,11 @@ redef class TCbra
 
     init init_tk(loc: Location)
     do
-        _text = once "]"
                _location = loc
     end
 end
 
-redef class TComma
+redef class TOpar
     redef fun parser_index: Int
     do
        return 55
@@ -738,12 +674,11 @@ redef class TComma
 
     init init_tk(loc: Location)
     do
-        _text = once ","
                _location = loc
     end
 end
 
-redef class TColumn
+redef class TCpar
     redef fun parser_index: Int
     do
        return 56
@@ -751,12 +686,11 @@ redef class TColumn
 
     init init_tk(loc: Location)
     do
-        _text = once ":"
                _location = loc
     end
 end
 
-redef class TQuad
+redef class TObra
     redef fun parser_index: Int
     do
        return 57
@@ -764,12 +698,11 @@ redef class TQuad
 
     init init_tk(loc: Location)
     do
-        _text = once "::"
                _location = loc
     end
 end
 
-redef class TAssign
+redef class TCbra
     redef fun parser_index: Int
     do
        return 58
@@ -777,12 +710,11 @@ redef class TAssign
 
     init init_tk(loc: Location)
     do
-        _text = once "="
                _location = loc
     end
 end
 
-redef class TPluseq
+redef class TComma
     redef fun parser_index: Int
     do
        return 59
@@ -790,12 +722,11 @@ redef class TPluseq
 
     init init_tk(loc: Location)
     do
-        _text = once "+="
                _location = loc
     end
 end
 
-redef class TMinuseq
+redef class TColumn
     redef fun parser_index: Int
     do
        return 60
@@ -803,12 +734,11 @@ redef class TMinuseq
 
     init init_tk(loc: Location)
     do
-        _text = once "-="
                _location = loc
     end
 end
 
-redef class TDotdotdot
+redef class TQuad
     redef fun parser_index: Int
     do
        return 61
@@ -816,12 +746,11 @@ redef class TDotdotdot
 
     init init_tk(loc: Location)
     do
-        _text = once "..."
                _location = loc
     end
 end
 
-redef class TDotdot
+redef class TAssign
     redef fun parser_index: Int
     do
        return 62
@@ -829,12 +758,11 @@ redef class TDotdot
 
     init init_tk(loc: Location)
     do
-        _text = once ".."
                _location = loc
     end
 end
 
-redef class TDot
+redef class TPluseq
     redef fun parser_index: Int
     do
        return 63
@@ -842,12 +770,11 @@ redef class TDot
 
     init init_tk(loc: Location)
     do
-        _text = once "."
                _location = loc
     end
 end
 
-redef class TPlus
+redef class TMinuseq
     redef fun parser_index: Int
     do
        return 64
@@ -855,12 +782,11 @@ redef class TPlus
 
     init init_tk(loc: Location)
     do
-        _text = once "+"
                _location = loc
     end
 end
 
-redef class TMinus
+redef class TStareq
     redef fun parser_index: Int
     do
        return 65
@@ -868,12 +794,11 @@ redef class TMinus
 
     init init_tk(loc: Location)
     do
-        _text = once "-"
                _location = loc
     end
 end
 
-redef class TStar
+redef class TSlasheq
     redef fun parser_index: Int
     do
        return 66
@@ -881,12 +806,11 @@ redef class TStar
 
     init init_tk(loc: Location)
     do
-        _text = once "*"
                _location = loc
     end
 end
 
-redef class TSlash
+redef class TPercenteq
     redef fun parser_index: Int
     do
        return 67
@@ -894,12 +818,11 @@ redef class TSlash
 
     init init_tk(loc: Location)
     do
-        _text = once "/"
                _location = loc
     end
 end
 
-redef class TPercent
+redef class TStarstareq
     redef fun parser_index: Int
     do
        return 68
@@ -907,12 +830,11 @@ redef class TPercent
 
     init init_tk(loc: Location)
     do
-        _text = once "%"
                _location = loc
     end
 end
 
-redef class TEq
+redef class TPipeeq
     redef fun parser_index: Int
     do
        return 69
@@ -920,12 +842,11 @@ redef class TEq
 
     init init_tk(loc: Location)
     do
-        _text = once "=="
                _location = loc
     end
 end
 
-redef class TNe
+redef class TCareteq
     redef fun parser_index: Int
     do
        return 70
@@ -933,12 +854,11 @@ redef class TNe
 
     init init_tk(loc: Location)
     do
-        _text = once "!="
                _location = loc
     end
 end
 
-redef class TLt
+redef class TAmpeq
     redef fun parser_index: Int
     do
        return 71
@@ -946,12 +866,11 @@ redef class TLt
 
     init init_tk(loc: Location)
     do
-        _text = once "<"
                _location = loc
     end
 end
 
-redef class TLe
+redef class TLleq
     redef fun parser_index: Int
     do
        return 72
@@ -959,12 +878,11 @@ redef class TLe
 
     init init_tk(loc: Location)
     do
-        _text = once "<="
                _location = loc
     end
 end
 
-redef class TLl
+redef class TGgeq
     redef fun parser_index: Int
     do
        return 73
@@ -972,12 +890,11 @@ redef class TLl
 
     init init_tk(loc: Location)
     do
-        _text = once "<<"
                _location = loc
     end
 end
 
-redef class TGt
+redef class TDotdotdot
     redef fun parser_index: Int
     do
        return 74
@@ -985,12 +902,11 @@ redef class TGt
 
     init init_tk(loc: Location)
     do
-        _text = once ">"
                _location = loc
     end
 end
 
-redef class TGe
+redef class TDotdot
     redef fun parser_index: Int
     do
        return 75
@@ -998,12 +914,11 @@ redef class TGe
 
     init init_tk(loc: Location)
     do
-        _text = once ">="
                _location = loc
     end
 end
 
-redef class TGg
+redef class TDot
     redef fun parser_index: Int
     do
        return 76
@@ -1011,12 +926,11 @@ redef class TGg
 
     init init_tk(loc: Location)
     do
-        _text = once ">>"
                _location = loc
     end
 end
 
-redef class TStarship
+redef class TPlus
     redef fun parser_index: Int
     do
        return 77
@@ -1024,12 +938,11 @@ redef class TStarship
 
     init init_tk(loc: Location)
     do
-        _text = once "<=>"
                _location = loc
     end
 end
 
-redef class TBang
+redef class TMinus
     redef fun parser_index: Int
     do
        return 78
@@ -1037,664 +950,799 @@ redef class TBang
 
     init init_tk(loc: Location)
     do
-        _text = once "!"
                _location = loc
     end
 end
 
-redef class TClassid
+redef class TStar
     redef fun parser_index: Int
     do
        return 79
     end
 
-    init init_tk(text: String, loc: Location)
+    init init_tk(loc: Location)
     do
-        _text = text
                _location = loc
     end
 end
 
-redef class TId
+redef class TStarstar
     redef fun parser_index: Int
     do
        return 80
     end
 
-    init init_tk(text: String, loc: Location)
+    init init_tk(loc: Location)
     do
-        _text = text
                _location = loc
     end
 end
 
-redef class TAttrid
+redef class TSlash
     redef fun parser_index: Int
     do
        return 81
     end
 
-    init init_tk(text: String, loc: Location)
+    init init_tk(loc: Location)
     do
-        _text = text
                _location = loc
     end
 end
 
-redef class TNumber
+redef class TPercent
     redef fun parser_index: Int
     do
        return 82
     end
 
-    init init_tk(text: String, loc: Location)
+    init init_tk(loc: Location)
     do
-        _text = text
                _location = loc
     end
 end
 
-redef class TFloat
+redef class TPipe
     redef fun parser_index: Int
     do
        return 83
     end
 
-    init init_tk(text: String, loc: Location)
+    init init_tk(loc: Location)
     do
-        _text = text
                _location = loc
     end
 end
 
-redef class TChar
+redef class TCaret
     redef fun parser_index: Int
     do
        return 84
     end
 
-    init init_tk(text: String, loc: Location)
+    init init_tk(loc: Location)
     do
-        _text = text
                _location = loc
     end
 end
 
-redef class TString
+redef class TAmp
     redef fun parser_index: Int
     do
        return 85
     end
 
-    init init_tk(text: String, loc: Location)
+    init init_tk(loc: Location)
     do
-        _text = text
                _location = loc
     end
 end
 
-redef class TStartString
+redef class TTilde
     redef fun parser_index: Int
     do
        return 86
     end
 
-    init init_tk(text: String, loc: Location)
+    init init_tk(loc: Location)
     do
-        _text = text
                _location = loc
     end
 end
 
-redef class TMidString
+redef class TEq
     redef fun parser_index: Int
     do
        return 87
     end
 
-    init init_tk(text: String, loc: Location)
+    init init_tk(loc: Location)
     do
-        _text = text
                _location = loc
     end
 end
 
-redef class TEndString
+redef class TNe
     redef fun parser_index: Int
     do
        return 88
     end
 
-    init init_tk(text: String, loc: Location)
+    init init_tk(loc: Location)
     do
-        _text = text
                _location = loc
     end
 end
 
-
-redef class EOF
+redef class TLt
     redef fun parser_index: Int
     do
        return 89
     end
 
-    init(loc: Location)
+    init init_tk(loc: Location)
     do
-        _text = ""
                _location = loc
     end
 end
 
-redef class AError
-    readable var _message: String
+redef class TLe
+    redef fun parser_index: Int
+    do
+       return 90
+    end
 
-    init init_error(message: String, loc: Location)
+    init init_tk(loc: Location)
     do
-               init(loc)
-               _message = message
+               _location = loc
     end
 end
 
+redef class TLl
+    redef fun parser_index: Int
+    do
+       return 91
+    end
 
-# The lexer extract NIT tokens from an input stream.
-# It is better user with the Parser
-class Lexer
-special TablesCapable
-       # Last peeked token
-       var _token: nullable Token
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
 
-       # Lexer current state
-       var _state: Int = 0
+redef class TGt
+    redef fun parser_index: Int
+    do
+       return 92
+    end
 
-       # Name of the stream (as given to tokens)
-       readable var _filename: String
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
 
-       # Input stream where character are read
-       var _stream: IStream
+redef class TGe
+    redef fun parser_index: Int
+    do
+       return 93
+    end
 
-       # Pushback buffer to store unread character
-       var _stream_buf: Buffer
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
 
-       # Number of character stored in the pushback buffer
-       var _stream_pos: Int
+redef class TGg
+    redef fun parser_index: Int
+    do
+       return 94
+    end
 
-       # Current line number in the input stream
-       var _line: Int = 0
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
 
-       # Current column in the input stream
-       var _pos: Int = 0
+redef class TStarship
+    redef fun parser_index: Int
+    do
+       return 95
+    end
 
-       # Was the last character a cariage-return?
-       var _cr: Bool = false
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
 
-       # If the end of stream?
-       var _eof: Bool = false
+redef class TBang
+    redef fun parser_index: Int
+    do
+       return 96
+    end
 
-       # Current working text read from the input stream
-       var _text: Buffer
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
 
-       # Constante state values
-       private fun state_initial: Int do return 0 end
+redef class TQuest
+    redef fun parser_index: Int
+    do
+       return 97
+    end
 
-       # Create a new lexer for a stream (and a name)
-       init(stream: IStream, fname: String)
-       do
-               _filename = fname
-               _text = new Buffer
-               _stream = stream
-               _stream_pos = -1
-               _stream_buf = new Buffer
-       end
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
 
-       # Give the next token (but do not consume it)
-       fun peek: Token
-       do
-               while _token == null do
-                       _token = get_token
-               end
-               return _token.as(not null)
-       end
+redef class TAt
+    redef fun parser_index: Int
+    do
+       return 98
+    end
 
-       # Give and consume the next token
-       fun next: Token
-       do
-               var result = _token
-               while result == null do
-                       result = get_token
-               end
-               _token = null
-               return result
-       end
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
 
-       # Get a token, or null if it is discarded
-       private fun get_token: nullable Token
-       do
-               var dfa_state = 0
-
-               var start_pos = _pos
-               var start_line = _line
-
-               var accept_state = -1
-               var accept_token = -1
-               var accept_length = -1
-               var accept_pos = -1
-               var accept_line = -1
-
-               var text = _text
-               text.clear
-
-               loop
-                       var c = get_char
-
-                       if c != -1 then
-                               var cr = _cr
-                               var line = _line
-                               var pos = _pos
-                               if c == 10 then
-                                       if cr then
-                                               cr = false
-                                       else
-                                               line = line + 1
-                                               pos = 0
-                                       end
-                               else if c == 13 then
-                                       line = line + 1
-                                       pos = 0
-                                       cr = true
-                               else
-                                       pos = pos + 1
-                                       cr = false
-                               end
-
-                               text.add(c.ascii)
-
-                               loop
-                                       var old_state = dfa_state
-                                       if dfa_state < -1 then
-                                               old_state = -2 - dfa_state
-                                       end
-
-                                       dfa_state = -1
-
-                                       var low = 0
-                                       var high = lexer_goto(old_state, 0) - 1
-
-                                       if high >= 0 then
-                                               while low <= high do
-                                                       var middle = (low + high) / 2
-                                                       var offset = middle * 3 + 1 # +1 because length is at 0
-
-                                                       if c < lexer_goto(old_state, offset) then
-                                                               high = middle - 1
-                                                       else if c > lexer_goto(old_state, offset+1) then
-                                                               low = middle + 1
-                                                       else
-                                                               dfa_state = lexer_goto(old_state, offset+2)
-                                                               break
-                                                       end
-                                               end
-                                       end
-                                       if dfa_state > -2 then break
-                               end
-
-                               _cr = cr
-                               _line = line
-                               _pos = pos
-                       else
-                               dfa_state = -1
-                       end
-
-                       if dfa_state >= 0 then
-                               var tok = lexer_accept(dfa_state)
-                               if tok != -1 then
-                                       accept_state = dfa_state
-                                       accept_token = tok
-                                       accept_length = text.length
-                                       accept_pos = _pos
-                                       accept_line = _line
-                               end
-                       else
-                               if accept_state != -1 then
-                                       var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
-                                       _pos = accept_pos
-                                       _line = accept_line
-                                       push_back(accept_length)
-                                       if accept_token == 0 then
-                                               return null
-                                       end
-                                       if accept_token == 1 then
-                                               var token_text = text.substring(0, accept_length)
-                                               return new TEol.init_tk(token_text, location)
-                                       end
-                                       if accept_token == 2 then
-                                               var token_text = text.substring(0, accept_length)
-                                               return new TComment.init_tk(token_text, location)
-                                       end
-                                       if accept_token == 3 then
-                                               var token_text = text.substring(0, accept_length)
-                                               return new TKwmodule.init_tk(token_text, location)
-                                       end
-                                       if accept_token == 4 then
-                                               return new TKwimport.init_tk(location)
-                                       end
-                                       if accept_token == 5 then
-                                               return new TKwclass.init_tk(location)
-                                       end
-                                       if accept_token == 6 then
-                                               return new TKwabstract.init_tk(location)
-                                       end
-                                       if accept_token == 7 then
-                                               return new TKwinterface.init_tk(location)
-                                       end
-                                       if accept_token == 8 then
-                                               return new TKwuniversal.init_tk(location)
-                                       end
-                                       if accept_token == 9 then
-                                               return new TKwspecial.init_tk(location)
-                                       end
-                                       if accept_token == 10 then
-                                               return new TKwend.init_tk(location)
-                                       end
-                                       if accept_token == 11 then
-                                               return new TKwmeth.init_tk(location)
-                                       end
-                                       if accept_token == 12 then
-                                               return new TKwtype.init_tk(location)
-                                       end
-                                       if accept_token == 13 then
-                                               return new TKwinit.init_tk(location)
-                                       end
-                                       if accept_token == 14 then
-                                               return new TKwredef.init_tk(location)
-                                       end
-                                       if accept_token == 15 then
-                                               return new TKwis.init_tk(location)
-                                       end
-                                       if accept_token == 16 then
-                                               return new TKwdo.init_tk(location)
-                                       end
-                                       if accept_token == 17 then
-                                               return new TKwreadable.init_tk(location)
-                                       end
-                                       if accept_token == 18 then
-                                               return new TKwwritable.init_tk(location)
-                                       end
-                                       if accept_token == 19 then
-                                               return new TKwvar.init_tk(location)
-                                       end
-                                       if accept_token == 20 then
-                                               return new TKwintern.init_tk(location)
-                                       end
-                                       if accept_token == 21 then
-                                               return new TKwextern.init_tk(location)
-                                       end
-                                       if accept_token == 22 then
-                                               return new TKwprotected.init_tk(location)
-                                       end
-                                       if accept_token == 23 then
-                                               return new TKwprivate.init_tk(location)
-                                       end
-                                       if accept_token == 24 then
-                                               return new TKwintrude.init_tk(location)
-                                       end
-                                       if accept_token == 25 then
-                                               return new TKwif.init_tk(location)
-                                       end
-                                       if accept_token == 26 then
-                                               return new TKwthen.init_tk(location)
-                                       end
-                                       if accept_token == 27 then
-                                               return new TKwelse.init_tk(location)
-                                       end
-                                       if accept_token == 28 then
-                                               return new TKwwhile.init_tk(location)
-                                       end
-                                       if accept_token == 29 then
-                                               return new TKwloop.init_tk(location)
-                                       end
-                                       if accept_token == 30 then
-                                               return new TKwfor.init_tk(location)
-                                       end
-                                       if accept_token == 31 then
-                                               return new TKwin.init_tk(location)
-                                       end
-                                       if accept_token == 32 then
-                                               return new TKwand.init_tk(location)
-                                       end
-                                       if accept_token == 33 then
-                                               return new TKwor.init_tk(location)
-                                       end
-                                       if accept_token == 34 then
-                                               return new TKwnot.init_tk(location)
-                                       end
-                                       if accept_token == 35 then
-                                               return new TKwreturn.init_tk(location)
-                                       end
-                                       if accept_token == 36 then
-                                               return new TKwcontinue.init_tk(location)
-                                       end
-                                       if accept_token == 37 then
-                                               return new TKwbreak.init_tk(location)
-                                       end
-                                       if accept_token == 38 then
-                                               return new TKwabort.init_tk(location)
-                                       end
-                                       if accept_token == 39 then
-                                               return new TKwassert.init_tk(location)
-                                       end
-                                       if accept_token == 40 then
-                                               return new TKwnew.init_tk(location)
-                                       end
-                                       if accept_token == 41 then
-                                               return new TKwisa.init_tk(location)
-                                       end
-                                       if accept_token == 42 then
-                                               return new TKwonce.init_tk(location)
-                                       end
-                                       if accept_token == 43 then
-                                               return new TKwsuper.init_tk(location)
-                                       end
-                                       if accept_token == 44 then
-                                               return new TKwself.init_tk(location)
-                                       end
-                                       if accept_token == 45 then
-                                               return new TKwtrue.init_tk(location)
-                                       end
-                                       if accept_token == 46 then
-                                               return new TKwfalse.init_tk(location)
-                                       end
-                                       if accept_token == 47 then
-                                               return new TKwnull.init_tk(location)
-                                       end
-                                       if accept_token == 48 then
-                                               return new TKwas.init_tk(location)
-                                       end
-                                       if accept_token == 49 then
-                                               return new TKwnullable.init_tk(location)
-                                       end
-                                       if accept_token == 50 then
-                                               return new TKwisset.init_tk(location)
-                                       end
-                                       if accept_token == 51 then
-                                               return new TKwlabel.init_tk(location)
-                                       end
-                                       if accept_token == 52 then
-                                               return new TOpar.init_tk(location)
-                                       end
-                                       if accept_token == 53 then
-                                               return new TCpar.init_tk(location)
-                                       end
-                                       if accept_token == 54 then
-                                               return new TObra.init_tk(location)
-                                       end
-                                       if accept_token == 55 then
-                                               return new TCbra.init_tk(location)
-                                       end
-                                       if accept_token == 56 then
-                                               return new TComma.init_tk(location)
-                                       end
-                                       if accept_token == 57 then
-                                               return new TColumn.init_tk(location)
-                                       end
-                                       if accept_token == 58 then
-                                               return new TQuad.init_tk(location)
-                                       end
-                                       if accept_token == 59 then
-                                               return new TAssign.init_tk(location)
-                                       end
-                                       if accept_token == 60 then
-                                               return new TPluseq.init_tk(location)
-                                       end
-                                       if accept_token == 61 then
-                                               return new TMinuseq.init_tk(location)
-                                       end
-                                       if accept_token == 62 then
-                                               return new TDotdotdot.init_tk(location)
-                                       end
-                                       if accept_token == 63 then
-                                               return new TDotdot.init_tk(location)
-                                       end
-                                       if accept_token == 64 then
-                                               return new TDot.init_tk(location)
-                                       end
-                                       if accept_token == 65 then
-                                               return new TPlus.init_tk(location)
-                                       end
-                                       if accept_token == 66 then
-                                               return new TMinus.init_tk(location)
-                                       end
-                                       if accept_token == 67 then
-                                               return new TStar.init_tk(location)
-                                       end
-                                       if accept_token == 68 then
-                                               return new TSlash.init_tk(location)
-                                       end
-                                       if accept_token == 69 then
-                                               return new TPercent.init_tk(location)
-                                       end
-                                       if accept_token == 70 then
-                                               return new TEq.init_tk(location)
-                                       end
-                                       if accept_token == 71 then
-                                               return new TNe.init_tk(location)
-                                       end
-                                       if accept_token == 72 then
-                                               return new TLt.init_tk(location)
-                                       end
-                                       if accept_token == 73 then
-                                               return new TLe.init_tk(location)
-                                       end
-                                       if accept_token == 74 then
-                                               return new TLl.init_tk(location)
-                                       end
-                                       if accept_token == 75 then
-                                               return new TGt.init_tk(location)
-                                       end
-                                       if accept_token == 76 then
-                                               return new TGe.init_tk(location)
-                                       end
-                                       if accept_token == 77 then
-                                               return new TGg.init_tk(location)
-                                       end
-                                       if accept_token == 78 then
-                                               return new TStarship.init_tk(location)
-                                       end
-                                       if accept_token == 79 then
-                                               return new TBang.init_tk(location)
-                                       end
-                                       if accept_token == 80 then
-                                               var token_text = text.substring(0, accept_length)
-                                               return new TClassid.init_tk(token_text, location)
-                                       end
-                                       if accept_token == 81 then
-                                               var token_text = text.substring(0, accept_length)
-                                               return new TId.init_tk(token_text, location)
-                                       end
-                                       if accept_token == 82 then
-                                               var token_text = text.substring(0, accept_length)
-                                               return new TAttrid.init_tk(token_text, location)
-                                       end
-                                       if accept_token == 83 then
-                                               var token_text = text.substring(0, accept_length)
-                                               return new TNumber.init_tk(token_text, location)
-                                       end
-                                       if accept_token == 84 then
-                                               var token_text = text.substring(0, accept_length)
-                                               return new TFloat.init_tk(token_text, location)
-                                       end
-                                       if accept_token == 85 then
-                                               var token_text = text.substring(0, accept_length)
-                                               return new TChar.init_tk(token_text, location)
-                                       end
-                                       if accept_token == 86 then
-                                               var token_text = text.substring(0, accept_length)
-                                               return new TString.init_tk(token_text, location)
-                                       end
-                                       if accept_token == 87 then
-                                               var token_text = text.substring(0, accept_length)
-                                               return new TStartString.init_tk(token_text, location)
-                                       end
-                                       if accept_token == 88 then
-                                               var token_text = text.substring(0, accept_length)
-                                               return new TMidString.init_tk(token_text, location)
-                                       end
-                                       if accept_token == 89 then
-                                               var token_text = text.substring(0, accept_length)
-                                               return new TEndString.init_tk(token_text, location)
-                                       end
-                               else
-                                       var location = new Location(_filename, start_line + 1, start_line + 1, start_pos + 1, start_pos + 1)
-                                       if text.length > 0 then
-                                               var token = new AError.init_error("Syntax error: unknown token {text}.", location)
-                                               return token
-                                       else
-                                               var token = new EOF(location)
-                                               return token
-                                       end
-                               end
-                       end
-               end
-       end
+redef class TSemi
+    redef fun parser_index: Int
+    do
+       return 99
+    end
 
-       # Read the next character.
-       # The character is read from the stream of from the pushback buffer.
-       private fun get_char: Int
-       do
-               if _eof then
-                       return -1
-               end
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
 
-               var result: Int
+redef class TClassid
+    redef fun parser_index: Int
+    do
+       return 100
+    end
 
-               var sp = _stream_pos
-               if sp >= 0 then
-                       var res = _stream_buf[_stream_pos]
-                       _stream_pos = sp - 1
-                       result = res.ascii
-               else
-                       result = _stream.read_char
-               end
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
 
-               if result == -1 then
-                       _eof = true
-               end
+redef class TId
+    redef fun parser_index: Int
+    do
+       return 101
+    end
 
-               return result
-       end
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
 
-       # Unread some characters.
-       # Unread characters are stored in the pushback buffer.
-       private fun push_back(accept_length: Int)
+redef class TAttrid
+    redef fun parser_index: Int
+    do
+       return 102
+    end
+
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
+
+redef class TInteger
+    redef fun parser_index: Int
+    do
+       return 103
+    end
+
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
+
+redef class TFloat
+    redef fun parser_index: Int
+    do
+       return 104
+    end
+
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
+
+redef class TString
+    redef fun parser_index: Int
+    do
+       return 105
+    end
+
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
+
+redef class TStartString
+    redef fun parser_index: Int
+    do
+       return 106
+    end
+
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
+
+redef class TMidString
+    redef fun parser_index: Int
+    do
+       return 107
+    end
+
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
+
+redef class TEndString
+    redef fun parser_index: Int
+    do
+       return 108
+    end
+
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
+
+redef class TChar
+    redef fun parser_index: Int
+    do
+       return 109
+    end
+
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
+
+redef class TBadString
+    redef fun parser_index: Int
+    do
+       return 110
+    end
+
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
+
+redef class TBadTString
+    redef fun parser_index: Int
+    do
+       return 111
+    end
+
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
+
+redef class TBadChar
+    redef fun parser_index: Int
+    do
+       return 112
+    end
+
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
+
+redef class TExternCodeSegment
+    redef fun parser_index: Int
+    do
+       return 113
+    end
+
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
+
+redef class TBadExtern
+    redef fun parser_index: Int
+    do
+       return 114
+    end
+
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
+
+
+redef class EOF
+    redef fun parser_index: Int
+    do
+       return 115
+    end
+end
+
+redef class Lexer
+       redef fun make_token(accept_token, location)
        do
-               var length = _text.length
-               var i = length - 1
-               while i >= accept_length do
-                       _eof = false
-                       _stream_pos = _stream_pos + 1
-                       _stream_buf[_stream_pos] = _text[i]
-                       i = i - 1
+               if accept_token == 1 then
+                       return new TEol.init_tk(location)
+               end
+               if accept_token == 2 then
+                       return new TComment.init_tk(location)
+               end
+               if accept_token == 3 then
+                       return new TKwpackage.init_tk(location)
+               end
+               if accept_token == 4 then
+                       return new TKwmodule.init_tk(location)
+               end
+               if accept_token == 5 then
+                       return new TKwimport.init_tk(location)
+               end
+               if accept_token == 6 then
+                       return new TKwclass.init_tk(location)
+               end
+               if accept_token == 7 then
+                       return new TKwabstract.init_tk(location)
+               end
+               if accept_token == 8 then
+                       return new TKwinterface.init_tk(location)
+               end
+               if accept_token == 9 then
+                       return new TKwenum.init_tk(location)
+               end
+               if accept_token == 10 then
+                       return new TKwsubset.init_tk(location)
+               end
+               if accept_token == 11 then
+                       return new TKwend.init_tk(location)
+               end
+               if accept_token == 12 then
+                       return new TKwmeth.init_tk(location)
+               end
+               if accept_token == 13 then
+                       return new TKwtype.init_tk(location)
+               end
+               if accept_token == 14 then
+                       return new TKwinit.init_tk(location)
+               end
+               if accept_token == 15 then
+                       return new TKwredef.init_tk(location)
+               end
+               if accept_token == 16 then
+                       return new TKwis.init_tk(location)
+               end
+               if accept_token == 17 then
+                       return new TKwdo.init_tk(location)
+               end
+               if accept_token == 18 then
+                       return new TKwvar.init_tk(location)
+               end
+               if accept_token == 19 then
+                       return new TKwextern.init_tk(location)
+               end
+               if accept_token == 20 then
+                       return new TKwpublic.init_tk(location)
+               end
+               if accept_token == 21 then
+                       return new TKwprotected.init_tk(location)
+               end
+               if accept_token == 22 then
+                       return new TKwprivate.init_tk(location)
+               end
+               if accept_token == 23 then
+                       return new TKwintrude.init_tk(location)
+               end
+               if accept_token == 24 then
+                       return new TKwif.init_tk(location)
+               end
+               if accept_token == 25 then
+                       return new TKwthen.init_tk(location)
+               end
+               if accept_token == 26 then
+                       return new TKwelse.init_tk(location)
+               end
+               if accept_token == 27 then
+                       return new TKwwhile.init_tk(location)
+               end
+               if accept_token == 28 then
+                       return new TKwloop.init_tk(location)
+               end
+               if accept_token == 29 then
+                       return new TKwfor.init_tk(location)
+               end
+               if accept_token == 30 then
+                       return new TKwin.init_tk(location)
+               end
+               if accept_token == 31 then
+                       return new TKwand.init_tk(location)
+               end
+               if accept_token == 32 then
+                       return new TKwor.init_tk(location)
+               end
+               if accept_token == 33 then
+                       return new TKwnot.init_tk(location)
+               end
+               if accept_token == 34 then
+                       return new TKwimplies.init_tk(location)
+               end
+               if accept_token == 35 then
+                       return new TKwreturn.init_tk(location)
+               end
+               if accept_token == 36 then
+                       return new TKwcontinue.init_tk(location)
+               end
+               if accept_token == 37 then
+                       return new TKwbreak.init_tk(location)
+               end
+               if accept_token == 38 then
+                       return new TKwabort.init_tk(location)
+               end
+               if accept_token == 39 then
+                       return new TKwassert.init_tk(location)
+               end
+               if accept_token == 40 then
+                       return new TKwnew.init_tk(location)
+               end
+               if accept_token == 41 then
+                       return new TKwisa.init_tk(location)
+               end
+               if accept_token == 42 then
+                       return new TKwonce.init_tk(location)
+               end
+               if accept_token == 43 then
+                       return new TKwsuper.init_tk(location)
+               end
+               if accept_token == 44 then
+                       return new TKwself.init_tk(location)
+               end
+               if accept_token == 45 then
+                       return new TKwtrue.init_tk(location)
+               end
+               if accept_token == 46 then
+                       return new TKwfalse.init_tk(location)
+               end
+               if accept_token == 47 then
+                       return new TKwnull.init_tk(location)
+               end
+               if accept_token == 48 then
+                       return new TKwas.init_tk(location)
+               end
+               if accept_token == 49 then
+                       return new TKwnullable.init_tk(location)
+               end
+               if accept_token == 50 then
+                       return new TKwisset.init_tk(location)
+               end
+               if accept_token == 51 then
+                       return new TKwlabel.init_tk(location)
+               end
+               if accept_token == 52 then
+                       return new TKwwith.init_tk(location)
+               end
+               if accept_token == 53 then
+                       return new TKwdebug.init_tk(location)
+               end
+               if accept_token == 54 then
+                       return new TKwyield.init_tk(location)
+               end
+               if accept_token == 55 then
+                       return new TKwcatch.init_tk(location)
+               end
+               if accept_token == 56 then
+                       return new TOpar.init_tk(location)
+               end
+               if accept_token == 57 then
+                       return new TCpar.init_tk(location)
+               end
+               if accept_token == 58 then
+                       return new TObra.init_tk(location)
+               end
+               if accept_token == 59 then
+                       return new TCbra.init_tk(location)
+               end
+               if accept_token == 60 then
+                       return new TComma.init_tk(location)
+               end
+               if accept_token == 61 then
+                       return new TColumn.init_tk(location)
+               end
+               if accept_token == 62 then
+                       return new TQuad.init_tk(location)
+               end
+               if accept_token == 63 then
+                       return new TAssign.init_tk(location)
+               end
+               if accept_token == 64 then
+                       return new TPluseq.init_tk(location)
+               end
+               if accept_token == 65 then
+                       return new TMinuseq.init_tk(location)
+               end
+               if accept_token == 66 then
+                       return new TStareq.init_tk(location)
+               end
+               if accept_token == 67 then
+                       return new TSlasheq.init_tk(location)
+               end
+               if accept_token == 68 then
+                       return new TPercenteq.init_tk(location)
+               end
+               if accept_token == 69 then
+                       return new TStarstareq.init_tk(location)
+               end
+               if accept_token == 70 then
+                       return new TPipeeq.init_tk(location)
+               end
+               if accept_token == 71 then
+                       return new TCareteq.init_tk(location)
+               end
+               if accept_token == 72 then
+                       return new TAmpeq.init_tk(location)
+               end
+               if accept_token == 73 then
+                       return new TLleq.init_tk(location)
+               end
+               if accept_token == 74 then
+                       return new TGgeq.init_tk(location)
+               end
+               if accept_token == 75 then
+                       return new TDotdotdot.init_tk(location)
+               end
+               if accept_token == 76 then
+                       return new TDotdot.init_tk(location)
+               end
+               if accept_token == 77 then
+                       return new TDot.init_tk(location)
+               end
+               if accept_token == 78 then
+                       return new TPlus.init_tk(location)
+               end
+               if accept_token == 79 then
+                       return new TMinus.init_tk(location)
+               end
+               if accept_token == 80 then
+                       return new TStar.init_tk(location)
+               end
+               if accept_token == 81 then
+                       return new TStarstar.init_tk(location)
+               end
+               if accept_token == 82 then
+                       return new TSlash.init_tk(location)
+               end
+               if accept_token == 83 then
+                       return new TPercent.init_tk(location)
+               end
+               if accept_token == 84 then
+                       return new TPipe.init_tk(location)
+               end
+               if accept_token == 85 then
+                       return new TCaret.init_tk(location)
+               end
+               if accept_token == 86 then
+                       return new TAmp.init_tk(location)
+               end
+               if accept_token == 87 then
+                       return new TTilde.init_tk(location)
+               end
+               if accept_token == 88 then
+                       return new TEq.init_tk(location)
+               end
+               if accept_token == 89 then
+                       return new TNe.init_tk(location)
+               end
+               if accept_token == 90 then
+                       return new TLt.init_tk(location)
+               end
+               if accept_token == 91 then
+                       return new TLe.init_tk(location)
+               end
+               if accept_token == 92 then
+                       return new TLl.init_tk(location)
+               end
+               if accept_token == 93 then
+                       return new TGt.init_tk(location)
+               end
+               if accept_token == 94 then
+                       return new TGe.init_tk(location)
+               end
+               if accept_token == 95 then
+                       return new TGg.init_tk(location)
+               end
+               if accept_token == 96 then
+                       return new TStarship.init_tk(location)
+               end
+               if accept_token == 97 then
+                       return new TBang.init_tk(location)
+               end
+               if accept_token == 98 then
+                       return new TQuest.init_tk(location)
+               end
+               if accept_token == 99 then
+                       return new TAt.init_tk(location)
+               end
+               if accept_token == 100 then
+                       return new TSemi.init_tk(location)
+               end
+               if accept_token == 101 then
+                       return new TClassid.init_tk(location)
+               end
+               if accept_token == 102 then
+                       return new TId.init_tk(location)
+               end
+               if accept_token == 103 then
+                       return new TAttrid.init_tk(location)
+               end
+               if accept_token == 104 then
+                       return new TInteger.init_tk(location)
+               end
+               if accept_token == 105 then
+                       return new TFloat.init_tk(location)
+               end
+               if accept_token == 106 then
+                       return new TString.init_tk(location)
+               end
+               if accept_token == 107 then
+                       return new TStartString.init_tk(location)
+               end
+               if accept_token == 108 then
+                       return new TMidString.init_tk(location)
+               end
+               if accept_token == 109 then
+                       return new TEndString.init_tk(location)
+               end
+               if accept_token == 110 then
+                       return new TChar.init_tk(location)
+               end
+               if accept_token == 111 then
+                       return new TBadString.init_tk(location)
+               end
+               if accept_token == 112 then
+                       return new TBadTString.init_tk(location)
+               end
+               if accept_token == 113 then
+                       return new TBadChar.init_tk(location)
+               end
+               if accept_token == 114 then
+                       return new TExternCodeSegment.init_tk(location)
+               end
+               if accept_token == 115 then
+                       return new TBadExtern.init_tk(location)
                end
+               abort # unknown token index `accept_token`
        end
 end