2
votes

Over 20 years ago I created a custom compiler for PLC's with yacc/lex and C/C++ for MS-DOS platform. Now the same company wants a new version. The target platform is Windows so my preference would be to use C#. I've just spent a day looking at ANTLR with C# and haven't so far been able to create a simple parser. I'm using VS2012 and I'm not finding .Net 4.0 compatible libraries from the latest ANTLR download. I'm using the Language=CSharp3 and haven't found pre-built .NET libraries. Attempts to rebuild the libraries from the source give errors when trying to build with VS2012. I need to decide whether ANTLR and C# is a viable option in the next day or so. Has anyone used ANTLR with C# to produce a large compiler project?

One of the errors trying to build the CSharp version of the antlr3.Runtime:

Error 1 Cryptographic failure while signing assembly 'c:\ANTLR\runtime\CSharp3\Sources\Antlr3.Runtime\obj\Debug\Antlr3.Runtime.dll' -- 'Error reading key file 'c:\ANTLR\runtime\CSharp3\Sources\Antlr3.Runtime\Key.snk' -- The system cannot find the file specified. ' C:\ANTLR\runtime\CSharp3\Sources\Antlr3.Runtime\CSC Antlr3.Runtime

1

1 Answers

2
votes

I beleive you have to create your own key file.

See How to: Create a Public/Private Key Pair

Use the SN app from a Visual Studio Command Prompt

sn –k c:\ANTLR\runtime\CSharp3\Sources\Antlr3.Runtime\Key.snk