Projects moved under correct parent.
[controller.git] / opendaylight / sal / yang-prototype / yang / yang-model-parser-impl / src / main / java / org / opendaylight / controller / yang / parser / impl / YangParserListenerImpl.java
@@ -523,6 +523,35 @@ public final class YangParserListenerImpl extends YangParserBaseListener {
         exitLog("uses", actualPath.pop());
     }
 
+    @Override public void enterUses_augment_stmt(YangParser.Uses_augment_stmtContext ctx) {
+        final int line = ctx.getStart().getLine();
+        final String augmentPath = stringFromNode(ctx);
+        enterLog("augment", augmentPath, line);
+
+        AugmentationSchemaBuilder builder = moduleBuilder.addAugment(line, augmentPath);
+
+        for (int i = 0; i < ctx.getChildCount(); i++) {
+            ParseTree child = ctx.getChild(i);
+            if (child instanceof Description_stmtContext) {
+                builder.setDescription(stringFromNode(child));
+            } else if (child instanceof Reference_stmtContext) {
+                builder.setReference(stringFromNode(child));
+            } else if (child instanceof Status_stmtContext) {
+                builder.setStatus(parseStatus((Status_stmtContext) child));
+            } else if (child instanceof When_stmtContext) {
+                builder.addWhenCondition(stringFromNode(child));
+            }
+        }
+
+        moduleBuilder.enterNode(builder);
+        actualPath.push(augmentPath);
+    }
+
+    @Override public void exitUses_augment_stmt(YangParser.Uses_augment_stmtContext ctx) {
+        moduleBuilder.exitNode();
+        exitLog("augment", actualPath.pop());
+    }
+
     @Override
     public void enterRefine_stmt(YangParser.Refine_stmtContext ctx) {
         final String refineString = stringFromNode(ctx);