|expressions -- functions within function firstname.lastname@example.org (Mr.E) (2007-03-08)|
|Re: expressions -- functions within function email@example.com (Arthur J. O'Dwyer) (2007-03-08)|
|Re: expressions -- functions within function firstname.lastname@example.org (Dmitry A. Kazakov) (2007-03-10)|
|Date:||8 Mar 2007 09:40:37 -0500|
|Posted-Date:||08 Mar 2007 09:40:37 EST|
How would you insert a generic function into the precedence parser?
Actually more specifically, is it possible to insert a representation
of a generic function that has parameters that allows functions with
formal parameters as arguments?
As I thought about the use of an operator precedence parser I
concluded that if I were to encounter an expression that contained a
parameterized function, there would not be a way for me to deal with a
new expression until the original was complete unless I instantiated
another stack to represent the new expression. Example:
a = FN thisFunction( b ,FN thatFunction( c + 1, FN
When I start to deal with FN thatFunction which has parameters and
expressions of its own, I would need to start a brand new stack. That
doesn't seem like a good idea. If this were a recursive descent
evaluation just recursively calling the procedure expr0 (the
expression entry point) would be the thing to do. I'm at a loss as to
how I would deal with parameterized functions that have parameterized
functions as expressions.
Would someone mind presenting some ideas that would assist me in
dealing with this problem?
Return to the
Search the comp.compilers archives again.