diff --git a/.classpath b/.classpath
index e8e161c..7addda2 100644
--- a/.classpath
+++ b/.classpath
@@ -6,5 +6,6 @@
+
diff --git a/lib/antlrworks-1.4.3.jar b/lib/antlrworks-1.4.3.jar
new file mode 100644
index 0000000..a0f9d25
Binary files /dev/null and b/lib/antlrworks-1.4.3.jar differ
diff --git a/src/net/woodyfolsom/msproj/GoGame.java b/src/net/woodyfolsom/msproj/GoGame.java
index 779cb9f..aec015e 100644
--- a/src/net/woodyfolsom/msproj/GoGame.java
+++ b/src/net/woodyfolsom/msproj/GoGame.java
@@ -111,7 +111,7 @@ public class GoGame implements Runnable {
} else if ("alphabeta".equals(policyName)) {
return new AlphaBeta();
} else if ("montecarlo".equals(policyName)) {
- return new MonteCarloUCT(new RandomMovePolicy(), 10000L);
+ return new MonteCarloUCT(new RandomMovePolicy(), 3000L);
} else {
LOGGER.info("Unable to create Policy for unsupported name: " + policyName);
System.exit(INVALID_MOVE_GENERATOR);
diff --git a/src/net/woodyfolsom/msproj/policy/MonteCarlo.java b/src/net/woodyfolsom/msproj/policy/MonteCarlo.java
index 08f8306..0ebc391 100644
--- a/src/net/woodyfolsom/msproj/policy/MonteCarlo.java
+++ b/src/net/woodyfolsom/msproj/policy/MonteCarlo.java
@@ -65,9 +65,9 @@ public abstract class MonteCarlo implements Policy {
}
elapsedTime = System.currentTimeMillis() - startTime;
- //} while (elapsedTime < searchTimeLimit);
+ } while (elapsedTime < searchTimeLimit);
//TODO: for debugging, temporarily specify the number of state evaluations rather than time limit
- } while (numStateEvaluations < searchTimeLimit);
+ //} while (numStateEvaluations < searchTimeLimit);
return getBestAction(rootNode);
}
diff --git a/src/net/woodyfolsom/msproj/policy/MonteCarloUCT.java b/src/net/woodyfolsom/msproj/policy/MonteCarloUCT.java
index fd435ec..3490a28 100644
--- a/src/net/woodyfolsom/msproj/policy/MonteCarloUCT.java
+++ b/src/net/woodyfolsom/msproj/policy/MonteCarloUCT.java
@@ -26,8 +26,9 @@ public class MonteCarloUCT extends MonteCarlo {
double bestScore = Double.NEGATIVE_INFINITY;
GameTreeNode bestNode = node;
- //TODO: WHAT TO DO if the optimum leaf node is actually a terminal node?
- //from Kocsis and Szepesvari, the value of an actual terminal node is 0, unless estimated by rollout
+ //What if the optimum leaf node is actually a terminal node?
+ //Grom Kocsis and Szepesvari, the value of an actual terminal node is 0, so it will never be grown.
+
double nodeVisits = node.getProperties().getVisits();
for (Action action : node.getActions()) {
diff --git a/src/net/woodyfolsom/msproj/sgf/1334-gokifu-20120916-Gu_Li-Lee_Sedol.sgf b/src/net/woodyfolsom/msproj/sgf/1334-gokifu-20120916-Gu_Li-Lee_Sedol.sgf
new file mode 100644
index 0000000..af40f40
--- /dev/null
+++ b/src/net/woodyfolsom/msproj/sgf/1334-gokifu-20120916-Gu_Li-Lee_Sedol.sgf
@@ -0,0 +1,15 @@
+(;FF[4]GM[1]SZ[19]CA[UTF-8]SO[gokifu.com]BC[kr]WC[cn]EV[]PB[Lee Sedol]BR[9p]PW[Gu Li]WR[9p]KM[7.5]
+DT[2012-09-16]RE[W+R];B[qd];W[dc];B[dq];W[do];B[pp];W[cq];B[de];W[cg];B[cc];W[gc];B[gd];W[hd];B[fc]
+;W[fd];B[ge];W[fb];B[hc];W[ec];B[gb];W[fc];B[id];W[cd];B[he];W[oc];B[pe];W[qk];B[qi];W[qn];B[qo]
+;W[pn];B[np];W[oj];B[oi];W[ni];B[nj];W[pi];B[oh];W[pj];B[ph];W[qh];B[qg];W[rh];B[ri];W[rg];B[rf]
+;W[oo];B[op];W[mj];B[mc];W[nk];B[cr];W[cp];B[gq];W[md];B[nc];W[qf];B[sh];W[pg];B[sg];W[od];B[nd]
+;W[oe];B[ne];W[nf];B[qg];W[og];B[nh];W[mh];B[mg];W[ng];B[qh];W[mf];B[lg];W[lf];B[ld];W[qc];B[rc]
+;W[pb];B[rb];W[kg];B[lh];W[mi];B[dl];W[br];B[ce];W[bd];B[dg];W[dh];B[be];W[eg];B[fe];W[dd];B[df]
+;W[ci];B[gl];W[fh];B[ad];W[bc];B[dr];W[dm];B[em];W[cm];B[gg];W[gh];B[jq];W[fo];B[il];W[hg];B[ho]
+;W[lo];B[lq];W[kp];B[kq];W[ee];B[ef];W[ff];B[ed];W[gp];B[hq];W[ee];B[pf];W[of];B[ed];W[gn];B[ei]
+;W[eh];B[ii];W[kd];B[kc];W[ke];B[nb];W[fl];B[fk];W[ek];B[fj];W[dj];B[gf];W[gm];B[kh];W[jh];B[jg]
+;W[ig];B[jf];W[jd];B[je];W[kf];B[ki];W[jc];B[kb];W[jb];B[ib];W[ja];B[ob];W[ic];B[ih];W[ha];B[hb]
+;W[ga];B[ma];W[hh];B[hk];W[kl];B[kk];W[jk];B[jj];W[lk];B[bg];W[bh];B[cf];W[ch];B[ag];W[ac];B[el]
+;W[fm];B[ae];W[rn];B[ro];W[fq];B[fr];W[so];B[sp];W[sn];B[rp];W[gj];B[hj];W[ej];B[fi];W[gi];B[gk]
+;W[bj];B[jl];W[kj];B[ik];W[fg];B[ee];W[eq];B[er];W[km];B[bs];W[ar];B[rk];W[rl];B[qj];W[no];B[mp]
+;W[ql];B[qb];W[ia];B[hd];W[pc];B[pa];W[jo];B[hm];W[dp])
\ No newline at end of file
diff --git a/src/net/woodyfolsom/msproj/sgf/CoordValue.java b/src/net/woodyfolsom/msproj/sgf/CoordValue.java
new file mode 100644
index 0000000..7750c47
--- /dev/null
+++ b/src/net/woodyfolsom/msproj/sgf/CoordValue.java
@@ -0,0 +1,13 @@
+package net.woodyfolsom.msproj.sgf;
+
+public class CoordValue extends StrValue {
+ public final char column;
+ public final char row;
+
+ public CoordValue(String coord) {
+ super(coord);
+
+ column = coord.charAt(0);
+ row = coord.charAt(1);
+ }
+}
diff --git a/src/net/woodyfolsom/msproj/sgf/GameTree.java b/src/net/woodyfolsom/msproj/sgf/GameTree.java
new file mode 100644
index 0000000..3fc3c49
--- /dev/null
+++ b/src/net/woodyfolsom/msproj/sgf/GameTree.java
@@ -0,0 +1,35 @@
+package net.woodyfolsom.msproj.sgf;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public class GameTree {
+ private List nodeSequence = new ArrayList();
+ private List subTrees = new ArrayList();
+
+
+ public int getNodeCount() {
+ return nodeSequence.size();
+ }
+
+ public List getNodeSequence() {
+ return Collections.unmodifiableList(nodeSequence);
+ }
+
+ public void setNodeSequence(List nodeSequence) {
+ this.nodeSequence.clear();
+
+ for(Node node : nodeSequence) {
+ this.nodeSequence.add(node);
+ }
+ }
+
+ public void addSubTree(GameTree subTree) {
+ subTrees.add(subTree);
+ }
+
+ public int getSubTreeCount() {
+ return subTrees.size();
+ }
+}
diff --git a/src/net/woodyfolsom/msproj/sgf/Node.java b/src/net/woodyfolsom/msproj/sgf/Node.java
new file mode 100644
index 0000000..a7fac6f
--- /dev/null
+++ b/src/net/woodyfolsom/msproj/sgf/Node.java
@@ -0,0 +1,16 @@
+package net.woodyfolsom.msproj.sgf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Node {
+ private List properties = new ArrayList();
+
+ public void addProperty(SGFProperty property) {
+ properties.add(property);
+ }
+
+ public int getPropertyCount() {
+ return properties.size();
+ }
+}
diff --git a/src/net/woodyfolsom/msproj/sgf/NodeCollection.java b/src/net/woodyfolsom/msproj/sgf/NodeCollection.java
new file mode 100644
index 0000000..d311882
--- /dev/null
+++ b/src/net/woodyfolsom/msproj/sgf/NodeCollection.java
@@ -0,0 +1,25 @@
+package net.woodyfolsom.msproj.sgf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class NodeCollection {
+ private List gameTrees = new ArrayList();
+
+ public void add(GameTree gameTree) {
+ gameTrees.add(gameTree);
+ }
+
+ public GameTree getGameTree(int index) {
+ return gameTrees.get(index);
+ }
+
+ public int getGameTreeCount() {
+ return gameTrees.size();
+ }
+
+ @Override
+ public String toString() {
+ return "foo";
+ }
+}
diff --git a/src/net/woodyfolsom/msproj/sgf/PlayerIdent.java b/src/net/woodyfolsom/msproj/sgf/PlayerIdent.java
new file mode 100644
index 0000000..c9e9c13
--- /dev/null
+++ b/src/net/woodyfolsom/msproj/sgf/PlayerIdent.java
@@ -0,0 +1,7 @@
+package net.woodyfolsom.msproj.sgf;
+
+public class PlayerIdent extends StrIdent {
+ public PlayerIdent(String player) {
+ super(player);
+ }
+}
diff --git a/src/net/woodyfolsom/msproj/sgf/ResultValue.java b/src/net/woodyfolsom/msproj/sgf/ResultValue.java
new file mode 100644
index 0000000..44447f7
--- /dev/null
+++ b/src/net/woodyfolsom/msproj/sgf/ResultValue.java
@@ -0,0 +1,7 @@
+package net.woodyfolsom.msproj.sgf;
+
+public class ResultValue extends StrValue {
+ public ResultValue(String result) {
+ super(result);
+ }
+}
diff --git a/src/net/woodyfolsom/msproj/sgf/SGF.tokens b/src/net/woodyfolsom/msproj/sgf/SGF.tokens
new file mode 100644
index 0000000..9edf52d
--- /dev/null
+++ b/src/net/woodyfolsom/msproj/sgf/SGF.tokens
@@ -0,0 +1,57 @@
+T__19=19
+T__20=20
+T__21=21
+T__22=22
+T__23=23
+T__24=24
+T__25=25
+T__26=26
+T__27=27
+T__28=28
+T__29=29
+T__30=30
+T__31=31
+T__32=32
+T__33=33
+T__34=34
+T__35=35
+T__36=36
+T__37=37
+T__38=38
+T__39=39
+COLON=4
+COMMA=5
+DIGIT=6
+LBRACKET=7
+LCLETTER=8
+LPAREN=9
+MINUS=10
+PERIOD=11
+PLUS=12
+RBRACKET=13
+RPAREN=14
+SEMICOLON=15
+SLASH=16
+SPACE=17
+UCLETTER=18
+'AB'=19
+'AP'=20
+'BC'=21
+'BR'=22
+'CA'=23
+'CP'=24
+'EV'=25
+'FF'=26
+'GM'=27
+'KM'=28
+'PB'=29
+'PC'=30
+'PW'=31
+'RE'=32
+'RU'=33
+'SO'=34
+'SZ'=35
+'TM'=36
+'US'=37
+'WC'=38
+'WR'=39
diff --git a/src/net/woodyfolsom/msproj/sgf/SGFLexer.java b/src/net/woodyfolsom/msproj/sgf/SGFLexer.java
new file mode 100644
index 0000000..4b01a13
--- /dev/null
+++ b/src/net/woodyfolsom/msproj/sgf/SGFLexer.java
@@ -0,0 +1,1526 @@
+// $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 SGFLexer extends Lexer {
+ 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
+ // delegators
+ public Lexer[] getDelegates() {
+ return new Lexer[] {};
+ }
+
+ public SGFLexer() {}
+ public SGFLexer(CharStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public SGFLexer(CharStream input, RecognizerSharedState state) {
+ super(input,state);
+ }
+ public String getGrammarFileName() { return "C:\\Users\\Woody\\Documents\\antlr\\SGF.g"; }
+
+ // $ANTLR start "T__19"
+ public final void mT__19() throws RecognitionException {
+ try {
+ int _type = T__19;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:4:7: ( 'AB' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:4:9: 'AB'
+ {
+ match("AB");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__19"
+
+ // $ANTLR start "T__20"
+ public final void mT__20() throws RecognitionException {
+ try {
+ int _type = T__20;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:5:7: ( 'AP' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:5:9: 'AP'
+ {
+ match("AP");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__20"
+
+ // $ANTLR start "T__21"
+ public final void mT__21() throws RecognitionException {
+ try {
+ int _type = T__21;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:6:7: ( 'BC' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:6:9: 'BC'
+ {
+ match("BC");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__21"
+
+ // $ANTLR start "T__22"
+ public final void mT__22() throws RecognitionException {
+ try {
+ int _type = T__22;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:7:7: ( 'BR' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:7:9: 'BR'
+ {
+ match("BR");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__22"
+
+ // $ANTLR start "T__23"
+ public final void mT__23() throws RecognitionException {
+ try {
+ int _type = T__23;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:8:7: ( 'CA' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:8:9: 'CA'
+ {
+ match("CA");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__23"
+
+ // $ANTLR start "T__24"
+ public final void mT__24() throws RecognitionException {
+ try {
+ int _type = T__24;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:9:7: ( 'CP' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:9:9: 'CP'
+ {
+ match("CP");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__24"
+
+ // $ANTLR start "T__25"
+ public final void mT__25() throws RecognitionException {
+ try {
+ int _type = T__25;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:10:7: ( 'EV' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:10:9: 'EV'
+ {
+ match("EV");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__25"
+
+ // $ANTLR start "T__26"
+ public final void mT__26() throws RecognitionException {
+ try {
+ int _type = T__26;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:11:7: ( 'FF' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:11:9: 'FF'
+ {
+ match("FF");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__26"
+
+ // $ANTLR start "T__27"
+ public final void mT__27() throws RecognitionException {
+ try {
+ int _type = T__27;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:12:7: ( 'GM' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:12:9: 'GM'
+ {
+ match("GM");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__27"
+
+ // $ANTLR start "T__28"
+ public final void mT__28() throws RecognitionException {
+ try {
+ int _type = T__28;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:13:7: ( 'KM' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:13:9: 'KM'
+ {
+ match("KM");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__28"
+
+ // $ANTLR start "T__29"
+ public final void mT__29() throws RecognitionException {
+ try {
+ int _type = T__29;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:14:7: ( 'PB' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:14:9: 'PB'
+ {
+ match("PB");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__29"
+
+ // $ANTLR start "T__30"
+ public final void mT__30() throws RecognitionException {
+ try {
+ int _type = T__30;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:15:7: ( 'PC' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:15:9: 'PC'
+ {
+ match("PC");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__30"
+
+ // $ANTLR start "T__31"
+ public final void mT__31() throws RecognitionException {
+ try {
+ int _type = T__31;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:16:7: ( 'PW' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:16:9: 'PW'
+ {
+ match("PW");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__31"
+
+ // $ANTLR start "T__32"
+ public final void mT__32() throws RecognitionException {
+ try {
+ int _type = T__32;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:17:7: ( 'RE' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:17:9: 'RE'
+ {
+ match("RE");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__32"
+
+ // $ANTLR start "T__33"
+ public final void mT__33() throws RecognitionException {
+ try {
+ int _type = T__33;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:18:7: ( 'RU' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:18:9: 'RU'
+ {
+ match("RU");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__33"
+
+ // $ANTLR start "T__34"
+ public final void mT__34() throws RecognitionException {
+ try {
+ int _type = T__34;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:19:7: ( 'SO' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:19:9: 'SO'
+ {
+ match("SO");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__34"
+
+ // $ANTLR start "T__35"
+ public final void mT__35() throws RecognitionException {
+ try {
+ int _type = T__35;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:20:7: ( 'SZ' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:20:9: 'SZ'
+ {
+ match("SZ");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__35"
+
+ // $ANTLR start "T__36"
+ public final void mT__36() throws RecognitionException {
+ try {
+ int _type = T__36;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:21:7: ( 'TM' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:21:9: 'TM'
+ {
+ match("TM");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__36"
+
+ // $ANTLR start "T__37"
+ public final void mT__37() throws RecognitionException {
+ try {
+ int _type = T__37;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:22:7: ( 'US' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:22:9: 'US'
+ {
+ match("US");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__37"
+
+ // $ANTLR start "T__38"
+ public final void mT__38() throws RecognitionException {
+ try {
+ int _type = T__38;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:23:7: ( 'WC' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:23:9: 'WC'
+ {
+ match("WC");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__38"
+
+ // $ANTLR start "T__39"
+ public final void mT__39() throws RecognitionException {
+ try {
+ int _type = T__39;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:24:7: ( 'WR' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:24:9: 'WR'
+ {
+ match("WR");
+
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "T__39"
+
+ // $ANTLR start "LPAREN"
+ public final void mLPAREN() throws RecognitionException {
+ try {
+ int _type = LPAREN;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:122:9: ( '(' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:122:11: '('
+ {
+ match('(');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "LPAREN"
+
+ // $ANTLR start "SEMICOLON"
+ public final void mSEMICOLON() throws RecognitionException {
+ try {
+ int _type = SEMICOLON;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:124:11: ( ';' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:124:14: ';'
+ {
+ match(';');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "SEMICOLON"
+
+ // $ANTLR start "UCLETTER"
+ public final void mUCLETTER() throws RecognitionException {
+ try {
+ int _type = UCLETTER;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:126:10: ( 'A' .. 'Z' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:
+ {
+ if ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z') ) {
+ input.consume();
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "UCLETTER"
+
+ // $ANTLR start "LCLETTER"
+ public final void mLCLETTER() throws RecognitionException {
+ try {
+ int _type = LCLETTER;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:128:10: ( 'a' .. 'z' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:
+ {
+ if ( (input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {
+ input.consume();
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "LCLETTER"
+
+ // $ANTLR start "DIGIT"
+ public final void mDIGIT() throws RecognitionException {
+ try {
+ int _type = DIGIT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:130:8: ( '0' .. '9' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:
+ {
+ if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
+ input.consume();
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "DIGIT"
+
+ // $ANTLR start "LBRACKET"
+ public final void mLBRACKET() throws RecognitionException {
+ try {
+ int _type = LBRACKET;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:133:2: ( '[' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:133:4: '['
+ {
+ match('[');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "LBRACKET"
+
+ // $ANTLR start "RBRACKET"
+ public final void mRBRACKET() throws RecognitionException {
+ try {
+ int _type = RBRACKET;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:136:2: ( ']' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:136:4: ']'
+ {
+ match(']');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "RBRACKET"
+
+ // $ANTLR start "RPAREN"
+ public final void mRPAREN() throws RecognitionException {
+ try {
+ int _type = RPAREN;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:138:9: ( ')' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:138:11: ')'
+ {
+ match(')');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "RPAREN"
+
+ // $ANTLR start "COLON"
+ public final void mCOLON() throws RecognitionException {
+ try {
+ int _type = COLON;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:140:8: ( ':' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:140:10: ':'
+ {
+ match(':');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "COLON"
+
+ // $ANTLR start "MINUS"
+ public final void mMINUS() throws RecognitionException {
+ try {
+ int _type = MINUS;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:142:8: ( '-' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:142:10: '-'
+ {
+ match('-');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "MINUS"
+
+ // $ANTLR start "SPACE"
+ public final void mSPACE() throws RecognitionException {
+ try {
+ int _type = SPACE;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:144:8: ( ' ' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:144:10: ' '
+ {
+ match(' ');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "SPACE"
+
+ // $ANTLR start "PERIOD"
+ public final void mPERIOD() throws RecognitionException {
+ try {
+ int _type = PERIOD;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:146:9: ( '.' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:146:11: '.'
+ {
+ match('.');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "PERIOD"
+
+ // $ANTLR start "COMMA"
+ public final void mCOMMA() throws RecognitionException {
+ try {
+ int _type = COMMA;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:148:8: ( ',' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:148:10: ','
+ {
+ match(',');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "COMMA"
+
+ // $ANTLR start "PLUS"
+ public final void mPLUS() throws RecognitionException {
+ try {
+ int _type = PLUS;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:150:7: ( '+' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:150:9: '+'
+ {
+ match('+');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "PLUS"
+
+ // $ANTLR start "SLASH"
+ public final void mSLASH() throws RecognitionException {
+ try {
+ int _type = SLASH;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:152:8: ( '/' )
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:152:10: '/'
+ {
+ match('/');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ // do for sure before leaving
+ }
+ }
+ // $ANTLR end "SLASH"
+
+ public void mTokens() throws RecognitionException {
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:8: ( T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | T__39 | LPAREN | SEMICOLON | UCLETTER | LCLETTER | DIGIT | LBRACKET | RBRACKET | RPAREN | COLON | MINUS | SPACE | PERIOD | COMMA | PLUS | SLASH )
+ int alt1=36;
+ switch ( input.LA(1) ) {
+ case 'A':
+ {
+ switch ( input.LA(2) ) {
+ case 'B':
+ {
+ alt1=1;
+ }
+ break;
+ case 'P':
+ {
+ alt1=2;
+ }
+ break;
+ default:
+ alt1=24;
+ }
+
+ }
+ break;
+ case 'B':
+ {
+ switch ( input.LA(2) ) {
+ case 'C':
+ {
+ alt1=3;
+ }
+ break;
+ case 'R':
+ {
+ alt1=4;
+ }
+ break;
+ default:
+ alt1=24;
+ }
+
+ }
+ break;
+ case 'C':
+ {
+ switch ( input.LA(2) ) {
+ case 'A':
+ {
+ alt1=5;
+ }
+ break;
+ case 'P':
+ {
+ alt1=6;
+ }
+ break;
+ default:
+ alt1=24;
+ }
+
+ }
+ break;
+ case 'E':
+ {
+ int LA1_4 = input.LA(2);
+
+ if ( (LA1_4=='V') ) {
+ alt1=7;
+ }
+ else {
+ alt1=24;
+ }
+ }
+ break;
+ case 'F':
+ {
+ int LA1_5 = input.LA(2);
+
+ if ( (LA1_5=='F') ) {
+ alt1=8;
+ }
+ else {
+ alt1=24;
+ }
+ }
+ break;
+ case 'G':
+ {
+ int LA1_6 = input.LA(2);
+
+ if ( (LA1_6=='M') ) {
+ alt1=9;
+ }
+ else {
+ alt1=24;
+ }
+ }
+ break;
+ case 'K':
+ {
+ int LA1_7 = input.LA(2);
+
+ if ( (LA1_7=='M') ) {
+ alt1=10;
+ }
+ else {
+ alt1=24;
+ }
+ }
+ break;
+ case 'P':
+ {
+ switch ( input.LA(2) ) {
+ case 'B':
+ {
+ alt1=11;
+ }
+ break;
+ case 'C':
+ {
+ alt1=12;
+ }
+ break;
+ case 'W':
+ {
+ alt1=13;
+ }
+ break;
+ default:
+ alt1=24;
+ }
+
+ }
+ break;
+ case 'R':
+ {
+ switch ( input.LA(2) ) {
+ case 'E':
+ {
+ alt1=14;
+ }
+ break;
+ case 'U':
+ {
+ alt1=15;
+ }
+ break;
+ default:
+ alt1=24;
+ }
+
+ }
+ break;
+ case 'S':
+ {
+ switch ( input.LA(2) ) {
+ case 'O':
+ {
+ alt1=16;
+ }
+ break;
+ case 'Z':
+ {
+ alt1=17;
+ }
+ break;
+ default:
+ alt1=24;
+ }
+
+ }
+ break;
+ case 'T':
+ {
+ int LA1_11 = input.LA(2);
+
+ if ( (LA1_11=='M') ) {
+ alt1=18;
+ }
+ else {
+ alt1=24;
+ }
+ }
+ break;
+ case 'U':
+ {
+ int LA1_12 = input.LA(2);
+
+ if ( (LA1_12=='S') ) {
+ alt1=19;
+ }
+ else {
+ alt1=24;
+ }
+ }
+ break;
+ case 'W':
+ {
+ switch ( input.LA(2) ) {
+ case 'C':
+ {
+ alt1=20;
+ }
+ break;
+ case 'R':
+ {
+ alt1=21;
+ }
+ break;
+ default:
+ alt1=24;
+ }
+
+ }
+ break;
+ case '(':
+ {
+ alt1=22;
+ }
+ break;
+ case ';':
+ {
+ alt1=23;
+ }
+ break;
+ case 'D':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'M':
+ case 'N':
+ case 'O':
+ case 'Q':
+ case 'V':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ {
+ alt1=24;
+ }
+ break;
+ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'g':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'k':
+ case 'l':
+ case 'm':
+ case 'n':
+ case 'o':
+ case 'p':
+ case 'q':
+ case 'r':
+ case 's':
+ case 't':
+ case 'u':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z':
+ {
+ alt1=25;
+ }
+ break;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ {
+ alt1=26;
+ }
+ break;
+ case '[':
+ {
+ alt1=27;
+ }
+ break;
+ case ']':
+ {
+ alt1=28;
+ }
+ break;
+ case ')':
+ {
+ alt1=29;
+ }
+ break;
+ case ':':
+ {
+ alt1=30;
+ }
+ break;
+ case '-':
+ {
+ alt1=31;
+ }
+ break;
+ case ' ':
+ {
+ alt1=32;
+ }
+ break;
+ case '.':
+ {
+ alt1=33;
+ }
+ break;
+ case ',':
+ {
+ alt1=34;
+ }
+ break;
+ case '+':
+ {
+ alt1=35;
+ }
+ break;
+ case '/':
+ {
+ alt1=36;
+ }
+ break;
+ default:
+ NoViableAltException nvae =
+ new NoViableAltException("", 1, 0, input);
+
+ throw nvae;
+
+ }
+
+ switch (alt1) {
+ case 1 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:10: T__19
+ {
+ mT__19();
+
+
+ }
+ break;
+ case 2 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:16: T__20
+ {
+ mT__20();
+
+
+ }
+ break;
+ case 3 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:22: T__21
+ {
+ mT__21();
+
+
+ }
+ break;
+ case 4 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:28: T__22
+ {
+ mT__22();
+
+
+ }
+ break;
+ case 5 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:34: T__23
+ {
+ mT__23();
+
+
+ }
+ break;
+ case 6 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:40: T__24
+ {
+ mT__24();
+
+
+ }
+ break;
+ case 7 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:46: T__25
+ {
+ mT__25();
+
+
+ }
+ break;
+ case 8 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:52: T__26
+ {
+ mT__26();
+
+
+ }
+ break;
+ case 9 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:58: T__27
+ {
+ mT__27();
+
+
+ }
+ break;
+ case 10 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:64: T__28
+ {
+ mT__28();
+
+
+ }
+ break;
+ case 11 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:70: T__29
+ {
+ mT__29();
+
+
+ }
+ break;
+ case 12 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:76: T__30
+ {
+ mT__30();
+
+
+ }
+ break;
+ case 13 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:82: T__31
+ {
+ mT__31();
+
+
+ }
+ break;
+ case 14 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:88: T__32
+ {
+ mT__32();
+
+
+ }
+ break;
+ case 15 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:94: T__33
+ {
+ mT__33();
+
+
+ }
+ break;
+ case 16 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:100: T__34
+ {
+ mT__34();
+
+
+ }
+ break;
+ case 17 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:106: T__35
+ {
+ mT__35();
+
+
+ }
+ break;
+ case 18 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:112: T__36
+ {
+ mT__36();
+
+
+ }
+ break;
+ case 19 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:118: T__37
+ {
+ mT__37();
+
+
+ }
+ break;
+ case 20 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:124: T__38
+ {
+ mT__38();
+
+
+ }
+ break;
+ case 21 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:130: T__39
+ {
+ mT__39();
+
+
+ }
+ break;
+ case 22 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:136: LPAREN
+ {
+ mLPAREN();
+
+
+ }
+ break;
+ case 23 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:143: SEMICOLON
+ {
+ mSEMICOLON();
+
+
+ }
+ break;
+ case 24 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:153: UCLETTER
+ {
+ mUCLETTER();
+
+
+ }
+ break;
+ case 25 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:162: LCLETTER
+ {
+ mLCLETTER();
+
+
+ }
+ break;
+ case 26 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:171: DIGIT
+ {
+ mDIGIT();
+
+
+ }
+ break;
+ case 27 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:177: LBRACKET
+ {
+ mLBRACKET();
+
+
+ }
+ break;
+ case 28 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:186: RBRACKET
+ {
+ mRBRACKET();
+
+
+ }
+ break;
+ case 29 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:195: RPAREN
+ {
+ mRPAREN();
+
+
+ }
+ break;
+ case 30 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:202: COLON
+ {
+ mCOLON();
+
+
+ }
+ break;
+ case 31 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:208: MINUS
+ {
+ mMINUS();
+
+
+ }
+ break;
+ case 32 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:214: SPACE
+ {
+ mSPACE();
+
+
+ }
+ break;
+ case 33 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:220: PERIOD
+ {
+ mPERIOD();
+
+
+ }
+ break;
+ case 34 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:227: COMMA
+ {
+ mCOMMA();
+
+
+ }
+ break;
+ case 35 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:233: PLUS
+ {
+ mPLUS();
+
+
+ }
+ break;
+ case 36 :
+ // C:\\Users\\Woody\\Documents\\antlr\\SGF.g:1:238: SLASH
+ {
+ mSLASH();
+
+
+ }
+ break;
+
+ }
+
+ }
+
+
+
+
+}
\ No newline at end of file
diff --git a/src/net/woodyfolsom/msproj/sgf/SGFParser.java b/src/net/woodyfolsom/msproj/sgf/SGFParser.java
new file mode 100644
index 0000000..ac637ac
--- /dev/null
+++ b/src/net/woodyfolsom/msproj/sgf/SGFParser.java
@@ -0,0 +1,2325 @@
+// $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[] {
+ "", "", "", "", "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 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 nodeSequence] : ( node )+ ;
+ public final List sequence() throws RecognitionException {
+ List nodeSequence = null;
+
+
+ Node node3 =null;
+
+
+
+ nodeSequence = new ArrayList();
+
+ 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=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});
+
+}
\ No newline at end of file
diff --git a/src/net/woodyfolsom/msproj/sgf/SGFProperty.java b/src/net/woodyfolsom/msproj/sgf/SGFProperty.java
new file mode 100644
index 0000000..40024b8
--- /dev/null
+++ b/src/net/woodyfolsom/msproj/sgf/SGFProperty.java
@@ -0,0 +1,22 @@
+package net.woodyfolsom.msproj.sgf;
+
+public class SGFProperty {
+ private StrIdent ident;
+ private StrValue value;
+
+ public StrIdent getIdent() {
+ return ident;
+ }
+
+ public StrValue getValue() {
+ return value;
+ }
+
+ public void setIdent(StrIdent ident) {
+ this.ident = ident;
+ }
+
+ public void setValue(StrValue value) {
+ this.value = value;
+ }
+}
diff --git a/src/net/woodyfolsom/msproj/sgf/SGFReader.java b/src/net/woodyfolsom/msproj/sgf/SGFReader.java
new file mode 100644
index 0000000..0ad808d
--- /dev/null
+++ b/src/net/woodyfolsom/msproj/sgf/SGFReader.java
@@ -0,0 +1,5 @@
+package net.woodyfolsom.msproj.sgf;
+
+public class SGFReader {
+
+}
diff --git a/src/net/woodyfolsom/msproj/sgf/SGFWriter.java b/src/net/woodyfolsom/msproj/sgf/SGFWriter.java
new file mode 100644
index 0000000..8a41d18
--- /dev/null
+++ b/src/net/woodyfolsom/msproj/sgf/SGFWriter.java
@@ -0,0 +1,5 @@
+package net.woodyfolsom.msproj.sgf;
+
+public class SGFWriter {
+
+}
diff --git a/src/net/woodyfolsom/msproj/sgf/StrIdent.java b/src/net/woodyfolsom/msproj/sgf/StrIdent.java
new file mode 100644
index 0000000..cd1ef80
--- /dev/null
+++ b/src/net/woodyfolsom/msproj/sgf/StrIdent.java
@@ -0,0 +1,9 @@
+package net.woodyfolsom.msproj.sgf;
+
+public class StrIdent {
+ public final String value;
+
+ public StrIdent(String value) {
+ this.value = value;
+ }
+}
diff --git a/src/net/woodyfolsom/msproj/sgf/StrValue.java b/src/net/woodyfolsom/msproj/sgf/StrValue.java
new file mode 100644
index 0000000..22d4dbb
--- /dev/null
+++ b/src/net/woodyfolsom/msproj/sgf/StrValue.java
@@ -0,0 +1,9 @@
+package net.woodyfolsom.msproj.sgf;
+
+public class StrValue {
+ public final String value;
+
+ public StrValue(String value) {
+ this.value = value;
+ }
+}