More Work

Still non-functional. Started working on the general-purpose grammar
matcher.