Examples from the Antlr4 reference book by Terence Parr, written in Python 3 instead of Java.