11486Re: ANTLR and .NET
- Apr 1, 2004--- In firstname.lastname@example.org, Mohad Nur <mr_nur2000@y...> wrote:
>1. Do you mean you want to build the ANTLR tool using J#?
> A newbie in both...........sorry. I want to use antlr with J# from .net.
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
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 builtthat. 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 -
- << Previous post in topic Next post in topic >>