Loading ...
Sorry, an error occurred while loading the content.

RE: [antlr-interest] Re: C sharp parser

Expand Messages
  • Smith, Eric V.
    Okay, here s what I ve got so far. I have the runtime (in lib/csharp) mostly done. As I said, I was using 2.7.1a4, I didn t track what changed between it and
    Message 1 of 10 , Mar 1, 2001
    • 0 Attachment
      Okay, here's what I've got so far. I have the runtime (in lib/csharp)
      mostly done. As I said, I was using 2.7.1a4, I didn't track what changed
      between it and the release version. I have the code generator done (in
      CSharpCodeGenerator.java and CSharpBlockFinishingInfo.class). I have done
      the actions, but there're not in the zip file yet, since I haven't had time
      to go back through and double check them, but I recall that the default java
      actions mostly work.

      I'm sure there are bugs in the code generator, which I uncover as I build
      more examples. Also I'm sure there are bugs in the runtime.

      I originally did this in VS.net, but I've ripped that out and just put a
      makefile in the lib/csharp directory.

      I had also been signing it with a key of mine so I could give the library a
      strong name and put it in the global assembly cache. I'm not sure we want
      to do that, since we'd need some centrally managed key in order for everyone
      to share it. OTOH, if we don't do that we'll end up with zillions of copies
      of the runtime (which I'm calling antlr-msnet.dll). I'm open to discussion
      on this. Maybe I'll just generate a special key that everyone could use,
      but that seems to defeat the purpose. For this "release", I removed the key
      and strong name. That means that for the examples to work, you need to copy
      antlr-msnet.dll into the directory where each example is built. I've only
      done that for the calc example, but it's easy enough to do yourself. Once
      we decide on if the runtime should be signed, or how else we should handle
      it, I'll fix all the examples.

      All of the examples I've included here work (or worked at one time), but as
      I said I've only gone back and fixed the calc example to copy the runtime.

      The files are available at
      http://www.windsor.com/erics/antlr-csharp-2.7.1.zip. It should contain only
      the files I've added, but if anything's missing let me know.

      I'm interested in any feedback, especially bug fixes and what we should do
      about the runtime. For the time being, I'll collect and integrate fixes,
      and I'll work on the actions. When it's stable enough I'll send it to Ter
      who can include it in the distribution if he sees fit.

      Eric.


      > -----Original Message-----
      > From: S.Zschocke@... [mailto:S.Zschocke@...]
      > Sent: Tuesday, February 27, 2001 11:42 AM
      > To: antlr-interest@yahoogroups.com
      > Subject: [antlr-interest] Re: C sharp parser
      >
      >
      > Hi,
      > we are looking for antlr support to generate c#-parsers, analog to
      > existing support for c++ and sather.
      > By porting we start from the java case, which is different to the C++
      > and Sather case in that the generated parser partly uses the same
      > classes as the parser-generator. Thus actually we port parts of antlr
      > to c#, too.
      > Stefan
      >
      > --- In antlr-interest@y..., "John D. Mitchell" <johnm-antlr@n...>
      > wrote:
      > > >>>>> "S" == S Zschocke <S.Zschocke@i...> writes:
      > > > We certainly are interested. We don't want to wait for .net beta2
      > but
      > > > need to get it going immediately. I have an apprentice who can
      > do the
      > > > porting of the runtime from java to c#, which is mostly pretty
      > straight
      > > > forward (once the set of java- files needed for the runtime is
      > > > identified). I have already started with the CodeGenerator
      > myself and it
      > > > already does some c#-pidgin'. I would appreciate if you could
      > throw in
      > > > your efforts at this state, especially the
      > CSharpCodeGenerator.java (or
      > > > what do you name it?). Concerning .java->.cs it would suffice if
      > you'd
      > > > just zip them and send them to us. We will make our work
      > available to
      > > > the public. Terence is interested to incorparate the C# stuff
      > into the
      > > > distribution. What do you think?
      > >
      > > I'm confused by your questions since you seem to be talking about
      > multiple,
      > > different things that are only sort of related. Please clarify
      > exactly
      > > what you're looking for:
      > >
      > > * A C# parser
      > >
      > > * A Java to C# source to source translator
      > >
      > > * A Java to C# .class to .source translator
      > >
      > > * Antlr support for generating C# parsers
      > >
      > > * A C# implementation of Antlr (:-)
      > >
      > > Or what?
      > >
      > > Thanks,
      > > John
      > >
      > > --
      > > jGuru.com -- Unleash the Guru Within!
      > > JavaWorld.com -- Share your Tips and Tricks!
      >
      >
      >
      >
      > Your use of Yahoo! Groups is subject to
      http://docs.yahoo.com/info/terms/
    • S.Zschocke@infozoom.de
      I am currently using Eric s CSharp port and am quite content with it. Thanks!!! I have a request for enhancement: Support for namespaces, as C++ does. I have
      Message 2 of 10 , Mar 9, 2001
      • 0 Attachment
        I am currently using Eric's CSharp port and am quite content with it.
        Thanks!!!
        I have a request for enhancement:
        Support for namespaces, as C++ does.
        I have made the necessary changes in the classes CSharpCodeGenerator,
        DefineGrammarSymbols, NameSpaces and Tool. Can my changes be
        incorporated (Terence?, Eric?). I can send you the sources. I have
        marked my changes so they can be found easily.
        Thanks, Stefan
      • Smith, Eric V.
        Send me the changes and I ll incorporate them. I also still need to do work with the action lexer. Eric.
        Message 3 of 10 , Mar 9, 2001
        • 0 Attachment
          Send me the changes and I'll incorporate them. I also still need to do work
          with the action lexer.

          Eric.

          > -----Original Message-----
          > From: S.Zschocke@... [mailto:S.Zschocke@...]
          > Sent: Friday, March 09, 2001 9:21 AM
          > To: antlr-interest@yahoogroups.com
          > Subject: [antlr-interest] Re: C sharp parser
          >
          >
          > I am currently using Eric's CSharp port and am quite content with it.
          > Thanks!!!
          > I have a request for enhancement:
          > Support for namespaces, as C++ does.
          > I have made the necessary changes in the classes CSharpCodeGenerator,
          > DefineGrammarSymbols, NameSpaces and Tool. Can my changes be
          > incorporated (Terence?, Eric?). I can send you the sources. I have
          > marked my changes so they can be found easily.
          > Thanks, Stefan
          >
          >
          >
          >
          > Your use of Yahoo! Groups is subject to
          > http://docs.yahoo.com/info/terms/
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.