I'm new to the world of parsers.  I want to pass an expression to
Bison and have that expression return code which is then executed
on each member of an array.

So with an array like such:

        [x(1), x(2), x(3)...........x(n-1)]

         x(i)' = FUNCTION(x(i))

My aims is to supply a FUNCTION string to Bison, have it produce
the correct code and then apply that code to each element of my array.

Can this be done?  What strategy can I use.   A user should be able
to vary the function (enter any string - within limits - which is then
supplied to Bison for parsing);  however since once that has been done,
the expression ('FUNCTION') does not change.
I don't want to have to repeatedly visit the parser as I apply the function to
each array element.

Perhaps there are example(s) demonstrating this behavior?

thanks,

NDC






_______________________________________________
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to