use of org.batfish.representation.cisco.MacAccessList in project batfish by batfish.
the class CiscoControlPlaneExtractor method enterS_mac_access_list.
@Override
public void enterS_mac_access_list(S_mac_access_listContext ctx) {
String name = ctx.num.getText();
int line = ctx.num.getLine();
MacAccessList list = _configuration.getMacAccessLists().computeIfAbsent(name, n -> new MacAccessList(n, line));
_currentMacAccessList = list;
}
use of org.batfish.representation.cisco.MacAccessList in project batfish by batfish.
the class CiscoControlPlaneExtractor method enterS_mac_access_list_extended.
@Override
public void enterS_mac_access_list_extended(S_mac_access_list_extendedContext ctx) {
String name;
int line;
if (ctx.num != null) {
name = ctx.num.getText();
line = ctx.num.getLine();
} else if (ctx.name != null) {
name = ctx.name.getText();
line = ctx.name.getStart().getLine();
} else {
throw new BatfishException("Could not determine name of extended mac access-list");
}
MacAccessList list = _configuration.getMacAccessLists().computeIfAbsent(name, n -> new MacAccessList(n, line));
_currentMacAccessList = list;
}
Aggregations