// main: expression void Main() { try { Result = Expression(); } catch (ParserException p) { Error = p; } }
//-----The recursive descent parser bit----- //return true on success public bool Parse(List <Token> tokens) { Error = null; Result = null; if (tokens.Count == 0) { return(true); } this.tokens = tokens; pos = 0; Main(); return(Error == null); }