KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > antlr > actions > java > ActionLexer


1 // $ANTLR 2.7.1+ (RK devel version): "action.g" -> "ActionLexer.java"$
2

3 package antlr.actions.java;
4
5 import java.io.InputStream JavaDoc;
6 import antlr.TokenStreamException;
7 import antlr.TokenStreamIOException;
8 import antlr.TokenStreamRecognitionException;
9 import antlr.CharStreamException;
10 import antlr.CharStreamIOException;
11 import antlr.ANTLRException;
12 import java.io.Reader JavaDoc;
13 import java.util.Hashtable JavaDoc;
14 import antlr.CharScanner;
15 import antlr.InputBuffer;
16 import antlr.ByteBuffer;
17 import antlr.CharBuffer;
18 import antlr.Token;
19 import antlr.CommonToken;
20 import antlr.RecognitionException;
21 import antlr.NoViableAltForCharException;
22 import antlr.MismatchedCharException;
23 import antlr.TokenStream;
24 import antlr.ANTLRHashString;
25 import antlr.LexerSharedInputState;
26 import antlr.collections.impl.BitSet;
27 import antlr.SemanticException;
28
29 import java.io.StringReader JavaDoc;
30 import antlr.collections.impl.Vector;
31
32 /** Perform the following translations:
33
34  AST related translations
35
36    ## -> currentRule_AST
37    #(x,y,z) -> codeGenerator.getASTCreateString(vector-of(x,y,z))
38    #[x] -> codeGenerator.getASTCreateString(x)
39    #x -> codeGenerator.mapTreeId(x)
40
41    Inside context of #(...), you can ref (x,y,z), [x], and x as shortcuts.
42
43  Text related translations
44
45    $append(x) -> text.append(x)
46    $setText(x) -> text.setLength(_begin); text.append(x)
47    $getText -> new String(text.getBuffer(),_begin,text.length()-_begin)
48    $setToken(x) -> _token = x
49    $setType(x) -> _ttype = x
50    $FOLLOW -> current FOLLOW set name (handy for error handlers)
51  */

