Menu ▾ ▴

Before Solving an equation....

turbo195
2006-03-24
2013-04-18
  • turbo195

    turbo195 - 2006-03-24

    hello everyone
    before solving an equation, we must make sure that the user entered the equation right, say the user entered an equation without the equal sign!!, or even with more than one equal sign, u see what i mean. So we need to build some kind of a simple parser that will make sure everything is right before solving the equation. But to our luck, Leandro Zanotto found a framework called ANTLR that can help us accomplish the parsing part easily, goto www.antlr.org, and send ur feedback, and tell me whether u think we should use it or not. I think  we should use it.

     
    • Jeremiah

      Jeremiah - 2006-03-25

      It is certainly a job a lexer would be good at. I was thinking a bit simpler as the exercise of writing our own lexical parsing "by hand" could be an interesting exercise in itself.

      I'm willing to go either way. As for the choice of antlr if we go with a lexer, it certainly seems an excellent choice. Leandro, do you have much experience writing grammars for it?

       

Log in to post a comment.