Menu

First check in of files

Developers
2002-02-18
2002-02-19
  • Dakshinamurthy Karra

    I am planning to check in the first set of files into Parser directory. Currently the lexer is ready and I am successfully able to get all the tokens of STDC. Credit goes to the GNU-C grammer from ANTLR website ofcourse ;-)

    All the code has been tested on a Linux box and obviously we need some sort of porting onto the Windows platform. I hope one of you can take care of it.

     
    • Dakshinamurthy Karra

      Few points to note:

      1. I am using ANTLR 2.7.1 (the last stable release). Looks like a bug in it that generates an if condition as follows in the generated code.

      if true ==> missing brackets.
      This should have been
      if (true)

      I fixed ANTLR on my local copy, however you might want to fix the generated code manually.

      2. CPPUnit
      I checked in the CPPUnit library that I was using. Ignore this library. The RunTests.cpp file has the code for running the TestCases. However they are registered during the creation time. The creation is added along with the testcase in the ParserTest/CPPLexerTest.cpp file. Please make it work on Windows and I will do the appropriate modifications for Linux.

      3. Currently only STDC is being tokenized. Over the next few days I will work on adding support for C++ keywords and from then onwards to the parser.

      Please comment on the coding style etc. I changed my filenaming conventions to suit what existed in the directory structure. In case of problems please tell me. We need a coding standards if we want to follow XP as closely as possible ;-)

       
      • John Edward Judd

        Hi KD,

        Firstly I've posted a message regarding coding conventions, just something for discussion at this stage. When we've all agreed on a stadard, it would probably be good to formalise it into a document.

        It may be a little premature to check in any parser files at this stage. Both David and myself are experimenting with parsing. David is checking out the OpenC++ parser, and I'm handcrafting a simple one. I've already had a look at the ANTLR parser and [in the spirit of XP ;-) ] I've got the feeling that its not the simplest thing, and I wonder if its really a bit of YAGNI.

        I reckon that at this stage since there are only the three of us, we can just email our experimental projects to each other if we take care to only send the source and project files, not the intermediate ones [and if there are no objections.]

        Have a good one.

        regards

        John

         
        • Dakshinamurthy Karra

          I already committed some code into CVS. I am sorry, should have waited for a response. But I am all excited ;-) and could not get sleep till I complete this task.

          Anyhow, for all of us to understand how each one is going about the work we need to see some code - either through mail or through the CVS. I prefer CVS since all our thoughts and spikes will have a permanent place.

          Another reason for me checking-in is to ensure that we can have the infrastructure to compile and link the code in both Linux and Windows. Eventhough it is possible for me to get a Windows box, I am not very sure how effective I will be with it.

          How is your handcrafted parser coming along? The problem with handcrafting a parser is that it might be tougher to modify the grammer once too many rules are framed. There are some opensource class libraries for creating parsers by hand. I should be having a link somewhere - I will send it if I find it.

           
          • John Edward Judd

            No worries :-) I know exactly how you feel. Why do you think there's already a project structure checked in? ;-)

            The parser is coming along quite nicely. Tonight I should have a lexer up an working. I'm doing it all Test First [or second] Design, and YAGNI. So I only write code for what I need at the time. Its working like a charm. The code is simpler and more robust. It's great!

             
        • David Barker

          David Barker - 2002-02-19

          I think we should use CVS too.
          So far I've failed to make it work as a developer, though I can update / checkout as a noddy anonymouse bloke.

          As for cross platform support - isn't that what the compile farm is for?

           
          • Dakshinamurthy Karra

            Check out the SF documents. I found that we need to ssh into the server first to create the directory structure. From then cvs works as a developer also.

             
          • John Edward Judd

            Ok, then I'll create a spikes directory under the CppRefactory root for us to check our experimental projects in to. [when we're ready to of course :-) ]

            I had a few problems at the beginning as well. It took a couple of questions and a lot of poring over the docs to figure it out. Still couldnt get WinCVS working though which is a bummer since I prefer GUIs to command lines. I havent used it for a while. I wonder if WinCVS is usable now?

             

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.