Source Code Cross Referenced for CSSParser.java in  » XML-UI » JAXX » jaxx » css » 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 » XML UI » JAXX » jaxx.css 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* Generated By:JJTree&JavaCC: Do not edit this line. CSSParser.java */
002:        package jaxx.css;
003:
004:        public class CSSParser/*@bgen(jjtree)*/implements 
005:                CSSParserTreeConstants, CSSParserConstants {/*@bgen(jjtree)*/
006:            protected JJTCSSParserState jjtree = new JJTCSSParserState();
007:
008:            public SimpleNode popNode() {
009:                if (jjtree.nodeArity() > 0) // number of child nodes 
010:                    return (SimpleNode) jjtree.popNode();
011:                else
012:                    return null;
013:            }
014:
015:            void jjtreeOpenNodeScope(Node n) {
016:                ((SimpleNode) n).firstToken = getToken(1);
017:            }
018:
019:            void jjtreeCloseNodeScope(Node n) {
020:                ((SimpleNode) n).lastToken = getToken(0);
021:            }
022:
023:            public static void main(String args[]) {
024:                System.out.println("Reading from standard input...");
025:                CSSParser css = new CSSParser(System.in);
026:                try {
027:                    SimpleNode n = css.Stylesheet();
028:                    n.dump("");
029:                    System.out.println("Thank you.");
030:                } catch (Exception e) {
031:                    System.out.println("Oops.");
032:                    System.out.println(e.getMessage());
033:                    e.printStackTrace();
034:                }
035:            }
036:
037:            final public SimpleNode Stylesheet() throws ParseException {
038:                /*@bgen(jjtree) Stylesheet */
039:                SimpleNode jjtn000 = new SimpleNode(JJTSTYLESHEET);
040:                boolean jjtc000 = true;
041:                jjtree.openNodeScope(jjtn000);
042:                jjtreeOpenNodeScope(jjtn000);
043:                try {
044:                    label_1: while (true) {
045:                        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
046:                        case IDENTIFIER:
047:                        case PSEUDOCLASS_COLON:
048:                        case 29:
049:                        case 30:
050:                        case 31:
051:                            ;
052:                            break;
053:                        default:
054:                            jj_la1[0] = jj_gen;
055:                            break label_1;
056:                        }
057:                        Rule();
058:                    }
059:                    jjtree.closeNodeScope(jjtn000, true);
060:                    jjtc000 = false;
061:                    jjtreeCloseNodeScope(jjtn000);
062:                    {
063:                        if (true)
064:                            return jjtn000;
065:                    }
066:                } catch (Throwable jjte000) {
067:                    if (jjtc000) {
068:                        jjtree.clearNodeScope(jjtn000);
069:                        jjtc000 = false;
070:                    } else {
071:                        jjtree.popNode();
072:                    }
073:                    if (jjte000 instanceof  RuntimeException) {
074:                        {
075:                            if (true)
076:                                throw (RuntimeException) jjte000;
077:                        }
078:                    }
079:                    if (jjte000 instanceof  ParseException) {
080:                        {
081:                            if (true)
082:                                throw (ParseException) jjte000;
083:                        }
084:                    }
085:                    {
086:                        if (true)
087:                            throw (Error) jjte000;
088:                    }
089:                } finally {
090:                    if (jjtc000) {
091:                        jjtree.closeNodeScope(jjtn000, true);
092:                        jjtreeCloseNodeScope(jjtn000);
093:                    }
094:                }
095:                throw new Error("Missing return statement in function");
096:            }
097:
098:            final public void Rule() throws ParseException {
099:                /*@bgen(jjtree) Rule */
100:                SimpleNode jjtn000 = new SimpleNode(JJTRULE);
101:                boolean jjtc000 = true;
102:                jjtree.openNodeScope(jjtn000);
103:                jjtreeOpenNodeScope(jjtn000);
104:                try {
105:                    Selectors();
106:                    jj_consume_token(LEFT_BRACE);
107:                    Declaration();
108:                    label_2: while (true) {
109:                        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
110:                        case SEMICOLON:
111:                            ;
112:                            break;
113:                        default:
114:                            jj_la1[1] = jj_gen;
115:                            break label_2;
116:                        }
117:                        jj_consume_token(SEMICOLON);
118:                        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
119:                        case IDENTIFIER:
120:                            Declaration();
121:                            break;
122:                        default:
123:                            jj_la1[2] = jj_gen;
124:                            ;
125:                        }
126:                    }
127:                    jj_consume_token(RIGHT_BRACE);
128:                } catch (Throwable jjte000) {
129:                    if (jjtc000) {
130:                        jjtree.clearNodeScope(jjtn000);
131:                        jjtc000 = false;
132:                    } else {
133:                        jjtree.popNode();
134:                    }
135:                    if (jjte000 instanceof  RuntimeException) {
136:                        {
137:                            if (true)
138:                                throw (RuntimeException) jjte000;
139:                        }
140:                    }
141:                    if (jjte000 instanceof  ParseException) {
142:                        {
143:                            if (true)
144:                                throw (ParseException) jjte000;
145:                        }
146:                    }
147:                    {
148:                        if (true)
149:                            throw (Error) jjte000;
150:                    }
151:                } finally {
152:                    if (jjtc000) {
153:                        jjtree.closeNodeScope(jjtn000, true);
154:                        jjtreeCloseNodeScope(jjtn000);
155:                    }
156:                }
157:            }
158:
159:            final public void Selectors() throws ParseException {
160:                /*@bgen(jjtree) Selectors */
161:                SimpleNode jjtn000 = new SimpleNode(JJTSELECTORS);
162:                boolean jjtc000 = true;
163:                jjtree.openNodeScope(jjtn000);
164:                jjtreeOpenNodeScope(jjtn000);
165:                try {
166:                    Selector();
167:                    label_3: while (true) {
168:                        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
169:                        case 28:
170:                            ;
171:                            break;
172:                        default:
173:                            jj_la1[3] = jj_gen;
174:                            break label_3;
175:                        }
176:                        jj_consume_token(28);
177:                        Selector();
178:                    }
179:                } catch (Throwable jjte000) {
180:                    if (jjtc000) {
181:                        jjtree.clearNodeScope(jjtn000);
182:                        jjtc000 = false;
183:                    } else {
184:                        jjtree.popNode();
185:                    }
186:                    if (jjte000 instanceof  RuntimeException) {
187:                        {
188:                            if (true)
189:                                throw (RuntimeException) jjte000;
190:                        }
191:                    }
192:                    if (jjte000 instanceof  ParseException) {
193:                        {
194:                            if (true)
195:                                throw (ParseException) jjte000;
196:                        }
197:                    }
198:                    {
199:                        if (true)
200:                            throw (Error) jjte000;
201:                    }
202:                } finally {
203:                    if (jjtc000) {
204:                        jjtree.closeNodeScope(jjtn000, true);
205:                        jjtreeCloseNodeScope(jjtn000);
206:                    }
207:                }
208:            }
209:
210:            final public void Selector() throws ParseException {
211:                /*@bgen(jjtree) Selector */
212:                SimpleNode jjtn000 = new SimpleNode(JJTSELECTOR);
213:                boolean jjtc000 = true;
214:                jjtree.openNodeScope(jjtn000);
215:                jjtreeOpenNodeScope(jjtn000);
216:                try {
217:                    switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
218:                    case IDENTIFIER:
219:                    case 29:
220:                        JavaClass();
221:                        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
222:                        case 30:
223:                            Id();
224:                            break;
225:                        default:
226:                            jj_la1[4] = jj_gen;
227:                            ;
228:                        }
229:                        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
230:                        case 31:
231:                            Class();
232:                            break;
233:                        default:
234:                            jj_la1[5] = jj_gen;
235:                            ;
236:                        }
237:                        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
238:                        case PSEUDOCLASS_COLON:
239:                            PseudoClass();
240:                            break;
241:                        default:
242:                            jj_la1[6] = jj_gen;
243:                            ;
244:                        }
245:                        break;
246:                    case 30:
247:                        Id();
248:                        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
249:                        case 31:
250:                            Class();
251:                            break;
252:                        default:
253:                            jj_la1[7] = jj_gen;
254:                            ;
255:                        }
256:                        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
257:                        case PSEUDOCLASS_COLON:
258:                            PseudoClass();
259:                            break;
260:                        default:
261:                            jj_la1[8] = jj_gen;
262:                            ;
263:                        }
264:                        break;
265:                    case 31:
266:                        Class();
267:                        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
268:                        case PSEUDOCLASS_COLON:
269:                            PseudoClass();
270:                            break;
271:                        default:
272:                            jj_la1[9] = jj_gen;
273:                            ;
274:                        }
275:                        break;
276:                    case PSEUDOCLASS_COLON:
277:                        PseudoClass();
278:                        break;
279:                    default:
280:                        jj_la1[10] = jj_gen;
281:                        jj_consume_token(-1);
282:                        throw new ParseException();
283:                    }
284:                } catch (Throwable jjte000) {
285:                    if (jjtc000) {
286:                        jjtree.clearNodeScope(jjtn000);
287:                        jjtc000 = false;
288:                    } else {
289:                        jjtree.popNode();
290:                    }
291:                    if (jjte000 instanceof  RuntimeException) {
292:                        {
293:                            if (true)
294:                                throw (RuntimeException) jjte000;
295:                        }
296:                    }
297:                    if (jjte000 instanceof  ParseException) {
298:                        {
299:                            if (true)
300:                                throw (ParseException) jjte000;
301:                        }
302:                    }
303:                    {
304:                        if (true)
305:                            throw (Error) jjte000;
306:                    }
307:                } finally {
308:                    if (jjtc000) {
309:                        jjtree.closeNodeScope(jjtn000, true);
310:                        jjtreeCloseNodeScope(jjtn000);
311:                    }
312:                }
313:            }
314:
315:            final public void JavaClass() throws ParseException {
316:                /*@bgen(jjtree) JavaClass */
317:                SimpleNode jjtn000 = new SimpleNode(JJTJAVACLASS);
318:                boolean jjtc000 = true;
319:                jjtree.openNodeScope(jjtn000);
320:                jjtreeOpenNodeScope(jjtn000);
321:                try {
322:                    switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
323:                    case IDENTIFIER:
324:                        jj_consume_token(IDENTIFIER);
325:                        break;
326:                    case 29:
327:                        jj_consume_token(29);
328:                        break;
329:                    default:
330:                        jj_la1[11] = jj_gen;
331:                        jj_consume_token(-1);
332:                        throw new ParseException();
333:                    }
334:                } finally {
335:                    if (jjtc000) {
336:                        jjtree.closeNodeScope(jjtn000, true);
337:                        jjtreeCloseNodeScope(jjtn000);
338:                    }
339:                }
340:            }
341:
342:            final public void Id() throws ParseException {
343:                /*@bgen(jjtree) Id */
344:                SimpleNode jjtn000 = new SimpleNode(JJTID);
345:                boolean jjtc000 = true;
346:                jjtree.openNodeScope(jjtn000);
347:                jjtreeOpenNodeScope(jjtn000);
348:                try {
349:                    jj_consume_token(30);
350:                    jj_consume_token(IDENTIFIER);
351:                } finally {
352:                    if (jjtc000) {
353:                        jjtree.closeNodeScope(jjtn000, true);
354:                        jjtreeCloseNodeScope(jjtn000);
355:                    }
356:                }
357:            }
358:
359:            final public void Class() throws ParseException {
360:                /*@bgen(jjtree) Class */
361:                SimpleNode jjtn000 = new SimpleNode(JJTCLASS);
362:                boolean jjtc000 = true;
363:                jjtree.openNodeScope(jjtn000);
364:                jjtreeOpenNodeScope(jjtn000);
365:                try {
366:                    jj_consume_token(31);
367:                    jj_consume_token(IDENTIFIER);
368:                } finally {
369:                    if (jjtc000) {
370:                        jjtree.closeNodeScope(jjtn000, true);
371:                        jjtreeCloseNodeScope(jjtn000);
372:                    }
373:                }
374:            }
375:
376:            final public void PseudoClass() throws ParseException {
377:                /*@bgen(jjtree) PseudoClass */
378:                SimpleNode jjtn000 = new SimpleNode(JJTPSEUDOCLASS);
379:                boolean jjtc000 = true;
380:                jjtree.openNodeScope(jjtn000);
381:                jjtreeOpenNodeScope(jjtn000);
382:                try {
383:                    jj_consume_token(PSEUDOCLASS_COLON);
384:                    switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
385:                    case PSEUDOCLASS_IDENTIFIER:
386:                        jj_consume_token(PSEUDOCLASS_IDENTIFIER);
387:                        break;
388:                    case PROGRAMMATIC_PSEUDOCLASS:
389:                        jj_consume_token(PROGRAMMATIC_PSEUDOCLASS);
390:                        break;
391:                    default:
392:                        jj_la1[12] = jj_gen;
393:                        jj_consume_token(-1);
394:                        throw new ParseException();
395:                    }
396:                    switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
397:                    case 32:
398:                        AnimationProperties();
399:                        break;
400:                    default:
401:                        jj_la1[13] = jj_gen;
402:                        ;
403:                    }
404:                } catch (Throwable jjte000) {
405:                    if (jjtc000) {
406:                        jjtree.clearNodeScope(jjtn000);
407:                        jjtc000 = false;
408:                    } else {
409:                        jjtree.popNode();
410:                    }
411:                    if (jjte000 instanceof  RuntimeException) {
412:                        {
413:                            if (true)
414:                                throw (RuntimeException) jjte000;
415:                        }
416:                    }
417:                    if (jjte000 instanceof  ParseException) {
418:                        {
419:                            if (true)
420:                                throw (ParseException) jjte000;
421:                        }
422:                    }
423:                    {
424:                        if (true)
425:                            throw (Error) jjte000;
426:                    }
427:                } finally {
428:                    if (jjtc000) {
429:                        jjtree.closeNodeScope(jjtn000, true);
430:                        jjtreeCloseNodeScope(jjtn000);
431:                    }
432:                }
433:            }
434:
435:            final public void AnimationProperties() throws ParseException {
436:                /*@bgen(jjtree) AnimationProperties */
437:                SimpleNode jjtn000 = new SimpleNode(JJTANIMATIONPROPERTIES);
438:                boolean jjtc000 = true;
439:                jjtree.openNodeScope(jjtn000);
440:                jjtreeOpenNodeScope(jjtn000);
441:                try {
442:                    jj_consume_token(32);
443:                    AnimationProperty();
444:                    label_4: while (true) {
445:                        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
446:                        case 28:
447:                            ;
448:                            break;
449:                        default:
450:                            jj_la1[14] = jj_gen;
451:                            break label_4;
452:                        }
453:                        jj_consume_token(28);
454:                        AnimationProperty();
455:                    }
456:                    jj_consume_token(33);
457:                } catch (Throwable jjte000) {
458:                    if (jjtc000) {
459:                        jjtree.clearNodeScope(jjtn000);
460:                        jjtc000 = false;
461:                    } else {
462:                        jjtree.popNode();
463:                    }
464:                    if (jjte000 instanceof  RuntimeException) {
465:                        {
466:                            if (true)
467:                                throw (RuntimeException) jjte000;
468:                        }
469:                    }
470:                    if (jjte000 instanceof  ParseException) {
471:                        {
472:                            if (true)
473:                                throw (ParseException) jjte000;
474:                        }
475:                    }
476:                    {
477:                        if (true)
478:                            throw (Error) jjte000;
479:                    }
480:                } finally {
481:                    if (jjtc000) {
482:                        jjtree.closeNodeScope(jjtn000, true);
483:                        jjtreeCloseNodeScope(jjtn000);
484:                    }
485:                }
486:            }
487:
488:            final public void AnimationProperty() throws ParseException {
489:                /*@bgen(jjtree) AnimationProperty */
490:                SimpleNode jjtn000 = new SimpleNode(JJTANIMATIONPROPERTY);
491:                boolean jjtc000 = true;
492:                jjtree.openNodeScope(jjtn000);
493:                jjtreeOpenNodeScope(jjtn000);
494:                try {
495:                    jj_consume_token(IDENTIFIER);
496:                    jj_consume_token(34);
497:                    jj_consume_token(DECIMAL_LITERAL);
498:                    switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
499:                    case IDENTIFIER:
500:                        jj_consume_token(IDENTIFIER);
501:                        break;
502:                    default:
503:                        jj_la1[15] = jj_gen;
504:                        ;
505:                    }
506:                } finally {
507:                    if (jjtc000) {
508:                        jjtree.closeNodeScope(jjtn000, true);
509:                        jjtreeCloseNodeScope(jjtn000);
510:                    }
511:                }
512:            }
513:
514:            final public void Declaration() throws ParseException {
515:                /*@bgen(jjtree) Declaration */
516:                SimpleNode jjtn000 = new SimpleNode(JJTDECLARATION);
517:                boolean jjtc000 = true;
518:                jjtree.openNodeScope(jjtn000);
519:                jjtreeOpenNodeScope(jjtn000);
520:                try {
521:                    Property();
522:                    jj_consume_token(COLON);
523:                    Expression();
524:                } catch (Throwable jjte000) {
525:                    if (jjtc000) {
526:                        jjtree.clearNodeScope(jjtn000);
527:                        jjtc000 = false;
528:                    } else {
529:                        jjtree.popNode();
530:                    }
531:                    if (jjte000 instanceof  RuntimeException) {
532:                        {
533:                            if (true)
534:                                throw (RuntimeException) jjte000;
535:                        }
536:                    }
537:                    if (jjte000 instanceof  ParseException) {
538:                        {
539:                            if (true)
540:                                throw (ParseException) jjte000;
541:                        }
542:                    }
543:                    {
544:                        if (true)
545:                            throw (Error) jjte000;
546:                    }
547:                } finally {
548:                    if (jjtc000) {
549:                        jjtree.closeNodeScope(jjtn000, true);
550:                        jjtreeCloseNodeScope(jjtn000);
551:                    }
552:                }
553:            }
554:
555:            final public void Property() throws ParseException {
556:                /*@bgen(jjtree) Property */
557:                SimpleNode jjtn000 = new SimpleNode(JJTPROPERTY);
558:                boolean jjtc000 = true;
559:                jjtree.openNodeScope(jjtn000);
560:                jjtreeOpenNodeScope(jjtn000);
561:                try {
562:                    jj_consume_token(IDENTIFIER);
563:                } finally {
564:                    if (jjtc000) {
565:                        jjtree.closeNodeScope(jjtn000, true);
566:                        jjtreeCloseNodeScope(jjtn000);
567:                    }
568:                }
569:            }
570:
571:            final public void Expression() throws ParseException {
572:                /*@bgen(jjtree) Expression */
573:                SimpleNode jjtn000 = new SimpleNode(JJTEXPRESSION);
574:                boolean jjtc000 = true;
575:                jjtree.openNodeScope(jjtn000);
576:                jjtreeOpenNodeScope(jjtn000);
577:                try {
578:                    switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
579:                    case DECIMAL_LITERAL:
580:                        jj_consume_token(DECIMAL_LITERAL);
581:                        break;
582:                    case STRING:
583:                        jj_consume_token(STRING);
584:                        break;
585:                    case IDENTIFIER:
586:                        jj_consume_token(IDENTIFIER);
587:                        break;
588:                    case HEXCOLOR:
589:                        jj_consume_token(HEXCOLOR);
590:                        break;
591:                    case EMS:
592:                        jj_consume_token(EMS);
593:                        break;
594:                    case EXS:
595:                        jj_consume_token(EXS);
596:                        break;
597:                    case LENGTH:
598:                        jj_consume_token(LENGTH);
599:                        break;
600:                    case JAVA_CODE_START:
601:                        JavaCode();
602:                        break;
603:                    default:
604:                        jj_la1[16] = jj_gen;
605:                        jj_consume_token(-1);
606:                        throw new ParseException();
607:                    }
608:                } catch (Throwable jjte000) {
609:                    if (jjtc000) {
610:                        jjtree.clearNodeScope(jjtn000);
611:                        jjtc000 = false;
612:                    } else {
613:                        jjtree.popNode();
614:                    }
615:                    if (jjte000 instanceof  RuntimeException) {
616:                        {
617:                            if (true)
618:                                throw (RuntimeException) jjte000;
619:                        }
620:                    }
621:                    if (jjte000 instanceof  ParseException) {
622:                        {
623:                            if (true)
624:                                throw (ParseException) jjte000;
625:                        }
626:                    }
627:                    {
628:                        if (true)
629:                            throw (Error) jjte000;
630:                    }
631:                } finally {
632:                    if (jjtc000) {
633:                        jjtree.closeNodeScope(jjtn000, true);
634:                        jjtreeCloseNodeScope(jjtn000);
635:                    }
636:                }
637:            }
638:
639:            final public void JavaCode() throws ParseException {
640:                /*@bgen(jjtree) JavaCode */
641:                SimpleNode jjtn000 = new SimpleNode(JJTJAVACODE);
642:                boolean jjtc000 = true;
643:                jjtree.openNodeScope(jjtn000);
644:                jjtreeOpenNodeScope(jjtn000);
645:                try {
646:                    jj_consume_token(JAVA_CODE_START);
647:                    jj_consume_token(JAVA_CODE);
648:                    jj_consume_token(JAVA_CODE_END);
649:                } finally {
650:                    if (jjtc000) {
651:                        jjtree.closeNodeScope(jjtn000, true);
652:                        jjtreeCloseNodeScope(jjtn000);
653:                    }
654:                }
655:            }
656:
657:            final public void Identifier() throws ParseException {
658:                /*@bgen(jjtree) Identifier */
659:                SimpleNode jjtn000 = new SimpleNode(JJTIDENTIFIER);
660:                boolean jjtc000 = true;
661:                jjtree.openNodeScope(jjtn000);
662:                jjtreeOpenNodeScope(jjtn000);
663:                try {
664:                    jj_consume_token(IDENTIFIER);
665:                } finally {
666:                    if (jjtc000) {
667:                        jjtree.closeNodeScope(jjtn000, true);
668:                        jjtreeCloseNodeScope(jjtn000);
669:                    }
670:                }
671:            }
672:
673:            public CSSParserTokenManager token_source;
674:            SimpleCharStream jj_input_stream;
675:            public Token token, jj_nt;
676:            private int jj_ntk;
677:            private int jj_gen;
678:            final private int[] jj_la1 = new int[17];
679:            static private int[] jj_la1_0;
680:            static private int[] jj_la1_1;
681:            static {
682:                jj_la1_0();
683:                jj_la1_1();
684:            }
685:
686:            private static void jj_la1_0() {
687:                jj_la1_0 = new int[] { 0xe0002200, 0x8000, 0x200, 0x10000000,
688:                        0x40000000, 0x80000000, 0x2000, 0x80000000, 0x2000,
689:                        0x2000, 0xe0002200, 0x20000200, 0x201000, 0x0,
690:                        0x10000000, 0x200, 0xec40280, };
691:            }
692:
693:            private static void jj_la1_1() {
694:                jj_la1_1 = new int[] { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
695:                        0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, };
696:            }
697:
698:            public CSSParser(java.io.InputStream stream) {
699:                this (stream, null);
700:            }
701:
702:            public CSSParser(java.io.InputStream stream, String encoding) {
703:                try {
704:                    jj_input_stream = new SimpleCharStream(stream, encoding, 1,
705:                            1);
706:                } catch (java.io.UnsupportedEncodingException e) {
707:                    throw new RuntimeException(e);
708:                }
709:                token_source = new CSSParserTokenManager(jj_input_stream);
710:                token = new Token();
711:                jj_ntk = -1;
712:                jj_gen = 0;
713:                for (int i = 0; i < 17; i++)
714:                    jj_la1[i] = -1;
715:            }
716:
717:            public void ReInit(java.io.InputStream stream) {
718:                ReInit(stream, null);
719:            }
720:
721:            public void ReInit(java.io.InputStream stream, String encoding) {
722:                try {
723:                    jj_input_stream.ReInit(stream, encoding, 1, 1);
724:                } catch (java.io.UnsupportedEncodingException e) {
725:                    throw new RuntimeException(e);
726:                }
727:                token_source.ReInit(jj_input_stream);
728:                token = new Token();
729:                jj_ntk = -1;
730:                jjtree.reset();
731:                jj_gen = 0;
732:                for (int i = 0; i < 17; i++)
733:                    jj_la1[i] = -1;
734:            }
735:
736:            public CSSParser(java.io.Reader stream) {
737:                jj_input_stream = new SimpleCharStream(stream, 1, 1);
738:                token_source = new CSSParserTokenManager(jj_input_stream);
739:                token = new Token();
740:                jj_ntk = -1;
741:                jj_gen = 0;
742:                for (int i = 0; i < 17; i++)
743:                    jj_la1[i] = -1;
744:            }
745:
746:            public void ReInit(java.io.Reader stream) {
747:                jj_input_stream.ReInit(stream, 1, 1);
748:                token_source.ReInit(jj_input_stream);
749:                token = new Token();
750:                jj_ntk = -1;
751:                jjtree.reset();
752:                jj_gen = 0;
753:                for (int i = 0; i < 17; i++)
754:                    jj_la1[i] = -1;
755:            }
756:
757:            public CSSParser(CSSParserTokenManager tm) {
758:                token_source = tm;
759:                token = new Token();
760:                jj_ntk = -1;
761:                jj_gen = 0;
762:                for (int i = 0; i < 17; i++)
763:                    jj_la1[i] = -1;
764:            }
765:
766:            public void ReInit(CSSParserTokenManager tm) {
767:                token_source = tm;
768:                token = new Token();
769:                jj_ntk = -1;
770:                jjtree.reset();
771:                jj_gen = 0;
772:                for (int i = 0; i < 17; i++)
773:                    jj_la1[i] = -1;
774:            }
775:
776:            final private Token jj_consume_token(int kind)
777:                    throws ParseException {
778:                Token oldToken;
779:                if ((oldToken = token).next != null)
780:                    token = token.next;
781:                else
782:                    token = token.next = token_source.getNextToken();
783:                jj_ntk = -1;
784:                if (token.kind == kind) {
785:                    jj_gen++;
786:                    return token;
787:                }
788:                token = oldToken;
789:                jj_kind = kind;
790:                throw generateParseException();
791:            }
792:
793:            final public Token getNextToken() {
794:                if (token.next != null)
795:                    token = token.next;
796:                else
797:                    token = token.next = token_source.getNextToken();
798:                jj_ntk = -1;
799:                jj_gen++;
800:                return token;
801:            }
802:
803:            final public Token getToken(int index) {
804:                Token t = token;
805:                for (int i = 0; i < index; i++) {
806:                    if (t.next != null)
807:                        t = t.next;
808:                    else
809:                        t = t.next = token_source.getNextToken();
810:                }
811:                return t;
812:            }
813:
814:            final private int jj_ntk() {
815:                if ((jj_nt = token.next) == null)
816:                    return (jj_ntk = (token.next = token_source.getNextToken()).kind);
817:                else
818:                    return (jj_ntk = jj_nt.kind);
819:            }
820:
821:            private java.util.Vector jj_expentries = new java.util.Vector();
822:            private int[] jj_expentry;
823:            private int jj_kind = -1;
824:
825:            public ParseException generateParseException() {
826:                Token errortok = token.next;
827:                int line = errortok.beginLine, column = errortok.beginColumn;
828:                String mess = (errortok.kind == 0) ? tokenImage[0]
829:                        : errortok.image;
830:                return new ParseException("Parse error.  Encountered: " + mess,
831:                        line, column);
832:            }
833:
834:            final public void enable_tracing() {
835:            }
836:
837:            final public void disable_tracing() {
838:            }
839:
840:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.