[antlr-interest] C# TARGET ANNOUNCEMENTS

Micheal J open.zone at virgin.net
Wed Apr 9 17:56:29 PDT 2008


Johannes, 

> Hi!
> 
> It's time to give you all an update how the C# target will evolve to.
> 
> The general direction is that I will phase out support for C# 
> 1.0 for ANTLR 3.3, if nothing major comes up (meaning that a 
> user can't update to .NET 2). I want to split the runtime 
> library into two, so I can use generics and other stuff.
>
> Because of these major changes, I want to have at least one 
> minor ANTLR version as a testbed. As I didn't find the time 
> to do those changes for 3.1, the testbed will be 3.2. The 
> reason for this early announcement is that a bugfix requires 
> the use of a C# 2.0 feature.

Is this fix and the C# 2.0 dependency indicated in the depot logs?

[UPDATE: can't see any notes to that effect in the logs. What change no.
should I look at?]

> If you want to use a non-intrinsic value type then you have 
> to use the new target CSharp2 or to change the template 
> yourself (for all installations). While the runtime library 
> will work for both targets, if you want to (and can) 
> futureproof your application then change the target as soon 
> as possible.

One can use any value type with the 'CSharp' target already AFAICT. Does the
new 'CSharp2' target remove the need to update the 'csharpTypeInitMap'
default value map in the templates for unspecified value types?

> I'm also happy to release the beta 1 for the 3.1 C# target: 
> It is synced with the latest Java changes and compiles all 
> example grammars successfully. While the changes have been 
> checked in, there may no intermediate build available yet 
> which includes the changes. This depends on Ter.
> 
> Changes include:
> 
> - Following Java target evolution.
> 
> - Changed lowercase signatures into uppercase so the runtime 
> conforms more to C# conventions. For example, $a.tree in 
> grammar, but a.Tree in code. $-syntax is not affected 
> although the exceptions compared to Java target will be 
> probably removed (if I find the source that is).

I don't understand what you mean here. What exceptions are these?. Exception
types?. Could you supply example(s) to illustrate perhaps?

> See for
>   further info on that issue the wiki. Changes in runtime 
> library may have broken things beyond simply renaming and 
> converting references.

Do you have a URL to the appropriate place in the wiki please?

> - Broke the IToken dependency for Token, as this didn't make 
> any sense compared to the Java target. If you derive your 
> class from Token or use Token as Type, please change that into IToken.

Interesting. What problem/issue was solved by removing Token as the abstract
base class for all the token types included with ANTLR? Had quick look at
the diffs and nothing jumped out.

> - Bug fixes.
> 
> - No binaries for .Net 1.1 created yet. It is on my todo list.

If you have .NET v1.1 and .NET v2 installed on your box (or in a VM), the
Nant script takes care of building both:
   nant release -t:net-1.1 
   nant release -t:net-2.0 


Nice to see C# up and running again. Good job.


Micheal

-----------------------
The best way to contact me is via the list/forum. My time is very limited. 



More information about the antlr-interest mailing list