This commit is contained in:
Eric Vergnaud 2016-12-13 00:17:02 +08:00
parent 9df5f3d571
commit edaeaadf99
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ namespace Antlr4.Runtime
protected virtual IDictionary<string, int> CreateTokenTypeMap(IVocabulary vocabulary)
{
var result = new Dictionary<string, int>();
for (int i = 0; i < Atn.maxTokenType; i++)
for (int i = 0; i <= Atn.maxTokenType; i++)
{
string literalName = vocabulary.GetLiteralName(i);
if (literalName != null)