Propagate predicates into grammar APIs. Refactor precedence and rule handling in GrammarBuilder.