|
|
|
|
|
by credit_guy
1232 days ago
|
|
After you use it a bit longer, you'll get both good answers and also some strangely bad answers given with a totally straight face. I just asked now ChatGPT to give me a reference on interpreters and compilers, and then I refined the question to specify Python. The first answer gave me the "Dragon Book". The second answer invented two books. The funny thing is that the authors of the two imaginary books are actual people. Q: do you know of any reference for interpreters and compilers that uses Python ?
A: Yes, "Python Compiler and Interpreter Fundamentals" by Arun Tigeraniya is a good reference for learning about interpreters and compilers using Python. This book provides an introduction to the basics of compilers and interpreters, and covers topics such as lexical analysis, parsing, semantic analysis, code generation, and optimization, using Python code examples.
Another resource is "Writing a Compiler in Python" by Sridhar Ratnakumar, which is an in-depth tutorial that guides you through the process of writing a simple compiler in Python, starting with a lexer, moving on to a parser, and finally producing the output code.
Both of these resources provide a good introduction to the subject and should be a helpful starting point for anyone interested in learning about compilers and interpreters using Python.
|
|