added parser.py

minimal functionality; only (starts to) build majorpaths
majorpath works!