print statement error and an error in logic for parsing StatementLists