XML parser using PLY, the Python Lex-Yacc library