Hello,
I was trying to parse simple Lisp/scheme-like code
E.g. (func a (b c d) )
and build a tree from it,
I could do the parsing in C without using bison
(i.e, using only
flex
to return tokens and building the tree with recursion).
But, with bison
grammar, I am not sure where to add the code to
build the list (i.e, which rule to associate with accumulating terminal
symbols and where to link a built list to parent node).
My grammar is similar to the one here: http://stackoverflow.com/questions/517113/lisp-grammar-in-yacc the grammar is correct and can recognize the code.