Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Parser for C++

Parser for C++

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
16 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 1426359
    wrote on last edited by
    #1

    I need a parser for C++ that can be integrated in Visual C. I've tried to make one using yacc and bison but it didn't work(didn't manage to do the file). Can anyone help me? Do you know where I can find it? Do you have it? Thank you.

    T B U 3 Replies Last reply
    0
    • U User 1426359

      I need a parser for C++ that can be integrated in Visual C. I've tried to make one using yacc and bison but it didn't work(didn't manage to do the file). Can anyone help me? Do you know where I can find it? Do you have it? Thank you.

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      why not writing yours ??? maybe you don't know where to start ... hope this[^] will help... cheers,


      TOXCCT >>> GEII power
      [toxcct][VisualCalc]

      1 Reply Last reply
      0
      • U User 1426359

        I need a parser for C++ that can be integrated in Visual C. I've tried to make one using yacc and bison but it didn't work(didn't manage to do the file). Can anyone help me? Do you know where I can find it? Do you have it? Thank you.

        B Offline
        B Offline
        Bob Stanneveld
        wrote on last edited by
        #3

        As far as I know, Visual C == Visual C++ and already has a C++ parser. Or are you using some very old IDE? Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

        T 1 Reply Last reply
        0
        • U User 1426359

          I need a parser for C++ that can be integrated in Visual C. I've tried to make one using yacc and bison but it didn't work(didn't manage to do the file). Can anyone help me? Do you know where I can find it? Do you have it? Thank you.

          U Offline
          U Offline
          User 1426359
          wrote on last edited by
          #4

          The parser is only a part of the entire project and I don't have enough time left to make one. I just need one that will know which statement is an if/for/while/switch/goto/label, to detect the functions, functions calls, return etc. I just need to know the structure of the program not to make the calculations and the operations. Or to make me the AST. Thanks.

          1 Reply Last reply
          0
          • B Bob Stanneveld

            As far as I know, Visual C == Visual C++ and already has a C++ parser. Or are you using some very old IDE? Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

            T Offline
            T Offline
            toxcct
            wrote on last edited by
            #5

            Bob Stanneveld wrote: As far as I know, Visual C == Visual C++ not exacly... if you change your source files extension from CPP into C, the compiler will be restricted to a C compiler (not C++)... (hum, it was like this on VS6 ; i'm not sure for later versions...)


            TOXCCT >>> GEII power
            [toxcct][VisualCalc]

            B 1 Reply Last reply
            0
            • T toxcct

              Bob Stanneveld wrote: As far as I know, Visual C == Visual C++ not exacly... if you change your source files extension from CPP into C, the compiler will be restricted to a C compiler (not C++)... (hum, it was like this on VS6 ; i'm not sure for later versions...)


              TOXCCT >>> GEII power
              [toxcct][VisualCalc]

              B Offline
              B Offline
              Bob Stanneveld
              wrote on last edited by
              #6

              toxcct wrote: not exacly... if you change your source files extension from CPP into C, the compiler will be restricted to a C compiler (not C++)... True, but that still doesn't mean that you can call the whole IDE visual C instead of Visual C++... Anyway, in his own reply to his original post he says that he needs an analyser that gives him the structure of the program... I don't know if such a tool exists... Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

              U 1 Reply Last reply
              0
              • B Bob Stanneveld

                toxcct wrote: not exacly... if you change your source files extension from CPP into C, the compiler will be restricted to a C compiler (not C++)... True, but that still doesn't mean that you can call the whole IDE visual C instead of Visual C++... Anyway, in his own reply to his original post he says that he needs an analyser that gives him the structure of the program... I don't know if such a tool exists... Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

                U Offline
                U Offline
                User 1426359
                wrote on last edited by
                #7

                Bob Stanneveld wrote: Anyway, in his own reply to his original post he says that he needs an analyser that gives him the structure of the program No,no, I need a parser. I think a parser knows which statement is an conditional one or not. Bob Stanneveld wrote: I don't know if such a tool exists. It will as soon as I finish this project. :)

                T B 2 Replies Last reply
                0
                • U User 1426359

                  Bob Stanneveld wrote: Anyway, in his own reply to his original post he says that he needs an analyser that gives him the structure of the program No,no, I need a parser. I think a parser knows which statement is an conditional one or not. Bob Stanneveld wrote: I don't know if such a tool exists. It will as soon as I finish this project. :)

                  T Offline
                  T Offline
                  toxcct
                  wrote on last edited by
                  #8

                  marius-adrian wrote: No,no, I need a parser. i am currently working on such a project (C++ parser), but as it is a personal goal, i don't work very fast on it. however, the principle is simple, and based on the work exposed in my article VisualCalc. cheers,


                  TOXCCT >>> GEII power
                  [toxcct][VisualCalc]

                  T 1 Reply Last reply
                  0
                  • T toxcct

                    marius-adrian wrote: No,no, I need a parser. i am currently working on such a project (C++ parser), but as it is a personal goal, i don't work very fast on it. however, the principle is simple, and based on the work exposed in my article VisualCalc. cheers,


                    TOXCCT >>> GEII power
                    [toxcct][VisualCalc]

                    T Offline
                    T Offline
                    ThatsAlok
                    wrote on last edited by
                    #9

                    toxcct wrote: VisualCalc. I love that Calculator :)

                    "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                    cheers, Alok Gupta

                    T 1 Reply Last reply
                    0
                    • U User 1426359

                      Bob Stanneveld wrote: Anyway, in his own reply to his original post he says that he needs an analyser that gives him the structure of the program No,no, I need a parser. I think a parser knows which statement is an conditional one or not. Bob Stanneveld wrote: I don't know if such a tool exists. It will as soon as I finish this project. :)

                      B Offline
                      B Offline
                      Bob Stanneveld
                      wrote on last edited by
                      #10

                      Damn those errors!!! X| X| Have to type it all over again... marius-adrian wrote: I just need to know the structure of the program not to make the calculations and the operations. Or to make me the AST. So you need to know the structure of a parser that can parse C++? If I'm correct, you can start by reading the following articles about regular expressions, grammers and languages: Regular expression Library Builder[^] Fast regular expressions [^] Writing own regular expression parser[^] CDfaRegEx: A DFA Implementation of a Regular Expression Compiler [^] marius-adrian wrote: Bob Stanneveld wrote: I don't know if such a tool exists. It will as soon as I finish this project. Are you going to post it here on CP? I would like too see your article! ;) Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

                      U 1 Reply Last reply
                      0
                      • B Bob Stanneveld

                        Damn those errors!!! X| X| Have to type it all over again... marius-adrian wrote: I just need to know the structure of the program not to make the calculations and the operations. Or to make me the AST. So you need to know the structure of a parser that can parse C++? If I'm correct, you can start by reading the following articles about regular expressions, grammers and languages: Regular expression Library Builder[^] Fast regular expressions [^] Writing own regular expression parser[^] CDfaRegEx: A DFA Implementation of a Regular Expression Compiler [^] marius-adrian wrote: Bob Stanneveld wrote: I don't know if such a tool exists. It will as soon as I finish this project. Are you going to post it here on CP? I would like too see your article! ;) Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

                        U Offline
                        U Offline
                        User 1426359
                        wrote on last edited by
                        #11

                        Bob Stanneveld wrote: Are you going to post it here on CP? I would like too see your article! I don't know. I'm doing this for my engineer diploma and the project was given to me by a company so I guess it's theirs once I finish it. But if I'll decide not to work for them, I'll post it. :) I just figured out that I need only to extract the classes' names to know that them are user defined data, the #define and #typedef, and the functions' names. After that I can work on every function individualy. As a matter of fact the project is supposed to take two functions, construct the decision tabels for them and see if they are logigally identical.

                        L 1 Reply Last reply
                        0
                        • U User 1426359

                          Bob Stanneveld wrote: Are you going to post it here on CP? I would like too see your article! I don't know. I'm doing this for my engineer diploma and the project was given to me by a company so I guess it's theirs once I finish it. But if I'll decide not to work for them, I'll post it. :) I just figured out that I need only to extract the classes' names to know that them are user defined data, the #define and #typedef, and the functions' names. After that I can work on every function individualy. As a matter of fact the project is supposed to take two functions, construct the decision tabels for them and see if they are logigally identical.

                          L Offline
                          L Offline
                          Lost User
                          wrote on last edited by
                          #12

                          marius-adrian wrote: I guess it's theirs Don't guess, find out. Are they paying you anything ? The tigress is here :-D

                          U 1 Reply Last reply
                          0
                          • T ThatsAlok

                            toxcct wrote: VisualCalc. I love that Calculator :)

                            "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                            cheers, Alok Gupta

                            T Offline
                            T Offline
                            toxcct
                            wrote on last edited by
                            #13

                            ThatsAlok wrote: VisualCalc. I love that Calculator really ?! wowwwwwww, you congrats me so much... the first guy that tell me my calculator's more than useful, but great !!! you got my 5 !!! :rose::-O


                            TOXCCT >>> GEII power
                            [toxcct][VisualCalc]

                            T 1 Reply Last reply
                            0
                            • L Lost User

                              marius-adrian wrote: I guess it's theirs Don't guess, find out. Are they paying you anything ? The tigress is here :-D

                              U Offline
                              U Offline
                              User 1426359
                              wrote on last edited by
                              #14

                              Trollslayer wrote: Are they paying you anything ? Nope. They have somekind of agreement with our teachers and because of that the students were given some projects from that company.

                              L 1 Reply Last reply
                              0
                              • U User 1426359

                                Trollslayer wrote: Are they paying you anything ? Nope. They have somekind of agreement with our teachers and because of that the students were given some projects from that company.

                                L Offline
                                L Offline
                                Lost User
                                wrote on last edited by
                                #15

                                So the company gets the benefit, the teachers get something and you do the work ? Make sure you have copyright ! The tigress is here :-D

                                1 Reply Last reply
                                0
                                • T toxcct

                                  ThatsAlok wrote: VisualCalc. I love that Calculator really ?! wowwwwwww, you congrats me so much... the first guy that tell me my calculator's more than useful, but great !!! you got my 5 !!! :rose::-O


                                  TOXCCT >>> GEII power
                                  [toxcct][VisualCalc]

                                  T Offline
                                  T Offline
                                  ThatsAlok
                                  wrote on last edited by
                                  #16

                                  toxcct wrote: really ?! Yeap,I gather some programing logic from there :)

                                  "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                                  cheers, Alok Gupta

                                  1 Reply Last reply
                                  0
                                  Reply
                                  • Reply as topic
                                  Log in to reply
                                  • Oldest to Newest
                                  • Newest to Oldest
                                  • Most Votes


                                  • Login

                                  • Don't have an account? Register

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • World
                                  • Users
                                  • Groups