Re: Expression parsing.

"Quinn Tyler Jackson" <qjackson@wave.home.com>
21 May 1999 02:22:21 -0400

          From comp.compilers

Related articles
Expression parsing. kk@inet.com.pl (Krzysiek Kobus) (1999-05-20)
Re: Expression parsing. qjackson@wave.home.com (Quinn Tyler Jackson) (1999-05-21)
Re: Expression parsing. qjackson@wave.home.com (Quinn Tyler Jackson) (1999-05-21)
Re: Expression parsing. corbier@my-dejanews.com (1999-05-21)
Re: Expression parsing. eodell@pobox.com (1999-05-21)
| List of all articles for this month |

From: "Quinn Tyler Jackson" <qjackson@wave.home.com>
Newsgroups: comp.lang.c++,comp.compilers
Date: 21 May 1999 02:22:21 -0400
Organization: Compilers Central
References: 99-05-076
Keywords: parse

As a follow up on the ARDAF classes... here's the official blurb from the
sparse documentation:


    The ARDAF engine allows variables, arrays, functions, complex domain
        math, and standard algebraic notation. Consider the following code
        fragment:


                CArdaf expr;
                expr = "a := 10";
                expr = "square_root(x) := 2}x";
                expr = "square_root(a-11)";


                cout << expr.Solve() << endl;


        The result of the above, if the ARDAF engine is compiled to allow
        complex domain expressions, will be:


                0+1i


        Unlike standard programming language expressions, ARDAF expressions
        can be in standard algebraic form:


                CArdaf expr;
                expr = "f(x) := 2x";
                expr = "3f(4)";


                cout << expr.Solve() << endl;


        The above results in an output value of 24. Note that "x2" is a
        complete variable name, whereas 2x means "2 times x".


--
Quinn Tyler Jackson


email: qjackson@wave.home.com
url: http://www.qtj.net/~quinn/
ftp: qtj.net


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.