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. Mathematical Expression Builder(parser)

Mathematical Expression Builder(parser)

Scheduled Pinned Locked Moved C / C++ / MFC
c++questioncsharpvisual-studio
5 Posts 2 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.
  • A Offline
    A Offline
    Aisha Ikram
    wrote on last edited by
    #1

    I need a simple Mathematical Expression Builder(parser). Does anybody know about some free source code (C++, MFC) for that. What is the best way of making an expression parser. can i use regular expressions? what would be the best suggestion. I prefer to provide intellisence like Visual Studio or Visual Assist while typing an expression, how that can be provided? any code for that? @!$h@

    B 1 Reply Last reply
    0
    • A Aisha Ikram

      I need a simple Mathematical Expression Builder(parser). Does anybody know about some free source code (C++, MFC) for that. What is the best way of making an expression parser. can i use regular expressions? what would be the best suggestion. I prefer to provide intellisence like Visual Studio or Visual Assist while typing an expression, how that can be provided? any code for that? @!$h@

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

      Hi, You can use a regular expression parser. Read this[^] article, and you should be on your way to solve your problem. Good luck.

      A student knows little about a lot. A professor knows a lot about little. I know everything about nothing.

      A 1 Reply Last reply
      0
      • B Bob Stanneveld

        Hi, You can use a regular expression parser. Read this[^] article, and you should be on your way to solve your problem. Good luck.

        A student knows little about a lot. A professor knows a lot about little. I know everything about nothing.

        A Offline
        A Offline
        Aisha Ikram
        wrote on last edited by
        #3

        What about using Lex and Yacc thing? @!$h@

        B 1 Reply Last reply
        0
        • A Aisha Ikram

          What about using Lex and Yacc thing? @!$h@

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

          I don't know how to use those tools properly, but you could use them also. The article that I pointed you to, has it's implementation based on mathematical expressions. After reading it, you should be able to write your own expression parser based on the same theory. It doesn't matter wheter you want a mathematical expression parser or a regular expression parser, the idea of parsing is the same. Only the implementation is different.

          A student knows little about a lot. A professor knows a lot about little. I know everything about nothing.

          A 1 Reply Last reply
          0
          • B Bob Stanneveld

            I don't know how to use those tools properly, but you could use them also. The article that I pointed you to, has it's implementation based on mathematical expressions. After reading it, you should be able to write your own expression parser based on the same theory. It doesn't matter wheter you want a mathematical expression parser or a regular expression parser, the idea of parsing is the same. Only the implementation is different.

            A student knows little about a lot. A professor knows a lot about little. I know everything about nothing.

            A Offline
            A Offline
            Aisha Ikram
            wrote on last edited by
            #5

            Thanks :) @!$h@

            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