I implemented a subset of Scheme, one that might just get you past the first chapter of SICP, in C. I wanted to implement a Scheme interpreter in C after doing SICP to attain a sense of closure and to be sure that I really got the bare essentials of programming languages and program evaluation. So here it is for anyone wanting to try it out. Do read the README on GitHub[1] for what I have made and to understand its limitations.<p>It wasn't easy for me as a non CS person (I am a Chemical Engineer). I started out reading theory heavy books like Torczon and Cooper but feeling intimidated by the math involved in finite automaton style scanner generators, I switched to Bob Nystrom's Crafting Interpreters [2] and his book made the scanning part smooth and intuitive.
Next I tried to study parsing from his book but didn't find parsing to be as enjoyable. I then went to the dragon book , which I had found to be very dense the first time I flipped through it an year ago. This time I found it to be much more approachable, thanks again to what I had read in Nystrom's book. Precedence and associativity made more sense when I read it a second time. But it turns out that Scheme's grammar is really simple: Expr -> atom | '(' Expr ')', so I stopped reading and started coding.<p>It's barely usable because it has no GC, and I may have to rewrite it from scratch for implementing one. In the meantime I am thinking of doing a rewrite in Java, and then do part 3 from Crafting Interpreters, where the author implements everything in C.<p>Still very much a newbie, I welcome criticisms and directions for moving it forward.<p>[1] <a href="https://github.com/TectonicFury/CSCMIC" rel="nofollow">https://github.com/TectonicFury/CSCMIC</a><p>[2] <a href="https://craftinginterpreters.com" rel="nofollow">https://craftinginterpreters.com</a>