Parse a polynomial

Sep 17, 2009 at 12:41 PM
Can this parse a polynomial (f(x) = 5x^3 + 2x^2 + 6x + 4 for example) - if not, are there plans to add that capability.
 
If we could parse polynomials, then we could combine this library with DaynamicDataDisplay to create a very nice polynomial plotter.
 
David Roh
McKinney, Texas
Coordinator
Sep 18, 2009 at 4:28 PM

Hi David,

Yes, it can parse such strings. Actually this small library was written with plans to add integration with DynamicDataDisplay in future)

Best regards,

Mikhail Brinchuk,

Nov 17, 2010 at 11:08 PM

I'm interesting in integrating my parser into your project. Happy coding

[url:http://expressionscompiler.codeplex.com/documentation]

Coordinator
Nov 18, 2010 at 1:03 AM

What do you mean speaking about integration? What part of Simple Math Parser are you going to incorporate into your project?

 

Mikhail.

Nov 20, 2010 at 1:20 AM
Edited Nov 20, 2010 at 1:22 AM

Hi, Mikhail!

I was very interested in your implementation of simple math parser.

I'm in no luck for the creation lexer phase of my parser, especially prefiltering, just because my parser created AST tree on-the-fly, just from ground-up source string, completely bypassing lexer/tokenization phase.

Actual work is made using grammar definitions for my parser. So now i'm thinking that lexer can be implemented as a paser on string input producing token stream. If i succeed in modifying parser making it available to process

streams of any type (not just streams of chars, that wil lead to creation of parser chains, which can be used to produce 3-d phase - intermediate source code generation or direct AST tree processing to IL-instructions

(just think of streams of AST tree as input and machine code as output for final phase parser)

And, by the way, i liked your code very much. It is just have some advantages my code does not.

Happy coding!