frontend: wip on flattening parser
frontend: selecting most specific option
frontend: first working version of parser