CommonTree substLogicalSource(String ln, String source)
throws RecognitionException {
CommonTree lsrcTree = FlumeBuilder.parseSource(source);
LOG.debug(lsrcTree.toStringTree());
PatternMatch p = FlumePatterns.source("logicalSource");
Map<String, CommonTree> matches = p.match(lsrcTree);
if (matches == null) {
// if was previously a logical source, unregister it.
nameMan.setPhysicalNode(ln, null);