While using the python library rply, I get an unexpected token error when parsing more than one line. How can I fix this?
问题 For the practice, I decided to work on a simple language. When only a single line, my say(); command works fine, but when I do two says in a row, I get an error. For Parsing I'm using rply. I was following this (https://blog.usejournal.com/writing-your-own-programming-language-and-compiler-with-python-a468970ae6df) guide. I've searched extesively but I cant find a solution. This is the python code: from rply import ParserGenerator from ast import Int, Sum, Sub, Say, String class Parser(): def