grammatica-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Grammatica-users] GetParent question


From: Per Cederberg
Subject: RE: [Grammatica-users] GetParent question
Date: Mon, 15 Dec 2003 15:36:39 +0100

On Mon, 2003-12-15 at 15:04, Luc Morin wrote:
> Per,
> 
> If I may add an entry to the WishList for Grammatica, it 
> would be nice to have a native C# tool.
> 
> The very best would be to be able to integrate that native
> tool into VS.NET such that classes get regenerated when 
> the grammar changes.

Ok, I'll add this (when Savannah goes up again). I don't
run Windows myself, though, so I guess I can't fix the
integration with VS.NET anyway...

> I'm starting to look into VS.NET Custom Tools to see how 
> this could be done, but I'm not too sure how/if I could 
> wrap the java tool.

Actually, porting the Grammatica tool to C# isn't that
big an issue. If you check the source code, you'll see
that the parser engine is already ported (needed for 
the C# parsers). The parts that remain are the command-
line interface, the grammar file analysis and the source 
code generation, none of which is very complex (although
a bit largish).

Porting from Java to C# is pretty straight-forward. 
There are a few gotchas (the semantics of 
String.substring(int,int) for example), but for the most
part it is just string replacement. The problematic part, 
however, is maintaining the port in sync with the main 
Java sources. That can be a pretty boring job...

An alternative path may be to try to use IKVM
(http://sourceforge.net/projects/ikvm/), which is a Java 
virtual machine for .NET. They say it works pretty well,
as it supports Eclipse, so I guess Grammatica would be a 
small thing for it. Never used it myself, so I wouldn't 
know for sure, though.

Cheers,

/Per






reply via email to

[Prev in Thread] Current Thread [Next in Thread]