I didn't mean to criticize. You have helped me a ton, and given me the courage to try it in the first place! Thank you for your answer and all the recordings.
Regarding parsing C variable declarations / typedefs, I do use a symbol table and would not want to do it in any other way. The code becomes extremely simple, I just store the typename and continue by parsing an expression statement. I then walk the resulting parse tree and make it into a type, and finally extract the identifier used in the expression and make it into a variable declaration of that type.
There is no additional parsing code for declarations - just trivial type-builder code.
https://github.com/jstimpfle/lear...2c5306b771437d5239e3b9/stmt.c#L64
That is - unless function prototypes join the game. In K&R C, they had expression syntax, but since C89 the types go into the function parameter list. I don't know yet how to hack the parser to recognize these parameter types without writing extra code... :-(
EDIT: I realize your comment was about type casts. Seems like I will need another hack for those... It might be enough to insert an artifical missing-name expression when a ')' is seen where an expression is expected.