Only extract fragments for double dop derivations

Refactoring changes:
- Move Parser object to parser.py
- Reduce grammar.py and runexp.py to < 1000 lines.