Source Code Cross Referenced for HtmlExtractorParserTokenManager.java in  » J2EE » fleXive » com » flexive » extractor » htmlExtractor » 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 » J2EE » fleXive » com.flexive.extractor.htmlExtractor 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /* Generated By:JavaCC: Do not edit this line. HtmlExtractorParserTokenManager.java */
0002:        package com.flexive.extractor.htmlExtractor;
0003:
0004:        import java.io.Serializable;
0005:        import java.util.ArrayList;
0006:
0007:        public class HtmlExtractorParserTokenManager implements 
0008:                HtmlExtractorParserConstants {
0009:            public java.io.PrintStream debugStream = System.out;
0010:
0011:            public void setDebugStream(java.io.PrintStream ds) {
0012:                debugStream = ds;
0013:            }
0014:
0015:            private final int jjStopStringLiteralDfa_0(int pos, long active0) {
0016:                switch (pos) {
0017:                case 0:
0018:                    if ((active0 & 0x80070L) != 0L)
0019:                        return 18;
0020:                    if ((active0 & 0xeL) != 0L)
0021:                        return 32;
0022:                    return -1;
0023:                case 1:
0024:                    if ((active0 & 0x70L) != 0L) {
0025:                        jjmatchedKind = 16;
0026:                        jjmatchedPos = 1;
0027:                        return 33;
0028:                    }
0029:                    return -1;
0030:                case 2:
0031:                    if ((active0 & 0x20L) != 0L) {
0032:                        if (jjmatchedPos < 1) {
0033:                            jjmatchedKind = 16;
0034:                            jjmatchedPos = 1;
0035:                        }
0036:                        return -1;
0037:                    }
0038:                    if ((active0 & 0x50L) != 0L) {
0039:                        jjmatchedKind = 16;
0040:                        jjmatchedPos = 2;
0041:                        return 33;
0042:                    }
0043:                    return -1;
0044:                case 3:
0045:                    if ((active0 & 0x50L) != 0L) {
0046:                        jjmatchedKind = 16;
0047:                        jjmatchedPos = 3;
0048:                        return 33;
0049:                    }
0050:                    if ((active0 & 0x20L) != 0L) {
0051:                        if (jjmatchedPos < 1) {
0052:                            jjmatchedKind = 16;
0053:                            jjmatchedPos = 1;
0054:                        }
0055:                        return -1;
0056:                    }
0057:                    return -1;
0058:                case 4:
0059:                    if ((active0 & 0x50L) != 0L) {
0060:                        jjmatchedKind = 16;
0061:                        jjmatchedPos = 4;
0062:                        return 33;
0063:                    }
0064:                    return -1;
0065:                case 5:
0066:                    if ((active0 & 0x50L) != 0L) {
0067:                        jjmatchedKind = 16;
0068:                        jjmatchedPos = 5;
0069:                        return 33;
0070:                    }
0071:                    return -1;
0072:                case 6:
0073:                    if ((active0 & 0x50L) != 0L) {
0074:                        jjmatchedKind = 16;
0075:                        jjmatchedPos = 6;
0076:                        return 33;
0077:                    }
0078:                    return -1;
0079:                case 7:
0080:                    if ((active0 & 0x10L) != 0L)
0081:                        return 22;
0082:                    if ((active0 & 0x40L) != 0L) {
0083:                        jjmatchedKind = 16;
0084:                        jjmatchedPos = 7;
0085:                        return 33;
0086:                    }
0087:                    return -1;
0088:                case 8:
0089:                    if ((active0 & 0x40L) != 0L) {
0090:                        jjmatchedKind = 16;
0091:                        jjmatchedPos = 8;
0092:                        return 33;
0093:                    }
0094:                    return -1;
0095:                default:
0096:                    return -1;
0097:                }
0098:            }
0099:
0100:            private final int jjStartNfa_0(int pos, long active0) {
0101:                return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0),
0102:                        pos + 1);
0103:            }
0104:
0105:            private final int jjStopAtPos(int pos, int kind) {
0106:                jjmatchedKind = kind;
0107:                jjmatchedPos = pos;
0108:                return pos + 1;
0109:            }
0110:
0111:            private final int jjStartNfaWithStates_0(int pos, int kind,
0112:                    int state) {
0113:                jjmatchedKind = kind;
0114:                jjmatchedPos = pos;
0115:                try {
0116:                    curChar = input_stream.readChar();
0117:                } catch (java.io.IOException e) {
0118:                    return pos + 1;
0119:                }
0120:                return jjMoveNfa_0(state, pos + 1);
0121:            }
0122:
0123:            private final int jjMoveStringLiteralDfa0_0() {
0124:                switch (curChar) {
0125:                case 9:
0126:                    return jjStartNfaWithStates_0(0, 1, 32);
0127:                case 10:
0128:                    return jjStartNfaWithStates_0(0, 2, 32);
0129:                case 13:
0130:                    return jjStartNfaWithStates_0(0, 3, 32);
0131:                case 60:
0132:                    jjmatchedKind = 19;
0133:                    return jjMoveStringLiteralDfa1_0(0x70L);
0134:                default:
0135:                    return jjMoveNfa_0(19, 0);
0136:                }
0137:            }
0138:
0139:            private final int jjMoveStringLiteralDfa1_0(long active0) {
0140:                try {
0141:                    curChar = input_stream.readChar();
0142:                } catch (java.io.IOException e) {
0143:                    jjStopStringLiteralDfa_0(0, active0);
0144:                    return 1;
0145:                }
0146:                switch (curChar) {
0147:                case 33:
0148:                    return jjMoveStringLiteralDfa2_0(active0, 0x60L);
0149:                case 115:
0150:                    return jjMoveStringLiteralDfa2_0(active0, 0x10L);
0151:                default:
0152:                    break;
0153:                }
0154:                return jjStartNfa_0(0, active0);
0155:            }
0156:
0157:            private final int jjMoveStringLiteralDfa2_0(long old0, long active0) {
0158:                if (((active0 &= old0)) == 0L)
0159:                    return jjStartNfa_0(0, old0);
0160:                try {
0161:                    curChar = input_stream.readChar();
0162:                } catch (java.io.IOException e) {
0163:                    jjStopStringLiteralDfa_0(1, active0);
0164:                    return 2;
0165:                }
0166:                switch (curChar) {
0167:                case 45:
0168:                    return jjMoveStringLiteralDfa3_0(active0, 0x20L);
0169:                case 68:
0170:                    return jjMoveStringLiteralDfa3_0(active0, 0x40L);
0171:                case 99:
0172:                    return jjMoveStringLiteralDfa3_0(active0, 0x10L);
0173:                default:
0174:                    break;
0175:                }
0176:                return jjStartNfa_0(1, active0);
0177:            }
0178:
0179:            private final int jjMoveStringLiteralDfa3_0(long old0, long active0) {
0180:                if (((active0 &= old0)) == 0L)
0181:                    return jjStartNfa_0(1, old0);
0182:                try {
0183:                    curChar = input_stream.readChar();
0184:                } catch (java.io.IOException e) {
0185:                    jjStopStringLiteralDfa_0(2, active0);
0186:                    return 3;
0187:                }
0188:                switch (curChar) {
0189:                case 45:
0190:                    if ((active0 & 0x20L) != 0L)
0191:                        return jjStopAtPos(3, 5);
0192:                    break;
0193:                case 79:
0194:                    return jjMoveStringLiteralDfa4_0(active0, 0x40L);
0195:                case 114:
0196:                    return jjMoveStringLiteralDfa4_0(active0, 0x10L);
0197:                default:
0198:                    break;
0199:                }
0200:                return jjStartNfa_0(2, active0);
0201:            }
0202:
0203:            private final int jjMoveStringLiteralDfa4_0(long old0, long active0) {
0204:                if (((active0 &= old0)) == 0L)
0205:                    return jjStartNfa_0(2, old0);
0206:                try {
0207:                    curChar = input_stream.readChar();
0208:                } catch (java.io.IOException e) {
0209:                    jjStopStringLiteralDfa_0(3, active0);
0210:                    return 4;
0211:                }
0212:                switch (curChar) {
0213:                case 67:
0214:                    return jjMoveStringLiteralDfa5_0(active0, 0x40L);
0215:                case 105:
0216:                    return jjMoveStringLiteralDfa5_0(active0, 0x10L);
0217:                default:
0218:                    break;
0219:                }
0220:                return jjStartNfa_0(3, active0);
0221:            }
0222:
0223:            private final int jjMoveStringLiteralDfa5_0(long old0, long active0) {
0224:                if (((active0 &= old0)) == 0L)
0225:                    return jjStartNfa_0(3, old0);
0226:                try {
0227:                    curChar = input_stream.readChar();
0228:                } catch (java.io.IOException e) {
0229:                    jjStopStringLiteralDfa_0(4, active0);
0230:                    return 5;
0231:                }
0232:                switch (curChar) {
0233:                case 84:
0234:                    return jjMoveStringLiteralDfa6_0(active0, 0x40L);
0235:                case 112:
0236:                    return jjMoveStringLiteralDfa6_0(active0, 0x10L);
0237:                default:
0238:                    break;
0239:                }
0240:                return jjStartNfa_0(4, active0);
0241:            }
0242:
0243:            private final int jjMoveStringLiteralDfa6_0(long old0, long active0) {
0244:                if (((active0 &= old0)) == 0L)
0245:                    return jjStartNfa_0(4, old0);
0246:                try {
0247:                    curChar = input_stream.readChar();
0248:                } catch (java.io.IOException e) {
0249:                    jjStopStringLiteralDfa_0(5, active0);
0250:                    return 6;
0251:                }
0252:                switch (curChar) {
0253:                case 89:
0254:                    return jjMoveStringLiteralDfa7_0(active0, 0x40L);
0255:                case 116:
0256:                    return jjMoveStringLiteralDfa7_0(active0, 0x10L);
0257:                default:
0258:                    break;
0259:                }
0260:                return jjStartNfa_0(5, active0);
0261:            }
0262:
0263:            private final int jjMoveStringLiteralDfa7_0(long old0, long active0) {
0264:                if (((active0 &= old0)) == 0L)
0265:                    return jjStartNfa_0(5, old0);
0266:                try {
0267:                    curChar = input_stream.readChar();
0268:                } catch (java.io.IOException e) {
0269:                    jjStopStringLiteralDfa_0(6, active0);
0270:                    return 7;
0271:                }
0272:                switch (curChar) {
0273:                case 32:
0274:                    if ((active0 & 0x10L) != 0L)
0275:                        return jjStartNfaWithStates_0(7, 4, 22);
0276:                    break;
0277:                case 80:
0278:                    return jjMoveStringLiteralDfa8_0(active0, 0x40L);
0279:                default:
0280:                    break;
0281:                }
0282:                return jjStartNfa_0(6, active0);
0283:            }
0284:
0285:            private final int jjMoveStringLiteralDfa8_0(long old0, long active0) {
0286:                if (((active0 &= old0)) == 0L)
0287:                    return jjStartNfa_0(6, old0);
0288:                try {
0289:                    curChar = input_stream.readChar();
0290:                } catch (java.io.IOException e) {
0291:                    jjStopStringLiteralDfa_0(7, active0);
0292:                    return 8;
0293:                }
0294:                switch (curChar) {
0295:                case 69:
0296:                    return jjMoveStringLiteralDfa9_0(active0, 0x40L);
0297:                default:
0298:                    break;
0299:                }
0300:                return jjStartNfa_0(7, active0);
0301:            }
0302:
0303:            private final int jjMoveStringLiteralDfa9_0(long old0, long active0) {
0304:                if (((active0 &= old0)) == 0L)
0305:                    return jjStartNfa_0(7, old0);
0306:                try {
0307:                    curChar = input_stream.readChar();
0308:                } catch (java.io.IOException e) {
0309:                    jjStopStringLiteralDfa_0(8, active0);
0310:                    return 9;
0311:                }
0312:                switch (curChar) {
0313:                case 32:
0314:                    if ((active0 & 0x40L) != 0L)
0315:                        return jjStartNfaWithStates_0(9, 6, 22);
0316:                    break;
0317:                default:
0318:                    break;
0319:                }
0320:                return jjStartNfa_0(8, active0);
0321:            }
0322:
0323:            private final void jjCheckNAdd(int state) {
0324:                if (jjrounds[state] != jjround) {
0325:                    jjstateSet[jjnewStateCnt++] = state;
0326:                    jjrounds[state] = jjround;
0327:                }
0328:            }
0329:
0330:            private final void jjAddStates(int start, int end) {
0331:                do {
0332:                    jjstateSet[jjnewStateCnt++] = jjnextStates[start];
0333:                } while (start++ != end);
0334:            }
0335:
0336:            private final void jjCheckNAddTwoStates(int state1, int state2) {
0337:                jjCheckNAdd(state1);
0338:                jjCheckNAdd(state2);
0339:            }
0340:
0341:            private final void jjCheckNAddStates(int start, int end) {
0342:                do {
0343:                    jjCheckNAdd(jjnextStates[start]);
0344:                } while (start++ != end);
0345:            }
0346:
0347:            private final void jjCheckNAddStates(int start) {
0348:                jjCheckNAdd(jjnextStates[start]);
0349:                jjCheckNAdd(jjnextStates[start + 1]);
0350:            }
0351:
0352:            static final long[] jjbitVec0 = { 0xfffffffffffffffeL,
0353:                    0xffffffffffffffffL, 0xffffffffffffffffL,
0354:                    0xffffffffffffffffL };
0355:            static final long[] jjbitVec2 = { 0x0L, 0x0L, 0xffffffffffffffffL,
0356:                    0xffffffffffffffffL };
0357:
0358:            private final int jjMoveNfa_0(int startState, int curPos) {
0359:                int[] nextStates;
0360:                int startsAt = 0;
0361:                jjnewStateCnt = 32;
0362:                int i = 1;
0363:                jjstateSet[0] = startState;
0364:                int j, kind = 0x7fffffff;
0365:                for (;;) {
0366:                    if (++jjround == 0x7fffffff)
0367:                        ReInitRounds();
0368:                    if (curChar < 64) {
0369:                        long l = 1L << curChar;
0370:                        MatchLoop: do {
0371:                            switch (jjstateSet[--i]) {
0372:                            case 32:
0373:                                if ((0x8ffffffbffffffffL & l) != 0L) {
0374:                                    if (kind > 18)
0375:                                        kind = 18;
0376:                                    jjCheckNAddStates(0, 2);
0377:                                }
0378:                                if (curChar == 32) {
0379:                                    if (kind > 18)
0380:                                        kind = 18;
0381:                                    jjCheckNAdd(27);
0382:                                }
0383:                                break;
0384:                            case 18:
0385:                            case 21:
0386:                                if ((0x3fe802200000000L & l) == 0L)
0387:                                    break;
0388:                                if (kind > 16)
0389:                                    kind = 16;
0390:                                jjCheckNAddTwoStates(21, 22);
0391:                                break;
0392:                            case 33:
0393:                                if ((0x3fe802200000000L & l) != 0L) {
0394:                                    if (kind > 16)
0395:                                        kind = 16;
0396:                                    jjCheckNAddTwoStates(21, 22);
0397:                                } else if (curChar == 32) {
0398:                                    if (kind > 16)
0399:                                        kind = 16;
0400:                                    jjCheckNAdd(22);
0401:                                }
0402:                                break;
0403:                            case 19:
0404:                                if ((0x8ffffffbffffffffL & l) != 0L) {
0405:                                    if (kind > 18)
0406:                                        kind = 18;
0407:                                    jjCheckNAddStates(0, 2);
0408:                                } else if (curChar == 62) {
0409:                                    if (kind > 17)
0410:                                        kind = 17;
0411:                                } else if (curChar == 60)
0412:                                    jjCheckNAdd(21);
0413:                                else if (curChar == 61) {
0414:                                    if (kind > 14)
0415:                                        kind = 14;
0416:                                    jjCheckNAdd(3);
0417:                                } else if (curChar == 34) {
0418:                                    if (kind > 13)
0419:                                        kind = 13;
0420:                                    jjCheckNAdd(1);
0421:                                }
0422:                                if (curChar == 32)
0423:                                    jjCheckNAddStates(3, 8);
0424:                                else if (curChar == 60)
0425:                                    jjstateSet[jjnewStateCnt++] = 18;
0426:                                break;
0427:                            case 0:
0428:                                if (curChar != 34)
0429:                                    break;
0430:                                if (kind > 13)
0431:                                    kind = 13;
0432:                                jjCheckNAdd(1);
0433:                                break;
0434:                            case 1:
0435:                                if (curChar != 32)
0436:                                    break;
0437:                                if (kind > 13)
0438:                                    kind = 13;
0439:                                jjCheckNAdd(1);
0440:                                break;
0441:                            case 2:
0442:                                if (curChar != 61)
0443:                                    break;
0444:                                if (kind > 14)
0445:                                    kind = 14;
0446:                                jjCheckNAdd(3);
0447:                                break;
0448:                            case 3:
0449:                                if (curChar != 32)
0450:                                    break;
0451:                                if (kind > 14)
0452:                                    kind = 14;
0453:                                jjCheckNAdd(3);
0454:                                break;
0455:                            case 4:
0456:                                if (curChar == 62)
0457:                                    jjCheckNAddTwoStates(5, 13);
0458:                                break;
0459:                            case 5:
0460:                                if ((0xbfffffffffffffffL & l) != 0L)
0461:                                    jjCheckNAddTwoStates(5, 13);
0462:                                break;
0463:                            case 6:
0464:                                if (curChar == 62 && kind > 15)
0465:                                    kind = 15;
0466:                                break;
0467:                            case 12:
0468:                                if (curChar == 47)
0469:                                    jjstateSet[jjnewStateCnt++] = 11;
0470:                                break;
0471:                            case 13:
0472:                                if (curChar == 60)
0473:                                    jjstateSet[jjnewStateCnt++] = 12;
0474:                                break;
0475:                            case 20:
0476:                                if (curChar == 60)
0477:                                    jjCheckNAdd(21);
0478:                                break;
0479:                            case 22:
0480:                                if (curChar != 32)
0481:                                    break;
0482:                                if (kind > 16)
0483:                                    kind = 16;
0484:                                jjCheckNAdd(22);
0485:                                break;
0486:                            case 23:
0487:                                if (curChar == 62 && kind > 17)
0488:                                    kind = 17;
0489:                                break;
0490:                            case 24:
0491:                                if ((0x8ffffffbffffffffL & l) == 0L)
0492:                                    break;
0493:                                if (kind > 18)
0494:                                    kind = 18;
0495:                                jjCheckNAddStates(0, 2);
0496:                                break;
0497:                            case 25:
0498:                                if (curChar != 34)
0499:                                    break;
0500:                                if (kind > 18)
0501:                                    kind = 18;
0502:                                jjCheckNAddStates(0, 2);
0503:                                break;
0504:                            case 27:
0505:                                if (curChar != 32)
0506:                                    break;
0507:                                if (kind > 18)
0508:                                    kind = 18;
0509:                                jjCheckNAdd(27);
0510:                                break;
0511:                            case 28:
0512:                                if (curChar == 32)
0513:                                    jjCheckNAddStates(3, 8);
0514:                                break;
0515:                            case 29:
0516:                                if (curChar == 32)
0517:                                    jjCheckNAddTwoStates(29, 0);
0518:                                break;
0519:                            case 30:
0520:                                if (curChar == 32)
0521:                                    jjCheckNAddTwoStates(30, 2);
0522:                                break;
0523:                            case 31:
0524:                                if (curChar == 32)
0525:                                    jjCheckNAddTwoStates(31, 23);
0526:                                break;
0527:                            default:
0528:                                break;
0529:                            }
0530:                        } while (i != startsAt);
0531:                    } else if (curChar < 128) {
0532:                        long l = 1L << (curChar & 077);
0533:                        MatchLoop: do {
0534:                            switch (jjstateSet[--i]) {
0535:                            case 32:
0536:                                if (kind > 18)
0537:                                    kind = 18;
0538:                                jjCheckNAddStates(0, 2);
0539:                                if (curChar == 92)
0540:                                    jjstateSet[jjnewStateCnt++] = 25;
0541:                                break;
0542:                            case 18:
0543:                                if ((0x7fffffe07fffffeL & l) != 0L) {
0544:                                    if (kind > 16)
0545:                                        kind = 16;
0546:                                    jjCheckNAddTwoStates(21, 22);
0547:                                }
0548:                                if ((0x10000000100000L & l) != 0L)
0549:                                    jjstateSet[jjnewStateCnt++] = 17;
0550:                                break;
0551:                            case 33:
0552:                            case 21:
0553:                                if ((0x7fffffe07fffffeL & l) == 0L)
0554:                                    break;
0555:                                if (kind > 16)
0556:                                    kind = 16;
0557:                                jjCheckNAddTwoStates(21, 22);
0558:                                break;
0559:                            case 19:
0560:                                if (kind > 18)
0561:                                    kind = 18;
0562:                                jjCheckNAddStates(0, 2);
0563:                                if (curChar == 92)
0564:                                    jjstateSet[jjnewStateCnt++] = 25;
0565:                                break;
0566:                            case 5:
0567:                                jjAddStates(9, 10);
0568:                                break;
0569:                            case 7:
0570:                                if ((0x2000000020L & l) != 0L)
0571:                                    jjstateSet[jjnewStateCnt++] = 6;
0572:                                break;
0573:                            case 8:
0574:                                if ((0x100000001000L & l) != 0L)
0575:                                    jjstateSet[jjnewStateCnt++] = 7;
0576:                                break;
0577:                            case 9:
0578:                                if ((0x10000000100000L & l) != 0L)
0579:                                    jjstateSet[jjnewStateCnt++] = 8;
0580:                                break;
0581:                            case 10:
0582:                                if ((0x20000000200L & l) != 0L)
0583:                                    jjstateSet[jjnewStateCnt++] = 9;
0584:                                break;
0585:                            case 11:
0586:                                if ((0x10000000100000L & l) != 0L)
0587:                                    jjstateSet[jjnewStateCnt++] = 10;
0588:                                break;
0589:                            case 14:
0590:                                if ((0x2000000020L & l) != 0L)
0591:                                    jjstateSet[jjnewStateCnt++] = 4;
0592:                                break;
0593:                            case 15:
0594:                                if ((0x100000001000L & l) != 0L)
0595:                                    jjstateSet[jjnewStateCnt++] = 14;
0596:                                break;
0597:                            case 16:
0598:                                if ((0x10000000100000L & l) != 0L)
0599:                                    jjstateSet[jjnewStateCnt++] = 15;
0600:                                break;
0601:                            case 17:
0602:                                if ((0x20000000200L & l) != 0L)
0603:                                    jjstateSet[jjnewStateCnt++] = 16;
0604:                                break;
0605:                            case 24:
0606:                                if (kind > 18)
0607:                                    kind = 18;
0608:                                jjCheckNAddStates(0, 2);
0609:                                break;
0610:                            case 26:
0611:                                if (curChar == 92)
0612:                                    jjstateSet[jjnewStateCnt++] = 25;
0613:                                break;
0614:                            default:
0615:                                break;
0616:                            }
0617:                        } while (i != startsAt);
0618:                    } else {
0619:                        int hiByte = (int) (curChar >> 8);
0620:                        int i1 = hiByte >> 6;
0621:                        long l1 = 1L << (hiByte & 077);
0622:                        int i2 = (curChar & 0xff) >> 6;
0623:                        long l2 = 1L << (curChar & 077);
0624:                        MatchLoop: do {
0625:                            switch (jjstateSet[--i]) {
0626:                            case 32:
0627:                            case 24:
0628:                                if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
0629:                                    break;
0630:                                if (kind > 18)
0631:                                    kind = 18;
0632:                                jjCheckNAddStates(0, 2);
0633:                                break;
0634:                            case 19:
0635:                                if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
0636:                                    break;
0637:                                if (kind > 18)
0638:                                    kind = 18;
0639:                                jjCheckNAddStates(0, 2);
0640:                                break;
0641:                            case 5:
0642:                                if (jjCanMove_0(hiByte, i1, i2, l1, l2))
0643:                                    jjAddStates(9, 10);
0644:                                break;
0645:                            default:
0646:                                break;
0647:                            }
0648:                        } while (i != startsAt);
0649:                    }
0650:                    if (kind != 0x7fffffff) {
0651:                        jjmatchedKind = kind;
0652:                        jjmatchedPos = curPos;
0653:                        kind = 0x7fffffff;
0654:                    }
0655:                    ++curPos;
0656:                    if ((i = jjnewStateCnt) == (startsAt = 32 - (jjnewStateCnt = startsAt)))
0657:                        return curPos;
0658:                    try {
0659:                        curChar = input_stream.readChar();
0660:                    } catch (java.io.IOException e) {
0661:                        return curPos;
0662:                    }
0663:                }
0664:            }
0665:
0666:            private final int jjMoveStringLiteralDfa0_1() {
0667:                switch (curChar) {
0668:                case 62:
0669:                    return jjStopAtPos(0, 7);
0670:                default:
0671:                    return 1;
0672:                }
0673:            }
0674:
0675:            private final int jjMoveStringLiteralDfa0_3() {
0676:                switch (curChar) {
0677:                case 60:
0678:                    return jjMoveStringLiteralDfa1_3(0x800L);
0679:                default:
0680:                    return 1;
0681:                }
0682:            }
0683:
0684:            private final int jjMoveStringLiteralDfa1_3(long active0) {
0685:                try {
0686:                    curChar = input_stream.readChar();
0687:                } catch (java.io.IOException e) {
0688:                    return 1;
0689:                }
0690:                switch (curChar) {
0691:                case 47:
0692:                    return jjMoveStringLiteralDfa2_3(active0, 0x800L);
0693:                default:
0694:                    return 2;
0695:                }
0696:            }
0697:
0698:            private final int jjMoveStringLiteralDfa2_3(long old0, long active0) {
0699:                if (((active0 &= old0)) == 0L)
0700:                    return 2;
0701:                try {
0702:                    curChar = input_stream.readChar();
0703:                } catch (java.io.IOException e) {
0704:                    return 2;
0705:                }
0706:                switch (curChar) {
0707:                case 115:
0708:                    return jjMoveStringLiteralDfa3_3(active0, 0x800L);
0709:                default:
0710:                    return 3;
0711:                }
0712:            }
0713:
0714:            private final int jjMoveStringLiteralDfa3_3(long old0, long active0) {
0715:                if (((active0 &= old0)) == 0L)
0716:                    return 3;
0717:                try {
0718:                    curChar = input_stream.readChar();
0719:                } catch (java.io.IOException e) {
0720:                    return 3;
0721:                }
0722:                switch (curChar) {
0723:                case 99:
0724:                    return jjMoveStringLiteralDfa4_3(active0, 0x800L);
0725:                default:
0726:                    return 4;
0727:                }
0728:            }
0729:
0730:            private final int jjMoveStringLiteralDfa4_3(long old0, long active0) {
0731:                if (((active0 &= old0)) == 0L)
0732:                    return 4;
0733:                try {
0734:                    curChar = input_stream.readChar();
0735:                } catch (java.io.IOException e) {
0736:                    return 4;
0737:                }
0738:                switch (curChar) {
0739:                case 114:
0740:                    return jjMoveStringLiteralDfa5_3(active0, 0x800L);
0741:                default:
0742:                    return 5;
0743:                }
0744:            }
0745:
0746:            private final int jjMoveStringLiteralDfa5_3(long old0, long active0) {
0747:                if (((active0 &= old0)) == 0L)
0748:                    return 5;
0749:                try {
0750:                    curChar = input_stream.readChar();
0751:                } catch (java.io.IOException e) {
0752:                    return 5;
0753:                }
0754:                switch (curChar) {
0755:                case 105:
0756:                    return jjMoveStringLiteralDfa6_3(active0, 0x800L);
0757:                default:
0758:                    return 6;
0759:                }
0760:            }
0761:
0762:            private final int jjMoveStringLiteralDfa6_3(long old0, long active0) {
0763:                if (((active0 &= old0)) == 0L)
0764:                    return 6;
0765:                try {
0766:                    curChar = input_stream.readChar();
0767:                } catch (java.io.IOException e) {
0768:                    return 6;
0769:                }
0770:                switch (curChar) {
0771:                case 112:
0772:                    return jjMoveStringLiteralDfa7_3(active0, 0x800L);
0773:                default:
0774:                    return 7;
0775:                }
0776:            }
0777:
0778:            private final int jjMoveStringLiteralDfa7_3(long old0, long active0) {
0779:                if (((active0 &= old0)) == 0L)
0780:                    return 7;
0781:                try {
0782:                    curChar = input_stream.readChar();
0783:                } catch (java.io.IOException e) {
0784:                    return 7;
0785:                }
0786:                switch (curChar) {
0787:                case 116:
0788:                    return jjMoveStringLiteralDfa8_3(active0, 0x800L);
0789:                default:
0790:                    return 8;
0791:                }
0792:            }
0793:
0794:            private final int jjMoveStringLiteralDfa8_3(long old0, long active0) {
0795:                if (((active0 &= old0)) == 0L)
0796:                    return 8;
0797:                try {
0798:                    curChar = input_stream.readChar();
0799:                } catch (java.io.IOException e) {
0800:                    return 8;
0801:                }
0802:                switch (curChar) {
0803:                case 62:
0804:                    if ((active0 & 0x800L) != 0L)
0805:                        return jjStopAtPos(8, 11);
0806:                    break;
0807:                default:
0808:                    return 9;
0809:                }
0810:                return 9;
0811:            }
0812:
0813:            private final int jjMoveStringLiteralDfa0_2() {
0814:                switch (curChar) {
0815:                case 45:
0816:                    return jjMoveStringLiteralDfa1_2(0x200L);
0817:                default:
0818:                    return 1;
0819:                }
0820:            }
0821:
0822:            private final int jjMoveStringLiteralDfa1_2(long active0) {
0823:                try {
0824:                    curChar = input_stream.readChar();
0825:                } catch (java.io.IOException e) {
0826:                    return 1;
0827:                }
0828:                switch (curChar) {
0829:                case 45:
0830:                    return jjMoveStringLiteralDfa2_2(active0, 0x200L);
0831:                default:
0832:                    return 2;
0833:                }
0834:            }
0835:
0836:            private final int jjMoveStringLiteralDfa2_2(long old0, long active0) {
0837:                if (((active0 &= old0)) == 0L)
0838:                    return 2;
0839:                try {
0840:                    curChar = input_stream.readChar();
0841:                } catch (java.io.IOException e) {
0842:                    return 2;
0843:                }
0844:                switch (curChar) {
0845:                case 62:
0846:                    if ((active0 & 0x200L) != 0L)
0847:                        return jjStopAtPos(2, 9);
0848:                    break;
0849:                default:
0850:                    return 3;
0851:                }
0852:                return 3;
0853:            }
0854:
0855:            static final int[] jjnextStates = { 24, 26, 27, 29, 0, 30, 2, 31,
0856:                    23, 5, 13, };
0857:
0858:            private static final boolean jjCanMove_0(int hiByte, int i1,
0859:                    int i2, long l1, long l2) {
0860:                switch (hiByte) {
0861:                case 0:
0862:                    return ((jjbitVec2[i2] & l2) != 0L);
0863:                default:
0864:                    if ((jjbitVec0[i1] & l1) != 0L)
0865:                        return true;
0866:                    return false;
0867:                }
0868:            }
0869:
0870:            public static final String[] jjstrLiteralImages = { "", null, null,
0871:                    null, null, null, null, null, null, null, null, null, null,
0872:                    null, null, null, null, null, null, "\74", };
0873:            public static final String[] lexStateNames = { "DEFAULT",
0874:                    "WithinDoctype", "WithinComment", "WithinScript", };
0875:            public static final int[] jjnewLexState = { -1, -1, -1, -1, 3, 2,
0876:                    1, 0, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, };
0877:            static final long[] jjtoToken = { 0xfe001L, };
0878:            static final long[] jjtoSkip = { 0xafeL, };
0879:            static final long[] jjtoMore = { 0x1500L, };
0880:            protected SimpleCharStream input_stream;
0881:            private final int[] jjrounds = new int[32];
0882:            private final int[] jjstateSet = new int[64];
0883:            protected char curChar;
0884:
0885:            public HtmlExtractorParserTokenManager(SimpleCharStream stream) {
0886:                if (SimpleCharStream.staticFlag)
0887:                    throw new Error(
0888:                            "ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
0889:                input_stream = stream;
0890:            }
0891:
0892:            public HtmlExtractorParserTokenManager(SimpleCharStream stream,
0893:                    int lexState) {
0894:                this (stream);
0895:                SwitchTo(lexState);
0896:            }
0897:
0898:            public void ReInit(SimpleCharStream stream) {
0899:                jjmatchedPos = jjnewStateCnt = 0;
0900:                curLexState = defaultLexState;
0901:                input_stream = stream;
0902:                ReInitRounds();
0903:            }
0904:
0905:            private final void ReInitRounds() {
0906:                int i;
0907:                jjround = 0x80000001;
0908:                for (i = 32; i-- > 0;)
0909:                    jjrounds[i] = 0x80000000;
0910:            }
0911:
0912:            public void ReInit(SimpleCharStream stream, int lexState) {
0913:                ReInit(stream);
0914:                SwitchTo(lexState);
0915:            }
0916:
0917:            public void SwitchTo(int lexState) {
0918:                if (lexState >= 4 || lexState < 0)
0919:                    throw new TokenMgrError(
0920:                            "Error: Ignoring invalid lexical state : "
0921:                                    + lexState + ". State unchanged.",
0922:                            TokenMgrError.INVALID_LEXICAL_STATE);
0923:                else
0924:                    curLexState = lexState;
0925:            }
0926:
0927:            protected Token jjFillToken() {
0928:                Token t = Token.newToken(jjmatchedKind);
0929:                t.kind = jjmatchedKind;
0930:                String im = jjstrLiteralImages[jjmatchedKind];
0931:                t.image = (im == null) ? input_stream.GetImage() : im;
0932:                t.beginLine = input_stream.getBeginLine();
0933:                t.beginColumn = input_stream.getBeginColumn();
0934:                t.endLine = input_stream.getEndLine();
0935:                t.endColumn = input_stream.getEndColumn();
0936:                return t;
0937:            }
0938:
0939:            int curLexState = 0;
0940:            int defaultLexState = 0;
0941:            int jjnewStateCnt;
0942:            int jjround;
0943:            int jjmatchedPos;
0944:            int jjmatchedKind;
0945:
0946:            public Token getNextToken() {
0947:                int kind;
0948:                Token specialToken = null;
0949:                Token matchedToken;
0950:                int curPos = 0;
0951:
0952:                EOFLoop: for (;;) {
0953:                    try {
0954:                        curChar = input_stream.BeginToken();
0955:                    } catch (java.io.IOException e) {
0956:                        jjmatchedKind = 0;
0957:                        matchedToken = jjFillToken();
0958:                        return matchedToken;
0959:                    }
0960:
0961:                    for (;;) {
0962:                        switch (curLexState) {
0963:                        case 0:
0964:                            jjmatchedKind = 0x7fffffff;
0965:                            jjmatchedPos = 0;
0966:                            curPos = jjMoveStringLiteralDfa0_0();
0967:                            break;
0968:                        case 1:
0969:                            jjmatchedKind = 0x7fffffff;
0970:                            jjmatchedPos = 0;
0971:                            curPos = jjMoveStringLiteralDfa0_1();
0972:                            if (jjmatchedPos == 0 && jjmatchedKind > 8) {
0973:                                jjmatchedKind = 8;
0974:                            }
0975:                            break;
0976:                        case 2:
0977:                            jjmatchedKind = 0x7fffffff;
0978:                            jjmatchedPos = 0;
0979:                            curPos = jjMoveStringLiteralDfa0_2();
0980:                            if (jjmatchedPos == 0 && jjmatchedKind > 10) {
0981:                                jjmatchedKind = 10;
0982:                            }
0983:                            break;
0984:                        case 3:
0985:                            jjmatchedKind = 0x7fffffff;
0986:                            jjmatchedPos = 0;
0987:                            curPos = jjMoveStringLiteralDfa0_3();
0988:                            if (jjmatchedPos == 0 && jjmatchedKind > 12) {
0989:                                jjmatchedKind = 12;
0990:                            }
0991:                            break;
0992:                        }
0993:                        if (jjmatchedKind != 0x7fffffff) {
0994:                            if (jjmatchedPos + 1 < curPos)
0995:                                input_stream.backup(curPos - jjmatchedPos - 1);
0996:                            if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) {
0997:                                matchedToken = jjFillToken();
0998:                                if (jjnewLexState[jjmatchedKind] != -1)
0999:                                    curLexState = jjnewLexState[jjmatchedKind];
1000:                                return matchedToken;
1001:                            } else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) {
1002:                                if (jjnewLexState[jjmatchedKind] != -1)
1003:                                    curLexState = jjnewLexState[jjmatchedKind];
1004:                                continue EOFLoop;
1005:                            }
1006:                            if (jjnewLexState[jjmatchedKind] != -1)
1007:                                curLexState = jjnewLexState[jjmatchedKind];
1008:                            curPos = 0;
1009:                            jjmatchedKind = 0x7fffffff;
1010:                            try {
1011:                                curChar = input_stream.readChar();
1012:                                continue;
1013:                            } catch (java.io.IOException e1) {
1014:                            }
1015:                        }
1016:                        int error_line = input_stream.getEndLine();
1017:                        int error_column = input_stream.getEndColumn();
1018:                        String error_after = null;
1019:                        boolean EOFSeen = false;
1020:                        try {
1021:                            input_stream.readChar();
1022:                            input_stream.backup(1);
1023:                        } catch (java.io.IOException e1) {
1024:                            EOFSeen = true;
1025:                            error_after = curPos <= 1 ? "" : input_stream
1026:                                    .GetImage();
1027:                            if (curChar == '\n' || curChar == '\r') {
1028:                                error_line++;
1029:                                error_column = 0;
1030:                            } else
1031:                                error_column++;
1032:                        }
1033:                        if (!EOFSeen) {
1034:                            input_stream.backup(1);
1035:                            error_after = curPos <= 1 ? "" : input_stream
1036:                                    .GetImage();
1037:                        }
1038:                        throw new TokenMgrError(EOFSeen, curLexState,
1039:                                error_line, error_column, error_after, curChar,
1040:                                TokenMgrError.LEXICAL_ERROR);
1041:                    }
1042:                }
1043:            }
1044:
1045:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.