X-Git-Url: http://nitlanguage.org diff --git a/src/parser/lexer.nit b/src/parser/lexer.nit index fd1edf5..e66dc87 100644 --- a/src/parser/lexer.nit +++ b/src/parser/lexer.nit @@ -3,9 +3,10 @@ package lexer intrude import parser_nodes +private import tables redef class Token - readable writable var _text: String + readable var _text: String fun parser_index: Int is abstract @@ -40,15 +41,15 @@ redef class TComment end end -redef class TKwpackage +redef class TKwmodule redef fun parser_index: Int do return 2 end - init init_tk(loc: Location) + init init_tk(text: String, loc: Location) do - _text = once "package" + _text = text _location = loc end end @@ -105,15 +106,15 @@ redef class TKwinterface end end -redef class TKwuniversal +redef class TKwenum redef fun parser_index: Int do return 7 end - init init_tk(loc: Location) + init init_tk(text: String, loc: Location) do - _text = once "universal" + _text = text _location = loc end end @@ -378,7 +379,7 @@ redef class TKwwhile end end -redef class TKwfor +redef class TKwloop redef fun parser_index: Int do return 28 @@ -386,6 +387,19 @@ redef class TKwfor init init_tk(loc: Location) do + _text = once "loop" + _location = loc + end +end + +redef class TKwfor + redef fun parser_index: Int + do + return 29 + end + + init init_tk(loc: Location) + do _text = once "for" _location = loc end @@ -394,7 +408,7 @@ end redef class TKwin redef fun parser_index: Int do - return 29 + return 30 end init init_tk(loc: Location) @@ -407,7 +421,7 @@ end redef class TKwand redef fun parser_index: Int do - return 30 + return 31 end init init_tk(loc: Location) @@ -420,7 +434,7 @@ end redef class TKwor redef fun parser_index: Int do - return 31 + return 32 end init init_tk(loc: Location) @@ -433,7 +447,7 @@ end redef class TKwnot redef fun parser_index: Int do - return 32 + return 33 end init init_tk(loc: Location) @@ -446,7 +460,7 @@ end redef class TKwreturn redef fun parser_index: Int do - return 33 + return 34 end init init_tk(loc: Location) @@ -459,7 +473,7 @@ end redef class TKwcontinue redef fun parser_index: Int do - return 34 + return 35 end init init_tk(loc: Location) @@ -472,7 +486,7 @@ end redef class TKwbreak redef fun parser_index: Int do - return 35 + return 36 end init init_tk(loc: Location) @@ -485,7 +499,7 @@ end redef class TKwabort redef fun parser_index: Int do - return 36 + return 37 end init init_tk(loc: Location) @@ -498,7 +512,7 @@ end redef class TKwassert redef fun parser_index: Int do - return 37 + return 38 end init init_tk(loc: Location) @@ -511,7 +525,7 @@ end redef class TKwnew redef fun parser_index: Int do - return 38 + return 39 end init init_tk(loc: Location) @@ -524,7 +538,7 @@ end redef class TKwisa redef fun parser_index: Int do - return 39 + return 40 end init init_tk(loc: Location) @@ -537,7 +551,7 @@ end redef class TKwonce redef fun parser_index: Int do - return 40 + return 41 end init init_tk(loc: Location) @@ -550,7 +564,7 @@ end redef class TKwsuper redef fun parser_index: Int do - return 41 + return 42 end init init_tk(loc: Location) @@ -563,7 +577,7 @@ end redef class TKwself redef fun parser_index: Int do - return 42 + return 43 end init init_tk(loc: Location) @@ -576,7 +590,7 @@ end redef class TKwtrue redef fun parser_index: Int do - return 43 + return 44 end init init_tk(loc: Location) @@ -589,7 +603,7 @@ end redef class TKwfalse redef fun parser_index: Int do - return 44 + return 45 end init init_tk(loc: Location) @@ -602,7 +616,7 @@ end redef class TKwnull redef fun parser_index: Int do - return 45 + return 46 end init init_tk(loc: Location) @@ -615,25 +629,12 @@ end redef class TKwas redef fun parser_index: Int do - return 46 - end - - init init_tk(loc: Location) - do - _text = once "as" - _location = loc - end -end - -redef class TKwwith - redef fun parser_index: Int - do return 47 end init init_tk(loc: Location) do - _text = once "with" + _text = once "as" _location = loc end end @@ -963,7 +964,7 @@ redef class TLe end end -redef class TGt +redef class TLl redef fun parser_index: Int do return 73 @@ -971,6 +972,19 @@ redef class TGt init init_tk(loc: Location) do + _text = once "<<" + _location = loc + end +end + +redef class TGt + redef fun parser_index: Int + do + return 74 + end + + init init_tk(loc: Location) + do _text = once ">" _location = loc end @@ -979,7 +993,7 @@ end redef class TGe redef fun parser_index: Int do - return 74 + return 75 end init init_tk(loc: Location) @@ -989,10 +1003,23 @@ redef class TGe end end +redef class TGg + redef fun parser_index: Int + do + return 76 + end + + init init_tk(loc: Location) + do + _text = once ">>" + _location = loc + end +end + redef class TStarship redef fun parser_index: Int do - return 75 + return 77 end init init_tk(loc: Location) @@ -1002,10 +1029,23 @@ redef class TStarship end end +redef class TBang + redef fun parser_index: Int + do + return 78 + end + + init init_tk(loc: Location) + do + _text = once "!" + _location = loc + end +end + redef class TClassid redef fun parser_index: Int do - return 76 + return 79 end init init_tk(text: String, loc: Location) @@ -1018,7 +1058,7 @@ end redef class TId redef fun parser_index: Int do - return 77 + return 80 end init init_tk(text: String, loc: Location) @@ -1031,7 +1071,7 @@ end redef class TAttrid redef fun parser_index: Int do - return 78 + return 81 end init init_tk(text: String, loc: Location) @@ -1044,7 +1084,7 @@ end redef class TNumber redef fun parser_index: Int do - return 79 + return 82 end init init_tk(text: String, loc: Location) @@ -1057,7 +1097,7 @@ end redef class TFloat redef fun parser_index: Int do - return 80 + return 83 end init init_tk(text: String, loc: Location) @@ -1070,7 +1110,7 @@ end redef class TChar redef fun parser_index: Int do - return 81 + return 84 end init init_tk(text: String, loc: Location) @@ -1083,7 +1123,7 @@ end redef class TString redef fun parser_index: Int do - return 82 + return 85 end init init_tk(text: String, loc: Location) @@ -1096,7 +1136,7 @@ end redef class TStartString redef fun parser_index: Int do - return 83 + return 86 end init init_tk(text: String, loc: Location) @@ -1109,7 +1149,7 @@ end redef class TMidString redef fun parser_index: Int do - return 84 + return 87 end init init_tk(text: String, loc: Location) @@ -1122,7 +1162,7 @@ end redef class TEndString redef fun parser_index: Int do - return 85 + return 88 end init init_tk(text: String, loc: Location) @@ -1136,7 +1176,7 @@ end redef class EOF redef fun parser_index: Int do - return 86 + return 89 end init(loc: Location) @@ -1147,7 +1187,7 @@ redef class EOF end redef class AError - readable writable var _message: String + readable var _message: String init init_error(message: String, loc: Location) do @@ -1160,6 +1200,7 @@ end # The lexer extract NIT tokens from an input stream. # It is better user with the Parser class Lexer + super TablesCapable # Last peeked token var _token: nullable Token @@ -1204,8 +1245,6 @@ class Lexer _stream = stream _stream_pos = -1 _stream_buf = new Buffer - build_goto_table - build_accept_table end # Give the next token (but do not consume it) @@ -1225,7 +1264,7 @@ class Lexer result = get_token end _token = null - return result.as(not null) + return result end # Get a token, or null if it is discarded @@ -1242,12 +1281,10 @@ class Lexer var accept_pos = -1 var accept_line = -1 - var goto_table = _goto_table[_state] - var accept = _accept_table[_state] var text = _text text.clear - while true do + loop var c = get_char if c != -1 then @@ -1272,8 +1309,7 @@ class Lexer text.add(c.ascii) - var first_loop = true # aka until - while dfa_state < -1 or first_loop do + loop var old_state = dfa_state if dfa_state < -1 then old_state = -2 - dfa_state @@ -1281,27 +1317,25 @@ class Lexer dfa_state = -1 - var tmp0 = goto_table[old_state] var low = 0 - var high = tmp0.length - 1 + var high = lexer_goto(old_state, 0) - 1 if high >= 0 then - var tmp1 = tmp0.intern_items while low <= high do var middle = (low + high) / 2 - var tmp2 = tmp1[middle].intern_items + var offset = middle * 3 + 1 # +1 because length is at 0 - if c < tmp2[0] then + if c < lexer_goto(old_state, offset) then high = middle - 1 - else if c > tmp2[1] then + else if c > lexer_goto(old_state, offset+1) then low = middle + 1 else - dfa_state = tmp2[2] - low = high + 1 # aka break + dfa_state = lexer_goto(old_state, offset+2) + break end end end - first_loop = false # aka until + if dfa_state > -2 then break end _cr = cr @@ -1312,721 +1346,303 @@ class Lexer end if dfa_state >= 0 then - if accept[dfa_state] != -1 then + var tok = lexer_accept(dfa_state) + if tok != -1 then accept_state = dfa_state - accept_token = accept[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 - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - push_back(accept_length) - _pos = accept_pos - _line = accept_line return null end if accept_token == 1 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) var token_text = text.substring(0, accept_length) - var token = new TEol.init_tk(token_text, location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TEol.init_tk(token_text, location) end if accept_token == 2 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) var token_text = text.substring(0, accept_length) - var token = new TComment.init_tk(token_text, location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TComment.init_tk(token_text, location) end if accept_token == 3 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwpackage.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + var token_text = text.substring(0, accept_length) + return new TKwmodule.init_tk(token_text, location) end if accept_token == 4 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwimport.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwimport.init_tk(location) end if accept_token == 5 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwclass.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwclass.init_tk(location) end if accept_token == 6 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwabstract.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwabstract.init_tk(location) end if accept_token == 7 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwinterface.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwinterface.init_tk(location) end if accept_token == 8 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwuniversal.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + var token_text = text.substring(0, accept_length) + return new TKwenum.init_tk(token_text, location) end if accept_token == 9 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwspecial.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwspecial.init_tk(location) end if accept_token == 10 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwend.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwend.init_tk(location) end if accept_token == 11 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwmeth.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwmeth.init_tk(location) end if accept_token == 12 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwtype.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwtype.init_tk(location) end if accept_token == 13 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwinit.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwinit.init_tk(location) end if accept_token == 14 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwredef.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwredef.init_tk(location) end if accept_token == 15 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwis.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwis.init_tk(location) end if accept_token == 16 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwdo.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwdo.init_tk(location) end if accept_token == 17 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwreadable.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwreadable.init_tk(location) end if accept_token == 18 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwwritable.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwwritable.init_tk(location) end if accept_token == 19 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwvar.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwvar.init_tk(location) end if accept_token == 20 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwintern.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwintern.init_tk(location) end if accept_token == 21 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwextern.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwextern.init_tk(location) end if accept_token == 22 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwprotected.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwprotected.init_tk(location) end if accept_token == 23 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwprivate.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwprivate.init_tk(location) end if accept_token == 24 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwintrude.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwintrude.init_tk(location) end if accept_token == 25 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwif.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwif.init_tk(location) end if accept_token == 26 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwthen.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwthen.init_tk(location) end if accept_token == 27 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwelse.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwelse.init_tk(location) end if accept_token == 28 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwwhile.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwwhile.init_tk(location) end if accept_token == 29 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwfor.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwloop.init_tk(location) end if accept_token == 30 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwin.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwfor.init_tk(location) end if accept_token == 31 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwand.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwin.init_tk(location) end if accept_token == 32 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwor.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwand.init_tk(location) end if accept_token == 33 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwnot.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwor.init_tk(location) end if accept_token == 34 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwreturn.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwnot.init_tk(location) end if accept_token == 35 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwcontinue.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwreturn.init_tk(location) end if accept_token == 36 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwbreak.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwcontinue.init_tk(location) end if accept_token == 37 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwabort.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwbreak.init_tk(location) end if accept_token == 38 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwassert.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwabort.init_tk(location) end if accept_token == 39 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwnew.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwassert.init_tk(location) end if accept_token == 40 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwisa.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwnew.init_tk(location) end if accept_token == 41 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwonce.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwisa.init_tk(location) end if accept_token == 42 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwsuper.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwonce.init_tk(location) end if accept_token == 43 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwself.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwsuper.init_tk(location) end if accept_token == 44 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwtrue.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwself.init_tk(location) end if accept_token == 45 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwfalse.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwtrue.init_tk(location) end if accept_token == 46 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwnull.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwfalse.init_tk(location) end if accept_token == 47 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwas.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwnull.init_tk(location) end if accept_token == 48 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwwith.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwas.init_tk(location) end if accept_token == 49 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwnullable.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwnullable.init_tk(location) end if accept_token == 50 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwisset.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwisset.init_tk(location) end if accept_token == 51 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TKwlabel.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TKwlabel.init_tk(location) end if accept_token == 52 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TOpar.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TOpar.init_tk(location) end if accept_token == 53 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TCpar.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TCpar.init_tk(location) end if accept_token == 54 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TObra.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TObra.init_tk(location) end if accept_token == 55 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TCbra.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TCbra.init_tk(location) end if accept_token == 56 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TComma.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TComma.init_tk(location) end if accept_token == 57 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TColumn.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TColumn.init_tk(location) end if accept_token == 58 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TQuad.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TQuad.init_tk(location) end if accept_token == 59 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TAssign.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TAssign.init_tk(location) end if accept_token == 60 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TPluseq.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TPluseq.init_tk(location) end if accept_token == 61 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TMinuseq.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TMinuseq.init_tk(location) end if accept_token == 62 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TDotdotdot.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TDotdotdot.init_tk(location) end if accept_token == 63 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TDotdot.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TDotdot.init_tk(location) end if accept_token == 64 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TDot.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TDot.init_tk(location) end if accept_token == 65 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TPlus.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TPlus.init_tk(location) end if accept_token == 66 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TMinus.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TMinus.init_tk(location) end if accept_token == 67 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TStar.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TStar.init_tk(location) end if accept_token == 68 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TSlash.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TSlash.init_tk(location) end if accept_token == 69 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TPercent.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TPercent.init_tk(location) end if accept_token == 70 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TEq.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TEq.init_tk(location) end if accept_token == 71 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TNe.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TNe.init_tk(location) end if accept_token == 72 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TLt.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TLt.init_tk(location) end if accept_token == 73 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TLe.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TLe.init_tk(location) end if accept_token == 74 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TGt.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TLl.init_tk(location) end if accept_token == 75 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TGe.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TGt.init_tk(location) end if accept_token == 76 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token = new TStarship.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TGe.init_tk(location) end if accept_token == 77 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token_text = text.substring(0, accept_length) - var token = new TClassid.init_tk(token_text, location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TGg.init_tk(location) end if accept_token == 78 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token_text = text.substring(0, accept_length) - var token = new TId.init_tk(token_text, location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TStarship.init_tk(location) end if accept_token == 79 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) - var token_text = text.substring(0, accept_length) - var token = new TAttrid.init_tk(token_text, location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TBang.init_tk(location) end if accept_token == 80 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) var token_text = text.substring(0, accept_length) - var token = new TNumber.init_tk(token_text, location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TClassid.init_tk(token_text, location) end if accept_token == 81 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) var token_text = text.substring(0, accept_length) - var token = new TFloat.init_tk(token_text, location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TId.init_tk(token_text, location) end if accept_token == 82 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) var token_text = text.substring(0, accept_length) - var token = new TChar.init_tk(token_text, location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TAttrid.init_tk(token_text, location) end if accept_token == 83 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) var token_text = text.substring(0, accept_length) - var token = new TString.init_tk(token_text, location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TNumber.init_tk(token_text, location) end if accept_token == 84 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) var token_text = text.substring(0, accept_length) - var token = new TStartString.init_tk(token_text, location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TFloat.init_tk(token_text, location) end if accept_token == 85 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) var token_text = text.substring(0, accept_length) - var token = new TMidString.init_tk(token_text, location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TChar.init_tk(token_text, location) end if accept_token == 86 then - var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos) var token_text = text.substring(0, accept_length) - var token = new TEndString.init_tk(token_text, location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + 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) @@ -2040,7 +1656,6 @@ class Lexer end end end - return null end # Read the next character. @@ -2082,1223 +1697,5 @@ class Lexer i = i - 1 end end - - var _goto_table: Array[Array[Array[Array[Int]]]] - private fun build_goto_table - do - _goto_table = once [ - [ - [ - [9, 9, 1], - [10, 10, 2], - [13, 13, 3], - [32, 32, 4], - [33, 33, 5], - [34, 34, 6], - [35, 35, 7], - [37, 37, 8], - [39, 39, 9], - [40, 40, 10], - [41, 41, 11], - [42, 42, 12], - [43, 43, 13], - [44, 44, 14], - [45, 45, 15], - [46, 46, 16], - [47, 47, 17], - [48, 57, 18], - [58, 58, 19], - [60, 60, 20], - [61, 61, 21], - [62, 62, 22], - [65, 90, 23], - [91, 91, 24], - [93, 93, 25], - [95, 95, 26], - [97, 97, 27], - [98, 98, 28], - [99, 99, 29], - [100, 100, 30], - [101, 101, 31], - [102, 102, 32], - [103, 104, 33], - [105, 105, 34], - [106, 107, 33], - [108, 108, 35], - [109, 109, 33], - [110, 110, 36], - [111, 111, 37], - [112, 112, 38], - [113, 113, 33], - [114, 114, 39], - [115, 115, 40], - [116, 116, 41], - [117, 117, 42], - [118, 118, 43], - [119, 119, 44], - [120, 122, 33], - [125, 125, 45] - ], - [ - [9, 9, 1], - [32, 32, 4] - ], - nil_array, - [ - [10, 10, 46] - ], - [ - [9, 32, -3] - ], - [ - [61, 61, 47] - ], - [ - [0, 9, 48], - [11, 12, 48], - [14, 33, 48], - [34, 34, 49], - [35, 91, 48], - [92, 92, 50], - [93, 122, 48], - [123, 123, 51], - [124, 255, 48] - ], - [ - [0, 9, 52], - [10, 10, 53], - [11, 12, 52], - [13, 13, 54], - [14, 255, 52] - ], - nil_array, - [ - [0, 9, 55], - [11, 12, 55], - [14, 38, 55], - [39, 39, 56], - [40, 255, 55] - ], - nil_array, - nil_array, - nil_array, - [ - [61, 61, 57] - ], - nil_array, - [ - [61, 61, 58] - ], - [ - [46, 46, 59], - [48, 57, 60] - ], - nil_array, - [ - [46, 46, 61], - [48, 57, 18] - ], - [ - [58, 58, 62] - ], - [ - [61, 61, 63] - ], - [ - [61, 61, 64] - ], - [ - [61, 61, 65] - ], - [ - [48, 57, 66], - [65, 90, 67], - [95, 95, 68], - [97, 122, 69] - ], - nil_array, - nil_array, - [ - [97, 122, 70] - ], - [ - [48, 57, 71], - [65, 90, 72], - [95, 95, 73], - [97, 97, 74], - [98, 98, 75], - [99, 109, 74], - [110, 110, 76], - [111, 114, 74], - [115, 115, 77], - [116, 122, 74] - ], - [ - [48, 95, -29], - [97, 113, 74], - [114, 114, 78], - [115, 122, 74] - ], - [ - [48, 95, -29], - [97, 107, 74], - [108, 108, 79], - [109, 110, 74], - [111, 111, 80], - [112, 122, 74] - ], - [ - [48, 95, -29], - [97, 110, 74], - [111, 111, 81], - [112, 122, 74] - ], - [ - [48, 107, -31], - [108, 108, 82], - [109, 109, 74], - [110, 110, 83], - [111, 119, 74], - [120, 120, 84], - [121, 122, 74] - ], - [ - [48, 95, -29], - [97, 97, 85], - [98, 110, 74], - [111, 111, 86], - [112, 116, 74], - [117, 117, 87], - [118, 122, 74] - ], - [ - [48, 95, -29], - [97, 122, 74] - ], - [ - [48, 95, -29], - [97, 101, 74], - [102, 102, 88], - [103, 108, 74], - [109, 109, 89], - [110, 110, 90], - [111, 114, 74], - [115, 115, 91], - [116, 122, 74] - ], - [ - [48, 95, -29], - [97, 97, 92], - [98, 122, 74] - ], - [ - [48, 95, -29], - [97, 100, 74], - [101, 101, 93], - [102, 110, 74], - [111, 111, 94], - [112, 116, 74], - [117, 117, 95], - [118, 122, 74] - ], - [ - [48, 95, -29], - [97, 109, 74], - [110, 110, 96], - [111, 113, 74], - [114, 114, 97], - [115, 122, 74] - ], - [ - [48, 95, -29], - [97, 97, 98], - [98, 113, 74], - [114, 114, 99], - [115, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 100], - [102, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 101], - [102, 111, 74], - [112, 112, 102], - [113, 116, 74], - [117, 117, 103], - [118, 122, 74] - ], - [ - [48, 95, -29], - [97, 103, 74], - [104, 104, 104], - [105, 113, 74], - [114, 114, 105], - [115, 120, 74], - [121, 121, 106], - [122, 122, 74] - ], - [ - [48, 109, -39], - [110, 110, 107], - [111, 122, 74] - ], - [ - [48, 95, -29], - [97, 97, 108], - [98, 122, 74] - ], - [ - [48, 103, -43], - [104, 104, 109], - [105, 105, 110], - [106, 113, 74], - [114, 114, 111], - [115, 122, 74] - ], - [ - [0, 9, 112], - [11, 12, 112], - [14, 33, 112], - [34, 34, 113], - [35, 91, 112], - [92, 92, 114], - [93, 122, 112], - [123, 123, 115], - [124, 255, 112] - ], - nil_array, - nil_array, - [ - [0, 255, -8] - ], - nil_array, - [ - [0, 9, 116], - [11, 12, 116], - [14, 255, 116] - ], - nil_array, - [ - [0, 255, -9] - ], - nil_array, - [ - [10, 10, 117] - ], - [ - [0, 255, -11] - ], - nil_array, - nil_array, - nil_array, - [ - [46, 46, 118] - ], - [ - [48, 57, 60] - ], - [ - [48, 57, 60] - ], - nil_array, - [ - [62, 62, 119] - ], - nil_array, - nil_array, - [ - [48, 122, -25] - ], - [ - [48, 122, -25] - ], - [ - [48, 122, -25] - ], - [ - [48, 122, -25] - ], - [ - [48, 57, 120], - [65, 90, 121], - [95, 95, 122], - [97, 122, 123] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 110, -32], - [111, 111, 124], - [112, 114, 74], - [115, 115, 125], - [116, 122, 74] - ], - [ - [48, 95, -29], - [97, 99, 74], - [100, 100, 126], - [101, 122, 74] - ], - [ - [48, 95, -29], - [97, 114, 74], - [115, 115, 127], - [116, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 128], - [102, 122, 74] - ], - [ - [48, 95, -29], - [97, 97, 129], - [98, 122, 74] - ], - [ - [48, 109, -39], - [110, 110, 130], - [111, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 114, -79], - [115, 115, 131], - [116, 122, 74] - ], - [ - [48, 99, -78], - [100, 100, 132], - [101, 122, 74] - ], - [ - [48, 95, -29], - [97, 115, 74], - [116, 116, 133], - [117, 122, 74] - ], - [ - [48, 107, -31], - [108, 108, 134], - [109, 122, 74] - ], - [ - [48, 113, -30], - [114, 114, 135], - [115, 122, 74] - ], - [ - [48, 109, -39], - [110, 110, 136], - [111, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 95, -29], - [97, 111, 74], - [112, 112, 137], - [113, 122, 74] - ], - [ - [48, 95, -29], - [97, 104, 74], - [105, 105, 138], - [106, 115, 74], - [116, 116, 139], - [117, 122, 74] - ], - [ - [48, 95, -29], - [97, 97, 140], - [98, 114, 74], - [115, 115, 141], - [116, 122, 74] - ], - [ - [48, 97, -29], - [98, 98, 142], - [99, 122, 74] - ], - [ - [48, 95, -29], - [97, 118, 74], - [119, 119, 143], - [120, 122, 74] - ], - [ - [48, 115, -86], - [116, 116, 144], - [117, 122, 74] - ], - [ - [48, 107, -31], - [108, 108, 145], - [109, 122, 74] - ], - [ - [48, 95, -29], - [97, 98, 74], - [99, 99, 146], - [100, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 98, -98], - [99, 99, 147], - [100, 122, 74] - ], - [ - [48, 104, -92], - [105, 105, 148], - [106, 110, 74], - [111, 111, 149], - [112, 122, 74] - ], - [ - [48, 95, -29], - [97, 97, 150], - [98, 99, 74], - [100, 100, 151], - [101, 115, 74], - [116, 116, 152], - [117, 122, 74] - ], - [ - [48, 107, -31], - [108, 108, 153], - [109, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 154], - [102, 122, 74] - ], - [ - [48, 111, -91], - [112, 112, 155], - [113, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 156], - [102, 122, 74] - ], - [ - [48, 95, -29], - [97, 116, 74], - [117, 117, 157], - [118, 122, 74] - ], - [ - [48, 111, -91], - [112, 112, 158], - [113, 122, 74] - ], - [ - [48, 104, -92], - [105, 105, 159], - [106, 122, 74] - ], - [ - [48, 113, -30], - [114, 114, 160], - [115, 122, 74] - ], - [ - [48, 104, -92], - [105, 105, 161], - [106, 122, 74] - ], - [ - [48, 115, -86], - [116, 116, 162], - [117, 122, 74] - ], - [ - [48, 104, -92], - [105, 105, 163], - [106, 122, 74] - ], - [ - [0, 255, -47] - ], - nil_array, - [ - [0, 9, 164], - [11, 12, 164], - [14, 255, 164] - ], - nil_array, - [ - [0, 255, -8] - ], - nil_array, - nil_array, - nil_array, - [ - [48, 122, -72] - ], - [ - [48, 122, -72] - ], - [ - [48, 122, -72] - ], - [ - [48, 122, -72] - ], - [ - [48, 113, -30], - [114, 114, 165], - [115, 122, 74] - ], - [ - [48, 115, -86], - [116, 116, 166], - [117, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 100, -38], - [101, 101, 167], - [102, 122, 74] - ], - [ - [48, 95, -29], - [97, 97, 168], - [98, 122, 74] - ], - [ - [48, 114, -79], - [115, 115, 169], - [116, 122, 74] - ], - [ - [48, 115, -86], - [116, 116, 170], - [117, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 171], - [102, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 100, -38], - [101, 101, 172], - [102, 122, 74] - ], - [ - [48, 114, -79], - [115, 115, 173], - [116, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 110, -32], - [111, 111, 174], - [112, 122, 74] - ], - [ - [48, 115, -86], - [116, 116, 175], - [117, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 176], - [102, 113, 74], - [114, 114, 177], - [115, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 100, -38], - [101, 101, 178], - [102, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 179], - [102, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 107, -31], - [108, 108, 180], - [109, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 181], - [102, 122, 74] - ], - [ - [48, 95, -29], - [97, 106, 74], - [107, 107, 182], - [108, 122, 74] - ], - [ - [48, 95, -29], - [97, 117, 74], - [118, 118, 183], - [119, 122, 74] - ], - [ - [48, 115, -86], - [116, 116, 184], - [117, 122, 74] - ], - [ - [48, 99, -78], - [100, 100, 185], - [101, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 186], - [102, 122, 74] - ], - [ - [48, 116, -107], - [117, 117, 187], - [118, 122, 74] - ], - [ - [48, 101, -36], - [102, 102, 188], - [103, 122, 74] - ], - [ - [48, 98, -98], - [99, 99, 189], - [100, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 190], - [102, 122, 74] - ], - [ - [48, 109, -39], - [110, 110, 191], - [111, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 192], - [102, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 193], - [102, 122, 74] - ], - [ - [48, 117, -150], - [118, 118, 194], - [119, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 107, -31], - [108, 108, 195], - [109, 122, 74] - ], - [ - [48, 103, -43], - [104, 104, 196], - [105, 122, 74] - ], - [ - [48, 115, -86], - [116, 116, 197], - [117, 122, 74] - ], - [ - [0, 255, -47] - ], - [ - [48, 115, -86], - [116, 116, 198], - [117, 122, 74] - ], - [ - [48, 113, -30], - [114, 114, 199], - [115, 122, 74] - ], - [ - [48, 113, -30], - [114, 114, 200], - [115, 122, 74] - ], - [ - [48, 106, -149], - [107, 107, 201], - [108, 122, 74] - ], - [ - [48, 114, -79], - [115, 115, 202], - [116, 122, 74] - ], - [ - [48, 104, -92], - [105, 105, 203], - [106, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 113, -30], - [114, 114, 204], - [115, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 205], - [102, 122, 74] - ], - [ - [48, 113, -30], - [114, 114, 206], - [115, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 113, -30], - [114, 114, 207], - [115, 122, 74] - ], - [ - [48, 116, -107], - [117, 117, 208], - [118, 122, 74] - ], - [ - [48, 115, -86], - [116, 116, 209], - [117, 122, 74] - ], - [ - [48, 107, -31], - [108, 108, 210], - [109, 122, 74] - ], - [ - [48, 95, -29], - [97, 97, 211], - [98, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 95, -29], - [97, 97, 212], - [98, 122, 74] - ], - [ - [48, 95, -29], - [97, 97, 213], - [98, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 214], - [102, 122, 74] - ], - [ - [48, 95, -29], - [97, 97, 215], - [98, 122, 74] - ], - [ - [48, 101, -36], - [102, 102, 216], - [103, 122, 74] - ], - [ - [48, 113, -30], - [114, 114, 217], - [115, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 104, -92], - [105, 105, 218], - [106, 122, 74] - ], - [ - [48, 113, -30], - [114, 114, 219], - [115, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 100, -38], - [101, 101, 220], - [102, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 221], - [102, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 95, -29], - [97, 97, 222], - [98, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 95, -29], - [97, 97, 223], - [98, 122, 74] - ], - [ - [48, 115, -86], - [116, 116, 224], - [117, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 109, -39], - [110, 110, 225], - [111, 122, 74] - ], - [ - [48, 109, -39], - [110, 110, 226], - [111, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 115, -86], - [116, 116, 227], - [117, 122, 74] - ], - [ - [48, 101, -36], - [102, 102, 228], - [103, 109, 74], - [110, 110, 229], - [111, 122, 74] - ], - [ - [48, 99, -78], - [100, 100, 230], - [101, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 97, -29], - [98, 98, 231], - [99, 122, 74] - ], - [ - [48, 95, -29], - [97, 102, 74], - [103, 103, 232], - [104, 122, 74] - ], - [ - [48, 115, -86], - [116, 116, 233], - [117, 122, 74] - ], - [ - [48, 98, -98], - [99, 99, 234], - [100, 122, 74] - ], - [ - [48, 97, -29], - [98, 98, 235], - [99, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 109, -39], - [110, 110, 236], - [111, 122, 74] - ], - [ - [48, 95, -29], - [97, 97, 237], - [98, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 113, -30], - [114, 114, 238], - [115, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 97, -29], - [98, 98, 239], - [99, 122, 74] - ], - [ - [48, 98, -98], - [99, 99, 240], - [100, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 116, -107], - [117, 117, 241], - [118, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 95, -29], - [97, 97, 242], - [98, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 100, -38], - [101, 101, 243], - [102, 122, 74] - ], - [ - [48, 107, -31], - [108, 108, 244], - [109, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 245], - [102, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 246], - [102, 122, 74] - ], - [ - [48, 115, -86], - [116, 116, 247], - [117, 122, 74] - ], - [ - [48, 107, -31], - [108, 108, 248], - [109, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 107, -31], - [108, 108, 249], - [109, 122, 74] - ], - [ - [48, 114, -79], - [115, 115, 250], - [116, 122, 74] - ], - [ - [48, 107, -31], - [108, 108, 251], - [109, 122, 74] - ], - [ - [48, 115, -86], - [116, 116, 252], - [117, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 253], - [102, 122, 74] - ], - [ - [48, 98, -98], - [99, 99, 254], - [100, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 100, -38], - [101, 101, 255], - [102, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 100, -38], - [101, 101, 256], - [102, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 257], - [102, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 95, -29], - [97, 97, 258], - [98, 122, 74] - ], - [ - [48, 100, -38], - [101, 101, 259], - [102, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 100, -38], - [101, 101, 260], - [102, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 99, -78], - [100, 100, 261], - [101, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 107, -31], - [108, 108, 262], - [109, 122, 74] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ] - ] - ] - end - - private fun nil_array: Array[Array[Int]] - do - return once new Array[Array[Int]] - end - - var _accept_table: Array[Array[Int]] - private fun build_accept_table do - _accept_table = once [ - [ - -1,0,1,1,0,-1,-1,-1,69,-1,52,53,67,65,56,66,64,68,80,57,72,59,74,77,54,55,-1,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,-1,1,71,-1,83,-1,84,-1,2,2,-1,82,60,61,63,81,-1,58,73,70,75,77,77,77,77,79,78,78,78,78,78,78,47,78,78,78,16,78,78,78,78,78,78,25,78,30,15,78,78,78,78,78,32,78,78,78,78,78,78,78,78,78,78,78,78,78,78,-1,86,-1,85,-1,2,62,76,79,79,79,79,78,78,31,78,78,78,78,78,10,78,78,29,11,78,78,78,40,78,78,39,33,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,19,78,78,78,-1,78,78,78,78,78,78,27,78,78,78,13,78,78,78,78,46,41,78,78,78,78,78,78,43,78,78,26,44,12,78,78,48,78,37,78,78,36,5,78,78,45,78,78,78,50,51,78,78,78,78,78,14,78,78,42,78,28,78,78,38,78,21,4,78,20,78,78,78,78,78,78,34,78,78,78,78,78,78,24,78,3,23,78,78,9,78,78,6,35,78,49,78,17,78,18,7,22,8 - - ] - ] - end end