fixed antlr bug reading beyond stream eof
This commit is contained in:
@@ -110,8 +110,12 @@ namespace antlr
|
||||
public virtual char LA(int i)
|
||||
{
|
||||
fill(i);
|
||||
return (char) queue[markerOffset + i - 1];
|
||||
}
|
||||
if ((this.markerOffset + i) <= this.queue.Count)
|
||||
{
|
||||
return (char)this.queue[(this.markerOffset + i) - 1];
|
||||
}
|
||||
return CharScanner.EOF_CHAR;
|
||||
}
|
||||
|
||||
/*Return an integer marker that can be used to rewind the buffer to
|
||||
* its current state.
|
||||
|
||||
@@ -402,9 +402,9 @@ namespace Spring.Expressions
|
||||
Assert.AreEqual(Int64.MaxValue.ToString(), ExpressionEvaluator.GetValue(null, "long.MaxValue.ToString()"));
|
||||
|
||||
// TODO (EE): THIS ANTLR TEST FAILS SINCE SOURCECODE MERGE!!!!!!
|
||||
// object int64 = ExpressionEvaluator.GetValue(null, Int64.MaxValue.ToString());
|
||||
// Assert.AreEqual(int64, Int64.MaxValue);
|
||||
// Assert.IsTrue(int64 is Int64);
|
||||
object int64 = ExpressionEvaluator.GetValue(null, Int64.MaxValue.ToString());
|
||||
Assert.AreEqual(int64, Int64.MaxValue);
|
||||
Assert.IsTrue(int64 is Int64);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user