public void Pushback(Token t) { _Pushback.Add(t); }
public UnexpectedTokenParseException(Token token) : base("Unexpected token: " + token.ToString()) { }
/// <summary> /// Answer the next token or null if no more /// </summary> /// <returns></returns> public Token Next() { LatestToken = GetNextToken(); return LatestToken; }
BELLocation LocationFromToken(Token t) { return new BELLocation(_ContextString, t.Line, t.Column); }
public ParseException(BELLocation loc, string message, Token token) : base(loc.ToString() + " : " + message + (token == null ? "" : ": " + token.ToString())) { Location = loc; }
public UnexpectedTokenParseException(BELLocation loc, Token token) : base(loc, "Unexpected token: " + token.ToString()) { }
public ParseException(string message, Token token) : base(message + (token == null ? "" : ": " + token.ToString())) { }
private void Expected(string what) { ExpectedWhat = what; ButGotToken = Scanner.LatestToken; }