Source Code Cross Referenced for ANTLRLexer.java in  » IDE-Netbeans » cnd » antlr » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » cnd » antlr 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        // $ANTLR 2.7.3rc3: "antlr.g" -> "ANTLRLexer.java"$
0002:
0003:        package antlr;
0004:
0005:        import java.io.InputStream;
0006:        import antlr.TokenStreamException;
0007:        import antlr.TokenStreamIOException;
0008:        import antlr.TokenStreamRecognitionException;
0009:        import antlr.CharStreamException;
0010:        import antlr.CharStreamIOException;
0011:        import antlr.ANTLRException;
0012:        import java.io.Reader;
0013:        import java.util.Hashtable;
0014:        import antlr.CharScanner;
0015:        import antlr.InputBuffer;
0016:        import antlr.ByteBuffer;
0017:        import antlr.CharBuffer;
0018:        import antlr.Token;
0019:        import antlr.CommonToken;
0020:        import antlr.RecognitionException;
0021:        import antlr.NoViableAltForCharException;
0022:        import antlr.MismatchedCharException;
0023:        import antlr.TokenStream;
0024:        import antlr.ANTLRHashString;
0025:        import antlr.LexerSharedInputState;
0026:        import antlr.collections.impl.BitSet;
0027:        import antlr.SemanticException;
0028:
0029:        public class ANTLRLexer extends antlr.CharScanner implements 
0030:                ANTLRTokenTypes, TokenStream {
0031:
0032:            /**Convert 'c' to an integer char value. */
0033:            public static int escapeCharValue(String cs) {
0034:                //System.out.println("escapeCharValue("+cs+")");
0035:                if (cs.charAt(1) != '\\')
0036:                    return 0;
0037:                switch (cs.charAt(2)) {
0038:                case 'b':
0039:                    return '\b';
0040:                case 'r':
0041:                    return '\r';
0042:                case 't':
0043:                    return '\t';
0044:                case 'n':
0045:                    return '\n';
0046:                case 'f':
0047:                    return '\f';
0048:                case '"':
0049:                    return '\"';
0050:                case '\'':
0051:                    return '\'';
0052:                case '\\':
0053:                    return '\\';
0054:
0055:                case 'u':
0056:                    // Unicode char
0057:                    if (cs.length() != 8) {
0058:                        return 0;
0059:                    } else {
0060:                        return Character.digit(cs.charAt(3), 16) * 16 * 16 * 16
0061:                                + Character.digit(cs.charAt(4), 16) * 16 * 16
0062:                                + Character.digit(cs.charAt(5), 16) * 16
0063:                                + Character.digit(cs.charAt(6), 16);
0064:                    }
0065:
0066:                case '0':
0067:                case '1':
0068:                case '2':
0069:                case '3':
0070:                    if (cs.length() > 5 && Character.isDigit(cs.charAt(4))) {
0071:                        return (cs.charAt(2) - '0') * 8 * 8
0072:                                + (cs.charAt(3) - '0') * 8
0073:                                + (cs.charAt(4) - '0');
0074:                    }
0075:                    if (cs.length() > 4 && Character.isDigit(cs.charAt(3))) {
0076:                        return (cs.charAt(2) - '0') * 8 + (cs.charAt(3) - '0');
0077:                    }
0078:                    return cs.charAt(2) - '0';
0079:
0080:                case '4':
0081:                case '5':
0082:                case '6':
0083:                case '7':
0084:                    if (cs.length() > 4 && Character.isDigit(cs.charAt(3))) {
0085:                        return (cs.charAt(2) - '0') * 8 + (cs.charAt(3) - '0');
0086:                    }
0087:                    return cs.charAt(2) - '0';
0088:
0089:                default:
0090:                    return 0;
0091:                }
0092:            }
0093:
0094:            public static int tokenTypeForCharLiteral(String lit) {
0095:                if (lit.length() > 3) { // does char contain escape?
0096:                    return escapeCharValue(lit);
0097:                } else {
0098:                    return lit.charAt(1);
0099:                }
0100:            }
0101:
0102:            public ANTLRLexer(InputStream in) {
0103:                this (new ByteBuffer(in));
0104:            }
0105:
0106:            public ANTLRLexer(Reader in) {
0107:                this (new CharBuffer(in));
0108:            }
0109:
0110:            public ANTLRLexer(InputBuffer ib) {
0111:                this (new LexerSharedInputState(ib));
0112:            }
0113:
0114:            public ANTLRLexer(LexerSharedInputState state) {
0115:                super (state);
0116:                caseSensitiveLiterals = true;
0117:                setCaseSensitive(true);
0118:                literals = new Hashtable();
0119:                literals.put(new ANTLRHashString("public", this ), new Integer(
0120:                        31));
0121:                literals.put(new ANTLRHashString("class", this ),
0122:                        new Integer(10));
0123:                literals.put(new ANTLRHashString("header", this ),
0124:                        new Integer(5));
0125:                literals.put(new ANTLRHashString("throws", this ), new Integer(
0126:                        37));
0127:                literals.put(new ANTLRHashString("lexclass", this ),
0128:                        new Integer(9));
0129:                literals.put(new ANTLRHashString("catch", this ),
0130:                        new Integer(40));
0131:                literals.put(new ANTLRHashString("private", this ), new Integer(
0132:                        32));
0133:                literals.put(new ANTLRHashString("options", this ), new Integer(
0134:                        51));
0135:                literals.put(new ANTLRHashString("extends", this ), new Integer(
0136:                        11));
0137:                literals.put(new ANTLRHashString("protected", this ),
0138:                        new Integer(30));
0139:                literals.put(new ANTLRHashString("TreeParser", this ),
0140:                        new Integer(13));
0141:                literals.put(new ANTLRHashString("Parser", this ), new Integer(
0142:                        29));
0143:                literals.put(new ANTLRHashString("Lexer", this ),
0144:                        new Integer(12));
0145:                literals.put(new ANTLRHashString("returns", this ), new Integer(
0146:                        35));
0147:                literals.put(new ANTLRHashString("charVocabulary", this ),
0148:                        new Integer(18));
0149:                literals.put(new ANTLRHashString("tokens", this ),
0150:                        new Integer(4));
0151:                literals.put(new ANTLRHashString("exception", this ),
0152:                        new Integer(39));
0153:            }
0154:
0155:            public Token nextToken() throws TokenStreamException {
0156:                Token theRetToken = null;
0157:                tryAgain: for (;;) {
0158:                    Token _token = null;
0159:                    int _ttype = Token.INVALID_TYPE;
0160:                    resetText();
0161:                    try { // for char stream error handling
0162:                        try { // for lexical error handling
0163:                            switch (LA(1)) {
0164:                            case '\t':
0165:                            case '\n':
0166:                            case '\r':
0167:                            case ' ': {
0168:                                mWS(true);
0169:                                theRetToken = _returnToken;
0170:                                break;
0171:                            }
0172:                            case '/': {
0173:                                mCOMMENT(true);
0174:                                theRetToken = _returnToken;
0175:                                break;
0176:                            }
0177:                            case '<': {
0178:                                mOPEN_ELEMENT_OPTION(true);
0179:                                theRetToken = _returnToken;
0180:                                break;
0181:                            }
0182:                            case '>': {
0183:                                mCLOSE_ELEMENT_OPTION(true);
0184:                                theRetToken = _returnToken;
0185:                                break;
0186:                            }
0187:                            case ',': {
0188:                                mCOMMA(true);
0189:                                theRetToken = _returnToken;
0190:                                break;
0191:                            }
0192:                            case '?': {
0193:                                mQUESTION(true);
0194:                                theRetToken = _returnToken;
0195:                                break;
0196:                            }
0197:                            case '#': {
0198:                                mTREE_BEGIN(true);
0199:                                theRetToken = _returnToken;
0200:                                break;
0201:                            }
0202:                            case '(': {
0203:                                mLPAREN(true);
0204:                                theRetToken = _returnToken;
0205:                                break;
0206:                            }
0207:                            case ')': {
0208:                                mRPAREN(true);
0209:                                theRetToken = _returnToken;
0210:                                break;
0211:                            }
0212:                            case ':': {
0213:                                mCOLON(true);
0214:                                theRetToken = _returnToken;
0215:                                break;
0216:                            }
0217:                            case '*': {
0218:                                mSTAR(true);
0219:                                theRetToken = _returnToken;
0220:                                break;
0221:                            }
0222:                            case '+': {
0223:                                mPLUS(true);
0224:                                theRetToken = _returnToken;
0225:                                break;
0226:                            }
0227:                            case ';': {
0228:                                mSEMI(true);
0229:                                theRetToken = _returnToken;
0230:                                break;
0231:                            }
0232:                            case '^': {
0233:                                mCARET(true);
0234:                                theRetToken = _returnToken;
0235:                                break;
0236:                            }
0237:                            case '!': {
0238:                                mBANG(true);
0239:                                theRetToken = _returnToken;
0240:                                break;
0241:                            }
0242:                            case '|': {
0243:                                mOR(true);
0244:                                theRetToken = _returnToken;
0245:                                break;
0246:                            }
0247:                            case '~': {
0248:                                mNOT_OP(true);
0249:                                theRetToken = _returnToken;
0250:                                break;
0251:                            }
0252:                            case '}': {
0253:                                mRCURLY(true);
0254:                                theRetToken = _returnToken;
0255:                                break;
0256:                            }
0257:                            case '\'': {
0258:                                mCHAR_LITERAL(true);
0259:                                theRetToken = _returnToken;
0260:                                break;
0261:                            }
0262:                            case '"': {
0263:                                mSTRING_LITERAL(true);
0264:                                theRetToken = _returnToken;
0265:                                break;
0266:                            }
0267:                            case '0':
0268:                            case '1':
0269:                            case '2':
0270:                            case '3':
0271:                            case '4':
0272:                            case '5':
0273:                            case '6':
0274:                            case '7':
0275:                            case '8':
0276:                            case '9': {
0277:                                mINT(true);
0278:                                theRetToken = _returnToken;
0279:                                break;
0280:                            }
0281:                            case '[': {
0282:                                mARG_ACTION(true);
0283:                                theRetToken = _returnToken;
0284:                                break;
0285:                            }
0286:                            case '{': {
0287:                                mACTION(true);
0288:                                theRetToken = _returnToken;
0289:                                break;
0290:                            }
0291:                            case 'A':
0292:                            case 'B':
0293:                            case 'C':
0294:                            case 'D':
0295:                            case 'E':
0296:                            case 'F':
0297:                            case 'G':
0298:                            case 'H':
0299:                            case 'I':
0300:                            case 'J':
0301:                            case 'K':
0302:                            case 'L':
0303:                            case 'M':
0304:                            case 'N':
0305:                            case 'O':
0306:                            case 'P':
0307:                            case 'Q':
0308:                            case 'R':
0309:                            case 'S':
0310:                            case 'T':
0311:                            case 'U':
0312:                            case 'V':
0313:                            case 'W':
0314:                            case 'X':
0315:                            case 'Y':
0316:                            case 'Z': {
0317:                                mTOKEN_REF(true);
0318:                                theRetToken = _returnToken;
0319:                                break;
0320:                            }
0321:                            case 'a':
0322:                            case 'b':
0323:                            case 'c':
0324:                            case 'd':
0325:                            case 'e':
0326:                            case 'f':
0327:                            case 'g':
0328:                            case 'h':
0329:                            case 'i':
0330:                            case 'j':
0331:                            case 'k':
0332:                            case 'l':
0333:                            case 'm':
0334:                            case 'n':
0335:                            case 'o':
0336:                            case 'p':
0337:                            case 'q':
0338:                            case 'r':
0339:                            case 's':
0340:                            case 't':
0341:                            case 'u':
0342:                            case 'v':
0343:                            case 'w':
0344:                            case 'x':
0345:                            case 'y':
0346:                            case 'z': {
0347:                                mRULE_REF(true);
0348:                                theRetToken = _returnToken;
0349:                                break;
0350:                            }
0351:                            default:
0352:                                if ((LA(1) == '=') && (LA(2) == '>')) {
0353:                                    mIMPLIES(true);
0354:                                    theRetToken = _returnToken;
0355:                                } else if ((LA(1) == '.') && (LA(2) == '.')) {
0356:                                    mRANGE(true);
0357:                                    theRetToken = _returnToken;
0358:                                } else if ((LA(1) == '=') && (true)) {
0359:                                    mASSIGN(true);
0360:                                    theRetToken = _returnToken;
0361:                                } else if ((LA(1) == '.') && (true)) {
0362:                                    mWILDCARD(true);
0363:                                    theRetToken = _returnToken;
0364:                                } else {
0365:                                    if (LA(1) == EOF_CHAR) {
0366:                                        uponEOF();
0367:                                        _returnToken = makeToken(Token.EOF_TYPE);
0368:                                    } else {
0369:                                        throw new NoViableAltForCharException(
0370:                                                (char) LA(1), getFilename(),
0371:                                                getLine(), getColumn());
0372:                                    }
0373:                                }
0374:                            }
0375:                            if (_returnToken == null)
0376:                                continue tryAgain; // found SKIP token
0377:                            _ttype = _returnToken.getType();
0378:                            _returnToken.setType(_ttype);
0379:                            return _returnToken;
0380:                        } catch (RecognitionException e) {
0381:                            throw new TokenStreamRecognitionException(e);
0382:                        }
0383:                    } catch (CharStreamException cse) {
0384:                        if (cse instanceof  CharStreamIOException) {
0385:                            throw new TokenStreamIOException(
0386:                                    ((CharStreamIOException) cse).io);
0387:                        } else {
0388:                            throw new TokenStreamException(cse.getMessage());
0389:                        }
0390:                    }
0391:                }
0392:            }
0393:
0394:            public final void mWS(boolean _createToken)
0395:                    throws RecognitionException, CharStreamException,
0396:                    TokenStreamException {
0397:                int _ttype;
0398:                Token _token = null;
0399:                int _begin = text.length();
0400:                _ttype = WS;
0401:                int _saveIndex;
0402:
0403:                {
0404:                    switch (LA(1)) {
0405:                    case ' ': {
0406:                        match(' ');
0407:                        break;
0408:                    }
0409:                    case '\t': {
0410:                        match('\t');
0411:                        break;
0412:                    }
0413:                    case '\n': {
0414:                        match('\n');
0415:                        newline();
0416:                        break;
0417:                    }
0418:                    default:
0419:                        if ((LA(1) == '\r') && (LA(2) == '\n')) {
0420:                            match('\r');
0421:                            match('\n');
0422:                            newline();
0423:                        } else if ((LA(1) == '\r') && (true)) {
0424:                            match('\r');
0425:                            newline();
0426:                        } else {
0427:                            throw new NoViableAltForCharException((char) LA(1),
0428:                                    getFilename(), getLine(), getColumn());
0429:                        }
0430:                    }
0431:                }
0432:                _ttype = Token.SKIP;
0433:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0434:                    _token = makeToken(_ttype);
0435:                    _token.setText(new String(text.getBuffer(), _begin, text
0436:                            .length()
0437:                            - _begin));
0438:                }
0439:                _returnToken = _token;
0440:            }
0441:
0442:            public final void mCOMMENT(boolean _createToken)
0443:                    throws RecognitionException, CharStreamException,
0444:                    TokenStreamException {
0445:                int _ttype;
0446:                Token _token = null;
0447:                int _begin = text.length();
0448:                _ttype = COMMENT;
0449:                int _saveIndex;
0450:                Token t = null;
0451:
0452:                {
0453:                    if ((LA(1) == '/') && (LA(2) == '/')) {
0454:                        mSL_COMMENT(false);
0455:                    } else if ((LA(1) == '/') && (LA(2) == '*')) {
0456:                        mML_COMMENT(true);
0457:                        t = _returnToken;
0458:                        _ttype = t.getType();
0459:                    } else {
0460:                        throw new NoViableAltForCharException((char) LA(1),
0461:                                getFilename(), getLine(), getColumn());
0462:                    }
0463:
0464:                }
0465:                if (_ttype != DOC_COMMENT)
0466:                    _ttype = Token.SKIP;
0467:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0468:                    _token = makeToken(_ttype);
0469:                    _token.setText(new String(text.getBuffer(), _begin, text
0470:                            .length()
0471:                            - _begin));
0472:                }
0473:                _returnToken = _token;
0474:            }
0475:
0476:            protected final void mSL_COMMENT(boolean _createToken)
0477:                    throws RecognitionException, CharStreamException,
0478:                    TokenStreamException {
0479:                int _ttype;
0480:                Token _token = null;
0481:                int _begin = text.length();
0482:                _ttype = SL_COMMENT;
0483:                int _saveIndex;
0484:
0485:                match("//");
0486:                {
0487:                    _loop153: do {
0488:                        if ((_tokenSet_0.member(LA(1)))) {
0489:                            {
0490:                                match(_tokenSet_0);
0491:                            }
0492:                        } else {
0493:                            break _loop153;
0494:                        }
0495:
0496:                    } while (true);
0497:                }
0498:                {
0499:                    if ((LA(1) == '\r') && (LA(2) == '\n')) {
0500:                        match('\r');
0501:                        match('\n');
0502:                    } else if ((LA(1) == '\r') && (true)) {
0503:                        match('\r');
0504:                    } else if ((LA(1) == '\n')) {
0505:                        match('\n');
0506:                    } else {
0507:                        throw new NoViableAltForCharException((char) LA(1),
0508:                                getFilename(), getLine(), getColumn());
0509:                    }
0510:
0511:                }
0512:                newline();
0513:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0514:                    _token = makeToken(_ttype);
0515:                    _token.setText(new String(text.getBuffer(), _begin, text
0516:                            .length()
0517:                            - _begin));
0518:                }
0519:                _returnToken = _token;
0520:            }
0521:
0522:            protected final void mML_COMMENT(boolean _createToken)
0523:                    throws RecognitionException, CharStreamException,
0524:                    TokenStreamException {
0525:                int _ttype;
0526:                Token _token = null;
0527:                int _begin = text.length();
0528:                _ttype = ML_COMMENT;
0529:                int _saveIndex;
0530:
0531:                match("/*");
0532:                {
0533:                    if (((LA(1) == '*') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')))
0534:                            && (LA(2) != '/')) {
0535:                        match('*');
0536:                        _ttype = DOC_COMMENT;
0537:                    } else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff'))
0538:                            && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
0539:                    } else {
0540:                        throw new NoViableAltForCharException((char) LA(1),
0541:                                getFilename(), getLine(), getColumn());
0542:                    }
0543:
0544:                }
0545:                {
0546:                    _loop159: do {
0547:                        // nongreedy exit test
0548:                        if ((LA(1) == '*') && (LA(2) == '/'))
0549:                            break _loop159;
0550:                        if ((LA(1) == '\r') && (LA(2) == '\n')) {
0551:                            match('\r');
0552:                            match('\n');
0553:                            newline();
0554:                        } else if ((LA(1) == '\r')
0555:                                && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
0556:                            match('\r');
0557:                            newline();
0558:                        } else if ((_tokenSet_0.member(LA(1)))
0559:                                && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
0560:                            {
0561:                                match(_tokenSet_0);
0562:                            }
0563:                        } else if ((LA(1) == '\n')) {
0564:                            match('\n');
0565:                            newline();
0566:                        } else {
0567:                            break _loop159;
0568:                        }
0569:
0570:                    } while (true);
0571:                }
0572:                match("*/");
0573:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0574:                    _token = makeToken(_ttype);
0575:                    _token.setText(new String(text.getBuffer(), _begin, text
0576:                            .length()
0577:                            - _begin));
0578:                }
0579:                _returnToken = _token;
0580:            }
0581:
0582:            public final void mOPEN_ELEMENT_OPTION(boolean _createToken)
0583:                    throws RecognitionException, CharStreamException,
0584:                    TokenStreamException {
0585:                int _ttype;
0586:                Token _token = null;
0587:                int _begin = text.length();
0588:                _ttype = OPEN_ELEMENT_OPTION;
0589:                int _saveIndex;
0590:
0591:                match('<');
0592:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0593:                    _token = makeToken(_ttype);
0594:                    _token.setText(new String(text.getBuffer(), _begin, text
0595:                            .length()
0596:                            - _begin));
0597:                }
0598:                _returnToken = _token;
0599:            }
0600:
0601:            public final void mCLOSE_ELEMENT_OPTION(boolean _createToken)
0602:                    throws RecognitionException, CharStreamException,
0603:                    TokenStreamException {
0604:                int _ttype;
0605:                Token _token = null;
0606:                int _begin = text.length();
0607:                _ttype = CLOSE_ELEMENT_OPTION;
0608:                int _saveIndex;
0609:
0610:                match('>');
0611:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0612:                    _token = makeToken(_ttype);
0613:                    _token.setText(new String(text.getBuffer(), _begin, text
0614:                            .length()
0615:                            - _begin));
0616:                }
0617:                _returnToken = _token;
0618:            }
0619:
0620:            public final void mCOMMA(boolean _createToken)
0621:                    throws RecognitionException, CharStreamException,
0622:                    TokenStreamException {
0623:                int _ttype;
0624:                Token _token = null;
0625:                int _begin = text.length();
0626:                _ttype = COMMA;
0627:                int _saveIndex;
0628:
0629:                match(',');
0630:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0631:                    _token = makeToken(_ttype);
0632:                    _token.setText(new String(text.getBuffer(), _begin, text
0633:                            .length()
0634:                            - _begin));
0635:                }
0636:                _returnToken = _token;
0637:            }
0638:
0639:            public final void mQUESTION(boolean _createToken)
0640:                    throws RecognitionException, CharStreamException,
0641:                    TokenStreamException {
0642:                int _ttype;
0643:                Token _token = null;
0644:                int _begin = text.length();
0645:                _ttype = QUESTION;
0646:                int _saveIndex;
0647:
0648:                match('?');
0649:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0650:                    _token = makeToken(_ttype);
0651:                    _token.setText(new String(text.getBuffer(), _begin, text
0652:                            .length()
0653:                            - _begin));
0654:                }
0655:                _returnToken = _token;
0656:            }
0657:
0658:            public final void mTREE_BEGIN(boolean _createToken)
0659:                    throws RecognitionException, CharStreamException,
0660:                    TokenStreamException {
0661:                int _ttype;
0662:                Token _token = null;
0663:                int _begin = text.length();
0664:                _ttype = TREE_BEGIN;
0665:                int _saveIndex;
0666:
0667:                match("#(");
0668:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0669:                    _token = makeToken(_ttype);
0670:                    _token.setText(new String(text.getBuffer(), _begin, text
0671:                            .length()
0672:                            - _begin));
0673:                }
0674:                _returnToken = _token;
0675:            }
0676:
0677:            public final void mLPAREN(boolean _createToken)
0678:                    throws RecognitionException, CharStreamException,
0679:                    TokenStreamException {
0680:                int _ttype;
0681:                Token _token = null;
0682:                int _begin = text.length();
0683:                _ttype = LPAREN;
0684:                int _saveIndex;
0685:
0686:                match('(');
0687:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0688:                    _token = makeToken(_ttype);
0689:                    _token.setText(new String(text.getBuffer(), _begin, text
0690:                            .length()
0691:                            - _begin));
0692:                }
0693:                _returnToken = _token;
0694:            }
0695:
0696:            public final void mRPAREN(boolean _createToken)
0697:                    throws RecognitionException, CharStreamException,
0698:                    TokenStreamException {
0699:                int _ttype;
0700:                Token _token = null;
0701:                int _begin = text.length();
0702:                _ttype = RPAREN;
0703:                int _saveIndex;
0704:
0705:                match(')');
0706:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0707:                    _token = makeToken(_ttype);
0708:                    _token.setText(new String(text.getBuffer(), _begin, text
0709:                            .length()
0710:                            - _begin));
0711:                }
0712:                _returnToken = _token;
0713:            }
0714:
0715:            public final void mCOLON(boolean _createToken)
0716:                    throws RecognitionException, CharStreamException,
0717:                    TokenStreamException {
0718:                int _ttype;
0719:                Token _token = null;
0720:                int _begin = text.length();
0721:                _ttype = COLON;
0722:                int _saveIndex;
0723:
0724:                match(':');
0725:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0726:                    _token = makeToken(_ttype);
0727:                    _token.setText(new String(text.getBuffer(), _begin, text
0728:                            .length()
0729:                            - _begin));
0730:                }
0731:                _returnToken = _token;
0732:            }
0733:
0734:            public final void mSTAR(boolean _createToken)
0735:                    throws RecognitionException, CharStreamException,
0736:                    TokenStreamException {
0737:                int _ttype;
0738:                Token _token = null;
0739:                int _begin = text.length();
0740:                _ttype = STAR;
0741:                int _saveIndex;
0742:
0743:                match('*');
0744:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0745:                    _token = makeToken(_ttype);
0746:                    _token.setText(new String(text.getBuffer(), _begin, text
0747:                            .length()
0748:                            - _begin));
0749:                }
0750:                _returnToken = _token;
0751:            }
0752:
0753:            public final void mPLUS(boolean _createToken)
0754:                    throws RecognitionException, CharStreamException,
0755:                    TokenStreamException {
0756:                int _ttype;
0757:                Token _token = null;
0758:                int _begin = text.length();
0759:                _ttype = PLUS;
0760:                int _saveIndex;
0761:
0762:                match('+');
0763:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0764:                    _token = makeToken(_ttype);
0765:                    _token.setText(new String(text.getBuffer(), _begin, text
0766:                            .length()
0767:                            - _begin));
0768:                }
0769:                _returnToken = _token;
0770:            }
0771:
0772:            public final void mASSIGN(boolean _createToken)
0773:                    throws RecognitionException, CharStreamException,
0774:                    TokenStreamException {
0775:                int _ttype;
0776:                Token _token = null;
0777:                int _begin = text.length();
0778:                _ttype = ASSIGN;
0779:                int _saveIndex;
0780:
0781:                match('=');
0782:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0783:                    _token = makeToken(_ttype);
0784:                    _token.setText(new String(text.getBuffer(), _begin, text
0785:                            .length()
0786:                            - _begin));
0787:                }
0788:                _returnToken = _token;
0789:            }
0790:
0791:            public final void mIMPLIES(boolean _createToken)
0792:                    throws RecognitionException, CharStreamException,
0793:                    TokenStreamException {
0794:                int _ttype;
0795:                Token _token = null;
0796:                int _begin = text.length();
0797:                _ttype = IMPLIES;
0798:                int _saveIndex;
0799:
0800:                match("=>");
0801:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0802:                    _token = makeToken(_ttype);
0803:                    _token.setText(new String(text.getBuffer(), _begin, text
0804:                            .length()
0805:                            - _begin));
0806:                }
0807:                _returnToken = _token;
0808:            }
0809:
0810:            public final void mSEMI(boolean _createToken)
0811:                    throws RecognitionException, CharStreamException,
0812:                    TokenStreamException {
0813:                int _ttype;
0814:                Token _token = null;
0815:                int _begin = text.length();
0816:                _ttype = SEMI;
0817:                int _saveIndex;
0818:
0819:                match(';');
0820:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0821:                    _token = makeToken(_ttype);
0822:                    _token.setText(new String(text.getBuffer(), _begin, text
0823:                            .length()
0824:                            - _begin));
0825:                }
0826:                _returnToken = _token;
0827:            }
0828:
0829:            public final void mCARET(boolean _createToken)
0830:                    throws RecognitionException, CharStreamException,
0831:                    TokenStreamException {
0832:                int _ttype;
0833:                Token _token = null;
0834:                int _begin = text.length();
0835:                _ttype = CARET;
0836:                int _saveIndex;
0837:
0838:                match('^');
0839:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0840:                    _token = makeToken(_ttype);
0841:                    _token.setText(new String(text.getBuffer(), _begin, text
0842:                            .length()
0843:                            - _begin));
0844:                }
0845:                _returnToken = _token;
0846:            }
0847:
0848:            public final void mBANG(boolean _createToken)
0849:                    throws RecognitionException, CharStreamException,
0850:                    TokenStreamException {
0851:                int _ttype;
0852:                Token _token = null;
0853:                int _begin = text.length();
0854:                _ttype = BANG;
0855:                int _saveIndex;
0856:
0857:                match('!');
0858:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0859:                    _token = makeToken(_ttype);
0860:                    _token.setText(new String(text.getBuffer(), _begin, text
0861:                            .length()
0862:                            - _begin));
0863:                }
0864:                _returnToken = _token;
0865:            }
0866:
0867:            public final void mOR(boolean _createToken)
0868:                    throws RecognitionException, CharStreamException,
0869:                    TokenStreamException {
0870:                int _ttype;
0871:                Token _token = null;
0872:                int _begin = text.length();
0873:                _ttype = OR;
0874:                int _saveIndex;
0875:
0876:                match('|');
0877:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0878:                    _token = makeToken(_ttype);
0879:                    _token.setText(new String(text.getBuffer(), _begin, text
0880:                            .length()
0881:                            - _begin));
0882:                }
0883:                _returnToken = _token;
0884:            }
0885:
0886:            public final void mWILDCARD(boolean _createToken)
0887:                    throws RecognitionException, CharStreamException,
0888:                    TokenStreamException {
0889:                int _ttype;
0890:                Token _token = null;
0891:                int _begin = text.length();
0892:                _ttype = WILDCARD;
0893:                int _saveIndex;
0894:
0895:                match('.');
0896:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0897:                    _token = makeToken(_ttype);
0898:                    _token.setText(new String(text.getBuffer(), _begin, text
0899:                            .length()
0900:                            - _begin));
0901:                }
0902:                _returnToken = _token;
0903:            }
0904:
0905:            public final void mRANGE(boolean _createToken)
0906:                    throws RecognitionException, CharStreamException,
0907:                    TokenStreamException {
0908:                int _ttype;
0909:                Token _token = null;
0910:                int _begin = text.length();
0911:                _ttype = RANGE;
0912:                int _saveIndex;
0913:
0914:                match("..");
0915:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0916:                    _token = makeToken(_ttype);
0917:                    _token.setText(new String(text.getBuffer(), _begin, text
0918:                            .length()
0919:                            - _begin));
0920:                }
0921:                _returnToken = _token;
0922:            }
0923:
0924:            public final void mNOT_OP(boolean _createToken)
0925:                    throws RecognitionException, CharStreamException,
0926:                    TokenStreamException {
0927:                int _ttype;
0928:                Token _token = null;
0929:                int _begin = text.length();
0930:                _ttype = NOT_OP;
0931:                int _saveIndex;
0932:
0933:                match('~');
0934:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0935:                    _token = makeToken(_ttype);
0936:                    _token.setText(new String(text.getBuffer(), _begin, text
0937:                            .length()
0938:                            - _begin));
0939:                }
0940:                _returnToken = _token;
0941:            }
0942:
0943:            public final void mRCURLY(boolean _createToken)
0944:                    throws RecognitionException, CharStreamException,
0945:                    TokenStreamException {
0946:                int _ttype;
0947:                Token _token = null;
0948:                int _begin = text.length();
0949:                _ttype = RCURLY;
0950:                int _saveIndex;
0951:
0952:                match('}');
0953:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0954:                    _token = makeToken(_ttype);
0955:                    _token.setText(new String(text.getBuffer(), _begin, text
0956:                            .length()
0957:                            - _begin));
0958:                }
0959:                _returnToken = _token;
0960:            }
0961:
0962:            public final void mCHAR_LITERAL(boolean _createToken)
0963:                    throws RecognitionException, CharStreamException,
0964:                    TokenStreamException {
0965:                int _ttype;
0966:                Token _token = null;
0967:                int _begin = text.length();
0968:                _ttype = CHAR_LITERAL;
0969:                int _saveIndex;
0970:
0971:                match('\'');
0972:                {
0973:                    if ((LA(1) == '\\')) {
0974:                        mESC(false);
0975:                    } else if ((_tokenSet_1.member(LA(1)))) {
0976:                        matchNot('\'');
0977:                    } else {
0978:                        throw new NoViableAltForCharException((char) LA(1),
0979:                                getFilename(), getLine(), getColumn());
0980:                    }
0981:
0982:                }
0983:                match('\'');
0984:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0985:                    _token = makeToken(_ttype);
0986:                    _token.setText(new String(text.getBuffer(), _begin, text
0987:                            .length()
0988:                            - _begin));
0989:                }
0990:                _returnToken = _token;
0991:            }
0992:
0993:            protected final void mESC(boolean _createToken)
0994:                    throws RecognitionException, CharStreamException,
0995:                    TokenStreamException {
0996:                int _ttype;
0997:                Token _token = null;
0998:                int _begin = text.length();
0999:                _ttype = ESC;
1000:                int _saveIndex;
1001:
1002:                match('\\');
1003:                {
1004:                    switch (LA(1)) {
1005:                    case 'n': {
1006:                        match('n');
1007:                        break;
1008:                    }
1009:                    case 'r': {
1010:                        match('r');
1011:                        break;
1012:                    }
1013:                    case 't': {
1014:                        match('t');
1015:                        break;
1016:                    }
1017:                    case 'b': {
1018:                        match('b');
1019:                        break;
1020:                    }
1021:                    case 'f': {
1022:                        match('f');
1023:                        break;
1024:                    }
1025:                    case 'w': {
1026:                        match('w');
1027:                        break;
1028:                    }
1029:                    case 'a': {
1030:                        match('a');
1031:                        break;
1032:                    }
1033:                    case '"': {
1034:                        match('"');
1035:                        break;
1036:                    }
1037:                    case '\'': {
1038:                        match('\'');
1039:                        break;
1040:                    }
1041:                    case '\\': {
1042:                        match('\\');
1043:                        break;
1044:                    }
1045:                    case '0':
1046:                    case '1':
1047:                    case '2':
1048:                    case '3': {
1049:                        {
1050:                            matchRange('0', '3');
1051:                        }
1052:                        {
1053:                            if (((LA(1) >= '0' && LA(1) <= '7'))
1054:                                    && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
1055:                                matchRange('0', '7');
1056:                                {
1057:                                    if (((LA(1) >= '0' && LA(1) <= '7'))
1058:                                            && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
1059:                                        matchRange('0', '7');
1060:                                    } else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true)) {
1061:                                    } else {
1062:                                        throw new NoViableAltForCharException(
1063:                                                (char) LA(1), getFilename(),
1064:                                                getLine(), getColumn());
1065:                                    }
1066:
1067:                                }
1068:                            } else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true)) {
1069:                            } else {
1070:                                throw new NoViableAltForCharException(
1071:                                        (char) LA(1), getFilename(), getLine(),
1072:                                        getColumn());
1073:                            }
1074:
1075:                        }
1076:                        break;
1077:                    }
1078:                    case '4':
1079:                    case '5':
1080:                    case '6':
1081:                    case '7': {
1082:                        {
1083:                            matchRange('4', '7');
1084:                        }
1085:                        {
1086:                            if (((LA(1) >= '0' && LA(1) <= '7'))
1087:                                    && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
1088:                                matchRange('0', '7');
1089:                            } else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true)) {
1090:                            } else {
1091:                                throw new NoViableAltForCharException(
1092:                                        (char) LA(1), getFilename(), getLine(),
1093:                                        getColumn());
1094:                            }
1095:
1096:                        }
1097:                        break;
1098:                    }
1099:                    case 'u': {
1100:                        match('u');
1101:                        mXDIGIT(false);
1102:                        mXDIGIT(false);
1103:                        mXDIGIT(false);
1104:                        mXDIGIT(false);
1105:                        break;
1106:                    }
1107:                    default: {
1108:                        throw new NoViableAltForCharException((char) LA(1),
1109:                                getFilename(), getLine(), getColumn());
1110:                    }
1111:                    }
1112:                }
1113:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1114:                    _token = makeToken(_ttype);
1115:                    _token.setText(new String(text.getBuffer(), _begin, text
1116:                            .length()
1117:                            - _begin));
1118:                }
1119:                _returnToken = _token;
1120:            }
1121:
1122:            public final void mSTRING_LITERAL(boolean _createToken)
1123:                    throws RecognitionException, CharStreamException,
1124:                    TokenStreamException {
1125:                int _ttype;
1126:                Token _token = null;
1127:                int _begin = text.length();
1128:                _ttype = STRING_LITERAL;
1129:                int _saveIndex;
1130:
1131:                match('"');
1132:                {
1133:                    _loop184: do {
1134:                        if ((LA(1) == '\\')) {
1135:                            mESC(false);
1136:                        } else if ((_tokenSet_2.member(LA(1)))) {
1137:                            matchNot('"');
1138:                        } else {
1139:                            break _loop184;
1140:                        }
1141:
1142:                    } while (true);
1143:                }
1144:                match('"');
1145:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1146:                    _token = makeToken(_ttype);
1147:                    _token.setText(new String(text.getBuffer(), _begin, text
1148:                            .length()
1149:                            - _begin));
1150:                }
1151:                _returnToken = _token;
1152:            }
1153:
1154:            protected final void mXDIGIT(boolean _createToken)
1155:                    throws RecognitionException, CharStreamException,
1156:                    TokenStreamException {
1157:                int _ttype;
1158:                Token _token = null;
1159:                int _begin = text.length();
1160:                _ttype = XDIGIT;
1161:                int _saveIndex;
1162:
1163:                switch (LA(1)) {
1164:                case '0':
1165:                case '1':
1166:                case '2':
1167:                case '3':
1168:                case '4':
1169:                case '5':
1170:                case '6':
1171:                case '7':
1172:                case '8':
1173:                case '9': {
1174:                    matchRange('0', '9');
1175:                    break;
1176:                }
1177:                case 'a':
1178:                case 'b':
1179:                case 'c':
1180:                case 'd':
1181:                case 'e':
1182:                case 'f': {
1183:                    matchRange('a', 'f');
1184:                    break;
1185:                }
1186:                case 'A':
1187:                case 'B':
1188:                case 'C':
1189:                case 'D':
1190:                case 'E':
1191:                case 'F': {
1192:                    matchRange('A', 'F');
1193:                    break;
1194:                }
1195:                default: {
1196:                    throw new NoViableAltForCharException((char) LA(1),
1197:                            getFilename(), getLine(), getColumn());
1198:                }
1199:                }
1200:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1201:                    _token = makeToken(_ttype);
1202:                    _token.setText(new String(text.getBuffer(), _begin, text
1203:                            .length()
1204:                            - _begin));
1205:                }
1206:                _returnToken = _token;
1207:            }
1208:
1209:            protected final void mDIGIT(boolean _createToken)
1210:                    throws RecognitionException, CharStreamException,
1211:                    TokenStreamException {
1212:                int _ttype;
1213:                Token _token = null;
1214:                int _begin = text.length();
1215:                _ttype = DIGIT;
1216:                int _saveIndex;
1217:
1218:                matchRange('0', '9');
1219:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1220:                    _token = makeToken(_ttype);
1221:                    _token.setText(new String(text.getBuffer(), _begin, text
1222:                            .length()
1223:                            - _begin));
1224:                }
1225:                _returnToken = _token;
1226:            }
1227:
1228:            public final void mINT(boolean _createToken)
1229:                    throws RecognitionException, CharStreamException,
1230:                    TokenStreamException {
1231:                int _ttype;
1232:                Token _token = null;
1233:                int _begin = text.length();
1234:                _ttype = INT;
1235:                int _saveIndex;
1236:
1237:                {
1238:                    int _cnt196 = 0;
1239:                    _loop196: do {
1240:                        if (((LA(1) >= '0' && LA(1) <= '9'))) {
1241:                            matchRange('0', '9');
1242:                        } else {
1243:                            if (_cnt196 >= 1) {
1244:                                break _loop196;
1245:                            } else {
1246:                                throw new NoViableAltForCharException(
1247:                                        (char) LA(1), getFilename(), getLine(),
1248:                                        getColumn());
1249:                            }
1250:                        }
1251:
1252:                        _cnt196++;
1253:                    } while (true);
1254:                }
1255:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1256:                    _token = makeToken(_ttype);
1257:                    _token.setText(new String(text.getBuffer(), _begin, text
1258:                            .length()
1259:                            - _begin));
1260:                }
1261:                _returnToken = _token;
1262:            }
1263:
1264:            public final void mARG_ACTION(boolean _createToken)
1265:                    throws RecognitionException, CharStreamException,
1266:                    TokenStreamException {
1267:                int _ttype;
1268:                Token _token = null;
1269:                int _begin = text.length();
1270:                _ttype = ARG_ACTION;
1271:                int _saveIndex;
1272:
1273:                mNESTED_ARG_ACTION(false);
1274:                setText(StringUtils.stripFrontBack(getText(), "[", "]"));
1275:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1276:                    _token = makeToken(_ttype);
1277:                    _token.setText(new String(text.getBuffer(), _begin, text
1278:                            .length()
1279:                            - _begin));
1280:                }
1281:                _returnToken = _token;
1282:            }
1283:
1284:            protected final void mNESTED_ARG_ACTION(boolean _createToken)
1285:                    throws RecognitionException, CharStreamException,
1286:                    TokenStreamException {
1287:                int _ttype;
1288:                Token _token = null;
1289:                int _begin = text.length();
1290:                _ttype = NESTED_ARG_ACTION;
1291:                int _saveIndex;
1292:
1293:                match('[');
1294:                {
1295:                    _loop200: do {
1296:                        switch (LA(1)) {
1297:                        case '[': {
1298:                            mNESTED_ARG_ACTION(false);
1299:                            break;
1300:                        }
1301:                        case '\n': {
1302:                            match('\n');
1303:                            newline();
1304:                            break;
1305:                        }
1306:                        case '\'': {
1307:                            mCHAR_LITERAL(false);
1308:                            break;
1309:                        }
1310:                        case '"': {
1311:                            mSTRING_LITERAL(false);
1312:                            break;
1313:                        }
1314:                        default:
1315:                            if ((LA(1) == '\r') && (LA(2) == '\n')) {
1316:                                match('\r');
1317:                                match('\n');
1318:                                newline();
1319:                            } else if ((LA(1) == '\r')
1320:                                    && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
1321:                                match('\r');
1322:                                newline();
1323:                            } else if ((_tokenSet_3.member(LA(1)))) {
1324:                                matchNot(']');
1325:                            } else {
1326:                                break _loop200;
1327:                            }
1328:                        }
1329:                    } while (true);
1330:                }
1331:                match(']');
1332:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1333:                    _token = makeToken(_ttype);
1334:                    _token.setText(new String(text.getBuffer(), _begin, text
1335:                            .length()
1336:                            - _begin));
1337:                }
1338:                _returnToken = _token;
1339:            }
1340:
1341:            public final void mACTION(boolean _createToken)
1342:                    throws RecognitionException, CharStreamException,
1343:                    TokenStreamException {
1344:                int _ttype;
1345:                Token _token = null;
1346:                int _begin = text.length();
1347:                _ttype = ACTION;
1348:                int _saveIndex;
1349:                int actionLine = getLine();
1350:                int actionColumn = getColumn();
1351:
1352:                mNESTED_ACTION(false);
1353:                {
1354:                    if ((LA(1) == '?')) {
1355:                        match('?');
1356:                        _ttype = SEMPRED;
1357:                    } else {
1358:                    }
1359:
1360:                }
1361:
1362:                if (_ttype == ACTION) {
1363:                    setText(StringUtils.stripFrontBack(getText(), "{", "}"));
1364:                } else {
1365:                    setText(StringUtils.stripFrontBack(getText(), "{", "}?"));
1366:                }
1367:                CommonToken t = new CommonToken(_ttype, new String(text
1368:                        .getBuffer(), _begin, text.length() - _begin));
1369:                t.setLine(actionLine); // set action line to start
1370:                t.setColumn(actionColumn);
1371:                _token = t;
1372:
1373:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1374:                    _token = makeToken(_ttype);
1375:                    _token.setText(new String(text.getBuffer(), _begin, text
1376:                            .length()
1377:                            - _begin));
1378:                }
1379:                _returnToken = _token;
1380:            }
1381:
1382:            protected final void mNESTED_ACTION(boolean _createToken)
1383:                    throws RecognitionException, CharStreamException,
1384:                    TokenStreamException {
1385:                int _ttype;
1386:                Token _token = null;
1387:                int _begin = text.length();
1388:                _ttype = NESTED_ACTION;
1389:                int _saveIndex;
1390:
1391:                match('{');
1392:                {
1393:                    _loop206: do {
1394:                        // nongreedy exit test
1395:                        if ((LA(1) == '}') && (true))
1396:                            break _loop206;
1397:                        if ((LA(1) == '\n' || LA(1) == '\r')
1398:                                && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
1399:                            {
1400:                                if ((LA(1) == '\r') && (LA(2) == '\n')) {
1401:                                    match('\r');
1402:                                    match('\n');
1403:                                    newline();
1404:                                } else if ((LA(1) == '\r')
1405:                                        && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
1406:                                    match('\r');
1407:                                    newline();
1408:                                } else if ((LA(1) == '\n')) {
1409:                                    match('\n');
1410:                                    newline();
1411:                                } else {
1412:                                    throw new NoViableAltForCharException(
1413:                                            (char) LA(1), getFilename(),
1414:                                            getLine(), getColumn());
1415:                                }
1416:
1417:                            }
1418:                        } else if ((LA(1) == '{')
1419:                                && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
1420:                            mNESTED_ACTION(false);
1421:                        } else if ((LA(1) == '\'')
1422:                                && (_tokenSet_4.member(LA(2)))) {
1423:                            mCHAR_LITERAL(false);
1424:                        } else if ((LA(1) == '/')
1425:                                && (LA(2) == '*' || LA(2) == '/')) {
1426:                            mCOMMENT(false);
1427:                        } else if ((LA(1) == '"')
1428:                                && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
1429:                            mSTRING_LITERAL(false);
1430:                        } else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff'))
1431:                                && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
1432:                            matchNot(EOF_CHAR);
1433:                        } else {
1434:                            break _loop206;
1435:                        }
1436:
1437:                    } while (true);
1438:                }
1439:                match('}');
1440:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1441:                    _token = makeToken(_ttype);
1442:                    _token.setText(new String(text.getBuffer(), _begin, text
1443:                            .length()
1444:                            - _begin));
1445:                }
1446:                _returnToken = _token;
1447:            }
1448:
1449:            public final void mTOKEN_REF(boolean _createToken)
1450:                    throws RecognitionException, CharStreamException,
1451:                    TokenStreamException {
1452:                int _ttype;
1453:                Token _token = null;
1454:                int _begin = text.length();
1455:                _ttype = TOKEN_REF;
1456:                int _saveIndex;
1457:
1458:                matchRange('A', 'Z');
1459:                {
1460:                    _loop209: do {
1461:                        switch (LA(1)) {
1462:                        case 'a':
1463:                        case 'b':
1464:                        case 'c':
1465:                        case 'd':
1466:                        case 'e':
1467:                        case 'f':
1468:                        case 'g':
1469:                        case 'h':
1470:                        case 'i':
1471:                        case 'j':
1472:                        case 'k':
1473:                        case 'l':
1474:                        case 'm':
1475:                        case 'n':
1476:                        case 'o':
1477:                        case 'p':
1478:                        case 'q':
1479:                        case 'r':
1480:                        case 's':
1481:                        case 't':
1482:                        case 'u':
1483:                        case 'v':
1484:                        case 'w':
1485:                        case 'x':
1486:                        case 'y':
1487:                        case 'z': {
1488:                            matchRange('a', 'z');
1489:                            break;
1490:                        }
1491:                        case 'A':
1492:                        case 'B':
1493:                        case 'C':
1494:                        case 'D':
1495:                        case 'E':
1496:                        case 'F':
1497:                        case 'G':
1498:                        case 'H':
1499:                        case 'I':
1500:                        case 'J':
1501:                        case 'K':
1502:                        case 'L':
1503:                        case 'M':
1504:                        case 'N':
1505:                        case 'O':
1506:                        case 'P':
1507:                        case 'Q':
1508:                        case 'R':
1509:                        case 'S':
1510:                        case 'T':
1511:                        case 'U':
1512:                        case 'V':
1513:                        case 'W':
1514:                        case 'X':
1515:                        case 'Y':
1516:                        case 'Z': {
1517:                            matchRange('A', 'Z');
1518:                            break;
1519:                        }
1520:                        case '_': {
1521:                            match('_');
1522:                            break;
1523:                        }
1524:                        case '0':
1525:                        case '1':
1526:                        case '2':
1527:                        case '3':
1528:                        case '4':
1529:                        case '5':
1530:                        case '6':
1531:                        case '7':
1532:                        case '8':
1533:                        case '9': {
1534:                            matchRange('0', '9');
1535:                            break;
1536:                        }
1537:                        default: {
1538:                            break _loop209;
1539:                        }
1540:                        }
1541:                    } while (true);
1542:                }
1543:                _ttype = testLiteralsTable(_ttype);
1544:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1545:                    _token = makeToken(_ttype);
1546:                    _token.setText(new String(text.getBuffer(), _begin, text
1547:                            .length()
1548:                            - _begin));
1549:                }
1550:                _returnToken = _token;
1551:            }
1552:
1553:            public final void mRULE_REF(boolean _createToken)
1554:                    throws RecognitionException, CharStreamException,
1555:                    TokenStreamException {
1556:                int _ttype;
1557:                Token _token = null;
1558:                int _begin = text.length();
1559:                _ttype = RULE_REF;
1560:                int _saveIndex;
1561:
1562:                int t = 0;
1563:
1564:                t = mINTERNAL_RULE_REF(false);
1565:                _ttype = t;
1566:                {
1567:                    if ((true) && (t == LITERAL_options)) {
1568:                        mWS_LOOP(false);
1569:                        {
1570:                            if ((LA(1) == '{')) {
1571:                                match('{');
1572:                                _ttype = OPTIONS;
1573:                            } else {
1574:                            }
1575:
1576:                        }
1577:                    } else if ((true) && (t == LITERAL_tokens)) {
1578:                        mWS_LOOP(false);
1579:                        {
1580:                            if ((LA(1) == '{')) {
1581:                                match('{');
1582:                                _ttype = TOKENS;
1583:                            } else {
1584:                            }
1585:
1586:                        }
1587:                    } else {
1588:                    }
1589:
1590:                }
1591:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1592:                    _token = makeToken(_ttype);
1593:                    _token.setText(new String(text.getBuffer(), _begin, text
1594:                            .length()
1595:                            - _begin));
1596:                }
1597:                _returnToken = _token;
1598:            }
1599:
1600:            protected final int mINTERNAL_RULE_REF(boolean _createToken)
1601:                    throws RecognitionException, CharStreamException,
1602:                    TokenStreamException {
1603:                int t;
1604:                int _ttype;
1605:                Token _token = null;
1606:                int _begin = text.length();
1607:                _ttype = INTERNAL_RULE_REF;
1608:                int _saveIndex;
1609:
1610:                t = RULE_REF;
1611:
1612:                matchRange('a', 'z');
1613:                {
1614:                    _loop219: do {
1615:                        switch (LA(1)) {
1616:                        case 'a':
1617:                        case 'b':
1618:                        case 'c':
1619:                        case 'd':
1620:                        case 'e':
1621:                        case 'f':
1622:                        case 'g':
1623:                        case 'h':
1624:                        case 'i':
1625:                        case 'j':
1626:                        case 'k':
1627:                        case 'l':
1628:                        case 'm':
1629:                        case 'n':
1630:                        case 'o':
1631:                        case 'p':
1632:                        case 'q':
1633:                        case 'r':
1634:                        case 's':
1635:                        case 't':
1636:                        case 'u':
1637:                        case 'v':
1638:                        case 'w':
1639:                        case 'x':
1640:                        case 'y':
1641:                        case 'z': {
1642:                            matchRange('a', 'z');
1643:                            break;
1644:                        }
1645:                        case 'A':
1646:                        case 'B':
1647:                        case 'C':
1648:                        case 'D':
1649:                        case 'E':
1650:                        case 'F':
1651:                        case 'G':
1652:                        case 'H':
1653:                        case 'I':
1654:                        case 'J':
1655:                        case 'K':
1656:                        case 'L':
1657:                        case 'M':
1658:                        case 'N':
1659:                        case 'O':
1660:                        case 'P':
1661:                        case 'Q':
1662:                        case 'R':
1663:                        case 'S':
1664:                        case 'T':
1665:                        case 'U':
1666:                        case 'V':
1667:                        case 'W':
1668:                        case 'X':
1669:                        case 'Y':
1670:                        case 'Z': {
1671:                            matchRange('A', 'Z');
1672:                            break;
1673:                        }
1674:                        case '_': {
1675:                            match('_');
1676:                            break;
1677:                        }
1678:                        case '0':
1679:                        case '1':
1680:                        case '2':
1681:                        case '3':
1682:                        case '4':
1683:                        case '5':
1684:                        case '6':
1685:                        case '7':
1686:                        case '8':
1687:                        case '9': {
1688:                            matchRange('0', '9');
1689:                            break;
1690:                        }
1691:                        default: {
1692:                            break _loop219;
1693:                        }
1694:                        }
1695:                    } while (true);
1696:                }
1697:                t = testLiteralsTable(t);
1698:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1699:                    _token = makeToken(_ttype);
1700:                    _token.setText(new String(text.getBuffer(), _begin, text
1701:                            .length()
1702:                            - _begin));
1703:                }
1704:                _returnToken = _token;
1705:                return t;
1706:            }
1707:
1708:            protected final void mWS_LOOP(boolean _createToken)
1709:                    throws RecognitionException, CharStreamException,
1710:                    TokenStreamException {
1711:                int _ttype;
1712:                Token _token = null;
1713:                int _begin = text.length();
1714:                _ttype = WS_LOOP;
1715:                int _saveIndex;
1716:
1717:                {
1718:                    _loop216: do {
1719:                        switch (LA(1)) {
1720:                        case '\t':
1721:                        case '\n':
1722:                        case '\r':
1723:                        case ' ': {
1724:                            mWS(false);
1725:                            break;
1726:                        }
1727:                        case '/': {
1728:                            mCOMMENT(false);
1729:                            break;
1730:                        }
1731:                        default: {
1732:                            break _loop216;
1733:                        }
1734:                        }
1735:                    } while (true);
1736:                }
1737:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1738:                    _token = makeToken(_ttype);
1739:                    _token.setText(new String(text.getBuffer(), _begin, text
1740:                            .length()
1741:                            - _begin));
1742:                }
1743:                _returnToken = _token;
1744:            }
1745:
1746:            protected final void mWS_OPT(boolean _createToken)
1747:                    throws RecognitionException, CharStreamException,
1748:                    TokenStreamException {
1749:                int _ttype;
1750:                Token _token = null;
1751:                int _begin = text.length();
1752:                _ttype = WS_OPT;
1753:                int _saveIndex;
1754:
1755:                {
1756:                    if ((_tokenSet_5.member(LA(1)))) {
1757:                        mWS(false);
1758:                    } else {
1759:                    }
1760:
1761:                }
1762:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1763:                    _token = makeToken(_ttype);
1764:                    _token.setText(new String(text.getBuffer(), _begin, text
1765:                            .length()
1766:                            - _begin));
1767:                }
1768:                _returnToken = _token;
1769:            }
1770:
1771:            private static final long[] mk_tokenSet_0() {
1772:                long[] data = new long[8];
1773:                data[0] = -9224L;
1774:                for (int i = 1; i <= 3; i++) {
1775:                    data[i] = -1L;
1776:                }
1777:                return data;
1778:            }
1779:
1780:            public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
1781:
1782:            private static final long[] mk_tokenSet_1() {
1783:                long[] data = new long[8];
1784:                data[0] = -549755813896L;
1785:                data[1] = -268435457L;
1786:                for (int i = 2; i <= 3; i++) {
1787:                    data[i] = -1L;
1788:                }
1789:                return data;
1790:            }
1791:
1792:            public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
1793:
1794:            private static final long[] mk_tokenSet_2() {
1795:                long[] data = new long[8];
1796:                data[0] = -17179869192L;
1797:                data[1] = -268435457L;
1798:                for (int i = 2; i <= 3; i++) {
1799:                    data[i] = -1L;
1800:                }
1801:                return data;
1802:            }
1803:
1804:            public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
1805:
1806:            private static final long[] mk_tokenSet_3() {
1807:                long[] data = new long[8];
1808:                data[0] = -566935692296L;
1809:                data[1] = -671088641L;
1810:                for (int i = 2; i <= 3; i++) {
1811:                    data[i] = -1L;
1812:                }
1813:                return data;
1814:            }
1815:
1816:            public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
1817:
1818:            private static final long[] mk_tokenSet_4() {
1819:                long[] data = new long[8];
1820:                data[0] = -549755813896L;
1821:                for (int i = 1; i <= 3; i++) {
1822:                    data[i] = -1L;
1823:                }
1824:                return data;
1825:            }
1826:
1827:            public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
1828:
1829:            private static final long[] mk_tokenSet_5() {
1830:                long[] data = { 4294977024L, 0L, 0L, 0L, 0L };
1831:                return data;
1832:            }
1833:
1834:            public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
1835:
1836:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.