[Java] Math Parser

Hi all,
This is my first try in Parser. Hope this can help you guys !
The parser_main will take the input expression and parse this one, and finally, return the value of the expression.
This is the first time I tried to code a parser. If there are bugs, please comment. I always appreciate that. ^^
I have edited this post. As I received some personal comments, I temporarily hide this code. If you have any difficulties in implementing a java parser for mathematics expression, please email me, I will help you!

5 nhận xét:

  1. Nặc danh06:32

    can you explain more about this code ? I'm newbie in java

    Trả lờiXóa
  2. this code is used for parsing mathematical expressions and return the value.
    The input is a CharSequence type. The parser_main gets that input and do parsing. If there is any error in parsing, this code will throw an exception. That means we call ParseError() and print out the error. For more details, contact me via email.

    Trả lờiXóa
  3. Nặc danh23:16

    ur code has bug in factorial function. anw, i like this code. thank you !

    Trả lờiXóa
  4. It's hard to see your code in blogspot without any "TAB". Does it allow to embed code in entry? Just some comments! :)

    Trả lờiXóa
  5. @Unknown: Oh thnks a lot. I'll fix this bug later.
    @tnbk: Blogspot allows to display embbed code using HTML template. But I still don't want to use it. Maybe you will find difficulty reading code on blog entries... Well that's my point too. I want people who read my codes have some difficulties :)) Have fun !

    Trả lờiXóa