52 public class ActionLexer extends antlr.CharScanner implements ActionLexerTokenTypes, TokenStream
53  {
54
55     protected RuleBlock currentRule;
56     protected CodeGenerator generator;
57     protected int lineOffset = 0;
58     private Tool antlrTool; // The ANTLR tool
59
ActionTransInfo transInfo;
60
61     public ActionLexer( String JavaDoc s,
62                         RuleBlock currentRule,
63                         CodeGenerator generator,
64                         ActionTransInfo transInfo) {
65         this(new StringReader JavaDoc(s));
66         this.currentRule = currentRule;
67         this.generator = generator;
68         this.transInfo = transInfo;
69     }
70
71     public void setLineOffset(int lineOffset) {
72         // this.lineOffset = lineOffset;
73
setLine(lineOffset);
74     }
75
76     public void setTool(Tool tool) {
77         this.antlrTool = tool;
78     }
79
80     public void reportError(RecognitionException e)
81     {
82         antlrTool.error("Syntax error in action: "+e,getFilename(),getLine(),getColumn());
83     }
84
85     public void reportError(String JavaDoc s)
86     {
87         antlrTool.error(s,getFilename(),getLine(),getColumn());
88     }
89
90     public void reportWarning(String JavaDoc s)
91     {
92         if ( getFilename()==null ) {
93             antlrTool.warning(s);
94         }
95         else {
96             antlrTool.warning(s,getFilename(),getLine(), getColumn());
97         }
98     }
99 public ActionLexer(InputStream JavaDoc in) {
100     this(new ByteBuffer(in));
101 }
102 public ActionLexer(Reader JavaDoc in) {
103     this(new CharBuffer(in));
104 }
105 public ActionLexer(InputBuffer ib) {
106     this(new LexerSharedInputState(ib));
107 }
108 public ActionLexer(LexerSharedInputState state) {
109     super(state);
110     caseSensitiveLiterals = true;
111     setCaseSensitive(true);
112     literals = new Hashtable JavaDoc();
113 }
114
115 public Token nextToken() throws TokenStreamException {
116     Token theRetToken=null;
117 tryAgain:
118     for (;;) {
119         Token _token = null;
120         int _ttype = Token.INVALID_TYPE;
121         resetText();
122         try { // for char stream error handling
123
try { // for lexical error handling
124
if (((LA(1) >= '\u0003' && LA(1) <= '~'))) {
125                     mACTION(true);
126                     theRetToken=_returnToken;
127                 }
128                 else {
129                     if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
130                 else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
131                 }
132
133                 if ( _returnToken==null ) continue tryAgain; // found SKIP token
134
_ttype = _returnToken.getType();
135                 _returnToken.setType(_ttype);
136                 return _returnToken;
137             }
138             catch (RecognitionException e) {
139                 throw new TokenStreamRecognitionException(e);
140             }
141         }
142         catch (CharStreamException cse) {
143             if ( cse instanceof CharStreamIOException ) {
144                 throw new TokenStreamIOException(((CharStreamIOException)cse).io);
145             }
146             else {
147                 throw new TokenStreamException(cse.getMessage());
148             }
149         }
150     }
151 }
152
153     public final void mACTION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
154         int _ttype; Token _token=null; int _begin=text.length();
155         _ttype = ACTION;
156         int _saveIndex;
157
158         {
159         int _cnt3=0;
160         _loop3:
161         do {
162             switch ( LA(1)) {
163             case '\u0003': case '\u0004': case '\u0005': case '\u0006':
164             case '\u0007': case '\u0008': case '\t': case '\n':
165             case '\u000b': case '\u000c': case '\r': case '\u000e':
166             case '\u000f': case '\u0010': case '\u0011': case '\u0012':
167             case '\u0013': case '\u0014': case '\u0015': case '\u0016':
168             case '\u0017': case '\u0018': case '\u0019': case '\u001a':
169             case '\u001b': case '\u001c': case '\u001d': case '\u001e':
170             case '\u001f': case ' ': case '!': case '"':
171             case '%': case '&': case '\'': case '(':
172             case ')': case '*': case '+': case ',':
173             case '-': case '.': case '/': case '0':
174             case '1': case '2': case '3': case '4':
175             case '5': case '6': case '7': case '8':
176             case '9': case ':': case ';': case '<':
177             case '=': case '>': case '?': case '@':
178             case 'A': case 'B': case 'C': case 'D':
179             case 'E': case 'F': case 'G': case 'H':
180             case 'I': case 'J': case 'K': case 'L':
181             case 'M': case 'N': case 'O': case 'P':
182             case 'Q': case 'R': case 'S': case 'T':
183             case 'U': case 'V': case 'W': case 'X':
184             case 'Y': case 'Z': case '[': case '\\':
185             case ']': case '^': case '_': case '`':
186             case 'a': case 'b': case 'c': case 'd':
187             case 'e': case 'f': case 'g': case 'h':
188             case 'i': case 'j': case 'k': case 'l':
189             case 'm': case 'n': case 'o': case 'p':
190             case 'q': case 'r': case 's': case 't':
191             case 'u': case 'v': case 'w': case 'x':
192             case 'y': case 'z': case '{': case '|':
193             case '}': case '~':
194             {
195                 mSTUFF(false);
196                 break;
197             }
198             case '#':
199             {
200                 mAST_ITEM(false);
201                 break;
202             }
203             case '$':
204             {
205                 mTEXT_ITEM(false);
206                 break;
207             }
208             default:
209             {
210                 if ( _cnt3>=1 ) { break _loop3; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
211             }
212             }
213             _cnt3++;
214         } while (true);
215         }
216         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
217             _token = makeToken(_ttype);
218             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
219         }
220         _returnToken = _token;
221     }
222
223     protected final void mSTUFF(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
224         int _ttype; Token _token=null; int _begin=text.length();
225         _ttype = STUFF;
226         int _saveIndex;
227
228         switch ( LA(1)) {
229         case '"':
230         {
231             mSTRING(false);
232             break;
233         }
234         case '\'':
235         {
236             mCHAR(false);
237             break;
238         }
239         case '\n':
240         {
241             match('\n');
242             newline();
243             break;
244         }
245         case '\u0003': case '\u0004': case '\u0005': case '\u0006':
246         case '\u0007': case '\u0008': case '\t': case '\u000b':
247         case '\u000c': case '\u000e': case '\u000f': case '\u0010':
248         case '\u0011': case '\u0012': case '\u0013': case '\u0014':
249         case '\u0015': case '\u0016': case '\u0017': case '\u0018':
250         case '\u0019': case '\u001a': case '\u001b': case '\u001c':
251         case '\u001d': case '\u001e': case '\u001f': case ' ':
252         case '!': case '%': case '&': case '(':
253         case ')': case '*': case '+': case ',':
254         case '-': case '.': case '0': case '1':
255         case '2': case '3': case '4': case '5':
256         case '6': case '7': case '8': case '9':
257         case ':': case ';': case '<': case '=':
258         case '>': case '?': case '@': case 'A':
259         case 'B': case 'C': case 'D': case 'E':
260         case 'F': case 'G': case 'H': case 'I':
261         case 'J': case 'K': case 'L': case 'M':
262         case 'N': case 'O': case 'P': case 'Q':
263         case 'R': case 'S': case 'T': case 'U':
264         case 'V': case 'W': case 'X': case 'Y':
265         case 'Z': case '[': case '\\': case ']':
266         case '^': case '_': case '`': case 'a':
267         case 'b': case 'c': case 'd': case 'e':
268         case 'f': case 'g': case 'h': case 'i':
269         case 'j': case 'k': case 'l': case 'm':
270         case 'n': case 'o': case 'p': case 'q':
271         case 'r': case 's': case 't': case 'u':
272         case 'v': case 'w': case 'x': case 'y':
273         case 'z': case '{': case '|': case '}':
274         case '~':
275         {
276             {
277             match(_tokenSet_0);
278             }
279             break;
280         }
281         default:
282             if ((LA(1)=='/') && (LA(2)=='*'||LA(2)=='/')) {
283                 mCOMMENT(false);
284             }
285             else if ((LA(1)=='\r') && (LA(2)=='\n')) {
286                 match("\r\n");
287                 newline();
288             }
289             else if ((LA(1)=='/') && (_tokenSet_1.member(LA(2)))) {
290                 match('/');
291                 {
292                 match(_tokenSet_1);
293                 }
294             }
295             else if ((LA(1)=='\r') && (true)) {
296                 match('\r');
297                 newline();
298             }
299         else {
300             throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
301         }
302         }
303         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
304             _token = makeToken(_ttype);
305             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
306         }
307         _returnToken = _token;
308     }
309
310     protected final void mAST_ITEM(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
311         int _ttype; Token _token=null; int _begin=text.length();
312         _ttype = AST_ITEM;
313         int _saveIndex;
314         Token t=null;
315         Token id=null;
316         Token ctor=null;
317
318         if ((LA(1)=='#') && (LA(2)=='(')) {
319             _saveIndex=text.length();
320             match('#');
321             text.setLength(_saveIndex);
322             mTREE(true);
323             t=_returnToken;
324         }
325         else if ((LA(1)=='#') && (_tokenSet_2.member(LA(2)))) {
326             _saveIndex=text.length();
327             match('#');
328             text.setLength(_saveIndex);
329             mID(true);
330             id=_returnToken;
331
332                     String JavaDoc idt = id.getText();
333                     text.setLength(_begin); text.append(generator.mapTreeId(idt,transInfo));
334
335             {
336             if ((_tokenSet_3.member(LA(1))) && (true)) {
337                 mWS(false);
338             }
339             else {
340             }
341
342             }
343             {
344             if ((LA(1)=='=') && (true)) {
345                 mVAR_ASSIGN(false);
346             }
347             else {
348             }
349
350             }
351         }
352         else if ((LA(1)=='#') && (LA(2)=='[')) {
353             _saveIndex=text.length();
354             match('#');
355             text.setLength(_saveIndex);
356             mAST_CONSTRUCTOR(true);
357             ctor=_returnToken;
358         }
359         else if ((LA(1)=='#') && (LA(2)=='#')) {
360             match("##");
361
362                     String JavaDoc r=currentRule.getRuleName()+"_AST"; text.setLength(_begin); text.append(r);
363                     if ( transInfo!=null ) {
364                         transInfo.refRuleRoot=r; // we ref root of tree
365
}
366
367             {
368             if ((_tokenSet_3.member(LA(1))) && (true)) {
369                 mWS(false);
370             }
371             else {
372             }
373
374             }
375             {
376             if ((LA(1)=='=') && (true)) {
377                 mVAR_ASSIGN(false);
378             }
379             else {
380             }
381
382             }
383         }
384         else {
385             throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
386         }
387
388         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
389             _token = makeToken(_ttype);
390             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
391         }
392         _returnToken = _token;
393     }
394
395     protected final void mTEXT_ITEM(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
396         int _ttype; Token _token=null; int _begin=text.length();
397         _ttype = TEXT_ITEM;
398         int _saveIndex;
399         Token a1=null;
400         Token a2=null;
401         Token a3=null;
402         Token a4=null;
403
404         if ((LA(1)=='$') && (LA(2)=='a')) {
405             match("$append");
406             {
407             switch ( LA(1)) {
408             case '\t': case '\n': case '\r': case ' ':
409             {
410                 mWS(false);
411                 break;
412             }
413             case '(':
414             {
415                 break;
416             }
417             default:
418             {
419                 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
420             }
421             }
422             }
423             match('(');
424             mTEXT_ARG(true);
425             a1=_returnToken;
426             match(')');
427
428                         String JavaDoc t = "text.append("+a1.getText()+")";
429                         text.setLength(_begin); text.append(t);
430
431         }
432         else if ((LA(1)=='$') && (LA(2)=='s')) {
433             match("$set");
434             {
435             if ((LA(1)=='T') && (LA(2)=='e')) {
436                 match("Text");
437                 {
438                 switch ( LA(1)) {
439                 case '\t': case '\n': case '\r': case ' ':
440                 {
441                     mWS(false);
442                     break;
443                 }
444                 case '(':
445                 {
446                     break;
447                 }
448                 default:
449                 {
450                     throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
451                 }
452                 }
453                 }
454                 match('(');
455                 mTEXT_ARG(true);
456                 a2=_returnToken;
457                 match(')');
458
459                             String JavaDoc t;
460                             t = "text.setLength(_begin); text.append("+a2.getText()+")";
461                             text.setLength(_begin); text.append(t);
462
463             }
464             else if ((LA(1)=='T') && (LA(2)=='o')) {
465                 match("Token");
466                 {
467                 switch ( LA(1)) {
468                 case '\t': case '\n': case '\r': case ' ':
469                 {
470                     mWS(false);
471                     break;
472                 }
473                 case '(':
474                 {
475                     break;
476                 }
477                 default:
478                 {
479                     throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
480                 }
481                 }
482                 }
483                 match('(');
484                 mTEXT_ARG(true);
485                 a3=_returnToken;
486                 match(')');
487
488                             String JavaDoc t="_token = "+a3.getText();
489                             text.setLength(_begin); text.append(t);
490
491             }
492             else if ((LA(1)=='T') && (LA(2)=='y')) {
493                 match("Type");
494                 {
495                 switch ( LA(1)) {
496                 case '\t': case '\n': case '\r': case ' ':
497                 {
498                     mWS(false);
499                     break;
500                 }
501                 case '(':
502                 {
503                     break;
504                 }
505                 default:
506                 {
507                     throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
508                 }
509                 }
510                 }
511                 match('(');
512                 mTEXT_ARG(true);
513                 a4=_returnToken;
514                 match(')');
515
516                             String JavaDoc t="_ttype = "+a4.getText();
517                             text.setLength(_begin); text.append(t);
518
519             }
520             else {
521                 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
522             }
523
524             }
525         }
526         else if ((LA(1)=='$') && (LA(2)=='g')) {
527             match("$getText");
528
529                         text.setLength(_begin); text.append("new String(text.getBuffer(),_begin,text.length()-_begin)");
530
531         }
532         else if ((LA(1)=='$') && (LA(2)=='F')) {
533             match("$FOLLOW");
534
535                         if (transInfo!=null && transInfo.lookaheadSetName!=null)
536                         {
537                             text.setLength(_begin); text.append(transInfo.lookaheadSetName);
538                         }
539                         else
540                         {
541                             //spit out error message
542
reportError("\"$FOLLOW\" not valid in this context");
543                         }
544
545         }
546         else {
547             throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
548         }
549
550         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
551             _token = makeToken(_ttype);
552             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
553         }
554         _returnToken = _token;
555     }
556
557     protected final void mCOMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
558         int _ttype; Token _token=null; int _begin=text.length();
559         _ttype = COMMENT;
560         int _saveIndex;
561
562         if ((LA(1)=='/') && (LA(2)=='/')) {
563             mSL_COMMENT(false);
564         }
565         else if ((LA(1)=='/') && (LA(2)=='*')) {
566             mML_COMMENT(false);
567         }
568         else {
569             throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
570         }
571
572         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
573             _token = makeToken(_ttype);
574             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
575         }
576         _returnToken = _token;
577     }
578
579     protected final void mSTRING(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
580         int _ttype; Token _token=null; int _begin=text.length();
581         _ttype = STRING;
582         int _saveIndex;
583
584         match('"');
585         {
586         _loop92:
587         do {
588             switch ( LA(1)) {
589             case '\\':
590             {
591                 mESC(false);
592                 break;
593             }
594             case '\u0003': case '\u0004': case '\u0005': case '\u0006':
595             case '\u0007': case '\u0008': case '\t': case '\n':
596             case '\u000b': case '\u000c': case '\r': case '\u000e':
597             case '\u000f': case '\u0010': case '\u0011': case '\u0012':
598             case '\u0013': case '\u0014': case '\u0015': case '\u0016':
599             case '\u0017': case '\u0018': case '\u0019': case '\u001a':
600             case '\u001b': case '\u001c': case '\u001d': case '\u001e':
601             case '\u001f': case ' ': case '!': case '#':
602             case '$': case '%': case '&': case '\'':
603             case '(': case ')': case '*': case '+':
604             case ',': case '-': case '.': case '/':
605             case '0': case '1': case '2': case '3':
606             case '4': case '5': case '6': case '7':
607             case '8': case '9': case ':': case ';':
608             case '<': case '=': case '>': case '?':
609             case '@': case 'A': case 'B': case 'C':
610             case 'D': case 'E': case 'F': case 'G':
611             case 'H': case 'I': case 'J': case 'K':
612             case 'L': case 'M': case 'N': case 'O':
613             case 'P': case 'Q': case 'R': case 'S':
614             case 'T': case 'U': case 'V': case 'W':
615             case 'X': case 'Y': case 'Z': case '[':
616             case ']': case '^': case '_': case '`':
617             case 'a': case 'b': case 'c': case 'd':
618             case 'e': case 'f': case 'g': case 'h':
619             case 'i': case 'j': case 'k': case 'l':
620             case 'm': case 'n': case 'o': case 'p':
621             case 'q': case 'r': case 's': case 't':
622             case 'u': case 'v': case 'w': case 'x':
623             case 'y': case 'z': case '{': case '|':
624             case '}': case '~':
625             {
626                 matchNot('"');
627                 break;
628             }
629             default:
630             {
631                 break _loop92;
632             }
633             }
634         } while (true);
635         }
636         match('"');
637         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
638             _token = makeToken(_ttype);
639             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
640         }
641         _returnToken = _token;
642     }
643
644     protected final void mCHAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
645         int _ttype; Token _token=null; int _begin=text.length();
646         _ttype = CHAR;
647         int _saveIndex;
648
649         match('\'');
650         {
651         switch ( LA(1)) {
652         case '\\':
653         {
654             mESC(false);
655             break;
656         }
657         case '\u0003': case '\u0004': case '\u0005': case '\u0006':
658         case '\u0007': case '\u0008': case '\t': case '\n':
659         case '\u000b': case '\u000c': case '\r': case '\u000e':
660         case '\u000f': case '\u0010': case '\u0011': case '\u0012':
661         case '\u0013': case '\u0014': case '\u0015': case '\u0016':
662         case '\u0017': case '\u0018': case '\u0019': case '\u001a':
663         case '\u001b': case '\u001c': case '\u001d': case '\u001e':
664         case '\u001f': case ' ': case '!': case '"':
665         case '#': case '$': case '%': case '&':
666         case '(': case ')': case '*': case '+':
667         case ',': case '-': case '.': case '/':
668         case '0': case '1': case '2': case '3':
669         case '4': case '5': case '6': case '7':
670         case '8': case '9': case ':': case ';':
671         case '<': case '=': case '>': case '?':
672         case '@': case 'A': case 'B': case 'C':
673         case 'D': case 'E': case 'F': case 'G':
674         case 'H': case 'I': case 'J': case 'K':
675         case 'L': case 'M': case 'N': case 'O':
676         case 'P': case 'Q': case 'R': case 'S':
677         case 'T': case 'U': case 'V': case 'W':
678         case 'X': case 'Y': case 'Z': case '[':
679         case ']': case '^': case '_': case '`':
680         case 'a': case 'b': case 'c': case 'd':
681         case 'e': case 'f': case 'g': case 'h':
682         case 'i': case 'j': case 'k': case 'l':
683         case 'm': case 'n': case 'o': case 'p':
684         case 'q': case 'r': case 's': case 't':
685         case 'u': case 'v': case 'w': case 'x':
686         case 'y': case 'z': case '{': case '|':
687         case '}': case '~':
688         {
689             matchNot('\'');
690             break;
691         }
692         default:
693         {
694             throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
695         }
696         }
697         }
698         match('\'');
699         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
700             _token = makeToken(_ttype);
701             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
702         }
703         _returnToken = _token;
704     }
705
706     protected final void mTREE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
707         int _ttype; Token _token=null; int _begin=text.length();
708         _ttype = TREE;
709         int _saveIndex;
710         Token t=null;
711         Token t2=null;
712
713             StringBuffer JavaDoc buf = new StringBuffer JavaDoc();
714             int n=0;
715             Vector terms = new Vector(10);
716
717
718         _saveIndex=text.length();
719         match('(');
720         text.setLength(_saveIndex);
721         {
722         switch ( LA(1)) {
723         case '\t': case '\n': case '\r': case ' ':
724         {
725             _saveIndex=text.length();
726             mWS(false);
727             text.setLength(_saveIndex);
728             break;
729         }
730         case '"': case '#': case '(': case 'A':
731         case 'B': case 'C': case 'D': case 'E':
732         case 'F': case 'G': case 'H': case 'I':
733         case 'J': case 'K': case 'L': case 'M':
734         case 'N': case 'O': case 'P': case 'Q':
735         case 'R': case 'S': case 'T': case 'U':
736         case 'V': case 'W': case 'X': case 'Y':
737         case 'Z': case '[': case '_': case 'a':
738         case 'b': case 'c': case 'd': case 'e':
739         case 'f': case 'g': case 'h': case 'i':
740         case 'j': case 'k': case 'l': case 'm':
741         case 'n': case 'o': case 'p': case 'q':
742         case 'r': case 's': case 't': case 'u':
743         case 'v': case 'w': case 'x': case 'y':
744         case 'z':
745         {
746             break;
747         }
748         default:
749         {
750             throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
751         }
752         }
753         }
754         _saveIndex=text.length();
755         mTREE_ELEMENT(true);
756         text.setLength(_saveIndex);
757         t=_returnToken;
758         terms.appendElement(t.getText());
759         {
760         switch ( LA(1)) {
761         case '\t': case '\n': case '\r': case ' ':
762         {
763             _saveIndex=text.length();
764             mWS(false);
765             text.setLength(_saveIndex);
766             break;
767         }
768         case ')': case ',':
769         {
770             break;
771         }
772         default:
773         {
774             throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
775         }
776         }
777         }
778         {
779         _loop24:
780         do {
781             if ((LA(1)==',')) {
782                 _saveIndex=text.length();
783                 match(',');
784                 text.setLength(_saveIndex);
785                 {
786                 switch ( LA(1)) {
787                 case '\t': case '\n': case '\r': case ' ':
788                 {
789                     _saveIndex=text.length();
790                     mWS(false);
791                     text.setLength(_saveIndex);
792                     break;
793                 }
794                 case '"': case '#': case '(': case 'A':
795                 case 'B': case 'C': case 'D': case 'E':
796                 case 'F': case 'G': case 'H': case 'I':
797                 case 'J': case 'K': case 'L': case 'M':
798                 case 'N': case 'O': case 'P': case 'Q':
799                 case 'R': case 'S': case 'T': case 'U':
800                 case 'V': case 'W': case 'X': case 'Y':
801                 case 'Z': case '[': case '_': case 'a':
802                 case 'b': case 'c': case 'd': case 'e':
803                 case 'f': case 'g': case 'h': case 'i':
804                 case 'j': case 'k': case 'l': case 'm':
805                 case 'n': case 'o': case 'p': case 'q':
806                 case 'r': case 's': case 't': case 'u':
807                 case 'v': case 'w': case 'x': case 'y':
808                 case 'z':
809                 {
810                     break;
811                 }
812                 default:
813                 {
814                     throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
815                 }
816                 }
817                 }
818                 _saveIndex=text.length();
819                 mTREE_ELEMENT(true);
820                 text.setLength(_saveIndex);
821                 t2=_returnToken;
822                 terms.appendElement(t2.getText());
823                 {
824                 switch ( LA(1)) {
825                 case '\t': case '\n': case '\r': case ' ':
826                 {
827                     _saveIndex=text.length();
828                     mWS(false);
829                     text.setLength(_saveIndex);
830                     break;
831                 }
832                 case ')': case ',':
833                 {
834                     break;
835                 }
836                 default:
837                 {
838                     throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
839                 }
840                 }
841                 }
842             }
843             else {
844                 break _loop24;
845             }
846
847         } while (true);
848         }
849         text.setLength(_begin); text.append(generator.getASTCreateString(terms));
850         _saveIndex=text.length();
851         match(')');
852         text.setLength(_saveIndex);
853         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
854             _token = makeToken(_ttype);
855             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
856         }
857         _returnToken = _token;
858     }
859
860     protected final void mID(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
861         int _ttype; Token _token=null; int _begin=text.length();
862         _ttype = ID;
863         int _saveIndex;
864
865         {
866         switch ( LA(1)) {
867         case 'a': case 'b': case 'c': case 'd':
868         case 'e': case 'f': case 'g': case 'h':
869         case 'i': case 'j': case 'k': case 'l':
870         case 'm': case 'n': case 'o': case 'p':
871         case 'q': case 'r': case 's': case 't':
872         case 'u': case 'v': case 'w': case 'x':
873         case 'y': case 'z':
874         {
875             matchRange('a','z');
876             break;
877         }
878         case 'A': case 'B': case 'C': case 'D':
879         case 'E': case 'F': case 'G': case 'H':
880         case 'I': case 'J': case 'K': case 'L':
881         case 'M': case 'N': case 'O': case 'P':
882         case 'Q': case 'R': case 'S': case 'T':
883         case 'U': case 'V': case 'W': case 'X':
884         case 'Y': case 'Z':
885         {
886             matchRange('A','Z');
887             break;
888         }
889         case '_':
890         {
891             match('_');
892             break;
893         }
894         default:
895         {
896             throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
897         }
898         }
899         }
900         {
901         _loop78:
902         do {
903             if ((_tokenSet_4.member(LA(1))) && (true)) {
904                 {
905                 switch ( LA(1)) {
906                 case 'a': case 'b': case 'c': case 'd':
907                 case 'e': case 'f': case 'g': case 'h':
908                 case 'i': case 'j': case 'k': case 'l':
909                 case 'm': case 'n': case 'o': case 'p':
910                 case 'q': case 'r': case 's': case 't':
911                 case 'u': case 'v': case 'w': case 'x':
912                 case 'y': case 'z':
913                 {
914                     matchRange('a','z');
915                     break;
916                 }
917                 case 'A': case 'B': case 'C': case 'D':
918                 case 'E': case 'F': case 'G': case 'H':
919                 case 'I': case 'J': case 'K': case 'L':
920                 case 'M': case 'N': case 'O': case 'P':
921                 case 'Q': case 'R': case 'S': case 'T':
922                 case 'U': case 'V': case 'W': case 'X':
923                 case 'Y': case 'Z':
924                 {
925                     matchRange('A','Z');
926                     break;
927                 }
928                 case '0': case '1': case '2': case '3':
929                 case '4': case '5': case '6': case '7':
930                 case '8': case '9':
931                 {
932                     matchRange('0','9');
933                     break;
934                 }
935                 case '_':
936                 {
937                     match('_');
938                     break;
939                 }
940                 default:
941                 {
942                     throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
943                 }
944                 }
945                 }
946             }
947             else {
948                 break _loop78;
949             }
950
951         } while (true);
952         }
953         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
954             _token = makeToken(_ttype);
955             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
956         }
957         _returnToken = _token;
958     }
959
960     protected final void mWS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
961         int _ttype; Token _token=null; int _begin=text.length();
962         _ttype = WS;
963         int _saveIndex;
964
965         {
966         int _cnt112=0;
967         _loop112:
968         do {
969             if ((LA(1)=='\r') && (LA(2)=='\n')) {
970                 match('\r');
971                 match('\n');
972                 newline();
973             }
974             else if ((LA(1)==' ') && (true)) {
975                 match(' ');
976             }
977             else if ((LA(1)=='\t') && (true)) {
978                 match('\t');
979             }
980             else if ((LA(1)=='\r') && (true)) {
981                 match('\r');
982                 newline();
983             }
984             else if ((LA(1)=='\n') && (true)) {
985                 match('\n');
986                 newline();
987             }
988             else {
989                 if ( _cnt112>=1 ) { break _loop112; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
990             }
991
992             _cnt112++;
993         } while (true);
994         }
995         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
996             _token = makeToken(_ttype);
997             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
998         }
999         _returnToken = _token;
1000    }
1001
1002    protected final void mVAR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1003        int _ttype; Token _token=null; int _begin=text.length();
1004        _ttype = VAR_ASSIGN;
1005        int _saveIndex;
1006
1007        match('=');
1008
1009                // inform the code generator that an assignment was done to
1010
// AST root for the rule if invoker set refRuleRoot.
1011
if ( LA(1)!='=' && transInfo!=null && transInfo.refRuleRoot!=null ) {
1012                    transInfo.assignToRoot=true;
1013                }
1014
1015        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1016            _token = makeToken(_ttype);
1017            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1018        }
1019        _returnToken = _token;
1020    }
1021
1022    protected final void mAST_CONSTRUCTOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1023        int _ttype; Token _token=null; int _begin=text.length();
1024        _ttype = AST_CONSTRUCTOR;
1025        int _saveIndex;
1026        Token x=null;
1027        Token y=null;
1028
1029        _saveIndex=text.length();
1030        match('[');
1031        text.setLength(_saveIndex);
1032        {
1033        switch ( LA(1)) {
1034        case '\t': case '\n': case '\r': case ' ':
1035        {
1036            _saveIndex=text.length();
1037            mWS(false);
1038            text.setLength(_saveIndex);
1039            break;
1040        }
1041        case '"': case '#': case '(': case '0':
1042        case '1': case '2': case '3': case '4':
1043        case '5': case '6': case '7': case '8':
1044        case '9': case 'A': case 'B': case 'C':
1045        case 'D': case 'E': case 'F': case 'G':
1046        case 'H': case 'I': case 'J': case 'K':
1047        case 'L': case 'M': case 'N': case 'O':
1048        case 'P': case 'Q': case 'R': case 'S':
1049        case 'T': case 'U': case 'V': case 'W':
1050        case 'X': case 'Y': case 'Z': case '[':
1051        case '_': case 'a': case 'b': case 'c':
1052        case 'd': case 'e': case 'f': case 'g':
1053        case 'h': case 'i': case 'j': case 'k':
1054        case 'l': case 'm': case 'n': case 'o':
1055        case 'p': case 'q': case 'r': case 's':
1056        case 't': case 'u': case 'v': case 'w':
1057        case 'x': case 'y': case 'z':
1058        {
1059            break;
1060        }
1061        default:
1062        {
1063            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1064        }
1065        }
1066        }
1067        _saveIndex=text.length();
1068        mAST_CTOR_ELEMENT(true);
1069        text.setLength(_saveIndex);
1070        x=_returnToken;
1071        {
1072        switch ( LA(1)) {
1073        case '\t': case '\n': case '\r': case ' ':
1074        {
1075            _saveIndex=text.length();
1076            mWS(false);
1077            text.setLength(_saveIndex);
1078            break;
1079        }
1080        case ',': case ']':
1081        {
1082            break;
1083        }
1084        default:
1085        {
1086            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1087        }
1088        }
1089        }
1090        {
1091        switch ( LA(1)) {
1092        case ',':
1093        {
1094            _saveIndex=text.length();
1095            match(',');
1096            text.setLength(_saveIndex);
1097            {
1098            switch ( LA(1)) {
1099            case '\t': case '\n': case '\r': case ' ':
1100            {
1101                _saveIndex=text.length();
1102                mWS(false);
1103                text.setLength(_saveIndex);
1104                break;
1105            }
1106            case '"': case '#': case '(': case '0':
1107            case '1': case '2': case '3': case '4':
1108            case '5': case '6': case '7': case '8':
1109            case '9': case 'A': case 'B': case 'C':
1110            case 'D': case 'E': case 'F': case 'G':
1111            case 'H': case 'I': case 'J': case 'K':
1112            case 'L': case 'M': case 'N': case 'O':
1113            case 'P': case 'Q': case 'R': case 'S':
1114            case 'T': case 'U': case 'V': case 'W':
1115            case 'X': case 'Y': case 'Z': case '[':
1116            case '_': case 'a': case 'b': case 'c':
1117            case 'd': case 'e': case 'f': case 'g':
1118            case 'h': case 'i': case 'j': case 'k':
1119            case 'l': case 'm': case 'n': case 'o':
1120            case 'p': case 'q': case 'r': case 's':
1121            case 't': case 'u': case 'v': case 'w':
1122            case 'x': case 'y': case 'z':
1123            {
1124                break;
1125            }
1126            default:
1127            {
1128                throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1129            }
1130            }
1131            }
1132            _saveIndex=text.length();
1133            mAST_CTOR_ELEMENT(true);
1134            text.setLength(_saveIndex);
1135            y=_returnToken;
1136            {
1137            switch ( LA(1)) {
1138            case '\t': case '\n': case '\r': case ' ':
1139            {
1140                _saveIndex=text.length();
1141                mWS(false);
1142                text.setLength(_saveIndex);
1143                break;
1144            }
1145            case ']':
1146            {
1147                break;
1148            }
1149            default:
1150            {
1151                throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1152            }
1153            }
1154            }
1155            break;
1156        }
1157        case ']':
1158        {
1159            break;
1160        }
1161        default:
1162        {
1163            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1164        }
1165        }
1166        }
1167        _saveIndex=text.length();
1168        match(']');
1169        text.setLength(_saveIndex);
1170
1171                String JavaDoc ys = "";
1172                if ( y!=null ) {
1173                    ys = ","+y.getText();
1174                }
1175                text.setLength(_begin); text.append(generator.getASTCreateString(null,x.getText()+ys));
1176
1177        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1178            _token = makeToken(_ttype);
1179            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1180        }
1181        _returnToken = _token;
1182    }
1183
1184    protected final void mTEXT_ARG(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1185        int _ttype; Token _token=null; int _begin=text.length();
1186        _ttype = TEXT_ARG;
1187        int _saveIndex;
1188
1189        {
1190        switch ( LA(1)) {
1191        case '\t': case '\n': case '\r': case ' ':
1192        {
1193            mWS(false);
1194            break;
1195        }
1196        case '"': case '$': case '\'': case '+':
1197        case '0': case '1': case '2': case '3':
1198        case '4': case '5': case '6': case '7':
1199        case '8': case '9': case 'A': case 'B':
1200        case 'C': case 'D': case 'E': case 'F':
1201        case 'G': case 'H': case 'I': case 'J':
1202        case 'K': case 'L': case 'M': case 'N':
1203        case 'O': case 'P': case 'Q': case 'R':
1204        case 'S': case 'T': case 'U': case 'V':
1205        case 'W': case 'X': case 'Y': case 'Z':
1206        case '_': case 'a': case 'b': case 'c':
1207        case 'd': case 'e': case 'f': case 'g':
1208        case 'h': case 'i': case 'j': case 'k':
1209        case 'l': case 'm': case 'n': case 'o':
1210        case 'p': case 'q': case 'r': case 's':
1211        case 't': case 'u': case 'v': case 'w':
1212        case 'x': case 'y': case 'z':
1213        {
1214            break;
1215        }
1216        default:
1217        {
1218            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1219        }
1220        }
1221        }
1222        {
1223        int _cnt52=0;
1224        _loop52:
1225        do {
1226            if ((_tokenSet_5.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '~'))) {
1227                mTEXT_ARG_ELEMENT(false);
1228                {
1229                if ((_tokenSet_3.member(LA(1))) && (_tokenSet_6.member(LA(2)))) {
1230                    mWS(false);
1231                }
1232                else if ((_tokenSet_6.member(LA(1))) && (true)) {
1233                }
1234                else {
1235                    throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1236                }
1237
1238                }
1239            }
1240            else {
1241                if ( _cnt52>=1 ) { break _loop52; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
1242            }
1243
1244            _cnt52++;
1245        } while (true);
1246        }
1247        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1248            _token = makeToken(_ttype);
1249            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1250        }
1251        _returnToken = _token;
1252    }
1253
1254    protected final void mTREE_ELEMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1255        int _ttype; Token _token=null; int _begin=text.length();
1256        _ttype = TREE_ELEMENT;
1257        int _saveIndex;
1258        Token id=null;
1259        boolean was_mapped;
1260
1261        switch ( LA(1)) {
1262        case '(':
1263        {
1264            mTREE(false);
1265            break;
1266        }
1267        case '[':
1268        {
1269            mAST_CONSTRUCTOR(false);
1270            break;
1271        }
1272        case 'A': case 'B': case 'C': case 'D':
1273        case 'E': case 'F': case 'G': case 'H':
1274        case 'I': case 'J': case 'K': case 'L':
1275        case 'M': case 'N': case 'O': case 'P':
1276        case 'Q': case 'R': case 'S': case 'T':
1277        case 'U': case 'V': case 'W': case 'X':
1278        case 'Y': case 'Z': case '_': case 'a':
1279        case 'b': case 'c': case 'd': case 'e':
1280        case 'f': case 'g': case 'h': case 'i':
1281        case 'j': case 'k': case 'l': case 'm':
1282        case 'n': case 'o': case 'p': case 'q':
1283        case 'r': case 's': case 't': case 'u':
1284        case 'v': case 'w': case 'x': case 'y':
1285        case 'z':
1286        {
1287            mID_ELEMENT(false);
1288            break;
1289        }
1290        case '"':
1291        {
1292            mSTRING(false);
1293            break;
1294        }
1295        default:
1296            if ((LA(1)=='#') && (LA(2)=='(')) {
1297                _saveIndex=text.length();
1298                match('#');
1299                text.setLength(_saveIndex);
1300                mTREE(false);
1301            }
1302            else if ((LA(1)=='#') && (LA(2)=='[')) {
1303                _saveIndex=text.length();
1304                match('#');
1305                text.setLength(_saveIndex);
1306                mAST_CONSTRUCTOR(false);
1307            }
1308            else if ((LA(1)=='#') && (_tokenSet_2.member(LA(2)))) {
1309                _saveIndex=text.length();
1310                match('#');
1311                text.setLength(_saveIndex);
1312                was_mapped=mID_ELEMENT(true);
1313                id=_returnToken;
1314                    // RK: I have a queer feeling that this maptreeid is redundant
1315
if( ! was_mapped )
1316                            {
1317                                String JavaDoc t = generator.mapTreeId(id.getText(), null);
1318                                text.setLength(_begin); text.append(t);
1319                            }
1320
1321            }
1322            else if ((LA(1)=='#') && (LA(2)=='#')) {
1323                match("##");
1324                String JavaDoc t = currentRule.getRuleName()+"_AST"; text.setLength(_begin); text.append(t);
1325            }
1326        else {
1327            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1328        }
1329        }
1330        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1331            _token = makeToken(_ttype);
1332            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1333        }
1334        _returnToken = _token;
1335    }
1336
1337/** An ID_ELEMENT can be a func call, array ref, simple var,
1338 * or AST label ref.
1339 */

