1	/*
2	 * ANTLR-generated file resulting from grammar action.g
3	 * 
4	 * Terence Parr, MageLang Institute
5	 * with John Lilley, Empathy Software
6	 * ANTLR Version 2.5.0; 1996,1997
7	 */
8	
9	package antlr.actions;
10	
11	import java.io.InputStream;
12	import java.io.Reader;
13	import java.io.IOException;
14	import java.util.Hashtable;
15	import antlr.CharScanner;
16	import antlr.InputBuffer;
17	import antlr.ByteBuffer;
18	import antlr.CharBuffer;
19	import antlr.Token;
20	import antlr.CommonToken;
21	import antlr.ScannerException;
22	import antlr.Tokenizer;
23	import antlr.ANTLRHashString;
24	import antlr.collections.impl.BitSet;
25	
26	import java.io.StringReader;
27	import antlr.collections.impl.Vector;
28	import antlr.*;
29	
30	/**
31	 * SOFTWARE RIGHTS
32	 * 
33	 * ANTLR 2.5.0 MageLang Insitute, 1998
34	 * 
35	 * We reserve no legal rights to the ANTLR--it is fully in the
36	 * public domain. An individual or company may do whatever
37	 * they wish with source code distributed with ANTLR or the
38	 * code generated by ANTLR, including the incorporation of
39	 * ANTLR, or its output, into commerical software.
40	 * 
41	 * We encourage users to develop software with ANTLR. However,
42	 * we do ask that credit is given to us for developing
43	 * ANTLR. By "credit", we mean that if you use ANTLR or
44	 * incorporate any source code into one of your programs
45	 * (commercial product, research project, or otherwise) that
46	 * you acknowledge this fact somewhere in the documentation,
47	 * research report, etc... If you like ANTLR and have
48	 * developed a nice tool with the output, please mention that
49	 * you developed it using ANTLR. In addition, we ask that the
50	 * headers remain intact in our source code. As long as these
51	 * guidelines are kept, we expect to continue enhancing this
52	 * system and expect to make other tools available as they are
53	 * completed.
54	 * 
55	 * The ANTLR gang:
56	 * @version ANTLR 2.5.0 MageLang Insitute, 1998
57	 * @author Terence Parr, MageLang Institute; http://www.MageLang.com
58	 * @author John Lilley, Empathy Software; http://www.Empathy.com
59	 *
60	 * Perform the following translations:
61	
62	    AST related translations
63	
64		##				-> currentRule_AST
65		#(x,y,z)		-> codeGenerator.getASTCreateString(vector-of(x,y,z))
66		#[x]			-> codeGenerator.getASTCreateString(x)
67		#x				-> codeGenerator.mapTreeId(x)
68	
69		Inside context of #(...), you can ref (x,y,z), [x], and x as shortcuts.
70	
71	    Text related translations
72	
73		$append(x)		-> text.append(x)
74		$setText(x)		-> text.setLength(_begin); text.append(x)
75		$getText		-> new String(text.getBuffer(),_begin,text.length()-_begin)
76		$setToken(x)	-> _token = x
77		$setType(x)		-> _ttype = x
78	 */
79	public class ActionLexer extends CharScannercanner implements ActionLexerTokenTypes, Tokenizer
80	 {
81	
82		protected RuleBlock currentRule;
83		protected CodeGenerator generator;
84		protected int lineOffset = 0;
85		private Tool tool;	// The ANTLR tool
86		ActionTransInfo transInfo;
87	
88	 	public ActionLexer( String s,
89							RuleBlock currentRule,
90							CodeGenerator generator,
91							ActionTransInfo transInfo) {
92			this(new StringReader(s));
93			this.currentRule = currentRule;
94			this.generator = generator;
95			this.transInfo = transInfo;
96		}
97	
98		public void setLineOffset(int lineOffset) {
99			// this.lineOffset = lineOffset;
100			setLine(lineOffset);
101		}
102	
103		public void setTool(Tool tool) {
104			this.tool = tool;
105		}
106	
107		// Override of error-reporting for syntax
108		public void reportError(ScannerException e) {
109			System.err.print("Syntax error in action: ");
110			super.reportError(e);
111		}
112	
113	public ActionLexer(InputStream in) {
114		this(new ByteBuffer(in));
115	}
116	public ActionLexer(Reader in) {
117		this(new CharBuffer(in));
118	}
119	public ActionLexer(InputBuffer ib) {
120		super(ib);
121		literals = new Hashtable();
122	caseSensitiveLiterals = true;
123	setCaseSensitive(true);
124	}
125	
126	public Token nextToken() throws IOException {
127		Token _rettoken=null;
128	tryAgain:
129		for (;;) {
130			Token _token = null;
131			int _ttype = Token.INVALID_TYPE;
132			resetText();
133			try {   // for error handling
134				if (((LA(1) >= '\3' && LA(1) <= '~'))) {
135					mACTION(true);
136					_rettoken=_returnToken;
137				}
138				else {
139					if (LA(1)==EOF_CHAR) {_returnToken = makeToken(Token.EOF_TYPE);}
140					else {throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());}
141				}
142				
143				if ( _returnToken==null ) continue tryAgain; // found SKIP token
144				_ttype = _returnToken.getType();
145				_returnToken.setType(_ttype);
146				return _returnToken;
147			}
148			catch (ScannerException e) {
149				reportError(e);
150				consume();
151			}
152		}
153	}
154	
155		public final void mACTION(boolean _createToken) throws ScannerException, IOException {
156			int _ttype; Token _token=null; int _begin=text.length();
157			_ttype = ACTION;
158			int _saveIndex;
159			
160			{
161			int _cnt3=0;
162			_loop3:
163			do {
164				switch ( LA(1)) {
165				case '\3':  case '\4':  case '\5':  case '\6':
166				case '\7':  case '\10':  case '\t':  case '\n':
167				case '\13':  case '\14':  case '\r':  case '\16':
168				case '\17':  case '\20':  case '\21':  case '\22':
169				case '\23':  case '\24':  case '\25':  case '\26':
170				case '\27':  case '\30':  case '\31':  case '\32':
171				case '\33':  case '\34':  case '\35':  case '\36':
172				case '\37':  case ' ':  case '!':  case '"':
173				case '%':  case '&':  case '\'':  case '(':
174				case ')':  case '*':  case '+':  case ',':
175				case '-':  case '.':  case '/':  case '0':
176				case '1':  case '2':  case '3':  case '4':
177				case '5':  case '6':  case '7':  case '8':
178				case '9':  case ':':  case ';':  case '<':
179				case '=':  case '>':  case '?':  case '@':
180				case 'A':  case 'B':  case 'C':  case 'D':
181				case 'E':  case 'F':  case 'G':  case 'H':
182				case 'I':  case 'J':  case 'K':  case 'L':
183				case 'M':  case 'N':  case 'O':  case 'P':
184				case 'Q':  case 'R':  case 'S':  case 'T':
185				case 'U':  case 'V':  case 'W':  case 'X':
186				case 'Y':  case 'Z':  case '[':  case '\\':
187				case ']':  case '^':  case '_':  case '`':
188				case 'a':  case 'b':  case 'c':  case 'd':
189				case 'e':  case 'f':  case 'g':  case 'h':
190				case 'i':  case 'j':  case 'k':  case 'l':
191				case 'm':  case 'n':  case 'o':  case 'p':
192				case 'q':  case 'r':  case 's':  case 't':
193				case 'u':  case 'v':  case 'w':  case 'x':
194				case 'y':  case 'z':  case '{':  case '|':
195				case '}':  case '~':
196				{
197					mSTUFF(false);
198					break;
199				}
200				case '#':  case '$':
201				{
202					mAST_ITEM(false);
203					break;
204				}
205				default:
206				{
207					if ( _cnt3>=1 ) { break _loop3; } else {throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());}
208				}
209				}
210				_cnt3++;
211			} while (true);
212			}
213			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
214				_token = makeToken(_ttype);
215				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
216			}
217			_returnToken = _token;
218		}
219		
220		protected final void mSTUFF(boolean _createToken) throws ScannerException, IOException {
221			int _ttype; Token _token=null; int _begin=text.length();
222			_ttype = STUFF;
223			int _saveIndex;
224			
225			switch ( LA(1)) {
226			case '"':
227			{
228				mSTRING(false);
229				break;
230			}
231			case '\'':
232			{
233				mCHAR(false);
234				break;
235			}
236			case '\r':
237			{
238				match('\r');
239				{
240				if ((LA(1)=='\n')) {
241					match('\n');
242				}
243				else {
244				}
245				
246				}
247				newline();
248				break;
249			}
250			case '\n':
251			{
252				match('\n');
253				newline();
254				break;
255			}
256			case '\3':  case '\4':  case '\5':  case '\6':
257			case '\7':  case '\10':  case '\t':  case '\13':
258			case '\14':  case '\16':  case '\17':  case '\20':
259			case '\21':  case '\22':  case '\23':  case '\24':
260			case '\25':  case '\26':  case '\27':  case '\30':
261			case '\31':  case '\32':  case '\33':  case '\34':
262			case '\35':  case '\36':  case '\37':  case ' ':
263			case '!':  case '%':  case '&':  case '(':
264			case ')':  case '*':  case '+':  case ',':
265			case '-':  case '.':  case '0':  case '1':
266			case '2':  case '3':  case '4':  case '5':
267			case '6':  case '7':  case '8':  case '9':
268			case ':':  case ';':  case '<':  case '=':
269			case '>':  case '?':  case '@':  case 'A':
270			case 'B':  case 'C':  case 'D':  case 'E':
271			case 'F':  case 'G':  case 'H':  case 'I':
272			case 'J':  case 'K':  case 'L':  case 'M':
273			case 'N':  case 'O':  case 'P':  case 'Q':
274			case 'R':  case 'S':  case 'T':  case 'U':
275			case 'V':  case 'W':  case 'X':  case 'Y':
276			case 'Z':  case '[':  case '\\':  case ']':
277			case '^':  case '_':  case '`':  case 'a':
278			case 'b':  case 'c':  case 'd':  case 'e':
279			case 'f':  case 'g':  case 'h':  case 'i':
280			case 'j':  case 'k':  case 'l':  case 'm':
281			case 'n':  case 'o':  case 'p':  case 'q':
282			case 'r':  case 's':  case 't':  case 'u':
283			case 'v':  case 'w':  case 'x':  case 'y':
284			case 'z':  case '{':  case '|':  case '}':
285			case '~':
286			{
287				{
288				int _cnt9=0;
289				_loop9:
290				do {
291					if ((_tokenSet_0.member(LA(1)))) {
292						{
293						match(_tokenSet_0);
294						}
295					}
296					else {
297						if ( _cnt9>=1 ) { break _loop9; } else {throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());}
298					}
299					
300					_cnt9++;
301				} while (true);
302				}
303				break;
304			}
305			default:
306				if ((LA(1)=='/') && (LA(2)=='*'||LA(2)=='/')) {
307					mCOMMENT(false);
308				}
309				else if ((LA(1)=='/') && (_tokenSet_1.member(LA(2)))) {
310					match('/');
311					{
312					match(_tokenSet_1);
313					}
314				}
315			else {
316				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
317			}
318			}
319			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
320				_token = makeToken(_ttype);
321				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
322			}
323			_returnToken = _token;
324		}
325		
326		protected final void mAST_ITEM(boolean _createToken) throws ScannerException, IOException {
327			int _ttype; Token _token=null; int _begin=text.length();
328			_ttype = AST_ITEM;
329			int _saveIndex;
330			Token t=null;
331			Token id=null;
332			Token ctor=null;
333			
334			if ((LA(1)=='#') && (LA(2)=='(')) {
335				_saveIndex=text.length();
336				match('#');
337				text.setLength(_saveIndex);
338				mTREE(true);
339				t=_returnToken;
340			}
341			else if ((LA(1)=='#') && (_tokenSet_2.member(LA(2)))) {
342				_saveIndex=text.length();
343				match('#');
344				text.setLength(_saveIndex);
345				mID(true);
346				id=_returnToken;
347				
348						String idt = id.getText();
349						text.setLength(_begin); text.append(generator.mapTreeId(idt,transInfo));
350						
351				{
352				if ((_tokenSet_3.member(LA(1)))) {
353					mWS(false);
354				}
355				else {
356				}
357				
358				}
359				{
360				if ((LA(1)=='=') && ((LA(2) >= '\3' && LA(2) <= '~'))) {
361					mVAR_ASSIGN(false);
362				}
363				else {
364				}
365				
366				}
367			}
368			else if ((LA(1)=='#') && (LA(2)=='[')) {
369				_saveIndex=text.length();
370				match('#');
371				text.setLength(_saveIndex);
372				mAST_CONSTRUCTOR(true);
373				ctor=_returnToken;
374			}
375			else if ((LA(1)=='#') && (LA(2)=='#')) {
376				match("##");
377				
378						String r=currentRule.getRuleName()+"_AST"; text.setLength(_begin); text.append(r);
379						if ( transInfo!=null ) {
380							transInfo.refRuleRoot=r;	// we ref root of tree
381						}
382						
383				{
384				if ((_tokenSet_3.member(LA(1)))) {
385					mWS(false);
386				}
387				else {
388				}
389				
390				}
391				{
392				if ((LA(1)=='=') && ((LA(2) >= '\3' && LA(2) <= '~'))) {
393					mVAR_ASSIGN(false);
394				}
395				else {
396				}
397				
398				}
399			}
400			else if ((LA(1)=='$')) {
401				mTEXT_ITEM(false);
402			}
403			else {
404				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
405			}
406			
407			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
408				_token = makeToken(_ttype);
409				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
410			}
411			_returnToken = _token;
412		}
413		
414		protected final void mCOMMENT(boolean _createToken) throws ScannerException, IOException {
415			int _ttype; Token _token=null; int _begin=text.length();
416			_ttype = COMMENT;
417			int _saveIndex;
418			
419			if ((LA(1)=='/') && (LA(2)=='/')) {
420				mSL_COMMENT(false);
421			}
422			else if ((LA(1)=='/') && (LA(2)=='*')) {
423				mML_COMMENT(false);
424			}
425			else {
426				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
427			}
428			
429			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
430				_token = makeToken(_ttype);
431				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
432			}
433			_returnToken = _token;
434		}
435		
436		protected final void mSTRING(boolean _createToken) throws ScannerException, IOException {
437			int _ttype; Token _token=null; int _begin=text.length();
438			_ttype = STRING;
439			int _saveIndex;
440			
441			match('"');
442			{
443			_loop95:
444			do {
445				switch ( LA(1)) {
446				case '\\':
447				{
448					mESC(false);
449					break;
450				}
451				case '\3':  case '\4':  case '\5':  case '\6':
452				case '\7':  case '\10':  case '\t':  case '\n':
453				case '\13':  case '\14':  case '\r':  case '\16':
454				case '\17':  case '\20':  case '\21':  case '\22':
455				case '\23':  case '\24':  case '\25':  case '\26':
456				case '\27':  case '\30':  case '\31':  case '\32':
457				case '\33':  case '\34':  case '\35':  case '\36':
458				case '\37':  case ' ':  case '!':  case '#':
459				case '$':  case '%':  case '&':  case '\'':
460				case '(':  case ')':  case '*':  case '+':
461				case ',':  case '-':  case '.':  case '/':
462				case '0':  case '1':  case '2':  case '3':
463				case '4':  case '5':  case '6':  case '7':
464				case '8':  case '9':  case ':':  case ';':
465				case '<':  case '=':  case '>':  case '?':
466				case '@':  case 'A':  case 'B':  case 'C':
467				case 'D':  case 'E':  case 'F':  case 'G':
468				case 'H':  case 'I':  case 'J':  case 'K':
469				case 'L':  case 'M':  case 'N':  case 'O':
470				case 'P':  case 'Q':  case 'R':  case 'S':
471				case 'T':  case 'U':  case 'V':  case 'W':
472				case 'X':  case 'Y':  case 'Z':  case '[':
473				case ']':  case '^':  case '_':  case '`':
474				case 'a':  case 'b':  case 'c':  case 'd':
475				case 'e':  case 'f':  case 'g':  case 'h':
476				case 'i':  case 'j':  case 'k':  case 'l':
477				case 'm':  case 'n':  case 'o':  case 'p':
478				case 'q':  case 'r':  case 's':  case 't':
479				case 'u':  case 'v':  case 'w':  case 'x':
480				case 'y':  case 'z':  case '{':  case '|':
481				case '}':  case '~':
482				{
483					matchNot('"');
484					break;
485				}
486				default:
487				{
488					break _loop95;
489				}
490				}
491			} while (true);
492			}
493			match('"');
494			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
495				_token = makeToken(_ttype);
496				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
497			}
498			_returnToken = _token;
499		}
500		
501		protected final void mCHAR(boolean _createToken) throws ScannerException, IOException {
502			int _ttype; Token _token=null; int _begin=text.length();
503			_ttype = CHAR;
504			int _saveIndex;
505			
506			match('\'');
507			{
508			switch ( LA(1)) {
509			case '\\':
510			{
511				mESC(false);
512				break;
513			}
514			case '\3':  case '\4':  case '\5':  case '\6':
515			case '\7':  case '\10':  case '\t':  case '\n':
516			case '\13':  case '\14':  case '\r':  case '\16':
517			case '\17':  case '\20':  case '\21':  case '\22':
518			case '\23':  case '\24':  case '\25':  case '\26':
519			case '\27':  case '\30':  case '\31':  case '\32':
520			case '\33':  case '\34':  case '\35':  case '\36':
521			case '\37':  case ' ':  case '!':  case '"':
522			case '#':  case '$':  case '%':  case '&':
523			case '(':  case ')':  case '*':  case '+':
524			case ',':  case '-':  case '.':  case '/':
525			case '0':  case '1':  case '2':  case '3':
526			case '4':  case '5':  case '6':  case '7':
527			case '8':  case '9':  case ':':  case ';':
528			case '<':  case '=':  case '>':  case '?':
529			case '@':  case 'A':  case 'B':  case 'C':
530			case 'D':  case 'E':  case 'F':  case 'G':
531			case 'H':  case 'I':  case 'J':  case 'K':
532			case 'L':  case 'M':  case 'N':  case 'O':
533			case 'P':  case 'Q':  case 'R':  case 'S':
534			case 'T':  case 'U':  case 'V':  case 'W':
535			case 'X':  case 'Y':  case 'Z':  case '[':
536			case ']':  case '^':  case '_':  case '`':
537			case 'a':  case 'b':  case 'c':  case 'd':
538			case 'e':  case 'f':  case 'g':  case 'h':
539			case 'i':  case 'j':  case 'k':  case 'l':
540			case 'm':  case 'n':  case 'o':  case 'p':
541			case 'q':  case 'r':  case 's':  case 't':
542			case 'u':  case 'v':  case 'w':  case 'x':
543			case 'y':  case 'z':  case '{':  case '|':
544			case '}':  case '~':
545			{
546				matchNot('\'');
547				break;
548			}
549			default:
550			{
551				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
552			}
553			}
554			}
555			match('\'');
556			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
557				_token = makeToken(_ttype);
558				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
559			}
560			_returnToken = _token;
561		}
562		
563		protected final void mTREE(boolean _createToken) throws ScannerException, IOException {
564			int _ttype; Token _token=null; int _begin=text.length();
565			_ttype = TREE;
566			int _saveIndex;
567			Token t=null;
568			Token t2=null;
569			
570				StringBuffer buf = new StringBuffer();
571				int n=0;
572				Vector terms = new Vector(10);
573			
574			
575			_saveIndex=text.length();
576			match('(');
577			text.setLength(_saveIndex);
578			{
579			switch ( LA(1)) {
580			case '\t':  case '\n':  case '\r':  case ' ':
581			{
582				_saveIndex=text.length();
583				mWS(false);
584				text.setLength(_saveIndex);
585				break;
586			}
587			case '#':  case '(':  case 'A':  case 'B':
588			case 'C':  case 'D':  case 'E':  case 'F':
589			case 'G':  case 'H':  case 'I':  case 'J':
590			case 'K':  case 'L':  case 'M':  case 'N':
591			case 'O':  case 'P':  case 'Q':  case 'R':
592			case 'S':  case 'T':  case 'U':  case 'V':
593			case 'W':  case 'X':  case 'Y':  case 'Z':
594			case '[':  case '_':  case 'a':  case 'b':
595			case 'c':  case 'd':  case 'e':  case 'f':
596			case 'g':  case 'h':  case 'i':  case 'j':
597			case 'k':  case 'l':  case 'm':  case 'n':
598			case 'o':  case 'p':  case 'q':  case 'r':
599			case 's':  case 't':  case 'u':  case 'v':
600			case 'w':  case 'x':  case 'y':  case 'z':
601			{
602				break;
603			}
604			default:
605			{
606				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
607			}
608			}
609			}
610			_saveIndex=text.length();
611			mTREE_ELEMENT(true);
612			text.setLength(_saveIndex);
613			t=_returnToken;
614			terms.appendElement(t.getText());
615			{
616			switch ( LA(1)) {
617			case '\t':  case '\n':  case '\r':  case ' ':
618			{
619				_saveIndex=text.length();
620				mWS(false);
621				text.setLength(_saveIndex);
622				break;
623			}
624			case ')':  case ',':
625			{
626				break;
627			}
628			default:
629			{
630				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
631			}
632			}
633			}
634			{
635			_loop23:
636			do {
637				if ((LA(1)==',')) {
638					_saveIndex=text.length();
639					match(',');
640					text.setLength(_saveIndex);
641					{
642					switch ( LA(1)) {
643					case '\t':  case '\n':  case '\r':  case ' ':
644					{
645						_saveIndex=text.length();
646						mWS(false);
647						text.setLength(_saveIndex);
648						break;
649					}
650					case '#':  case '(':  case 'A':  case 'B':
651					case 'C':  case 'D':  case 'E':  case 'F':
652					case 'G':  case 'H':  case 'I':  case 'J':
653					case 'K':  case 'L':  case 'M':  case 'N':
654					case 'O':  case 'P':  case 'Q':  case 'R':
655					case 'S':  case 'T':  case 'U':  case 'V':
656					case 'W':  case 'X':  case 'Y':  case 'Z':
657					case '[':  case '_':  case 'a':  case 'b':
658					case 'c':  case 'd':  case 'e':  case 'f':
659					case 'g':  case 'h':  case 'i':  case 'j':
660					case 'k':  case 'l':  case 'm':  case 'n':
661					case 'o':  case 'p':  case 'q':  case 'r':
662					case 's':  case 't':  case 'u':  case 'v':
663					case 'w':  case 'x':  case 'y':  case 'z':
664					{
665						break;
666					}
667					default:
668					{
669						throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
670					}
671					}
672					}
673					_saveIndex=text.length();
674					mTREE_ELEMENT(true);
675					text.setLength(_saveIndex);
676					t2=_returnToken;
677					terms.appendElement(t2.getText());
678					{
679					switch ( LA(1)) {
680					case '\t':  case '\n':  case '\r':  case ' ':
681					{
682						_saveIndex=text.length();
683						mWS(false);
684						text.setLength(_saveIndex);
685						break;
686					}
687					case ')':  case ',':
688					{
689						break;
690					}
691					default:
692					{
693						throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
694					}
695					}
696					}
697				}
698				else {
699					break _loop23;
700				}
701				
702			} while (true);
703			}
704			text.setLength(_begin); text.append(generator.getASTCreateString(terms));
705			_saveIndex=text.length();
706			match(')');
707			text.setLength(_saveIndex);
708			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
709				_token = makeToken(_ttype);
710				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
711			}
712			_returnToken = _token;
713		}
714		
715		protected final void mID(boolean _createToken) throws ScannerException, IOException {
716			int _ttype; Token _token=null; int _begin=text.length();
717			_ttype = ID;
718			int _saveIndex;
719			
720			{
721			switch ( LA(1)) {
722			case 'a':  case 'b':  case 'c':  case 'd':
723			case 'e':  case 'f':  case 'g':  case 'h':
724			case 'i':  case 'j':  case 'k':  case 'l':
725			case 'm':  case 'n':  case 'o':  case 'p':
726			case 'q':  case 'r':  case 's':  case 't':
727			case 'u':  case 'v':  case 'w':  case 'x':
728			case 'y':  case 'z':
729			{
730				matchRange('a','z');
731				break;
732			}
733			case 'A':  case 'B':  case 'C':  case 'D':
734			case 'E':  case 'F':  case 'G':  case 'H':
735			case 'I':  case 'J':  case 'K':  case 'L':
736			case 'M':  case 'N':  case 'O':  case 'P':
737			case 'Q':  case 'R':  case 'S':  case 'T':
738			case 'U':  case 'V':  case 'W':  case 'X':
739			case 'Y':  case 'Z':
740			{
741				matchRange('A','Z');
742				break;
743			}
744			case '_':
745			{
746				match('_');
747				break;
748			}
749			default:
750			{
751				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
752			}
753			}
754			}
755			{
756			_loop76:
757			do {
758				if ((_tokenSet_4.member(LA(1)))) {
759					{
760					switch ( LA(1)) {
761					case 'a':  case 'b':  case 'c':  case 'd':
762					case 'e':  case 'f':  case 'g':  case 'h':
763					case 'i':  case 'j':  case 'k':  case 'l':
764					case 'm':  case 'n':  case 'o':  case 'p':
765					case 'q':  case 'r':  case 's':  case 't':
766					case 'u':  case 'v':  case 'w':  case 'x':
767					case 'y':  case 'z':
768					{
769						matchRange('a','z');
770						break;
771					}
772					case 'A':  case 'B':  case 'C':  case 'D':
773					case 'E':  case 'F':  case 'G':  case 'H':
774					case 'I':  case 'J':  case 'K':  case 'L':
775					case 'M':  case 'N':  case 'O':  case 'P':
776					case 'Q':  case 'R':  case 'S':  case 'T':
777					case 'U':  case 'V':  case 'W':  case 'X':
778					case 'Y':  case 'Z':
779					{
780						matchRange('A','Z');
781						break;
782					}
783					case '0':  case '1':  case '2':  case '3':
784					case '4':  case '5':  case '6':  case '7':
785					case '8':  case '9':
786					{
787						matchRange('0','9');
788						break;
789					}
790					case '_':
791					{
792						match('_');
793						break;
794					}
795					default:
796					{
797						throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
798					}
799					}
800					}
801				}
802				else {
803					break _loop76;
804				}
805				
806			} while (true);
807			}
808			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
809				_token = makeToken(_ttype);
810				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
811			}
812			_returnToken = _token;
813		}
814		
815		protected final void mWS(boolean _createToken) throws ScannerException, IOException {
816			int _ttype; Token _token=null; int _begin=text.length();
817			_ttype = WS;
818			int _saveIndex;
819			
820			{
821			int _cnt116=0;
822			_loop116:
823			do {
824				if ((LA(1)==' ')) {
825					match(' ');
826				}
827				else if ((LA(1)=='\t')) {
828					match('\t');
829				}
830				else if ((LA(1)=='\r')) {
831					match('\r');
832					{
833					if ((LA(1)=='\n')) {
834						match('\n');
835					}
836					else {
837					}
838					
839					}
840					newline();
841				}
842				else if ((LA(1)=='\n')) {
843					match('\n');
844					newline();
845				}
846				else {
847					if ( _cnt116>=1 ) { break _loop116; } else {throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());}
848				}
849				
850				_cnt116++;
851			} while (true);
852			}
853			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
854				_token = makeToken(_ttype);
855				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
856			}
857			_returnToken = _token;
858		}
859		
860		protected final void mVAR_ASSIGN(boolean _createToken) throws ScannerException, IOException {
861			int _ttype; Token _token=null; int _begin=text.length();
862			_ttype = VAR_ASSIGN;
863			int _saveIndex;
864			char  c = '\0';
865			
866			{
867			if ((LA(1)=='=') && (_tokenSet_5.member(LA(2)))) {
868				match('=');
869				c = LA(1);
870				matchNot('=');
871				
872							// inform the code generator that an assignment was done to
873							// AST root for the rule if invoker set refRuleRoot.
874							if ( transInfo!=null && transInfo.refRuleRoot!=null ) {
875								transInfo.assignToRoot=true;
876							}
877							
878			}
879			else if ((LA(1)=='=') && (LA(2)=='=')) {
880				match("==");
881			}
882			else {
883				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
884			}
885			
886			}
887			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
888				_token = makeToken(_ttype);
889				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
890			}
891			_returnToken = _token;
892		}
893		
894		protected final void mAST_CONSTRUCTOR(boolean _createToken) throws ScannerException, IOException {
895			int _ttype; Token _token=null; int _begin=text.length();
896			_ttype = AST_CONSTRUCTOR;
897			int _saveIndex;
898			Token x=null;
899			Token y=null;
900			
901			_saveIndex=text.length();
902			match('[');
903			text.setLength(_saveIndex);
904			{
905			switch ( LA(1)) {
906			case '\t':  case '\n':  case '\r':  case ' ':
907			{
908				_saveIndex=text.length();
909				mWS(false);
910				text.setLength(_saveIndex);
911				break;
912			}
913			case '"':  case '#':  case '(':  case '0':
914			case '1':  case '2':  case '3':  case '4':
915			case '5':  case '6':  case '7':  case '8':
916			case '9':  case 'A':  case 'B':  case 'C':
917			case 'D':  case 'E':  case 'F':  case 'G':
918			case 'H':  case 'I':  case 'J':  case 'K':
919			case 'L':  case 'M':  case 'N':  case 'O':
920			case 'P':  case 'Q':  case 'R':  case 'S':
921			case 'T':  case 'U':  case 'V':  case 'W':
922			case 'X':  case 'Y':  case 'Z':  case '[':
923			case '_':  case 'a':  case 'b':  case 'c':
924			case 'd':  case 'e':  case 'f':  case 'g':
925			case 'h':  case 'i':  case 'j':  case 'k':
926			case 'l':  case 'm':  case 'n':  case 'o':
927			case 'p':  case 'q':  case 'r':  case 's':
928			case 't':  case 'u':  case 'v':  case 'w':
929			case 'x':  case 'y':  case 'z':
930			{
931				break;
932			}
933			default:
934			{
935				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
936			}
937			}
938			}
939			_saveIndex=text.length();
940			mAST_CTOR_ELEMENT(true);
941			text.setLength(_saveIndex);
942			x=_returnToken;
943			{
944			switch ( LA(1)) {
945			case '\t':  case '\n':  case '\r':  case ' ':
946			{
947				_saveIndex=text.length();
948				mWS(false);
949				text.setLength(_saveIndex);
950				break;
951			}
952			case ',':  case ']':
953			{
954				break;
955			}
956			default:
957			{
958				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
959			}
960			}
961			}
962			{
963			switch ( LA(1)) {
964			case ',':
965			{
966				_saveIndex=text.length();
967				match(',');
968				text.setLength(_saveIndex);
969				{
970				switch ( LA(1)) {
971				case '\t':  case '\n':  case '\r':  case ' ':
972				{
973					_saveIndex=text.length();
974					mWS(false);
975					text.setLength(_saveIndex);
976					break;
977				}
978				case '"':  case '#':  case '(':  case '0':
979				case '1':  case '2':  case '3':  case '4':
980				case '5':  case '6':  case '7':  case '8':
981				case '9':  case 'A':  case 'B':  case 'C':
982				case 'D':  case 'E':  case 'F':  case 'G':
983				case 'H':  case 'I':  case 'J':  case 'K':
984				case 'L':  case 'M':  case 'N':  case 'O':
985				case 'P':  case 'Q':  case 'R':  case 'S':
986				case 'T':  case 'U':  case 'V':  case 'W':
987				case 'X':  case 'Y':  case 'Z':  case '[':
988				case '_':  case 'a':  case 'b':  case 'c':
989				case 'd':  case 'e':  case 'f':  case 'g':
990				case 'h':  case 'i':  case 'j':  case 'k':
991				case 'l':  case 'm':  case 'n':  case 'o':
992				case 'p':  case 'q':  case 'r':  case 's':
993				case 't':  case 'u':  case 'v':  case 'w':
994				case 'x':  case 'y':  case 'z':
995				{
996					break;
997				}
998				default:
999				{
1000					throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1001				}
1002				}
1003				}
1004				_saveIndex=text.length();
1005				mAST_CTOR_ELEMENT(true);
1006				text.setLength(_saveIndex);
1007				y=_returnToken;
1008				{
1009				switch ( LA(1)) {
1010				case '\t':  case '\n':  case '\r':  case ' ':
1011				{
1012					_saveIndex=text.length();
1013					mWS(false);
1014					text.setLength(_saveIndex);
1015					break;
1016				}
1017				case ']':
1018				{
1019					break;
1020				}
1021				default:
1022				{
1023					throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1024				}
1025				}
1026				}
1027				break;
1028			}
1029			case ']':
1030			{
1031				break;
1032			}
1033			default:
1034			{
1035				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1036			}
1037			}
1038			}
1039			_saveIndex=text.length();
1040			match(']');
1041			text.setLength(_saveIndex);
1042			
1043					String ys = "";
1044					if ( y!=null ) {
1045						ys = ","+y.getText();
1046					}
1047					text.setLength(_begin); text.append(generator.getASTCreateString(x.getText()+ys));
1048					
1049			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1050				_token = makeToken(_ttype);
1051				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1052			}
1053			_returnToken = _token;
1054		}
1055		
1056		protected final void mTEXT_ITEM(boolean _createToken) throws ScannerException, IOException {
1057			int _ttype; Token _token=null; int _begin=text.length();
1058			_ttype = TEXT_ITEM;
1059			int _saveIndex;
1060			Token a1=null;
1061			Token a2=null;
1062			Token a3=null;
1063			Token a4=null;
1064			
1065			if ((LA(1)=='$') && (LA(2)=='a')) {
1066				match("$append(");
1067				mTEXT_ARG(true);
1068				a1=_returnToken;
1069				match(')');
1070				String t = "text.append("+a1.getText()+")"; text.setLength(_begin); text.append(t);
1071			}
1072			else if ((LA(1)=='$') && (LA(2)=='s')) {
1073				match("$set");
1074				{
1075				if ((LA(1)=='T') && (LA(2)=='e')) {
1076					match("Text(");
1077					mTEXT_ARG(true);
1078					a2=_returnToken;
1079					match(')');
1080					
1081								String t;
1082								if (generator instanceof CppCodeGenerator) {
1083									t="text.erase(_begin); text.append("+a2.getText()+")";
1084								} else {
1085									t="text.setLength(_begin); text.append("+a2.getText()+")";
1086								}
1087								text.setLength(_begin); text.append(t);
1088								
1089				}
1090				else if ((LA(1)=='T') && (LA(2)=='o')) {
1091					match("Token(");
1092					mTEXT_ARG(true);
1093					a3=_returnToken;
1094					match(')');
1095					
1096								String t="_token = "+a3.getText();
1097								text.setLength(_begin); text.append(t);
1098								
1099				}
1100				else if ((LA(1)=='T') && (LA(2)=='y')) {
1101					match("Type(");
1102					mTEXT_ARG(true);
1103					a4=_returnToken;
1104					match(')');
1105					
1106								String t="_ttype = "+a4.getText();
1107								text.setLength(_begin); text.append(t);
1108								
1109				}
1110				else {
1111					throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1112				}
1113				
1114				}
1115			}
1116			else if ((LA(1)=='$') && (LA(2)=='g')) {
1117				match("$getText");
1118				
1119							if (generator instanceof CppCodeGenerator) {
1120								text.setLength(_begin); text.append("text.substr(_begin,text.length()-_begin)");
1121							} else {
1122								text.setLength(_begin); text.append("new String(text.getBuffer(),_begin,text.length()-_begin)");
1123							}
1124						
1125			}
1126			else {
1127				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1128			}
1129			
1130			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1131				_token = makeToken(_ttype);
1132				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1133			}
1134			_returnToken = _token;
1135		}
1136		
1137		protected final void mTEXT_ARG(boolean _createToken) throws ScannerException, IOException {
1138			int _ttype; Token _token=null; int _begin=text.length();
1139			_ttype = TEXT_ARG;
1140			int _saveIndex;
1141			
1142			{
1143			int _cnt50=0;
1144			_loop50:
1145			do {
1146				if ((_tokenSet_6.member(LA(1))) && ((LA(2) >= '\3' && LA(2) <= '~'))) {
1147					mTEXT_ARG_ELEMENT(false);
1148					{
1149					if ((_tokenSet_3.member(LA(1))) && (_tokenSet_7.member(LA(2)))) {
1150						mWS(false);
1151					}
1152					else if ((_tokenSet_7.member(LA(1)))) {
1153					}
1154					else {
1155						throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1156					}
1157					
1158					}
1159				}
1160				else {
1161					if ( _cnt50>=1 ) { break _loop50; } else {throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());}
1162				}
1163				
1164				_cnt50++;
1165			} while (true);
1166			}
1167			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1168				_token = makeToken(_ttype);
1169				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1170			}
1171			_returnToken = _token;
1172		}
1173		
1174		protected final void mTREE_ELEMENT(boolean _createToken) throws ScannerException, IOException {
1175			int _ttype; Token _token=null; int _begin=text.length();
1176			_ttype = TREE_ELEMENT;
1177			int _saveIndex;
1178			Token id=null;
1179			
1180			switch ( LA(1)) {
1181			case '(':
1182			{
1183				mTREE(false);
1184				break;
1185			}
1186			case '[':
1187			{
1188				mAST_CONSTRUCTOR(false);
1189				break;
1190			}
1191			case 'A':  case 'B':  case 'C':  case 'D':
1192			case 'E':  case 'F':  case 'G':  case 'H':
1193			case 'I':  case 'J':  case 'K':  case 'L':
1194			case 'M':  case 'N':  case 'O':  case 'P':
1195			case 'Q':  case 'R':  case 'S':  case 'T':
1196			case 'U':  case 'V':  case 'W':  case 'X':
1197			case 'Y':  case 'Z':  case '_':  case 'a':
1198			case 'b':  case 'c':  case 'd':  case 'e':
1199			case 'f':  case 'g':  case 'h':  case 'i':
1200			case 'j':  case 'k':  case 'l':  case 'm':
1201			case 'n':  case 'o':  case 'p':  case 'q':
1202			case 'r':  case 's':  case 't':  case 'u':
1203			case 'v':  case 'w':  case 'x':  case 'y':
1204			case 'z':
1205			{
1206				mID_ELEMENT(false);
1207				break;
1208			}
1209			default:
1210				if ((LA(1)=='#') && (LA(2)=='(')) {
1211					_saveIndex=text.length();
1212					match('#');
1213					text.setLength(_saveIndex);
1214					mTREE(false);
1215				}
1216				else if ((LA(1)=='#') && (LA(2)=='[')) {
1217					_saveIndex=text.length();
1218					match('#');
1219					text.setLength(_saveIndex);
1220					mAST_CONSTRUCTOR(false);
1221				}
1222				else if ((LA(1)=='#') && (_tokenSet_2.member(LA(2)))) {
1223					_saveIndex=text.length();
1224					match('#');
1225					text.setLength(_saveIndex);
1226					mID_ELEMENT(true);
1227					id=_returnToken;
1228					String t=generator.mapTreeId(id.getText(), null); text.setLength(_begin); text.append(t);
1229				}
1230				else if ((LA(1)=='#') && (LA(2)=='#')) {
1231					match("##");
1232					String t = currentRule.getRuleName()+"_AST"; text.setLength(_begin); text.append(t);
1233				}
1234			else {
1235				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1236			}
1237			}
1238			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1239				_token = makeToken(_ttype);
1240				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1241			}
1242			_returnToken = _token;
1243		}
1244		
1245	/** An ID_ELEMENT can be a func call, array ref, simple var,
1246	 *  or AST label ref.
1247	 */
1248		protected final void mID_ELEMENT(boolean _createToken) throws ScannerException, IOException {
1249			int _ttype; Token _token=null; int _begin=text.length();
1250			_ttype = ID_ELEMENT;
1251			int _saveIndex;
1252			Token id=null;
1253			
1254			mID(true);
1255			id=_returnToken;
1256			{
1257			if ((_tokenSet_3.member(LA(1))) && (_tokenSet_8.member(LA(2)))) {
1258				_saveIndex=text.length();
1259				mWS(false);
1260				text.setLength(_saveIndex);
1261			}
1262			else if ((_tokenSet_8.member(LA(1)))) {
1263			}
1264			else {
1265				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1266			}
1267			
1268			}
1269			{
1270			switch ( LA(1)) {
1271			case '(':
1272			{
1273				match('(');
1274				{
1275				if ((_tokenSet_3.member(LA(1))) && (_tokenSet_9.member(LA(2)))) {
1276					_saveIndex=text.length();
1277					mWS(false);
1278					text.setLength(_saveIndex);
1279				}
1280				else if ((_tokenSet_9.member(LA(1))) && ((LA(2) >= '\3' && LA(2) <= '~'))) {
1281				}
1282				else {
1283					throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1284				}
1285				
1286				}
1287				{
1288				switch ( LA(1)) {
1289				case '"':  case '#':  case '\'':  case '(':
1290				case '0':  case '1':  case '2':  case '3':
1291				case '4':  case '5':  case '6':  case '7':
1292				case '8':  case '9':  case 'A':  case 'B':
1293				case 'C':  case 'D':  case 'E':  case 'F':
1294				case 'G':  case 'H':  case 'I':  case 'J':
1295				case 'K':  case 'L':  case 'M':  case 'N':
1296				case 'O':  case 'P':  case 'Q':  case 'R':
1297				case 'S':  case 'T':  case 'U':  case 'V':
1298				case 'W':  case 'X':  case 'Y':  case 'Z':
1299				case '[':  case '_':  case 'a':  case 'b':
1300				case 'c':  case 'd':  case 'e':  case 'f':
1301				case 'g':  case 'h':  case 'i':  case 'j':
1302				case 'k':  case 'l':  case 'm':  case 'n':
1303				case 'o':  case 'p':  case 'q':  case 'r':
1304				case 's':  case 't':  case 'u':  case 'v':
1305				case 'w':  case 'x':  case 'y':  case 'z':
1306				{
1307					mARG(false);
1308					{
1309					_loop39:
1310					do {
1311						if ((LA(1)==',')) {
1312							match(',');
1313							{
1314							switch ( LA(1)) {
1315							case '\t':  case '\n':  case '\r':  case ' ':
1316							{
1317								_saveIndex=text.length();
1318								mWS(false);
1319								text.setLength(_saveIndex);
1320								break;
1321							}
1322							case '"':  case '#':  case '\'':  case '(':
1323							case '0':  case '1':  case '2':  case '3':
1324							case '4':  case '5':  case '6':  case '7':
1325							case '8':  case '9':  case 'A':  case 'B':
1326							case 'C':  case 'D':  case 'E':  case 'F':
1327							case 'G':  case 'H':  case 'I':  case 'J':
1328							case 'K':  case 'L':  case 'M':  case 'N':
1329							case 'O':  case 'P':  case 'Q':  case 'R':
1330							case 'S':  case 'T':  case 'U':  case 'V':
1331							case 'W':  case 'X':  case 'Y':  case 'Z':
1332							case '[':  case '_':  case 'a':  case 'b':
1333							case 'c':  case 'd':  case 'e':  case 'f':
1334							case 'g':  case 'h':  case 'i':  case 'j':
1335							case 'k':  case 'l':  case 'm':  case 'n':
1336							case 'o':  case 'p':  case 'q':  case 'r':
1337							case 's':  case 't':  case 'u':  case 'v':
1338							case 'w':  case 'x':  case 'y':  case 'z':
1339							{
1340								break;
1341							}
1342							default:
1343							{
1344								throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1345							}
1346							}
1347							}
1348							mARG(false);
1349						}
1350						else {
1351							break _loop39;
1352						}
1353						
1354					} while (true);
1355					}
1356					break;
1357				}
1358				case '\t':  case '\n':  case '\r':  case ' ':
1359				case ')':
1360				{
1361					break;
1362				}
1363				default:
1364				{
1365					throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1366				}
1367				}
1368				}
1369				{
1370				switch ( LA(1)) {
1371				case '\t':  case '\n':  case '\r':  case ' ':
1372				{
1373					_saveIndex=text.length();
1374					mWS(false);
1375					text.setLength(_saveIndex);
1376					break;
1377				}
1378				case ')':
1379				{
1380					break;
1381				}
1382				default:
1383				{
1384					throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1385				}
1386				}
1387				}
1388				match(')');
1389				break;
1390			}
1391			case '[':
1392			{
1393				{
1394				int _cnt44=0;
1395				_loop44:
1396				do {
1397					if ((LA(1)=='[')) {
1398						match('[');
1399						{
1400						switch ( LA(1)) {
1401						case '\t':  case '\n':  case '\r':  case ' ':
1402						{
1403							_saveIndex=text.length();
1404							mWS(false);
1405							text.setLength(_saveIndex);
1406							break;
1407						}
1408						case '"':  case '#':  case '\'':  case '(':
1409						case '0':  case '1':  case '2':  case '3':
1410						case '4':  case '5':  case '6':  case '7':
1411						case '8':  case '9':  case 'A':  case 'B':
1412						case 'C':  case 'D':  case 'E':  case 'F':
1413						case 'G':  case 'H':  case 'I':  case 'J':
1414						case 'K':  case 'L':  case 'M':  case 'N':
1415						case 'O':  case 'P':  case 'Q':  case 'R':
1416						case 'S':  case 'T':  case 'U':  case 'V':
1417						case 'W':  case 'X':  case 'Y':  case 'Z':
1418						case '[':  case '_':  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						{
1426							break;
1427						}
1428						default:
1429						{
1430							throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1431						}
1432						}
1433						}
1434						mARG(false);
1435						{
1436						switch ( LA(1)) {
1437						case '\t':  case '\n':  case '\r':  case ' ':
1438						{
1439							_saveIndex=text.length();
1440							mWS(false);
1441							text.setLength(_saveIndex);
1442							break;
1443						}
1444						case ']':
1445						{
1446							break;
1447						}
1448						default:
1449						{
1450							throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1451						}
1452						}
1453						}
1454						match(']');
1455					}
1456					else {
1457						if ( _cnt44>=1 ) { break _loop44; } else {throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());}
1458					}
1459					
1460					_cnt44++;
1461				} while (true);
1462				}
1463				break;
1464			}
1465			case '.':
1466			{
1467				match('.');
1468				mID_ELEMENT(false);
1469				break;
1470			}
1471			case '\t':  case '\n':  case '\r':  case ' ':
1472			case ')':  case '*':  case '+':  case ',':
1473			case '-':  case '/':  case '=':  case ']':
1474			{
1475				
1476							String t=generator.mapTreeId(id.getText(), transInfo);
1477							text.setLength(_begin); text.append(t);
1478							
1479				{
1480				if ((_tokenSet_3.member(LA(1))) && (_tokenSet_10.member(LA(2)))) {
1481					mWS(false);
1482				}
1483				else if ((_tokenSet_10.member(LA(1)))) {
1484				}
1485				else {
1486					throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1487				}
1488				
1489				}
1490				{
1491				if (((LA(1)=='='))&&(transInfo!=null && transInfo.refRuleRoot!=null)) {
1492					mVAR_ASSIGN(false);
1493				}
1494				else if ((_tokenSet_11.member(LA(1)))) {
1495				}
1496				else {
1497					throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1498				}
1499				
1500				}
1501				break;
1502			}
1503			default:
1504			{
1505				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1506			}
1507			}
1508			}
1509			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1510				_token = makeToken(_ttype);
1511				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1512			}
1513			_returnToken = _token;
1514		}
1515		
1516	/** The arguments of a #[...] constructor are text, token type,
1517	 *  or a tree.
1518	 */
1519		protected final void mAST_CTOR_ELEMENT(boolean _createToken) throws ScannerException, IOException {
1520			int _ttype; Token _token=null; int _begin=text.length();
1521			_ttype = AST_CTOR_ELEMENT;
1522			int _saveIndex;
1523			
1524			switch ( LA(1)) {
1525			case '"':
1526			{
1527				mSTRING(false);
1528				break;
1529			}
1530			case '0':  case '1':  case '2':  case '3':
1531			case '4':  case '5':  case '6':  case '7':
1532			case '8':  case '9':
1533			{
1534				mINT(false);
1535				break;
1536			}
1537			case '#':  case '(':  case 'A':  case 'B':
1538			case 'C':  case 'D':  case 'E':  case 'F':
1539			case 'G':  case 'H':  case 'I':  case 'J':
1540			case 'K':  case 'L':  case 'M':  case 'N':
1541			case 'O':  case 'P':  case 'Q':  case 'R':
1542			case 'S':  case 'T':  case 'U':  case 'V':
1543			case 'W':  case 'X':  case 'Y':  case 'Z':
1544			case '[':  case '_':  case 'a':  case 'b':
1545			case 'c':  case 'd':  case 'e':  case 'f':
1546			case 'g':  case 'h':  case 'i':  case 'j':
1547			case 'k':  case 'l':  case 'm':  case 'n':
1548			case 'o':  case 'p':  case 'q':  case 'r':
1549			case 's':  case 't':  case 'u':  case 'v':
1550			case 'w':  case 'x':  case 'y':  case 'z':
1551			{
1552				mTREE_ELEMENT(false);
1553				break;
1554			}
1555			default:
1556			{
1557				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1558			}
1559			}
1560			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1561				_token = makeToken(_ttype);
1562				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1563			}
1564			_returnToken = _token;
1565		}
1566		
1567		protected final void mINT(boolean _createToken) throws ScannerException, IOException {
1568			int _ttype; Token _token=null; int _begin=text.length();
1569			_ttype = INT;
1570			int _saveIndex;
1571			
1572			{
1573			int _cnt106=0;
1574			_loop106:
1575			do {
1576				if (((LA(1) >= '0' && LA(1) <= '9'))) {
1577					mDIGIT(false);
1578				}
1579				else {
1580					if ( _cnt106>=1 ) { break _loop106; } else {throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());}
1581				}
1582				
1583				_cnt106++;
1584			} while (true);
1585			}
1586			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1587				_token = makeToken(_ttype);
1588				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1589			}
1590			_returnToken = _token;
1591		}
1592		
1593		protected final void mARG(boolean _createToken) throws ScannerException, IOException {
1594			int _ttype; Token _token=null; int _begin=text.length();
1595			_ttype = ARG;
1596			int _saveIndex;
1597			
1598			{
1599			switch ( LA(1)) {
1600			case '#':  case '(':  case 'A':  case 'B':
1601			case 'C':  case 'D':  case 'E':  case 'F':
1602			case 'G':  case 'H':  case 'I':  case 'J':
1603			case 'K':  case 'L':  case 'M':  case 'N':
1604			case 'O':  case 'P':  case 'Q':  case 'R':
1605			case 'S':  case 'T':  case 'U':  case 'V':
1606			case 'W':  case 'X':  case 'Y':  case 'Z':
1607			case '[':  case '_':  case 'a':  case 'b':
1608			case 'c':  case 'd':  case 'e':  case 'f':
1609			case 'g':  case 'h':  case 'i':  case 'j':
1610			case 'k':  case 'l':  case 'm':  case 'n':
1611			case 'o':  case 'p':  case 'q':  case 'r':
1612			case 's':  case 't':  case 'u':  case 'v':
1613			case 'w':  case 'x':  case 'y':  case 'z':
1614			{
1615				mTREE_ELEMENT(false);
1616				break;
1617			}
1618			case '"':
1619			{
1620				mSTRING(false);
1621				break;
1622			}
1623			case '\'':
1624			{
1625				mCHAR(false);
1626				break;
1627			}
1628			case '0':  case '1':  case '2':  case '3':
1629			case '4':  case '5':  case '6':  case '7':
1630			case '8':  case '9':
1631			{
1632				mINT_OR_FLOAT(false);
1633				break;
1634			}
1635			default:
1636			{
1637				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1638			}
1639			}
1640			}
1641			{
1642			_loop71:
1643			do {
1644				if ((_tokenSet_12.member(LA(1))) && (_tokenSet_13.member(LA(2)))) {
1645					{
1646					switch ( LA(1)) {
1647					case '\t':  case '\n':  case '\r':  case ' ':
1648					{
1649						mWS(false);
1650						break;
1651					}
1652					case '*':  case '+':  case '-':  case '/':
1653					{
1654						break;
1655					}
1656					default:
1657					{
1658						throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1659					}
1660					}
1661					}
1662					{
1663					switch ( LA(1)) {
1664					case '+':
1665					{
1666						match('+');
1667						break;
1668					}
1669					case '-':
1670					{
1671						match('-');
1672						break;
1673					}
1674					case '*':
1675					{
1676						match('*');
1677						break;
1678					}
1679					case '/':
1680					{
1681						match('/');
1682						break;
1683					}
1684					default:
1685					{
1686						throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1687					}
1688					}
1689					}
1690					{
1691					switch ( LA(1)) {
1692					case '\t':  case '\n':  case '\r':  case ' ':
1693					{
1694						mWS(false);
1695						break;
1696					}
1697					case '"':  case '#':  case '\'':  case '(':
1698					case '0':  case '1':  case '2':  case '3':
1699					case '4':  case '5':  case '6':  case '7':
1700					case '8':  case '9':  case 'A':  case 'B':
1701					case 'C':  case 'D':  case 'E':  case 'F':
1702					case 'G':  case 'H':  case 'I':  case 'J':
1703					case 'K':  case 'L':  case 'M':  case 'N':
1704					case 'O':  case 'P':  case 'Q':  case 'R':
1705					case 'S':  case 'T':  case 'U':  case 'V':
1706					case 'W':  case 'X':  case 'Y':  case 'Z':
1707					case '[':  case '_':  case 'a':  case 'b':
1708					case 'c':  case 'd':  case 'e':  case 'f':
1709					case 'g':  case 'h':  case 'i':  case 'j':
1710					case 'k':  case 'l':  case 'm':  case 'n':
1711					case 'o':  case 'p':  case 'q':  case 'r':
1712					case 's':  case 't':  case 'u':  case 'v':
1713					case 'w':  case 'x':  case 'y':  case 'z':
1714					{
1715						break;
1716					}
1717					default:
1718					{
1719						throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1720					}
1721					}
1722					}
1723					mARG(false);
1724				}
1725				else {
1726					break _loop71;
1727				}
1728				
1729			} while (true);
1730			}
1731			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1732				_token = makeToken(_ttype);
1733				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1734			}
1735			_returnToken = _token;
1736		}
1737		
1738		protected final void mTEXT_ARG_ELEMENT(boolean _createToken) throws ScannerException, IOException {
1739			int _ttype; Token _token=null; int _begin=text.length();
1740			_ttype = TEXT_ARG_ELEMENT;
1741			int _saveIndex;
1742			
1743			switch ( LA(1)) {
1744			case 'A':  case 'B':  case 'C':  case 'D':
1745			case 'E':  case 'F':  case 'G':  case 'H':
1746			case 'I':  case 'J':  case 'K':  case 'L':
1747			case 'M':  case 'N':  case 'O':  case 'P':
1748			case 'Q':  case 'R':  case 'S':  case 'T':
1749			case 'U':  case 'V':  case 'W':  case 'X':
1750			case 'Y':  case 'Z':  case '_':  case 'a':
1751			case 'b':  case 'c':  case 'd':  case 'e':
1752			case 'f':  case 'g':  case 'h':  case 'i':
1753			case 'j':  case 'k':  case 'l':  case 'm':
1754			case 'n':  case 'o':  case 'p':  case 'q':
1755			case 'r':  case 's':  case 't':  case 'u':
1756			case 'v':  case 'w':  case 'x':  case 'y':
1757			case 'z':
1758			{
1759				mTEXT_ARG_ID_ELEMENT(false);
1760				break;
1761			}
1762			case '"':
1763			{
1764				mSTRING(false);
1765				break;
1766			}
1767			case '\'':
1768			{
1769				mCHAR(false);
1770				break;
1771			}
1772			case '0':  case '1':  case '2':  case '3':
1773			case '4':  case '5':  case '6':  case '7':
1774			case '8':  case '9':
1775			{
1776				mINT_OR_FLOAT(false);
1777				break;
1778			}
1779			case '$':
1780			{
1781				mTEXT_ITEM(false);
1782				break;
1783			}
1784			case '+':
1785			{
1786				match('+');
1787				break;
1788			}
1789			default:
1790			{
1791				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1792			}
1793			}
1794			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1795				_token = makeToken(_ttype);
1796				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1797			}
1798			_returnToken = _token;
1799		}
1800		
1801		protected final void mTEXT_ARG_ID_ELEMENT(boolean _createToken) throws ScannerException, IOException {
1802			int _ttype; Token _token=null; int _begin=text.length();
1803			_ttype = TEXT_ARG_ID_ELEMENT;
1804			int _saveIndex;
1805			Token id=null;
1806			
1807			mID(true);
1808			id=_returnToken;
1809			{
1810			if ((_tokenSet_3.member(LA(1))) && (_tokenSet_14.member(LA(2)))) {
1811				_saveIndex=text.length();
1812				mWS(false);
1813				text.setLength(_saveIndex);
1814			}
1815			else if ((_tokenSet_14.member(LA(1)))) {
1816			}
1817			else {
1818				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1819			}
1820			
1821			}
1822			{
1823			switch ( LA(1)) {
1824			case '(':
1825			{
1826				match('(');
1827				{
1828				if ((_tokenSet_3.member(LA(1))) && (_tokenSet_15.member(LA(2)))) {
1829					_saveIndex=text.length();
1830					mWS(false);
1831					text.setLength(_saveIndex);
1832				}
1833				else if ((_tokenSet_15.member(LA(1))) && ((LA(2) >= '\3' && LA(2) <= '~'))) {
1834				}
1835				else {
1836					throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1837				}
1838				
1839				}
1840				{
1841				_loop59:
1842				do {
1843					if ((_tokenSet_6.member(LA(1)))) {
1844						mTEXT_ARG(false);
1845						{
1846						_loop58:
1847						do {
1848							if ((LA(1)==',')) {
1849								match(',');
1850								mTEXT_ARG(false);
1851							}
1852							else {
1853								break _loop58;
1854							}
1855							
1856						} while (true);
1857						}
1858					}
1859					else {
1860						break _loop59;
1861					}
1862					
1863				} while (true);
1864				}
1865				{
1866				switch ( LA(1)) {
1867				case '\t':  case '\n':  case '\r':  case ' ':
1868				{
1869					_saveIndex=text.length();
1870					mWS(false);
1871					text.setLength(_saveIndex);
1872					break;
1873				}
1874				case ')':
1875				{
1876					break;
1877				}
1878				default:
1879				{
1880					throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1881				}
1882				}
1883				}
1884				match(')');
1885				break;
1886			}
1887			case '[':
1888			{
1889				{
1890				int _cnt64=0;
1891				_loop64:
1892				do {
1893					if ((LA(1)=='[')) {
1894						match('[');
1895						{
1896						switch ( LA(1)) {
1897						case '\t':  case '\n':  case '\r':  case ' ':
1898						{
1899							_saveIndex=text.length();
1900							mWS(false);
1901							text.setLength(_saveIndex);
1902							break;
1903						}
1904						case '"':  case '$':  case '\'':  case '+':
1905						case '0':  case '1':  case '2':  case '3':
1906						case '4':  case '5':  case '6':  case '7':
1907						case '8':  case '9':  case 'A':  case 'B':
1908						case 'C':  case 'D':  case 'E':  case 'F':
1909						case 'G':  case 'H':  case 'I':  case 'J':
1910						case 'K':  case 'L':  case 'M':  case 'N':
1911						case 'O':  case 'P':  case 'Q':  case 'R':
1912						case 'S':  case 'T':  case 'U':  case 'V':
1913						case 'W':  case 'X':  case 'Y':  case 'Z':
1914						case '_':  case 'a':  case 'b':  case 'c':
1915						case 'd':  case 'e':  case 'f':  case 'g':
1916						case 'h':  case 'i':  case 'j':  case 'k':
1917						case 'l':  case 'm':  case 'n':  case 'o':
1918						case 'p':  case 'q':  case 'r':  case 's':
1919						case 't':  case 'u':  case 'v':  case 'w':
1920						case 'x':  case 'y':  case 'z':
1921						{
1922							break;
1923						}
1924						default:
1925						{
1926							throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1927						}
1928						}
1929						}
1930						mTEXT_ARG(false);
1931						{
1932						switch ( LA(1)) {
1933						case '\t':  case '\n':  case '\r':  case ' ':
1934						{
1935							_saveIndex=text.length();
1936							mWS(false);
1937							text.setLength(_saveIndex);
1938							break;
1939						}
1940						case ']':
1941						{
1942							break;
1943						}
1944						default:
1945						{
1946							throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
1947						}
1948						}
1949						}
1950						match(']');
1951					}
1952					else {
1953						if ( _cnt64>=1 ) { break _loop64; } else {throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());}
1954					}
1955					
1956					_cnt64++;
1957				} while (true);
1958				}
1959				break;
1960			}
1961			case '.':
1962			{
1963				match('.');
1964				mTEXT_ARG_ID_ELEMENT(false);
1965				break;
1966			}
1967			case '-':
1968			{
1969				match("->");
1970				mTEXT_ARG_ID_ELEMENT(false);
1971				break;
1972			}
1973			case ':':
1974			{
1975				match("::");
1976				mTEXT_ARG_ID_ELEMENT(false);
1977				break;
1978			}
1979			case '\t':  case '\n':  case '\r':  case ' ':
1980			case '"':  case '$':  case '\'':  case ')':
1981			case '+':  case ',':  case '0':  case '1':
1982			case '2':  case '3':  case '4':  case '5':
1983			case '6':  case '7':  case '8':  case '9':
1984			case 'A':  case 'B':  case 'C':  case 'D':
1985			case 'E':  case 'F':  case 'G':  case 'H':
1986			case 'I':  case 'J':  case 'K':  case 'L':
1987			case 'M':  case 'N':  case 'O':  case 'P':
1988			case 'Q':  case 'R':  case 'S':  case 'T':
1989			case 'U':  case 'V':  case 'W':  case 'X':
1990			case 'Y':  case 'Z':  case ']':  case '_':
1991			case 'a':  case 'b':  case 'c':  case 'd':
1992			case 'e':  case 'f':  case 'g':  case 'h':
1993			case 'i':  case 'j':  case 'k':  case 'l':
1994			case 'm':  case 'n':  case 'o':  case 'p':
1995			case 'q':  case 'r':  case 's':  case 't':
1996			case 'u':  case 'v':  case 'w':  case 'x':
1997			case 'y':  case 'z':
1998			{
1999				break;
2000			}
2001			default:
2002			{
2003				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
2004			}
2005			}
2006			}
2007			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2008				_token = makeToken(_ttype);
2009				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
2010			}
2011			_returnToken = _token;
2012		}
2013		
2014		protected final void mINT_OR_FLOAT(boolean _createToken) throws ScannerException, IOException {
2015			int _ttype; Token _token=null; int _begin=text.length();
2016			_ttype = INT_OR_FLOAT;
2017			int _saveIndex;
2018			
2019			{
2020			int _cnt109=0;
2021			_loop109:
2022			do {
2023				if (((LA(1) >= '0' && LA(1) <= '9')) && (_tokenSet_16.member(LA(2)))) {
2024					mDIGIT(false);
2025				}
2026				else {
2027					if ( _cnt109>=1 ) { break _loop109; } else {throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());}
2028				}
2029				
2030				_cnt109++;
2031			} while (true);
2032			}
2033			{
2034			if ((LA(1)=='L') && (_tokenSet_17.member(LA(2)))) {
2035				match('L');
2036			}
2037			else if ((LA(1)=='l') && (_tokenSet_17.member(LA(2)))) {
2038				match('l');
2039			}
2040			else if ((LA(1)=='.')) {
2041				match('.');
2042				{
2043				_loop112:
2044				do {
2045					if (((LA(1) >= '0' && LA(1) <= '9')) && (_tokenSet_17.member(LA(2)))) {
2046						mDIGIT(false);
2047					}
2048					else {
2049						break _loop112;
2050					}
2051					
2052				} while (true);
2053				}
2054			}
2055			else if ((_tokenSet_17.member(LA(1)))) {
2056			}
2057			else {
2058				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
2059			}
2060			
2061			}
2062			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2063				_token = makeToken(_ttype);
2064				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
2065			}
2066			_returnToken = _token;
2067		}
2068		
2069		protected final void mSL_COMMENT(boolean _createToken) throws ScannerException, IOException {
2070			int _ttype; Token _token=null; int _begin=text.length();
2071			_ttype = SL_COMMENT;
2072			int _saveIndex;
2073			
2074			match("//");
2075			{
2076			_loop83:
2077			do {
2078				if ((_tokenSet_18.member(LA(1)))) {
2079					{
2080					match(_tokenSet_18);
2081					}
2082				}
2083				else {
2084					break _loop83;
2085				}
2086				
2087			} while (true);
2088			}
2089			{
2090			switch ( LA(1)) {
2091			case '\n':
2092			{
2093				match('\n');
2094				break;
2095			}
2096			case '\r':
2097			{
2098				match('\r');
2099				{
2100				if ((LA(1)=='\n')) {
2101					match('\n');
2102				}
2103				else {
2104				}
2105				
2106				}
2107				break;
2108			}
2109			default:
2110			{
2111				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
2112			}
2113			}
2114			}
2115			newline();
2116			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2117				_token = makeToken(_ttype);
2118				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
2119			}
2120			_returnToken = _token;
2121		}
2122		
2123		protected final void mML_COMMENT(boolean _createToken) throws ScannerException, IOException {
2124			int _ttype; Token _token=null; int _begin=text.length();
2125			_ttype = ML_COMMENT;
2126			int _saveIndex;
2127			
2128			match("/*");
2129			{
2130			_loop90:
2131			do {
2132				switch ( LA(1)) {
2133				case '\r':
2134				{
2135					match('\r');
2136					{
2137					if ((LA(1)=='\n') && ((LA(2) >= '\3' && LA(2) <= '~'))) {
2138						match('\n');
2139					}
2140					else if (((LA(1) >= '\3' && LA(1) <= '~')) && ((LA(2) >= '\3' && LA(2) <= '~'))) {
2141					}
2142					else {
2143						throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
2144					}
2145					
2146					}
2147					newline();
2148					break;
2149				}
2150				case '\n':
2151				{
2152					match('\n');
2153					newline();
2154					break;
2155				}
2156				case '\3':  case '\4':  case '\5':  case '\6':
2157				case '\7':  case '\10':  case '\t':  case '\13':
2158				case '\14':  case '\16':  case '\17':  case '\20':
2159				case '\21':  case '\22':  case '\23':  case '\24':
2160				case '\25':  case '\26':  case '\27':  case '\30':
2161				case '\31':  case '\32':  case '\33':  case '\34':
2162				case '\35':  case '\36':  case '\37':  case ' ':
2163				case '!':  case '"':  case '#':  case '$':
2164				case '%':  case '&':  case '\'':  case '(':
2165				case ')':  case '+':  case ',':  case '-':
2166				case '.':  case '/':  case '0':  case '1':
2167				case '2':  case '3':  case '4':  case '5':
2168				case '6':  case '7':  case '8':  case '9':
2169				case ':':  case ';':  case '<':  case '=':
2170				case '>':  case '?':  case '@':  case 'A':
2171				case 'B':  case 'C':  case 'D':  case 'E':
2172				case 'F':  case 'G':  case 'H':  case 'I':
2173				case 'J':  case 'K':  case 'L':  case 'M':
2174				case 'N':  case 'O':  case 'P':  case 'Q':
2175				case 'R':  case 'S':  case 'T':  case 'U':
2176				case 'V':  case 'W':  case 'X':  case 'Y':
2177				case 'Z':  case '[':  case '\\':  case ']':
2178				case '^':  case '_':  case '`':  case 'a':
2179				case 'b':  case 'c':  case 'd':  case 'e':
2180				case 'f':  case 'g':  case 'h':  case 'i':
2181				case 'j':  case 'k':  case 'l':  case 'm':
2182				case 'n':  case 'o':  case 'p':  case 'q':
2183				case 'r':  case 's':  case 't':  case 'u':
2184				case 'v':  case 'w':  case 'x':  case 'y':
2185				case 'z':  case '{':  case '|':  case '}':
2186				case '~':
2187				{
2188					{
2189					match(_tokenSet_19);
2190					}
2191					break;
2192				}
2193				default:
2194					if (((LA(1)=='*') && ((LA(2) >= '\3' && LA(2) <= '~')))&&( LA(2)!='/' )) {
2195						match('*');
2196					}
2197				else {
2198					break _loop90;
2199				}
2200				}
2201			} while (true);
2202			}
2203			match("*/");
2204			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2205				_token = makeToken(_ttype);
2206				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
2207			}
2208			_returnToken = _token;
2209		}
2210		
2211		protected final void mESC(boolean _createToken) throws ScannerException, IOException {
2212			int _ttype; Token _token=null; int _begin=text.length();
2213			_ttype = ESC;
2214			int _saveIndex;
2215			
2216			match('\\');
2217			{
2218			switch ( LA(1)) {
2219			case 'n':
2220			{
2221				match('n');
2222				break;
2223			}
2224			case 'r':
2225			{
2226				match('r');
2227				break;
2228			}
2229			case 't':
2230			{
2231				match('t');
2232				break;
2233			}
2234			case 'b':
2235			{
2236				match('b');
2237				break;
2238			}
2239			case 'f':
2240			{
2241				match('f');
2242				break;
2243			}
2244			case '"':
2245			{
2246				match('"');
2247				break;
2248			}
2249			case '\'':
2250			{
2251				match('\'');
2252				break;
2253			}
2254			case '\\':
2255			{
2256				match('\\');
2257				break;
2258			}
2259			case '0':  case '1':  case '2':  case '3':
2260			{
2261				{
2262				matchRange('0','3');
2263				}
2264				{
2265				if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\3' && LA(2) <= '~'))) {
2266					mDIGIT(false);
2267					{
2268					if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\3' && LA(2) <= '~'))) {
2269						mDIGIT(false);
2270					}
2271					else if (((LA(1) >= '\3' && LA(1) <= '~'))) {
2272					}
2273					else {
2274						throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
2275					}
2276					
2277					}
2278				}
2279				else if (((LA(1) >= '\3' && LA(1) <= '~'))) {
2280				}
2281				else {
2282					throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
2283				}
2284				
2285				}
2286				break;
2287			}
2288			case '4':  case '5':  case '6':  case '7':
2289			{
2290				{
2291				matchRange('4','7');
2292				}
2293				{
2294				if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\3' && LA(2) <= '~'))) {
2295					mDIGIT(false);
2296				}
2297				else if (((LA(1) >= '\3' && LA(1) <= '~'))) {
2298				}
2299				else {
2300					throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
2301				}
2302				
2303				}
2304				break;
2305			}
2306			default:
2307			{
2308				throw new ScannerException("no viable alt for char: "+(char)LA(1),getLine());
2309			}
2310			}
2311			}
2312			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2313				_token = makeToken(_ttype);
2314				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
2315			}
2316			_returnToken = _token;
2317		}
2318		
2319		protected final void mDIGIT(boolean _createToken) throws ScannerException, IOException {
2320			int _ttype; Token _token=null; int _begin=text.length();
2321			_ttype = DIGIT;
2322			int _saveIndex;
2323			
2324			matchRange('0','9');
2325			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2326				_token = makeToken(_ttype);
2327				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
2328			}
2329			_returnToken = _token;
2330		}
2331		
2332		
2333		private static final long _tokenSet_0_data_[] = { -141407503262728L, 9223372036854775807L, 0L, 0L };
2334		public static final BitSet _tokenSet_0 = new BitSet(_tokenSet_0_data_);
2335		private static final long _tokenSet_1_data_[] = { -145135534866440L, 9223372036854775807L, 0L, 0L };
2336		public static final BitSet _tokenSet_1 = new BitSet(_tokenSet_1_data_);
2337		private static final long _tokenSet_2_data_[] = { 0L, 576460745995190270L, 0L, 0L };
2338		public static final BitSet _tokenSet_2 = new BitSet(_tokenSet_2_data_);
2339		private static final long _tokenSet_3_data_[] = { 4294977024L, 0L, 0L };
2340		public static final BitSet _tokenSet_3 = new BitSet(_tokenSet_3_data_);
2341		private static final long _tokenSet_4_data_[] = { 287948901175001088L, 576460745995190270L, 0L, 0L };
2342		public static final BitSet _tokenSet_4 = new BitSet(_tokenSet_4_data_);
2343		private static final long _tokenSet_5_data_[] = { -2305843009213693960L, 9223372036854775807L, 0L, 0L };
2344		public static final BitSet _tokenSet_5 = new BitSet(_tokenSet_5_data_);
2345		private static final long _tokenSet_6_data_[] = { 287958332923183104L, 576460745995190270L, 0L, 0L };
2346		public static final BitSet _tokenSet_6 = new BitSet(_tokenSet_6_data_);
2347		private static final long _tokenSet_7_data_[] = { 287978128427460096L, 576460746532061182L, 0L, 0L };
2348		public static final BitSet _tokenSet_7 = new BitSet(_tokenSet_7_data_);
2349		private static final long _tokenSet_8_data_[] = { 2306123388973753856L, 671088640L, 0L, 0L };
2350		public static final BitSet _tokenSet_8 = new BitSet(_tokenSet_8_data_);
2351		private static final long _tokenSet_9_data_[] = { 287952805300282880L, 576460746129407998L, 0L, 0L };
2352		public static final BitSet _tokenSet_9 = new BitSet(_tokenSet_9_data_);
2353		private static final long _tokenSet_10_data_[] = { 2306051920717948416L, 536870912L, 0L, 0L };
2354		public static final BitSet _tokenSet_10 = new BitSet(_tokenSet_10_data_);
2355		private static final long _tokenSet_11_data_[] = { 208911504254464L, 536870912L, 0L, 0L };
2356		public static final BitSet _tokenSet_11 = new BitSet(_tokenSet_11_data_);
2357		private static final long _tokenSet_12_data_[] = { 189120294954496L, 0L, 0L };
2358		public static final BitSet _tokenSet_12 = new BitSet(_tokenSet_12_data_);
2359		private static final long _tokenSet_13_data_[] = { 288139722277004800L, 576460746129407998L, 0L, 0L };
2360		public static final BitSet _tokenSet_13 = new BitSet(_tokenSet_13_data_);
2361		private static final long _tokenSet_14_data_[] = { 576315157207066112L, 576460746666278910L, 0L, 0L };
2362		public static final BitSet _tokenSet_14 = new BitSet(_tokenSet_14_data_);
2363		private static final long _tokenSet_15_data_[] = { 287960536241415680L, 576460745995190270L, 0L, 0L };
2364		public static final BitSet _tokenSet_15 = new BitSet(_tokenSet_15_data_);
2365		private static final long _tokenSet_16_data_[] = { 288228817078593024L, 576460746532061182L, 0L, 0L };
2366		public static final BitSet _tokenSet_16 = new BitSet(_tokenSet_16_data_);
2367		private static final long _tokenSet_17_data_[] = { 288158448334415360L, 576460746532061182L, 0L, 0L };
2368		public static final BitSet _tokenSet_17 = new BitSet(_tokenSet_17_data_);
2369		private static final long _tokenSet_18_data_[] = { -9224L, 9223372036854775807L, 0L, 0L };
2370		public static final BitSet _tokenSet_18 = new BitSet(_tokenSet_18_data_);
2371		private static final long _tokenSet_19_data_[] = { -4398046520328L, 9223372036854775807L, 0L, 0L };
2372		public static final BitSet _tokenSet_19 = new BitSet(_tokenSet_19_data_);
2373		
2374		}
2375