RulePropertyRef getRulePropertyRef(Token x, Token prop) {
Grammar g = factory.getGrammar();
try {
Class<? extends RulePropertyRef> c = rulePropToModelMap.get(prop.getText());
Constructor<? extends RulePropertyRef> ctor = c.getConstructor(StructDecl.class, String.class);
RulePropertyRef ref =
ctor.newInstance(nodeContext, getRuleLabel(x.getText()));
return ref;
}
catch (Exception e) {
g.tool.errMgr.toolError(ErrorType.INTERNAL_ERROR, e, prop.getText());