* @throws ParseException if the node analysis discovered errors
*/
protected Node exitDefinedValue(Production node)
throws ParseException {
ValueReference ref;
MibContext local = getContext();
String name;
Node child;
// Check for module reference
child = getChildAt(node, 0);
if (child.getId() == Asn1Constants.MODULE_REFERENCE) {
name = getStringValue(child, 0);
local = currentMib.getImport(name);
if (local == null) {
throw new ParseException(
ParseException.ANALYSIS_ERROR,
"referenced module not imported '" + name + "'",
child.getStartLine(),
child.getStartColumn());
}
child = getChildAt(node, 1);
}
// Create value reference
name = getStringValue(child, 0);
ref = new ValueReference(getLocation(node), local, name);
node.addValue(ref);
return node;
}