Generate classes based on the mozilla parser api

- now can filter based on types
Any reason not to move this to parser.py, where it's used?