* @throws ParseException if the node analysis discovered errors
*/
protected Node exitSnmpAccessPart(Production node)
throws ParseException {
Node child;
String name;
child = getChildAt(node, 0);
if (child.getId() != Asn1Constants.ACCESS) {
currentMib.setSmiVersion(2);
}
child = getChildAt(node, 1);
name = getStringValue(child, 0);
if (name.equals("read-only")) {
node.addValue(SnmpAccess.READ_ONLY);
} else if (name.equals("read-write")) {
node.addValue(SnmpAccess.READ_WRITE);
} else if (name.equals("read-create")) {
node.addValue(SnmpAccess.READ_CREATE);
} else if (name.equals("write-only")) {
node.addValue(SnmpAccess.WRITE_ONLY);
} else if (name.equals("not-implemented")) {
node.addValue(SnmpAccess.NOT_IMPLEMENTED);
} else if (name.equals("not-accessible")) {
node.addValue(SnmpAccess.NOT_ACCESSIBLE);
} else if (name.equals("accessible-for-notify")) {
node.addValue(SnmpAccess.ACCESSIBLE_FOR_NOTIFY);
} else {
node.addValue(SnmpAccess.READ_WRITE);
throw new ParseException(
ParseException.ANALYSIS_ERROR,
"unrecognized access value: '" + name + "'",
child.getStartLine(),
child.getStartColumn());
}
return node;
}