Gopinath M

Hi All,

First of all thanks you very much for spending your time to open this post. We are trying to implement a small parser which evaluates expression given by users. We have idenfied a set of operators, functions, keywords, conditional staments which are required for the language. Can you please tell us how shall we implement a parser which checks syntax of the expression and evalutes them If you have any reference to data structure concepts, please let me know.

Many thanks in advance.

Cheers,

Gopi



Re: Visual C# General Implementing a simple parser

Matthew Watson

That's a huge and complex subject, too big to go into here.

You should read up on "Recursive Descent" parsing, and google for "Recursive Descent" and "C#".

Here's a simple parser for a 4 function calculator that I found via google:

http://www.cl.cam.ac.uk/Teaching/2004/CompConstr/4calc/4calc.cs