use of org.whole.lang.grammars.model.Grammar in project whole by wholeplatform.
the class DataTypesGrammarsDataTypeParser method deploy.
public static void deploy(String grammarURI) {
Grammar grammar = GrammarsRegistry.instance().getGrammar(grammarURI);
ILanguageKit lk = ReflectionFactory.getLanguageKit(GrammarsUtils.getLanguageURI(grammar), false, null);
EntityDescriptor<?> ed = lk.getEntityDescriptorEnum().valueOf("DateLiteral");
Map<EntityDescriptor<?>, IDataTypeParser> strategies = new HashMap<EntityDescriptor<?>, IDataTypeParser>();
strategies.put(ed, new DataTypesGrammarsDataTypeParser());
install(lk, strategies);
}
Aggregations