On 17 May 2008, at 17:08, Geten wrote:
I am little more than a beginner in writing bison specifications
and now I
have stumbled on some problems. What I want to do is to write
grammar to
recognize a function definition
...
A code example:
function helloWorld(int p1, int p2) : bool
int a = p1;
int b = p2;
...
What would a grammar that handled that look like?
It seems you want to settle for a C/C++ like grammar, so you might
look into the standards of these. There is a Yaccable (so it is
Bisonable) one for C++ here:
http://www.parashift.com/c++-faq-lite/compiler-
dependencies.html#faq-38.11
Also, you might try the Usenet newsgroup comp.compilers.
Hans Aberg
_______________________________________________
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison