[antlr-interest] C# target
Sam Harwell
sam at tunnelvisionlabs.com
Sat Apr 7 16:41:47 PDT 2012
Hello,
Thank you for your interest in the C# target for ANTLR 3.
The wiki page you linked to here has a link to documentation on setting up a
Visual Studio project to use the C# target:
http://www.antlr.org/wiki/display/ANTLR3/Antlr3CSharpReleases
When generating a grammar for the CSharp2 or CSharp3 target with a release
from that wiki article, the only way I've tested is using the Antlr3.exe
binary included in the release. In particular, ANTLRWorks may or may not be
capable of generating a proper grammar for these targets.
--
Sam Harwell
Owner, Lead Developer
http://tunnelvisionlabs.com
-----Original Message-----
From: forumer at smartmobili.com [mailto:forumer at smartmobili.com]
Sent: Saturday, April 07, 2012 12:14 PM
To: antlr-interest at antlr.org
Subject: Re: [antlr-interest] C# target
I have found here
http://www.antlr.org/wiki/display/ANTLR3/Antlr3CSharpReleases
a antlr-dotnet-csharpruntime-3.4.1 that after some compilations fixes
understand the files generated with antlrworks-1.4.3.
The fixes were : rename a boolean into bool and replace skip by Skip.
So is it normal it 's not inside the distribution archive ?
And while I am at it, it would be great if you could avoid to put macos
hidden files inside your archive because it's useless for windows/linux
users.
Can I suggest you to regenerate a new archive without hidden files ?
mkdir tmp && cd tmp
wget http://www.antlr.org/download/antlr-3.4.tar.gz
tar xvf antlr-3.4.tar.gz
find . -type f -iname ".*" -exec rm -rf {} \; rm antlr-3.4.tar.gz tar zcvf
antlr-3.4.tar.gz antlr-3.4
Thanks
> Hi,
>
> I am trying to use a java parser from a c# project (targetting 4.0)
> and I have added references to the antlr runtime found inside
> antlr-3.4\runtime\CSharp2\dist\bin\net-2.0.
> By the way the DOT-NET-runtime-3.1.3.zip is not correct because when I
> try to unzip it with 7-zip or from windows I get the following message
> : WOuld you like to replace the existing file Antlr3.Utility.xml.
> If I examine the zip file I can see that the Antlr3.Utility.xml is
> duplicated :
>
>
> $ unzip -l DOT-NET-runtime-3.1.3.zip
> Archive: DOT-NET-runtime-3.1.3.zip
> Length Date Time Name
> --------- ---------- ----- ----
> 0 02-21-2009 22:51 bin/
> 0 03-11-2009 23:25 bin/net-2.0/
> 6144 03-11-2009 23:25 bin/net-2.0/Antlr3.Utility.dll
> 75617 03-11-2009 23:25 bin/net-2.0/Antlr3.Runtime.dll.mdb
> 2412 03-11-2009 23:25 bin/net-2.0/Antlr3.Utility.xml <<<<<<<
> DUPLICATE
> 198080 03-11-2009 23:25 bin/net-2.0/Antlr3.Runtime.xml
> 117760 03-11-2009 23:25 bin/net-2.0/Antlr3.Runtime.dll
> 1110 03-11-2009 23:25 bin/net-2.0/Antlr3.Utility.dll.mdb
> 114688 06-13-2008 13:17 bin/net-2.0/antlr.runtime.dll
> 155648 03-11-2009 23:25 bin/net-2.0/StringTemplate.dll
> 2525 08-11-2008 23:04 bin/net-2.0/Antlr3.Utility.XML <<<<<<<
> DUPLICATE
> 1300 03-11-2009 23:19 README.TXT
> --------- -------
> 675284 12 files
>
> As you can see file is duplicated.
>
> I am also using antlrworks-1.4.3 and generated CSharp parser/lexer but
> when I try it I get some missing GrammarRule attribute (I tried with
> CSharp2 and CSharp3 but same error).
> When I read
> http://www.antlr.org/wiki/display/ANTLR3/Antlr+3+CSharp+Target I can
> see the following instruction :
> For recognizers created with ANTLR v3.1.x, you will need ANTLRWorks
> v1.2.x.
> I find it weird to have to use an old version but ok let's try it, so
> I have generated my files again and now I get the following error :
>
> 'skip' doesn't exist in current context but if I replace skip by Skip
> it seems to find the symbol.
>
> So my question : Can I rely on c# target because it doesn't seem very
> stable...
>
> Thanks
>
>
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
>
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
More information about the antlr-interest
mailing list