I'm using VS2010 Exp. C# XP SP3 environment
My current issue is with SerializedVersion value
Run-Time ERROR: System.TypeInitializationException:
The type initializer for 'Antlr4.Runtime.Verilog2001Lexer' threw an exception. ---> System.NotSupportedException: Could not deserialize ATN with version 5 (expected 3).
I found the root cause but I don’t know a work around so I’m stuck
ATNSimulator.cs:
public abstract class ATNSimulator
{
public static readonly int SerializedVersion = 3;
…………………
public static ATN Deserialize(char[] data, bool optimize)
{
data = (char[])data.Clone();
// don't adjust the first value since that's the version number
for (int i = 1; i < data.Length; i++)
{
data[i] = (char)(data[i] - 2);
}
int p = 0;
int version = ToInt(data[p++]);
if (version != SerializedVersion) <<<<<< mismatch 5 vs. 3
{
But in the generated lexer
{ public static readonly string _serializedATN =
"\x5\x4\xB5\x638\b\x1\x4\x2\t\x2\x4\x3\t\x3\x4\x4\t\x4\x4\x5\t\x5\x4\x6"+ }
Any comment is appreciated Thanks