[antlr-interest] C# target

forumer at smartmobili.com forumer at smartmobili.com
Sat Apr 7 10:14:03 PDT 2012


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


More information about the antlr-interest mailing list