[antlr-interest] Re: ANTLR and .NET

micheal_jor open.zone at virgin.net
Thu Apr 1 21:34:02 PST 2004


--- In antlr-interest at yahoogroups.com, Mohad Nur <mr_nur2000 at y...> wrote:
> 
> Hi,
> 
> A newbie in both...........sorry. I want to use antlr with J# from .net.

1. Do you mean you want to build the ANTLR tool using J#?

OR

2. Do you mean that you want to use J# as the implementation language
for a project that uses ANTLR to build Lexer(s)/Parser(s)/TreeParser(s)?


For option 1, you obviously need to know something about Java and how
to use J#. 
a) Grab the ANTLR distribution, create a project in J# that includes
the files in the 'antlr' sub directory
b) OPTIONAL but, you might need to bootstrap the process by using the
Java version of ANTLR to generate java source files from the various
ANTLR grammar files (*.g) under the 'antlr' directory tree.
c) Try to build the J# project. If you get any build errors, it should
be straight-forward to fix them. Of course, there might not be any
errors...
d) You should now have a native .NET binary of ANTLR. 

For option 2, all you need to do is use ANTLR in it's default mode
whereby it generates Java. Build the generated files and any other
files you add with J#. I haven't tried this but, it might work. I
guess it's one way to target the Java and .NET platforms
simultaneously. Using IKVM (www.ikvm.net) is another one.

> I have a solution that has all the antlr files and i have built
that. What next please?

This sounds like option 1 to me. In that case, your next step might be
to read these:

1. Ashley's very nice tutorial. The main site seems to be down so try
this PDF version -
http://www.idi.ntnu.no/emner/tdt4205/offentlig/2003/exercise1/antlr%20introduction.pdf

2. http://www.antlr.org/doc/getting-started.html

Cheers,

Micheal
ANTLR/C#




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list