FileDocCategorySizeDatePackage
ActionLexer.javaAPI DocGlassfish v2 API64372Wed Feb 08 12:31:10 GMT 2006persistence.antlr.actions.java

ActionLexer

public class ActionLexer extends CharScanner implements TokenStream, ActionLexerTokenTypes
Perform the following translations: AST related translations ## -> currentRule_AST #(x,y,z) -> codeGenerator.getASTCreateString(vector-of(x,y,z)) #[x] -> codeGenerator.getASTCreateString(x) #x -> codeGenerator.mapTreeId(x) Inside context of #(...), you can ref (x,y,z), [x], and x as shortcuts. Text related translations $append(x) -> text.append(x) $setText(x) -> text.setLength(_begin); text.append(x) $getText -> new String(text.getBuffer(),_begin,text.length()-_begin) $setToken(x) -> _token = x $setType(x) -> _ttype = x $FOLLOW(r) -> FOLLOW set name for rule r (optional arg) $FIRST(r) -> FIRST set name for rule r (optional arg)

Fields Summary
protected RuleBlock
currentRule
protected CodeGenerator
generator
protected int
lineOffset
private Tool
antlrTool
ActionTransInfo
transInfo
public static final BitSet
_tokenSet_0
public static final BitSet
_tokenSet_1
public static final BitSet
_tokenSet_2
public static final BitSet
_tokenSet_3
public static final BitSet
_tokenSet_4
public static final BitSet
_tokenSet_5
public static final BitSet
_tokenSet_6
public static final BitSet
_tokenSet_7
public static final BitSet
_tokenSet_8
public static final BitSet
_tokenSet_9
public static final BitSet
_tokenSet_10
public static final BitSet
_tokenSet_11
public static final BitSet
_tokenSet_12
public static final BitSet
_tokenSet_13
public static final BitSet
_tokenSet_14
public static final BitSet
_tokenSet_15
public static final BitSet
_tokenSet_16
public static final BitSet
_tokenSet_17
public static final BitSet
_tokenSet_18
public static final BitSet
_tokenSet_19
public static final BitSet
_tokenSet_20
public static final BitSet
_tokenSet_21
public static final BitSet
_tokenSet_22
public static final BitSet
_tokenSet_23
public static final BitSet
_tokenSet_24
public static final BitSet
_tokenSet_25
Constructors Summary
public ActionLexer(String s, RuleBlock currentRule, CodeGenerator generator, ActionTransInfo transInfo)


 	   
						 
						 
						  
		this(new StringReader(s));
		this.currentRule = currentRule;
		this.generator = generator;
		this.transInfo = transInfo;
	
public ActionLexer(LexerSharedInputState state)

	super(state);
	caseSensitiveLiterals = true;
	setCaseSensitive(true);
	literals = new Hashtable();
public ActionLexer(InputStream in)

	this(new ByteBuffer(in));
public ActionLexer(Reader in)

	this(new CharBuffer(in));
public ActionLexer(InputBuffer ib)

	this(new LexerSharedInputState(ib));