1340    protected final boolean mID_ELEMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1341        boolean mapped=false;
1342        int _ttype; Token _token=null; int _begin=text.length();
1343        _ttype = ID_ELEMENT;
1344        int _saveIndex;
1345        Token id=null;
1346
1347        mID(true);
1348        id=_returnToken;
1349        {
1350        if ((_tokenSet_3.member(LA(1))) && (_tokenSet_7.member(LA(2)))) {
1351            _saveIndex=text.length();
1352            mWS(false);
1353            text.setLength(_saveIndex);
1354        }
1355        else if ((_tokenSet_7.member(LA(1))) && (true)) {
1356        }
1357        else {
1358            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1359        }
1360
1361        }
1362        {
1363        switch ( LA(1)) {
1364        case '(':
1365        {
1366            match('(');
1367            {
1368            if ((_tokenSet_3.member(LA(1))) && (_tokenSet_8.member(LA(2)))) {
1369                _saveIndex=text.length();
1370                mWS(false);
1371                text.setLength(_saveIndex);
1372            }
1373            else if ((_tokenSet_8.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '~'))) {
1374            }
1375            else {
1376                throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1377            }
1378
1379            }
1380            {
1381            switch ( LA(1)) {
1382            case '"': case '#': case '\'': case '(':
1383            case '0': case '1': case '2': case '3':
1384            case '4': case '5': case '6': case '7':
1385            case '8': case '9': case 'A': case 'B':
1386            case 'C': case 'D': case 'E': case 'F':
1387            case 'G': case 'H': case 'I': case 'J':
1388            case 'K': case 'L': case 'M': case 'N':
1389            case 'O': case 'P': case 'Q': case 'R':
1390            case 'S': case 'T': case 'U': case 'V':
1391            case 'W': case 'X': case 'Y': case 'Z':
1392            case '[': case '_': case 'a': case 'b':
1393            case 'c': case 'd': case 'e': case 'f':
1394            case 'g': case 'h': case 'i': case 'j':
1395            case 'k': case 'l': case 'm': case 'n':
1396            case 'o': case 'p': case 'q': case 'r':
1397            case 's': case 't': case 'u': case 'v':
1398            case 'w': case 'x': case 'y': case 'z':
1399            {
1400                mARG(false);
1401                {
1402                _loop40:
1403                do {
1404                    if ((LA(1)==',')) {
1405                        match(',');
1406                        {
1407                        switch ( LA(1)) {
1408                        case '\t': case '\n': case '\r': case ' ':
1409                        {
1410                            _saveIndex=text.length();
1411                            mWS(false);
1412                            text.setLength(_saveIndex);
1413                            break;
1414                        }
1415                        case '"': case '#': case '\'': case '(':
1416                        case '0': case '1': case '2': case '3':
1417                        case '4': case '5': case '6': case '7':
1418                        case '8': case '9': case 'A': case 'B':
1419                        case 'C': case 'D': case 'E': case 'F':
1420                        case 'G': case 'H': case 'I': case 'J':
1421                        case 'K': case 'L': case 'M': case 'N':
1422                        case 'O': case 'P': case 'Q': case 'R':
1423                        case 'S': case 'T': case 'U': case 'V':
1424                        case 'W': case 'X': case 'Y': case 'Z':
1425                        case '[': case '_': case 'a': case 'b':
1426                        case 'c': case 'd': case 'e': case 'f':
1427                        case 'g': case 'h': case 'i': case 'j':
1428                        case 'k': case 'l': case 'm': case 'n':
1429                        case 'o': case 'p': case 'q': case 'r':
1430                        case 's': case 't': case 'u': case 'v':
1431                        case 'w': case 'x': case 'y': case 'z':
1432                        {
1433                            break;
1434                        }
1435                        default:
1436                        {
1437                            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1438                        }
1439                        }
1440                        }
1441                        mARG(false);
1442                    }
1443                    else {
1444                        break _loop40;
1445                    }
1446
1447                } while (true);
1448                }
1449                break;
1450            }
1451            case '\t': case '\n': case '\r': case ' ':
1452            case ')':
1453            {
1454                break;
1455            }
1456            default:
1457            {
1458                throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1459            }
1460            }
1461            }
1462            {
1463            switch ( LA(1)) {
1464            case '\t': case '\n': case '\r': case ' ':
1465            {
1466                _saveIndex=text.length();
1467                mWS(false);
1468                text.setLength(_saveIndex);
1469                break;
1470            }
1471            case ')':
1472            {
1473                break;
1474            }
1475            default:
1476            {
1477                throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1478            }
1479            }
1480            }
1481            match(')');
1482            break;
1483        }
1484        case '[':
1485        {
1486            {
1487            int _cnt45=0;
1488            _loop45:
1489            do {
1490                if ((LA(1)=='[')) {
1491                    match('[');
1492                    {
1493                    switch ( LA(1)) {
1494                    case '\t': case '\n': case '\r': case ' ':
1495                    {
1496                        _saveIndex=text.length();
1497                        mWS(false);
1498                        text.setLength(_saveIndex);
1499                        break;
1500                    }
1501                    case '"': case '#': case '\'': case '(':
1502                    case '0': case '1': case '2': case '3':
1503                    case '4': case '5': case '6': case '7':
1504                    case '8': case '9': case 'A': case 'B':
1505                    case 'C': case 'D': case 'E': case 'F':
1506                    case 'G': case 'H': case 'I': case 'J':
1507                    case 'K': case 'L': case 'M': case 'N':
1508                    case 'O': case 'P': case 'Q': case 'R':
1509                    case 'S': case 'T': case 'U': case 'V':
1510                    case 'W': case 'X': case 'Y': case 'Z':
1511                    case '[': case '_': case 'a': case 'b':
1512                    case 'c': case 'd': case 'e': case 'f':
1513                    case 'g': case 'h': case 'i': case 'j':
1514                    case 'k': case 'l': case 'm': case 'n':
1515                    case 'o': case 'p': case 'q': case 'r':
1516                    case 's': case 't': case 'u': case 'v':
1517                    case 'w': case 'x': case 'y': case 'z':
1518                    {
1519                        break;
1520                    }
1521                    default:
1522                    {
1523                        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1524                    }
1525                    }
1526                    }
1527                    mARG(false);
1528                    {
1529                    switch ( LA(1)) {
1530                    case '\t': case '\n': case '\r': case ' ':
1531                    {
1532                        _saveIndex=text.length();
1533                        mWS(false);
1534                        text.setLength(_saveIndex);
1535                        break;
1536                    }
1537                    case ']':
1538                    {
1539                        break;
1540                    }
1541                    default:
1542                    {
1543                        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1544                    }
1545                    }
1546                    }
1547                    match(']');
1548                }
1549                else {
1550                    if ( _cnt45>=1 ) { break _loop45; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
1551                }
1552
1553                _cnt45++;
1554            } while (true);
1555            }
1556            break;
1557        }
1558        case '.':
1559        {
1560            match('.');
1561            mID_ELEMENT(false);
1562            break;
1563        }
1564        case '\t': case '\n': case '\r': case ' ':
1565        case ')': case '*': case '+': case ',':
1566        case '-': case '/': case '=': case ']':
1567        {
1568
1569                            mapped = true;
1570                            String JavaDoc t = generator.mapTreeId(id.getText(), transInfo);
1571                            text.setLength(_begin); text.append(t);
1572
1573            {
1574            if (((_tokenSet_9.member(LA(1))) && (_tokenSet_10.member(LA(2))))&&(transInfo!=null && transInfo.refRuleRoot!=null)) {
1575                {
1576                switch ( LA(1)) {
1577                case '\t': case '\n': case '\r': case ' ':
1578                {
1579                    mWS(false);
1580                    break;
1581                }
1582                case '=':
1583                {
1584                    break;
1585                }
1586                default:
1587                {
1588                    throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1589                }
1590                }
1591                }
1592                mVAR_ASSIGN(false);
1593            }
1594            else if ((_tokenSet_11.member(LA(1))) && (true)) {
1595            }
1596            else {
1597                throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1598            }
1599
1600            }
1601            break;
1602        }
1603        default:
1604        {
1605            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1606        }
1607        }
1608        }
1609        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1610            _token = makeToken(_ttype);
1611            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1612        }
1613        _returnToken = _token;
1614        return mapped;
1615    }
1616
1617/** The arguments of a #[...] constructor are text, token type,
1618 * or a tree.
1619 */

