replace M module with Id.Map
replace S module with Id.Set
fix parser shift/reduce conflicts