I decided to write a compiler as a learning experiment. I first started by following some random tutorials here and there and built something that I called by naive implementation. (Since there's a lot of guessing that went into it).
I then decided to buy a book that treated the subject (https://www.amazon.ca/dp/0470177071). The book provides a very "step by step" way of building such software.
In order to learn from it, and to not do a direct rewrite of what is written in it (because it pretty much gives you an implementation), I decided to read the intro parts, and then try to build something from there, and if I was stuck / couldn't go forward I would read the suggested code and then implement it. Throughout the code, I comment on why some parts interact with other parts, I reference my "naive implementation" and compare the two solutions.
It happens that the compiler showed in the book and the compiler I wanted to build treated the same language. (I didn't know this at the moment of purchase). Which makes it a little harder to make it very different.
Beside the general framework (packages layout, interfaces), my code is pretty much different that the one provided in the book, but many ressemblances can be found, and obviously some parts are almost identical.
My question
I was thinking of open sourcing the result of the code I have written, and explaining that it is sort of my journey through the book. I wanted to licence it as MIT, but since it is derived work from the book, is it OK to do so?