use of org.batfish.grammar.flatjuniper.Hierarchy.HierarchyTree.HierarchyPath in project batfish by batfish.
the class GroupTreeBuilder method exitS_groups_named.
@Override
public void exitS_groups_named(S_groups_namedContext ctx) {
String groupName = ctx.name.getText();
HierarchyTree tree = _hierarchy.getTree(groupName);
if (tree == null) {
tree = _hierarchy.newTree(groupName);
}
StatementContext statement = ctx.s_groups_tail().statement();
if (statement == null) {
return;
}
Interval interval = ctx.s_groups_tail().getSourceInterval();
List<Token> unfilteredTokens = _combinedParser.getTokens().getTokens(interval.a, interval.b);
HierarchyPath path = new HierarchyPath();
for (Token currentToken : unfilteredTokens) {
if (currentToken.getChannel() != Lexer.HIDDEN) {
String text = currentToken.getText();
if (currentToken.getType() == FlatJuniperLexer.WILDCARD) {
path.addWildcardNode(text);
} else {
path.addNode(text);
}
}
}
path.setStatement(statement);
tree.addPath(path, _currentSetLine, null);
}
use of org.batfish.grammar.flatjuniper.Hierarchy.HierarchyTree.HierarchyPath in project batfish by batfish.
the class WildcardPruner method enterSet_line_tail.
@Override
public void enterSet_line_tail(Set_line_tailContext ctx) {
_enablePathRecording = true;
_currentPath = new HierarchyPath();
}
use of org.batfish.grammar.flatjuniper.Hierarchy.HierarchyTree.HierarchyPath in project batfish by batfish.
the class InitialTreeBuilder method enterSet_line.
@Override
public void enterSet_line(Set_lineContext ctx) {
_addLine = true;
_enablePathRecording = true;
_currentPath = new HierarchyPath();
}
use of org.batfish.grammar.flatjuniper.Hierarchy.HierarchyTree.HierarchyPath in project batfish by batfish.
the class InitialTreeBuilder method enterSet_line_tail.
@Override
public void enterSet_line_tail(Set_line_tailContext ctx) {
_enablePathRecording = true;
_currentPath = new HierarchyPath();
}
use of org.batfish.grammar.flatjuniper.Hierarchy.HierarchyTree.HierarchyPath in project batfish by batfish.
the class WildcardApplicator method enterSet_line_tail.
@Override
public void enterSet_line_tail(Set_line_tailContext ctx) {
_enablePathRecording = true;
_currentPath = new HierarchyPath();
}
Aggregations