The parser has a somewhat unusual structure:<p><a href="https://github.com/ShivamSarodia/ShivyC/blob/master/shivyc/parser/statement.py" rel="nofollow">https://github.com/ShivamSarodia/ShivyC/blob/master/shivyc/p...</a><p>It's been a while since I've had to use the phrase "exception-oriented programming", but it fits that code well. While that might be a useful or even necessary pattern to parse something like C++ which can have almost unbounded ambiguities, AFAIK C can be parsed solely by branching on the next token in the stream except for one tiny case (typedefs).