Source Code Cross Referenced for ActionLexer.java in  » Database-ORM » toplink » persistence » antlr » actions » csharp » 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 » Database ORM » toplink » persistence.antlr.actions.csharp 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        // $ANTLR : "action.g" -> "ActionLexer.java"$
0002:
0003:        package persistence.antlr.actions.csharp;
0004:
0005:        import java.io.InputStream;
0006:        import persistence.antlr.TokenStreamException;
0007:        import persistence.antlr.TokenStreamIOException;
0008:        import persistence.antlr.TokenStreamRecognitionException;
0009:        import persistence.antlr.CharStreamException;
0010:        import persistence.antlr.CharStreamIOException;
0011:        import persistence.antlr.ANTLRException;
0012:        import java.io.Reader;
0013:        import java.util.Hashtable;
0014:        import persistence.antlr.CharScanner;
0015:        import persistence.antlr.InputBuffer;
0016:        import persistence.antlr.ByteBuffer;
0017:        import persistence.antlr.CharBuffer;
0018:        import persistence.antlr.Token;
0019:        import persistence.antlr.CommonToken;
0020:        import persistence.antlr.RecognitionException;
0021:        import persistence.antlr.NoViableAltForCharException;
0022:        import persistence.antlr.MismatchedCharException;
0023:        import persistence.antlr.TokenStream;
0024:        import persistence.antlr.ANTLRHashString;
0025:        import persistence.antlr.LexerSharedInputState;
0026:        import persistence.antlr.collections.impl.BitSet;
0027:        import persistence.antlr.SemanticException;
0028:
0029:        import java.io.StringReader;
0030:        import persistence.antlr.collections.impl.Vector;
0031:        import persistence.antlr.*;
0032:
0033:        /** Perform the following translations:
0034:
0035:         AST related translations
0036:
0037:         ##				-> currentRule_AST
0038:         #(x,y,z)		-> codeGenerator.getASTCreateString(vector-of(x,y,z))
0039:         #[x]			-> codeGenerator.getASTCreateString(x)
0040:         #x				-> codeGenerator.mapTreeId(x)
0041:
0042:         Inside context of #(...), you can ref (x,y,z), [x], and x as shortcuts.
0043:
0044:         Text related translations
0045:
0046:         $append(x)	  -> text.append(x)
0047:         $setText(x)	  -> text.setLength(_begin); text.append(x)
0048:         $getText	  -> new String(text.getBuffer(),_begin,text.length()-_begin)
0049:         $setToken(x)  -> _token = x
0050:         $setType(x)	  -> _ttype = x
0051:         $FOLLOW(r)    -> FOLLOW set name for rule r (optional arg)
0052:         $FIRST(r)     -> FIRST set name for rule r (optional arg)
0053:         */
0054:        public class ActionLexer extends persistence.antlr.CharScanner
0055:                implements  ActionLexerTokenTypes, TokenStream {
0056:
0057:            protected RuleBlock currentRule;
0058:            protected CodeGenerator generator;
0059:            protected int lineOffset = 0;
0060:            private Tool antlrTool; // The ANTLR tool
0061:            ActionTransInfo transInfo;
0062:
0063:            public ActionLexer(String s, RuleBlock currentRule,
0064:                    CodeGenerator generator, ActionTransInfo transInfo) {
0065:                this (new StringReader(s));
0066:                this .currentRule = currentRule;
0067:                this .generator = generator;
0068:                this .transInfo = transInfo;
0069:            }
0070:
0071:            public void setLineOffset(int lineOffset) {
0072:                setLine(lineOffset);
0073:            }
0074:
0075:            public void setTool(Tool tool) {
0076:                this .antlrTool = tool;
0077:            }
0078:
0079:            public void reportError(RecognitionException e) {
0080:                antlrTool.error("Syntax error in action: " + e, getFilename(),
0081:                        getLine(), getColumn());
0082:            }
0083:
0084:            public void reportError(String s) {
0085:                antlrTool.error(s, getFilename(), getLine(), getColumn());
0086:            }
0087:
0088:            public void reportWarning(String s) {
0089:                if (getFilename() == null)
0090:                    antlrTool.warning(s);
0091:                else
0092:                    antlrTool.warning(s, getFilename(), getLine(), getColumn());
0093:            }
0094:
0095:            public ActionLexer(InputStream in) {
0096:                this (new ByteBuffer(in));
0097:            }
0098:
0099:            public ActionLexer(Reader in) {
0100:                this (new CharBuffer(in));
0101:            }
0102:
0103:            public ActionLexer(InputBuffer ib) {
0104:                this (new LexerSharedInputState(ib));
0105:            }
0106:
0107:            public ActionLexer(LexerSharedInputState state) {
0108:                super (state);
0109:                caseSensitiveLiterals = true;
0110:                setCaseSensitive(true);
0111:                literals = new Hashtable();
0112:            }
0113:
0114:            public Token nextToken() throws TokenStreamException {
0115:                Token theRetToken = null;
0116:                tryAgain: for (;;) {
0117:                    Token _token = null;
0118:                    int _ttype = Token.INVALID_TYPE;
0119:                    resetText();
0120:                    try { // for char stream error handling
0121:                        try { // for lexical error handling
0122:                            if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff'))) {
0123:                                mACTION(true);
0124:                                theRetToken = _returnToken;
0125:                            } else {
0126:                                if (LA(1) == EOF_CHAR) {
0127:                                    uponEOF();
0128:                                    _returnToken = makeToken(Token.EOF_TYPE);
0129:                                } else {
0130:                                    throw new NoViableAltForCharException(
0131:                                            (char) LA(1), getFilename(),
0132:                                            getLine(), getColumn());
0133:                                }
0134:                            }
0135:
0136:                            if (_returnToken == null)
0137:                                continue tryAgain; // found SKIP token
0138:                            _ttype = _returnToken.getType();
0139:                            _returnToken.setType(_ttype);
0140:                            return _returnToken;
0141:                        } catch (RecognitionException e) {
0142:                            throw new TokenStreamRecognitionException(e);
0143:                        }
0144:                    } catch (CharStreamException cse) {
0145:                        if (cse instanceof  CharStreamIOException) {
0146:                            throw new TokenStreamIOException(
0147:                                    ((CharStreamIOException) cse).io);
0148:                        } else {
0149:                            throw new TokenStreamException(cse.getMessage());
0150:                        }
0151:                    }
0152:                }
0153:            }
0154:
0155:            public final void mACTION(boolean _createToken)
0156:                    throws RecognitionException, CharStreamException,
0157:                    TokenStreamException {
0158:                int _ttype;
0159:                Token _token = null;
0160:                int _begin = text.length();
0161:                _ttype = ACTION;
0162:                int _saveIndex;
0163:
0164:                {
0165:                    int _cnt623 = 0;
0166:                    _loop623: do {
0167:                        switch (LA(1)) {
0168:                        case '#': {
0169:                            mAST_ITEM(false);
0170:                            break;
0171:                        }
0172:                        case '$': {
0173:                            mTEXT_ITEM(false);
0174:                            break;
0175:                        }
0176:                        default:
0177:                            if ((_tokenSet_0.member(LA(1)))) {
0178:                                mSTUFF(false);
0179:                            } else {
0180:                                if (_cnt623 >= 1) {
0181:                                    break _loop623;
0182:                                } else {
0183:                                    throw new NoViableAltForCharException(
0184:                                            (char) LA(1), getFilename(),
0185:                                            getLine(), getColumn());
0186:                                }
0187:                            }
0188:                        }
0189:                        _cnt623++;
0190:                    } while (true);
0191:                }
0192:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0193:                    _token = makeToken(_ttype);
0194:                    _token.setText(new String(text.getBuffer(), _begin, text
0195:                            .length()
0196:                            - _begin));
0197:                }
0198:                _returnToken = _token;
0199:            }
0200:
0201:            /** stuff in between #(...) and #id items
0202:             * Allow the escaping of the # for C# preprocessor stuff.
0203:             */
0204:            protected final void mSTUFF(boolean _createToken)
0205:                    throws RecognitionException, CharStreamException,
0206:                    TokenStreamException {
0207:                int _ttype;
0208:                Token _token = null;
0209:                int _begin = text.length();
0210:                _ttype = STUFF;
0211:                int _saveIndex;
0212:
0213:                switch (LA(1)) {
0214:                case '"': {
0215:                    mSTRING(false);
0216:                    break;
0217:                }
0218:                case '\'': {
0219:                    mCHAR(false);
0220:                    break;
0221:                }
0222:                case '\n': {
0223:                    match('\n');
0224:                    newline();
0225:                    break;
0226:                }
0227:                default:
0228:                    if ((LA(1) == '/') && (LA(2) == '*' || LA(2) == '/')) {
0229:                        mCOMMENT(false);
0230:                    } else if ((LA(1) == '\r') && (LA(2) == '\n') && (true)) {
0231:                        match("\r\n");
0232:                        newline();
0233:                    } else if ((LA(1) == '\\') && (LA(2) == '#') && (true)) {
0234:                        match('\\');
0235:                        match('#');
0236:                        text.setLength(_begin);
0237:                        text.append("#");
0238:                    } else if ((LA(1) == '/') && (_tokenSet_1.member(LA(2)))) {
0239:                        match('/');
0240:                        {
0241:                            match(_tokenSet_1);
0242:                        }
0243:                    } else if ((LA(1) == '\r') && (true) && (true)) {
0244:                        match('\r');
0245:                        newline();
0246:                    } else if ((_tokenSet_2.member(LA(1))) && (true) && (true)) {
0247:                        {
0248:                            match(_tokenSet_2);
0249:                        }
0250:                    } else {
0251:                        throw new NoViableAltForCharException((char) LA(1),
0252:                                getFilename(), getLine(), getColumn());
0253:                    }
0254:                }
0255:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0256:                    _token = makeToken(_ttype);
0257:                    _token.setText(new String(text.getBuffer(), _begin, text
0258:                            .length()
0259:                            - _begin));
0260:                }
0261:                _returnToken = _token;
0262:            }
0263:
0264:            protected final void mAST_ITEM(boolean _createToken)
0265:                    throws RecognitionException, CharStreamException,
0266:                    TokenStreamException {
0267:                int _ttype;
0268:                Token _token = null;
0269:                int _begin = text.length();
0270:                _ttype = AST_ITEM;
0271:                int _saveIndex;
0272:                Token t = null;
0273:                Token id = null;
0274:                Token ctor = null;
0275:
0276:                if ((LA(1) == '#') && (LA(2) == '(')) {
0277:                    _saveIndex = text.length();
0278:                    match('#');
0279:                    text.setLength(_saveIndex);
0280:                    mTREE(true);
0281:                    t = _returnToken;
0282:                } else if ((LA(1) == '#') && (_tokenSet_3.member(LA(2)))) {
0283:                    _saveIndex = text.length();
0284:                    match('#');
0285:                    text.setLength(_saveIndex);
0286:                    {
0287:                        switch (LA(1)) {
0288:                        case '\t':
0289:                        case '\n':
0290:                        case '\r':
0291:                        case ' ': {
0292:                            mWS(false);
0293:                            break;
0294:                        }
0295:                        case 'A':
0296:                        case 'B':
0297:                        case 'C':
0298:                        case 'D':
0299:                        case 'E':
0300:                        case 'F':
0301:                        case 'G':
0302:                        case 'H':
0303:                        case 'I':
0304:                        case 'J':
0305:                        case 'K':
0306:                        case 'L':
0307:                        case 'M':
0308:                        case 'N':
0309:                        case 'O':
0310:                        case 'P':
0311:                        case 'Q':
0312:                        case 'R':
0313:                        case 'S':
0314:                        case 'T':
0315:                        case 'U':
0316:                        case 'V':
0317:                        case 'W':
0318:                        case 'X':
0319:                        case 'Y':
0320:                        case 'Z':
0321:                        case '_':
0322:                        case 'a':
0323:                        case 'b':
0324:                        case 'c':
0325:                        case 'd':
0326:                        case 'e':
0327:                        case 'f':
0328:                        case 'g':
0329:                        case 'h':
0330:                        case 'i':
0331:                        case 'j':
0332:                        case 'k':
0333:                        case 'l':
0334:                        case 'm':
0335:                        case 'n':
0336:                        case 'o':
0337:                        case 'p':
0338:                        case 'q':
0339:                        case 'r':
0340:                        case 's':
0341:                        case 't':
0342:                        case 'u':
0343:                        case 'v':
0344:                        case 'w':
0345:                        case 'x':
0346:                        case 'y':
0347:                        case 'z': {
0348:                            break;
0349:                        }
0350:                        default: {
0351:                            throw new NoViableAltForCharException((char) LA(1),
0352:                                    getFilename(), getLine(), getColumn());
0353:                        }
0354:                        }
0355:                    }
0356:                    mID(true);
0357:                    id = _returnToken;
0358:
0359:                    String idt = id.getText();
0360:                    String mapped = generator
0361:                            .mapTreeId(id.getText(), transInfo);
0362:
0363:                    // verify that it's not a preprocessor macro...
0364:                    if ((mapped != null) && !idt.equals(mapped)) {
0365:                        text.setLength(_begin);
0366:                        text.append(mapped);
0367:                    } else {
0368:                        if (idt.equals("define") || idt.equals("undef")
0369:                                || idt.equals("if") || idt.equals("elif")
0370:                                || idt.equals("else") || idt.equals("endif")
0371:                                || idt.equals("line") || idt.equals("error")
0372:                                || idt.equals("warning")
0373:                                || idt.equals("region")
0374:                                || idt.equals("endregion")) {
0375:                            text.setLength(_begin);
0376:                            text.append("#" + idt);
0377:                        }
0378:                    }
0379:
0380:                    {
0381:                        if ((_tokenSet_4.member(LA(1))) && (true) && (true)) {
0382:                            mWS(false);
0383:                        } else {
0384:                        }
0385:
0386:                    }
0387:                    {
0388:                        if ((LA(1) == '=') && (true) && (true)) {
0389:                            mVAR_ASSIGN(false);
0390:                        } else {
0391:                        }
0392:
0393:                    }
0394:                } else if ((LA(1) == '#') && (LA(2) == '[')) {
0395:                    _saveIndex = text.length();
0396:                    match('#');
0397:                    text.setLength(_saveIndex);
0398:                    mAST_CONSTRUCTOR(true);
0399:                    ctor = _returnToken;
0400:                } else if ((LA(1) == '#') && (LA(2) == '#')) {
0401:                    match("##");
0402:
0403:                    if (currentRule != null) {
0404:                        String r = currentRule.getRuleName() + "_AST";
0405:                        text.setLength(_begin);
0406:                        text.append(r);
0407:
0408:                        if (transInfo != null) {
0409:                            transInfo.refRuleRoot = r; // we ref root of tree
0410:                        }
0411:                    } else {
0412:                        reportWarning("\"##\" not valid in this context");
0413:                        text.setLength(_begin);
0414:                        text.append("##");
0415:                    }
0416:
0417:                    {
0418:                        if ((_tokenSet_4.member(LA(1))) && (true) && (true)) {
0419:                            mWS(false);
0420:                        } else {
0421:                        }
0422:
0423:                    }
0424:                    {
0425:                        if ((LA(1) == '=') && (true) && (true)) {
0426:                            mVAR_ASSIGN(false);
0427:                        } else {
0428:                        }
0429:
0430:                    }
0431:                } else {
0432:                    throw new NoViableAltForCharException((char) LA(1),
0433:                            getFilename(), getLine(), getColumn());
0434:                }
0435:
0436:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0437:                    _token = makeToken(_ttype);
0438:                    _token.setText(new String(text.getBuffer(), _begin, text
0439:                            .length()
0440:                            - _begin));
0441:                }
0442:                _returnToken = _token;
0443:            }
0444:
0445:            protected final void mTEXT_ITEM(boolean _createToken)
0446:                    throws RecognitionException, CharStreamException,
0447:                    TokenStreamException {
0448:                int _ttype;
0449:                Token _token = null;
0450:                int _begin = text.length();
0451:                _ttype = TEXT_ITEM;
0452:                int _saveIndex;
0453:                Token a1 = null;
0454:                Token a2 = null;
0455:                Token a3 = null;
0456:                Token a4 = null;
0457:                Token a5 = null;
0458:                Token a6 = null;
0459:
0460:                if ((LA(1) == '$') && (LA(2) == 'F') && (LA(3) == 'O')) {
0461:                    match("$FOLLOW");
0462:                    {
0463:                        if ((_tokenSet_5.member(LA(1)))
0464:                                && (_tokenSet_6.member(LA(2)))
0465:                                && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
0466:                            {
0467:                                switch (LA(1)) {
0468:                                case '\t':
0469:                                case '\n':
0470:                                case '\r':
0471:                                case ' ': {
0472:                                    mWS(false);
0473:                                    break;
0474:                                }
0475:                                case '(': {
0476:                                    break;
0477:                                }
0478:                                default: {
0479:                                    throw new NoViableAltForCharException(
0480:                                            (char) LA(1), getFilename(),
0481:                                            getLine(), getColumn());
0482:                                }
0483:                                }
0484:                            }
0485:                            match('(');
0486:                            mTEXT_ARG(true);
0487:                            a5 = _returnToken;
0488:                            match(')');
0489:                        } else {
0490:                        }
0491:
0492:                    }
0493:
0494:                    String rule = currentRule.getRuleName();
0495:                    if (a5 != null) {
0496:                        rule = a5.getText();
0497:                    }
0498:                    String setName = generator.getFOLLOWBitSet(rule, 1);
0499:                    // System.out.println("FOLLOW("+rule+")="+setName);
0500:                    if (setName == null) {
0501:                        reportError("$FOLLOW(" + rule + ")"
0502:                                + ": unknown rule or bad lookahead computation");
0503:                    } else {
0504:                        text.setLength(_begin);
0505:                        text.append(setName);
0506:                    }
0507:
0508:                } else if ((LA(1) == '$') && (LA(2) == 'F') && (LA(3) == 'I')) {
0509:                    match("$FIRST");
0510:                    {
0511:                        if ((_tokenSet_5.member(LA(1)))
0512:                                && (_tokenSet_6.member(LA(2)))
0513:                                && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
0514:                            {
0515:                                switch (LA(1)) {
0516:                                case '\t':
0517:                                case '\n':
0518:                                case '\r':
0519:                                case ' ': {
0520:                                    mWS(false);
0521:                                    break;
0522:                                }
0523:                                case '(': {
0524:                                    break;
0525:                                }
0526:                                default: {
0527:                                    throw new NoViableAltForCharException(
0528:                                            (char) LA(1), getFilename(),
0529:                                            getLine(), getColumn());
0530:                                }
0531:                                }
0532:                            }
0533:                            match('(');
0534:                            mTEXT_ARG(true);
0535:                            a6 = _returnToken;
0536:                            match(')');
0537:                        } else {
0538:                        }
0539:
0540:                    }
0541:
0542:                    String rule = currentRule.getRuleName();
0543:                    if (a6 != null) {
0544:                        rule = a6.getText();
0545:                    }
0546:                    String setName = generator.getFIRSTBitSet(rule, 1);
0547:                    // System.out.println("FIRST("+rule+")="+setName);
0548:                    if (setName == null) {
0549:                        reportError("$FIRST(" + rule + ")"
0550:                                + ": unknown rule or bad lookahead computation");
0551:                    } else {
0552:                        text.setLength(_begin);
0553:                        text.append(setName);
0554:                    }
0555:
0556:                } else if ((LA(1) == '$') && (LA(2) == 'a')) {
0557:                    match("$append");
0558:                    {
0559:                        switch (LA(1)) {
0560:                        case '\t':
0561:                        case '\n':
0562:                        case '\r':
0563:                        case ' ': {
0564:                            mWS(false);
0565:                            break;
0566:                        }
0567:                        case '(': {
0568:                            break;
0569:                        }
0570:                        default: {
0571:                            throw new NoViableAltForCharException((char) LA(1),
0572:                                    getFilename(), getLine(), getColumn());
0573:                        }
0574:                        }
0575:                    }
0576:                    match('(');
0577:                    mTEXT_ARG(true);
0578:                    a1 = _returnToken;
0579:                    match(')');
0580:
0581:                    String t = "text.Append(" + a1.getText() + ")";
0582:                    text.setLength(_begin);
0583:                    text.append(t);
0584:
0585:                } else if ((LA(1) == '$') && (LA(2) == 's')) {
0586:                    match("$set");
0587:                    {
0588:                        if ((LA(1) == 'T') && (LA(2) == 'e')) {
0589:                            match("Text");
0590:                            {
0591:                                switch (LA(1)) {
0592:                                case '\t':
0593:                                case '\n':
0594:                                case '\r':
0595:                                case ' ': {
0596:                                    mWS(false);
0597:                                    break;
0598:                                }
0599:                                case '(': {
0600:                                    break;
0601:                                }
0602:                                default: {
0603:                                    throw new NoViableAltForCharException(
0604:                                            (char) LA(1), getFilename(),
0605:                                            getLine(), getColumn());
0606:                                }
0607:                                }
0608:                            }
0609:                            match('(');
0610:                            mTEXT_ARG(true);
0611:                            a2 = _returnToken;
0612:                            match(')');
0613:
0614:                            String t;
0615:                            t = "text.Length = _begin; text.Append("
0616:                                    + a2.getText() + ")";
0617:                            text.setLength(_begin);
0618:                            text.append(t);
0619:
0620:                        } else if ((LA(1) == 'T') && (LA(2) == 'o')) {
0621:                            match("Token");
0622:                            {
0623:                                switch (LA(1)) {
0624:                                case '\t':
0625:                                case '\n':
0626:                                case '\r':
0627:                                case ' ': {
0628:                                    mWS(false);
0629:                                    break;
0630:                                }
0631:                                case '(': {
0632:                                    break;
0633:                                }
0634:                                default: {
0635:                                    throw new NoViableAltForCharException(
0636:                                            (char) LA(1), getFilename(),
0637:                                            getLine(), getColumn());
0638:                                }
0639:                                }
0640:                            }
0641:                            match('(');
0642:                            mTEXT_ARG(true);
0643:                            a3 = _returnToken;
0644:                            match(')');
0645:
0646:                            String t = "_token = " + a3.getText();
0647:                            text.setLength(_begin);
0648:                            text.append(t);
0649:
0650:                        } else if ((LA(1) == 'T') && (LA(2) == 'y')) {
0651:                            match("Type");
0652:                            {
0653:                                switch (LA(1)) {
0654:                                case '\t':
0655:                                case '\n':
0656:                                case '\r':
0657:                                case ' ': {
0658:                                    mWS(false);
0659:                                    break;
0660:                                }
0661:                                case '(': {
0662:                                    break;
0663:                                }
0664:                                default: {
0665:                                    throw new NoViableAltForCharException(
0666:                                            (char) LA(1), getFilename(),
0667:                                            getLine(), getColumn());
0668:                                }
0669:                                }
0670:                            }
0671:                            match('(');
0672:                            mTEXT_ARG(true);
0673:                            a4 = _returnToken;
0674:                            match(')');
0675:
0676:                            String t = "_ttype = " + a4.getText();
0677:                            text.setLength(_begin);
0678:                            text.append(t);
0679:
0680:                        } else {
0681:                            throw new NoViableAltForCharException((char) LA(1),
0682:                                    getFilename(), getLine(), getColumn());
0683:                        }
0684:
0685:                    }
0686:                } else if ((LA(1) == '$') && (LA(2) == 'g')) {
0687:                    match("$getText");
0688:
0689:                    text.setLength(_begin);
0690:                    text.append("text.ToString(_begin, text.Length-_begin)");
0691:
0692:                } else {
0693:                    throw new NoViableAltForCharException((char) LA(1),
0694:                            getFilename(), getLine(), getColumn());
0695:                }
0696:
0697:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0698:                    _token = makeToken(_ttype);
0699:                    _token.setText(new String(text.getBuffer(), _begin, text
0700:                            .length()
0701:                            - _begin));
0702:                }
0703:                _returnToken = _token;
0704:            }
0705:
0706:            protected final void mCOMMENT(boolean _createToken)
0707:                    throws RecognitionException, CharStreamException,
0708:                    TokenStreamException {
0709:                int _ttype;
0710:                Token _token = null;
0711:                int _begin = text.length();
0712:                _ttype = COMMENT;
0713:                int _saveIndex;
0714:
0715:                if ((LA(1) == '/') && (LA(2) == '/')) {
0716:                    mSL_COMMENT(false);
0717:                } else if ((LA(1) == '/') && (LA(2) == '*')) {
0718:                    mML_COMMENT(false);
0719:                } else {
0720:                    throw new NoViableAltForCharException((char) LA(1),
0721:                            getFilename(), getLine(), getColumn());
0722:                }
0723:
0724:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0725:                    _token = makeToken(_ttype);
0726:                    _token.setText(new String(text.getBuffer(), _begin, text
0727:                            .length()
0728:                            - _begin));
0729:                }
0730:                _returnToken = _token;
0731:            }
0732:
0733:            protected final void mSTRING(boolean _createToken)
0734:                    throws RecognitionException, CharStreamException,
0735:                    TokenStreamException {
0736:                int _ttype;
0737:                Token _token = null;
0738:                int _begin = text.length();
0739:                _ttype = STRING;
0740:                int _saveIndex;
0741:
0742:                match('"');
0743:                {
0744:                    _loop720: do {
0745:                        if ((LA(1) == '\\')) {
0746:                            mESC(false);
0747:                        } else if ((_tokenSet_7.member(LA(1)))) {
0748:                            matchNot('"');
0749:                        } else {
0750:                            break _loop720;
0751:                        }
0752:
0753:                    } while (true);
0754:                }
0755:                match('"');
0756:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0757:                    _token = makeToken(_ttype);
0758:                    _token.setText(new String(text.getBuffer(), _begin, text
0759:                            .length()
0760:                            - _begin));
0761:                }
0762:                _returnToken = _token;
0763:            }
0764:
0765:            protected final void mCHAR(boolean _createToken)
0766:                    throws RecognitionException, CharStreamException,
0767:                    TokenStreamException {
0768:                int _ttype;
0769:                Token _token = null;
0770:                int _begin = text.length();
0771:                _ttype = CHAR;
0772:                int _saveIndex;
0773:
0774:                match('\'');
0775:                {
0776:                    if ((LA(1) == '\\')) {
0777:                        mESC(false);
0778:                    } else if ((_tokenSet_8.member(LA(1)))) {
0779:                        matchNot('\'');
0780:                    } else {
0781:                        throw new NoViableAltForCharException((char) LA(1),
0782:                                getFilename(), getLine(), getColumn());
0783:                    }
0784:
0785:                }
0786:                match('\'');
0787:                if (_createToken && _token == null && _ttype != Token.SKIP) {
0788:                    _token = makeToken(_ttype);
0789:                    _token.setText(new String(text.getBuffer(), _begin, text
0790:                            .length()
0791:                            - _begin));
0792:                }
0793:                _returnToken = _token;
0794:            }
0795:
0796:            protected final void mTREE(boolean _createToken)
0797:                    throws RecognitionException, CharStreamException,
0798:                    TokenStreamException {
0799:                int _ttype;
0800:                Token _token = null;
0801:                int _begin = text.length();
0802:                _ttype = TREE;
0803:                int _saveIndex;
0804:                Token t = null;
0805:                Token t2 = null;
0806:
0807:                StringBuffer buf = new StringBuffer();
0808:                int n = 0;
0809:                Vector terms = new Vector(10);
0810:
0811:                _saveIndex = text.length();
0812:                match('(');
0813:                text.setLength(_saveIndex);
0814:                {
0815:                    switch (LA(1)) {
0816:                    case '\t':
0817:                    case '\n':
0818:                    case '\r':
0819:                    case ' ': {
0820:                        _saveIndex = text.length();
0821:                        mWS(false);
0822:                        text.setLength(_saveIndex);
0823:                        break;
0824:                    }
0825:                    case '"':
0826:                    case '#':
0827:                    case '(':
0828:                    case 'A':
0829:                    case 'B':
0830:                    case 'C':
0831:                    case 'D':
0832:                    case 'E':
0833:                    case 'F':
0834:                    case 'G':
0835:                    case 'H':
0836:                    case 'I':
0837:                    case 'J':
0838:                    case 'K':
0839:                    case 'L':
0840:                    case 'M':
0841:                    case 'N':
0842:                    case 'O':
0843:                    case 'P':
0844:                    case 'Q':
0845:                    case 'R':
0846:                    case 'S':
0847:                    case 'T':
0848:                    case 'U':
0849:                    case 'V':
0850:                    case 'W':
0851:                    case 'X':
0852:                    case 'Y':
0853:                    case 'Z':
0854:                    case '[':
0855:                    case '_':
0856:                    case 'a':
0857:                    case 'b':
0858:                    case 'c':
0859:                    case 'd':
0860:                    case 'e':
0861:                    case 'f':
0862:                    case 'g':
0863:                    case 'h':
0864:                    case 'i':
0865:                    case 'j':
0866:                    case 'k':
0867:                    case 'l':
0868:                    case 'm':
0869:                    case 'n':
0870:                    case 'o':
0871:                    case 'p':
0872:                    case 'q':
0873:                    case 'r':
0874:                    case 's':
0875:                    case 't':
0876:                    case 'u':
0877:                    case 'v':
0878:                    case 'w':
0879:                    case 'x':
0880:                    case 'y':
0881:                    case 'z': {
0882:                        break;
0883:                    }
0884:                    default: {
0885:                        throw new NoViableAltForCharException((char) LA(1),
0886:                                getFilename(), getLine(), getColumn());
0887:                    }
0888:                    }
0889:                }
0890:                _saveIndex = text.length();
0891:                mTREE_ELEMENT(true);
0892:                text.setLength(_saveIndex);
0893:                t = _returnToken;
0894:
0895:                terms.appendElement(generator.processStringForASTConstructor(t
0896:                        .getText()));
0897:
0898:                {
0899:                    switch (LA(1)) {
0900:                    case '\t':
0901:                    case '\n':
0902:                    case '\r':
0903:                    case ' ': {
0904:                        _saveIndex = text.length();
0905:                        mWS(false);
0906:                        text.setLength(_saveIndex);
0907:                        break;
0908:                    }
0909:                    case ')':
0910:                    case ',': {
0911:                        break;
0912:                    }
0913:                    default: {
0914:                        throw new NoViableAltForCharException((char) LA(1),
0915:                                getFilename(), getLine(), getColumn());
0916:                    }
0917:                    }
0918:                }
0919:                {
0920:                    _loop649: do {
0921:                        if ((LA(1) == ',')) {
0922:                            _saveIndex = text.length();
0923:                            match(',');
0924:                            text.setLength(_saveIndex);
0925:                            {
0926:                                switch (LA(1)) {
0927:                                case '\t':
0928:                                case '\n':
0929:                                case '\r':
0930:                                case ' ': {
0931:                                    _saveIndex = text.length();
0932:                                    mWS(false);
0933:                                    text.setLength(_saveIndex);
0934:                                    break;
0935:                                }
0936:                                case '"':
0937:                                case '#':
0938:                                case '(':
0939:                                case 'A':
0940:                                case 'B':
0941:                                case 'C':
0942:                                case 'D':
0943:                                case 'E':
0944:                                case 'F':
0945:                                case 'G':
0946:                                case 'H':
0947:                                case 'I':
0948:                                case 'J':
0949:                                case 'K':
0950:                                case 'L':
0951:                                case 'M':
0952:                                case 'N':
0953:                                case 'O':
0954:                                case 'P':
0955:                                case 'Q':
0956:                                case 'R':
0957:                                case 'S':
0958:                                case 'T':
0959:                                case 'U':
0960:                                case 'V':
0961:                                case 'W':
0962:                                case 'X':
0963:                                case 'Y':
0964:                                case 'Z':
0965:                                case '[':
0966:                                case '_':
0967:                                case 'a':
0968:                                case 'b':
0969:                                case 'c':
0970:                                case 'd':
0971:                                case 'e':
0972:                                case 'f':
0973:                                case 'g':
0974:                                case 'h':
0975:                                case 'i':
0976:                                case 'j':
0977:                                case 'k':
0978:                                case 'l':
0979:                                case 'm':
0980:                                case 'n':
0981:                                case 'o':
0982:                                case 'p':
0983:                                case 'q':
0984:                                case 'r':
0985:                                case 's':
0986:                                case 't':
0987:                                case 'u':
0988:                                case 'v':
0989:                                case 'w':
0990:                                case 'x':
0991:                                case 'y':
0992:                                case 'z': {
0993:                                    break;
0994:                                }
0995:                                default: {
0996:                                    throw new NoViableAltForCharException(
0997:                                            (char) LA(1), getFilename(),
0998:                                            getLine(), getColumn());
0999:                                }
1000:                                }
1001:                            }
1002:                            _saveIndex = text.length();
1003:                            mTREE_ELEMENT(true);
1004:                            text.setLength(_saveIndex);
1005:                            t2 = _returnToken;
1006:
1007:                            terms.appendElement(generator
1008:                                    .processStringForASTConstructor(t2
1009:                                            .getText()));
1010:
1011:                            {
1012:                                switch (LA(1)) {
1013:                                case '\t':
1014:                                case '\n':
1015:                                case '\r':
1016:                                case ' ': {
1017:                                    _saveIndex = text.length();
1018:                                    mWS(false);
1019:                                    text.setLength(_saveIndex);
1020:                                    break;
1021:                                }
1022:                                case ')':
1023:                                case ',': {
1024:                                    break;
1025:                                }
1026:                                default: {
1027:                                    throw new NoViableAltForCharException(
1028:                                            (char) LA(1), getFilename(),
1029:                                            getLine(), getColumn());
1030:                                }
1031:                                }
1032:                            }
1033:                        } else {
1034:                            break _loop649;
1035:                        }
1036:
1037:                    } while (true);
1038:                }
1039:                text.setLength(_begin);
1040:                text.append(generator.getASTCreateString(terms));
1041:                _saveIndex = text.length();
1042:                match(')');
1043:                text.setLength(_saveIndex);
1044:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1045:                    _token = makeToken(_ttype);
1046:                    _token.setText(new String(text.getBuffer(), _begin, text
1047:                            .length()
1048:                            - _begin));
1049:                }
1050:                _returnToken = _token;
1051:            }
1052:
1053:            protected final void mWS(boolean _createToken)
1054:                    throws RecognitionException, CharStreamException,
1055:                    TokenStreamException {
1056:                int _ttype;
1057:                Token _token = null;
1058:                int _begin = text.length();
1059:                _ttype = WS;
1060:                int _saveIndex;
1061:
1062:                {
1063:                    int _cnt740 = 0;
1064:                    _loop740: do {
1065:                        if ((LA(1) == '\r') && (LA(2) == '\n') && (true)) {
1066:                            match('\r');
1067:                            match('\n');
1068:                            newline();
1069:                        } else if ((LA(1) == ' ') && (true) && (true)) {
1070:                            match(' ');
1071:                        } else if ((LA(1) == '\t') && (true) && (true)) {
1072:                            match('\t');
1073:                        } else if ((LA(1) == '\r') && (true) && (true)) {
1074:                            match('\r');
1075:                            newline();
1076:                        } else if ((LA(1) == '\n') && (true) && (true)) {
1077:                            match('\n');
1078:                            newline();
1079:                        } else {
1080:                            if (_cnt740 >= 1) {
1081:                                break _loop740;
1082:                            } else {
1083:                                throw new NoViableAltForCharException(
1084:                                        (char) LA(1), getFilename(), getLine(),
1085:                                        getColumn());
1086:                            }
1087:                        }
1088:
1089:                        _cnt740++;
1090:                    } while (true);
1091:                }
1092:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1093:                    _token = makeToken(_ttype);
1094:                    _token.setText(new String(text.getBuffer(), _begin, text
1095:                            .length()
1096:                            - _begin));
1097:                }
1098:                _returnToken = _token;
1099:            }
1100:
1101:            protected final void mID(boolean _createToken)
1102:                    throws RecognitionException, CharStreamException,
1103:                    TokenStreamException {
1104:                int _ttype;
1105:                Token _token = null;
1106:                int _begin = text.length();
1107:                _ttype = ID;
1108:                int _saveIndex;
1109:
1110:                {
1111:                    switch (LA(1)) {
1112:                    case 'a':
1113:                    case 'b':
1114:                    case 'c':
1115:                    case 'd':
1116:                    case 'e':
1117:                    case 'f':
1118:                    case 'g':
1119:                    case 'h':
1120:                    case 'i':
1121:                    case 'j':
1122:                    case 'k':
1123:                    case 'l':
1124:                    case 'm':
1125:                    case 'n':
1126:                    case 'o':
1127:                    case 'p':
1128:                    case 'q':
1129:                    case 'r':
1130:                    case 's':
1131:                    case 't':
1132:                    case 'u':
1133:                    case 'v':
1134:                    case 'w':
1135:                    case 'x':
1136:                    case 'y':
1137:                    case 'z': {
1138:                        matchRange('a', 'z');
1139:                        break;
1140:                    }
1141:                    case 'A':
1142:                    case 'B':
1143:                    case 'C':
1144:                    case 'D':
1145:                    case 'E':
1146:                    case 'F':
1147:                    case 'G':
1148:                    case 'H':
1149:                    case 'I':
1150:                    case 'J':
1151:                    case 'K':
1152:                    case 'L':
1153:                    case 'M':
1154:                    case 'N':
1155:                    case 'O':
1156:                    case 'P':
1157:                    case 'Q':
1158:                    case 'R':
1159:                    case 'S':
1160:                    case 'T':
1161:                    case 'U':
1162:                    case 'V':
1163:                    case 'W':
1164:                    case 'X':
1165:                    case 'Y':
1166:                    case 'Z': {
1167:                        matchRange('A', 'Z');
1168:                        break;
1169:                    }
1170:                    case '_': {
1171:                        match('_');
1172:                        break;
1173:                    }
1174:                    default: {
1175:                        throw new NoViableAltForCharException((char) LA(1),
1176:                                getFilename(), getLine(), getColumn());
1177:                    }
1178:                    }
1179:                }
1180:                {
1181:                    _loop706: do {
1182:                        if ((_tokenSet_9.member(LA(1))) && (true) && (true)) {
1183:                            {
1184:                                switch (LA(1)) {
1185:                                case 'a':
1186:                                case 'b':
1187:                                case 'c':
1188:                                case 'd':
1189:                                case 'e':
1190:                                case 'f':
1191:                                case 'g':
1192:                                case 'h':
1193:                                case 'i':
1194:                                case 'j':
1195:                                case 'k':
1196:                                case 'l':
1197:                                case 'm':
1198:                                case 'n':
1199:                                case 'o':
1200:                                case 'p':
1201:                                case 'q':
1202:                                case 'r':
1203:                                case 's':
1204:                                case 't':
1205:                                case 'u':
1206:                                case 'v':
1207:                                case 'w':
1208:                                case 'x':
1209:                                case 'y':
1210:                                case 'z': {
1211:                                    matchRange('a', 'z');
1212:                                    break;
1213:                                }
1214:                                case 'A':
1215:                                case 'B':
1216:                                case 'C':
1217:                                case 'D':
1218:                                case 'E':
1219:                                case 'F':
1220:                                case 'G':
1221:                                case 'H':
1222:                                case 'I':
1223:                                case 'J':
1224:                                case 'K':
1225:                                case 'L':
1226:                                case 'M':
1227:                                case 'N':
1228:                                case 'O':
1229:                                case 'P':
1230:                                case 'Q':
1231:                                case 'R':
1232:                                case 'S':
1233:                                case 'T':
1234:                                case 'U':
1235:                                case 'V':
1236:                                case 'W':
1237:                                case 'X':
1238:                                case 'Y':
1239:                                case 'Z': {
1240:                                    matchRange('A', 'Z');
1241:                                    break;
1242:                                }
1243:                                case '0':
1244:                                case '1':
1245:                                case '2':
1246:                                case '3':
1247:                                case '4':
1248:                                case '5':
1249:                                case '6':
1250:                                case '7':
1251:                                case '8':
1252:                                case '9': {
1253:                                    matchRange('0', '9');
1254:                                    break;
1255:                                }
1256:                                case '_': {
1257:                                    match('_');
1258:                                    break;
1259:                                }
1260:                                default: {
1261:                                    throw new NoViableAltForCharException(
1262:                                            (char) LA(1), getFilename(),
1263:                                            getLine(), getColumn());
1264:                                }
1265:                                }
1266:                            }
1267:                        } else {
1268:                            break _loop706;
1269:                        }
1270:
1271:                    } while (true);
1272:                }
1273:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1274:                    _token = makeToken(_ttype);
1275:                    _token.setText(new String(text.getBuffer(), _begin, text
1276:                            .length()
1277:                            - _begin));
1278:                }
1279:                _returnToken = _token;
1280:            }
1281:
1282:            protected final void mVAR_ASSIGN(boolean _createToken)
1283:                    throws RecognitionException, CharStreamException,
1284:                    TokenStreamException {
1285:                int _ttype;
1286:                Token _token = null;
1287:                int _begin = text.length();
1288:                _ttype = VAR_ASSIGN;
1289:                int _saveIndex;
1290:
1291:                match('=');
1292:
1293:                // inform the code generator that an assignment was done to
1294:                // AST root for the rule if invoker set refRuleRoot.
1295:                if (LA(1) != '=' && transInfo != null
1296:                        && transInfo.refRuleRoot != null) {
1297:                    transInfo.assignToRoot = true;
1298:                }
1299:
1300:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1301:                    _token = makeToken(_ttype);
1302:                    _token.setText(new String(text.getBuffer(), _begin, text
1303:                            .length()
1304:                            - _begin));
1305:                }
1306:                _returnToken = _token;
1307:            }
1308:
1309:            protected final void mAST_CONSTRUCTOR(boolean _createToken)
1310:                    throws RecognitionException, CharStreamException,
1311:                    TokenStreamException {
1312:                int _ttype;
1313:                Token _token = null;
1314:                int _begin = text.length();
1315:                _ttype = AST_CONSTRUCTOR;
1316:                int _saveIndex;
1317:                Token x = null;
1318:                Token y = null;
1319:                Token z = null;
1320:
1321:                _saveIndex = text.length();
1322:                match('[');
1323:                text.setLength(_saveIndex);
1324:                {
1325:                    switch (LA(1)) {
1326:                    case '\t':
1327:                    case '\n':
1328:                    case '\r':
1329:                    case ' ': {
1330:                        _saveIndex = text.length();
1331:                        mWS(false);
1332:                        text.setLength(_saveIndex);
1333:                        break;
1334:                    }
1335:                    case '"':
1336:                    case '#':
1337:                    case '(':
1338:                    case '0':
1339:                    case '1':
1340:                    case '2':
1341:                    case '3':
1342:                    case '4':
1343:                    case '5':
1344:                    case '6':
1345:                    case '7':
1346:                    case '8':
1347:                    case '9':
1348:                    case 'A':
1349:                    case 'B':
1350:                    case 'C':
1351:                    case 'D':
1352:                    case 'E':
1353:                    case 'F':
1354:                    case 'G':
1355:                    case 'H':
1356:                    case 'I':
1357:                    case 'J':
1358:                    case 'K':
1359:                    case 'L':
1360:                    case 'M':
1361:                    case 'N':
1362:                    case 'O':
1363:                    case 'P':
1364:                    case 'Q':
1365:                    case 'R':
1366:                    case 'S':
1367:                    case 'T':
1368:                    case 'U':
1369:                    case 'V':
1370:                    case 'W':
1371:                    case 'X':
1372:                    case 'Y':
1373:                    case 'Z':
1374:                    case '[':
1375:                    case '_':
1376:                    case 'a':
1377:                    case 'b':
1378:                    case 'c':
1379:                    case 'd':
1380:                    case 'e':
1381:                    case 'f':
1382:                    case 'g':
1383:                    case 'h':
1384:                    case 'i':
1385:                    case 'j':
1386:                    case 'k':
1387:                    case 'l':
1388:                    case 'm':
1389:                    case 'n':
1390:                    case 'o':
1391:                    case 'p':
1392:                    case 'q':
1393:                    case 'r':
1394:                    case 's':
1395:                    case 't':
1396:                    case 'u':
1397:                    case 'v':
1398:                    case 'w':
1399:                    case 'x':
1400:                    case 'y':
1401:                    case 'z': {
1402:                        break;
1403:                    }
1404:                    default: {
1405:                        throw new NoViableAltForCharException((char) LA(1),
1406:                                getFilename(), getLine(), getColumn());
1407:                    }
1408:                    }
1409:                }
1410:                _saveIndex = text.length();
1411:                mAST_CTOR_ELEMENT(true);
1412:                text.setLength(_saveIndex);
1413:                x = _returnToken;
1414:                {
1415:                    switch (LA(1)) {
1416:                    case '\t':
1417:                    case '\n':
1418:                    case '\r':
1419:                    case ' ': {
1420:                        _saveIndex = text.length();
1421:                        mWS(false);
1422:                        text.setLength(_saveIndex);
1423:                        break;
1424:                    }
1425:                    case ',':
1426:                    case ']': {
1427:                        break;
1428:                    }
1429:                    default: {
1430:                        throw new NoViableAltForCharException((char) LA(1),
1431:                                getFilename(), getLine(), getColumn());
1432:                    }
1433:                    }
1434:                }
1435:                {
1436:                    if ((LA(1) == ',') && (_tokenSet_10.member(LA(2)))
1437:                            && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
1438:                        _saveIndex = text.length();
1439:                        match(',');
1440:                        text.setLength(_saveIndex);
1441:                        {
1442:                            switch (LA(1)) {
1443:                            case '\t':
1444:                            case '\n':
1445:                            case '\r':
1446:                            case ' ': {
1447:                                _saveIndex = text.length();
1448:                                mWS(false);
1449:                                text.setLength(_saveIndex);
1450:                                break;
1451:                            }
1452:                            case '"':
1453:                            case '#':
1454:                            case '(':
1455:                            case '0':
1456:                            case '1':
1457:                            case '2':
1458:                            case '3':
1459:                            case '4':
1460:                            case '5':
1461:                            case '6':
1462:                            case '7':
1463:                            case '8':
1464:                            case '9':
1465:                            case 'A':
1466:                            case 'B':
1467:                            case 'C':
1468:                            case 'D':
1469:                            case 'E':
1470:                            case 'F':
1471:                            case 'G':
1472:                            case 'H':
1473:                            case 'I':
1474:                            case 'J':
1475:                            case 'K':
1476:                            case 'L':
1477:                            case 'M':
1478:                            case 'N':
1479:                            case 'O':
1480:                            case 'P':
1481:                            case 'Q':
1482:                            case 'R':
1483:                            case 'S':
1484:                            case 'T':
1485:                            case 'U':
1486:                            case 'V':
1487:                            case 'W':
1488:                            case 'X':
1489:                            case 'Y':
1490:                            case 'Z':
1491:                            case '[':
1492:                            case '_':
1493:                            case 'a':
1494:                            case 'b':
1495:                            case 'c':
1496:                            case 'd':
1497:                            case 'e':
1498:                            case 'f':
1499:                            case 'g':
1500:                            case 'h':
1501:                            case 'i':
1502:                            case 'j':
1503:                            case 'k':
1504:                            case 'l':
1505:                            case 'm':
1506:                            case 'n':
1507:                            case 'o':
1508:                            case 'p':
1509:                            case 'q':
1510:                            case 'r':
1511:                            case 's':
1512:                            case 't':
1513:                            case 'u':
1514:                            case 'v':
1515:                            case 'w':
1516:                            case 'x':
1517:                            case 'y':
1518:                            case 'z': {
1519:                                break;
1520:                            }
1521:                            default: {
1522:                                throw new NoViableAltForCharException(
1523:                                        (char) LA(1), getFilename(), getLine(),
1524:                                        getColumn());
1525:                            }
1526:                            }
1527:                        }
1528:                        _saveIndex = text.length();
1529:                        mAST_CTOR_ELEMENT(true);
1530:                        text.setLength(_saveIndex);
1531:                        y = _returnToken;
1532:                        {
1533:                            switch (LA(1)) {
1534:                            case '\t':
1535:                            case '\n':
1536:                            case '\r':
1537:                            case ' ': {
1538:                                _saveIndex = text.length();
1539:                                mWS(false);
1540:                                text.setLength(_saveIndex);
1541:                                break;
1542:                            }
1543:                            case ',':
1544:                            case ']': {
1545:                                break;
1546:                            }
1547:                            default: {
1548:                                throw new NoViableAltForCharException(
1549:                                        (char) LA(1), getFilename(), getLine(),
1550:                                        getColumn());
1551:                            }
1552:                            }
1553:                        }
1554:                    } else if ((LA(1) == ',' || LA(1) == ']') && (true) && (true)) {
1555:                    } else {
1556:                        throw new NoViableAltForCharException((char) LA(1),
1557:                                getFilename(), getLine(), getColumn());
1558:                    }
1559:
1560:                }
1561:                {
1562:                    switch (LA(1)) {
1563:                    case ',': {
1564:                        _saveIndex = text.length();
1565:                        match(',');
1566:                        text.setLength(_saveIndex);
1567:                        {
1568:                            switch (LA(1)) {
1569:                            case '\t':
1570:                            case '\n':
1571:                            case '\r':
1572:                            case ' ': {
1573:                                _saveIndex = text.length();
1574:                                mWS(false);
1575:                                text.setLength(_saveIndex);
1576:                                break;
1577:                            }
1578:                            case '"':
1579:                            case '#':
1580:                            case '(':
1581:                            case '0':
1582:                            case '1':
1583:                            case '2':
1584:                            case '3':
1585:                            case '4':
1586:                            case '5':
1587:                            case '6':
1588:                            case '7':
1589:                            case '8':
1590:                            case '9':
1591:                            case 'A':
1592:                            case 'B':
1593:                            case 'C':
1594:                            case 'D':
1595:                            case 'E':
1596:                            case 'F':
1597:                            case 'G':
1598:                            case 'H':
1599:                            case 'I':
1600:                            case 'J':
1601:                            case 'K':
1602:                            case 'L':
1603:                            case 'M':
1604:                            case 'N':
1605:                            case 'O':
1606:                            case 'P':
1607:                            case 'Q':
1608:                            case 'R':
1609:                            case 'S':
1610:                            case 'T':
1611:                            case 'U':
1612:                            case 'V':
1613:                            case 'W':
1614:                            case 'X':
1615:                            case 'Y':
1616:                            case 'Z':
1617:                            case '[':
1618:                            case '_':
1619:                            case 'a':
1620:                            case 'b':
1621:                            case 'c':
1622:                            case 'd':
1623:                            case 'e':
1624:                            case 'f':
1625:                            case 'g':
1626:                            case 'h':
1627:                            case 'i':
1628:                            case 'j':
1629:                            case 'k':
1630:                            case 'l':
1631:                            case 'm':
1632:                            case 'n':
1633:                            case 'o':
1634:                            case 'p':
1635:                            case 'q':
1636:                            case 'r':
1637:                            case 's':
1638:                            case 't':
1639:                            case 'u':
1640:                            case 'v':
1641:                            case 'w':
1642:                            case 'x':
1643:                            case 'y':
1644:                            case 'z': {
1645:                                break;
1646:                            }
1647:                            default: {
1648:                                throw new NoViableAltForCharException(
1649:                                        (char) LA(1), getFilename(), getLine(),
1650:                                        getColumn());
1651:                            }
1652:                            }
1653:                        }
1654:                        _saveIndex = text.length();
1655:                        mAST_CTOR_ELEMENT(true);
1656:                        text.setLength(_saveIndex);
1657:                        z = _returnToken;
1658:                        {
1659:                            switch (LA(1)) {
1660:                            case '\t':
1661:                            case '\n':
1662:                            case '\r':
1663:                            case ' ': {
1664:                                _saveIndex = text.length();
1665:                                mWS(false);
1666:                                text.setLength(_saveIndex);
1667:                                break;
1668:                            }
1669:                            case ']': {
1670:                                break;
1671:                            }
1672:                            default: {
1673:                                throw new NoViableAltForCharException(
1674:                                        (char) LA(1), getFilename(), getLine(),
1675:                                        getColumn());
1676:                            }
1677:                            }
1678:                        }
1679:                        break;
1680:                    }
1681:                    case ']': {
1682:                        break;
1683:                    }
1684:                    default: {
1685:                        throw new NoViableAltForCharException((char) LA(1),
1686:                                getFilename(), getLine(), getColumn());
1687:                    }
1688:                    }
1689:                }
1690:                _saveIndex = text.length();
1691:                match(']');
1692:                text.setLength(_saveIndex);
1693:
1694:                String args = generator.processStringForASTConstructor(x
1695:                        .getText());
1696:
1697:                // the second does not need processing coz it's a string
1698:                // (eg second param of astFactory.create(x,y)
1699:                if (y != null)
1700:                    args += "," + y.getText();
1701:                if (z != null)
1702:                    args += "," + z.getText();
1703:
1704:                text.setLength(_begin);
1705:                text.append(generator.getASTCreateString(null, args));
1706:
1707:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1708:                    _token = makeToken(_ttype);
1709:                    _token.setText(new String(text.getBuffer(), _begin, text
1710:                            .length()
1711:                            - _begin));
1712:                }
1713:                _returnToken = _token;
1714:            }
1715:
1716:            protected final void mTEXT_ARG(boolean _createToken)
1717:                    throws RecognitionException, CharStreamException,
1718:                    TokenStreamException {
1719:                int _ttype;
1720:                Token _token = null;
1721:                int _begin = text.length();
1722:                _ttype = TEXT_ARG;
1723:                int _saveIndex;
1724:
1725:                {
1726:                    switch (LA(1)) {
1727:                    case '\t':
1728:                    case '\n':
1729:                    case '\r':
1730:                    case ' ': {
1731:                        mWS(false);
1732:                        break;
1733:                    }
1734:                    case '"':
1735:                    case '$':
1736:                    case '\'':
1737:                    case '+':
1738:                    case '0':
1739:                    case '1':
1740:                    case '2':
1741:                    case '3':
1742:                    case '4':
1743:                    case '5':
1744:                    case '6':
1745:                    case '7':
1746:                    case '8':
1747:                    case '9':
1748:                    case 'A':
1749:                    case 'B':
1750:                    case 'C':
1751:                    case 'D':
1752:                    case 'E':
1753:                    case 'F':
1754:                    case 'G':
1755:                    case 'H':
1756:                    case 'I':
1757:                    case 'J':
1758:                    case 'K':
1759:                    case 'L':
1760:                    case 'M':
1761:                    case 'N':
1762:                    case 'O':
1763:                    case 'P':
1764:                    case 'Q':
1765:                    case 'R':
1766:                    case 'S':
1767:                    case 'T':
1768:                    case 'U':
1769:                    case 'V':
1770:                    case 'W':
1771:                    case 'X':
1772:                    case 'Y':
1773:                    case 'Z':
1774:                    case '_':
1775:                    case 'a':
1776:                    case 'b':
1777:                    case 'c':
1778:                    case 'd':
1779:                    case 'e':
1780:                    case 'f':
1781:                    case 'g':
1782:                    case 'h':
1783:                    case 'i':
1784:                    case 'j':
1785:                    case 'k':
1786:                    case 'l':
1787:                    case 'm':
1788:                    case 'n':
1789:                    case 'o':
1790:                    case 'p':
1791:                    case 'q':
1792:                    case 'r':
1793:                    case 's':
1794:                    case 't':
1795:                    case 'u':
1796:                    case 'v':
1797:                    case 'w':
1798:                    case 'x':
1799:                    case 'y':
1800:                    case 'z': {
1801:                        break;
1802:                    }
1803:                    default: {
1804:                        throw new NoViableAltForCharException((char) LA(1),
1805:                                getFilename(), getLine(), getColumn());
1806:                    }
1807:                    }
1808:                }
1809:                {
1810:                    int _cnt680 = 0;
1811:                    _loop680: do {
1812:                        if ((_tokenSet_11.member(LA(1)))
1813:                                && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))
1814:                                && (true)) {
1815:                            mTEXT_ARG_ELEMENT(false);
1816:                            {
1817:                                if ((_tokenSet_4.member(LA(1)))
1818:                                        && (_tokenSet_12.member(LA(2)))
1819:                                        && (true)) {
1820:                                    mWS(false);
1821:                                } else if ((_tokenSet_12.member(LA(1))) && (true) && (true)) {
1822:                                } else {
1823:                                    throw new NoViableAltForCharException(
1824:                                            (char) LA(1), getFilename(),
1825:                                            getLine(), getColumn());
1826:                                }
1827:
1828:                            }
1829:                        } else {
1830:                            if (_cnt680 >= 1) {
1831:                                break _loop680;
1832:                            } else {
1833:                                throw new NoViableAltForCharException(
1834:                                        (char) LA(1), getFilename(), getLine(),
1835:                                        getColumn());
1836:                            }
1837:                        }
1838:
1839:                        _cnt680++;
1840:                    } while (true);
1841:                }
1842:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1843:                    _token = makeToken(_ttype);
1844:                    _token.setText(new String(text.getBuffer(), _begin, text
1845:                            .length()
1846:                            - _begin));
1847:                }
1848:                _returnToken = _token;
1849:            }
1850:
1851:            protected final void mTREE_ELEMENT(boolean _createToken)
1852:                    throws RecognitionException, CharStreamException,
1853:                    TokenStreamException {
1854:                int _ttype;
1855:                Token _token = null;
1856:                int _begin = text.length();
1857:                _ttype = TREE_ELEMENT;
1858:                int _saveIndex;
1859:                Token id = null;
1860:                boolean was_mapped;
1861:
1862:                switch (LA(1)) {
1863:                case '(': {
1864:                    mTREE(false);
1865:                    break;
1866:                }
1867:                case '[': {
1868:                    mAST_CONSTRUCTOR(false);
1869:                    break;
1870:                }
1871:                case 'A':
1872:                case 'B':
1873:                case 'C':
1874:                case 'D':
1875:                case 'E':
1876:                case 'F':
1877:                case 'G':
1878:                case 'H':
1879:                case 'I':
1880:                case 'J':
1881:                case 'K':
1882:                case 'L':
1883:                case 'M':
1884:                case 'N':
1885:                case 'O':
1886:                case 'P':
1887:                case 'Q':
1888:                case 'R':
1889:                case 'S':
1890:                case 'T':
1891:                case 'U':
1892:                case 'V':
1893:                case 'W':
1894:                case 'X':
1895:                case 'Y':
1896:                case 'Z':
1897:                case '_':
1898:                case 'a':
1899:                case 'b':
1900:                case 'c':
1901:                case 'd':
1902:                case 'e':
1903:                case 'f':
1904:                case 'g':
1905:                case 'h':
1906:                case 'i':
1907:                case 'j':
1908:                case 'k':
1909:                case 'l':
1910:                case 'm':
1911:                case 'n':
1912:                case 'o':
1913:                case 'p':
1914:                case 'q':
1915:                case 'r':
1916:                case 's':
1917:                case 't':
1918:                case 'u':
1919:                case 'v':
1920:                case 'w':
1921:                case 'x':
1922:                case 'y':
1923:                case 'z': {
1924:                    mID_ELEMENT(false);
1925:                    break;
1926:                }
1927:                case '"': {
1928:                    mSTRING(false);
1929:                    break;
1930:                }
1931:                default:
1932:                    if ((LA(1) == '#') && (LA(2) == '(')) {
1933:                        _saveIndex = text.length();
1934:                        match('#');
1935:                        text.setLength(_saveIndex);
1936:                        mTREE(false);
1937:                    } else if ((LA(1) == '#') && (LA(2) == '[')) {
1938:                        _saveIndex = text.length();
1939:                        match('#');
1940:                        text.setLength(_saveIndex);
1941:                        mAST_CONSTRUCTOR(false);
1942:                    } else if ((LA(1) == '#') && (_tokenSet_13.member(LA(2)))) {
1943:                        _saveIndex = text.length();
1944:                        match('#');
1945:                        text.setLength(_saveIndex);
1946:                        was_mapped = mID_ELEMENT(true);
1947:                        id = _returnToken;
1948:                        // RK: I have a queer feeling that this maptreeid is redundant..
1949:                        if (!was_mapped) {
1950:                            String t = generator.mapTreeId(id.getText(), null);
1951:                            if (t != null) {
1952:                                text.setLength(_begin);
1953:                                text.append(t);
1954:                            }
1955:                        }
1956:
1957:                    } else if ((LA(1) == '#') && (LA(2) == '#')) {
1958:                        match("##");
1959:
1960:                        if (currentRule != null) {
1961:                            String t = currentRule.getRuleName() + "_AST";
1962:                            text.setLength(_begin);
1963:                            text.append(t);
1964:                        } else {
1965:                            reportError("\"##\" not valid in this context");
1966:                            text.setLength(_begin);
1967:                            text.append("##");
1968:                        }
1969:
1970:                    } else {
1971:                        throw new NoViableAltForCharException((char) LA(1),
1972:                                getFilename(), getLine(), getColumn());
1973:                    }
1974:                }
1975:                if (_createToken && _token == null && _ttype != Token.SKIP) {
1976:                    _token = makeToken(_ttype);
1977:                    _token.setText(new String(text.getBuffer(), _begin, text
1978:                            .length()
1979:                            - _begin));
1980:                }
1981:                _returnToken = _token;
1982:            }
1983:
1984:            /** An ID_ELEMENT can be a func call, array ref, simple var,
1985:             *  or AST label ref.
1986:             */
1987:            protected final boolean mID_ELEMENT(boolean _createToken)
1988:                    throws RecognitionException, CharStreamException,
1989:                    TokenStreamException {
1990:                boolean mapped = false;
1991:                int _ttype;
1992:                Token _token = null;
1993:                int _begin = text.length();
1994:                _ttype = ID_ELEMENT;
1995:                int _saveIndex;
1996:                Token id = null;
1997:
1998:                mID(true);
1999:                id = _returnToken;
2000:                {
2001:                    if ((_tokenSet_4.member(LA(1)))
2002:                            && (_tokenSet_14.member(LA(2))) && (true)) {
2003:                        _saveIndex = text.length();
2004:                        mWS(false);
2005:                        text.setLength(_saveIndex);
2006:                    } else if ((_tokenSet_14.member(LA(1))) && (true) && (true)) {
2007:                    } else {
2008:                        throw new NoViableAltForCharException((char) LA(1),
2009:                                getFilename(), getLine(), getColumn());
2010:                    }
2011:
2012:                }
2013:                {
2014:                    switch (LA(1)) {
2015:                    case '(': {
2016:                        match('(');
2017:                        {
2018:                            if ((_tokenSet_4.member(LA(1)))
2019:                                    && (_tokenSet_15.member(LA(2)))
2020:                                    && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
2021:                                _saveIndex = text.length();
2022:                                mWS(false);
2023:                                text.setLength(_saveIndex);
2024:                            } else if ((_tokenSet_15.member(LA(1)))
2025:                                    && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))
2026:                                    && (true)) {
2027:                            } else {
2028:                                throw new NoViableAltForCharException(
2029:                                        (char) LA(1), getFilename(), getLine(),
2030:                                        getColumn());
2031:                            }
2032:
2033:                        }
2034:                        {
2035:                            switch (LA(1)) {
2036:                            case '"':
2037:                            case '#':
2038:                            case '\'':
2039:                            case '(':
2040:                            case '0':
2041:                            case '1':
2042:                            case '2':
2043:                            case '3':
2044:                            case '4':
2045:                            case '5':
2046:                            case '6':
2047:                            case '7':
2048:                            case '8':
2049:                            case '9':
2050:                            case 'A':
2051:                            case 'B':
2052:                            case 'C':
2053:                            case 'D':
2054:                            case 'E':
2055:                            case 'F':
2056:                            case 'G':
2057:                            case 'H':
2058:                            case 'I':
2059:                            case 'J':
2060:                            case 'K':
2061:                            case 'L':
2062:                            case 'M':
2063:                            case 'N':
2064:                            case 'O':
2065:                            case 'P':
2066:                            case 'Q':
2067:                            case 'R':
2068:                            case 'S':
2069:                            case 'T':
2070:                            case 'U':
2071:                            case 'V':
2072:                            case 'W':
2073:                            case 'X':
2074:                            case 'Y':
2075:                            case 'Z':
2076:                            case '[':
2077:                            case '_':
2078:                            case 'a':
2079:                            case 'b':
2080:                            case 'c':
2081:                            case 'd':
2082:                            case 'e':
2083:                            case 'f':
2084:                            case 'g':
2085:                            case 'h':
2086:                            case 'i':
2087:                            case 'j':
2088:                            case 'k':
2089:                            case 'l':
2090:                            case 'm':
2091:                            case 'n':
2092:                            case 'o':
2093:                            case 'p':
2094:                            case 'q':
2095:                            case 'r':
2096:                            case 's':
2097:                            case 't':
2098:                            case 'u':
2099:                            case 'v':
2100:                            case 'w':
2101:                            case 'x':
2102:                            case 'y':
2103:                            case 'z': {
2104:                                mARG(false);
2105:                                {
2106:                                    _loop668: do {
2107:                                        if ((LA(1) == ',')) {
2108:                                            match(',');
2109:                                            {
2110:                                                switch (LA(1)) {
2111:                                                case '\t':
2112:                                                case '\n':
2113:                                                case '\r':
2114:                                                case ' ': {
2115:                                                    _saveIndex = text.length();
2116:                                                    mWS(false);
2117:                                                    text.setLength(_saveIndex);
2118:                                                    break;
2119:                                                }
2120:                                                case '"':
2121:                                                case '#':
2122:                                                case '\'':
2123:                                                case '(':
2124:                                                case '0':
2125:                                                case '1':
2126:                                                case '2':
2127:                                                case '3':
2128:                                                case '4':
2129:                                                case '5':
2130:                                                case '6':
2131:                                                case '7':
2132:                                                case '8':
2133:                                                case '9':
2134:                                                case 'A':
2135:                                                case 'B':
2136:                                                case 'C':
2137:                                                case 'D':
2138:                                                case 'E':
2139:                                                case 'F':
2140:                                                case 'G':
2141:                                                case 'H':
2142:                                                case 'I':
2143:                                                case 'J':
2144:                                                case 'K':
2145:                                                case 'L':
2146:                                                case 'M':
2147:                                                case 'N':
2148:                                                case 'O':
2149:                                                case 'P':
2150:                                                case 'Q':
2151:                                                case 'R':
2152:                                                case 'S':
2153:                                                case 'T':
2154:                                                case 'U':
2155:                                                case 'V':
2156:                                                case 'W':
2157:                                                case 'X':
2158:                                                case 'Y':
2159:                                                case 'Z':
2160:                                                case '[':
2161:                                                case '_':
2162:                                                case 'a':
2163:                                                case 'b':
2164:                                                case 'c':
2165:                                                case 'd':
2166:                                                case 'e':
2167:                                                case 'f':
2168:                                                case 'g':
2169:                                                case 'h':
2170:                                                case 'i':
2171:                                                case 'j':
2172:                                                case 'k':
2173:                                                case 'l':
2174:                                                case 'm':
2175:                                                case 'n':
2176:                                                case 'o':
2177:                                                case 'p':
2178:                                                case 'q':
2179:                                                case 'r':
2180:                                                case 's':
2181:                                                case 't':
2182:                                                case 'u':
2183:                                                case 'v':
2184:                                                case 'w':
2185:                                                case 'x':
2186:                                                case 'y':
2187:                                                case 'z': {
2188:                                                    break;
2189:                                                }
2190:                                                default: {
2191:                                                    throw new NoViableAltForCharException(
2192:                                                            (char) LA(1),
2193:                                                            getFilename(),
2194:                                                            getLine(),
2195:                                                            getColumn());
2196:                                                }
2197:                                                }
2198:                                            }
2199:                                            mARG(false);
2200:                                        } else {
2201:                                            break _loop668;
2202:                                        }
2203:
2204:                                    } while (true);
2205:                                }
2206:                                break;
2207:                            }
2208:                            case '\t':
2209:                            case '\n':
2210:                            case '\r':
2211:                            case ' ':
2212:                            case ')': {
2213:                                break;
2214:                            }
2215:                            default: {
2216:                                throw new NoViableAltForCharException(
2217:                                        (char) LA(1), getFilename(), getLine(),
2218:                                        getColumn());
2219:                            }
2220:                            }
2221:                        }
2222:                        {
2223:                            switch (LA(1)) {
2224:                            case '\t':
2225:                            case '\n':
2226:                            case '\r':
2227:                            case ' ': {
2228:                                _saveIndex = text.length();
2229:                                mWS(false);
2230:                                text.setLength(_saveIndex);
2231:                                break;
2232:                            }
2233:                            case ')': {
2234:                                break;
2235:                            }
2236:                            default: {
2237:                                throw new NoViableAltForCharException(
2238:                                        (char) LA(1), getFilename(), getLine(),
2239:                                        getColumn());
2240:                            }
2241:                            }
2242:                        }
2243:                        match(')');
2244:                        break;
2245:                    }
2246:                    case '[': {
2247:                        {
2248:                            int _cnt673 = 0;
2249:                            _loop673: do {
2250:                                if ((LA(1) == '[')) {
2251:                                    match('[');
2252:                                    {
2253:                                        switch (LA(1)) {
2254:                                        case '\t':
2255:                                        case '\n':
2256:                                        case '\r':
2257:                                        case ' ': {
2258:                                            _saveIndex = text.length();
2259:                                            mWS(false);
2260:                                            text.setLength(_saveIndex);
2261:                                            break;
2262:                                        }
2263:                                        case '"':
2264:                                        case '#':
2265:                                        case '\'':
2266:                                        case '(':
2267:                                        case '0':
2268:                                        case '1':
2269:                                        case '2':
2270:                                        case '3':
2271:                                        case '4':
2272:                                        case '5':
2273:                                        case '6':
2274:                                        case '7':
2275:                                        case '8':
2276:                                        case '9':
2277:                                        case 'A':
2278:                                        case 'B':
2279:                                        case 'C':
2280:                                        case 'D':
2281:                                        case 'E':
2282:                                        case 'F':
2283:                                        case 'G':
2284:                                        case 'H':
2285:                                        case 'I':
2286:                                        case 'J':
2287:                                        case 'K':
2288:                                        case 'L':
2289:                                        case 'M':
2290:                                        case 'N':
2291:                                        case 'O':
2292:                                        case 'P':
2293:                                        case 'Q':
2294:                                        case 'R':
2295:                                        case 'S':
2296:                                        case 'T':
2297:                                        case 'U':
2298:                                        case 'V':
2299:                                        case 'W':
2300:                                        case 'X':
2301:                                        case 'Y':
2302:                                        case 'Z':
2303:                                        case '[':
2304:                                        case '_':
2305:                                        case 'a':
2306:                                        case 'b':
2307:                                        case 'c':
2308:                                        case 'd':
2309:                                        case 'e':
2310:                                        case 'f':
2311:                                        case 'g':
2312:                                        case 'h':
2313:                                        case 'i':
2314:                                        case 'j':
2315:                                        case 'k':
2316:                                        case 'l':
2317:                                        case 'm':
2318:                                        case 'n':
2319:                                        case 'o':
2320:                                        case 'p':
2321:                                        case 'q':
2322:                                        case 'r':
2323:                                        case 's':
2324:                                        case 't':
2325:                                        case 'u':
2326:                                        case 'v':
2327:                                        case 'w':
2328:                                        case 'x':
2329:                                        case 'y':
2330:                                        case 'z': {
2331:                                            break;
2332:                                        }
2333:                                        default: {
2334:                                            throw new NoViableAltForCharException(
2335:                                                    (char) LA(1),
2336:                                                    getFilename(), getLine(),
2337:                                                    getColumn());
2338:                                        }
2339:                                        }
2340:                                    }
2341:                                    mARG(false);
2342:                                    {
2343:                                        switch (LA(1)) {
2344:                                        case '\t':
2345:                                        case '\n':
2346:                                        case '\r':
2347:                                        case ' ': {
2348:                                            _saveIndex = text.length();
2349:                                            mWS(false);
2350:                                            text.setLength(_saveIndex);
2351:                                            break;
2352:                                        }
2353:                                        case ']': {
2354:                                            break;
2355:                                        }
2356:                                        default: {
2357:                                            throw new NoViableAltForCharException(
2358:                                                    (char) LA(1),
2359:                                                    getFilename(), getLine(),
2360:                                                    getColumn());
2361:                                        }
2362:                                        }
2363:                                    }
2364:                                    match(']');
2365:                                } else {
2366:                                    if (_cnt673 >= 1) {
2367:                                        break _loop673;
2368:                                    } else {
2369:                                        throw new NoViableAltForCharException(
2370:                                                (char) LA(1), getFilename(),
2371:                                                getLine(), getColumn());
2372:                                    }
2373:                                }
2374:
2375:                                _cnt673++;
2376:                            } while (true);
2377:                        }
2378:                        break;
2379:                    }
2380:                    case '.': {
2381:                        match('.');
2382:                        mID_ELEMENT(false);
2383:                        break;
2384:                    }
2385:                    default:
2386:                        if ((LA(1) == '-') && (LA(2) == '>')
2387:                                && (_tokenSet_13.member(LA(3)))) {
2388:                            match("->");
2389:                            mID_ELEMENT(false);
2390:                        } else if ((_tokenSet_16.member(LA(1))) && (true) && (true)) {
2391:
2392:                            mapped = true;
2393:                            String t = generator.mapTreeId(id.getText(),
2394:                                    transInfo);
2395:                            //				System.out.println("mapped: "+id.getText()+" -> "+t);
2396:                            if (t != null) {
2397:                                text.setLength(_begin);
2398:                                text.append(t);
2399:                            }
2400:
2401:                            {
2402:                                if (((_tokenSet_17.member(LA(1)))
2403:                                        && (_tokenSet_16.member(LA(2))) && (true))
2404:                                        && (transInfo != null && transInfo.refRuleRoot != null)) {
2405:                                    {
2406:                                        switch (LA(1)) {
2407:                                        case '\t':
2408:                                        case '\n':
2409:                                        case '\r':
2410:                                        case ' ': {
2411:                                            mWS(false);
2412:                                            break;
2413:                                        }
2414:                                        case '=': {
2415:                                            break;
2416:                                        }
2417:                                        default: {
2418:                                            throw new NoViableAltForCharException(
2419:                                                    (char) LA(1),
2420:                                                    getFilename(), getLine(),
2421:                                                    getColumn());
2422:                                        }
2423:                                        }
2424:                                    }
2425:                                    mVAR_ASSIGN(false);
2426:                                } else if ((_tokenSet_18.member(LA(1))) && (true) && (true)) {
2427:                                } else {
2428:                                    throw new NoViableAltForCharException(
2429:                                            (char) LA(1), getFilename(),
2430:                                            getLine(), getColumn());
2431:                                }
2432:
2433:                            }
2434:                        } else {
2435:                            throw new NoViableAltForCharException((char) LA(1),
2436:                                    getFilename(), getLine(), getColumn());
2437:                        }
2438:                    }
2439:                }
2440:                if (_createToken && _token == null && _ttype != Token.SKIP) {
2441:                    _token = makeToken(_ttype);
2442:                    _token.setText(new String(text.getBuffer(), _begin, text
2443:                            .length()
2444:                            - _begin));
2445:                }
2446:                _returnToken = _token;
2447:                return mapped;
2448:            }
2449:
2450:            /** The arguments of a #[...] constructor are text, token type,
2451:             *  or a tree.
2452:             */
2453:            protected final void mAST_CTOR_ELEMENT(boolean _createToken)
2454:                    throws RecognitionException, CharStreamException,
2455:                    TokenStreamException {
2456:                int _ttype;
2457:                Token _token = null;
2458:                int _begin = text.length();
2459:                _ttype = AST_CTOR_ELEMENT;
2460:                int _saveIndex;
2461:
2462:                if ((LA(1) == '"')
2463:                        && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))
2464:                        && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
2465:                    mSTRING(false);
2466:                } else if ((_tokenSet_19.member(LA(1)))
2467:                        && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
2468:                    mTREE_ELEMENT(false);
2469:                } else if (((LA(1) >= '0' && LA(1) <= '9'))) {
2470:                    mINT(false);
2471:                } else {
2472:                    throw new NoViableAltForCharException((char) LA(1),
2473:                            getFilename(), getLine(), getColumn());
2474:                }
2475:
2476:                if (_createToken && _token == null && _ttype != Token.SKIP) {
2477:                    _token = makeToken(_ttype);
2478:                    _token.setText(new String(text.getBuffer(), _begin, text
2479:                            .length()
2480:                            - _begin));
2481:                }
2482:                _returnToken = _token;
2483:            }
2484:
2485:            protected final void mINT(boolean _createToken)
2486:                    throws RecognitionException, CharStreamException,
2487:                    TokenStreamException {
2488:                int _ttype;
2489:                Token _token = null;
2490:                int _begin = text.length();
2491:                _ttype = INT;
2492:                int _saveIndex;
2493:
2494:                {
2495:                    int _cnt731 = 0;
2496:                    _loop731: do {
2497:                        if (((LA(1) >= '0' && LA(1) <= '9'))) {
2498:                            mDIGIT(false);
2499:                        } else {
2500:                            if (_cnt731 >= 1) {
2501:                                break _loop731;
2502:                            } else {
2503:                                throw new NoViableAltForCharException(
2504:                                        (char) LA(1), getFilename(), getLine(),
2505:                                        getColumn());
2506:                            }
2507:                        }
2508:
2509:                        _cnt731++;
2510:                    } while (true);
2511:                }
2512:                if (_createToken && _token == null && _ttype != Token.SKIP) {
2513:                    _token = makeToken(_ttype);
2514:                    _token.setText(new String(text.getBuffer(), _begin, text
2515:                            .length()
2516:                            - _begin));
2517:                }
2518:                _returnToken = _token;
2519:            }
2520:
2521:            protected final void mARG(boolean _createToken)
2522:                    throws RecognitionException, CharStreamException,
2523:                    TokenStreamException {
2524:                int _ttype;
2525:                Token _token = null;
2526:                int _begin = text.length();
2527:                _ttype = ARG;
2528:                int _saveIndex;
2529:
2530:                {
2531:                    switch (LA(1)) {
2532:                    case '\'': {
2533:                        mCHAR(false);
2534:                        break;
2535:                    }
2536:                    case '0':
2537:                    case '1':
2538:                    case '2':
2539:                    case '3':
2540:                    case '4':
2541:                    case '5':
2542:                    case '6':
2543:                    case '7':
2544:                    case '8':
2545:                    case '9': {
2546:                        mINT_OR_FLOAT(false);
2547:                        break;
2548:                    }
2549:                    default:
2550:                        if ((_tokenSet_19.member(LA(1)))
2551:                                && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))
2552:                                && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
2553:                            mTREE_ELEMENT(false);
2554:                        } else if ((LA(1) == '"')
2555:                                && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))
2556:                                && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
2557:                            mSTRING(false);
2558:                        } else {
2559:                            throw new NoViableAltForCharException((char) LA(1),
2560:                                    getFilename(), getLine(), getColumn());
2561:                        }
2562:                    }
2563:                }
2564:                {
2565:                    _loop701: do {
2566:                        if ((_tokenSet_20.member(LA(1)))
2567:                                && (_tokenSet_21.member(LA(2)))
2568:                                && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
2569:                            {
2570:                                switch (LA(1)) {
2571:                                case '\t':
2572:                                case '\n':
2573:                                case '\r':
2574:                                case ' ': {
2575:                                    mWS(false);
2576:                                    break;
2577:                                }
2578:                                case '*':
2579:                                case '+':
2580:                                case '-':
2581:                                case '/': {
2582:                                    break;
2583:                                }
2584:                                default: {
2585:                                    throw new NoViableAltForCharException(
2586:                                            (char) LA(1), getFilename(),
2587:                                            getLine(), getColumn());
2588:                                }
2589:                                }
2590:                            }
2591:                            {
2592:                                switch (LA(1)) {
2593:                                case '+': {
2594:                                    match('+');
2595:                                    break;
2596:                                }
2597:                                case '-': {
2598:                                    match('-');
2599:                                    break;
2600:                                }
2601:                                case '*': {
2602:                                    match('*');
2603:                                    break;
2604:                                }
2605:                                case '/': {
2606:                                    match('/');
2607:                                    break;
2608:                                }
2609:                                default: {
2610:                                    throw new NoViableAltForCharException(
2611:                                            (char) LA(1), getFilename(),
2612:                                            getLine(), getColumn());
2613:                                }
2614:                                }
2615:                            }
2616:                            {
2617:                                switch (LA(1)) {
2618:                                case '\t':
2619:                                case '\n':
2620:                                case '\r':
2621:                                case ' ': {
2622:                                    mWS(false);
2623:                                    break;
2624:                                }
2625:                                case '"':
2626:                                case '#':
2627:                                case '\'':
2628:                                case '(':
2629:                                case '0':
2630:                                case '1':
2631:                                case '2':
2632:                                case '3':
2633:                                case '4':
2634:                                case '5':
2635:                                case '6':
2636:                                case '7':
2637:                                case '8':
2638:                                case '9':
2639:                                case 'A':
2640:                                case 'B':
2641:                                case 'C':
2642:                                case 'D':
2643:                                case 'E':
2644:                                case 'F':
2645:                                case 'G':
2646:                                case 'H':
2647:                                case 'I':
2648:                                case 'J':
2649:                                case 'K':
2650:                                case 'L':
2651:                                case 'M':
2652:                                case 'N':
2653:                                case 'O':
2654:                                case 'P':
2655:                                case 'Q':
2656:                                case 'R':
2657:                                case 'S':
2658:                                case 'T':
2659:                                case 'U':
2660:                                case 'V':
2661:                                case 'W':
2662:                                case 'X':
2663:                                case 'Y':
2664:                                case 'Z':
2665:                                case '[':
2666:                                case '_':
2667:                                case 'a':
2668:                                case 'b':
2669:                                case 'c':
2670:                                case 'd':
2671:                                case 'e':
2672:                                case 'f':
2673:                                case 'g':
2674:                                case 'h':
2675:                                case 'i':
2676:                                case 'j':
2677:                                case 'k':
2678:                                case 'l':
2679:                                case 'm':
2680:                                case 'n':
2681:                                case 'o':
2682:                                case 'p':
2683:                                case 'q':
2684:                                case 'r':
2685:                                case 's':
2686:                                case 't':
2687:                                case 'u':
2688:                                case 'v':
2689:                                case 'w':
2690:                                case 'x':
2691:                                case 'y':
2692:                                case 'z': {
2693:                                    break;
2694:                                }
2695:                                default: {
2696:                                    throw new NoViableAltForCharException(
2697:                                            (char) LA(1), getFilename(),
2698:                                            getLine(), getColumn());
2699:                                }
2700:                                }
2701:                            }
2702:                            mARG(false);
2703:                        } else {
2704:                            break _loop701;
2705:                        }
2706:
2707:                    } while (true);
2708:                }
2709:                if (_createToken && _token == null && _ttype != Token.SKIP) {
2710:                    _token = makeToken(_ttype);
2711:                    _token.setText(new String(text.getBuffer(), _begin, text
2712:                            .length()
2713:                            - _begin));
2714:                }
2715:                _returnToken = _token;
2716:            }
2717:
2718:            protected final void mTEXT_ARG_ELEMENT(boolean _createToken)
2719:                    throws RecognitionException, CharStreamException,
2720:                    TokenStreamException {
2721:                int _ttype;
2722:                Token _token = null;
2723:                int _begin = text.length();
2724:                _ttype = TEXT_ARG_ELEMENT;
2725:                int _saveIndex;
2726:
2727:                switch (LA(1)) {
2728:                case 'A':
2729:                case 'B':
2730:                case 'C':
2731:                case 'D':
2732:                case 'E':
2733:                case 'F':
2734:                case 'G':
2735:                case 'H':
2736:                case 'I':
2737:                case 'J':
2738:                case 'K':
2739:                case 'L':
2740:                case 'M':
2741:                case 'N':
2742:                case 'O':
2743:                case 'P':
2744:                case 'Q':
2745:                case 'R':
2746:                case 'S':
2747:                case 'T':
2748:                case 'U':
2749:                case 'V':
2750:                case 'W':
2751:                case 'X':
2752:                case 'Y':
2753:                case 'Z':
2754:                case '_':
2755:                case 'a':
2756:                case 'b':
2757:                case 'c':
2758:                case 'd':
2759:                case 'e':
2760:                case 'f':
2761:                case 'g':
2762:                case 'h':
2763:                case 'i':
2764:                case 'j':
2765:                case 'k':
2766:                case 'l':
2767:                case 'm':
2768:                case 'n':
2769:                case 'o':
2770:                case 'p':
2771:                case 'q':
2772:                case 'r':
2773:                case 's':
2774:                case 't':
2775:                case 'u':
2776:                case 'v':
2777:                case 'w':
2778:                case 'x':
2779:                case 'y':
2780:                case 'z': {
2781:                    mTEXT_ARG_ID_ELEMENT(false);
2782:                    break;
2783:                }
2784:                case '"': {
2785:                    mSTRING(false);
2786:                    break;
2787:                }
2788:                case '\'': {
2789:                    mCHAR(false);
2790:                    break;
2791:                }
2792:                case '0':
2793:                case '1':
2794:                case '2':
2795:                case '3':
2796:                case '4':
2797:                case '5':
2798:                case '6':
2799:                case '7':
2800:                case '8':
2801:                case '9': {
2802:                    mINT_OR_FLOAT(false);
2803:                    break;
2804:                }
2805:                case '$': {
2806:                    mTEXT_ITEM(false);
2807:                    break;
2808:                }
2809:                case '+': {
2810:                    match('+');
2811:                    break;
2812:                }
2813:                default: {
2814:                    throw new NoViableAltForCharException((char) LA(1),
2815:                            getFilename(), getLine(), getColumn());
2816:                }
2817:                }
2818:                if (_createToken && _token == null && _ttype != Token.SKIP) {
2819:                    _token = makeToken(_ttype);
2820:                    _token.setText(new String(text.getBuffer(), _begin, text
2821:                            .length()
2822:                            - _begin));
2823:                }
2824:                _returnToken = _token;
2825:            }
2826:
2827:            protected final void mTEXT_ARG_ID_ELEMENT(boolean _createToken)
2828:                    throws RecognitionException, CharStreamException,
2829:                    TokenStreamException {
2830:                int _ttype;
2831:                Token _token = null;
2832:                int _begin = text.length();
2833:                _ttype = TEXT_ARG_ID_ELEMENT;
2834:                int _saveIndex;
2835:                Token id = null;
2836:
2837:                mID(true);
2838:                id = _returnToken;
2839:                {
2840:                    if ((_tokenSet_4.member(LA(1)))
2841:                            && (_tokenSet_22.member(LA(2))) && (true)) {
2842:                        _saveIndex = text.length();
2843:                        mWS(false);
2844:                        text.setLength(_saveIndex);
2845:                    } else if ((_tokenSet_22.member(LA(1))) && (true) && (true)) {
2846:                    } else {
2847:                        throw new NoViableAltForCharException((char) LA(1),
2848:                                getFilename(), getLine(), getColumn());
2849:                    }
2850:
2851:                }
2852:                {
2853:                    switch (LA(1)) {
2854:                    case '(': {
2855:                        match('(');
2856:                        {
2857:                            if ((_tokenSet_4.member(LA(1)))
2858:                                    && (_tokenSet_23.member(LA(2)))
2859:                                    && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
2860:                                _saveIndex = text.length();
2861:                                mWS(false);
2862:                                text.setLength(_saveIndex);
2863:                            } else if ((_tokenSet_23.member(LA(1)))
2864:                                    && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))
2865:                                    && (true)) {
2866:                            } else {
2867:                                throw new NoViableAltForCharException(
2868:                                        (char) LA(1), getFilename(), getLine(),
2869:                                        getColumn());
2870:                            }
2871:
2872:                        }
2873:                        {
2874:                            _loop689: do {
2875:                                if ((_tokenSet_24.member(LA(1)))
2876:                                        && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))
2877:                                        && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
2878:                                    mTEXT_ARG(false);
2879:                                    {
2880:                                        _loop688: do {
2881:                                            if ((LA(1) == ',')) {
2882:                                                match(',');
2883:                                                mTEXT_ARG(false);
2884:                                            } else {
2885:                                                break _loop688;
2886:                                            }
2887:
2888:                                        } while (true);
2889:                                    }
2890:                                } else {
2891:                                    break _loop689;
2892:                                }
2893:
2894:                            } while (true);
2895:                        }
2896:                        {
2897:                            switch (LA(1)) {
2898:                            case '\t':
2899:                            case '\n':
2900:                            case '\r':
2901:                            case ' ': {
2902:                                _saveIndex = text.length();
2903:                                mWS(false);
2904:                                text.setLength(_saveIndex);
2905:                                break;
2906:                            }
2907:                            case ')': {
2908:                                break;
2909:                            }
2910:                            default: {
2911:                                throw new NoViableAltForCharException(
2912:                                        (char) LA(1), getFilename(), getLine(),
2913:                                        getColumn());
2914:                            }
2915:                            }
2916:                        }
2917:                        match(')');
2918:                        break;
2919:                    }
2920:                    case '[': {
2921:                        {
2922:                            int _cnt694 = 0;
2923:                            _loop694: do {
2924:                                if ((LA(1) == '[')) {
2925:                                    match('[');
2926:                                    {
2927:                                        if ((_tokenSet_4.member(LA(1)))
2928:                                                && (_tokenSet_24.member(LA(2)))
2929:                                                && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
2930:                                            _saveIndex = text.length();
2931:                                            mWS(false);
2932:                                            text.setLength(_saveIndex);
2933:                                        } else if ((_tokenSet_24.member(LA(1)))
2934:                                                && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))
2935:                                                && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
2936:                                        } else {
2937:                                            throw new NoViableAltForCharException(
2938:                                                    (char) LA(1),
2939:                                                    getFilename(), getLine(),
2940:                                                    getColumn());
2941:                                        }
2942:
2943:                                    }
2944:                                    mTEXT_ARG(false);
2945:                                    {
2946:                                        switch (LA(1)) {
2947:                                        case '\t':
2948:                                        case '\n':
2949:                                        case '\r':
2950:                                        case ' ': {
2951:                                            _saveIndex = text.length();
2952:                                            mWS(false);
2953:                                            text.setLength(_saveIndex);
2954:                                            break;
2955:                                        }
2956:                                        case ']': {
2957:                                            break;
2958:                                        }
2959:                                        default: {
2960:                                            throw new NoViableAltForCharException(
2961:                                                    (char) LA(1),
2962:                                                    getFilename(), getLine(),
2963:                                                    getColumn());
2964:                                        }
2965:                                        }
2966:                                    }
2967:                                    match(']');
2968:                                } else {
2969:                                    if (_cnt694 >= 1) {
2970:                                        break _loop694;
2971:                                    } else {
2972:                                        throw new NoViableAltForCharException(
2973:                                                (char) LA(1), getFilename(),
2974:                                                getLine(), getColumn());
2975:                                    }
2976:                                }
2977:
2978:                                _cnt694++;
2979:                            } while (true);
2980:                        }
2981:                        break;
2982:                    }
2983:                    case '.': {
2984:                        match('.');
2985:                        mTEXT_ARG_ID_ELEMENT(false);
2986:                        break;
2987:                    }
2988:                    case '-': {
2989:                        match("->");
2990:                        mTEXT_ARG_ID_ELEMENT(false);
2991:                        break;
2992:                    }
2993:                    case '\t':
2994:                    case '\n':
2995:                    case '\r':
2996:                    case ' ':
2997:                    case '"':
2998:                    case '$':
2999:                    case '\'':
3000:                    case ')':
3001:                    case '+':
3002:                    case ',':
3003:                    case '0':
3004:                    case '1':
3005:                    case '2':
3006:                    case '3':
3007:                    case '4':
3008:                    case '5':
3009:                    case '6':
3010:                    case '7':
3011:                    case '8':
3012:                    case '9':
3013:                    case 'A':
3014:                    case 'B':
3015:                    case 'C':
3016:                    case 'D':
3017:                    case 'E':
3018:                    case 'F':
3019:                    case 'G':
3020:                    case 'H':
3021:                    case 'I':
3022:                    case 'J':
3023:                    case 'K':
3024:                    case 'L':
3025:                    case 'M':
3026:                    case 'N':
3027:                    case 'O':
3028:                    case 'P':
3029:                    case 'Q':
3030:                    case 'R':
3031:                    case 'S':
3032:                    case 'T':
3033:                    case 'U':
3034:                    case 'V':
3035:                    case 'W':
3036:                    case 'X':
3037:                    case 'Y':
3038:                    case 'Z':
3039:                    case ']':
3040:                    case '_':
3041:                    case 'a':
3042:                    case 'b':
3043:                    case 'c':
3044:                    case 'd':
3045:                    case 'e':
3046:                    case 'f':
3047:                    case 'g':
3048:                    case 'h':
3049:                    case 'i':
3050:                    case 'j':
3051:                    case 'k':
3052:                    case 'l':
3053:                    case 'm':
3054:                    case 'n':
3055:                    case 'o':
3056:                    case 'p':
3057:                    case 'q':
3058:                    case 'r':
3059:                    case 's':
3060:                    case 't':
3061:                    case 'u':
3062:                    case 'v':
3063:                    case 'w':
3064:                    case 'x':
3065:                    case 'y':
3066:                    case 'z': {
3067:                        break;
3068:                    }
3069:                    default: {
3070:                        throw new NoViableAltForCharException((char) LA(1),
3071:                                getFilename(), getLine(), getColumn());
3072:                    }
3073:                    }
3074:                }
3075:                if (_createToken && _token == null && _ttype != Token.SKIP) {
3076:                    _token = makeToken(_ttype);
3077:                    _token.setText(new String(text.getBuffer(), _begin, text
3078:                            .length()
3079:                            - _begin));
3080:                }
3081:                _returnToken = _token;
3082:            }
3083:
3084:            protected final void mINT_OR_FLOAT(boolean _createToken)
3085:                    throws RecognitionException, CharStreamException,
3086:                    TokenStreamException {
3087:                int _ttype;
3088:                Token _token = null;
3089:                int _begin = text.length();
3090:                _ttype = INT_OR_FLOAT;
3091:                int _saveIndex;
3092:
3093:                {
3094:                    int _cnt734 = 0;
3095:                    _loop734: do {
3096:                        if (((LA(1) >= '0' && LA(1) <= '9'))
3097:                                && (_tokenSet_25.member(LA(2))) && (true)) {
3098:                            mDIGIT(false);
3099:                        } else {
3100:                            if (_cnt734 >= 1) {
3101:                                break _loop734;
3102:                            } else {
3103:                                throw new NoViableAltForCharException(
3104:                                        (char) LA(1), getFilename(), getLine(),
3105:                                        getColumn());
3106:                            }
3107:                        }
3108:
3109:                        _cnt734++;
3110:                    } while (true);
3111:                }
3112:                {
3113:                    if ((LA(1) == 'L') && (_tokenSet_26.member(LA(2)))
3114:                            && (true)) {
3115:                        match('L');
3116:                    } else if ((LA(1) == 'l') && (_tokenSet_26.member(LA(2)))
3117:                            && (true)) {
3118:                        match('l');
3119:                    } else if ((LA(1) == '.')) {
3120:                        match('.');
3121:                        {
3122:                            _loop737: do {
3123:                                if (((LA(1) >= '0' && LA(1) <= '9'))
3124:                                        && (_tokenSet_26.member(LA(2)))
3125:                                        && (true)) {
3126:                                    mDIGIT(false);
3127:                                } else {
3128:                                    break _loop737;
3129:                                }
3130:
3131:                            } while (true);
3132:                        }
3133:                    } else if ((_tokenSet_26.member(LA(1))) && (true) && (true)) {
3134:                    } else {
3135:                        throw new NoViableAltForCharException((char) LA(1),
3136:                                getFilename(), getLine(), getColumn());
3137:                    }
3138:
3139:                }
3140:                if (_createToken && _token == null && _ttype != Token.SKIP) {
3141:                    _token = makeToken(_ttype);
3142:                    _token.setText(new String(text.getBuffer(), _begin, text
3143:                            .length()
3144:                            - _begin));
3145:                }
3146:                _returnToken = _token;
3147:            }
3148:
3149:            protected final void mSL_COMMENT(boolean _createToken)
3150:                    throws RecognitionException, CharStreamException,
3151:                    TokenStreamException {
3152:                int _ttype;
3153:                Token _token = null;
3154:                int _begin = text.length();
3155:                _ttype = SL_COMMENT;
3156:                int _saveIndex;
3157:
3158:                match("//");
3159:                {
3160:                    _loop711: do {
3161:                        // nongreedy exit test
3162:                        if ((LA(1) == '\n' || LA(1) == '\r') && (true) && (true))
3163:                            break _loop711;
3164:                        if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff'))
3165:                                && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))
3166:                                && (true)) {
3167:                            matchNot(EOF_CHAR);
3168:                        } else {
3169:                            break _loop711;
3170:                        }
3171:
3172:                    } while (true);
3173:                }
3174:                {
3175:                    if ((LA(1) == '\r') && (LA(2) == '\n') && (true)) {
3176:                        match("\r\n");
3177:                    } else if ((LA(1) == '\n')) {
3178:                        match('\n');
3179:                    } else if ((LA(1) == '\r') && (true) && (true)) {
3180:                        match('\r');
3181:                    } else {
3182:                        throw new NoViableAltForCharException((char) LA(1),
3183:                                getFilename(), getLine(), getColumn());
3184:                    }
3185:
3186:                }
3187:                newline();
3188:                if (_createToken && _token == null && _ttype != Token.SKIP) {
3189:                    _token = makeToken(_ttype);
3190:                    _token.setText(new String(text.getBuffer(), _begin, text
3191:                            .length()
3192:                            - _begin));
3193:                }
3194:                _returnToken = _token;
3195:            }
3196:
3197:            protected final void mML_COMMENT(boolean _createToken)
3198:                    throws RecognitionException, CharStreamException,
3199:                    TokenStreamException {
3200:                int _ttype;
3201:                Token _token = null;
3202:                int _begin = text.length();
3203:                _ttype = ML_COMMENT;
3204:                int _saveIndex;
3205:
3206:                match("/*");
3207:                {
3208:                    _loop715: do {
3209:                        // nongreedy exit test
3210:                        if ((LA(1) == '*') && (LA(2) == '/') && (true))
3211:                            break _loop715;
3212:                        if ((LA(1) == '\r') && (LA(2) == '\n')
3213:                                && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
3214:                            match('\r');
3215:                            match('\n');
3216:                            newline();
3217:                        } else if ((LA(1) == '\r')
3218:                                && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))
3219:                                && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
3220:                            match('\r');
3221:                            newline();
3222:                        } else if ((LA(1) == '\n')
3223:                                && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))
3224:                                && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
3225:                            match('\n');
3226:                            newline();
3227:                        } else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff'))
3228:                                && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))
3229:                                && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
3230:                            matchNot(EOF_CHAR);
3231:                        } else {
3232:                            break _loop715;
3233:                        }
3234:
3235:                    } while (true);
3236:                }
3237:                match("*/");
3238:                if (_createToken && _token == null && _ttype != Token.SKIP) {
3239:                    _token = makeToken(_ttype);
3240:                    _token.setText(new String(text.getBuffer(), _begin, text
3241:                            .length()
3242:                            - _begin));
3243:                }
3244:                _returnToken = _token;
3245:            }
3246:
3247:            protected final void mESC(boolean _createToken)
3248:                    throws RecognitionException, CharStreamException,
3249:                    TokenStreamException {
3250:                int _ttype;
3251:                Token _token = null;
3252:                int _begin = text.length();
3253:                _ttype = ESC;
3254:                int _saveIndex;
3255:
3256:                match('\\');
3257:                {
3258:                    switch (LA(1)) {
3259:                    case 'n': {
3260:                        match('n');
3261:                        break;
3262:                    }
3263:                    case 'r': {
3264:                        match('r');
3265:                        break;
3266:                    }
3267:                    case 't': {
3268:                        match('t');
3269:                        break;
3270:                    }
3271:                    case 'b': {
3272:                        match('b');
3273:                        break;
3274:                    }
3275:                    case 'f': {
3276:                        match('f');
3277:                        break;
3278:                    }
3279:                    case '"': {
3280:                        match('"');
3281:                        break;
3282:                    }
3283:                    case '\'': {
3284:                        match('\'');
3285:                        break;
3286:                    }
3287:                    case '\\': {
3288:                        match('\\');
3289:                        break;
3290:                    }
3291:                    case '0':
3292:                    case '1':
3293:                    case '2':
3294:                    case '3': {
3295:                        {
3296:                            matchRange('0', '3');
3297:                        }
3298:                        {
3299:                            if (((LA(1) >= '0' && LA(1) <= '9'))
3300:                                    && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))
3301:                                    && (true)) {
3302:                                mDIGIT(false);
3303:                                {
3304:                                    if (((LA(1) >= '0' && LA(1) <= '9'))
3305:                                            && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))
3306:                                            && (true)) {
3307:                                        mDIGIT(false);
3308:                                    } else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
3309:                                    } else {
3310:                                        throw new NoViableAltForCharException(
3311:                                                (char) LA(1), getFilename(),
3312:                                                getLine(), getColumn());
3313:                                    }
3314:
3315:                                }
3316:                            } else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
3317:                            } else {
3318:                                throw new NoViableAltForCharException(
3319:                                        (char) LA(1), getFilename(), getLine(),
3320:                                        getColumn());
3321:                            }
3322:
3323:                        }
3324:                        break;
3325:                    }
3326:                    case '4':
3327:                    case '5':
3328:                    case '6':
3329:                    case '7': {
3330:                        {
3331:                            matchRange('4', '7');
3332:                        }
3333:                        {
3334:                            if (((LA(1) >= '0' && LA(1) <= '9'))
3335:                                    && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))
3336:                                    && (true)) {
3337:                                mDIGIT(false);
3338:                            } else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
3339:                            } else {
3340:                                throw new NoViableAltForCharException(
3341:                                        (char) LA(1), getFilename(), getLine(),
3342:                                        getColumn());
3343:                            }
3344:
3345:                        }
3346:                        break;
3347:                    }
3348:                    default: {
3349:                        throw new NoViableAltForCharException((char) LA(1),
3350:                                getFilename(), getLine(), getColumn());
3351:                    }
3352:                    }
3353:                }
3354:                if (_createToken && _token == null && _ttype != Token.SKIP) {
3355:                    _token = makeToken(_ttype);
3356:                    _token.setText(new String(text.getBuffer(), _begin, text
3357:                            .length()
3358:                            - _begin));
3359:                }
3360:                _returnToken = _token;
3361:            }
3362:
3363:            protected final void mDIGIT(boolean _createToken)
3364:                    throws RecognitionException, CharStreamException,
3365:                    TokenStreamException {
3366:                int _ttype;
3367:                Token _token = null;
3368:                int _begin = text.length();
3369:                _ttype = DIGIT;
3370:                int _saveIndex;
3371:
3372:                matchRange('0', '9');
3373:                if (_createToken && _token == null && _ttype != Token.SKIP) {
3374:                    _token = makeToken(_ttype);
3375:                    _token.setText(new String(text.getBuffer(), _begin, text
3376:                            .length()
3377:                            - _begin));
3378:                }
3379:                _returnToken = _token;
3380:            }
3381:
3382:            private static final long[] mk_tokenSet_0() {
3383:                long[] data = new long[8];
3384:                data[0] = -103079215112L;
3385:                for (int i = 1; i <= 3; i++) {
3386:                    data[i] = -1L;
3387:                }
3388:                return data;
3389:            }
3390:
3391:            public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
3392:
3393:            private static final long[] mk_tokenSet_1() {
3394:                long[] data = new long[8];
3395:                data[0] = -145135534866440L;
3396:                for (int i = 1; i <= 3; i++) {
3397:                    data[i] = -1L;
3398:                }
3399:                return data;
3400:            }
3401:
3402:            public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
3403:
3404:            private static final long[] mk_tokenSet_2() {
3405:                long[] data = new long[8];
3406:                data[0] = -141407503262728L;
3407:                for (int i = 1; i <= 3; i++) {
3408:                    data[i] = -1L;
3409:                }
3410:                return data;
3411:            }
3412:
3413:            public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
3414:
3415:            private static final long[] mk_tokenSet_3() {
3416:                long[] data = { 4294977024L, 576460745995190270L, 0L, 0L, 0L };
3417:                return data;
3418:            }
3419:
3420:            public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
3421:
3422:            private static final long[] mk_tokenSet_4() {
3423:                long[] data = { 4294977024L, 0L, 0L, 0L, 0L };
3424:                return data;
3425:            }
3426:
3427:            public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
3428:
3429:            private static final long[] mk_tokenSet_5() {
3430:                long[] data = { 1103806604800L, 0L, 0L, 0L, 0L };
3431:                return data;
3432:            }
3433:
3434:            public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
3435:
3436:            private static final long[] mk_tokenSet_6() {
3437:                long[] data = { 287959436729787904L, 576460745995190270L, 0L,
3438:                        0L, 0L };
3439:                return data;
3440:            }
3441:
3442:            public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
3443:
3444:            private static final long[] mk_tokenSet_7() {
3445:                long[] data = new long[8];
3446:                data[0] = -17179869192L;
3447:                data[1] = -268435457L;
3448:                for (int i = 2; i <= 3; i++) {
3449:                    data[i] = -1L;
3450:                }
3451:                return data;
3452:            }
3453:
3454:            public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
3455:
3456:            private static final long[] mk_tokenSet_8() {
3457:                long[] data = new long[8];
3458:                data[0] = -549755813896L;
3459:                data[1] = -268435457L;
3460:                for (int i = 2; i <= 3; i++) {
3461:                    data[i] = -1L;
3462:                }
3463:                return data;
3464:            }
3465:
3466:            public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
3467:
3468:            private static final long[] mk_tokenSet_9() {
3469:                long[] data = { 287948901175001088L, 576460745995190270L, 0L,
3470:                        0L, 0L };
3471:                return data;
3472:            }
3473:
3474:            public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
3475:
3476:            private static final long[] mk_tokenSet_10() {
3477:                long[] data = { 287950056521213440L, 576460746129407998L, 0L,
3478:                        0L, 0L };
3479:                return data;
3480:            }
3481:
3482:            public static final BitSet _tokenSet_10 = new BitSet(
3483:                    mk_tokenSet_10());
3484:
3485:            private static final long[] mk_tokenSet_11() {
3486:                long[] data = { 287958332923183104L, 576460745995190270L, 0L,
3487:                        0L, 0L };
3488:                return data;
3489:            }
3490:
3491:            public static final BitSet _tokenSet_11 = new BitSet(
3492:                    mk_tokenSet_11());
3493:
3494:            private static final long[] mk_tokenSet_12() {
3495:                long[] data = { 287978128427460096L, 576460746532061182L, 0L,
3496:                        0L, 0L };
3497:                return data;
3498:            }
3499:
3500:            public static final BitSet _tokenSet_12 = new BitSet(
3501:                    mk_tokenSet_12());
3502:
3503:            private static final long[] mk_tokenSet_13() {
3504:                long[] data = { 0L, 576460745995190270L, 0L, 0L, 0L };
3505:                return data;
3506:            }
3507:
3508:            public static final BitSet _tokenSet_13 = new BitSet(
3509:                    mk_tokenSet_13());
3510:
3511:            private static final long[] mk_tokenSet_14() {
3512:                long[] data = { 2306123388973753856L, 671088640L, 0L, 0L, 0L };
3513:                return data;
3514:            }
3515:
3516:            public static final BitSet _tokenSet_14 = new BitSet(
3517:                    mk_tokenSet_14());
3518:
3519:            private static final long[] mk_tokenSet_15() {
3520:                long[] data = { 287952805300282880L, 576460746129407998L, 0L,
3521:                        0L, 0L };
3522:                return data;
3523:            }
3524:
3525:            public static final BitSet _tokenSet_15 = new BitSet(
3526:                    mk_tokenSet_15());
3527:
3528:            private static final long[] mk_tokenSet_16() {
3529:                long[] data = { 2306051920717948416L, 536870912L, 0L, 0L, 0L };
3530:                return data;
3531:            }
3532:
3533:            public static final BitSet _tokenSet_16 = new BitSet(
3534:                    mk_tokenSet_16());
3535:
3536:            private static final long[] mk_tokenSet_17() {
3537:                long[] data = { 2305843013508670976L, 0L, 0L, 0L, 0L };
3538:                return data;
3539:            }
3540:
3541:            public static final BitSet _tokenSet_17 = new BitSet(
3542:                    mk_tokenSet_17());
3543:
3544:            private static final long[] mk_tokenSet_18() {
3545:                long[] data = { 208911504254464L, 536870912L, 0L, 0L, 0L };
3546:                return data;
3547:            }
3548:
3549:            public static final BitSet _tokenSet_18 = new BitSet(
3550:                    mk_tokenSet_18());
3551:
3552:            private static final long[] mk_tokenSet_19() {
3553:                long[] data = { 1151051235328L, 576460746129407998L, 0L, 0L, 0L };
3554:                return data;
3555:            }
3556:
3557:            public static final BitSet _tokenSet_19 = new BitSet(
3558:                    mk_tokenSet_19());
3559:
3560:            private static final long[] mk_tokenSet_20() {
3561:                long[] data = { 189120294954496L, 0L, 0L, 0L, 0L };
3562:                return data;
3563:            }
3564:
3565:            public static final BitSet _tokenSet_20 = new BitSet(
3566:                    mk_tokenSet_20());
3567:
3568:            private static final long[] mk_tokenSet_21() {
3569:                long[] data = { 288139722277004800L, 576460746129407998L, 0L,
3570:                        0L, 0L };
3571:                return data;
3572:            }
3573:
3574:            public static final BitSet _tokenSet_21 = new BitSet(
3575:                    mk_tokenSet_21());
3576:
3577:            private static final long[] mk_tokenSet_22() {
3578:                long[] data = { 288084781055354368L, 576460746666278910L, 0L,
3579:                        0L, 0L };
3580:                return data;
3581:            }
3582:
3583:            public static final BitSet _tokenSet_22 = new BitSet(
3584:                    mk_tokenSet_22());
3585:
3586:            private static final long[] mk_tokenSet_23() {
3587:                long[] data = { 287960536241415680L, 576460745995190270L, 0L,
3588:                        0L, 0L };
3589:                return data;
3590:            }
3591:
3592:            public static final BitSet _tokenSet_23 = new BitSet(
3593:                    mk_tokenSet_23());
3594:
3595:            private static final long[] mk_tokenSet_24() {
3596:                long[] data = { 287958337218160128L, 576460745995190270L, 0L,
3597:                        0L, 0L };
3598:                return data;
3599:            }
3600:
3601:            public static final BitSet _tokenSet_24 = new BitSet(
3602:                    mk_tokenSet_24());
3603:
3604:            private static final long[] mk_tokenSet_25() {
3605:                long[] data = { 288228817078593024L, 576460746532061182L, 0L,
3606:                        0L, 0L };
3607:                return data;
3608:            }
3609:
3610:            public static final BitSet _tokenSet_25 = new BitSet(
3611:                    mk_tokenSet_25());
3612:
3613:            private static final long[] mk_tokenSet_26() {
3614:                long[] data = { 288158448334415360L, 576460746532061182L, 0L,
3615:                        0L, 0L };
3616:                return data;
3617:            }
3618:
3619:            public static final BitSet _tokenSet_26 = new BitSet(
3620:                    mk_tokenSet_26());
3621:
3622:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.