// $ANTLR 3.4 C:\\Users\\Woody\\Documents\\antlr\\SGF.g 2012-09-22 17:28:19
package net.woodyfolsom.msproj.sgf;

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

@SuppressWarnings({"all", "warnings", "unchecked"})
public class SGFParser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "COLON", "COMMA", "DIGIT", "LBRACKET", "LCLETTER", "LPAREN", "MINUS", "PERIOD", "PLUS", "RBRACKET", "RPAREN", "SEMICOLON", "SLASH", "SPACE", "UCLETTER", "'AB'", "'AP'", "'BC'", "'BR'", "'CA'", "'CP'", "'EV'", "'FF'", "'GM'", "'KM'", "'PB'", "'PC'", "'PW'", "'RE'", "'RU'", "'SO'", "'SZ'", "'TM'", "'US'", "'WC'", "'WR'"
    };

    public static final int EOF=-1;
    public static final int T__19=19;
    public static final int T__20=20;
    public static final int T__21=21;
    public static final int T__22=22;
    public static final int T__23=23;
    public static final int T__24=24;
    public static final int T__25=25;
    public static final int T__26=26;
    public static final int T__27=27;
    public static final int T__28=28;
    public static final int T__29=29;
    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 T__33=33;
    public static final int T__34=34;
    public static final int T__35=35;
    public static final int T__36=36;
    public static final int T__37=37;
    public static final int T__38=38;
    public static final int T__39=39;
    public static final int COLON=4;
    public static final int COMMA=5;
    public static final int DIGIT=6;
    public static final int LBRACKET=7;
    public static final int LCLETTER=8;
    public static final int LPAREN=9;
    public static final int MINUS=10;
    public static final int PERIOD=11;
    public static final int PLUS=12;
    public static final int RBRACKET=13;
    public static final int RPAREN=14;
    public static final int SEMICOLON=15;
    public static final int SLASH=16;
    public static final int SPACE=17;
    public static final int UCLETTER=18;

    // delegates
    public Parser[] getDelegates() {
        return new Parser[] {};
    }

    // delegators


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

    public String[] getTokenNames() { return SGFParser.tokenNames; }
    public String getGrammarFileName() { return "C:\\Users\\Woody\\Documents\\antlr\\SGF.g"; }



    // $ANTLR start "collection"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:7:1: collection returns [NodeCollection nodeCollection] : ( gameTree )+ ;
    public final NodeCollection collection() throws RecognitionException {
        NodeCollection nodeCollection = null;


        GameTree gameTree1 =null;



        nodeCollection = new NodeCollection();

        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:11:2: ( ( gameTree )+ )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:11:4: ( gameTree )+
            {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:11:4: ( gameTree )+
            int cnt1=0;
            loop1:
            do {
                int alt1=2;
                int LA1_0 = input.LA(1);

                if ( (LA1_0==LPAREN) ) {
                    alt1=1;
                }


                switch (alt1) {
            	case 1 :
            	    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:11:5: gameTree
            	    {
            	    pushFollow(FOLLOW_gameTree_in_collection36);
            	    gameTree1=gameTree();

            	    state._fsp--;


            	    nodeCollection.add(gameTree1);

            	    }
            	    break;

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


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return nodeCollection;
    }
    // $ANTLR end "collection"



    // $ANTLR start "gameTree"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:14:1: gameTree returns [GameTree gameTree] : LPAREN sequence ( gameTree )* RPAREN ;
    public final GameTree gameTree() throws RecognitionException {
        GameTree gameTree = null;


        List<Node> sequence2 =null;



        gameTree = new GameTree();

        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:18:2: ( LPAREN sequence ( gameTree )* RPAREN )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:18:5: LPAREN sequence ( gameTree )* RPAREN
            {
            match(input,LPAREN,FOLLOW_LPAREN_in_gameTree61); 

            pushFollow(FOLLOW_sequence_in_gameTree63);
            sequence2=sequence();

            state._fsp--;


            gameTree.setNodeSequence(sequence2);

            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:18:73: ( gameTree )*
            loop2:
            do {
                int alt2=2;
                int LA2_0 = input.LA(1);

                if ( (LA2_0==LPAREN) ) {
                    alt2=1;
                }


                switch (alt2) {
            	case 1 :
            	    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:18:74: gameTree
            	    {
            	    pushFollow(FOLLOW_gameTree_in_gameTree67);
            	    gameTree();

            	    state._fsp--;


            	    gameTree.addSubTree(gameTree);

            	    }
            	    break;

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


            match(input,RPAREN,FOLLOW_RPAREN_in_gameTree72); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return gameTree;
    }
    // $ANTLR end "gameTree"



    // $ANTLR start "sequence"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:21:1: sequence returns [List<Node> nodeSequence] : ( node )+ ;
    public final List<Node> sequence() throws RecognitionException {
        List<Node> nodeSequence = null;


        Node node3 =null;



        nodeSequence = new ArrayList<Node>();

        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:25:2: ( ( node )+ )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:25:4: ( node )+
            {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:25:4: ( node )+
            int cnt3=0;
            loop3:
            do {
                int alt3=2;
                int LA3_0 = input.LA(1);

                if ( (LA3_0==SEMICOLON) ) {
                    alt3=1;
                }


                switch (alt3) {
            	case 1 :
            	    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:25:5: node
            	    {
            	    pushFollow(FOLLOW_node_in_sequence94);
            	    node3=node();

            	    state._fsp--;


            	    nodeSequence.add(node3);

            	    }
            	    break;

            	default :
            	    if ( cnt3 >= 1 ) break loop3;
                        EarlyExitException eee =
                            new EarlyExitException(3, input);
                        throw eee;
                }
                cnt3++;
            } while (true);


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return nodeSequence;
    }
    // $ANTLR end "sequence"



    // $ANTLR start "node"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:27:1: node returns [Node node] : SEMICOLON ( property )* ;
    public final Node node() throws RecognitionException {
        Node node = null;


        SGFProperty property4 =null;



        node = new Node();

        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:31:2: ( SEMICOLON ( property )* )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:31:4: SEMICOLON ( property )*
            {
            match(input,SEMICOLON,FOLLOW_SEMICOLON_in_node115); 

            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:31:14: ( property )*
            loop4:
            do {
                int alt4=2;
                int LA4_0 = input.LA(1);

                if ( ((LA4_0 >= UCLETTER && LA4_0 <= 39)) ) {
                    alt4=1;
                }


                switch (alt4) {
            	case 1 :
            	    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:31:15: property
            	    {
            	    pushFollow(FOLLOW_property_in_node118);
            	    property4=property();

            	    state._fsp--;


            	    node.addProperty(property4);

            	    }
            	    break;

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


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return node;
    }
    // $ANTLR end "node"



    // $ANTLR start "property"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:33:1: property returns [SGFProperty sgfProperty] : ( numIdent ( LBRACKET numValue RBRACKET )+ | ( playerIdent ) ( LBRACKET ( coordValue )? RBRACKET )+ | strIdent LBRACKET RBRACKET | strIdent ( LBRACKET strValue RBRACKET )+ | result ( LBRACKET resValue RBRACKET )+ | komi ( LBRACKET realValue RBRACKET )+ | coordIdent ( LBRACKET coordValue RBRACKET )+ );
    public final SGFProperty property() throws RecognitionException {
        SGFProperty sgfProperty = null;


        SGFParser.playerIdent_return playerIdent5 =null;

        SGFParser.coordValue_return coordValue6 =null;



        sgfProperty = new SGFProperty();

        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:37:2: ( numIdent ( LBRACKET numValue RBRACKET )+ | ( playerIdent ) ( LBRACKET ( coordValue )? RBRACKET )+ | strIdent LBRACKET RBRACKET | strIdent ( LBRACKET strValue RBRACKET )+ | result ( LBRACKET resValue RBRACKET )+ | komi ( LBRACKET realValue RBRACKET )+ | coordIdent ( LBRACKET coordValue RBRACKET )+ )
            int alt12=7;
            alt12 = dfa12.predict(input);
            switch (alt12) {
                case 1 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:37:4: numIdent ( LBRACKET numValue RBRACKET )+
                    {
                    pushFollow(FOLLOW_numIdent_in_property139);
                    numIdent();

                    state._fsp--;


                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:37:13: ( LBRACKET numValue RBRACKET )+
                    int cnt5=0;
                    loop5:
                    do {
                        int alt5=2;
                        int LA5_0 = input.LA(1);

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


                        switch (alt5) {
                    	case 1 :
                    	    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:37:14: LBRACKET numValue RBRACKET
                    	    {
                    	    match(input,LBRACKET,FOLLOW_LBRACKET_in_property142); 

                    	    pushFollow(FOLLOW_numValue_in_property144);
                    	    numValue();

                    	    state._fsp--;


                    	    match(input,RBRACKET,FOLLOW_RBRACKET_in_property146); 

                    	    }
                    	    break;

                    	default :
                    	    if ( cnt5 >= 1 ) break loop5;
                                EarlyExitException eee =
                                    new EarlyExitException(5, input);
                                throw eee;
                        }
                        cnt5++;
                    } while (true);


                    }
                    break;
                case 2 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:38:4: ( playerIdent ) ( LBRACKET ( coordValue )? RBRACKET )+
                    {
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:38:4: ( playerIdent )
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:38:5: playerIdent
                    {
                    pushFollow(FOLLOW_playerIdent_in_property154);
                    playerIdent5=playerIdent();

                    state._fsp--;


                    sgfProperty.setIdent(new PlayerIdent((playerIdent5!=null?input.toString(playerIdent5.start,playerIdent5.stop):null)));

                    }


                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:38:78: ( LBRACKET ( coordValue )? RBRACKET )+
                    int cnt7=0;
                    loop7:
                    do {
                        int alt7=2;
                        int LA7_0 = input.LA(1);

                        if ( (LA7_0==LBRACKET) ) {
                            alt7=1;
                        }


                        switch (alt7) {
                    	case 1 :
                    	    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:38:79: LBRACKET ( coordValue )? RBRACKET
                    	    {
                    	    match(input,LBRACKET,FOLLOW_LBRACKET_in_property159); 

                    	    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:38:88: ( coordValue )?
                    	    int alt6=2;
                    	    int LA6_0 = input.LA(1);

                    	    if ( (LA6_0==LCLETTER) ) {
                    	        alt6=1;
                    	    }
                    	    switch (alt6) {
                    	        case 1 :
                    	            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:38:88: coordValue
                    	            {
                    	            pushFollow(FOLLOW_coordValue_in_property161);
                    	            coordValue6=coordValue();

                    	            state._fsp--;


                    	            }
                    	            break;

                    	    }


                    	    match(input,RBRACKET,FOLLOW_RBRACKET_in_property164); 

                    	    sgfProperty.setValue(new CoordValue((coordValue6!=null?input.toString(coordValue6.start,coordValue6.stop):null)));

                    	    }
                    	    break;

                    	default :
                    	    if ( cnt7 >= 1 ) break loop7;
                                EarlyExitException eee =
                                    new EarlyExitException(7, input);
                                throw eee;
                        }
                        cnt7++;
                    } while (true);


                    }
                    break;
                case 3 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:40:4: strIdent LBRACKET RBRACKET
                    {
                    pushFollow(FOLLOW_strIdent_in_property176);
                    strIdent();

                    state._fsp--;


                    match(input,LBRACKET,FOLLOW_LBRACKET_in_property178); 

                    match(input,RBRACKET,FOLLOW_RBRACKET_in_property180); 

                    }
                    break;
                case 4 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:41:4: strIdent ( LBRACKET strValue RBRACKET )+
                    {
                    pushFollow(FOLLOW_strIdent_in_property185);
                    strIdent();

                    state._fsp--;


                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:41:13: ( LBRACKET strValue RBRACKET )+
                    int cnt8=0;
                    loop8:
                    do {
                        int alt8=2;
                        int LA8_0 = input.LA(1);

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


                        switch (alt8) {
                    	case 1 :
                    	    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:41:14: LBRACKET strValue RBRACKET
                    	    {
                    	    match(input,LBRACKET,FOLLOW_LBRACKET_in_property188); 

                    	    pushFollow(FOLLOW_strValue_in_property190);
                    	    strValue();

                    	    state._fsp--;


                    	    match(input,RBRACKET,FOLLOW_RBRACKET_in_property192); 

                    	    }
                    	    break;

                    	default :
                    	    if ( cnt8 >= 1 ) break loop8;
                                EarlyExitException eee =
                                    new EarlyExitException(8, input);
                                throw eee;
                        }
                        cnt8++;
                    } while (true);


                    }
                    break;
                case 5 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:42:4: result ( LBRACKET resValue RBRACKET )+
                    {
                    pushFollow(FOLLOW_result_in_property200);
                    result();

                    state._fsp--;


                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:42:11: ( LBRACKET resValue RBRACKET )+
                    int cnt9=0;
                    loop9:
                    do {
                        int alt9=2;
                        int LA9_0 = input.LA(1);

                        if ( (LA9_0==LBRACKET) ) {
                            alt9=1;
                        }


                        switch (alt9) {
                    	case 1 :
                    	    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:42:12: LBRACKET resValue RBRACKET
                    	    {
                    	    match(input,LBRACKET,FOLLOW_LBRACKET_in_property203); 

                    	    pushFollow(FOLLOW_resValue_in_property205);
                    	    resValue();

                    	    state._fsp--;


                    	    match(input,RBRACKET,FOLLOW_RBRACKET_in_property207); 

                    	    }
                    	    break;

                    	default :
                    	    if ( cnt9 >= 1 ) break loop9;
                                EarlyExitException eee =
                                    new EarlyExitException(9, input);
                                throw eee;
                        }
                        cnt9++;
                    } while (true);


                    }
                    break;
                case 6 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:43:4: komi ( LBRACKET realValue RBRACKET )+
                    {
                    pushFollow(FOLLOW_komi_in_property214);
                    komi();

                    state._fsp--;


                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:43:9: ( LBRACKET realValue RBRACKET )+
                    int cnt10=0;
                    loop10:
                    do {
                        int alt10=2;
                        int LA10_0 = input.LA(1);

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


                        switch (alt10) {
                    	case 1 :
                    	    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:43:10: LBRACKET realValue RBRACKET
                    	    {
                    	    match(input,LBRACKET,FOLLOW_LBRACKET_in_property217); 

                    	    pushFollow(FOLLOW_realValue_in_property219);
                    	    realValue();

                    	    state._fsp--;


                    	    match(input,RBRACKET,FOLLOW_RBRACKET_in_property221); 

                    	    }
                    	    break;

                    	default :
                    	    if ( cnt10 >= 1 ) break loop10;
                                EarlyExitException eee =
                                    new EarlyExitException(10, input);
                                throw eee;
                        }
                        cnt10++;
                    } while (true);


                    }
                    break;
                case 7 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:44:4: coordIdent ( LBRACKET coordValue RBRACKET )+
                    {
                    pushFollow(FOLLOW_coordIdent_in_property228);
                    coordIdent();

                    state._fsp--;


                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:44:14: ( LBRACKET coordValue RBRACKET )+
                    int cnt11=0;
                    loop11:
                    do {
                        int alt11=2;
                        int LA11_0 = input.LA(1);

                        if ( (LA11_0==LBRACKET) ) {
                            alt11=1;
                        }


                        switch (alt11) {
                    	case 1 :
                    	    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:44:15: LBRACKET coordValue RBRACKET
                    	    {
                    	    match(input,LBRACKET,FOLLOW_LBRACKET_in_property230); 

                    	    pushFollow(FOLLOW_coordValue_in_property232);
                    	    coordValue();

                    	    state._fsp--;


                    	    match(input,RBRACKET,FOLLOW_RBRACKET_in_property234); 

                    	    }
                    	    break;

                    	default :
                    	    if ( cnt11 >= 1 ) break loop11;
                                EarlyExitException eee =
                                    new EarlyExitException(11, input);
                                throw eee;
                        }
                        cnt11++;
                    } while (true);


                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return sgfProperty;
    }
    // $ANTLR end "property"


    public static class playerIdent_return extends ParserRuleReturnScope {
    };


    // $ANTLR start "playerIdent"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:46:1: playerIdent :{...}? strIdent ;
    public final SGFParser.playerIdent_return playerIdent() throws RecognitionException {
        SGFParser.playerIdent_return retval = new SGFParser.playerIdent_return();
        retval.start = input.LT(1);


        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:46:14: ({...}? strIdent )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:46:16: {...}? strIdent
            {
            if ( !(((input.LT(1).getText().equals("W") || input.LT(1).getText().equals("B")))) ) {
                throw new FailedPredicateException(input, "playerIdent", "(input.LT(1).getText().equals(\"W\") || input.LT(1).getText().equals(\"B\"))");
            }

            pushFollow(FOLLOW_strIdent_in_playerIdent247);
            strIdent();

            state._fsp--;


            }

            retval.stop = input.LT(-1);


        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "playerIdent"



    // $ANTLR start "strIdent"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:48:1: strIdent : ( charEnc | source | blackCountry | whiteCountry | event | playerBlack | playerWhite | blackRank | whiteRank | result | rules | place | application | copyright | username | ( UCLETTER )+ );
    public final void strIdent() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:49:2: ( charEnc | source | blackCountry | whiteCountry | event | playerBlack | playerWhite | blackRank | whiteRank | result | rules | place | application | copyright | username | ( UCLETTER )+ )
            int alt14=16;
            switch ( input.LA(1) ) {
            case 23:
                {
                alt14=1;
                }
                break;
            case 34:
                {
                alt14=2;
                }
                break;
            case 21:
                {
                alt14=3;
                }
                break;
            case 38:
                {
                alt14=4;
                }
                break;
            case 25:
                {
                alt14=5;
                }
                break;
            case 29:
                {
                alt14=6;
                }
                break;
            case 31:
                {
                alt14=7;
                }
                break;
            case 22:
                {
                alt14=8;
                }
                break;
            case 39:
                {
                alt14=9;
                }
                break;
            case 32:
                {
                alt14=10;
                }
                break;
            case 33:
                {
                alt14=11;
                }
                break;
            case 30:
                {
                alt14=12;
                }
                break;
            case 20:
                {
                alt14=13;
                }
                break;
            case 24:
                {
                alt14=14;
                }
                break;
            case 37:
                {
                alt14=15;
                }
                break;
            case UCLETTER:
                {
                alt14=16;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 14, 0, input);

                throw nvae;

            }

            switch (alt14) {
                case 1 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:49:4: charEnc
                    {
                    pushFollow(FOLLOW_charEnc_in_strIdent257);
                    charEnc();

                    state._fsp--;


                    }
                    break;
                case 2 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:50:10: source
                    {
                    pushFollow(FOLLOW_source_in_strIdent268);
                    source();

                    state._fsp--;


                    }
                    break;
                case 3 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:51:10: blackCountry
                    {
                    pushFollow(FOLLOW_blackCountry_in_strIdent279);
                    blackCountry();

                    state._fsp--;


                    }
                    break;
                case 4 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:52:10: whiteCountry
                    {
                    pushFollow(FOLLOW_whiteCountry_in_strIdent290);
                    whiteCountry();

                    state._fsp--;


                    }
                    break;
                case 5 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:53:4: event
                    {
                    pushFollow(FOLLOW_event_in_strIdent295);
                    event();

                    state._fsp--;


                    }
                    break;
                case 6 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:54:4: playerBlack
                    {
                    pushFollow(FOLLOW_playerBlack_in_strIdent300);
                    playerBlack();

                    state._fsp--;


                    }
                    break;
                case 7 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:55:4: playerWhite
                    {
                    pushFollow(FOLLOW_playerWhite_in_strIdent305);
                    playerWhite();

                    state._fsp--;


                    }
                    break;
                case 8 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:56:4: blackRank
                    {
                    pushFollow(FOLLOW_blackRank_in_strIdent310);
                    blackRank();

                    state._fsp--;


                    }
                    break;
                case 9 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:57:4: whiteRank
                    {
                    pushFollow(FOLLOW_whiteRank_in_strIdent315);
                    whiteRank();

                    state._fsp--;


                    }
                    break;
                case 10 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:58:4: result
                    {
                    pushFollow(FOLLOW_result_in_strIdent320);
                    result();

                    state._fsp--;


                    }
                    break;
                case 11 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:59:4: rules
                    {
                    pushFollow(FOLLOW_rules_in_strIdent325);
                    rules();

                    state._fsp--;


                    }
                    break;
                case 12 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:60:4: place
                    {
                    pushFollow(FOLLOW_place_in_strIdent330);
                    place();

                    state._fsp--;


                    }
                    break;
                case 13 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:61:12: application
                    {
                    pushFollow(FOLLOW_application_in_strIdent343);
                    application();

                    state._fsp--;


                    }
                    break;
                case 14 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:62:11: copyright
                    {
                    pushFollow(FOLLOW_copyright_in_strIdent355);
                    copyright();

                    state._fsp--;


                    }
                    break;
                case 15 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:63:11: username
                    {
                    pushFollow(FOLLOW_username_in_strIdent367);
                    username();

                    state._fsp--;


                    }
                    break;
                case 16 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:64:11: ( UCLETTER )+
                    {
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:64:11: ( UCLETTER )+
                    int cnt13=0;
                    loop13:
                    do {
                        int alt13=2;
                        int LA13_0 = input.LA(1);

                        if ( (LA13_0==UCLETTER) ) {
                            alt13=1;
                        }


                        switch (alt13) {
                    	case 1 :
                    	    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:64:11: UCLETTER
                    	    {
                    	    match(input,UCLETTER,FOLLOW_UCLETTER_in_strIdent379); 

                    	    }
                    	    break;

                    	default :
                    	    if ( cnt13 >= 1 ) break loop13;
                                EarlyExitException eee =
                                    new EarlyExitException(13, input);
                                throw eee;
                        }
                        cnt13++;
                    } while (true);


                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "strIdent"



    // $ANTLR start "coordIdent"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:66:1: coordIdent : addBlack ;
    public final void coordIdent() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:67:2: ( addBlack )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:67:4: addBlack
            {
            pushFollow(FOLLOW_addBlack_in_coordIdent389);
            addBlack();

            state._fsp--;


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "coordIdent"



    // $ANTLR start "numIdent"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:69:1: numIdent : ( fileFormat | game | size | time );
    public final void numIdent() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:70:2: ( fileFormat | game | size | time )
            int alt15=4;
            switch ( input.LA(1) ) {
            case 26:
                {
                alt15=1;
                }
                break;
            case 27:
                {
                alt15=2;
                }
                break;
            case 35:
                {
                alt15=3;
                }
                break;
            case 36:
                {
                alt15=4;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 15, 0, input);

                throw nvae;

            }

            switch (alt15) {
                case 1 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:70:4: fileFormat
                    {
                    pushFollow(FOLLOW_fileFormat_in_numIdent400);
                    fileFormat();

                    state._fsp--;


                    }
                    break;
                case 2 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:71:4: game
                    {
                    pushFollow(FOLLOW_game_in_numIdent405);
                    game();

                    state._fsp--;


                    }
                    break;
                case 3 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:72:4: size
                    {
                    pushFollow(FOLLOW_size_in_numIdent410);
                    size();

                    state._fsp--;


                    }
                    break;
                case 4 :
                    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:73:4: time
                    {
                    pushFollow(FOLLOW_time_in_numIdent415);
                    time();

                    state._fsp--;


                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "numIdent"



    // $ANTLR start "numValue"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:75:1: numValue : ( DIGIT )+ ;
    public final void numValue() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:76:2: ( ( DIGIT )+ )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:76:4: ( DIGIT )+
            {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:76:4: ( DIGIT )+
            int cnt16=0;
            loop16:
            do {
                int alt16=2;
                int LA16_0 = input.LA(1);

                if ( (LA16_0==DIGIT) ) {
                    alt16=1;
                }


                switch (alt16) {
            	case 1 :
            	    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:76:4: DIGIT
            	    {
            	    match(input,DIGIT,FOLLOW_DIGIT_in_numValue424); 

            	    }
            	    break;

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


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "numValue"



    // $ANTLR start "realIdent"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:78:1: realIdent : komi ;
    public final void realIdent() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:79:2: ( komi )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:79:4: komi
            {
            pushFollow(FOLLOW_komi_in_realIdent435);
            komi();

            state._fsp--;


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "realIdent"



    // $ANTLR start "resValue"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:81:1: resValue : playerIdent PLUS realValue ;
    public final void resValue() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:82:2: ( playerIdent PLUS realValue )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:82:4: playerIdent PLUS realValue
            {
            pushFollow(FOLLOW_playerIdent_in_resValue445);
            playerIdent();

            state._fsp--;


            match(input,PLUS,FOLLOW_PLUS_in_resValue447); 

            pushFollow(FOLLOW_realValue_in_resValue449);
            realValue();

            state._fsp--;


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "resValue"



    // $ANTLR start "realValue"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:84:1: realValue : ( DIGIT )+ PERIOD ( DIGIT )+ ;
    public final void realValue() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:85:2: ( ( DIGIT )+ PERIOD ( DIGIT )+ )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:85:4: ( DIGIT )+ PERIOD ( DIGIT )+
            {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:85:4: ( DIGIT )+
            int cnt17=0;
            loop17:
            do {
                int alt17=2;
                int LA17_0 = input.LA(1);

                if ( (LA17_0==DIGIT) ) {
                    alt17=1;
                }


                switch (alt17) {
            	case 1 :
            	    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:85:4: DIGIT
            	    {
            	    match(input,DIGIT,FOLLOW_DIGIT_in_realValue459); 

            	    }
            	    break;

            	default :
            	    if ( cnt17 >= 1 ) break loop17;
                        EarlyExitException eee =
                            new EarlyExitException(17, input);
                        throw eee;
                }
                cnt17++;
            } while (true);


            match(input,PERIOD,FOLLOW_PERIOD_in_realValue462); 

            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:85:18: ( DIGIT )+
            int cnt18=0;
            loop18:
            do {
                int alt18=2;
                int LA18_0 = input.LA(1);

                if ( (LA18_0==DIGIT) ) {
                    alt18=1;
                }


                switch (alt18) {
            	case 1 :
            	    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:85:18: DIGIT
            	    {
            	    match(input,DIGIT,FOLLOW_DIGIT_in_realValue464); 

            	    }
            	    break;

            	default :
            	    if ( cnt18 >= 1 ) break loop18;
                        EarlyExitException eee =
                            new EarlyExitException(18, input);
                        throw eee;
                }
                cnt18++;
            } while (true);


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "realValue"


    public static class coordValue_return extends ParserRuleReturnScope {
    };


    // $ANTLR start "coordValue"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:87:1: coordValue : LCLETTER LCLETTER ;
    public final SGFParser.coordValue_return coordValue() throws RecognitionException {
        SGFParser.coordValue_return retval = new SGFParser.coordValue_return();
        retval.start = input.LT(1);


        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:87:13: ( LCLETTER LCLETTER )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:87:15: LCLETTER LCLETTER
            {
            match(input,LCLETTER,FOLLOW_LCLETTER_in_coordValue474); 

            match(input,LCLETTER,FOLLOW_LCLETTER_in_coordValue476); 

            }

            retval.stop = input.LT(-1);


        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "coordValue"



    // $ANTLR start "fileFormat"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:89:1: fileFormat : 'FF' ;
    public final void fileFormat() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:90:2: ( 'FF' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:90:4: 'FF'
            {
            match(input,26,FOLLOW_26_in_fileFormat486); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "fileFormat"



    // $ANTLR start "game"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:91:1: game : 'GM' ;
    public final void game() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:91:7: ( 'GM' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:91:9: 'GM'
            {
            match(input,27,FOLLOW_27_in_game494); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "game"



    // $ANTLR start "size"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:92:1: size : 'SZ' ;
    public final void size() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:92:7: ( 'SZ' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:92:9: 'SZ'
            {
            match(input,35,FOLLOW_35_in_size502); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "size"



    // $ANTLR start "charEnc"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:93:1: charEnc : 'CA' ;
    public final void charEnc() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:93:9: ( 'CA' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:93:11: 'CA'
            {
            match(input,23,FOLLOW_23_in_charEnc509); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "charEnc"



    // $ANTLR start "source"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:94:1: source : 'SO' ;
    public final void source() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:94:8: ( 'SO' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:94:10: 'SO'
            {
            match(input,34,FOLLOW_34_in_source516); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "source"



    // $ANTLR start "blackCountry"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:95:1: blackCountry : 'BC' ;
    public final void blackCountry() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:96:2: ( 'BC' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:96:4: 'BC'
            {
            match(input,21,FOLLOW_21_in_blackCountry525); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "blackCountry"



    // $ANTLR start "whiteCountry"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:97:1: whiteCountry : 'WC' ;
    public final void whiteCountry() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:98:2: ( 'WC' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:98:4: 'WC'
            {
            match(input,38,FOLLOW_38_in_whiteCountry534); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "whiteCountry"



    // $ANTLR start "event"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:99:1: event : 'EV' ;
    public final void event() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:99:7: ( 'EV' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:99:9: 'EV'
            {
            match(input,25,FOLLOW_25_in_event541); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "event"



    // $ANTLR start "playerBlack"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:100:1: playerBlack : 'PB' ;
    public final void playerBlack() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:101:2: ( 'PB' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:101:4: 'PB'
            {
            match(input,29,FOLLOW_29_in_playerBlack549); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "playerBlack"



    // $ANTLR start "playerWhite"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:102:1: playerWhite : 'PW' ;
    public final void playerWhite() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:103:2: ( 'PW' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:103:4: 'PW'
            {
            match(input,31,FOLLOW_31_in_playerWhite557); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "playerWhite"



    // $ANTLR start "blackRank"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:104:1: blackRank : 'BR' ;
    public final void blackRank() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:105:2: ( 'BR' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:105:4: 'BR'
            {
            match(input,22,FOLLOW_22_in_blackRank565); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "blackRank"



    // $ANTLR start "whiteRank"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:106:1: whiteRank : 'WR' ;
    public final void whiteRank() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:107:2: ( 'WR' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:107:5: 'WR'
            {
            match(input,39,FOLLOW_39_in_whiteRank575); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "whiteRank"



    // $ANTLR start "komi"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:108:1: komi : 'KM' ;
    public final void komi() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:108:7: ( 'KM' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:108:9: 'KM'
            {
            match(input,28,FOLLOW_28_in_komi583); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "komi"



    // $ANTLR start "result"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:109:1: result : 'RE' ;
    public final void result() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:109:9: ( 'RE' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:109:11: 'RE'
            {
            match(input,32,FOLLOW_32_in_result591); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "result"



    // $ANTLR start "rules"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:110:1: rules : 'RU' ;
    public final void rules() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:110:7: ( 'RU' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:110:9: 'RU'
            {
            match(input,33,FOLLOW_33_in_rules598); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "rules"



    // $ANTLR start "place"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:111:1: place : 'PC' ;
    public final void place() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:111:8: ( 'PC' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:111:11: 'PC'
            {
            match(input,30,FOLLOW_30_in_place607); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "place"



    // $ANTLR start "application"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:112:1: application : 'AP' ;
    public final void application() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:113:2: ( 'AP' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:113:4: 'AP'
            {
            match(input,20,FOLLOW_20_in_application615); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "application"



    // $ANTLR start "time"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:114:1: time : 'TM' ;
    public final void time() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:114:6: ( 'TM' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:114:8: 'TM'
            {
            match(input,36,FOLLOW_36_in_time622); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "time"



    // $ANTLR start "addBlack"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:115:1: addBlack : 'AB' ;
    public final void addBlack() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:115:9: ( 'AB' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:115:11: 'AB'
            {
            match(input,19,FOLLOW_19_in_addBlack628); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "addBlack"



    // $ANTLR start "copyright"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:116:1: copyright : 'CP' ;
    public final void copyright() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:117:2: ( 'CP' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:117:4: 'CP'
            {
            match(input,24,FOLLOW_24_in_copyright636); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "copyright"



    // $ANTLR start "username"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:118:1: username : 'US' ;
    public final void username() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:118:9: ( 'US' )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:118:11: 'US'
            {
            match(input,37,FOLLOW_37_in_username642); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "username"



    // $ANTLR start "strValue"
    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:120:1: strValue : ( UCLETTER | LCLETTER | MINUS | DIGIT | SPACE | PERIOD | COMMA | PLUS | SLASH | COLON )+ ;
    public final void strValue() throws RecognitionException {
        try {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:120:10: ( ( UCLETTER | LCLETTER | MINUS | DIGIT | SPACE | PERIOD | COMMA | PLUS | SLASH | COLON )+ )
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:120:12: ( UCLETTER | LCLETTER | MINUS | DIGIT | SPACE | PERIOD | COMMA | PLUS | SLASH | COLON )+
            {
            // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:120:12: ( UCLETTER | LCLETTER | MINUS | DIGIT | SPACE | PERIOD | COMMA | PLUS | SLASH | COLON )+
            int cnt19=0;
            loop19:
            do {
                int alt19=2;
                int LA19_0 = input.LA(1);

                if ( ((LA19_0 >= COLON && LA19_0 <= DIGIT)||LA19_0==LCLETTER||(LA19_0 >= MINUS && LA19_0 <= PLUS)||(LA19_0 >= SLASH && LA19_0 <= UCLETTER)) ) {
                    alt19=1;
                }


                switch (alt19) {
            	case 1 :
            	    // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:
            	    {
            	    if ( (input.LA(1) >= COLON && input.LA(1) <= DIGIT)||input.LA(1)==LCLETTER||(input.LA(1) >= MINUS && input.LA(1) <= PLUS)||(input.LA(1) >= SLASH && input.LA(1) <= UCLETTER) ) {
            	        input.consume();
            	        state.errorRecovery=false;
            	    }
            	    else {
            	        MismatchedSetException mse = new MismatchedSetException(null,input);
            	        throw mse;
            	    }


            	    }
            	    break;

            	default :
            	    if ( cnt19 >= 1 ) break loop19;
                        EarlyExitException eee =
                            new EarlyExitException(19, input);
                        throw eee;
                }
                cnt19++;
            } while (true);


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "strValue"

    // Delegated rules


    protected DFA12 dfa12 = new DFA12(this);
    static final String DFA12_eotS =
        "\45\uffff";
    static final String DFA12_eofS =
        "\45\uffff";
    static final String DFA12_minS =
        "\1\22\1\uffff\20\7\2\uffff\2\4\1\0\1\4\1\uffff\1\0\1\4\3\uffff\2"+
        "\4\1\0\3\4\1\uffff";
    static final String DFA12_maxS =
        "\1\47\1\uffff\17\7\1\22\2\uffff\1\22\1\47\1\0\1\22\1\uffff\1\0\1"+
        "\22\3\uffff\2\22\1\0\3\22\1\uffff";
    static final String DFA12_acceptS =
        "\1\uffff\1\1\20\uffff\1\6\1\7\4\uffff\1\4\2\uffff\1\5\1\2\1\3\6"+
        "\uffff\1\4";
    static final String DFA12_specialS =
        "\26\uffff\1\2\2\uffff\1\1\6\uffff\1\0\4\uffff}>";
    static final String[] DFA12_transitionS = {
            "\1\21\1\23\1\16\1\4\1\11\1\2\1\17\1\6\2\1\1\22\1\7\1\15\1\10"+
            "\1\13\1\14\1\3\2\1\1\20\1\5\1\12",
            "",
            "\1\24",
            "\1\24",
            "\1\24",
            "\1\24",
            "\1\24",
            "\1\24",
            "\1\24",
            "\1\24",
            "\1\24",
            "\1\25",
            "\1\24",
            "\1\24",
            "\1\24",
            "\1\24",
            "\1\24",
            "\1\24\12\uffff\1\21",
            "",
            "",
            "\3\30\1\uffff\1\27\1\uffff\3\30\1\26\2\uffff\3\30",
            "\3\30\1\uffff\1\27\1\uffff\3\30\1\31\2\uffff\2\30\1\32\1\uffff"+
            "\6\33\3\uffff\6\33\2\uffff\3\33",
            "\1\uffff",
            "\3\30\1\uffff\1\36\1\uffff\4\30\2\uffff\3\30",
            "",
            "\1\uffff",
            "\3\30\1\uffff\1\30\1\uffff\2\30\1\37\1\30\2\uffff\2\30\1\32",
            "",
            "",
            "",
            "\3\30\1\uffff\1\30\1\uffff\3\30\1\40\2\uffff\3\30",
            "\2\30\1\41\1\uffff\1\30\1\uffff\4\30\2\uffff\3\30",
            "\1\uffff",
            "\2\30\1\41\1\uffff\1\30\1\uffff\1\30\1\42\2\30\2\uffff\3\30",
            "\2\30\1\43\1\uffff\1\30\1\uffff\4\30\2\uffff\3\30",
            "\2\30\1\43\1\uffff\1\30\1\uffff\3\30\1\44\2\uffff\3\30",
            ""
    };

    static final short[] DFA12_eot = DFA.unpackEncodedString(DFA12_eotS);
    static final short[] DFA12_eof = DFA.unpackEncodedString(DFA12_eofS);
    static final char[] DFA12_min = DFA.unpackEncodedStringToUnsignedChars(DFA12_minS);
    static final char[] DFA12_max = DFA.unpackEncodedStringToUnsignedChars(DFA12_maxS);
    static final short[] DFA12_accept = DFA.unpackEncodedString(DFA12_acceptS);
    static final short[] DFA12_special = DFA.unpackEncodedString(DFA12_specialS);
    static final short[][] DFA12_transition;

    static {
        int numStates = DFA12_transitionS.length;
        DFA12_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA12_transition[i] = DFA.unpackEncodedString(DFA12_transitionS[i]);
        }
    }

    class DFA12 extends DFA {

        public DFA12(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 12;
            this.eot = DFA12_eot;
            this.eof = DFA12_eof;
            this.min = DFA12_min;
            this.max = DFA12_max;
            this.accept = DFA12_accept;
            this.special = DFA12_special;
            this.transition = DFA12_transition;
        }
        public String getDescription() {
            return "33:1: property returns [SGFProperty sgfProperty] : ( numIdent ( LBRACKET numValue RBRACKET )+ | ( playerIdent ) ( LBRACKET ( coordValue )? RBRACKET )+ | strIdent LBRACKET RBRACKET | strIdent ( LBRACKET strValue RBRACKET )+ | result ( LBRACKET resValue RBRACKET )+ | komi ( LBRACKET realValue RBRACKET )+ | coordIdent ( LBRACKET coordValue RBRACKET )+ );";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            TokenStream input = (TokenStream)_input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA12_32 = input.LA(1);

                         
                        int index12_32 = input.index();
                        input.rewind();

                        s = -1;
                        if ( (((input.LT(1).getText().equals("W") || input.LT(1).getText().equals("B")))) ) {s = 28;}

                        else if ( (true) ) {s = 24;}

                         
                        input.seek(index12_32);

                        if ( s>=0 ) return s;
                        break;

                    case 1 : 
                        int LA12_25 = input.LA(1);

                         
                        int index12_25 = input.index();
                        input.rewind();

                        s = -1;
                        if ( (((input.LT(1).getText().equals("W") || input.LT(1).getText().equals("B")))) ) {s = 28;}

                        else if ( (true) ) {s = 29;}

                         
                        input.seek(index12_25);

                        if ( s>=0 ) return s;
                        break;

                    case 2 : 
                        int LA12_22 = input.LA(1);

                         
                        int index12_22 = input.index();
                        input.rewind();

                        s = -1;
                        if ( (((input.LT(1).getText().equals("W") || input.LT(1).getText().equals("B")))) ) {s = 28;}

                        else if ( (true) ) {s = 29;}

                         
                        input.seek(index12_22);

                        if ( s>=0 ) return s;
                        break;
            }
            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 12, _s, input);
            error(nvae);
            throw nvae;
        }

    }
 

    public static final BitSet FOLLOW_gameTree_in_collection36 = new BitSet(new long[]{0x0000000000000202L});
    public static final BitSet FOLLOW_LPAREN_in_gameTree61 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_sequence_in_gameTree63 = new BitSet(new long[]{0x0000000000004200L});
    public static final BitSet FOLLOW_gameTree_in_gameTree67 = new BitSet(new long[]{0x0000000000004200L});
    public static final BitSet FOLLOW_RPAREN_in_gameTree72 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_node_in_sequence94 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_SEMICOLON_in_node115 = new BitSet(new long[]{0x000000FFFFFC0002L});
    public static final BitSet FOLLOW_property_in_node118 = new BitSet(new long[]{0x000000FFFFFC0002L});
    public static final BitSet FOLLOW_numIdent_in_property139 = new BitSet(new long[]{0x0000000000000080L});
    public static final BitSet FOLLOW_LBRACKET_in_property142 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_numValue_in_property144 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_RBRACKET_in_property146 = new BitSet(new long[]{0x0000000000000082L});
    public static final BitSet FOLLOW_playerIdent_in_property154 = new BitSet(new long[]{0x0000000000000080L});
    public static final BitSet FOLLOW_LBRACKET_in_property159 = new BitSet(new long[]{0x0000000000002100L});
    public static final BitSet FOLLOW_coordValue_in_property161 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_RBRACKET_in_property164 = new BitSet(new long[]{0x0000000000000082L});
    public static final BitSet FOLLOW_strIdent_in_property176 = new BitSet(new long[]{0x0000000000000080L});
    public static final BitSet FOLLOW_LBRACKET_in_property178 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_RBRACKET_in_property180 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_strIdent_in_property185 = new BitSet(new long[]{0x0000000000000080L});
    public static final BitSet FOLLOW_LBRACKET_in_property188 = new BitSet(new long[]{0x0000000000071D70L});
    public static final BitSet FOLLOW_strValue_in_property190 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_RBRACKET_in_property192 = new BitSet(new long[]{0x0000000000000082L});
    public static final BitSet FOLLOW_result_in_property200 = new BitSet(new long[]{0x0000000000000080L});
    public static final BitSet FOLLOW_LBRACKET_in_property203 = new BitSet(new long[]{0x000000E7E3F40000L});
    public static final BitSet FOLLOW_resValue_in_property205 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_RBRACKET_in_property207 = new BitSet(new long[]{0x0000000000000082L});
    public static final BitSet FOLLOW_komi_in_property214 = new BitSet(new long[]{0x0000000000000080L});
    public static final BitSet FOLLOW_LBRACKET_in_property217 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_realValue_in_property219 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_RBRACKET_in_property221 = new BitSet(new long[]{0x0000000000000082L});
    public static final BitSet FOLLOW_coordIdent_in_property228 = new BitSet(new long[]{0x0000000000000080L});
    public static final BitSet FOLLOW_LBRACKET_in_property230 = new BitSet(new long[]{0x0000000000000100L});
    public static final BitSet FOLLOW_coordValue_in_property232 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_RBRACKET_in_property234 = new BitSet(new long[]{0x0000000000000082L});
    public static final BitSet FOLLOW_strIdent_in_playerIdent247 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_charEnc_in_strIdent257 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_source_in_strIdent268 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_blackCountry_in_strIdent279 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_whiteCountry_in_strIdent290 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_event_in_strIdent295 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_playerBlack_in_strIdent300 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_playerWhite_in_strIdent305 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_blackRank_in_strIdent310 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_whiteRank_in_strIdent315 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_result_in_strIdent320 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_rules_in_strIdent325 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_place_in_strIdent330 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_application_in_strIdent343 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_copyright_in_strIdent355 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_username_in_strIdent367 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_UCLETTER_in_strIdent379 = new BitSet(new long[]{0x0000000000040002L});
    public static final BitSet FOLLOW_addBlack_in_coordIdent389 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_fileFormat_in_numIdent400 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_game_in_numIdent405 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_size_in_numIdent410 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_time_in_numIdent415 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_DIGIT_in_numValue424 = new BitSet(new long[]{0x0000000000000042L});
    public static final BitSet FOLLOW_komi_in_realIdent435 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_playerIdent_in_resValue445 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_PLUS_in_resValue447 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_realValue_in_resValue449 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_DIGIT_in_realValue459 = new BitSet(new long[]{0x0000000000000840L});
    public static final BitSet FOLLOW_PERIOD_in_realValue462 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_DIGIT_in_realValue464 = new BitSet(new long[]{0x0000000000000042L});
    public static final BitSet FOLLOW_LCLETTER_in_coordValue474 = new BitSet(new long[]{0x0000000000000100L});
    public static final BitSet FOLLOW_LCLETTER_in_coordValue476 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_26_in_fileFormat486 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_27_in_game494 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_35_in_size502 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_23_in_charEnc509 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_34_in_source516 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_21_in_blackCountry525 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_38_in_whiteCountry534 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_25_in_event541 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_29_in_playerBlack549 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_31_in_playerWhite557 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_22_in_blackRank565 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_39_in_whiteRank575 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_28_in_komi583 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_32_in_result591 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_33_in_rules598 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_30_in_place607 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_20_in_application615 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_36_in_time622 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_19_in_addBlack628 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_24_in_copyright636 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_37_in_username642 = new BitSet(new long[]{0x0000000000000002L});

}