Reworked AST using the model CUP/LEX files from moodle