Search in sources :

Example 1 with Apply_rp_stanzaContext

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

the class CiscoControlPlaneExtractor method toRoutePolicyStatement.

private RoutePolicyStatement toRoutePolicyStatement(Rp_stanzaContext ctx) {
    Apply_rp_stanzaContext actx = ctx.apply_rp_stanza();
    if (actx != null) {
        return toRoutePolicyStatement(actx);
    }
    Delete_rp_stanzaContext dectx = ctx.delete_rp_stanza();
    if (dectx != null) {
        return toRoutePolicyStatement(dectx);
    }
    Disposition_rp_stanzaContext dictx = ctx.disposition_rp_stanza();
    if (dictx != null) {
        return toRoutePolicyStatement(dictx);
    }
    Hash_commentContext hctx = ctx.hash_comment();
    if (hctx != null) {
        return toRoutePolicyStatement(hctx);
    }
    If_rp_stanzaContext ictx = ctx.if_rp_stanza();
    if (ictx != null) {
        return toRoutePolicyStatement(ictx);
    }
    Set_rp_stanzaContext sctx = ctx.set_rp_stanza();
    if (sctx != null) {
        return toRoutePolicyStatement(sctx);
    }
    throw convError(RoutePolicyStatement.class, ctx);
}
Also used : Delete_rp_stanzaContext(org.batfish.grammar.cisco.CiscoParser.Delete_rp_stanzaContext) Hash_commentContext(org.batfish.grammar.cisco.CiscoParser.Hash_commentContext) Disposition_rp_stanzaContext(org.batfish.grammar.cisco.CiscoParser.Disposition_rp_stanzaContext) Set_rp_stanzaContext(org.batfish.grammar.cisco.CiscoParser.Set_rp_stanzaContext) Apply_rp_stanzaContext(org.batfish.grammar.cisco.CiscoParser.Apply_rp_stanzaContext) If_rp_stanzaContext(org.batfish.grammar.cisco.CiscoParser.If_rp_stanzaContext)

Aggregations

Apply_rp_stanzaContext (org.batfish.grammar.cisco.CiscoParser.Apply_rp_stanzaContext)1 Delete_rp_stanzaContext (org.batfish.grammar.cisco.CiscoParser.Delete_rp_stanzaContext)1 Disposition_rp_stanzaContext (org.batfish.grammar.cisco.CiscoParser.Disposition_rp_stanzaContext)1 Hash_commentContext (org.batfish.grammar.cisco.CiscoParser.Hash_commentContext)1 If_rp_stanzaContext (org.batfish.grammar.cisco.CiscoParser.If_rp_stanzaContext)1 Set_rp_stanzaContext (org.batfish.grammar.cisco.CiscoParser.Set_rp_stanzaContext)1