Methods Summary
public final voidmACTION(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = ACTION;
		int _saveIndex;
		
		{
		int _cnt382=0;
		_loop382:
		do {
			switch ( LA(1)) {
			case '#":
			{
				mAST_ITEM(false);
				break;
			}
			case '$":
			{
				mTEXT_ITEM(false);
				break;
			}
			default:
				if ((_tokenSet_0.member(LA(1)))) {
					mSTUFF(false);
				}
			else {
				if ( _cnt382>=1 ) { break _loop382; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
			}
			}
			_cnt382++;
		} while (true);
		}
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmARG(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = ARG;
		int _saveIndex;
		
		{
		switch ( LA(1)) {
		case '\'":
		{
			mCHAR(false);
			break;
		}
		case '0":  case '1":  case '2":  case '3":
		case '4":  case '5":  case '6":  case '7":
		case '8":  case '9":
		{
			mINT_OR_FLOAT(false);
			break;
		}
		default:
			if ((_tokenSet_18.member(LA(1))) && ((LA(2) >= '\u0003" && LA(2) <= '\u00ff")) && ((LA(3) >= '\u0003" && LA(3) <= '\u00ff"))) {
				mTREE_ELEMENT(false);
			}
			else if ((LA(1)=='"") && ((LA(2) >= '\u0003" && LA(2) <= '\u00ff")) && ((LA(3) >= '\u0003" && LA(3) <= '\u00ff"))) {
				mSTRING(false);
			}
		else {
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		}
		}
		{
		_loop459:
		do {
			if ((_tokenSet_19.member(LA(1))) && (_tokenSet_20.member(LA(2))) && ((LA(3) >= '\u0003" && LA(3) <= '\u00ff"))) {
				{
				switch ( LA(1)) {
				case '\t":  case '\n":  case '\r":  case ' ":
				{
					mWS(false);
					break;
				}
				case '*":  case '+":  case '-":  case '/":
				{
					break;
				}
				default:
				{
					throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
				}
				}
				}
				{
				switch ( LA(1)) {
				case '+":
				{
					match('+");
					break;
				}
				case '-":
				{
					match('-");
					break;
				}
				case '*":
				{
					match('*");
					break;
				}
				case '/":
				{
					match('/");
					break;
				}
				default:
				{
					throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
				}
				}
				}
				{
				switch ( LA(1)) {
				case '\t":  case '\n":  case '\r":  case ' ":
				{
					mWS(false);
					break;
				}
				case '"":  case '#":  case '\'":  case '(":
				case '0":  case '1":  case '2":  case '3":
				case '4":  case '5":  case '6":  case '7":
				case '8":  case '9":  case 'A":  case 'B":
				case 'C":  case 'D":  case 'E":  case 'F":
				case 'G":  case 'H":  case 'I":  case 'J":
				case 'K":  case 'L":  case 'M":  case 'N":
				case 'O":  case 'P":  case 'Q":  case 'R":
				case 'S":  case 'T":  case 'U":  case 'V":
				case 'W":  case 'X":  case 'Y":  case 'Z":
				case '[":  case '_":  case 'a":  case 'b":
				case 'c":  case 'd":  case 'e":  case 'f":
				case 'g":  case 'h":  case 'i":  case 'j":
				case 'k":  case 'l":  case 'm":  case 'n":
				case 'o":  case 'p":  case 'q":  case 'r":
				case 's":  case 't":  case 'u":  case 'v":
				case 'w":  case 'x":  case 'y":  case 'z":
				{
					break;
				}
				default:
				{
					throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
				}
				}
				}
				mARG(false);
			}
			else {
				break _loop459;
			}
			
		} while (true);
		}
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmAST_CONSTRUCTOR(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = AST_CONSTRUCTOR;
		int _saveIndex;
		Token x=null;
		Token y=null;
		Token z=null;
		
		_saveIndex=text.length();
		match('[");
		text.setLength(_saveIndex);
		{
		switch ( LA(1)) {
		case '\t":  case '\n":  case '\r":  case ' ":
		{
			_saveIndex=text.length();
			mWS(false);
			text.setLength(_saveIndex);
			break;
		}
		case '"":  case '#":  case '(":  case '0":
		case '1":  case '2":  case '3":  case '4":
		case '5":  case '6":  case '7":  case '8":
		case '9":  case 'A":  case 'B":  case 'C":
		case 'D":  case 'E":  case 'F":  case 'G":
		case 'H":  case 'I":  case 'J":  case 'K":
		case 'L":  case 'M":  case 'N":  case 'O":
		case 'P":  case 'Q":  case 'R":  case 'S":
		case 'T":  case 'U":  case 'V":  case 'W":
		case 'X":  case 'Y":  case 'Z":  case '[":
		case '_":  case 'a":  case 'b":  case 'c":
		case 'd":  case 'e":  case 'f":  case 'g":
		case 'h":  case 'i":  case 'j":  case 'k":
		case 'l":  case 'm":  case 'n":  case 'o":
		case 'p":  case 'q":  case 'r":  case 's":
		case 't":  case 'u":  case 'v":  case 'w":
		case 'x":  case 'y":  case 'z":
		{
			break;
		}
		default:
		{
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		}
		}
		_saveIndex=text.length();
		mAST_CTOR_ELEMENT(true);
		text.setLength(_saveIndex);
		x=_returnToken;
		{
		switch ( LA(1)) {
		case '\t":  case '\n":  case '\r":  case ' ":
		{
			_saveIndex=text.length();
			mWS(false);
			text.setLength(_saveIndex);
			break;
		}
		case ',":  case ']":
		{
			break;
		}
		default:
		{
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		}
		}
		{
		if ((LA(1)==',") && (_tokenSet_10.member(LA(2))) && ((LA(3) >= '\u0003" && LA(3) <= '\u00ff"))) {
			_saveIndex=text.length();
			match(',");
			text.setLength(_saveIndex);
			{
			switch ( LA(1)) {
			case '\t":  case '\n":  case '\r":  case ' ":
			{
				_saveIndex=text.length();
				mWS(false);
				text.setLength(_saveIndex);
				break;
			}
			case '"":  case '#":  case '(":  case '0":
			case '1":  case '2":  case '3":  case '4":
			case '5":  case '6":  case '7":  case '8":
			case '9":  case 'A":  case 'B":  case 'C":
			case 'D":  case 'E":  case 'F":  case 'G":
			case 'H":  case 'I":  case 'J":  case 'K":
			case 'L":  case 'M":  case 'N":  case 'O":
			case 'P":  case 'Q":  case 'R":  case 'S":
			case 'T":  case 'U":  case 'V":  case 'W":
			case 'X":  case 'Y":  case 'Z":  case '[":
			case '_":  case 'a":  case 'b":  case 'c":
			case 'd":  case 'e":  case 'f":  case 'g":
			case 'h":  case 'i":  case 'j":  case 'k":
			case 'l":  case 'm":  case 'n":  case 'o":
			case 'p":  case 'q":  case 'r":  case 's":
			case 't":  case 'u":  case 'v":  case 'w":
			case 'x":  case 'y":  case 'z":
			{
				break;
			}
			default:
			{
				throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
			}
			}
			}
			_saveIndex=text.length();
			mAST_CTOR_ELEMENT(true);
			text.setLength(_saveIndex);
			y=_returnToken;
			{
			switch ( LA(1)) {
			case '\t":  case '\n":  case '\r":  case ' ":
			{
				_saveIndex=text.length();
				mWS(false);
				text.setLength(_saveIndex);
				break;
			}
			case ',":  case ']":
			{
				break;
			}
			default:
			{
				throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
			}
			}
			}
		}
		else if ((LA(1)==',"||LA(1)==']") && (true) && (true)) {
		}
		else {
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		
		}
		{
		switch ( LA(1)) {
		case ',":
		{
			_saveIndex=text.length();
			match(',");
			text.setLength(_saveIndex);
			{
			switch ( LA(1)) {
			case '\t":  case '\n":  case '\r":  case ' ":
			{
				_saveIndex=text.length();
				mWS(false);
				text.setLength(_saveIndex);
				break;
			}
			case '"":  case '#":  case '(":  case '0":
			case '1":  case '2":  case '3":  case '4":
			case '5":  case '6":  case '7":  case '8":
			case '9":  case 'A":  case 'B":  case 'C":
			case 'D":  case 'E":  case 'F":  case 'G":
			case 'H":  case 'I":  case 'J":  case 'K":
			case 'L":  case 'M":  case 'N":  case 'O":
			case 'P":  case 'Q":  case 'R":  case 'S":
			case 'T":  case 'U":  case 'V":  case 'W":
			case 'X":  case 'Y":  case 'Z":  case '[":
			case '_":  case 'a":  case 'b":  case 'c":
			case 'd":  case 'e":  case 'f":  case 'g":
			case 'h":  case 'i":  case 'j":  case 'k":
			case 'l":  case 'm":  case 'n":  case 'o":
			case 'p":  case 'q":  case 'r":  case 's":
			case 't":  case 'u":  case 'v":  case 'w":
			case 'x":  case 'y":  case 'z":
			{
				break;
			}
			default:
			{
				throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
			}
			}
			}
			_saveIndex=text.length();
			mAST_CTOR_ELEMENT(true);
			text.setLength(_saveIndex);
			z=_returnToken;
			{
			switch ( LA(1)) {
			case '\t":  case '\n":  case '\r":  case ' ":
			{
				_saveIndex=text.length();
				mWS(false);
				text.setLength(_saveIndex);
				break;
			}
			case ']":
			{
				break;
			}
			default:
			{
				throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
			}
			}
			}
			break;
		}
		case ']":
		{
			break;
		}
		default:
		{
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		}
		}
		_saveIndex=text.length();
		match(']");
		text.setLength(_saveIndex);
		
				String args = x.getText();
				if ( y!=null ) {
					args += ","+y.getText();
				}
				if ( z!=null ) {
					args += ","+z.getText();
				}
				text.setLength(_begin); text.append(generator.getASTCreateString(null,args));
				
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmAST_CTOR_ELEMENT(boolean _createToken)
The arguments of a #[...] constructor are text, token type, or a tree.

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = AST_CTOR_ELEMENT;
		int _saveIndex;
		
		if ((LA(1)=='"") && ((LA(2) >= '\u0003" && LA(2) <= '\u00ff")) && ((LA(3) >= '\u0003" && LA(3) <= '\u00ff"))) {
			mSTRING(false);
		}
		else if ((_tokenSet_18.member(LA(1))) && ((LA(2) >= '\u0003" && LA(2) <= '\u00ff")) && (true)) {
			mTREE_ELEMENT(false);
		}
		else if (((LA(1) >= '0" && LA(1) <= '9"))) {
			mINT(false);
		}
		else {
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmAST_ITEM(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = AST_ITEM;
		int _saveIndex;
		Token t=null;
		Token id=null;
		Token ctor=null;
		
		if ((LA(1)=='#") && (LA(2)=='(")) {
			_saveIndex=text.length();
			match('#");
			text.setLength(_saveIndex);
			mTREE(true);
			t=_returnToken;
		}
		else if ((LA(1)=='#") && (_tokenSet_3.member(LA(2)))) {
			_saveIndex=text.length();
			match('#");
			text.setLength(_saveIndex);
			mID(true);
			id=_returnToken;
			
					String idt = id.getText();
					String var = generator.mapTreeId(idt,transInfo);
					if ( var!=null ) {
						text.setLength(_begin); text.append(var);
					}
					
			{
			if ((_tokenSet_4.member(LA(1))) && (true) && (true)) {
				mWS(false);
			}
			else {
			}
			
			}
			{
			if ((LA(1)=='=") && (true) && (true)) {
				mVAR_ASSIGN(false);
			}
			else {
			}
			
			}
		}
		else if ((LA(1)=='#") && (LA(2)=='[")) {
			_saveIndex=text.length();
			match('#");
			text.setLength(_saveIndex);
			mAST_CONSTRUCTOR(true);
			ctor=_returnToken;
		}
		else if ((LA(1)=='#") && (LA(2)=='#")) {
			match("##");
			
					String r=currentRule.getRuleName()+"_AST"; text.setLength(_begin); text.append(r);
					if ( transInfo!=null ) {
						transInfo.refRuleRoot=r;	// we ref root of tree
					}
					
			{
			if ((_tokenSet_4.member(LA(1))) && (true) && (true)) {
				mWS(false);
			}
			else {
			}
			
			}
			{
			if ((LA(1)=='=") && (true) && (true)) {
				mVAR_ASSIGN(false);
			}
			else {
			}
			
			}
		}
		else {
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmCHAR(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = CHAR;
		int _saveIndex;
		
		match('\'");
		{
		if ((LA(1)=='\\")) {
			mESC(false);
		}
		else if ((_tokenSet_8.member(LA(1)))) {
			matchNot('\'");
		}
		else {
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		
		}
		match('\'");
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmCOMMENT(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = COMMENT;
		int _saveIndex;
		
		if ((LA(1)=='/") && (LA(2)=='/")) {
			mSL_COMMENT(false);
		}
		else if ((LA(1)=='/") && (LA(2)=='*")) {
			mML_COMMENT(false);
		}
		else {
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmDIGIT(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = DIGIT;
		int _saveIndex;
		
		matchRange('0",'9");
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmESC(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = ESC;
		int _saveIndex;
		
		match('\\");
		{
		switch ( LA(1)) {
		case 'n":
		{
			match('n");
			break;
		}
		case 'r":
		{
			match('r");
			break;
		}
		case 't":
		{
			match('t");
			break;
		}
		case 'b":
		{
			match('b");
			break;
		}
		case 'f":
		{
			match('f");
			break;
		}
		case '"":
		{
			match('"");
			break;
		}
		case '\'":
		{
			match('\'");
			break;
		}
		case '\\":
		{
			match('\\");
			break;
		}
		case '0":  case '1":  case '2":  case '3":
		{
			{
			matchRange('0",'3");
			}
			{
			if (((LA(1) >= '0" && LA(1) <= '9")) && ((LA(2) >= '\u0003" && LA(2) <= '\u00ff")) && (true)) {
				mDIGIT(false);
				{
				if (((LA(1) >= '0" && LA(1) <= '9")) && ((LA(2) >= '\u0003" && LA(2) <= '\u00ff")) && (true)) {
					mDIGIT(false);
				}
				else if (((LA(1) >= '\u0003" && LA(1) <= '\u00ff")) && (true) && (true)) {
				}
				else {
					throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
				}
				
				}
			}
			else if (((LA(1) >= '\u0003" && LA(1) <= '\u00ff")) && (true) && (true)) {
			}
			else {
				throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
			}
			
			}
			break;
		}
		case '4":  case '5":  case '6":  case '7":
		{
			{
			matchRange('4",'7");
			}
			{
			if (((LA(1) >= '0" && LA(1) <= '9")) && ((LA(2) >= '\u0003" && LA(2) <= '\u00ff")) && (true)) {
				mDIGIT(false);
			}
			else if (((LA(1) >= '\u0003" && LA(1) <= '\u00ff")) && (true) && (true)) {
			}
			else {
				throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
			}
			
			}
			break;
		}
		default:
		{
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		}
		}
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmID(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = ID;
		int _saveIndex;
		
		{
		switch ( LA(1)) {
		case 'a":  case 'b":  case 'c":  case 'd":
		case 'e":  case 'f":  case 'g":  case 'h":
		case 'i":  case 'j":  case 'k":  case 'l":
		case 'm":  case 'n":  case 'o":  case 'p":
		case 'q":  case 'r":  case 's":  case 't":
		case 'u":  case 'v":  case 'w":  case 'x":
		case 'y":  case 'z":
		{
			matchRange('a",'z");
			break;
		}
		case 'A":  case 'B":  case 'C":  case 'D":
		case 'E":  case 'F":  case 'G":  case 'H":
		case 'I":  case 'J":  case 'K":  case 'L":
		case 'M":  case 'N":  case 'O":  case 'P":
		case 'Q":  case 'R":  case 'S":  case 'T":
		case 'U":  case 'V":  case 'W":  case 'X":
		case 'Y":  case 'Z":
		{
			matchRange('A",'Z");
			break;
		}
		case '_":
		{
			match('_");
			break;
		}
		default:
		{
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		}
		}
		{
		_loop464:
		do {
			if ((_tokenSet_9.member(LA(1))) && (true) && (true)) {
				{
				switch ( LA(1)) {
				case 'a":  case 'b":  case 'c":  case 'd":
				case 'e":  case 'f":  case 'g":  case 'h":
				case 'i":  case 'j":  case 'k":  case 'l":
				case 'm":  case 'n":  case 'o":  case 'p":
				case 'q":  case 'r":  case 's":  case 't":
				case 'u":  case 'v":  case 'w":  case 'x":
				case 'y":  case 'z":
				{
					matchRange('a",'z");
					break;
				}
				case 'A":  case 'B":  case 'C":  case 'D":
				case 'E":  case 'F":  case 'G":  case 'H":
				case 'I":  case 'J":  case 'K":  case 'L":
				case 'M":  case 'N":  case 'O":  case 'P":
				case 'Q":  case 'R":  case 'S":  case 'T":
				case 'U":  case 'V":  case 'W":  case 'X":
				case 'Y":  case 'Z":
				{
					matchRange('A",'Z");
					break;
				}
				case '0":  case '1":  case '2":  case '3":
				case '4":  case '5":  case '6":  case '7":
				case '8":  case '9":
				{
					matchRange('0",'9");
					break;
				}
				case '_":
				{
					match('_");
					break;
				}
				default:
				{
					throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
				}
				}
				}
			}
			else {
				break _loop464;
			}
			
		} while (true);
		}
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final booleanmID_ELEMENT(boolean _createToken)
An ID_ELEMENT can be a func call, array ref, simple var, or AST label ref.

		boolean mapped=false;
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = ID_ELEMENT;
		int _saveIndex;
		Token id=null;
		
		mID(true);
		id=_returnToken;
		{
		if ((_tokenSet_4.member(LA(1))) && (_tokenSet_13.member(LA(2))) && (true)) {
			_saveIndex=text.length();
			mWS(false);
			text.setLength(_saveIndex);
		}
		else if ((_tokenSet_13.member(LA(1))) && (true) && (true)) {
		}
		else {
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		
		}
		{
		switch ( LA(1)) {
		case '(":
		{
			match('(");
			{
			if ((_tokenSet_4.member(LA(1))) && (_tokenSet_14.member(LA(2))) && ((LA(3) >= '\u0003" && LA(3) <= '\u00ff"))) {
				_saveIndex=text.length();
				mWS(false);
				text.setLength(_saveIndex);
			}
			else if ((_tokenSet_14.member(LA(1))) && ((LA(2) >= '\u0003" && LA(2) <= '\u00ff")) && (true)) {
			}
			else {
				throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
			}
			
			}
			{
			switch ( LA(1)) {
			case '"":  case '#":  case '\'":  case '(":
			case '0":  case '1":  case '2":  case '3":
			case '4":  case '5":  case '6":  case '7":
			case '8":  case '9":  case 'A":  case 'B":
			case 'C":  case 'D":  case 'E":  case 'F":
			case 'G":  case 'H":  case 'I":  case 'J":
			case 'K":  case 'L":  case 'M":  case 'N":
			case 'O":  case 'P":  case 'Q":  case 'R":
			case 'S":  case 'T":  case 'U":  case 'V":
			case 'W":  case 'X":  case 'Y":  case 'Z":
			case '[":  case '_":  case 'a":  case 'b":
			case 'c":  case 'd":  case 'e":  case 'f":
			case 'g":  case 'h":  case 'i":  case 'j":
			case 'k":  case 'l":  case 'm":  case 'n":
			case 'o":  case 'p":  case 'q":  case 'r":
			case 's":  case 't":  case 'u":  case 'v":
			case 'w":  case 'x":  case 'y":  case 'z":
			{
				mARG(false);
				{
				_loop426:
				do {
					if ((LA(1)==',")) {
						match(',");
						{
						switch ( LA(1)) {
						case '\t":  case '\n":  case '\r":  case ' ":
						{
							_saveIndex=text.length();
							mWS(false);
							text.setLength(_saveIndex);
							break;
						}
						case '"":  case '#":  case '\'":  case '(":
						case '0":  case '1":  case '2":  case '3":
						case '4":  case '5":  case '6":  case '7":
						case '8":  case '9":  case 'A":  case 'B":
						case 'C":  case 'D":  case 'E":  case 'F":
						case 'G":  case 'H":  case 'I":  case 'J":
						case 'K":  case 'L":  case 'M":  case 'N":
						case 'O":  case 'P":  case 'Q":  case 'R":
						case 'S":  case 'T":  case 'U":  case 'V":
						case 'W":  case 'X":  case 'Y":  case 'Z":
						case '[":  case '_":  case 'a":  case 'b":
						case 'c":  case 'd":  case 'e":  case 'f":
						case 'g":  case 'h":  case 'i":  case 'j":
						case 'k":  case 'l":  case 'm":  case 'n":
						case 'o":  case 'p":  case 'q":  case 'r":
						case 's":  case 't":  case 'u":  case 'v":
						case 'w":  case 'x":  case 'y":  case 'z":
						{
							break;
						}
						default:
						{
							throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
						}
						}
						}
						mARG(false);
					}
					else {
						break _loop426;
					}
					
				} while (true);
				}
				break;
			}
			case '\t":  case '\n":  case '\r":  case ' ":
			case ')":
			{
				break;
			}
			default:
			{
				throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
			}
			}
			}
			{
			switch ( LA(1)) {
			case '\t":  case '\n":  case '\r":  case ' ":
			{
				_saveIndex=text.length();
				mWS(false);
				text.setLength(_saveIndex);
				break;
			}
			case ')":
			{
				break;
			}
			default:
			{
				throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
			}
			}
			}
			match(')");
			break;
		}
		case '[":
		{
			{
			int _cnt431=0;
			_loop431:
			do {
				if ((LA(1)=='[")) {
					match('[");
					{
					switch ( LA(1)) {
					case '\t":  case '\n":  case '\r":  case ' ":
					{
						_saveIndex=text.length();
						mWS(false);
						text.setLength(_saveIndex);
						break;
					}
					case '"":  case '#":  case '\'":  case '(":
					case '0":  case '1":  case '2":  case '3":
					case '4":  case '5":  case '6":  case '7":
					case '8":  case '9":  case 'A":  case 'B":
					case 'C":  case 'D":  case 'E":  case 'F":
					case 'G":  case 'H":  case 'I":  case 'J":
					case 'K":  case 'L":  case 'M":  case 'N":
					case 'O":  case 'P":  case 'Q":  case 'R":
					case 'S":  case 'T":  case 'U":  case 'V":
					case 'W":  case 'X":  case 'Y":  case 'Z":
					case '[":  case '_":  case 'a":  case 'b":
					case 'c":  case 'd":  case 'e":  case 'f":
					case 'g":  case 'h":  case 'i":  case 'j":
					case 'k":  case 'l":  case 'm":  case 'n":
					case 'o":  case 'p":  case 'q":  case 'r":
					case 's":  case 't":  case 'u":  case 'v":
					case 'w":  case 'x":  case 'y":  case 'z":
					{
						break;
					}
					default:
					{
						throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
					}
					}
					}
					mARG(false);
					{
					switch ( LA(1)) {
					case '\t":  case '\n":  case '\r":  case ' ":
					{
						_saveIndex=text.length();
						mWS(false);
						text.setLength(_saveIndex);
						break;
					}
					case ']":
					{
						break;
					}
					default:
					{
						throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
					}
					}
					}
					match(']");
				}
				else {
					if ( _cnt431>=1 ) { break _loop431; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
				}
				
				_cnt431++;
			} while (true);
			}
			break;
		}
		case '.":
		{
			match('.");
			mID_ELEMENT(false);
			break;
		}
		case '\t":  case '\n":  case '\r":  case ' ":
		case ')":  case '*":  case '+":  case ',":
		case '-":  case '/":  case '=":  case ']":
		{
			
							mapped = true;
							String t = generator.mapTreeId(id.getText(), transInfo);
							text.setLength(_begin); text.append(t);
						
			{
			if (((_tokenSet_15.member(LA(1))) && (_tokenSet_16.member(LA(2))) && (true))&&(transInfo!=null && transInfo.refRuleRoot!=null)) {
				{
				switch ( LA(1)) {
				case '\t":  case '\n":  case '\r":  case ' ":
				{
					mWS(false);
					break;
				}
				case '=":
				{
					break;
				}
				default:
				{
					throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
				}
				}
				}
				mVAR_ASSIGN(false);
			}
			else if ((_tokenSet_17.member(LA(1))) && (true) && (true)) {
			}
			else {
				throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
			}
			
			}
			break;
		}
		default:
		{
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		}
		}
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
		return mapped;
	
protected final voidmINT(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = INT;
		int _saveIndex;
		
		{
		int _cnt489=0;
		_loop489:
		do {
			if (((LA(1) >= '0" && LA(1) <= '9"))) {
				mDIGIT(false);
			}
			else {
				if ( _cnt489>=1 ) { break _loop489; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
			}
			
			_cnt489++;
		} while (true);
		}
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmINT_OR_FLOAT(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = INT_OR_FLOAT;
		int _saveIndex;
		
		{
		int _cnt492=0;
		_loop492:
		do {
			if (((LA(1) >= '0" && LA(1) <= '9")) && (_tokenSet_24.member(LA(2))) && (true)) {
				mDIGIT(false);
			}
			else {
				if ( _cnt492>=1 ) { break _loop492; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
			}
			
			_cnt492++;
		} while (true);
		}
		{
		if ((LA(1)=='L") && (_tokenSet_25.member(LA(2))) && (true)) {
			match('L");
		}
		else if ((LA(1)=='l") && (_tokenSet_25.member(LA(2))) && (true)) {
			match('l");
		}
		else if ((LA(1)=='.")) {
			match('.");
			{
			_loop495:
			do {
				if (((LA(1) >= '0" && LA(1) <= '9")) && (_tokenSet_25.member(LA(2))) && (true)) {
					mDIGIT(false);
				}
				else {
					break _loop495;
				}
				
			} while (true);
			}
		}
		else if ((_tokenSet_25.member(LA(1))) && (true) && (true)) {
		}
		else {
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		
		}
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmML_COMMENT(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = ML_COMMENT;
		int _saveIndex;
		
		match("/*");
		{
		_loop473:
		do {
			// nongreedy exit test
			if ((LA(1)=='*") && (LA(2)=='/") && (true)) break _loop473;
			if ((LA(1)=='\r") && (LA(2)=='\n") && ((LA(3) >= '\u0003" && LA(3) <= '\u00ff"))) {
				match('\r");
				match('\n");
				newline();
			}
			else if ((LA(1)=='\r") && ((LA(2) >= '\u0003" && LA(2) <= '\u00ff")) && ((LA(3) >= '\u0003" && LA(3) <= '\u00ff"))) {
				match('\r");
				newline();
			}
			else if ((LA(1)=='\n") && ((LA(2) >= '\u0003" && LA(2) <= '\u00ff")) && ((LA(3) >= '\u0003" && LA(3) <= '\u00ff"))) {
				match('\n");
				newline();
			}
			else if (((LA(1) >= '\u0003" && LA(1) <= '\u00ff")) && ((LA(2) >= '\u0003" && LA(2) <= '\u00ff")) && ((LA(3) >= '\u0003" && LA(3) <= '\u00ff"))) {
				matchNot(EOF_CHAR);
			}
			else {
				break _loop473;
			}
			
		} while (true);
		}
		match("*/");
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmSL_COMMENT(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = SL_COMMENT;
		int _saveIndex;
		
		match("//");
		{
		_loop469:
		do {
			// nongreedy exit test
			if ((LA(1)=='\n"||LA(1)=='\r") && (true) && (true)) break _loop469;
			if (((LA(1) >= '\u0003" && LA(1) <= '\u00ff")) && ((LA(2) >= '\u0003" && LA(2) <= '\u00ff")) && (true)) {
				matchNot(EOF_CHAR);
			}
			else {
				break _loop469;
			}
			
		} while (true);
		}
		{
		if ((LA(1)=='\r") && (LA(2)=='\n") && (true)) {
			match("\r\n");
		}
		else if ((LA(1)=='\n")) {
			match('\n");
		}
		else if ((LA(1)=='\r") && (true) && (true)) {
			match('\r");
		}
		else {
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		
		}
		newline();
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmSTRING(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = STRING;
		int _saveIndex;
		
		match('"");
		{
		_loop478:
		do {
			if ((LA(1)=='\\")) {
				mESC(false);
			}
			else if ((_tokenSet_7.member(LA(1)))) {
				matchNot('"");
			}
			else {
				break _loop478;
			}
			
		} while (true);
		}
		match('"");
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmSTUFF(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = STUFF;
		int _saveIndex;
		
		switch ( LA(1)) {
		case '"":
		{
			mSTRING(false);
			break;
		}
		case '\'":
		{
			mCHAR(false);
			break;
		}
		case '\n":
		{
			match('\n");
			newline();
			break;
		}
		default:
			if ((LA(1)=='/") && (LA(2)=='*"||LA(2)=='/")) {
				mCOMMENT(false);
			}
			else if ((LA(1)=='\r") && (LA(2)=='\n") && (true)) {
				match("\r\n");
				newline();
			}
			else if ((LA(1)=='/") && (_tokenSet_1.member(LA(2)))) {
				match('/");
				{
				match(_tokenSet_1);
				}
			}
			else if ((LA(1)=='\r") && (true) && (true)) {
				match('\r");
				newline();
			}
			else if ((_tokenSet_2.member(LA(1)))) {
				{
				match(_tokenSet_2);
				}
			}
		else {
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		}
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmTEXT_ARG(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = TEXT_ARG;
		int _saveIndex;
		
		{
		switch ( LA(1)) {
		case '\t":  case '\n":  case '\r":  case ' ":
		{
			mWS(false);
			break;
		}
		case '"":  case '$":  case '\'":  case '+":
		case '0":  case '1":  case '2":  case '3":
		case '4":  case '5":  case '6":  case '7":
		case '8":  case '9":  case 'A":  case 'B":
		case 'C":  case 'D":  case 'E":  case 'F":
		case 'G":  case 'H":  case 'I":  case 'J":
		case 'K":  case 'L":  case 'M":  case 'N":
		case 'O":  case 'P":  case 'Q":  case 'R":
		case 'S":  case 'T":  case 'U":  case 'V":
		case 'W":  case 'X":  case 'Y":  case 'Z":
		case '_":  case 'a":  case 'b":  case 'c":
		case 'd":  case 'e":  case 'f":  case 'g":
		case 'h":  case 'i":  case 'j":  case 'k":
		case 'l":  case 'm":  case 'n":  case 'o":
		case 'p":  case 'q":  case 'r":  case 's":
		case 't":  case 'u":  case 'v":  case 'w":
		case 'x":  case 'y":  case 'z":
		{
			break;
		}
		default:
		{
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		}
		}
		{
		int _cnt438=0;
		_loop438:
		do {
			if ((_tokenSet_11.member(LA(1))) && ((LA(2) >= '\u0003" && LA(2) <= '\u00ff")) && (true)) {
				mTEXT_ARG_ELEMENT(false);
				{
				if ((_tokenSet_4.member(LA(1))) && (_tokenSet_12.member(LA(2))) && (true)) {
					mWS(false);
				}
				else if ((_tokenSet_12.member(LA(1))) && (true) && (true)) {
				}
				else {
					throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
				}
				
				}
			}
			else {
				if ( _cnt438>=1 ) { break _loop438; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
			}
			
			_cnt438++;
		} while (true);
		}
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmTEXT_ARG_ELEMENT(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = TEXT_ARG_ELEMENT;
		int _saveIndex;
		
		switch ( LA(1)) {
		case 'A":  case 'B":  case 'C":  case 'D":
		case 'E":  case 'F":  case 'G":  case 'H":
		case 'I":  case 'J":  case 'K":  case 'L":
		case 'M":  case 'N":  case 'O":  case 'P":
		case 'Q":  case 'R":  case 'S":  case 'T":
		case 'U":  case 'V":  case 'W":  case 'X":
		case 'Y":  case 'Z":  case '_":  case 'a":
		case 'b":  case 'c":  case 'd":  case 'e":
		case 'f":  case 'g":  case 'h":  case 'i":
		case 'j":  case 'k":  case 'l":  case 'm":
		case 'n":  case 'o":  case 'p":  case 'q":
		case 'r":  case 's":  case 't":  case 'u":
		case 'v":  case 'w":  case 'x":  case 'y":
		case 'z":
		{
			mTEXT_ARG_ID_ELEMENT(false);
			break;
		}
		case '"":
		{
			mSTRING(false);
			break;
		}
		case '\'":
		{
			mCHAR(false);
			break;
		}
		case '0":  case '1":  case '2":  case '3":
		case '4":  case '5":  case '6":  case '7":
		case '8":  case '9":
		{
			mINT_OR_FLOAT(false);
			break;
		}
		case '$":
		{
			mTEXT_ITEM(false);
			break;
		}
		case '+":
		{
			match('+");
			break;
		}
		default:
		{
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		}
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmTEXT_ARG_ID_ELEMENT(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = TEXT_ARG_ID_ELEMENT;
		int _saveIndex;
		Token id=null;
		
		mID(true);
		id=_returnToken;
		{
		if ((_tokenSet_4.member(LA(1))) && (_tokenSet_21.member(LA(2))) && (true)) {
			_saveIndex=text.length();
			mWS(false);
			text.setLength(_saveIndex);
		}
		else if ((_tokenSet_21.member(LA(1))) && (true) && (true)) {
		}
		else {
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		
		}
		{
		switch ( LA(1)) {
		case '(":
		{
			match('(");
			{
			if ((_tokenSet_4.member(LA(1))) && (_tokenSet_22.member(LA(2))) && ((LA(3) >= '\u0003" && LA(3) <= '\u00ff"))) {
				_saveIndex=text.length();
				mWS(false);
				text.setLength(_saveIndex);
			}
			else if ((_tokenSet_22.member(LA(1))) && ((LA(2) >= '\u0003" && LA(2) <= '\u00ff")) && (true)) {
			}
			else {
				throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
			}
			
			}
			{
			_loop447:
			do {
				if ((_tokenSet_23.member(LA(1))) && ((LA(2) >= '\u0003" && LA(2) <= '\u00ff")) && ((LA(3) >= '\u0003" && LA(3) <= '\u00ff"))) {
					mTEXT_ARG(false);
					{
					_loop446:
					do {
						if ((LA(1)==',")) {
							match(',");
							mTEXT_ARG(false);
						}
						else {
							break _loop446;
						}
						
					} while (true);
					}
				}
				else {
					break _loop447;
				}
				
			} while (true);
			}
			{
			switch ( LA(1)) {
			case '\t":  case '\n":  case '\r":  case ' ":
			{
				_saveIndex=text.length();
				mWS(false);
				text.setLength(_saveIndex);
				break;
			}
			case ')":
			{
				break;
			}
			default:
			{
				throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
			}
			}
			}
			match(')");
			break;
		}
		case '[":
		{
			{
			int _cnt452=0;
			_loop452:
			do {
				if ((LA(1)=='[")) {
					match('[");
					{
					if ((_tokenSet_4.member(LA(1))) && (_tokenSet_23.member(LA(2))) && ((LA(3) >= '\u0003" && LA(3) <= '\u00ff"))) {
						_saveIndex=text.length();
						mWS(false);
						text.setLength(_saveIndex);
					}
					else if ((_tokenSet_23.member(LA(1))) && ((LA(2) >= '\u0003" && LA(2) <= '\u00ff")) && ((LA(3) >= '\u0003" && LA(3) <= '\u00ff"))) {
					}
					else {
						throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
					}
					
					}
					mTEXT_ARG(false);
					{
					switch ( LA(1)) {
					case '\t":  case '\n":  case '\r":  case ' ":
					{
						_saveIndex=text.length();
						mWS(false);
						text.setLength(_saveIndex);
						break;
					}
					case ']":
					{
						break;
					}
					default:
					{
						throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
					}
					}
					}
					match(']");
				}
				else {
					if ( _cnt452>=1 ) { break _loop452; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
				}
				
				_cnt452++;
			} while (true);
			}
			break;
		}
		case '.":
		{
			match('.");
			mTEXT_ARG_ID_ELEMENT(false);
			break;
		}
		case '\t":  case '\n":  case '\r":  case ' ":
		case '"":  case '$":  case '\'":  case ')":
		case '+":  case ',":  case '0":  case '1":
		case '2":  case '3":  case '4":  case '5":
		case '6":  case '7":  case '8":  case '9":
		case 'A":  case 'B":  case 'C":  case 'D":
		case 'E":  case 'F":  case 'G":  case 'H":
		case 'I":  case 'J":  case 'K":  case 'L":
		case 'M":  case 'N":  case 'O":  case 'P":
		case 'Q":  case 'R":  case 'S":  case 'T":
		case 'U":  case 'V":  case 'W":  case 'X":
		case 'Y":  case 'Z":  case ']":  case '_":
		case 'a":  case 'b":  case 'c":  case 'd":
		case 'e":  case 'f":  case 'g":  case 'h":
		case 'i":  case 'j":  case 'k":  case 'l":
		case 'm":  case 'n":  case 'o":  case 'p":
		case 'q":  case 'r":  case 's":  case 't":
		case 'u":  case 'v":  case 'w":  case 'x":
		case 'y":  case 'z":
		{
			break;
		}
		default:
		{
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		}
		}
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmTEXT_ITEM(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = TEXT_ITEM;
		int _saveIndex;
		Token a1=null;
		Token a2=null;
		Token a3=null;
		Token a4=null;
		Token a5=null;
		Token a6=null;
		
		if ((LA(1)=='$") && (LA(2)=='F") && (LA(3)=='O")) {
			match("$FOLLOW");
			{
			if ((_tokenSet_5.member(LA(1))) && (_tokenSet_6.member(LA(2))) && ((LA(3) >= '\u0003" && LA(3) <= '\u00ff"))) {
				{
				switch ( LA(1)) {
				case '\t":  case '\n":  case '\r":  case ' ":
				{
					mWS(false);
					break;
				}
				case '(":
				{
					break;
				}
				default:
				{
					throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
				}
				}
				}
				match('(");
				mTEXT_ARG(true);
				a5=_returnToken;
				match(')");
			}
			else {
			}
			
			}
			
						String rule = currentRule.getRuleName();
						if ( a5!=null ) {
							rule = a5.getText();
						}
						String setName = generator.getFOLLOWBitSet(rule, 1);
						// System.out.println("FOLLOW("+rule+")="+setName);
						if ( setName==null ) {
							reportError("$FOLLOW("+rule+")"+
										": unknown rule or bad lookahead computation");
						}
						else {
							text.setLength(_begin); text.append(setName);
						}
					
		}
		else if ((LA(1)=='$") && (LA(2)=='F") && (LA(3)=='I")) {
			match("$FIRST");
			{
			if ((_tokenSet_5.member(LA(1))) && (_tokenSet_6.member(LA(2))) && ((LA(3) >= '\u0003" && LA(3) <= '\u00ff"))) {
				{
				switch ( LA(1)) {
				case '\t":  case '\n":  case '\r":  case ' ":
				{
					mWS(false);
					break;
				}
				case '(":
				{
					break;
				}
				default:
				{
					throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
				}
				}
				}
				match('(");
				mTEXT_ARG(true);
				a6=_returnToken;
				match(')");
			}
			else {
			}
			
			}
			
						String rule = currentRule.getRuleName();
						if ( a6!=null ) {
							rule = a6.getText();
						}
						String setName = generator.getFIRSTBitSet(rule, 1);
						// System.out.println("FIRST("+rule+")="+setName);
						if ( setName==null ) {
							reportError("$FIRST("+rule+")"+
										": unknown rule or bad lookahead computation");
						}
						else {
							text.setLength(_begin); text.append(setName);
						}
					
		}
		else if ((LA(1)=='$") && (LA(2)=='a")) {
			match("$append");
			{
			switch ( LA(1)) {
			case '\t":  case '\n":  case '\r":  case ' ":
			{
				mWS(false);
				break;
			}
			case '(":
			{
				break;
			}
			default:
			{
				throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
			}
			}
			}
			match('(");
			mTEXT_ARG(true);
			a1=_returnToken;
			match(')");
			
						String t = "text.append("+a1.getText()+")";
						text.setLength(_begin); text.append(t);
					
		}
		else if ((LA(1)=='$") && (LA(2)=='s")) {
			match("$set");
			{
			if ((LA(1)=='T") && (LA(2)=='e")) {
				match("Text");
				{
				switch ( LA(1)) {
				case '\t":  case '\n":  case '\r":  case ' ":
				{
					mWS(false);
					break;
				}
				case '(":
				{
					break;
				}
				default:
				{
					throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
				}
				}
				}
				match('(");
				mTEXT_ARG(true);
				a2=_returnToken;
				match(')");
				
							String t;
							t = "text.setLength(_begin); text.append("+a2.getText()+")";
							text.setLength(_begin); text.append(t);
							
			}
			else if ((LA(1)=='T") && (LA(2)=='o")) {
				match("Token");
				{
				switch ( LA(1)) {
				case '\t":  case '\n":  case '\r":  case ' ":
				{
					mWS(false);
					break;
				}
				case '(":
				{
					break;
				}
				default:
				{
					throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
				}
				}
				}
				match('(");
				mTEXT_ARG(true);
				a3=_returnToken;
				match(')");
				
							String t="_token = "+a3.getText();
							text.setLength(_begin); text.append(t);
							
			}
			else if ((LA(1)=='T") && (LA(2)=='y")) {
				match("Type");
				{
				switch ( LA(1)) {
				case '\t":  case '\n":  case '\r":  case ' ":
				{
					mWS(false);
					break;
				}
				case '(":
				{
					break;
				}
				default:
				{
					throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
				}
				}
				}
				match('(");
				mTEXT_ARG(true);
				a4=_returnToken;
				match(')");
				
							String t="_ttype = "+a4.getText();
							text.setLength(_begin); text.append(t);
							
			}
			else {
				throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
			}
			
			}
		}
		else if ((LA(1)=='$") && (LA(2)=='g")) {
			match("$getText");
			
						text.setLength(_begin); text.append("new String(text.getBuffer(),_begin,text.length()-_begin)");
					
		}
		else {
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmTREE(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = TREE;
		int _saveIndex;
		Token t=null;
		Token t2=null;
		
			StringBuffer buf = new StringBuffer();
			int n=0;
			Vector terms = new Vector(10);
		
		
		_saveIndex=text.length();
		match('(");
		text.setLength(_saveIndex);
		{
		switch ( LA(1)) {
		case '\t":  case '\n":  case '\r":  case ' ":
		{
			_saveIndex=text.length();
			mWS(false);
			text.setLength(_saveIndex);
			break;
		}
		case '"":  case '#":  case '(":  case 'A":
		case 'B":  case 'C":  case 'D":  case 'E":
		case 'F":  case 'G":  case 'H":  case 'I":
		case 'J":  case 'K":  case 'L":  case 'M":
		case 'N":  case 'O":  case 'P":  case 'Q":
		case 'R":  case 'S":  case 'T":  case 'U":
		case 'V":  case 'W":  case 'X":  case 'Y":
		case 'Z":  case '[":  case '_":  case 'a":
		case 'b":  case 'c":  case 'd":  case 'e":
		case 'f":  case 'g":  case 'h":  case 'i":
		case 'j":  case 'k":  case 'l":  case 'm":
		case 'n":  case 'o":  case 'p":  case 'q":
		case 'r":  case 's":  case 't":  case 'u":
		case 'v":  case 'w":  case 'x":  case 'y":
		case 'z":
		{
			break;
		}
		default:
		{
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		}
		}
		_saveIndex=text.length();
		mTREE_ELEMENT(true);
		text.setLength(_saveIndex);
		t=_returnToken;
		terms.appendElement(t.getText());
		{
		switch ( LA(1)) {
		case '\t":  case '\n":  case '\r":  case ' ":
		{
			_saveIndex=text.length();
			mWS(false);
			text.setLength(_saveIndex);
			break;
		}
		case ')":  case ',":
		{
			break;
		}
		default:
		{
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		}
		}
		{
		_loop407:
		do {
			if ((LA(1)==',")) {
				_saveIndex=text.length();
				match(',");
				text.setLength(_saveIndex);
				{
				switch ( LA(1)) {
				case '\t":  case '\n":  case '\r":  case ' ":
				{
					_saveIndex=text.length();
					mWS(false);
					text.setLength(_saveIndex);
					break;
				}
				case '"":  case '#":  case '(":  case 'A":
				case 'B":  case 'C":  case 'D":  case 'E":
				case 'F":  case 'G":  case 'H":  case 'I":
				case 'J":  case 'K":  case 'L":  case 'M":
				case 'N":  case 'O":  case 'P":  case 'Q":
				case 'R":  case 'S":  case 'T":  case 'U":
				case 'V":  case 'W":  case 'X":  case 'Y":
				case 'Z":  case '[":  case '_":  case 'a":
				case 'b":  case 'c":  case 'd":  case 'e":
				case 'f":  case 'g":  case 'h":  case 'i":
				case 'j":  case 'k":  case 'l":  case 'm":
				case 'n":  case 'o":  case 'p":  case 'q":
				case 'r":  case 's":  case 't":  case 'u":
				case 'v":  case 'w":  case 'x":  case 'y":
				case 'z":
				{
					break;
				}
				default:
				{
					throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
				}
				}
				}
				_saveIndex=text.length();
				mTREE_ELEMENT(true);
				text.setLength(_saveIndex);
				t2=_returnToken;
				terms.appendElement(t2.getText());
				{
				switch ( LA(1)) {
				case '\t":  case '\n":  case '\r":  case ' ":
				{
					_saveIndex=text.length();
					mWS(false);
					text.setLength(_saveIndex);
					break;
				}
				case ')":  case ',":
				{
					break;
				}
				default:
				{
					throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
				}
				}
				}
			}
			else {
				break _loop407;
			}
			
		} while (true);
		}
		text.setLength(_begin); text.append(generator.getASTCreateString(terms));
		_saveIndex=text.length();
		match(')");
		text.setLength(_saveIndex);
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmTREE_ELEMENT(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = TREE_ELEMENT;
		int _saveIndex;
		Token id=null;
		boolean was_mapped;
		
		switch ( LA(1)) {
		case '(":
		{
			mTREE(false);
			break;
		}
		case '[":
		{
			mAST_CONSTRUCTOR(false);
			break;
		}
		case 'A":  case 'B":  case 'C":  case 'D":
		case 'E":  case 'F":  case 'G":  case 'H":
		case 'I":  case 'J":  case 'K":  case 'L":
		case 'M":  case 'N":  case 'O":  case 'P":
		case 'Q":  case 'R":  case 'S":  case 'T":
		case 'U":  case 'V":  case 'W":  case 'X":
		case 'Y":  case 'Z":  case '_":  case 'a":
		case 'b":  case 'c":  case 'd":  case 'e":
		case 'f":  case 'g":  case 'h":  case 'i":
		case 'j":  case 'k":  case 'l":  case 'm":
		case 'n":  case 'o":  case 'p":  case 'q":
		case 'r":  case 's":  case 't":  case 'u":
		case 'v":  case 'w":  case 'x":  case 'y":
		case 'z":
		{
			mID_ELEMENT(false);
			break;
		}
		case '"":
		{
			mSTRING(false);
			break;
		}
		default:
			if ((LA(1)=='#") && (LA(2)=='(")) {
				_saveIndex=text.length();
				match('#");
				text.setLength(_saveIndex);
				mTREE(false);
			}
			else if ((LA(1)=='#") && (LA(2)=='[")) {
				_saveIndex=text.length();
				match('#");
				text.setLength(_saveIndex);
				mAST_CONSTRUCTOR(false);
			}
			else if ((LA(1)=='#") && (_tokenSet_3.member(LA(2)))) {
				_saveIndex=text.length();
				match('#");
				text.setLength(_saveIndex);
				was_mapped=mID_ELEMENT(true);
				id=_returnToken;
					// RK: I have a queer feeling that this maptreeid is redundant
							if( ! was_mapped )
							{
								String t = generator.mapTreeId(id.getText(), null);
								text.setLength(_begin); text.append(t);
							}
						
			}
			else if ((LA(1)=='#") && (LA(2)=='#")) {
				match("##");
				String t = currentRule.getRuleName()+"_AST"; text.setLength(_begin); text.append(t);
			}
		else {
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
		}
		}
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmVAR_ASSIGN(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = VAR_ASSIGN;
		int _saveIndex;
		
		match('=");
		
				// inform the code generator that an assignment was done to
				// AST root for the rule if invoker set refRuleRoot.
				if ( LA(1)!='=" && transInfo!=null && transInfo.refRuleRoot!=null ) {
					transInfo.assignToRoot=true;
				}
				
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
protected final voidmWS(boolean _createToken)

		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = WS;
		int _saveIndex;
		
		{
		int _cnt498=0;
		_loop498:
		do {
			if ((LA(1)=='\r") && (LA(2)=='\n") && (true)) {
				match('\r");
				match('\n");
				newline();
			}
			else if ((LA(1)==' ") && (true) && (true)) {
				match(' ");
			}
			else if ((LA(1)=='\t") && (true) && (true)) {
				match('\t");
			}
			else if ((LA(1)=='\r") && (true) && (true)) {
				match('\r");
				newline();
			}
			else if ((LA(1)=='\n") && (true) && (true)) {
				match('\n");
				newline();
			}
			else {
				if ( _cnt498>=1 ) { break _loop498; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
			}
			
			_cnt498++;
		} while (true);
		}
		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
			_token = makeToken(_ttype);
			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
		}
		_returnToken = _token;
	
private static final long[]mk_tokenSet_0()

		long[] data = new long[8];
		data[0]=-103079215112L;
		for (int i = 1; i<=3; i++) { data[i]=-1L; }
		return data;
	
private static final long[]mk_tokenSet_1()

	     
		long[] data = new long[8];
		data[0]=-145135534866440L;
		for (int i = 1; i<=3; i++) { data[i]=-1L; }
		return data;
	
private static final long[]mk_tokenSet_10()

	     
		long[] data = { 287950056521213440L, 576460746129407998L, 0L, 0L, 0L};
		return data;
	
private static final long[]mk_tokenSet_11()

	     
		long[] data = { 287958332923183104L, 576460745995190270L, 0L, 0L, 0L};
		return data;
	
private static final long[]mk_tokenSet_12()

	     
		long[] data = { 287978128427460096L, 576460746532061182L, 0L, 0L, 0L};
		return data;
	
private static final long[]mk_tokenSet_13()

	     
		long[] data = { 2306123388973753856L, 671088640L, 0L, 0L, 0L};
		return data;
	
private static final long[]mk_tokenSet_14()

	     
		long[] data = { 287952805300282880L, 576460746129407998L, 0L, 0L, 0L};
		return data;
	
private static final long[]mk_tokenSet_15()

	     
		long[] data = { 2305843013508670976L, 0L, 0L, 0L, 0L};
		return data;
	
private static final long[]mk_tokenSet_16()

	     
		long[] data = { 2306051920717948416L, 536870912L, 0L, 0L, 0L};
		return data;
	
private static final long[]mk_tokenSet_17()

	     
		long[] data = { 208911504254464L, 536870912L, 0L, 0L, 0L};
		return data;
	
private static final long[]mk_tokenSet_18()

	     
		long[] data = { 1151051235328L, 576460746129407998L, 0L, 0L, 0L};
		return data;
	
private static final long[]mk_tokenSet_19()

	     
		long[] data = { 189120294954496L, 0L, 0L, 0L, 0L};
		return data;
	
private static final long[]mk_tokenSet_2()

	     
		long[] data = new long[8];
		data[0]=-141407503262728L;
		for (int i = 1; i<=3; i++) { data[i]=-1L; }
		return data;
	
private static final long[]mk_tokenSet_20()

	     
		long[] data = { 288139722277004800L, 576460746129407998L, 0L, 0L, 0L};
		return data;
	
private static final long[]mk_tokenSet_21()

	     
		long[] data = { 288049596683265536L, 576460746666278910L, 0L, 0L, 0L};
		return data;
	
private static final long[]mk_tokenSet_22()

	     
		long[] data = { 287960536241415680L, 576460745995190270L, 0L, 0L, 0L};
		return data;
	
private static final long[]mk_tokenSet_23()

	     
		long[] data = { 287958337218160128L, 576460745995190270L, 0L, 0L, 0L};
		return data;
	
private static final long[]mk_tokenSet_24()

	     
		long[] data = { 288228817078593024L, 576460746532061182L, 0L, 0L, 0L};
		return data;
	
private static final long[]mk_tokenSet_25()

	     
		long[] data = { 288158448334415360L, 576460746532061182L, 0L, 0L, 0L};
		return data;
	
private static final long[]mk_tokenSet_3()

	     
		long[] data = { 0L, 576460745995190270L, 0L, 0L, 0L};
		return data;
	
private static final long[]mk_tokenSet_4()

	     
		long[] data = { 4294977024L, 0L, 0L, 0L, 0L};
		return data;
	
private static final long[]mk_tokenSet_5()

	     
		long[] data = { 1103806604800L, 0L, 0L, 0L, 0L};
		return data;
	
private static final long[]mk_tokenSet_6()

	     
		long[] data = { 287959436729787904L, 576460745995190270L, 0L, 0L, 0L};
		return data;
	
private static final long[]mk_tokenSet_7()

	     
		long[] data = new long[8];
		data[0]=-17179869192L;
		data[1]=-268435457L;
		for (int i = 2; i<=3; i++) { data[i]=-1L; }
		return data;
	
private static final long[]mk_tokenSet_8()

	     
		long[] data = new long[8];
		data[0]=-549755813896L;
		data[1]=-268435457L;
		for (int i = 2; i<=3; i++) { data[i]=-1L; }
		return data;
	
private static final long[]mk_tokenSet_9()

	     
		long[] data = { 287948901175001088L, 576460745995190270L, 0L, 0L, 0L};
		return data;
	
public persistence.antlr.TokennextToken()

	Token theRetToken=null;
tryAgain:
	for (;;) {
		Token _token = null;
		int _ttype = Token.INVALID_TYPE;
		resetText();
		try {   // for char stream error handling
			try {   // for lexical error handling
				if (((LA(1) >= '\u0003" && LA(1) <= '\u00ff"))) {
					mACTION(true);
					theRetToken=_returnToken;
				}
				else {
					if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
				else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
				}
				
				if ( _returnToken==null ) continue tryAgain; // found SKIP token
				_ttype = _returnToken.getType();
				_returnToken.setType(_ttype);
				return _returnToken;
			}
			catch (RecognitionException e) {
				throw new TokenStreamRecognitionException(e);
			}
		}
		catch (CharStreamException cse) {
			if ( cse instanceof CharStreamIOException ) {
				throw new TokenStreamIOException(((CharStreamIOException)cse).io);
			}
			else {
				throw new TokenStreamException(cse.getMessage());
			}
		}
	}
public voidreportError(persistence.antlr.RecognitionException e)

		antlrTool.error("Syntax error in action: "+e,getFilename(),getLine(),getColumn());
	
public voidreportError(java.lang.String s)

		antlrTool.error(s,getFilename(),getLine(),getColumn());
	
public voidreportWarning(java.lang.String s)

		if ( getFilename()==null ) {
			antlrTool.warning(s);
		}
		else {
			antlrTool.warning(s,getFilename(),getLine(), getColumn());
		}
	
public voidsetLineOffset(int lineOffset)

		// this.lineOffset = lineOffset;
		setLine(lineOffset);
	
public voidsetTool(persistence.antlr.Tool tool)

		this.antlrTool = tool;