Crafting Interpreters — Representing Code
Alright, This chapter is about deriving a structure for the jlox language, we use the BNF(Backus-Naur form) to derive a structure for the language. We use the abstract syntax tree to transform our input to fit the structure we created.
I can’t say I fully understand how the BNF works, like to create my own, but little steps I guess, we keep going regardless.
Little tip, it is great to use other materials when you don’t understand the present material you are consuming, like how I approached this chapter, the material was confusing to me at first, cos all this wasn’t familiar, but I had to consult other materials and watch some youtube videos to get the basic understanding.
Well, I don’t have much to say in this chapter, we are moving to the parser in the next chapter, for anyone interested in the code this is the link https://replit.com/@ukpauchechi/jlox#bsf.c
If you have any feedback, be sure to leave and comment.