Working with Parser Generators - Functions

This is a discussion on Working with Parser Generators - Functions within the C Programming forums, part of the General Programming Boards category; This maybe is somewhat off topic, but I've been exploring Bison to generate a C parser. The Bison manual has ...

Working with Parser Generators - Functions

This maybe is somewhat off topic, but I've been exploring Bison to generate a C parser. The Bison manual has an example (Multi-function Calc) which demonstrates how to describe the rules for parsing a function for the form fctname(argument). I'm wondering if there is a general way to do this for any number of arguments. For simplicity, I will restrict all argument types to double precision floating point values.

If worst came to worst, I could make similar rules for 2, 3, ... arguments up to the max number of the functions I need to work with. However, I was hoping to allow for a plug-in system where users could provide their own functions which would be read in via dlopen()/dlsym() and passed along to the symbol table used by the parser. Thus, a more general approach is more desirable.