It&#x27;s always great to see more people writing their own compilers - a &quot;proof by example&quot; that compilers do <i>not</i> have to be magical and mysterious special software that only few experts can write. The theory may be deep, but in practice getting a basic working compiler doesn&#x27;t require all that much.<p>I notice you&#x27;re using a recursive-descent parser, which I think is a good idea because it can actually reduce complexity over one made with parser-generators; in fact it&#x27;s simple enough that even beginners who have just grasped recursion should be able to understand and write one. Once you have a basic parser that can evaluate arithmetic expressions, extending that to generating AST nodes and parse a (mostly) simple language like C is not so difficult. If I remember correctly, at least one college has an expression evaluator as a first-year CS assignment related to recursion. It&#x27;s interesting that one of the sections of K&amp;R, on reading and writing C declarations, even contains a simple parser for them --- I&#x27;m not aware of any introductory books for other languages which contain small pieces of their implementation.<p>That said, you can use the &quot;precedence climbing&quot; technique[1] to collapse many of the recursive functions for most of the expression operators into one function with a succinct loop and a table, making your parser even simpler and faster. C4[2] is an example of this technique but with a series of if-else in the body of the function instead of a table, and I think is worth some careful study just for its <i>mindblowingly awesome ridiculous simplicity</i>.<p>[1] <a href="https:&#x2F;&#x2F;www.engr.mun.ca&#x2F;~theo&#x2F;Misc&#x2F;exp_parsing.htm#climbing" rel="nofollow">https:&#x2F;&#x2F;www.engr.mun.ca&#x2F;~theo&#x2F;Misc&#x2F;exp_parsing.htm#climbing</a><p>[2] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8558822" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8558822</a>