public void mCOMENTARIO(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; IToken _token = null; int _begin = text.Length; _ttype = COMENTARIO; match("{"); { // ( ... )* for (;;) { if ((tokenSet_1_.member(cached_LA1)) && (tokenSet_1_.member(cached_LA2))) { { match(tokenSet_1_); } } else { goto _loop40_breakloop; } } _loop40_breakloop :; } // ( ... )* match("}"); if (0 == inputState.guessing) { _ttype = Token.SKIP; } if (_createToken && (null == _token) && (_ttype != Token.SKIP)) { _token = makeToken(_ttype); _token.setText(text.ToString(_begin, text.Length - _begin)); } returnToken_ = _token; }
/** I "!=" je BINOP ali je faktoriziran u EMARK pravilo*/ public void mCONST(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; IToken _token = null; int _begin = text.Length; _ttype = CONST; switch (cached_LA1) { case '0': { match('0'); break; } case '1': { match('1'); break; } default: { throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn()); } } if (_createToken && (null == _token) && (_ttype != Token.SKIP)) { _token = makeToken(_ttype); _token.setText(text.ToString(_begin, text.Length - _begin)); } returnToken_ = _token; }
public void mINT(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; IToken _token=null; int _begin=text.Length; _ttype = INT; { // ( ... )+ int _cnt18=0; for (;;) { if (((cached_LA1 >= '0' && cached_LA1 <= '9'))) { mDIGIT(false); } else { if (_cnt18 >= 1) { goto _loop18_breakloop; } else { throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn());; } } _cnt18++; } _loop18_breakloop: ; } // ( ... )+ if (_createToken && (null == _token) && (_ttype != Token.SKIP)) { _token = makeToken(_ttype); _token.setText(text.ToString(_begin, text.Length-_begin)); } returnToken_ = _token; }
public void mESCAPED_CHAR(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; IToken _token = null; var _begin = text.Length; _ttype = ESCAPED_CHAR; mBACKSLASH(false); { switch (cached_LA1) { case '\\': { mBACKSLASH(false); break; } case '"': { mDQUOTE(false); break; } case ';': { mSEMICOLON(false); break; } case ',': { mCOMMA(false); break; } case 'N': { match("N"); break; } case 'n': { match("n"); break; } default: { throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn()); } } } if (_createToken && (null == _token) && (_ttype != Token.SKIP)) { _token = makeToken(_ttype); _token.setText(text.ToString(_begin, text.Length - _begin)); } returnToken_ = _token; }
protected void mDIGIT(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; IToken _token=null; int _begin=text.Length; _ttype = DIGIT; matchRange('0','9'); if (_createToken && (null == _token) && (_ttype != Token.SKIP)) { _token = makeToken(_ttype); _token.setText(text.ToString(_begin, text.Length-_begin)); } returnToken_ = _token; }
public void mSEMI(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; IToken _token=null; int _begin=text.Length; _ttype = SEMI; match(';'); if (_createToken && (null == _token) && (_ttype != Token.SKIP)) { _token = makeToken(_ttype); _token.setText(text.ToString(_begin, text.Length-_begin)); } returnToken_ = _token; }
protected void mUNDERSCORE(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; IToken _token = null; var _begin = text.Length; _ttype = UNDERSCORE; match('\u005F'); if (_createToken && (null == _token) && (_ttype != Token.SKIP)) { _token = makeToken(_ttype); _token.setText(text.ToString(_begin, text.Length - _begin)); } returnToken_ = _token; }
public void mBINOP(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; IToken _token = null; int _begin = text.Length; _ttype = BINOP; switch (cached_LA1) { case '|': { match('|'); break; } case '&': { match('&'); break; } case '^': { match('^'); break; } default: if ((cached_LA1 == '=') && (cached_LA2 == '>')) { match("=>"); } else if ((cached_LA1 == '=') && (true)) { match('='); } else { throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn()); } break; } if (_createToken && (null == _token) && (_ttype != Token.SKIP)) { _token = makeToken(_ttype); _token.setText(text.ToString(_begin, text.Length - _begin)); } returnToken_ = _token; }
public void mCRLF(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; IToken _token = null; var _begin = text.Length; _ttype = CRLF; mCR(false); mLF(false); newline(); if (_createToken && (null == _token) && (_ttype != Token.SKIP)) { _token = makeToken(_ttype); _token.setText(text.ToString(_begin, text.Length - _begin)); } returnToken_ = _token; }
public void mLIT_CADENA(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; IToken _token = null; int _begin = text.Length; _ttype = LIT_CADENA; int _saveIndex = 0; _saveIndex = text.Length; match('\''); text.Length = _saveIndex; { // ( ... )* for (;;) { if ((tokenSet_2_.member(cached_LA1))) { { match(tokenSet_2_); } } else { goto _loop44_breakloop; } } _loop44_breakloop :; } // ( ... )* _saveIndex = text.Length; match('\''); text.Length = _saveIndex; if (_createToken && (null == _token) && (_ttype != Token.SKIP)) { _token = makeToken(_ttype); _token.setText(text.ToString(_begin, text.Length - _begin)); } returnToken_ = _token; }
public void mEMARK(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; IToken _token = null; int _begin = text.Length; _ttype = EMARK; match('!'); { if ((cached_LA1 == '=')) { match('='); _ttype = BINOP; } else { } } if (_createToken && (null == _token) && (_ttype != Token.SKIP)) { _token = makeToken(_ttype); _token.setText(text.ToString(_begin, text.Length - _begin)); } returnToken_ = _token; }
public void mLINEFOLDER(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; IToken _token = null; var _begin = text.Length; _ttype = LINEFOLDER; mCRLF(false); { switch (cached_LA1) { case ' ': { mSPACE(false); break; } case '\t': { mHTAB(false); break; } default: { throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn()); } } } _ttype = Token.SKIP; if (_createToken && (null == _token) && (_ttype != Token.SKIP)) { _token = makeToken(_ttype); _token.setText(text.ToString(_begin, text.Length - _begin)); } returnToken_ = _token; }
public void mLIT_NUMERO(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; IToken _token = null; int _begin = text.Length; _ttype = LIT_NUMERO; bool synPredMatched30 = false; if ((((cached_LA1 >= '0' && cached_LA1 <= '9')) && (tokenSet_0_.member(cached_LA2)))) { int _m30 = mark(); synPredMatched30 = true; inputState.guessing++; try { { { // ( ... )+ int _cnt29 = 0; for (;;) { if (((cached_LA1 >= '0' && cached_LA1 <= '9'))) { mDIGITO(false); } else { if (_cnt29 >= 1) { goto _loop29_breakloop; } else { throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn());; } } _cnt29++; } _loop29_breakloop :; } // ( ... )+ match('.'); } } catch (RecognitionException) { synPredMatched30 = false; } rewind(_m30); inputState.guessing--; } if (synPredMatched30) { { // ( ... )+ int _cnt32 = 0; for (;;) { if (((cached_LA1 >= '0' && cached_LA1 <= '9'))) { mDIGITO(false); } else { if (_cnt32 >= 1) { goto _loop32_breakloop; } else { throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn());; } } _cnt32++; } _loop32_breakloop :; } // ( ... )+ match('.'); { // ( ... )* for (;;) { if (((cached_LA1 >= '0' && cached_LA1 <= '9'))) { mDIGITO(false); } else { goto _loop34_breakloop; } } _loop34_breakloop :; } // ( ... )* if (0 == inputState.guessing) { _ttype = LIT_REAL; } } else if (((cached_LA1 >= '0' && cached_LA1 <= '9')) && (true)) { { // ( ... )+ int _cnt36 = 0; for (;;) { if (((cached_LA1 >= '0' && cached_LA1 <= '9'))) { mDIGITO(false); } else { if (_cnt36 >= 1) { goto _loop36_breakloop; } else { throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn());; } } _cnt36++; } _loop36_breakloop :; } // ( ... )+ if (0 == inputState.guessing) { _ttype = LIT_ENTERO; } } else { throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn()); } if (_createToken && (null == _token) && (_ttype != Token.SKIP)) { _token = makeToken(_ttype); _token.setText(text.ToString(_begin, text.Length - _begin)); } returnToken_ = _token; }
public void mID(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; IToken _token = null; int _begin = text.Length; _ttype = ID; switch (cached_LA1) { case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '_': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': { { switch (cached_LA1) { case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': { matchRange('a', 'z'); break; } case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': { matchRange('A', 'Z'); break; } case '_': { match('_'); break; } default: { throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn()); } } } { // ( ... )* for (;;) { switch (cached_LA1) { case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': { matchRange('a', 'z'); break; } case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': { matchRange('A', 'Z'); break; } case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { matchRange('0', '9'); break; } case '_': { match('_'); break; } default: { goto _loop50_breakloop; } } } _loop50_breakloop :; } // ( ... )* break; } case '{': { { match('{'); { match(tokenSet_0_); } match('}'); } break; } default: { throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn()); } } if (_createToken && (null == _token) && (_ttype != Token.SKIP)) { _token = makeToken(_ttype); _token.setText(text.ToString(_begin, text.Length - _begin)); } returnToken_ = _token; }
public void mIANA_TOKEN(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; IToken _token = null; var _begin = text.Length; _ttype = IANA_TOKEN; { // ( ... )+ var _cnt82 = 0; for (;;) { switch (cached_LA1) { case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': { mALPHA(false); break; } case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { mDIGIT(false); break; } case '-': { mDASH(false); break; } case '_': { mUNDERSCORE(false); break; } default: if ((tokenSet_3_.member(cached_LA1))) { mSPECIAL(false); } else if (((cached_LA1 >= '\u0100' && cached_LA1 <= '\ufffe'))) { mUNICODE(false); } else { if (_cnt82 >= 1) { goto _loop82_breakloop; } else { throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn());; } } break; } _cnt82++; } _loop82_breakloop :; } // ( ... )+ var s = text.ToString(_begin, text.Length - _begin); int val; if (int.TryParse(s, out val)) { _ttype = NUMBER; } else { switch (s.ToUpper()) { case "BEGIN": _ttype = BEGIN; break; case "END": _ttype = END; break; case "VCALENDAR": _ttype = VCALENDAR; break; default: if (s.Length > 2 && s.Substring(0, 2).Equals("X-")) { _ttype = X_NAME; } break; } } if (_createToken && (null == _token) && (_ttype != Token.SKIP)) { _token = makeToken(_ttype); _token.setText(text.ToString(_begin, text.Length - _begin)); } returnToken_ = _token; }
public void mBLANCO(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; IToken _token = null; int _begin = text.Length; _ttype = BLANCO; { switch (cached_LA1) { case ' ': { match(' '); break; } case '\t': { match('\t'); break; } case '\u000c': { match('\f'); break; } case '\n': { match('\n'); if (0 == inputState.guessing) { newline(); } break; } case '\r': { match('\r'); if (0 == inputState.guessing) { newline(); } break; } default: { throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn()); } } } if (0 == inputState.guessing) { _ttype = Token.SKIP; } if (_createToken && (null == _token) && (_ttype != Token.SKIP)) { _token = makeToken(_ttype); _token.setText(text.ToString(_begin, text.Length - _begin)); } returnToken_ = _token; }
public void mCTL(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; IToken _token = null; var _begin = text.Length; _ttype = CTL; switch (cached_LA1) { case '\u0000': case '\u0001': case '\u0002': case '\u0003': case '\u0004': case '\u0005': case '\u0006': case '\u0007': case '\u0008': { matchRange('\u0000', '\u0008'); break; } case '\u000b': case '\u000c': case '\r': case '\u000e': case '\u000f': case '\u0010': case '\u0011': case '\u0012': case '\u0013': case '\u0014': case '\u0015': case '\u0016': case '\u0017': case '\u0018': case '\u0019': case '\u001a': case '\u001b': case '\u001c': case '\u001d': case '\u001e': case '\u001f': { matchRange('\u000b', '\u001F'); break; } case '\u007f': { match('\u007F'); break; } default: { throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn()); } } if (_createToken && (null == _token) && (_ttype != Token.SKIP)) { _token = makeToken(_ttype); _token.setText(text.ToString(_begin, text.Length - _begin)); } returnToken_ = _token; }
protected void mSPECIAL(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; IToken _token = null; var _begin = text.Length; _ttype = SPECIAL; switch (cached_LA1) { case '!': { match('\u0021'); break; } case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': { matchRange('\u0023', '\u002b'); break; } case '<': { match('\u003c'); break; } case '>': case '?': case '@': { matchRange('\u003e', '\u0040'); break; } case '[': { match('\u005b'); break; } case ']': case '^': { matchRange('\u005d', '\u005e'); break; } case '`': { match('\u0060'); break; } case '{': case '|': case '}': case '~': { matchRange('\u007b', '\u007e'); break; } default: if (((cached_LA1 >= '\u0080' && cached_LA1 <= '\u00ff'))) { matchRange('\u0080', '\u00ff'); } else { throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn()); } break; } if (_createToken && (null == _token) && (_ttype != Token.SKIP)) { _token = makeToken(_ttype); _token.setText(text.ToString(_begin, text.Length - _begin)); } returnToken_ = _token; }
protected void mALPHA(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; IToken _token = null; var _begin = text.Length; _ttype = ALPHA; switch (cached_LA1) { case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': { matchRange('\u0041', '\u005a'); break; } case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': { matchRange('\u0061', '\u007a'); break; } default: { throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn()); } } if (_createToken && (null == _token) && (_ttype != Token.SKIP)) { _token = makeToken(_ttype); _token.setText(text.ToString(_begin, text.Length - _begin)); } returnToken_ = _token; }