// $ANTLR 3.2 Sep 23, 2009 12:02:23 C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g 2011-01-15 12:26:20

package jTMass.core.jALLL;

import jTMass.TMass;
import jTMass.core.jAMass.TAgent;
import jTMass.core.jALLL.jTObjects.*;
import jTMass.core.jAMass.jActions.*;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

public class ALLLParser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "NUMBER", "ID", "EXECUTE", "QUERY", "ADD", "DELETE", "SEND", "RECEIVE", "INTERNAL", "INTENTION", "DATABASE", "SEMICOLON", "WS", "'\\''", "'&&'", "'&L'", "'&N'", "'&'", "'_'", "'^'", "'('", "')'", "'<'", "','", "'>'", "'{'", "'}'", "'['", "']'", "'FI'", "'OI'", "':'"
    };
    public static final int INTERNAL=12;
    public static final int T__29=29;
    public static final int T__28=28;
    public static final int T__27=27;
    public static final int T__26=26;
    public static final int T__25=25;
    public static final int T__24=24;
    public static final int T__23=23;
    public static final int EXECUTE=6;
    public static final int T__22=22;
    public static final int T__21=21;
    public static final int T__20=20;
    public static final int NUMBER=4;
    public static final int SEMICOLON=15;
    public static final int DELETE=9;
    public static final int ID=5;
    public static final int EOF=-1;
    public static final int T__19=19;
    public static final int T__30=30;
    public static final int T__31=31;
    public static final int T__32=32;
    public static final int WS=16;
    public static final int T__33=33;
    public static final int T__34=34;
    public static final int DATABASE=14;
    public static final int T__35=35;
    public static final int T__18=18;
    public static final int T__17=17;
    public static final int QUERY=7;
    public static final int SEND=10;
    public static final int INTENTION=13;
    public static final int RECEIVE=11;
    public static final int ADD=8;

    // delegates
    // delegators


        public ALLLParser(TokenStream input) {
            this(input, new RecognizerSharedState());
        }
        public ALLLParser(TokenStream input, RecognizerSharedState state) {
            super(input, state);
             
        }
        

    public String[] getTokenNames() { return ALLLParser.tokenNames; }
    public String getGrammarFileName() { return "C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g"; }



    // $ANTLR start "integer"
    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:33:1: integer returns [Integer result] : NUMBER ;
    public final Integer integer() throws RecognitionException {
        Integer result = null;

        Token NUMBER1=null;

        try {
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:34:2: ( NUMBER )
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:34:4: NUMBER
            {
            NUMBER1=(Token)match(input,NUMBER,FOLLOW_NUMBER_in_integer31); 
            result= Integer.parseInt(NUMBER1.getText());

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end "integer"


    // $ANTLR start "apoTau"
    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:38:1: apoTau[int level] returns [TRegister register] : ( '\\'' reg= apoTau[level] | '&&' | '&L' | '&N' | '&' regIndex= integer );
    public final TRegister apoTau(int level) throws RecognitionException {
        TRegister register = null;

        TRegister reg = null;

        Integer regIndex = null;


        try {
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:39:2: ( '\\'' reg= apoTau[level] | '&&' | '&L' | '&N' | '&' regIndex= integer )
            int alt1=5;
            switch ( input.LA(1) ) {
            case 17:
                {
                alt1=1;
                }
                break;
            case 18:
                {
                alt1=2;
                }
                break;
            case 19:
                {
                alt1=3;
                }
                break;
            case 20:
                {
                alt1=4;
                }
                break;
            case 21:
                {
                alt1=5;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 1, 0, input);

                throw nvae;
            }

            switch (alt1) {
                case 1 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:39:4: '\\'' reg= apoTau[level]
                    {
                    match(input,17,FOLLOW_17_in_apoTau51); 
                    level++;
                    pushFollow(FOLLOW_apoTau_in_apoTau57);
                    reg=apoTau(level);

                    state._fsp--;

                    register=reg;

                    }
                    break;
                case 2 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:40:4: '&&'
                    {
                    match(input,18,FOLLOW_18_in_apoTau66); 
                    register=new TRegister(level,0);

                    }
                    break;
                case 3 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:41:11: '&L'
                    {
                    match(input,19,FOLLOW_19_in_apoTau80); 
                    register=new TRegister(level, TConstants._NORegisters+1);

                    }
                    break;
                case 4 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:42:11: '&N'
                    {
                    match(input,20,FOLLOW_20_in_apoTau94); 
                    register=new TRegister(level, TConstants._NORegisters+2);

                    }
                    break;
                case 5 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:43:4: '&' regIndex= integer
                    {
                    match(input,21,FOLLOW_21_in_apoTau101); 
                    pushFollow(FOLLOW_integer_in_apoTau105);
                    regIndex=integer();

                    state._fsp--;

                    register=new TRegister(level,regIndex);

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return register;
    }
    // $ANTLR end "apoTau"


    // $ANTLR start "item"
    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:46:1: item returns [TAtom atom] : ( ID | number= integer | nAtom= apoTau[0] );
    public final TAtom item() throws RecognitionException {
        TAtom atom = null;

        Token ID2=null;
        Integer number = null;

        TRegister nAtom = null;


        try {
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:47:2: ( ID | number= integer | nAtom= apoTau[0] )
            int alt2=3;
            switch ( input.LA(1) ) {
            case ID:
                {
                alt2=1;
                }
                break;
            case NUMBER:
                {
                alt2=2;
                }
                break;
            case 17:
            case 18:
            case 19:
            case 20:
            case 21:
                {
                alt2=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 2, 0, input);

                throw nvae;
            }

            switch (alt2) {
                case 1 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:48:3: ID
                    {
                    ID2=(Token)match(input,ID,FOLLOW_ID_in_item126); 
                    atom= new TAtom(ID2.getText());
                    	 

                    }
                    break;
                case 2 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:50:5: number= integer
                    {
                    pushFollow(FOLLOW_integer_in_item137);
                    number=integer();

                    state._fsp--;

                    atom= new TAtom(number);
                    	 

                    }
                    break;
                case 3 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:52:5: nAtom= apoTau[0]
                    {
                    pushFollow(FOLLOW_apoTau_in_item148);
                    nAtom=apoTau(0);

                    state._fsp--;

                    atom=nAtom;

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return atom;
    }
    // $ANTLR end "item"


    // $ANTLR start "item_ap"
    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:55:1: item_ap returns [TAtom atom] : ( ID | number= integer | '_' | nAtom= apoTau[0] );
    public final TAtom item_ap() throws RecognitionException {
        TAtom atom = null;

        Token ID3=null;
        Integer number = null;

        TRegister nAtom = null;


        try {
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:56:2: ( ID | number= integer | '_' | nAtom= apoTau[0] )
            int alt3=4;
            switch ( input.LA(1) ) {
            case ID:
                {
                alt3=1;
                }
                break;
            case NUMBER:
                {
                alt3=2;
                }
                break;
            case 22:
                {
                alt3=3;
                }
                break;
            case 17:
            case 18:
            case 19:
            case 20:
            case 21:
                {
                alt3=4;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 3, 0, input);

                throw nvae;
            }

            switch (alt3) {
                case 1 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:57:2: ID
                    {
                    ID3=(Token)match(input,ID,FOLLOW_ID_in_item_ap169); 
                    atom=new TAtom(ID3.getText());

                    }
                    break;
                case 2 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:58:4: number= integer
                    {
                    pushFollow(FOLLOW_integer_in_item_ap178);
                    number=integer();

                    state._fsp--;

                    atom=new TAtom(number);

                    }
                    break;
                case 3 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:59:4: '_'
                    {
                    match(input,22,FOLLOW_22_in_item_ap185); 
                    atom=new TAtom(TConstants._AnonymousVariable);

                    }
                    break;
                case 4 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:60:4: nAtom= apoTau[0]
                    {
                    pushFollow(FOLLOW_apoTau_in_item_ap194);
                    nAtom=apoTau(0);

                    state._fsp--;

                    atom=nAtom;

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return atom;
    }
    // $ANTLR end "item_ap"


    // $ANTLR start "deleteList"
    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:63:1: deleteList returns [TList dList] : (mList= list | '^' '(' dlItem= item_ap ')' );
    public final TList deleteList() throws RecognitionException {
        TList dList = null;

        TList mList = null;

        TAtom dlItem = null;


        try {
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:64:2: (mList= list | '^' '(' dlItem= item_ap ')' )
            int alt4=2;
            int LA4_0 = input.LA(1);

            if ( (LA4_0==24||LA4_0==31) ) {
                alt4=1;
            }
            else if ( (LA4_0==23) ) {
                alt4=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 4, 0, input);

                throw nvae;
            }
            switch (alt4) {
                case 1 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:64:4: mList= list
                    {
                    pushFollow(FOLLOW_list_in_deleteList215);
                    mList=list();

                    state._fsp--;

                    mList.setType(TConstants._Delete); dList=mList;

                    }
                    break;
                case 2 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:66:3: '^' '(' dlItem= item_ap ')'
                    {
                    match(input,23,FOLLOW_23_in_deleteList222); 
                    match(input,24,FOLLOW_24_in_deleteList224); 
                    pushFollow(FOLLOW_item_ap_in_deleteList228);
                    dlItem=item_ap();

                    state._fsp--;

                    dList=new TList(TConstants._DeletePlan);
                    	dList.add(dlItem);
                    match(input,25,FOLLOW_25_in_deleteList235); 

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return dList;
    }
    // $ANTLR end "deleteList"


    // $ANTLR start "plans"
    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:72:1: plans returns [TPlan newPlan] : '<' nAction= action ( ',' nAction= action )* '>' ;
    public final TPlan plans() throws RecognitionException {
        TPlan newPlan = null;

        TAction nAction = null;


        try {
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:73:2: ( '<' nAction= action ( ',' nAction= action )* '>' )
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:74:2: '<' nAction= action ( ',' nAction= action )* '>'
            {
            newPlan= new TPlan(TConstants._Plan_Direct_Script);
            	TMass._Terminal.printlnDebug("Plan");
            match(input,26,FOLLOW_26_in_plans256); 
            pushFollow(FOLLOW_action_in_plans260);
            nAction=action();

            state._fsp--;


            	TMass._Terminal.printlnDebug("Action: "+nAction.getContent());
            	newPlan.add(nAction);
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:80:2: ( ',' nAction= action )*
            loop5:
            do {
                int alt5=2;
                int LA5_0 = input.LA(1);

                if ( (LA5_0==27) ) {
                    alt5=1;
                }


                switch (alt5) {
            	case 1 :
            	    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:80:3: ',' nAction= action
            	    {
            	    match(input,27,FOLLOW_27_in_plans268); 
            	    pushFollow(FOLLOW_action_in_plans272);
            	    nAction=action();

            	    state._fsp--;


            	    	TMass._Terminal.printlnDebug("Action: "+nAction.getContent());
            	    	newPlan.add(nAction);

            	    }
            	    break;

            	default :
            	    break loop5;
                }
            } while (true);

            match(input,28,FOLLOW_28_in_plans281); 

            	TMass._Terminal.printlnDebug("Action: End Of Plan");
            	newPlan.add(new TEOP());

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return newPlan;
    }
    // $ANTLR end "plans"


    // $ANTLR start "addList"
    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:90:1: addList returns [TList aList] : (mList= generalList | ( '{' name= item ';' planBody= plans '}' ) );
    public final TList addList() throws RecognitionException {
        TList aList = null;

        TList mList = null;

        TAtom name = null;

        TPlan planBody = null;


        try {
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:91:2: (mList= generalList | ( '{' name= item ';' planBody= plans '}' ) )
            int alt6=2;
            int LA6_0 = input.LA(1);

            if ( (LA6_0==24) ) {
                alt6=1;
            }
            else if ( (LA6_0==29) ) {
                alt6=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 6, 0, input);

                throw nvae;
            }
            switch (alt6) {
                case 1 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:91:4: mList= generalList
                    {
                    pushFollow(FOLLOW_generalList_in_addList302);
                    mList=generalList();

                    state._fsp--;

                    mList.setType(TConstants._Add); aList=mList;

                    }
                    break;
                case 2 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:93:4: ( '{' name= item ';' planBody= plans '}' )
                    {
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:93:4: ( '{' name= item ';' planBody= plans '}' )
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:93:5: '{' name= item ';' planBody= plans '}'
                    {
                    match(input,29,FOLLOW_29_in_addList312); 
                    TPlan bPlan=new TPlan(TConstants._StoredPlan);
                    pushFollow(FOLLOW_item_in_addList321);
                    name=item();

                    state._fsp--;

                    match(input,SEMICOLON,FOLLOW_SEMICOLON_in_addList323); 
                    pushFollow(FOLLOW_plans_in_addList327);
                    planBody=plans();

                    state._fsp--;

                    match(input,30,FOLLOW_30_in_addList329); 

                    	bPlan.add(name); bPlan.add(planBody); 
                    	aList=bPlan;
                    	

                    }


                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return aList;
    }
    // $ANTLR end "addList"


    // $ANTLR start "queryListItem"
    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:103:1: queryListItem returns [TObject result] : (qResultI= item_ap | qResult= queryList );
    public final TObject queryListItem() throws RecognitionException {
        TObject result = null;

        TAtom qResultI = null;

        TList qResult = null;


        try {
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:104:2: (qResultI= item_ap | qResult= queryList )
            int alt7=2;
            int LA7_0 = input.LA(1);

            if ( ((LA7_0>=NUMBER && LA7_0<=ID)||(LA7_0>=17 && LA7_0<=22)) ) {
                alt7=1;
            }
            else if ( (LA7_0==31) ) {
                alt7=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 7, 0, input);

                throw nvae;
            }
            switch (alt7) {
                case 1 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:105:2: qResultI= item_ap
                    {
                    pushFollow(FOLLOW_item_ap_in_queryListItem354);
                    qResultI=item_ap();

                    state._fsp--;

                    result=qResultI;

                    }
                    break;
                case 2 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:105:39: qResult= queryList
                    {
                    pushFollow(FOLLOW_queryList_in_queryListItem361);
                    qResult=queryList();

                    state._fsp--;

                    result=qResult;

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end "queryListItem"


    // $ANTLR start "queryList"
    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:108:1: queryList returns [TList list] : '[' mItem= queryListItem ( ',' mItem= queryListItem )* ']' ;
    public final TList queryList() throws RecognitionException {
        TList list = null;

        TObject mItem = null;


        try {
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:109:2: ( '[' mItem= queryListItem ( ',' mItem= queryListItem )* ']' )
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:110:2: '[' mItem= queryListItem ( ',' mItem= queryListItem )* ']'
            {
            list=new TList(TConstants._QueryList);
            match(input,31,FOLLOW_31_in_queryList383); 
            pushFollow(FOLLOW_queryListItem_in_queryList387);
            mItem=queryListItem();

            state._fsp--;

            list.add(mItem);
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:113:3: ( ',' mItem= queryListItem )*
            loop8:
            do {
                int alt8=2;
                int LA8_0 = input.LA(1);

                if ( (LA8_0==27) ) {
                    alt8=1;
                }


                switch (alt8) {
            	case 1 :
            	    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:113:5: ',' mItem= queryListItem
            	    {
            	    match(input,27,FOLLOW_27_in_queryList398); 
            	    pushFollow(FOLLOW_queryListItem_in_queryList402);
            	    mItem=queryListItem();

            	    state._fsp--;

            	    list.add(mItem);

            	    }
            	    break;

            	default :
            	    break loop8;
                }
            } while (true);

            match(input,32,FOLLOW_32_in_queryList415); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return list;
    }
    // $ANTLR end "queryList"


    // $ANTLR start "generalListItem"
    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:118:1: generalListItem returns [TObject result] : (iResult= item | gResult= generalList );
    public final TObject generalListItem() throws RecognitionException {
        TObject result = null;

        TAtom iResult = null;

        TList gResult = null;


        try {
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:119:2: (iResult= item | gResult= generalList )
            int alt9=2;
            int LA9_0 = input.LA(1);

            if ( ((LA9_0>=NUMBER && LA9_0<=ID)||(LA9_0>=17 && LA9_0<=21)) ) {
                alt9=1;
            }
            else if ( (LA9_0==24) ) {
                alt9=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 9, 0, input);

                throw nvae;
            }
            switch (alt9) {
                case 1 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:120:2: iResult= item
                    {
                    pushFollow(FOLLOW_item_in_generalListItem435);
                    iResult=item();

                    state._fsp--;

                    result=iResult;

                    }
                    break;
                case 2 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:120:34: gResult= generalList
                    {
                    pushFollow(FOLLOW_generalList_in_generalListItem442);
                    gResult=generalList();

                    state._fsp--;

                    result=gResult;

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end "generalListItem"


    // $ANTLR start "generalList"
    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:123:1: generalList returns [TList list] : '(' mItem= generalListItem ( ',' mItem= generalListItem )* ')' ;
    public final TList generalList() throws RecognitionException {
        TList list = null;

        TObject mItem = null;


        try {
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:124:2: ( '(' mItem= generalListItem ( ',' mItem= generalListItem )* ')' )
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:125:2: '(' mItem= generalListItem ( ',' mItem= generalListItem )* ')'
            {

            	TMass._Terminal.printlnDebug("General list: ");
            	list=new TList(TConstants._GeneralList);
            match(input,24,FOLLOW_24_in_generalList465); 
            pushFollow(FOLLOW_generalListItem_in_generalList469);
            mItem=generalListItem();

            state._fsp--;

            list.add(mItem);
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:130:2: ( ',' mItem= generalListItem )*
            loop10:
            do {
                int alt10=2;
                int LA10_0 = input.LA(1);

                if ( (LA10_0==27) ) {
                    alt10=1;
                }


                switch (alt10) {
            	case 1 :
            	    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:130:3: ',' mItem= generalListItem
            	    {
            	    match(input,27,FOLLOW_27_in_generalList477); 
            	    pushFollow(FOLLOW_generalListItem_in_generalList481);
            	    mItem=generalListItem();

            	    state._fsp--;

            	    list.add(mItem);

            	    }
            	    break;

            	default :
            	    break loop10;
                }
            } while (true);

            match(input,25,FOLLOW_25_in_generalList491); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return list;
    }
    // $ANTLR end "generalList"


    // $ANTLR start "list"
    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:135:1: list returns [TList result] : (mResult= queryList | mResult= generalList );
    public final TList list() throws RecognitionException {
        TList result = null;

        TList mResult = null;


        try {
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:136:2: (mResult= queryList | mResult= generalList )
            int alt11=2;
            int LA11_0 = input.LA(1);

            if ( (LA11_0==31) ) {
                alt11=1;
            }
            else if ( (LA11_0==24) ) {
                alt11=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 11, 0, input);

                throw nvae;
            }
            switch (alt11) {
                case 1 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:136:4: mResult= queryList
                    {
                    pushFollow(FOLLOW_queryList_in_list510);
                    mResult=queryList();

                    state._fsp--;

                    result=mResult;

                    }
                    break;
                case 2 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:136:41: mResult= generalList
                    {
                    pushFollow(FOLLOW_generalList_in_list517);
                    mResult=generalList();

                    state._fsp--;

                    result=mResult;

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end "list"


    // $ANTLR start "ib_query"
    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:139:1: ib_query returns [TReceive reception] : sender= item_ap ;
    public final TReceive ib_query() throws RecognitionException {
        TReceive reception = null;

        TAtom sender = null;


        try {
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:140:2: (sender= item_ap )
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:140:4: sender= item_ap
            {
            pushFollow(FOLLOW_item_ap_in_ib_query536);
            sender=item_ap();

            state._fsp--;

            reception=new TReceive(sender);

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return reception;
    }
    // $ANTLR end "ib_query"


    // $ANTLR start "executePlan"
    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:144:1: executePlan returns [TPlan ePlan] : (mPlan= plans | '^' '(' name= ID ')' );
    public final TPlan executePlan() throws RecognitionException {
        TPlan ePlan = null;

        Token name=null;
        TPlan mPlan = null;


        try {
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:145:2: (mPlan= plans | '^' '(' name= ID ')' )
            int alt12=2;
            int LA12_0 = input.LA(1);

            if ( (LA12_0==26) ) {
                alt12=1;
            }
            else if ( (LA12_0==23) ) {
                alt12=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 12, 0, input);

                throw nvae;
            }
            switch (alt12) {
                case 1 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:145:4: mPlan= plans
                    {
                    pushFollow(FOLLOW_plans_in_executePlan557);
                    mPlan=plans();

                    state._fsp--;

                    ePlan=mPlan;

                    }
                    break;
                case 2 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:147:2: '^' '(' name= ID ')'
                    {
                    match(input,23,FOLLOW_23_in_executePlan566); 
                    match(input,24,FOLLOW_24_in_executePlan568); 
                    name=(Token)match(input,ID,FOLLOW_ID_in_executePlan572); 
                    match(input,25,FOLLOW_25_in_executePlan574); 
                    ePlan=new TPlan(TConstants._Plan_Indirect_Call);
                    	ePlan.addFirst(new TAtom(name.getText()));
                    	//ePlan=mPlan;
                    	

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ePlan;
    }
    // $ANTLR end "executePlan"


    // $ANTLR start "action"
    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:154:1: action returns [TAction action] : ( EXECUTE nPlan= executePlan | QUERY nQuery= list | ADD nAList= addList | DELETE nDList= deleteList | SEND '(' receiver= item ',' message= generalList ')' | RECEIVE '(' mAction= ib_query ')' | INTERNAL ( (regNumber= integer ) | ( 'FI' ) | ( 'OI' ) ) );
    public final TAction action() throws RecognitionException {
        TAction action = null;

        TPlan nPlan = null;

        TList nQuery = null;

        TList nAList = null;

        TList nDList = null;

        TAtom receiver = null;

        TList message = null;

        TReceive mAction = null;

        Integer regNumber = null;


        try {
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:155:2: ( EXECUTE nPlan= executePlan | QUERY nQuery= list | ADD nAList= addList | DELETE nDList= deleteList | SEND '(' receiver= item ',' message= generalList ')' | RECEIVE '(' mAction= ib_query ')' | INTERNAL ( (regNumber= integer ) | ( 'FI' ) | ( 'OI' ) ) )
            int alt14=7;
            switch ( input.LA(1) ) {
            case EXECUTE:
                {
                alt14=1;
                }
                break;
            case QUERY:
                {
                alt14=2;
                }
                break;
            case ADD:
                {
                alt14=3;
                }
                break;
            case DELETE:
                {
                alt14=4;
                }
                break;
            case SEND:
                {
                alt14=5;
                }
                break;
            case RECEIVE:
                {
                alt14=6;
                }
                break;
            case INTERNAL:
                {
                alt14=7;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 14, 0, input);

                throw nvae;
            }

            switch (alt14) {
                case 1 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:157:2: EXECUTE nPlan= executePlan
                    {
                    match(input,EXECUTE,FOLLOW_EXECUTE_in_action597); 
                    pushFollow(FOLLOW_executePlan_in_action601);
                    nPlan=executePlan();

                    state._fsp--;

                    TMass._Terminal.printlnDebug("Action execute"); action=new TExecute(nPlan);

                    }
                    break;
                case 2 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:159:4: QUERY nQuery= list
                    {
                    match(input,QUERY,FOLLOW_QUERY_in_action610); 
                    pushFollow(FOLLOW_list_in_action614);
                    nQuery=list();

                    state._fsp--;

                    TMass._Terminal.printlnDebug("Action query"); action=new TQuery(nQuery);

                    }
                    break;
                case 3 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:161:4: ADD nAList= addList
                    {
                    match(input,ADD,FOLLOW_ADD_in_action623); 
                    pushFollow(FOLLOW_addList_in_action627);
                    nAList=addList();

                    state._fsp--;

                    TMass._Terminal.printlnDebug("Action add"); action=new TAdd(nAList);

                    }
                    break;
                case 4 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:163:4: DELETE nDList= deleteList
                    {
                    match(input,DELETE,FOLLOW_DELETE_in_action636); 
                    pushFollow(FOLLOW_deleteList_in_action640);
                    nDList=deleteList();

                    state._fsp--;

                    TMass._Terminal.printlnDebug("Action delete"); action=new TDelete(nDList);

                    }
                    break;
                case 5 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:165:4: SEND '(' receiver= item ',' message= generalList ')'
                    {
                    match(input,SEND,FOLLOW_SEND_in_action649); 
                    match(input,24,FOLLOW_24_in_action651); 
                    pushFollow(FOLLOW_item_in_action655);
                    receiver=item();

                    state._fsp--;

                    match(input,27,FOLLOW_27_in_action657); 
                    pushFollow(FOLLOW_generalList_in_action661);
                    message=generalList();

                    state._fsp--;

                    match(input,25,FOLLOW_25_in_action663); 
                    TMass._Terminal.printlnDebug("Action send"); action=new TSend(receiver,message);

                    }
                    break;
                case 6 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:167:4: RECEIVE '(' mAction= ib_query ')'
                    {
                    match(input,RECEIVE,FOLLOW_RECEIVE_in_action671); 
                    match(input,24,FOLLOW_24_in_action673); 
                    pushFollow(FOLLOW_ib_query_in_action677);
                    mAction=ib_query();

                    state._fsp--;

                    match(input,25,FOLLOW_25_in_action679); 
                     action=mAction;

                    }
                    break;
                case 7 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:168:4: INTERNAL ( (regNumber= integer ) | ( 'FI' ) | ( 'OI' ) )
                    {
                    match(input,INTERNAL,FOLLOW_INTERNAL_in_action687); 
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:168:13: ( (regNumber= integer ) | ( 'FI' ) | ( 'OI' ) )
                    int alt13=3;
                    switch ( input.LA(1) ) {
                    case NUMBER:
                        {
                        alt13=1;
                        }
                        break;
                    case 33:
                        {
                        alt13=2;
                        }
                        break;
                    case 34:
                        {
                        alt13=3;
                        }
                        break;
                    default:
                        NoViableAltException nvae =
                            new NoViableAltException("", 13, 0, input);

                        throw nvae;
                    }

                    switch (alt13) {
                        case 1 :
                            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:168:14: (regNumber= integer )
                            {
                            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:168:14: (regNumber= integer )
                            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:168:15: regNumber= integer
                            {
                            pushFollow(FOLLOW_integer_in_action693);
                            regNumber=integer();

                            state._fsp--;


                            }

                            TMass._Terminal.printlnDebug("Action switch"); action=new TRegisterSwitch(regNumber);

                            }
                            break;
                        case 2 :
                            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:170:20: ( 'FI' )
                            {
                            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:170:20: ( 'FI' )
                            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:170:21: 'FI'
                            {
                            match(input,33,FOLLOW_33_in_action719); 

                            }

                            TMass._Terminal.printlnDebug("Action freeze inputs");
                                        action=new TInternalActions(TInternalActions._IA_FREEZE_INPUTS);

                            }
                            break;
                        case 3 :
                            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:173:20: ( 'OI' )
                            {
                            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:173:20: ( 'OI' )
                            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:173:21: 'OI'
                            {
                            match(input,34,FOLLOW_34_in_action756); 

                            }

                            TMass._Terminal.printlnDebug("Action open inputs");
                                        action=new TInternalActions(TInternalActions._IA_OPEN_INPUTS);

                            }
                            break;

                    }


                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return action;
    }
    // $ANTLR end "action"


    // $ANTLR start "alll"
    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:178:1: alll returns [TObject alllObject] : (gList= generalList ';' | '^' mPlan= plans ';' );
    public final TObject alll() throws RecognitionException {
        TObject alllObject = null;

        TList gList = null;

        TPlan mPlan = null;


        try {
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:179:2: (gList= generalList ';' | '^' mPlan= plans ';' )
            int alt15=2;
            int LA15_0 = input.LA(1);

            if ( (LA15_0==24) ) {
                alt15=1;
            }
            else if ( (LA15_0==23) ) {
                alt15=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 15, 0, input);

                throw nvae;
            }
            switch (alt15) {
                case 1 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:179:4: gList= generalList ';'
                    {
                    pushFollow(FOLLOW_generalList_in_alll792);
                    gList=generalList();

                    state._fsp--;

                    alllObject=gList;
                    match(input,SEMICOLON,FOLLOW_SEMICOLON_in_alll796); 

                    }
                    break;
                case 2 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:179:48: '^' mPlan= plans ';'
                    {
                    match(input,23,FOLLOW_23_in_alll800); 
                    pushFollow(FOLLOW_plans_in_alll804);
                    mPlan=plans();

                    state._fsp--;

                    alllObject=mPlan;
                    match(input,SEMICOLON,FOLLOW_SEMICOLON_in_alll808); 

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return alllObject;
    }
    // $ANTLR end "alll"


    // $ANTLR start "agent_loader"
    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:182:1: agent_loader[String name, boolean element] returns [TAgent agent] : INTENTION ':' nPlan= plans ';' ( DATABASE ':' (nList= addList ';' )+ )? ;
    public final TAgent agent_loader(String name, boolean element) throws RecognitionException {
        TAgent agent = null;

        TPlan nPlan = null;

        TList nList = null;


        try {
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:183:2: ( INTENTION ':' nPlan= plans ';' ( DATABASE ':' (nList= addList ';' )+ )? )
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:184:2: INTENTION ':' nPlan= plans ';' ( DATABASE ':' (nList= addList ';' )+ )?
            {

             	agent=new TAgent(name, element); 
            	
            match(input,INTENTION,FOLLOW_INTENTION_in_agent_loader833); 
            match(input,35,FOLLOW_35_in_agent_loader835); 
            pushFollow(FOLLOW_plans_in_agent_loader843);
            nPlan=plans();

            state._fsp--;

            agent.adoptPlan(nPlan);
            match(input,SEMICOLON,FOLLOW_SEMICOLON_in_agent_loader853); 
            // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:193:4: ( DATABASE ':' (nList= addList ';' )+ )?
            int alt17=2;
            int LA17_0 = input.LA(1);

            if ( (LA17_0==DATABASE) ) {
                alt17=1;
            }
            switch (alt17) {
                case 1 :
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:193:5: DATABASE ':' (nList= addList ';' )+
                    {
                    match(input,DATABASE,FOLLOW_DATABASE_in_agent_loader863); 
                    match(input,35,FOLLOW_35_in_agent_loader865); 
                    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:194:4: (nList= addList ';' )+
                    int cnt16=0;
                    loop16:
                    do {
                        int alt16=2;
                        int LA16_0 = input.LA(1);

                        if ( (LA16_0==24||LA16_0==29) ) {
                            alt16=1;
                        }


                        switch (alt16) {
                    	case 1 :
                    	    // C:\\Users\\zborilf\\workspace\\TMass-X\\src\\jTMass\\core\\jALLL\\ALLL.g:194:5: nList= addList ';'
                    	    {
                    	    pushFollow(FOLLOW_addList_in_agent_loader874);
                    	    nList=addList();

                    	    state._fsp--;

                    	    match(input,SEMICOLON,FOLLOW_SEMICOLON_in_agent_loader876); 
                    	     
                    	    		if(nList.getType()==TConstants._Add)
                    	    				agent.addBelief((TList)nList);
                    	    		else
                    	    			     	agent.addPlan((TPlan)nList, false);

                    	    }
                    	    break;

                    	default :
                    	    if ( cnt16 >= 1 ) break loop16;
                                EarlyExitException eee =
                                    new EarlyExitException(16, input);
                                throw eee;
                        }
                        cnt16++;
                    } while (true);


                    }
                    break;

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return agent;
    }
    // $ANTLR end "agent_loader"

    // Delegated rules


 

    public static final BitSet FOLLOW_NUMBER_in_integer31 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_17_in_apoTau51 = new BitSet(new long[]{0x00000000003E0000L});
    public static final BitSet FOLLOW_apoTau_in_apoTau57 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_18_in_apoTau66 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_19_in_apoTau80 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_20_in_apoTau94 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_21_in_apoTau101 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_integer_in_apoTau105 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_item126 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_integer_in_item137 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_apoTau_in_item148 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_item_ap169 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_integer_in_item_ap178 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_22_in_item_ap185 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_apoTau_in_item_ap194 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_list_in_deleteList215 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_23_in_deleteList222 = new BitSet(new long[]{0x0000000001000000L});
    public static final BitSet FOLLOW_24_in_deleteList224 = new BitSet(new long[]{0x00000000007E0030L});
    public static final BitSet FOLLOW_item_ap_in_deleteList228 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_25_in_deleteList235 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_26_in_plans256 = new BitSet(new long[]{0x0000000000001FC0L});
    public static final BitSet FOLLOW_action_in_plans260 = new BitSet(new long[]{0x0000000018000000L});
    public static final BitSet FOLLOW_27_in_plans268 = new BitSet(new long[]{0x0000000000001FC0L});
    public static final BitSet FOLLOW_action_in_plans272 = new BitSet(new long[]{0x0000000018000000L});
    public static final BitSet FOLLOW_28_in_plans281 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_generalList_in_addList302 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_29_in_addList312 = new BitSet(new long[]{0x00000000003E0030L});
    public static final BitSet FOLLOW_item_in_addList321 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_SEMICOLON_in_addList323 = new BitSet(new long[]{0x0000000004000000L});
    public static final BitSet FOLLOW_plans_in_addList327 = new BitSet(new long[]{0x0000000040000000L});
    public static final BitSet FOLLOW_30_in_addList329 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_item_ap_in_queryListItem354 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_queryList_in_queryListItem361 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_31_in_queryList383 = new BitSet(new long[]{0x00000000807E0030L});
    public static final BitSet FOLLOW_queryListItem_in_queryList387 = new BitSet(new long[]{0x0000000108000000L});
    public static final BitSet FOLLOW_27_in_queryList398 = new BitSet(new long[]{0x00000000807E0030L});
    public static final BitSet FOLLOW_queryListItem_in_queryList402 = new BitSet(new long[]{0x0000000108000000L});
    public static final BitSet FOLLOW_32_in_queryList415 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_item_in_generalListItem435 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_generalList_in_generalListItem442 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_24_in_generalList465 = new BitSet(new long[]{0x00000000013E0030L});
    public static final BitSet FOLLOW_generalListItem_in_generalList469 = new BitSet(new long[]{0x000000000A000000L});
    public static final BitSet FOLLOW_27_in_generalList477 = new BitSet(new long[]{0x00000000013E0030L});
    public static final BitSet FOLLOW_generalListItem_in_generalList481 = new BitSet(new long[]{0x000000000A000000L});
    public static final BitSet FOLLOW_25_in_generalList491 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_queryList_in_list510 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_generalList_in_list517 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_item_ap_in_ib_query536 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_plans_in_executePlan557 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_23_in_executePlan566 = new BitSet(new long[]{0x0000000001000000L});
    public static final BitSet FOLLOW_24_in_executePlan568 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_ID_in_executePlan572 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_25_in_executePlan574 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_EXECUTE_in_action597 = new BitSet(new long[]{0x0000000004800000L});
    public static final BitSet FOLLOW_executePlan_in_action601 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_QUERY_in_action610 = new BitSet(new long[]{0x00000000817E0030L});
    public static final BitSet FOLLOW_list_in_action614 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ADD_in_action623 = new BitSet(new long[]{0x00000000213E0030L});
    public static final BitSet FOLLOW_addList_in_action627 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_DELETE_in_action636 = new BitSet(new long[]{0x0000000081FE0030L});
    public static final BitSet FOLLOW_deleteList_in_action640 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_SEND_in_action649 = new BitSet(new long[]{0x0000000001000000L});
    public static final BitSet FOLLOW_24_in_action651 = new BitSet(new long[]{0x00000000003E0030L});
    public static final BitSet FOLLOW_item_in_action655 = new BitSet(new long[]{0x0000000008000000L});
    public static final BitSet FOLLOW_27_in_action657 = new BitSet(new long[]{0x00000000013E0030L});
    public static final BitSet FOLLOW_generalList_in_action661 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_25_in_action663 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RECEIVE_in_action671 = new BitSet(new long[]{0x0000000001000000L});
    public static final BitSet FOLLOW_24_in_action673 = new BitSet(new long[]{0x00000000007E0030L});
    public static final BitSet FOLLOW_ib_query_in_action677 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_25_in_action679 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_INTERNAL_in_action687 = new BitSet(new long[]{0x0000000600000010L});
    public static final BitSet FOLLOW_integer_in_action693 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_33_in_action719 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_34_in_action756 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_generalList_in_alll792 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_SEMICOLON_in_alll796 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_23_in_alll800 = new BitSet(new long[]{0x0000000004000000L});
    public static final BitSet FOLLOW_plans_in_alll804 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_SEMICOLON_in_alll808 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_INTENTION_in_agent_loader833 = new BitSet(new long[]{0x0000000800000000L});
    public static final BitSet FOLLOW_35_in_agent_loader835 = new BitSet(new long[]{0x0000000004000000L});
    public static final BitSet FOLLOW_plans_in_agent_loader843 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_SEMICOLON_in_agent_loader853 = new BitSet(new long[]{0x0000000000004002L});
    public static final BitSet FOLLOW_DATABASE_in_agent_loader863 = new BitSet(new long[]{0x0000000800000000L});
    public static final BitSet FOLLOW_35_in_agent_loader865 = new BitSet(new long[]{0x00000000213E0030L});
    public static final BitSet FOLLOW_addList_in_agent_loader874 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_SEMICOLON_in_agent_loader876 = new BitSet(new long[]{0x00000000213E0032L});

}