TemplateBuilderImpl builder = new TemplateBuilderImpl(bnfFile);
PsiElement tokenId = ObjectUtils.assertNotNull(entry.getId());
PsiElement tokenValue = ObjectUtils.assertNotNull(entry.getLiteralExpression());
if (tokenName == null) {
builder.replaceElement(tokenId, "TokenName", new TextExpression(tokenId.getText()), true);
}
builder.replaceElement(tokenValue, "TokenText", new TextExpression(tokenValue.getText()), true);
for (BnfExpression occurrence : occurrences) {
builder.replaceElement(occurrence, "Other", new Expression() {
@Nullable