platform-based build of grammar