X-Git-Url: http://nitlanguage.org diff --git a/src/parser/lexer.nit b/src/parser/lexer.nit index 6afe72c..09a6515 100644 --- a/src/parser/lexer.nit +++ b/src/parser/lexer.nit @@ -3,6 +3,7 @@ package lexer intrude import parser_nodes +private import tables redef class Token readable var _text: String @@ -1173,6 +1174,7 @@ 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 @@ -1217,8 +1219,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) @@ -1255,8 +1255,6 @@ 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 @@ -1293,22 +1291,20 @@ 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] + dfa_state = lexer_goto(old_state, offset+2) break end end @@ -1324,730 +1320,296 @@ 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_text = text.substring(0, accept_length) - var token = new TKwmodule.init_tk(token_text, location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + 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 + return new TKwuniversal.init_tk(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 TKwloop.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 TKwfor.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 TKwin.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 TKwand.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 TKwor.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 TKwnot.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 TKwreturn.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 TKwcontinue.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 TKwbreak.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 TKwabort.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 TKwassert.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 TKwnew.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 TKwisa.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 TKwonce.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 TKwsuper.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 TKwself.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 TKwtrue.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 TKwfalse.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 TKwnull.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 TKwas.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 TGt.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 TGe.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 TStarship.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 = new TBang.init_tk(location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TBang.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 TClassid.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 == 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 TId.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 == 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 TAttrid.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 == 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 TNumber.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 == 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 TFloat.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 == 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 TChar.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 == 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 TString.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 == 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 TStartString.init_tk(token_text, location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TStartString.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 TMidString.init_tk(token_text, location) - push_back(accept_length) - _pos = accept_pos - _line = accept_line - return token + return new TMidString.init_tk(token_text, location) end if accept_token == 87 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 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) @@ -2104,1252 +1666,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, 36], - [110, 110, 37], - [111, 111, 38], - [112, 112, 39], - [113, 113, 33], - [114, 114, 40], - [115, 115, 41], - [116, 116, 42], - [117, 117, 43], - [118, 118, 44], - [119, 119, 45], - [120, 122, 33], - [125, 125, 46] - ], - [ - [9, 9, 1], - [32, 32, 4] - ], - nil_array, - [ - [10, 10, 47] - ], - [ - [9, 32, -3] - ], - [ - [61, 61, 48] - ], - [ - [0, 9, 49], - [11, 12, 49], - [14, 33, 49], - [34, 34, 50], - [35, 91, 49], - [92, 92, 51], - [93, 122, 49], - [123, 123, 52], - [124, 255, 49] - ], - [ - [0, 9, 53], - [10, 10, 54], - [11, 12, 53], - [13, 13, 55], - [14, 255, 53] - ], - nil_array, - [ - [0, 9, 56], - [11, 12, 56], - [14, 38, 56], - [39, 39, 57], - [40, 255, 56] - ], - nil_array, - nil_array, - nil_array, - [ - [61, 61, 58] - ], - nil_array, - [ - [61, 61, 59] - ], - [ - [46, 46, 60], - [48, 57, 61] - ], - nil_array, - [ - [46, 46, 62], - [48, 57, 18] - ], - [ - [58, 58, 63] - ], - [ - [61, 61, 64] - ], - [ - [61, 61, 65] - ], - [ - [61, 61, 66] - ], - [ - [48, 57, 67], - [65, 90, 68], - [95, 95, 69], - [97, 122, 70] - ], - nil_array, - nil_array, - [ - [97, 122, 71] - ], - [ - [48, 57, 72], - [65, 90, 73], - [95, 95, 74], - [97, 97, 75], - [98, 98, 76], - [99, 109, 75], - [110, 110, 77], - [111, 114, 75], - [115, 115, 78], - [116, 122, 75] - ], - [ - [48, 95, -29], - [97, 113, 75], - [114, 114, 79], - [115, 122, 75] - ], - [ - [48, 95, -29], - [97, 107, 75], - [108, 108, 80], - [109, 110, 75], - [111, 111, 81], - [112, 122, 75] - ], - [ - [48, 95, -29], - [97, 110, 75], - [111, 111, 82], - [112, 122, 75] - ], - [ - [48, 107, -31], - [108, 108, 83], - [109, 109, 75], - [110, 110, 84], - [111, 119, 75], - [120, 120, 85], - [121, 122, 75] - ], - [ - [48, 95, -29], - [97, 97, 86], - [98, 110, 75], - [111, 111, 87], - [112, 116, 75], - [117, 117, 88], - [118, 122, 75] - ], - [ - [48, 95, -29], - [97, 122, 75] - ], - [ - [48, 95, -29], - [97, 101, 75], - [102, 102, 89], - [103, 108, 75], - [109, 109, 90], - [110, 110, 91], - [111, 114, 75], - [115, 115, 92], - [116, 122, 75] - ], - [ - [48, 95, -29], - [97, 97, 93], - [98, 110, 75], - [111, 111, 94], - [112, 122, 75] - ], - [ - [48, 110, -32], - [111, 111, 95], - [112, 122, 75] - ], - [ - [48, 95, -29], - [97, 100, 75], - [101, 101, 96], - [102, 110, 75], - [111, 111, 97], - [112, 116, 75], - [117, 117, 98], - [118, 122, 75] - ], - [ - [48, 95, -29], - [97, 109, 75], - [110, 110, 99], - [111, 113, 75], - [114, 114, 100], - [115, 122, 75] - ], - [ - [48, 95, -29], - [97, 97, 101], - [98, 113, 75], - [114, 114, 102], - [115, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 103], - [102, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 104], - [102, 111, 75], - [112, 112, 105], - [113, 116, 75], - [117, 117, 106], - [118, 122, 75] - ], - [ - [48, 95, -29], - [97, 103, 75], - [104, 104, 107], - [105, 113, 75], - [114, 114, 108], - [115, 120, 75], - [121, 121, 109], - [122, 122, 75] - ], - [ - [48, 109, -40], - [110, 110, 110], - [111, 122, 75] - ], - [ - [48, 95, -29], - [97, 97, 111], - [98, 122, 75] - ], - [ - [48, 103, -44], - [104, 104, 112], - [105, 113, 75], - [114, 114, 113], - [115, 122, 75] - ], - [ - [0, 9, 114], - [11, 12, 114], - [14, 33, 114], - [34, 34, 115], - [35, 91, 114], - [92, 92, 116], - [93, 122, 114], - [123, 123, 117], - [124, 255, 114] - ], - nil_array, - nil_array, - [ - [0, 255, -8] - ], - nil_array, - [ - [0, 9, 118], - [11, 12, 118], - [14, 255, 118] - ], - nil_array, - [ - [0, 255, -9] - ], - nil_array, - [ - [10, 10, 119] - ], - [ - [0, 255, -11] - ], - nil_array, - nil_array, - nil_array, - [ - [46, 46, 120] - ], - [ - [48, 57, 61] - ], - [ - [48, 57, 61] - ], - nil_array, - [ - [62, 62, 121] - ], - nil_array, - nil_array, - [ - [48, 122, -25] - ], - [ - [48, 122, -25] - ], - [ - [48, 122, -25] - ], - [ - [48, 122, -25] - ], - [ - [48, 57, 122], - [65, 90, 123], - [95, 95, 124], - [97, 122, 125] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 110, -32], - [111, 111, 126], - [112, 114, 75], - [115, 115, 127], - [116, 122, 75] - ], - [ - [48, 95, -29], - [97, 99, 75], - [100, 100, 128], - [101, 122, 75] - ], - [ - [48, 95, -29], - [97, 114, 75], - [115, 115, 129], - [116, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 130], - [102, 122, 75] - ], - [ - [48, 95, -29], - [97, 97, 131], - [98, 122, 75] - ], - [ - [48, 109, -40], - [110, 110, 132], - [111, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 114, -80], - [115, 115, 133], - [116, 122, 75] - ], - [ - [48, 99, -79], - [100, 100, 134], - [101, 122, 75] - ], - [ - [48, 95, -29], - [97, 115, 75], - [116, 116, 135], - [117, 122, 75] - ], - [ - [48, 107, -31], - [108, 108, 136], - [109, 122, 75] - ], - [ - [48, 113, -30], - [114, 114, 137], - [115, 122, 75] - ], - [ - [48, 109, -40], - [110, 110, 138], - [111, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 95, -29], - [97, 111, 75], - [112, 112, 139], - [113, 122, 75] - ], - [ - [48, 95, -29], - [97, 104, 75], - [105, 105, 140], - [106, 115, 75], - [116, 116, 141], - [117, 122, 75] - ], - [ - [48, 95, -29], - [97, 97, 142], - [98, 114, 75], - [115, 115, 143], - [116, 122, 75] - ], - [ - [48, 97, -29], - [98, 98, 144], - [99, 122, 75] - ], - [ - [48, 110, -32], - [111, 111, 145], - [112, 122, 75] - ], - [ - [48, 99, -79], - [100, 100, 146], - [101, 122, 75] - ], - [ - [48, 95, -29], - [97, 118, 75], - [119, 119, 147], - [120, 122, 75] - ], - [ - [48, 115, -87], - [116, 116, 148], - [117, 122, 75] - ], - [ - [48, 107, -31], - [108, 108, 149], - [109, 122, 75] - ], - [ - [48, 95, -29], - [97, 98, 75], - [99, 99, 150], - [100, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 98, -101], - [99, 99, 151], - [100, 122, 75] - ], - [ - [48, 104, -93], - [105, 105, 152], - [106, 110, 75], - [111, 111, 153], - [112, 122, 75] - ], - [ - [48, 95, -29], - [97, 97, 154], - [98, 99, 75], - [100, 100, 155], - [101, 115, 75], - [116, 116, 156], - [117, 122, 75] - ], - [ - [48, 107, -31], - [108, 108, 157], - [109, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 158], - [102, 122, 75] - ], - [ - [48, 111, -92], - [112, 112, 159], - [113, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 160], - [102, 122, 75] - ], - [ - [48, 95, -29], - [97, 116, 75], - [117, 117, 161], - [118, 122, 75] - ], - [ - [48, 111, -92], - [112, 112, 162], - [113, 122, 75] - ], - [ - [48, 104, -93], - [105, 105, 163], - [106, 122, 75] - ], - [ - [48, 113, -30], - [114, 114, 164], - [115, 122, 75] - ], - [ - [48, 104, -93], - [105, 105, 165], - [106, 122, 75] - ], - [ - [48, 104, -93], - [105, 105, 166], - [106, 122, 75] - ], - [ - [0, 255, -48] - ], - nil_array, - [ - [0, 9, 167], - [11, 12, 167], - [14, 255, 167] - ], - nil_array, - [ - [0, 255, -8] - ], - nil_array, - nil_array, - nil_array, - [ - [48, 122, -73] - ], - [ - [48, 122, -73] - ], - [ - [48, 122, -73] - ], - [ - [48, 122, -73] - ], - [ - [48, 113, -30], - [114, 114, 168], - [115, 122, 75] - ], - [ - [48, 115, -87], - [116, 116, 169], - [117, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 100, -39], - [101, 101, 170], - [102, 122, 75] - ], - [ - [48, 95, -29], - [97, 97, 171], - [98, 122, 75] - ], - [ - [48, 114, -80], - [115, 115, 172], - [116, 122, 75] - ], - [ - [48, 115, -87], - [116, 116, 173], - [117, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 174], - [102, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 100, -39], - [101, 101, 175], - [102, 122, 75] - ], - [ - [48, 114, -80], - [115, 115, 176], - [116, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 110, -32], - [111, 111, 177], - [112, 122, 75] - ], - [ - [48, 115, -87], - [116, 116, 178], - [117, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 179], - [102, 113, 75], - [114, 114, 180], - [115, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 100, -39], - [101, 101, 181], - [102, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 182], - [102, 122, 75] - ], - [ - [48, 111, -92], - [112, 112, 183], - [113, 122, 75] - ], - [ - [48, 116, -110], - [117, 117, 184], - [118, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 107, -31], - [108, 108, 185], - [109, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 186], - [102, 122, 75] - ], - [ - [48, 95, -29], - [97, 106, 75], - [107, 107, 187], - [108, 122, 75] - ], - [ - [48, 95, -29], - [97, 117, 75], - [118, 118, 188], - [119, 122, 75] - ], - [ - [48, 115, -87], - [116, 116, 189], - [117, 122, 75] - ], - [ - [48, 99, -79], - [100, 100, 190], - [101, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 191], - [102, 122, 75] - ], - [ - [48, 116, -110], - [117, 117, 192], - [118, 122, 75] - ], - [ - [48, 101, -36], - [102, 102, 193], - [103, 122, 75] - ], - [ - [48, 98, -101], - [99, 99, 194], - [100, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 195], - [102, 122, 75] - ], - [ - [48, 109, -40], - [110, 110, 196], - [111, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 197], - [102, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 198], - [102, 122, 75] - ], - [ - [48, 117, -154], - [118, 118, 199], - [119, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 107, -31], - [108, 108, 200], - [109, 122, 75] - ], - [ - [48, 115, -87], - [116, 116, 201], - [117, 122, 75] - ], - [ - [0, 255, -48] - ], - [ - [48, 115, -87], - [116, 116, 202], - [117, 122, 75] - ], - [ - [48, 113, -30], - [114, 114, 203], - [115, 122, 75] - ], - [ - [48, 113, -30], - [114, 114, 204], - [115, 122, 75] - ], - [ - [48, 106, -153], - [107, 107, 205], - [108, 122, 75] - ], - [ - [48, 114, -80], - [115, 115, 206], - [116, 122, 75] - ], - [ - [48, 104, -93], - [105, 105, 207], - [106, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 113, -30], - [114, 114, 208], - [115, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 209], - [102, 122, 75] - ], - [ - [48, 113, -30], - [114, 114, 210], - [115, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 113, -30], - [114, 114, 211], - [115, 122, 75] - ], - [ - [48, 116, -110], - [117, 117, 212], - [118, 122, 75] - ], - [ - [48, 115, -87], - [116, 116, 213], - [117, 122, 75] - ], - [ - [48, 107, -31], - [108, 108, 214], - [109, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 107, -31], - [108, 108, 215], - [109, 122, 75] - ], - [ - [48, 95, -29], - [97, 97, 216], - [98, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 95, -29], - [97, 97, 217], - [98, 122, 75] - ], - [ - [48, 95, -29], - [97, 97, 218], - [98, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 219], - [102, 122, 75] - ], - [ - [48, 95, -29], - [97, 97, 220], - [98, 122, 75] - ], - [ - [48, 101, -36], - [102, 102, 221], - [103, 122, 75] - ], - [ - [48, 113, -30], - [114, 114, 222], - [115, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 104, -93], - [105, 105, 223], - [106, 122, 75] - ], - [ - [48, 113, -30], - [114, 114, 224], - [115, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 100, -39], - [101, 101, 225], - [102, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 226], - [102, 122, 75] - ], - [ - [48, 95, -29], - [97, 97, 227], - [98, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 95, -29], - [97, 97, 228], - [98, 122, 75] - ], - [ - [48, 115, -87], - [116, 116, 229], - [117, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 109, -40], - [110, 110, 230], - [111, 122, 75] - ], - [ - [48, 109, -40], - [110, 110, 231], - [111, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 115, -87], - [116, 116, 232], - [117, 122, 75] - ], - [ - [48, 101, -36], - [102, 102, 233], - [103, 109, 75], - [110, 110, 234], - [111, 122, 75] - ], - [ - [48, 99, -79], - [100, 100, 235], - [101, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 100, -39], - [101, 101, 236], - [102, 122, 75] - ], - [ - [48, 97, -29], - [98, 98, 237], - [99, 122, 75] - ], - [ - [48, 95, -29], - [97, 102, 75], - [103, 103, 238], - [104, 122, 75] - ], - [ - [48, 115, -87], - [116, 116, 239], - [117, 122, 75] - ], - [ - [48, 98, -101], - [99, 99, 240], - [100, 122, 75] - ], - [ - [48, 97, -29], - [98, 98, 241], - [99, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 109, -40], - [110, 110, 242], - [111, 122, 75] - ], - [ - [48, 95, -29], - [97, 97, 243], - [98, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 113, -30], - [114, 114, 244], - [115, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 97, -29], - [98, 98, 245], - [99, 122, 75] - ], - [ - [48, 98, -101], - [99, 99, 246], - [100, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 116, -110], - [117, 117, 247], - [118, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 95, -29], - [97, 97, 248], - [98, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 100, -39], - [101, 101, 249], - [102, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 107, -31], - [108, 108, 250], - [109, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 251], - [102, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 252], - [102, 122, 75] - ], - [ - [48, 115, -87], - [116, 116, 253], - [117, 122, 75] - ], - [ - [48, 107, -31], - [108, 108, 254], - [109, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 107, -31], - [108, 108, 255], - [109, 122, 75] - ], - [ - [48, 114, -80], - [115, 115, 256], - [116, 122, 75] - ], - [ - [48, 107, -31], - [108, 108, 257], - [109, 122, 75] - ], - [ - [48, 115, -87], - [116, 116, 258], - [117, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 259], - [102, 122, 75] - ], - [ - [48, 98, -101], - [99, 99, 260], - [100, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 100, -39], - [101, 101, 261], - [102, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 100, -39], - [101, 101, 262], - [102, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 263], - [102, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 95, -29], - [97, 97, 264], - [98, 122, 75] - ], - [ - [48, 100, -39], - [101, 101, 265], - [102, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 122, -35] - ], - [ - [48, 100, -39], - [101, 101, 266], - [102, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 99, -79], - [100, 100, 267], - [101, 122, 75] - ], - [ - [48, 122, -35] - ], - [ - [48, 107, -31], - [108, 108, 268], - [109, 122, 75] - ], - [ - [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,77,-1,-1,69,-1,52,53,67,65,56,66,64,68,81,57,72,59,74,78,54,55,-1,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,-1,1,71,-1,84,-1,85,-1,2,2,-1,83,60,61,63,82,-1,58,73,70,75,78,78,78,78,80,79,79,79,79,79,79,48,79,79,79,16,79,79,79,79,79,79,25,79,31,15,79,79,79,79,79,79,79,33,79,79,79,79,79,79,79,79,79,79,79,79,79,-1,87,-1,86,-1,2,62,76,80,80,80,80,79,79,32,79,79,79,79,79,10,79,79,30,11,79,79,79,41,79,79,79,79,40,34,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,19,79,79,-1,79,79,79,79,79,79,27,79,79,79,13,79,79,79,79,29,79,47,42,79,79,79,79,79,79,44,79,79,26,45,12,79,79,79,38,79,79,37,5,79,79,46,79,79,79,50,51,79,79,79,79,79,79,14,79,79,43,79,28,79,79,39,79,21,4,79,20,79,3,79,79,79,79,79,35,79,79,79,79,79,79,24,79,3,23,79,79,9,79,79,6,36,79,49,79,17,79,18,7,22,8 - - ] - ] - end end