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

Re: [Sablecc-user] Re: CSharp backend



This time to be on topic/subject here's a set of stylesheets
to generate a C# parser from sablecc-s xml output.

http://www.mare.ee/indrek/sablecc/csharp4sablecc-0.1.tar.gz

I tested it using Mono on Linux and it seemed to work.
I don't have much experience with C# but tryed to make
it in its spirit. Mostly it looks/works just like the java
version.

You'll need xalan.jar, bsf.jar and js.jar to run it. Either
get those separately or from the java4sablecc file.

Regards,
Indrek


On Sunday 26 October 2003 15:57, Indrek Mandre wrote:
> I've updated the xml generator as it was missing token state
> transitions. Also I changed the naming of tags to be
> more consistent. Still I was guessing here and there
> (the data tables namings).
>
> http://www.mare.ee/indrek/sablecc/xml4sablecc-0.1b.tar.gz
>
> As a second thing I explored more into XML processing. Read
> couple of books on it etc :) I finally started writing an XSLT
> script to test it out. As I went along it I discovered that it's
> really simple and wrote a whole set of transformations to
> create an entire java based parser. The produced parser
> should be exactly the same as SableCC natively generates
> except for the .dat files where I had to innovate a bit.
>
> It uses Apache xalan and its extensions together with Mozilla
> ECMAscript. To run it you need xalan.jar and bsf.jar from xalan
> archive and js.jar from Mozilla project. I've also bundled them
> with the archive (3MB).
>
> http://www.mare.ee/indrek/sablecc/java4sablecc-0.1.tar.gz
>
> I think XML/XSLT is the best solution for extending sablecc
> as it's all Java (platform independent, user doesn't have to
> install anything) and very standardised. Also it can be
> extended using either JavaScript or even Java if needed.
>
> The slight downside is that XSL is tuned more towards
> producing xml out of xml and the syntax could be a bit
> shorter/cleaner.
>
> There are 10-s of templating/code generation tools out there
> that could alternatively be used.
>
> Regards,
> Indrek
>
> On Saturday 25 October 2003 02:00, Indrek Mandre wrote:
> > Here's all the code for the public eyes now:
> >
> > the patch for sablecc3:
> > http://www.mare.ee/indrek/sablecc/altgen.tar.gz
> >
> > the xml generator:
> > http://www.mare.ee/indrek/sablecc/xml4sablecc-0.1a.tar.gz
> >
> > the c++ generator:
> > http://www.mare.ee/indrek/sablecc/cxx4sablecc-0.1a.tar.gz
> >
> > Regards,
> > Indrek
> >
> > On Friday 24 October 2003 16:20, Etienne Gagnon wrote:
> > > Roger Keays wrote:
> > > > Just picked up on this thread....
> > > >
> > > > We can still add Indrek's patches to the downloads page on the
> > > > website right? I suppose this would depend on the license?
> > >
> > > He agreed in his message to license his code under SableCC's license,
> > > so I see no problem with that.  In fact, I think it would be a good
> > > idea to eventually add this code in the Subversion repository.
> > >
> > > I will suggest to my student to look whether using Indrek's
> > > modifications as a basis for coupling his scripting engine to SableCC
> > > would be appropriate.
> > >
> > > Maybe we will be able to prove Indrek wrong by showing that a little
> > > script language would make code generation much simpler to read and
> > > more maintainable than coding it in Java... :-)
> > >
> > > Etienne
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: The SF.net Donation Program.
> > Do you like what SourceForge.net is doing for the Open
> > Source Community?  Make a contribution, and help us add new
> > features and functionality. Click here: http://sourceforge.net/donate/
> > _______________________________________________
> > Sablecc-user mailing list
> > Sablecc-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/sablecc-user
>
> -------------------------------------------------------
> This SF.net email is sponsored by: The SF.net Donation Program.
> Do you like what SourceForge.net is doing for the Open
> Source Community?  Make a contribution, and help us add new
> features and functionality. Click here: http://sourceforge.net/donate/
> _______________________________________________
> Sablecc-user mailing list
> Sablecc-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sablecc-user