Example #1
0
 public void Pushback(Token t)
 {
     _Pushback.Add(t);
 }
		public UnexpectedTokenParseException(Token token) : base("Unexpected token: " + token.ToString())
		{
		}
Example #3
0
 /// <summary>
 /// Answer the next token or null if no more
 /// </summary>
 /// <returns></returns>
 public Token Next()
 {
     LatestToken = GetNextToken();
     return LatestToken;
 }
Example #4
0
		BELLocation LocationFromToken(Token t)
		{
			return new BELLocation(_ContextString, t.Line, t.Column);
		}
Example #5
0
 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())
 {
 }
Example #7
0
		public ParseException(string message, Token token) : base(message + (token == null ? "" : ": " + token.ToString()))
		{
		}
Example #8
0
 private void Expected(string what)
 {
     ExpectedWhat = what;
     ButGotToken = Scanner.LatestToken;
 }