1620    protected final void mAST_CTOR_ELEMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1621        int _ttype; Token _token=null; int _begin=text.length();
1622        _ttype = AST_CTOR_ELEMENT;
1623        int _saveIndex;
1624
1625        if ((LA(1)=='"') && ((LA(2) >= '\u0003' && LA(2) <= '~'))) {
1626            mSTRING(false);
1627        }
1628        else if ((_tokenSet_12.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '~'))) {
1629            mTREE_ELEMENT(false);
1630        }
1631        else if (((LA(1) >= '0' && LA(1) <= '9'))) {
1632            mINT(false);
1633        }
1634        else {
1635            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1636        }
1637
1638        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1639            _token = makeToken(_ttype);
1640            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1641        }
1642        _returnToken = _token;
1643    }
1644
1645    protected final void mINT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1646        int _ttype; Token _token=null; int _begin=text.length();
1647        _ttype = INT;
1648        int _saveIndex;
1649
1650        {
1651        int _cnt103=0;
1652        _loop103:
1653        do {
1654            if (((LA(1) >= '0' && LA(1) <= '9'))) {
1655                mDIGIT(false);
1656            }
1657            else {
1658                if ( _cnt103>=1 ) { break _loop103; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
1659            }
1660
1661            _cnt103++;
1662        } while (true);
1663        }
1664        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1665            _token = makeToken(_ttype);
1666            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1667        }
1668        _returnToken = _token;
1669    }
1670
1671    protected final void mARG(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1672        int _ttype; Token _token=null; int _begin=text.length();
1673        _ttype = ARG;
1674        int _saveIndex;
1675
1676        {
1677        switch ( LA(1)) {
1678        case '\'':
1679        {
1680            mCHAR(false);
1681            break;
1682        }
1683        case '0': case '1': case '2': case '3':
1684        case '4': case '5': case '6': case '7':
1685        case '8': case '9':
1686        {
1687            mINT_OR_FLOAT(false);
1688            break;
1689        }
1690        default:
1691            if ((_tokenSet_12.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '~'))) {
1692                mTREE_ELEMENT(false);
1693            }
1694            else if ((LA(1)=='"') && ((LA(2) >= '\u0003' && LA(2) <= '~'))) {
1695                mSTRING(false);
1696            }
1697        else {
1698            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1699        }
1700        }
1701        }
1702        {
1703        _loop73:
1704        do {
1705            if ((_tokenSet_13.member(LA(1))) && (_tokenSet_14.member(LA(2)))) {
1706                {
1707                switch ( LA(1)) {
1708                case '\t': case '\n': case '\r': case ' ':
1709                {
1710                    mWS(false);
1711                    break;
1712                }
1713                case '*': case '+': case '-': case '/':
1714                {
1715                    break;
1716                }
1717                default:
1718                {
1719                    throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1720                }
1721                }
1722                }
1723                {
1724                switch ( LA(1)) {
1725                case '+':
1726                {
1727                    match('+');
1728                    break;
1729                }
1730                case '-':
1731                {
1732                    match('-');
1733                    break;
1734                }
1735                case '*':
1736                {
1737                    match('*');
1738                    break;
1739                }
1740                case '/':
1741                {
1742                    match('/');
1743                    break;
1744                }
1745                default:
1746                {
1747                    throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1748                }
1749                }
1750                }
1751                {
1752                switch ( LA(1)) {
1753                case '\t': case '\n': case '\r': case ' ':
1754                {
1755                    mWS(false);
1756                    break;
1757                }
1758                case '"': case '#': case '\'': case '(':
1759                case '0': case '1': case '2': case '3':
1760                case '4': case '5': case '6': case '7':
1761                case '8': case '9': case 'A': case 'B':
1762                case 'C': case 'D': case 'E': case 'F':
1763                case 'G': case 'H': case 'I': case 'J':
1764                case 'K': case 'L': case 'M': case 'N':
1765                case 'O': case 'P': case 'Q': case 'R':
1766                case 'S': case 'T': case 'U': case 'V':
1767                case 'W': case 'X': case 'Y': case 'Z':
1768                case '[': case '_': case 'a': case 'b':
1769                case 'c': case 'd': case 'e': case 'f':
1770                case 'g': case 'h': case 'i': case 'j':
1771                case 'k': case 'l': case 'm': case 'n':
1772                case 'o': case 'p': case 'q': case 'r':
1773                case 's': case 't': case 'u': case 'v':
1774                case 'w': case 'x': case 'y': case 'z':
1775                {
1776                    break;
1777                }
1778                default:
1779                {
1780                    throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1781                }
1782                }
1783                }
1784                mARG(false);
1785            }
1786            else {
1787                break _loop73;
1788            }
1789
1790        } while (true);
1791        }
1792        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1793            _token = makeToken(_ttype);
1794            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1795        }
1796        _returnToken = _token;
1797    }
1798
1799    protected final void mTEXT_ARG_ELEMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1800        int _ttype; Token _token=null; int _begin=text.length();
1801        _ttype = TEXT_ARG_ELEMENT;
1802        int _saveIndex;
1803
1804        switch ( LA(1)) {
1805        case 'A': case 'B': case 'C': case 'D':
1806        case 'E': case 'F': case 'G': case 'H':
1807        case 'I': case 'J': case 'K': case 'L':
1808        case 'M': case 'N': case 'O': case 'P':
1809        case 'Q': case 'R': case 'S': case 'T':
1810        case 'U': case 'V': case 'W': case 'X':
1811        case 'Y': case 'Z': case '_': case 'a':
1812        case 'b': case 'c': case 'd': case 'e':
1813        case 'f': case 'g': case 'h': case 'i':
1814        case 'j': case 'k': case 'l': case 'm':
1815        case 'n': case 'o': case 'p': case 'q':
1816        case 'r': case 's': case 't': case 'u':
1817        case 'v': case 'w': case 'x': case 'y':
1818        case 'z':
1819        {
1820            mTEXT_ARG_ID_ELEMENT(false);
1821            break;
1822        }
1823        case '"':
1824        {
1825            mSTRING(false);
1826            break;
1827        }
1828        case '\'':
1829        {
1830            mCHAR(false);
1831            break;
1832        }
1833        case '0': case '1': case '2': case '3':
1834        case '4': case '5': case '6': case '7':
1835        case '8': case '9':
1836        {
1837            mINT_OR_FLOAT(false);
1838            break;
1839        }
1840        case '$':
1841        {
1842            mTEXT_ITEM(false);
1843            break;
1844        }
1845        case '+':
1846        {
1847            match('+');
1848            break;
1849        }
1850        default:
1851        {
1852            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1853        }
1854        }
1855        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1856            _token = makeToken(_ttype);
1857            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1858        }
1859        _returnToken = _token;
1860    }
1861
1862    protected final void mTEXT_ARG_ID_ELEMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1863        int _ttype; Token _token=null; int _begin=text.length();
1864        _ttype = TEXT_ARG_ID_ELEMENT;
1865        int _saveIndex;
1866        Token id=null;
1867
1868        mID(true);
1869        id=_returnToken;
1870        {
1871        if ((_tokenSet_3.member(LA(1))) && (_tokenSet_15.member(LA(2)))) {
1872            _saveIndex=text.length();
1873            mWS(false);
1874            text.setLength(_saveIndex);
1875        }
1876        else if ((_tokenSet_15.member(LA(1))) && (true)) {
1877        }
1878        else {
1879            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1880        }
1881
1882        }
1883        {
1884        switch ( LA(1)) {
1885        case '(':
1886        {
1887            match('(');
1888            {
1889            if ((_tokenSet_3.member(LA(1))) && (_tokenSet_16.member(LA(2)))) {
1890                _saveIndex=text.length();
1891                mWS(false);
1892                text.setLength(_saveIndex);
1893            }
1894            else if ((_tokenSet_16.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '~'))) {
1895            }
1896            else {
1897                throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1898            }
1899
1900            }
1901            {
1902            _loop61:
1903            do {
1904                if ((_tokenSet_17.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '~'))) {
1905                    mTEXT_ARG(false);
1906                    {
1907                    _loop60:
1908                    do {
1909                        if ((LA(1)==',')) {
1910                            match(',');
1911                            mTEXT_ARG(false);
1912                        }
1913                        else {
1914                            break _loop60;
1915                        }
1916
1917                    } while (true);
1918                    }
1919                }
1920                else {
1921                    break _loop61;
1922                }
1923
1924            } while (true);
1925            }
1926            {
1927            switch ( LA(1)) {
1928            case '\t': case '\n': case '\r': case ' ':
1929            {
1930                _saveIndex=text.length();
1931                mWS(false);
1932                text.setLength(_saveIndex);
1933                break;
1934            }
1935            case ')':
1936            {
1937                break;
1938            }
1939            default:
1940            {
1941                throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1942            }
1943            }
1944            }
1945            match(')');
1946            break;
1947        }
1948        case '[':
1949        {
1950            {
1951            int _cnt66=0;
1952            _loop66:
1953            do {
1954                if ((LA(1)=='[')) {
1955                    match('[');
1956                    {
1957                    if ((_tokenSet_3.member(LA(1))) && (_tokenSet_17.member(LA(2)))) {
1958                        _saveIndex=text.length();
1959                        mWS(false);
1960                        text.setLength(_saveIndex);
1961                    }
1962                    else if ((_tokenSet_17.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '~'))) {
1963                    }
1964                    else {
1965                        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1966                    }
1967
1968                    }
1969                    mTEXT_ARG(false);
1970                    {
1971                    switch ( LA(1)) {
1972                    case '\t': case '\n': case '\r': case ' ':
1973                    {
1974                        _saveIndex=text.length();
1975                        mWS(false);
1976                        text.setLength(_saveIndex);
1977                        break;
1978                    }
1979                    case ']':
1980                    {
1981                        break;
1982                    }
1983                    default:
1984                    {
1985                        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1986                    }
1987                    }
1988                    }
1989                    match(']');
1990                }
1991                else {
1992                    if ( _cnt66>=1 ) { break _loop66; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
1993                }
1994
1995                _cnt66++;
1996            } while (true);
1997            }
1998            break;
1999        }
2000        case '.':
2001        {
2002            match('.');
2003            mTEXT_ARG_ID_ELEMENT(false);
2004            break;
2005        }
2006        case '\t': case '\n': case '\r': case ' ':
2007        case '"': case '$': case '\'': case ')':
2008        case '+': case ',': case '0': case '1':
2009        case '2': case '3': case '4': case '5':
2010        case '6': case '7': case '8': case '9':
2011        case 'A': case 'B': case 'C': case 'D':
2012        case 'E': case 'F': case 'G': case 'H':
2013        case 'I': case 'J': case 'K': case 'L':
2014        case 'M': case 'N': case 'O': case 'P':
2015        case 'Q': case 'R': case 'S': case 'T':
2016        case 'U': case 'V': case 'W': case 'X':
2017        case 'Y': case 'Z': case ']': case '_':
2018        case 'a': case 'b': case 'c': case 'd':
2019        case 'e': case 'f': case 'g': case 'h':
2020        case 'i': case 'j': case 'k': case 'l':
2021        case 'm': case 'n': case 'o': case 'p':
2022        case 'q': case 'r': case 's': case 't':
2023        case 'u': case 'v': case 'w': case 'x':
2024        case 'y': case 'z':
2025        {
2026            break;
2027        }
2028        default:
2029        {
2030            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2031        }
2032        }
2033        }
2034        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2035            _token = makeToken(_ttype);
2036            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
2037        }
2038        _returnToken = _token;
2039    }
2040
2041    protected final void mINT_OR_FLOAT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2042        int _ttype; Token _token=null; int _begin=text.length();
2043        _ttype = INT_OR_FLOAT;
2044        int _saveIndex;
2045
2046        {
2047        int _cnt106=0;
2048        _loop106:
2049        do {
2050            if (((LA(1) >= '0' && LA(1) <= '9')) && (_tokenSet_18.member(LA(2)))) {
2051                mDIGIT(false);
2052            }
2053            else {
2054                if ( _cnt106>=1 ) { break _loop106; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
2055            }
2056
2057            _cnt106++;
2058        } while (true);
2059        }
2060        {
2061        if ((LA(1)=='L') && (_tokenSet_19.member(LA(2)))) {
2062            match('L');
2063        }
2064        else if ((LA(1)=='l') && (_tokenSet_19.member(LA(2)))) {
2065            match('l');
2066        }
2067        else if ((LA(1)=='.')) {
2068            match('.');
2069            {
2070            _loop109:
2071            do {
2072                if (((LA(1) >= '0' && LA(1) <= '9')) && (_tokenSet_19.member(LA(2)))) {
2073                    mDIGIT(false);
2074                }
2075                else {
2076                    break _loop109;
2077                }
2078
2079            } while (true);
2080            }
2081        }
2082        else if ((_tokenSet_19.member(LA(1))) && (true)) {
2083        }
2084        else {
2085            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2086        }
2087
2088        }
2089        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2090            _token = makeToken(_ttype);
2091            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
2092        }
2093        _returnToken = _token;
2094    }
2095
2096    protected final void mSL_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2097        int _ttype; Token _token=null; int _begin=text.length();
2098        _ttype = SL_COMMENT;
2099        int _saveIndex;
2100
2101        match("//");
2102        {
2103        _loop83:
2104        do {
2105            // nongreedy exit test
2106
if ((LA(1)=='\n'||LA(1)=='\r') && (true)) break _loop83;
2107            if (((LA(1) >= '\u0003' && LA(1) <= '~')) && ((LA(2) >= '\u0003' && LA(2) <= '~'))) {
2108                matchNot(EOF_CHAR);
2109            }
2110            else {
2111                break _loop83;
2112            }
2113
2114        } while (true);
2115        }
2116        {
2117        if ((LA(1)=='\r') && (LA(2)=='\n')) {
2118            match("\r\n");
2119        }
2120        else if ((LA(1)=='\n')) {
2121            match('\n');
2122        }
2123        else if ((LA(1)=='\r') && (true)) {
2124            match('\r');
2125        }
2126        else {
2127            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2128        }
2129
2130        }
2131        newline();
2132        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2133            _token = makeToken(_ttype);
2134            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
2135        }
2136        _returnToken = _token;
2137    }
2138
2139    protected final void mML_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2140        int _ttype; Token _token=null; int _begin=text.length();
2141        _ttype = ML_COMMENT;
2142        int _saveIndex;
2143
2144        match("/*");
2145        {
2146        _loop87:
2147        do {
2148            // nongreedy exit test
2149
if ((LA(1)=='*') && (LA(2)=='/')) break _loop87;
2150            if ((LA(1)=='\r') && (LA(2)=='\n')) {
2151                match('\r');
2152                match('\n');
2153                newline();
2154            }
2155            else if ((LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '~'))) {
2156                match('\r');
2157                newline();
2158            }
2159            else if ((LA(1)=='\n') && ((LA(2) >= '\u0003' && LA(2) <= '~'))) {
2160                match('\n');
2161                newline();
2162            }
2163            else if (((LA(1) >= '\u0003' && LA(1) <= '~')) && ((LA(2) >= '\u0003' && LA(2) <= '~'))) {
2164                matchNot(EOF_CHAR);
2165            }
2166            else {
2167                break _loop87;
2168            }
2169
2170        } while (true);
2171        }
2172        match("*/");
2173        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2174            _token = makeToken(_ttype);
2175            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
2176        }
2177        _returnToken = _token;
2178    }
2179
2180    protected final void mESC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2181        int _ttype; Token _token=null; int _begin=text.length();
2182        _ttype = ESC;
2183        int _saveIndex;
2184
2185        match('\\');
2186        {
2187        switch ( LA(1)) {
2188        case 'n':
2189        {
2190            match('n');
2191            break;
2192        }
2193        case 'r':
2194        {
2195            match('r');
2196            break;
2197        }
2198        case 't':
2199        {
2200            match('t');
2201            break;
2202        }
2203        case 'b':
2204        {
2205            match('b');
2206            break;
2207        }
2208        case 'f':
2209        {
2210            match('f');
2211            break;
2212        }
2213        case '"':
2214        {
2215            match('"');
2216            break;
2217        }
2218        case '\'':
2219        {
2220            match('\'');
2221            break;
2222        }
2223        case '\\':
2224        {
2225            match('\\');
2226            break;
2227        }
2228        case '0': case '1': case '2': case '3':
2229        {
2230            {
2231            matchRange('0','3');
2232            }
2233            {
2234            if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '~'))) {
2235                mDIGIT(false);
2236                {
2237                if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '~'))) {
2238                    mDIGIT(false);
2239                }
2240                else if (((LA(1) >= '\u0003' && LA(1) <= '~')) && (true)) {
2241                }
2242                else {
2243                    throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2244                }
2245
2246                }
2247            }
2248            else if (((LA(1) >= '\u0003' && LA(1) <= '~')) && (true)) {
2249            }
2250            else {
2251                throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2252            }
2253
2254            }
2255            break;
2256        }
2257        case '4': case '5': case '6': case '7':
2258        {
2259            {
2260            matchRange('4','7');
2261            }
2262            {
2263            if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '~'))) {
2264                mDIGIT(false);
2265            }
2266            else if (((LA(1) >= '\u0003' && LA(1) <= '~')) && (true)) {
2267            }
2268            else {
2269                throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2270            }
2271
2272            }
2273            break;
2274        }
2275        default:
2276        {
2277            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2278        }
2279        }
2280        }
2281        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2282            _token = makeToken(_ttype);
2283            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
2284        }
2285        _returnToken = _token;
2286    }
2287
2288    protected final void mDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2289        int _ttype; Token _token=null; int _begin=text.length();
2290        _ttype = DIGIT;
2291        int _saveIndex;
2292
2293        matchRange('0','9');
2294        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2295            _token = makeToken(_ttype);
2296            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
2297        }
2298        _returnToken = _token;
2299    }
2300
2301
2302    private static final long _tokenSet_0_data_[] = { -141407503262728L, 9223372036854775807L, 0L, 0L };
2303    public static final BitSet _tokenSet_0 = new BitSet(_tokenSet_0_data_);
2304    private static final long _tokenSet_1_data_[] = { -145135534866440L, 9223372036854775807L, 0L, 0L };
2305    public static final BitSet _tokenSet_1 = new BitSet(_tokenSet_1_data_);
2306    private static final long _tokenSet_2_data_[] = { 0L, 576460745995190270L, 0L, 0L };
2307    public static final BitSet _tokenSet_2 = new BitSet(_tokenSet_2_data_);
2308    private static final long _tokenSet_3_data_[] = { 4294977024L, 0L, 0L };
2309    public static final BitSet _tokenSet_3 = new BitSet(_tokenSet_3_data_);
2310    private static final long _tokenSet_4_data_[] = { 287948901175001088L, 576460745995190270L, 0L, 0L };
2311    public static final BitSet _tokenSet_4 = new BitSet(_tokenSet_4_data_);
2312    private static final long _tokenSet_5_data_[] = { 287958332923183104L, 576460745995190270L, 0L, 0L };
2313    public static final BitSet _tokenSet_5 = new BitSet(_tokenSet_5_data_);
2314    private static final long _tokenSet_6_data_[] = { 287978128427460096L, 576460746532061182L, 0L, 0L };
2315    public static final BitSet _tokenSet_6 = new BitSet(_tokenSet_6_data_);
2316    private static final long _tokenSet_7_data_[] = { 2306123388973753856L, 671088640L, 0L, 0L };
2317    public static final BitSet _tokenSet_7 = new BitSet(_tokenSet_7_data_);
2318    private static final long _tokenSet_8_data_[] = { 287952805300282880L, 576460746129407998L, 0L, 0L };
2319    public static final BitSet _tokenSet_8 = new BitSet(_tokenSet_8_data_);
2320    private static final long _tokenSet_9_data_[] = { 2305843013508670976L, 0L, 0L };
2321    public static final BitSet _tokenSet_9 = new BitSet(_tokenSet_9_data_);
2322    private static final long _tokenSet_10_data_[] = { 2306051920717948416L, 536870912L, 0L, 0L };
2323    public static final BitSet _tokenSet_10 = new BitSet(_tokenSet_10_data_);
2324    private static final long _tokenSet_11_data_[] = { 208911504254464L, 536870912L, 0L, 0L };
2325    public static final BitSet _tokenSet_11 = new BitSet(_tokenSet_11_data_);
2326    private static final long _tokenSet_12_data_[] = { 1151051235328L, 576460746129407998L, 0L, 0L };
2327    public static final BitSet _tokenSet_12 = new BitSet(_tokenSet_12_data_);
2328    private static final long _tokenSet_13_data_[] = { 189120294954496L, 0L, 0L };
2329    public static final BitSet _tokenSet_13 = new BitSet(_tokenSet_13_data_);
2330    private static final long _tokenSet_14_data_[] = { 288139722277004800L, 576460746129407998L, 0L, 0L };
2331    public static final BitSet _tokenSet_14 = new BitSet(_tokenSet_14_data_);
2332    private static final long _tokenSet_15_data_[] = { 288049596683265536L, 576460746666278910L, 0L, 0L };
2333    public static final BitSet _tokenSet_15 = new BitSet(_tokenSet_15_data_);
2334    private static final long _tokenSet_16_data_[] = { 287960536241415680L, 576460745995190270L, 0L, 0L };
2335    public static final BitSet _tokenSet_16 = new BitSet(_tokenSet_16_data_);
2336    private static final long _tokenSet_17_data_[] = { 287958337218160128L, 576460745995190270L, 0L, 0L };
2337    public static final BitSet _tokenSet_17 = new BitSet(_tokenSet_17_data_);
2338    private static final long _tokenSet_18_data_[] = { 288228817078593024L, 576460746532061182L, 0L, 0L };
2339    public static final BitSet _tokenSet_18 = new BitSet(_tokenSet_18_data_);
2340    private static final long _tokenSet_19_data_[] = { 288158448334415360L, 576460746532061182L, 0L, 0L };
2341    public static final BitSet _tokenSet_19 = new BitSet(_tokenSet_19_data_);
2342
2343    }
2344
Popular Tags