forked from jasder/antlr
Updated to latest reference build of ANTLR 4
This commit is contained in:
parent
54c4bc826f
commit
e0b1d7dd26
|
@ -1 +1 @@
|
|||
Subproject commit a1b85fb2ae7d6475ca83559f47978f2fefd13e4f
|
||||
Subproject commit 873001d30c2baa6148783f2ce3be1044c5275d7d
|
|
@ -196,6 +196,8 @@ namespace Antlr4.Runtime.Dfa
|
|||
}
|
||||
|
||||
public virtual DFAState GetTarget(int symbol)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
if (edges == null)
|
||||
{
|
||||
|
@ -203,6 +205,7 @@ namespace Antlr4.Runtime.Dfa
|
|||
}
|
||||
return edges[symbol];
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void SetTarget(int symbol, DFAState target)
|
||||
{
|
||||
|
@ -229,6 +232,8 @@ namespace Antlr4.Runtime.Dfa
|
|||
}
|
||||
|
||||
public virtual DFAState GetContextTarget(int invokingState)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
if (contextEdges == null)
|
||||
{
|
||||
|
@ -240,6 +245,7 @@ namespace Antlr4.Runtime.Dfa
|
|||
}
|
||||
return contextEdges[invokingState];
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void SetContextTarget(int invokingState, DFAState target)
|
||||
{
|
||||
|
|
|
@ -234,7 +234,7 @@ namespace Antlr4.Runtime
|
|||
{
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
if (this.n > 0 && data[this.n - 1] == IntStreamConstants.Eof)
|
||||
if (this.n > 0 && data[this.n - 1] == (char)IntStreamConstants.Eof)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
@ -284,7 +284,7 @@ namespace Antlr4.Runtime
|
|||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
if (index > n)
|
||||
if (index >= n)
|
||||
{
|
||||
return IntStreamConstants.Eof;
|
||||
}
|
||||
|
@ -432,7 +432,7 @@ namespace Antlr4.Runtime
|
|||
if (interval.a < bufferStartIndex || interval.b >= bufferStartIndex + n)
|
||||
{
|
||||
throw new NotSupportedException("interval " + interval + " outside buffer: " + bufferStartIndex
|
||||
+ ".." + (bufferStartIndex + n));
|
||||
+ ".." + (bufferStartIndex + n - 1));
|
||||
}
|
||||
// convert from absolute to local index
|
||||
int i = interval.a - bufferStartIndex;
|
||||
|
|
Loading…
Reference in New Issue