private void ParseToken(TokenType type, string value)
{
Token token = this.NextToken();
if (token == null)
throw new ParserException(string.Format("Expected '{0}'", value));
if (token.Type != type || token.Value != value)
throw new ParserException(string.Format("Unexpected '{0}'", token.Value));
}