public void CanPredictiveParseIntPlusIntTimesInt() { //why doesn't the parsing table work for this //somehow the terminal is X when it sees the * which is a nothing so then it just stops //dammit nothing ever works!!!! tokens = new Token[]{ new Token(){Symbol="("}, new Token(){Symbol="int",Value = "1"}, new Token(){Symbol="+"}, new Token(){Symbol="int",Value = "2"}, new Token(){Symbol=")"}, new Token(){Symbol="*"}, new Token(){Symbol="int",Value = "3"}, }; ParseNode parent = new ParseNode() { Symbol = "E" }; Parse(parent); var result = parent.GetResult(); }
public void CanPredictiveParseIntTimesInt() { tokens = new Token[]{ new Token(){Symbol="int",Value = "2"}, new Token(){Symbol="*"}, new Token(){Symbol="int",Value = "3"}, }; ParseNode parent = new ParseNode() { Symbol = "E" }; Parse(parent); var result = parent.GetResult(); }