Search in sources :

Example 6 with VariableContext

use of org.batfish.grammar.cisco.CiscoParser.VariableContext in project batfish by batfish.

the class CiscoControlPlaneExtractor method exitMatch_community_list_rm_stanza.

@Override
public void exitMatch_community_list_rm_stanza(Match_community_list_rm_stanzaContext ctx) {
    int statementLine = ctx.getStart().getLine();
    Set<String> names = new TreeSet<>();
    for (VariableContext name : ctx.name_list) {
        names.add(name.getText());
    }
    RouteMapMatchCommunityListLine line = new RouteMapMatchCommunityListLine(names, statementLine);
    _currentRouteMapClause.addMatchLine(line);
}
Also used : TreeSet(java.util.TreeSet) RouteMapMatchCommunityListLine(org.batfish.representation.cisco.RouteMapMatchCommunityListLine) VariableContext(org.batfish.grammar.cisco.CiscoParser.VariableContext)

Aggregations

VariableContext (org.batfish.grammar.cisco.CiscoParser.VariableContext)6 TreeSet (java.util.TreeSet)4 LinkedHashSet (java.util.LinkedHashSet)2 RouteMapMatchAsPathAccessListLine (org.batfish.representation.cisco.RouteMapMatchAsPathAccessListLine)1 RouteMapMatchCommunityListLine (org.batfish.representation.cisco.RouteMapMatchCommunityListLine)1 RouteMapMatchIpPrefixListLine (org.batfish.representation.cisco.RouteMapMatchIpPrefixListLine)1 RouteMapMatchIpv6PrefixListLine (org.batfish.representation.cisco.RouteMapMatchIpv6PrefixListLine)1 RouteMapSetAdditiveCommunityListLine (org.batfish.representation.cisco.RouteMapSetAdditiveCommunityListLine)1 RouteMapSetCommunityListLine (org.batfish.representation.cisco.RouteMapSetCommunityListLine)1