Python generic lexer/parser, build AST