updating grammar for unknown statement

Change-Id: I0ddfb309d25e2725f94345fdeef6016b0b4a992c
diff --git a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/DefaultDenyAllExtension.java b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/DefaultDenyAllExtension.java
index 2e6c58a..e067b6b 100644
--- a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/DefaultDenyAllExtension.java
+++ b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/DefaultDenyAllExtension.java
@@ -17,7 +17,7 @@
 
 /**
  * Methods related to the extensions defined in ietf-netconf-acm.yang RFC 6536.
- *
+ * <p>
  * RFC 6536 defines two extensions default-deny-write and default-deny-all
  * that can be used to mark exceptions for data nodes to the standard access
  * control exceptions.
@@ -27,14 +27,15 @@
 public interface DefaultDenyAllExtension {
     /**
      * Returns the defaultDenyAll.
-     * @return
+     *
+     * @return the defaultDenyAll
      */
     public boolean getDefaultDenyAll();
 
     /**
      * Sets the defaultDenyAll.
      *
-     * @param defaultDenyAll
+     * @param defaultDenyAll the defaultDenyAll value
      */
     public void setDefaultDenyAll(boolean defaultDenyAll);
 }
diff --git a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/DefaultDenyWriteExtension.java b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/DefaultDenyWriteExtension.java
index e9bd7e7..19deb55 100644
--- a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/DefaultDenyWriteExtension.java
+++ b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/DefaultDenyWriteExtension.java
@@ -17,7 +17,7 @@
 
 /**
  * Methods related to the extensions defined in ietf-netconf-acm.yang RFC 6536.
- *
+ * <p>
  * RFC 6536 defines two extensions default-deny-write and default-deny-all
  * that can be used to mark exceptions for data nodes to the standard access
  * control exceptions.
@@ -27,14 +27,15 @@
 public interface DefaultDenyWriteExtension {
     /**
      * Returns the defaultDenyWrite.
-     * @return
+     *
+     * @return the defaultDenyAll
      */
     public boolean getDefaultDenyWrite();
 
     /**
      * Sets the defaultDenyWrite.
      *
-     * @param defaultDenyWrite
+     * @param defaultDenyWrite the defaultDenyAll value
      */
     public void setDefaultDenyWrite(boolean defaultDenyWrite);
 }
diff --git a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangChoice.java b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangChoice.java
index f2ce166..f0b2c23 100644
--- a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangChoice.java
+++ b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangChoice.java
@@ -80,7 +80,8 @@
         implements YangCommonInfo, Parsable, CollisionDetector,
         YangAugmentableNode, YangWhenHolder, YangIfFeatureHolder,
         YangAppErrorHolder, YangIsFilterContentNodes, YangConfig,
-        YangDefault, YangMandatory {
+        YangDefault, YangMandatory, DefaultDenyAllExtension,
+        DefaultDenyWriteExtension {
 
     private static final long serialVersionUID = 806201604L;
 
@@ -174,6 +175,16 @@
     private boolean isMandatory;
 
     /**
+     * References the extension default-deny-write.
+     */
+    private boolean defaultDenyWrite;
+
+    /**
+     * References the extension default-deny-all.
+     */
+    private boolean defaultDenyAll;
+
+    /**
      * Create a choice node.
      */
     public YangChoice() {
@@ -516,4 +527,24 @@
     public void setMandatory(boolean isReq) {
         isMandatory = isReq;
     }
+
+    @Override
+    public boolean getDefaultDenyWrite() {
+        return defaultDenyWrite;
+    }
+
+    @Override
+    public void setDefaultDenyWrite(boolean defaultDenyWrite) {
+        this.defaultDenyWrite = defaultDenyWrite;
+    }
+
+    @Override
+    public boolean getDefaultDenyAll() {
+        return defaultDenyAll;
+    }
+
+    @Override
+    public void setDefaultDenyAll(boolean defaultDenyAll) {
+        this.defaultDenyAll = defaultDenyAll;
+    }
 }
diff --git a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangContainer.java b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangContainer.java
index bab5e89..9722001 100644
--- a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangContainer.java
+++ b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangContainer.java
@@ -402,39 +402,21 @@
         this.status = status;
     }
 
-    /**
-     * Returns the defaultDenyWrite.
-     * @return
-     */
     @Override
     public boolean getDefaultDenyWrite() {
         return defaultDenyWrite;
     }
 
-    /**
-     * Sets the defaultDenyWrite.
-     *
-     * @param defaultDenyWrite
-     */
     @Override
     public void setDefaultDenyWrite(boolean defaultDenyWrite) {
         this.defaultDenyWrite = defaultDenyWrite;
     }
 
-    /**
-     * Returns the defaultDenyAll.
-     * @return
-     */
     @Override
     public boolean getDefaultDenyAll() {
         return defaultDenyAll;
     }
 
-    /**
-     * Sets the defaultDenyAll.
-     *
-     * @param defaultDenyAll
-     */
     @Override
     public void setDefaultDenyAll(boolean defaultDenyAll) {
         this.defaultDenyAll = defaultDenyAll;
diff --git a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangLeaf.java b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangLeaf.java
index b45cc2e..6ca3149 100644
--- a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangLeaf.java
+++ b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangLeaf.java
@@ -399,39 +399,21 @@
         return cl;
     }
 
-    /**
-     * Returns the defaultDenyWrite.
-     * @return
-     */
     @Override
     public boolean getDefaultDenyWrite() {
         return defaultDenyWrite;
     }
 
-    /**
-     * Sets the defaultDenyWrite.
-     *
-     * @param defaultDenyWrite
-     */
     @Override
     public void setDefaultDenyWrite(boolean defaultDenyWrite) {
         this.defaultDenyWrite = defaultDenyWrite;
     }
 
-    /**
-     * Returns the defaultDenyAll.
-     * @return
-     */
     @Override
     public boolean getDefaultDenyAll() {
         return defaultDenyAll;
     }
 
-    /**
-     * Sets the defaultDenyAll.
-     *
-     * @param defaultDenyAll
-     */
     @Override
     public void setDefaultDenyAll(boolean defaultDenyAll) {
         this.defaultDenyAll = defaultDenyAll;
@@ -514,10 +496,10 @@
             YangSchemaNodeIdentifier dataNodeIdentifier)
             throws DataModelException {
         throw new DataModelException("leaf cannot have any child schema nodes " +
-                getName() + " in " +
-                getLineNumber() + " at " +
-                getCharPosition() +
-                " in " + getFileName() + "\"");
+                                             getName() + " in " +
+                                             getLineNumber() + " at " +
+                                             getCharPosition() +
+                                             " in " + getFileName() + "\"");
     }
 
     @Override
@@ -530,10 +512,10 @@
     public int getMandatoryChildCount()
             throws DataModelException {
         throw new DataModelException("Leaf can't have child. " +
-                getName() + " in " +
-                getLineNumber() + " at " +
-                getCharPosition() +
-                " in " + getFileName() + "\"");
+                                             getName() + " in " +
+                                             getLineNumber() + " at " +
+                                             getCharPosition() +
+                                             " in " + getFileName() + "\"");
     }
 
     @Override
diff --git a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangLeafList.java b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangLeafList.java
index 7878e61..e2b9151 100644
--- a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangLeafList.java
+++ b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangLeafList.java
@@ -492,10 +492,10 @@
             YangSchemaNodeIdentifier dataNodeIdentifier)
             throws DataModelException {
         throw new DataModelException("leaf cannot have any child schema nodes" +
-                getName() + " in " +
-                getLineNumber() + " at " +
-                getCharPosition() +
-                " in " + getFileName() + "\"");
+                                             getName() + " in " +
+                                             getLineNumber() + " at " +
+                                             getCharPosition() +
+                                             " in " + getFileName() + "\"");
     }
 
     @Override
@@ -508,9 +508,9 @@
     public int getMandatoryChildCount()
             throws DataModelException {
         throw new DataModelException("leaf list can't have child " + getName() + " in " +
-                getLineNumber() + " at " +
-                getCharPosition() +
-                " in " + getFileName() + "\"");
+                                             getLineNumber() + " at " +
+                                             getCharPosition() +
+                                             " in " + getFileName() + "\"");
     }
 
     @Override
@@ -668,39 +668,21 @@
         return ObjectProvider.getObject(dataType, value, dataType.getDataType());
     }
 
-    /**
-     * Returns the defaultDenyWrite.
-     * @return
-     */
     @Override
     public boolean getDefaultDenyWrite() {
         return defaultDenyWrite;
     }
 
-    /**
-     * Sets the defaultDenyWrite.
-     *
-     * @param defaultDenyWrite
-     */
     @Override
     public void setDefaultDenyWrite(boolean defaultDenyWrite) {
         this.defaultDenyWrite = defaultDenyWrite;
     }
 
-    /**
-     * Returns the defaultDenyAll.
-     * @return
-     */
     @Override
     public boolean getDefaultDenyAll() {
         return defaultDenyAll;
     }
 
-    /**
-     * Sets the defaultDenyAll.
-     *
-     * @param defaultDenyAll
-     */
     @Override
     public void setDefaultDenyAll(boolean defaultDenyAll) {
         this.defaultDenyAll = defaultDenyAll;
diff --git a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangList.java b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangList.java
index b762699..f7e63cb 100644
--- a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangList.java
+++ b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangList.java
@@ -895,39 +895,21 @@
         }
     }
 
-    /**
-     * Returns the defaultDenyWrite.
-     * @return
-     */
     @Override
     public boolean getDefaultDenyWrite() {
         return defaultDenyWrite;
     }
 
-    /**
-     * Sets the defaultDenyWrite.
-     *
-     * @param defaultDenyWrite
-     */
     @Override
     public void setDefaultDenyWrite(boolean defaultDenyWrite) {
         this.defaultDenyWrite = defaultDenyWrite;
     }
 
-    /**
-     * Returns the defaultDenyAll.
-     * @return
-     */
     @Override
     public boolean getDefaultDenyAll() {
         return defaultDenyAll;
     }
 
-    /**
-     * Sets the defaultDenyAll.
-     *
-     * @param defaultDenyAll
-     */
     @Override
     public void setDefaultDenyAll(boolean defaultDenyAll) {
         this.defaultDenyAll = defaultDenyAll;
diff --git a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangNotification.java b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangNotification.java
index 3b00115..340d380 100644
--- a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangNotification.java
+++ b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangNotification.java
@@ -366,20 +366,11 @@
         }
     }
 
-    /**
-     * Returns the defaultDenyAll.
-     * @return
-     */
     @Override
     public boolean getDefaultDenyAll() {
         return defaultDenyAll;
     }
 
-    /**
-     * Sets the defaultDenyAll.
-     *
-     * @param defaultDenyAll
-     */
     @Override
     public void setDefaultDenyAll(boolean defaultDenyAll) {
         this.defaultDenyAll = defaultDenyAll;
diff --git a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangRpc.java b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangRpc.java
index baa3221..151a15f 100644
--- a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangRpc.java
+++ b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangRpc.java
@@ -169,20 +169,11 @@
         }
     }
 
-    /**
-     * Gets the defaultDenyAll.
-     * @return
-     */
     @Override
     public boolean getDefaultDenyAll() {
         return defaultDenyAll;
     }
 
-    /**
-     * Sets the defaultDenyAll.
-     *
-     * @param defaultDenyAll
-     */
     @Override
     public void setDefaultDenyAll(boolean defaultDenyAll) {
         this.defaultDenyAll = defaultDenyAll;
diff --git a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangUses.java b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangUses.java
index 6263264..7e197e4 100644
--- a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangUses.java
+++ b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangUses.java
@@ -82,7 +82,8 @@
         extends YangNode
         implements YangCommonInfo, Parsable, Resolvable, CollisionDetector,
         YangWhenHolder, YangIfFeatureHolder, YangTranslatorOperatorNode,
-        LeafRefInvalidHolder {
+        LeafRefInvalidHolder, DefaultDenyWriteExtension,
+        DefaultDenyAllExtension {
 
     private static final long serialVersionUID = 806201617L;
 
@@ -140,6 +141,16 @@
     private int currentGroupingDepth;
 
     /**
+     * References the extension default-deny-write.
+     */
+    private boolean defaultDenyWrite;
+
+    /**
+     * References the extension default-deny-all.
+     */
+    private boolean defaultDenyAll;
+
+    /**
      * Creates an YANG uses node.
      */
     public YangUses() {
@@ -567,4 +578,24 @@
         clnNode.setPreviousSibling(null);
         return clnNode;
     }
+
+    @Override
+    public boolean getDefaultDenyWrite() {
+        return defaultDenyWrite;
+    }
+
+    @Override
+    public void setDefaultDenyWrite(boolean defaultDenyWrite) {
+        this.defaultDenyWrite = defaultDenyWrite;
+    }
+
+    @Override
+    public boolean getDefaultDenyAll() {
+        return defaultDenyAll;
+    }
+
+    @Override
+    public void setDefaultDenyAll(boolean defaultDenyAll) {
+        this.defaultDenyAll = defaultDenyAll;
+    }
 }
diff --git a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/utils/YangConstructType.java b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/utils/YangConstructType.java
index d65c007..0e50647 100644
--- a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/utils/YangConstructType.java
+++ b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/utils/YangConstructType.java
@@ -432,7 +432,12 @@
     /**
      * Identifies deviation replace element parsed data.
      */
-    DEVIATE_REPLACE;
+    DEVIATE_REPLACE,
+
+    /**
+     * Identifies unknown statement data.
+     */
+    UNKNOWN_STATEMENT;
 
     /**
      * Returns the YANG construct keyword corresponding to enum values.
@@ -609,6 +614,8 @@
                 return "deviate-delete";
             case DEVIATE_REPLACE:
                 return "deviate-replace";
+            case UNKNOWN_STATEMENT:
+                return "unknown-statement";
             default:
                 return "yang";
         }
diff --git a/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/antlrgencode/GeneratedYangListener.java b/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/antlrgencode/GeneratedYangListener.java
index 5055538..5852424 100644
--- a/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/antlrgencode/GeneratedYangListener.java
+++ b/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/antlrgencode/GeneratedYangListener.java
@@ -33,609 +33,522 @@
      * @param currentContext current context in the parsed tree
      */
     void enterYangfile(YangfileContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule yangfile.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitYangfile(YangfileContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule moduleStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterModuleStatement(ModuleStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule moduleStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitModuleStatement(ModuleStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule moduleBody.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterModuleBody(ModuleBodyContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule moduleBody.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitModuleBody(ModuleBodyContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule moduleHeaderStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterModuleHeaderStatement(ModuleHeaderStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule moduleHeaderStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitModuleHeaderStatement(ModuleHeaderStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule linkageStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterLinkageStatements(LinkageStatementsContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule linkageStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitLinkageStatements(LinkageStatementsContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule metaStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterMetaStatements(MetaStatementsContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule metaStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitMetaStatements(MetaStatementsContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule revisionStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterRevisionStatements(RevisionStatementsContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule revisionStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitRevisionStatements(RevisionStatementsContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule bodyStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterBodyStatements(BodyStatementsContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule bodyStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitBodyStatements(BodyStatementsContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule yangVersionStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterYangVersionStatement(YangVersionStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule yangVersionStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitYangVersionStatement(YangVersionStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule namespaceStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterNamespaceStatement(NamespaceStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule namespaceStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitNamespaceStatement(NamespaceStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule prefixStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterPrefixStatement(PrefixStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule prefixStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitPrefixStatement(PrefixStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule importStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterImportStatement(ImportStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule importStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitImportStatement(ImportStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule importStatementBody.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterImportStatementBody(ImportStatementBodyContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule importStatementBody.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitImportStatementBody(ImportStatementBodyContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule revisionDateStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterRevisionDateStatement(RevisionDateStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule revisionDateStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitRevisionDateStatement(RevisionDateStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule includeStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterIncludeStatement(IncludeStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule includeStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitIncludeStatement(IncludeStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule organizationStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterOrganizationStatement(OrganizationStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule organizationStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitOrganizationStatement(OrganizationStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule contactStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterContactStatement(ContactStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule contactStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitContactStatement(ContactStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule descriptionStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterDescriptionStatement(DescriptionStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule descriptionStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitDescriptionStatement(DescriptionStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule referenceStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterReferenceStatement(ReferenceStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule referenceStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitReferenceStatement(ReferenceStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule revisionStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterRevisionStatement(RevisionStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule revisionStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitRevisionStatement(RevisionStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule revisionStatementBody.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterRevisionStatementBody(RevisionStatementBodyContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule revisionStatementBody.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitRevisionStatementBody(RevisionStatementBodyContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule subModuleStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterSubModuleStatement(SubModuleStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule subModuleStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitSubModuleStatement(SubModuleStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule submoduleBody.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterSubmoduleBody(SubmoduleBodyContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule submoduleBody.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitSubmoduleBody(SubmoduleBodyContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule submoduleHeaderStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterSubmoduleHeaderStatement(SubmoduleHeaderStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule submoduleHeaderStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitSubmoduleHeaderStatement(SubmoduleHeaderStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule belongstoStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterBelongstoStatement(BelongstoStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule belongstoStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitBelongstoStatement(BelongstoStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule belongstoStatementBody.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterBelongstoStatementBody(BelongstoStatementBodyContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule belongstoStatementBody.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitBelongstoStatementBody(BelongstoStatementBodyContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule extensionStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterExtensionStatement(ExtensionStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule extensionStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitExtensionStatement(ExtensionStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule extensionBody.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterExtensionBody(ExtensionBodyContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule extensionBody.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitExtensionBody(ExtensionBodyContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule argumentStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterArgumentStatement(ArgumentStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule argumentStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitArgumentStatement(ArgumentStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule argumentBody.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterArgumentBody(ArgumentBodyContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule argumentBody.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitArgumentBody(ArgumentBodyContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule yinElementStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterYinElementStatement(YinElementStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule yinElementStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitYinElementStatement(YinElementStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule identityStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterIdentityStatement(IdentityStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule identityStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitIdentityStatement(IdentityStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule identityBody.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterIdentityBody(IdentityBodyContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule identityBody.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitIdentityBody(IdentityBodyContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule baseStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterBaseStatement(BaseStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule baseStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitBaseStatement(BaseStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule featureStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterFeatureStatement(FeatureStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule featureStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitFeatureStatement(FeatureStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule featureBody.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterFeatureBody(FeatureBodyContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule featureBody.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitFeatureBody(FeatureBodyContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule dataDefStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterDataDefStatement(DataDefStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule dataDefStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitDataDefStatement(DataDefStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule ifFeatureStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterIfFeatureStatement(IfFeatureStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule ifFeatureStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitIfFeatureStatement(IfFeatureStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule unitsStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterUnitsStatement(UnitsStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule unitsStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitUnitsStatement(UnitsStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule typedefStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterTypedefStatement(TypedefStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule typedefStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitTypedefStatement(TypedefStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule typeStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterTypeStatement(TypeStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule typeStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitTypeStatement(TypeStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule typeBodyStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterTypeBodyStatements(TypeBodyStatementsContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule typeBodyStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitTypeBodyStatements(TypeBodyStatementsContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule numericalRestrictions.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterDecimal64Specification(Decimal64SpecificationContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule numericalRestrictions.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitDecimal64Specification(Decimal64SpecificationContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule numericalRestrictions.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterFractionDigitStatement(FractionDigitStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule
      * numericalRestrictions.
@@ -643,7 +556,6 @@
      * @param currentContext current context in the parsed tree
      */
     void exitFractionDigitStatement(FractionDigitStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule
      * numericalRestrictions.
@@ -651,1321 +563,1199 @@
      * @param currentContext current context in the parsed tree
      */
     void enterNumericalRestrictions(NumericalRestrictionsContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule numericalRestrictions.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitNumericalRestrictions(NumericalRestrictionsContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule rangeStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterRangeStatement(RangeStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule rangeStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitRangeStatement(RangeStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule commonStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterCommonStatements(CommonStatementsContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule commonStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitCommonStatements(CommonStatementsContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule stringRestrictions.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterStringRestrictions(StringRestrictionsContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule stringRestrictions.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitStringRestrictions(StringRestrictionsContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule lengthStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterLengthStatement(LengthStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule lengthStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitLengthStatement(LengthStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule patternStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterPatternStatement(PatternStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule patternStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitPatternStatement(PatternStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule defaultStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterDefaultStatement(DefaultStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule defaultStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitDefaultStatement(DefaultStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule enumSpecification.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterEnumSpecification(EnumSpecificationContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule enumSpecification.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitEnumSpecification(EnumSpecificationContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule enumStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterEnumStatement(EnumStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule enumStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitEnumStatement(EnumStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule enumStatementBody.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterEnumStatementBody(EnumStatementBodyContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule enumStatementBody.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitEnumStatementBody(EnumStatementBodyContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule leafrefSpecification.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterLeafrefSpecification(LeafrefSpecificationContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule leafrefSpecification.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitLeafrefSpecification(LeafrefSpecificationContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule pathStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterPathStatement(PathStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule pathStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitPathStatement(PathStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule requireInstanceStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterRequireInstanceStatement(RequireInstanceStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule requireInstanceStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitRequireInstanceStatement(RequireInstanceStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule instanceIdentifierSpecification.
      *
-     * @param currentContext current context in the parsed tree
+     * @param ctx current context in the parsed tree
      */
-    void enterInstanceIdentifierSpecification(
-            InstanceIdentifierSpecificationContext currentContext);
-
+    void enterInstanceIdentifierSpecification(InstanceIdentifierSpecificationContext ctx);
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule instanceIdentifierSpecification.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitInstanceIdentifierSpecification(InstanceIdentifierSpecificationContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule identityrefSpecification.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterIdentityrefSpecification(IdentityrefSpecificationContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule identityrefSpecification.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitIdentityrefSpecification(IdentityrefSpecificationContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule unionSpecification.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterUnionSpecification(UnionSpecificationContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule unionSpecification.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitUnionSpecification(UnionSpecificationContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule bitsSpecification.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterBitsSpecification(BitsSpecificationContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule bitsSpecification.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitBitsSpecification(BitsSpecificationContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule bitStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterBitStatement(BitStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule bitStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitBitStatement(BitStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule bitBodyStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterBitBodyStatement(BitBodyStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule bitBodyStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitBitBodyStatement(BitBodyStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule positionStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterPositionStatement(PositionStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule positionStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitPositionStatement(PositionStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule statusStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterStatusStatement(StatusStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule statusStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitStatusStatement(StatusStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule configStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterConfigStatement(ConfigStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule configStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitConfigStatement(ConfigStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule mandatoryStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterMandatoryStatement(MandatoryStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule mandatoryStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitMandatoryStatement(MandatoryStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule presenceStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterPresenceStatement(PresenceStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule presenceStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitPresenceStatement(PresenceStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule orderedByStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterOrderedByStatement(OrderedByStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule orderedByStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitOrderedByStatement(OrderedByStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule mustStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterMustStatement(MustStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule mustStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitMustStatement(MustStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule errorMessageStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterErrorMessageStatement(ErrorMessageStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule errorMessageStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitErrorMessageStatement(ErrorMessageStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule errorAppTagStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterErrorAppTagStatement(ErrorAppTagStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule errorAppTagStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitErrorAppTagStatement(ErrorAppTagStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule minElementsStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterMinElementsStatement(MinElementsStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule minElementsStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitMinElementsStatement(MinElementsStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule maxElementsStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterMaxElementsStatement(MaxElementsStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule maxElementsStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitMaxElementsStatement(MaxElementsStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule valueStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterValueStatement(ValueStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule valueStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitValueStatement(ValueStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule groupingStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterGroupingStatement(GroupingStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule groupingStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitGroupingStatement(GroupingStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule containerStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterContainerStatement(ContainerStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule containerStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitContainerStatement(ContainerStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule leafStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterLeafStatement(LeafStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule leafStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitLeafStatement(LeafStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule leafListStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterLeafListStatement(LeafListStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule leafListStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitLeafListStatement(LeafListStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule listStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterListStatement(ListStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule listStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitListStatement(ListStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule keyStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterKeyStatement(KeyStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule keyStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitKeyStatement(KeyStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule uniqueStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterUniqueStatement(UniqueStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule uniqueStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitUniqueStatement(UniqueStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule choiceStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterChoiceStatement(ChoiceStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule choiceStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitChoiceStatement(ChoiceStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule shortCaseStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterShortCaseStatement(ShortCaseStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule shortCaseStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitShortCaseStatement(ShortCaseStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule caseStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterCaseStatement(CaseStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule caseStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitCaseStatement(CaseStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule anyxmlStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterAnyxmlStatement(AnyxmlStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule anyxmlStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitAnyxmlStatement(AnyxmlStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule usesStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterUsesStatement(UsesStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule usesStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitUsesStatement(UsesStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule refineStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterRefineStatement(RefineStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule refineStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitRefineStatement(RefineStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule refineContainerStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterRefineContainerStatements(RefineContainerStatementsContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule refineContainerStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitRefineContainerStatements(RefineContainerStatementsContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule refineLeafStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterRefineLeafStatements(RefineLeafStatementsContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule refineLeafStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitRefineLeafStatements(RefineLeafStatementsContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule refineLeafListStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterRefineLeafListStatements(RefineLeafListStatementsContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule refineLeafListStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitRefineLeafListStatements(RefineLeafListStatementsContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule refineListStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterRefineListStatements(RefineListStatementsContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule refineListStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitRefineListStatements(RefineListStatementsContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule refineChoiceStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterRefineChoiceStatements(RefineChoiceStatementsContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule refineChoiceStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitRefineChoiceStatements(RefineChoiceStatementsContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule refineCaseStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterRefineCaseStatements(RefineCaseStatementsContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule refineCaseStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitRefineCaseStatements(RefineCaseStatementsContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule refineAnyxmlStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterRefineAnyxmlStatements(RefineAnyxmlStatementsContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule refineAnyxmlStatements.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitRefineAnyxmlStatements(RefineAnyxmlStatementsContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule augmentStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterAugmentStatement(AugmentStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule augmentStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitAugmentStatement(AugmentStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule whenStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterWhenStatement(WhenStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule whenStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitWhenStatement(WhenStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule rpcStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterRpcStatement(RpcStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule rpcStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitRpcStatement(RpcStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule inputStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterInputStatement(InputStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule inputStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitInputStatement(InputStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule outputStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterOutputStatement(OutputStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule outputStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitOutputStatement(OutputStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule notificationStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterNotificationStatement(NotificationStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule notificationStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitNotificationStatement(NotificationStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule deviationStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterDeviationStatement(DeviationStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule deviationStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitDeviationStatement(DeviationStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule deviateNotSupportedStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterDeviateNotSupportedStatement(DeviateNotSupportedStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule deviateNotSupportedStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitDeviateNotSupportedStatement(DeviateNotSupportedStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule deviateAddStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterDeviateAddStatement(DeviateAddStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule deviateAddStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitDeviateAddStatement(DeviateAddStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule deviateDeleteStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterDeviateDeleteStatement(DeviateDeleteStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule deviateDeleteStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitDeviateDeleteStatement(DeviateDeleteStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule deviateReplaceStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterDeviateReplaceStatement(DeviateReplaceStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule deviateReplaceStatement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitDeviateReplaceStatement(DeviateReplaceStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule string.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterString(StringContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule string.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitString(StringContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule identifier.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterIdentifier(IdentifierContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule identifier.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitIdentifier(IdentifierContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule version.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterVersion(VersionContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule version.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitVersion(VersionContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule range.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterRange(RangeContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule range.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitRange(RangeContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule dateArgumentString.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterDateArgumentString(DateArgumentStringContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule dateArgumentString.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitDateArgumentString(DateArgumentStringContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule length.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterLength(LengthContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule length.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitLength(LengthContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule path.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterPath(PathContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule path.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitPath(PathContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule position.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterPosition(PositionContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule position.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitPosition(PositionContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule status.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterStatus(StatusContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule status.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitStatus(StatusContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule config.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterConfig(ConfigContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule config.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitConfig(ConfigContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule mandatory.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterMandatory(MandatoryContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule mandatory.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitMandatory(MandatoryContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule ordered-by.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterOrderedBy(OrderedByContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule ordered-by.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitOrderedBy(OrderedByContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule min elements value.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterMinValue(MinValueContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule min elements value.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitMinValue(MinValueContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule  max elements value.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterMaxValue(MaxValueContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule max elements value.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitMaxValue(MaxValueContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule key.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterKey(KeyContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule key.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitKey(KeyContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule unique.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterUnique(UniqueContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule unique.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitUnique(UniqueContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule refine.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterRefine(RefineContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule refine.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitRefine(RefineContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule augment.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterAugment(AugmentContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule augment.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitAugment(AugmentContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule augment.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterFraction(FractionContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule augment.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitFraction(FractionContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule deviation.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterDeviation(DeviationContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule deviation.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitDeviation(DeviationContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule deviation.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterValue(ValueContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule deviation.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitValue(ValueContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule yang construct.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterYangConstruct(YangConstructContext currentContext);
-
     /**
-     * Exits a parse tree produced by GeneratedYangParser for grammar rule yang construct.
+     * Exits a parse tree for grammar rule yang construct.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitYangConstruct(YangConstructContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule compiler annotation statement.
      *
-     * @param currentContext current context in the parsed tree
+     * @param ctx current context in the parsed tree
      */
-    void enterCompilerAnnotationStatement(CompilerAnnotationStatementContext currentContext);
-
+    void enterCompilerAnnotationStatement(CompilerAnnotationStatementContext ctx);
     /**
-     * Exits a parse tree produced by GeneratedYangParser for grammar rule compiler annotation statement.
+     * Exits a parse tree for grammar rule compiler annotation statement.
      *
-     * @param currentContext current context in the parsed tree
+     * @param ctx current context in the parsed tree
      */
-    void exitCompilerAnnotationStatement(CompilerAnnotationStatementContext currentContext);
-
+    void exitCompilerAnnotationStatement(CompilerAnnotationStatementContext ctx);
     /**
-     * Enters a parse tree produced by GeneratedYangParser for grammar rule compiler annotation body statement.
+     * Enters a parse tree for grammar rule compiler annotation body statement.
      *
-     * @param currentContext current context in the parsed tree
+     * @param ctx current context in the parsed tree
      */
-    void enterCompilerAnnotationBodyStatement(CompilerAnnotationBodyStatementContext
-                                                      currentContext);
-
+    void enterCompilerAnnotationBodyStatement(CompilerAnnotationBodyStatementContext ctx);
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule compiler annotation body statement.
      *
-     * @param currentContext current context in the parsed tree
+     * @param ctx current context in the parsed tree
      */
-    void exitCompilerAnnotationBodyStatement(CompilerAnnotationBodyStatementContext
-                                                     currentContext);
-
+    void exitCompilerAnnotationBodyStatement(CompilerAnnotationBodyStatementContext ctx);
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule app data structure statement.
      *
-     * @param currentContext current context in the parsed tree
+     * @param ctx current context in the parsed tree
      */
-    void enterAppDataStructureStatement(AppDataStructureStatementContext
-                                                currentContext);
-
+    void enterAppDataStructureStatement(AppDataStructureStatementContext ctx);
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule app data structure statement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitAppDataStructureStatement(AppDataStructureStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule app data structure.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterAppDataStructure(AppDataStructureContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule app data strcuture.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitAppDataStructure(AppDataStructureContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule app extended statement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterAppExtendedStatement(AppExtendedStatementContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule app extended statement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitAppExtendedStatement(AppExtendedStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule extended name.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterExtendedName(ExtendedNameContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar rule extended name.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitExtendedName(ExtendedNameContext currentContext);
-
-
     /**
-     * Enters a parse tree produced by GeneratedYangParser for grammar rule
-     * data structure key statement.
+     * Enters a parse tree for grammar data structure key statement.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterDataStructureKeyStatement(DataStructureKeyStatementContext currentContext);
-
     /**
-     * Exits a parse tree produced by GeneratedYangParser for grammar rule
-     * data structure key statement.
+     * Exits a parse tree for grammar data structure key statement.
      *
      * @param currentContext current context in the parsed tree
      */
     void exitDataStructureKeyStatement(DataStructureKeyStatementContext currentContext);
-
     /**
      * Enters a parse tree produced by GeneratedYangParser for grammar rule require instance.
      *
      * @param currentContext current context in the parsed tree
      */
     void enterRequireInstance(RequireInstanceContext currentContext);
-
     /**
      * Exits a parse tree produced by GeneratedYangParser for grammar require instance.
      *
      * @param currentContext current context in the parsed tree
      */
-    void exitRequireInstance(GeneratedYangParser.RequireInstanceContext currentContext);
-
+    void exitRequireInstance(RequireInstanceContext currentContext);
     /**
      * From ietf-netconf-acm.yang extension.
-     * @param currentContext
+     *
+     * @param currentContext current context in the parsed tree
      */
-    void enterDefaultDenyWriteStatement(
-            GeneratedYangParser.DefaultDenyWriteStatementContext currentContext);
-
+    void enterDefaultDenyWriteStatement(DefaultDenyWriteStatementContext currentContext);
     /**
      * From ietf-netconf-acm.yang extension.
-     * @param currentContext
+     *
+     * @param currentContext current context in the parsed tree
      */
-    void exitDefaultDenyWriteStatement(
-            GeneratedYangParser.DefaultDenyWriteStatementContext currentContext);
-
+    void exitDefaultDenyWriteStatement(DefaultDenyWriteStatementContext currentContext);
     /**
      * From ietf-netconf-acm.yang extension.
-     * @param currentContext
+     *
+     * @param currentContext current context in the parsed tree
      */
-    void enterDefaultDenyAllStatement(
-            GeneratedYangParser.DefaultDenyAllStatementContext currentContext);
-
+    void enterDefaultDenyAllStatement(DefaultDenyAllStatementContext currentContext);
     /**
      * From ietf-netconf-acm.yang extension.
-     * @param currentContext
+     *
+     * @param currentContext current context in the parsed tree
      */
-    void exitDefaultDenyAllStatement(
-            GeneratedYangParser.DefaultDenyAllStatementContext currentContext);
-
+    void exitDefaultDenyAllStatement(DefaultDenyAllStatementContext currentContext);
+    /**
+     * Enters a parse tree produced by GeneratedYangParser for grammar unknown statement.
+     *
+     * @param currentContext current context in the parsed tree
+     */
+    void enterUnknownStatement(UnknownStatementContext currentContext);
+    /**
+     * Exits a parse tree produced by GeneratedYangParser for grammar unknown
+     * statement.
+     *
+     * @param currentContext current context in the parsed tree
+     */
+    void exitUnknownStatement(UnknownStatementContext currentContext);
+    /**
+     * Enters a parse tree produced by GeneratedYangParser for grammar unknown statement2.
+     *
+     * @param currentContext current context in the parsed tree
+     */
+    void enterUnknownStatement2(UnknownStatement2Context currentContext);
+    /**
+     * Exits a parse tree produced by GeneratedYangParser for grammar unknown statement2.
+     *
+     * @param currentContext current context in the parsed tree
+     */
+    void exitUnknownStatement2(UnknownStatement2Context currentContext);
+    /**
+     * Enters a parse tree produced by GeneratedYangParser for grammar stmt end.
+     *
+     * @param currentContext current context in the parsed tree
+     */
+    void enterStmtEnd(StmtEndContext currentContext);
+    /**
+     * Exits a parse tree produced by GeneratedYangParser for grammar stmt end.
+     *
+     * @param currentContext current context in the parsed tree
+     */
+    void exitStmtEnd(StmtEndContext currentContext);
+    /**
+     * Enters a parse tree produced by GeneratedYangParser for grammar stmt sep.
+     *
+     * @param currentContext current context in the parsed tree
+     */
+    void enterStmtSep(StmtSepContext currentContext);
+    /**
+     * Exits a parse tree produced by GeneratedYangParser for grammar stmt sep.
+     *
+     * @param currentContext current context in the parsed tree
+     */
+    void exitStmtSep(StmtSepContext currentContext);
+    /**
+     * Enters a parse tree produced by GeneratedYangParser for grammar stmt sep.
+     *
+     * @param currentContext current context in the parsed tree
+     */
+    void enterUnknown(UnknownContext currentContext);
+    /**
+     * Exits a parse tree produced by GeneratedYangParser for grammar stmt sep.
+     *
+     * @param currentContext current context in the parsed tree
+     */
+    void exitUnknown(UnknownContext currentContext);
+    /**
+     * Enters a parse tree produced by GeneratedYangParser for grammar stmt sep.
+     *
+     * @param currentContext current context in the parsed tree
+     */
+    void enterUnknown2(Unknown2Context currentContext);
+    /**
+     * Exits a parse tree produced by GeneratedYangParser for grammar stmt sep.
+     *
+     * @param currentContext current context in the parsed tree
+     */
+    void exitUnknown2(Unknown2Context currentContext);
 }
diff --git a/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/TreeWalkListener.java b/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/TreeWalkListener.java
index fc1d34d..963c76e 100644
--- a/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/TreeWalkListener.java
+++ b/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/TreeWalkListener.java
@@ -23,7 +23,6 @@
 import org.onosproject.yang.compiler.datamodel.utils.Parsable;
 import org.onosproject.yang.compiler.datamodel.utils.YangConstructType;
 import org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangListener;
-import org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser;
 import org.onosproject.yang.compiler.parser.impl.listeners.AppDataStructureListener;
 import org.onosproject.yang.compiler.parser.impl.listeners.AppExtendedNameListener;
 import org.onosproject.yang.compiler.parser.impl.listeners.ArgumentListener;
@@ -41,6 +40,8 @@
 import org.onosproject.yang.compiler.parser.impl.listeners.ContainerListener;
 import org.onosproject.yang.compiler.parser.impl.listeners.DataStructureKeyListener;
 import org.onosproject.yang.compiler.parser.impl.listeners.Decimal64Listener;
+import org.onosproject.yang.compiler.parser.impl.listeners.DefaultDenyAllExtRefListener;
+import org.onosproject.yang.compiler.parser.impl.listeners.DefaultDenyWriteExtRefListener;
 import org.onosproject.yang.compiler.parser.impl.listeners.DefaultListener;
 import org.onosproject.yang.compiler.parser.impl.listeners.DescriptionListener;
 import org.onosproject.yang.compiler.parser.impl.listeners.DeviateAddListener;
@@ -99,13 +100,11 @@
 import org.onosproject.yang.compiler.parser.impl.listeners.ValueListener;
 import org.onosproject.yang.compiler.parser.impl.listeners.VersionListener;
 import org.onosproject.yang.compiler.parser.impl.listeners.WhenListener;
-import org.onosproject.yang.compiler.parser.impl.parserutils.ListenerUtil;
-import org.onosproject.yang.compiler.utils.UtilConstants;
-import org.onosproject.yang.compiler.parser.impl.listeners.DefaultDenyAllExtRefListener;
-import org.onosproject.yang.compiler.parser.impl.listeners.DefaultDenyWriteExtRefListener;
 
 import java.util.Stack;
 
+import static org.onosproject.yang.compiler.datamodel.utils.YangConstructType.REFINE_DATA;
+import static org.onosproject.yang.compiler.datamodel.utils.YangConstructType.UNKNOWN_STATEMENT;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.AnyxmlStatementContext;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.AppDataStructureContext;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.AppDataStructureStatementContext;
@@ -134,6 +133,8 @@
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.DataStructureKeyStatementContext;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.DateArgumentStringContext;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.Decimal64SpecificationContext;
+import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.DefaultDenyAllStatementContext;
+import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.DefaultDenyWriteStatementContext;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.DefaultStatementContext;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.DescriptionStatementContext;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.DeviateAddStatementContext;
@@ -221,6 +222,8 @@
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.ShortCaseStatementContext;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.StatusContext;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.StatusStatementContext;
+import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.StmtEndContext;
+import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.StmtSepContext;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.StringContext;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.StringRestrictionsContext;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.SubModuleStatementContext;
@@ -233,6 +236,10 @@
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.UniqueContext;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.UniqueStatementContext;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.UnitsStatementContext;
+import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.Unknown2Context;
+import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.UnknownContext;
+import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.UnknownStatement2Context;
+import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.UnknownStatementContext;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.UsesStatementContext;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.ValueContext;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.ValueStatementContext;
@@ -242,6 +249,9 @@
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.YangVersionStatementContext;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.YangfileContext;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.YinElementStatementContext;
+import static org.onosproject.yang.compiler.parser.impl.parserutils.ListenerUtil.handleUnsupportedYangConstruct;
+import static org.onosproject.yang.compiler.utils.UtilConstants.CURRENTLY_UNSUPPORTED;
+import static org.onosproject.yang.compiler.utils.UtilConstants.UNSUPPORTED_YANG_CONSTRUCT;
 
 /**
  * Represents ANTLR generates parse-tree. ANTLR generates a parse-tree listener interface that responds to events
@@ -1128,8 +1138,9 @@
 
     @Override
     public void enterOrderedByStatement(OrderedByStatementContext ctx) {
-        ListenerUtil.handleUnsupportedYangConstruct(YangConstructType.ORDERED_BY_DATA, ctx,
-                                                    UtilConstants.CURRENTLY_UNSUPPORTED, getFileName());
+        handleUnsupportedYangConstruct(YangConstructType.ORDERED_BY_DATA, ctx,
+                                       CURRENTLY_UNSUPPORTED, getFileName(),
+                                       ctx.orderedBy().getText());
     }
 
     @Override
@@ -1316,8 +1327,9 @@
     @Override
     public void enterAnyxmlStatement(AnyxmlStatementContext ctx) {
         increaseUnsupportedYangConstructDepth();
-        ListenerUtil.handleUnsupportedYangConstruct(YangConstructType.ANYXML_DATA, ctx,
-                                                    UtilConstants.UNSUPPORTED_YANG_CONSTRUCT, getFileName());
+        handleUnsupportedYangConstruct(YangConstructType.ANYXML_DATA, ctx,
+                                       UNSUPPORTED_YANG_CONSTRUCT,
+                                       getFileName(), ctx.identifier().getText());
     }
 
     @Override
@@ -1338,8 +1350,9 @@
     @Override
     public void enterRefineStatement(RefineStatementContext ctx) {
         increaseUnsupportedYangConstructDepth();
-        ListenerUtil.handleUnsupportedYangConstruct(YangConstructType.REFINE_DATA, ctx,
-                                                    UtilConstants.UNSUPPORTED_YANG_CONSTRUCT, getFileName());
+        handleUnsupportedYangConstruct(REFINE_DATA, ctx,
+                                       UNSUPPORTED_YANG_CONSTRUCT,
+                                       getFileName(), ctx.refine().getText());
     }
 
     @Override
@@ -1853,27 +1866,90 @@
 
     @Override
     public void enterDefaultDenyWriteStatement(
-            GeneratedYangParser.DefaultDenyWriteStatementContext currentContext) {
+            DefaultDenyWriteStatementContext ctx) {
         DefaultDenyWriteExtRefListener
-            .processDefaultDenyWriteStructureEntry(this, currentContext);
+                .processDefaultDenyWriteStructureEntry(this, ctx);
     }
 
     @Override
     public void exitDefaultDenyWriteStatement(
-            GeneratedYangParser.DefaultDenyWriteStatementContext currentContext) {
+            DefaultDenyWriteStatementContext ctx) {
         // do nothing
     }
 
     @Override
     public void enterDefaultDenyAllStatement(
-            GeneratedYangParser.DefaultDenyAllStatementContext currentContext) {
+            DefaultDenyAllStatementContext ctx) {
         DefaultDenyAllExtRefListener
-            .processDefaultDenyAllStructureEntry(this, currentContext);
+                .processDefaultDenyAllStructureEntry(this, ctx);
     }
 
     @Override
     public void exitDefaultDenyAllStatement(
-            GeneratedYangParser.DefaultDenyAllStatementContext currentContext) {
+            DefaultDenyAllStatementContext ctx) {
+        // do nothing
+    }
+
+    @Override
+    public void enterUnknownStatement(UnknownStatementContext ctx) {
+        increaseUnsupportedYangConstructDepth();
+        handleUnsupportedYangConstruct(UNKNOWN_STATEMENT, ctx,
+                                       CURRENTLY_UNSUPPORTED, getFileName(),
+                                       ctx.unknown().getText());
+    }
+
+    @Override
+    public void exitUnknownStatement(UnknownStatementContext ctx) {
+        decreaseUnsupportedYangConstructDepth();
+    }
+
+    @Override
+    public void enterUnknownStatement2(UnknownStatement2Context ctx) {
+        // do nothing
+    }
+
+    @Override
+    public void exitUnknownStatement2(UnknownStatement2Context ctx) {
+        // do nothing
+    }
+
+    @Override
+    public void enterStmtEnd(StmtEndContext ctx) {
+        // do nothing
+    }
+
+    @Override
+    public void exitStmtEnd(StmtEndContext ctx) {
+        // do nothing
+    }
+
+    @Override
+    public void enterStmtSep(StmtSepContext ctx) {
+        // do nothing
+    }
+
+    @Override
+    public void exitStmtSep(StmtSepContext ctx) {
+        // do nothing
+    }
+
+    @Override
+    public void enterUnknown(UnknownContext currentContext) {
+        // do nothing
+    }
+
+    @Override
+    public void exitUnknown(UnknownContext currentContext) {
+        // do nothing
+    }
+
+    @Override
+    public void enterUnknown2(Unknown2Context currentContext) {
+        // do nothing
+    }
+
+    @Override
+    public void exitUnknown2(Unknown2Context currentContext) {
         // do nothing
     }
 }
diff --git a/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/listeners/DefaultDenyAllExtRefListener.java b/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/listeners/DefaultDenyAllExtRefListener.java
index cb7997a..eef26b3 100644
--- a/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/listeners/DefaultDenyAllExtRefListener.java
+++ b/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/listeners/DefaultDenyAllExtRefListener.java
@@ -15,64 +15,38 @@
  */
 package org.onosproject.yang.compiler.parser.impl.listeners;
 
+import org.onosproject.yang.compiler.datamodel.DefaultDenyAllExtension;
+import org.onosproject.yang.compiler.datamodel.utils.Parsable;
+import org.onosproject.yang.compiler.parser.exceptions.ParserException;
+import org.onosproject.yang.compiler.parser.impl.TreeWalkListener;
+
 import static org.onosproject.yang.compiler.datamodel.utils.YangConstructType.DEFAULT_DENY_ALL_DATA;
+import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.DefaultDenyAllStatementContext;
 import static org.onosproject.yang.compiler.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
-import static org.onosproject.yang.compiler.parser.impl.parserutils.ListenerErrorLocation.EXIT;
 import static org.onosproject.yang.compiler.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
 import static org.onosproject.yang.compiler.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
 import static org.onosproject.yang.compiler.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
 import static org.onosproject.yang.compiler.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
 
-import org.onosproject.yang.compiler.datamodel.YangContainer;
-import org.onosproject.yang.compiler.datamodel.YangLeaf;
-import org.onosproject.yang.compiler.datamodel.YangLeafList;
-import org.onosproject.yang.compiler.datamodel.YangList;
-import org.onosproject.yang.compiler.datamodel.YangNotification;
-import org.onosproject.yang.compiler.datamodel.YangRpc;
-import org.onosproject.yang.compiler.datamodel.utils.Parsable;
-import org.onosproject.yang.compiler.parser.impl.TreeWalkListener;
-import org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser;
-import org.onosproject.yang.compiler.parser.exceptions.ParserException;
-
 public final class DefaultDenyAllExtRefListener {
 
     private DefaultDenyAllExtRefListener() {
 
     }
 
-    public static void processDefaultDenyAllStructureEntry(TreeWalkListener listener,
-            GeneratedYangParser.DefaultDenyAllStatementContext ctx) {
+    public static void processDefaultDenyAllStructureEntry(
+            TreeWalkListener listener, DefaultDenyAllStatementContext ctx) {
         // Check for stack to be non empty.
-        checkStackIsNotEmpty(listener, MISSING_HOLDER, DEFAULT_DENY_ALL_DATA, "", ENTRY);
+        checkStackIsNotEmpty(listener, MISSING_HOLDER, DEFAULT_DENY_ALL_DATA,
+                             "", ENTRY);
 
         Parsable tmpData = listener.getParsedDataStack().peek();
-        if (tmpData instanceof YangContainer) {
-            YangContainer holder = (YangContainer) tmpData;
-            holder.setDefaultDenyAll(true);
-        } else if (tmpData instanceof YangLeaf) {
-            YangLeaf holder = (YangLeaf) tmpData;
-            holder.setDefaultDenyAll(true);
-        } else if (tmpData instanceof YangLeafList) {
-            YangLeafList holder = (YangLeafList) tmpData;
-            holder.setDefaultDenyAll(true);
-        } else if (tmpData instanceof YangList) {
-            YangList holder = (YangList) tmpData;
-            holder.setDefaultDenyAll(true);
-        } else if (tmpData instanceof YangNotification) {
-            YangNotification holder = (YangNotification) tmpData;
-            holder.setDefaultDenyAll(true);
-        } else if (tmpData instanceof YangRpc) {
-            YangRpc holder = (YangRpc) tmpData;
+        if (tmpData instanceof DefaultDenyAllExtension) {
+            DefaultDenyAllExtension holder = (DefaultDenyAllExtension) tmpData;
             holder.setDefaultDenyAll(true);
         } else {
             throw new ParserException(constructListenerErrorMessage(
                     INVALID_HOLDER, DEFAULT_DENY_ALL_DATA, "", ENTRY));
         }
     }
-
-    public static void processDefaultDenyAllStructureExit(TreeWalkListener listener,
-            GeneratedYangParser.DefaultDenyAllStatementContext ctx) {
-        checkStackIsNotEmpty(listener, MISSING_HOLDER, DEFAULT_DENY_ALL_DATA, "", EXIT);
-        // Nothing.to do
-    }
 }
diff --git a/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/listeners/DefaultDenyWriteExtRefListener.java b/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/listeners/DefaultDenyWriteExtRefListener.java
index ea8b170..45e11d7 100644
--- a/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/listeners/DefaultDenyWriteExtRefListener.java
+++ b/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/listeners/DefaultDenyWriteExtRefListener.java
@@ -15,56 +15,36 @@
  */
 package org.onosproject.yang.compiler.parser.impl.listeners;
 
+import org.onosproject.yang.compiler.datamodel.DefaultDenyWriteExtension;
+import org.onosproject.yang.compiler.datamodel.utils.Parsable;
+import org.onosproject.yang.compiler.parser.exceptions.ParserException;
+import org.onosproject.yang.compiler.parser.impl.TreeWalkListener;
+
 import static org.onosproject.yang.compiler.datamodel.utils.YangConstructType.DEFAULT_DENY_WRITE_DATA;
+import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.DefaultDenyWriteStatementContext;
 import static org.onosproject.yang.compiler.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
-import static org.onosproject.yang.compiler.parser.impl.parserutils.ListenerErrorLocation.EXIT;
 import static org.onosproject.yang.compiler.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
 import static org.onosproject.yang.compiler.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
 import static org.onosproject.yang.compiler.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
 import static org.onosproject.yang.compiler.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
 
-import org.onosproject.yang.compiler.datamodel.YangContainer;
-import org.onosproject.yang.compiler.datamodel.YangLeaf;
-import org.onosproject.yang.compiler.datamodel.YangLeafList;
-import org.onosproject.yang.compiler.datamodel.YangList;
-import org.onosproject.yang.compiler.datamodel.utils.Parsable;
-import org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser;
-import org.onosproject.yang.compiler.parser.exceptions.ParserException;
-import org.onosproject.yang.compiler.parser.impl.TreeWalkListener;
-
 public final class DefaultDenyWriteExtRefListener {
 
     private DefaultDenyWriteExtRefListener() {
-
     }
 
-
-    public static void processDefaultDenyWriteStructureEntry(TreeWalkListener listener,
-            GeneratedYangParser.DefaultDenyWriteStatementContext ctx) {
-        checkStackIsNotEmpty(listener, MISSING_HOLDER, DEFAULT_DENY_WRITE_DATA, "", ENTRY);
+    public static void processDefaultDenyWriteStructureEntry(
+            TreeWalkListener listener, DefaultDenyWriteStatementContext ctx) {
+        checkStackIsNotEmpty(listener, MISSING_HOLDER, DEFAULT_DENY_WRITE_DATA,
+                             "", ENTRY);
 
         Parsable tmpData = listener.getParsedDataStack().peek();
-        if (tmpData instanceof YangContainer) {
-            YangContainer holder = (YangContainer) tmpData;
-            holder.setDefaultDenyWrite(true);
-        } else if (tmpData instanceof YangLeaf) {
-            YangLeaf holder = (YangLeaf) tmpData;
-            holder.setDefaultDenyWrite(true);
-        } else if (tmpData instanceof YangLeafList) {
-            YangLeafList holder = (YangLeafList) tmpData;
-            holder.setDefaultDenyWrite(true);
-        } else if (tmpData instanceof YangList) {
-            YangList holder = (YangList) tmpData;
+        if (tmpData instanceof DefaultDenyWriteExtension) {
+            DefaultDenyWriteExtension holder = (DefaultDenyWriteExtension) tmpData;
             holder.setDefaultDenyWrite(true);
         } else {
             throw new ParserException(constructListenerErrorMessage(
                     INVALID_HOLDER, DEFAULT_DENY_WRITE_DATA, "", ENTRY));
         }
     }
-
-    public static void processDefaultDenyWriteStructureExit(TreeWalkListener listener,
-            GeneratedYangParser.DefaultDenyWriteStatementContext ctx) {
-        checkStackIsNotEmpty(listener, MISSING_HOLDER, DEFAULT_DENY_WRITE_DATA, "", EXIT);
-        // Nothing.to do
-    }
 }
diff --git a/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/parserutils/ListenerUtil.java b/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/parserutils/ListenerUtil.java
index 0a4ef7d..1e367a4 100644
--- a/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/parserutils/ListenerUtil.java
+++ b/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/parserutils/ListenerUtil.java
@@ -33,6 +33,7 @@
 import org.onosproject.yang.compiler.datamodel.YangSubModule;
 import org.onosproject.yang.compiler.datamodel.utils.YangConstructType;
 import org.onosproject.yang.compiler.parser.exceptions.ParserException;
+import org.slf4j.Logger;
 
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
@@ -53,6 +54,7 @@
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.YangVersionStatementContext;
 import static org.onosproject.yang.compiler.utils.UtilConstants.ADD;
 import static org.onosproject.yang.compiler.utils.UtilConstants.ANCESTOR;
+import static org.onosproject.yang.compiler.utils.UtilConstants.AT;
 import static org.onosproject.yang.compiler.utils.UtilConstants.CARET;
 import static org.onosproject.yang.compiler.utils.UtilConstants.CHAR_OF_OPEN_SQUARE_BRACKET;
 import static org.onosproject.yang.compiler.utils.UtilConstants.CHAR_OF_SLASH;
@@ -61,6 +63,7 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.CURRENT;
 import static org.onosproject.yang.compiler.utils.UtilConstants.EMPTY_STRING;
 import static org.onosproject.yang.compiler.utils.UtilConstants.FALSE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.IN;
 import static org.onosproject.yang.compiler.utils.UtilConstants.INVALID_TREE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.OPEN_SQUARE_BRACKET;
 import static org.onosproject.yang.compiler.utils.UtilConstants.QUOTES;
@@ -69,11 +72,13 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.SLASH_FOR_STRING;
 import static org.onosproject.yang.compiler.utils.UtilConstants.TRUE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.YANG_FILE_ERROR;
+import static org.slf4j.LoggerFactory.getLogger;
 
 /**
  * Represents an utility for listener.
  */
 public final class ListenerUtil {
+    private static final Logger log = getLogger(ListenerUtil.class);
 
     private static final Pattern IDENTIFIER_PATTERN =
             Pattern.compile("[a-zA-Z_][a-zA-Z0-9_.-]*");
@@ -91,6 +96,9 @@
     private static final String REGEX_EQUAL = "[=]";
     private static final String REGEX_OPEN_BRACE = "[(]";
     public static final String SPACE = " ";
+    public static final String LINE_NUMBER = "line number ";
+    public static final String CHARACTER_POSITION = "character position ";
+    public static final String FILE = "file ";
 
     // No instantiation.
     private ListenerUtil() {
@@ -632,22 +640,27 @@
     /**
      * Throws parser exception for unsupported YANG constructs.
      *
-     * @param type      construct type
-     * @param ctx       construct context
-     * @param errorInfo error msg
-     * @param fileName  YANG file name
+     * @param type       construct type
+     * @param ctx        construct context
+     * @param errorInfo  error msg
+     * @param fileName   YANG file name
+     * @param identifier identifier of the node
      */
     public static void handleUnsupportedYangConstruct(YangConstructType type,
                                                       ParserRuleContext ctx,
                                                       String errorInfo,
-                                                      String fileName) {
-        ParserException parserException = new ParserException(
-                YANG_FILE_ERROR + QUOTES + getYangConstructType(
-                        type) + QUOTES + errorInfo);
-        parserException.setLine(ctx.getStart().getLine());
-        parserException.setCharPosition(ctx.getStart().getCharPositionInLine());
-        //FIXME this exception should probably be thrown rather than just logged
-        //throw parserException;
+                                                      String fileName,
+                                                      String identifier) {
+        StringBuilder b = new StringBuilder();
+        int lineNumber = ctx.getStart().getLine();
+        int charPostion = ctx.getStart().getCharPositionInLine();
+        b.append(YANG_FILE_ERROR).append(QUOTES).append(
+                getYangConstructType(type)).append(SPACE).append(identifier)
+                .append(QUOTES).append(AT).append(LINE_NUMBER)
+                .append(lineNumber).append(AT).append(CHARACTER_POSITION)
+                .append(charPostion).append(IN).append(FILE)
+                .append(fileName).append(errorInfo);
+        log.info(b.toString());
     }
 
     /**
diff --git a/compiler/base/parser/src/main/resources/GeneratedYang.g4 b/compiler/base/parser/src/main/resources/GeneratedYang.g4
index b4a20e5..8ef68e0 100644
--- a/compiler/base/parser/src/main/resources/GeneratedYang.g4
+++ b/compiler/base/parser/src/main/resources/GeneratedYang.g4
@@ -36,7 +36,8 @@
      *                       "}" optsep
      */
 
-    moduleStatement : MODULE_KEYWORD identifier LEFT_CURLY_BRACE moduleBody RIGHT_CURLY_BRACE;
+    moduleStatement : MODULE_KEYWORD identifier LEFT_CURLY_BRACE stmtSep
+            moduleBody RIGHT_CURLY_BRACE;
 
     moduleBody : moduleHeaderStatement linkageStatements metaStatements revisionStatements bodyStatements;
 
@@ -47,12 +48,12 @@
      *                        prefix-stmt stmtsep
      */
 
-    moduleHeaderStatement : yangVersionStatement? namespaceStatement prefixStatement
-                            | yangVersionStatement? prefixStatement namespaceStatement
-                            | namespaceStatement yangVersionStatement? prefixStatement
-                            | namespaceStatement prefixStatement yangVersionStatement?
-                            | prefixStatement namespaceStatement yangVersionStatement?
-                            | prefixStatement yangVersionStatement? namespaceStatement
+    moduleHeaderStatement : (yangVersionStatement stmtSep)? namespaceStatement stmtSep prefixStatement stmtSep
+                            | (yangVersionStatement stmtSep)? prefixStatement stmtSep namespaceStatement stmtSep
+                            | namespaceStatement stmtSep (yangVersionStatement stmtSep)? prefixStatement stmtSep
+                            | namespaceStatement stmtSep prefixStatement stmtSep (yangVersionStatement stmtSep)?
+                            | prefixStatement stmtSep namespaceStatement stmtSep (yangVersionStatement stmtSep)?
+                            | prefixStatement stmtSep (yangVersionStatement stmtSep)? namespaceStatement stmtSep
                             ;
 
     /**
@@ -60,8 +61,7 @@
      *                       *(import-stmt stmtsep)
      *                       *(include-stmt stmtsep)
      */
-    linkageStatements : (importStatement
-                  | includeStatement)*;
+    linkageStatements : (importStatement stmtSep | includeStatement stmtSep)*;
 
     /**
      * meta-stmts          = ;; these stmts can appear in any order
@@ -70,34 +70,34 @@
      *                       [description-stmt stmtsep]
      *                       [reference-stmt stmtsep]
      */
-    metaStatements : organizationStatement? contactStatement? descriptionStatement? referenceStatement?
-               | organizationStatement? contactStatement? referenceStatement? descriptionStatement?
-               | organizationStatement? descriptionStatement? contactStatement? referenceStatement?
-               | organizationStatement? descriptionStatement? referenceStatement? contactStatement?
-               | organizationStatement? referenceStatement? contactStatement? descriptionStatement?
-               | organizationStatement? referenceStatement? descriptionStatement? contactStatement?
-               | contactStatement? organizationStatement? descriptionStatement? referenceStatement?
-               | contactStatement? organizationStatement? referenceStatement? descriptionStatement?
-               | contactStatement? referenceStatement? organizationStatement? descriptionStatement?
-               | contactStatement? referenceStatement? descriptionStatement? organizationStatement?
-               | contactStatement? descriptionStatement? referenceStatement? organizationStatement?
-               | contactStatement? descriptionStatement? organizationStatement? referenceStatement?
-               | referenceStatement? contactStatement? organizationStatement? descriptionStatement?
-               | referenceStatement? contactStatement? descriptionStatement? organizationStatement?
-               | referenceStatement? organizationStatement? contactStatement? descriptionStatement?
-               | referenceStatement? organizationStatement? descriptionStatement? contactStatement?
-               | referenceStatement? descriptionStatement? organizationStatement? contactStatement?
-               | referenceStatement? descriptionStatement? contactStatement? organizationStatement?
-               | descriptionStatement? referenceStatement? contactStatement? organizationStatement?
-               | descriptionStatement? referenceStatement? organizationStatement? contactStatement?
-               | descriptionStatement? contactStatement? referenceStatement? organizationStatement?
-               | descriptionStatement? contactStatement? organizationStatement? referenceStatement?
-               | descriptionStatement? organizationStatement? contactStatement? referenceStatement?
-               | descriptionStatement? organizationStatement? referenceStatement? contactStatement?
+    metaStatements : (organizationStatement stmtSep)? (contactStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)?
+               | (organizationStatement stmtSep)? (contactStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)?
+               | (organizationStatement stmtSep)? (descriptionStatement stmtSep)? (contactStatement stmtSep)? (referenceStatement stmtSep)?
+               | (organizationStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (contactStatement stmtSep)?
+               | (organizationStatement stmtSep)? (referenceStatement stmtSep)? (contactStatement stmtSep)? (descriptionStatement stmtSep)?
+               | (organizationStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (contactStatement stmtSep)?
+               | (contactStatement stmtSep)? (organizationStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)?
+               | (contactStatement stmtSep)? (organizationStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)?
+               | (contactStatement stmtSep)? (referenceStatement stmtSep)? (organizationStatement stmtSep)? (descriptionStatement stmtSep)?
+               | (contactStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (organizationStatement stmtSep)?
+               | (contactStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (organizationStatement stmtSep)?
+               | (contactStatement stmtSep)? (descriptionStatement stmtSep)? (organizationStatement stmtSep)? (referenceStatement stmtSep)?
+               | (referenceStatement stmtSep)? (contactStatement stmtSep)? (organizationStatement stmtSep)? (descriptionStatement stmtSep)?
+               | (referenceStatement stmtSep)? (contactStatement stmtSep)? (descriptionStatement stmtSep)? (organizationStatement stmtSep)?
+               | (referenceStatement stmtSep)? (organizationStatement stmtSep)? (contactStatement stmtSep)? (descriptionStatement stmtSep)?
+               | (referenceStatement stmtSep)? (organizationStatement stmtSep)? (descriptionStatement stmtSep)? (contactStatement stmtSep)?
+               | (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (organizationStatement stmtSep)? (contactStatement stmtSep)?
+               | (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (contactStatement stmtSep)? (organizationStatement stmtSep)?
+               | (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (contactStatement stmtSep)? (organizationStatement stmtSep)?
+               | (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (organizationStatement stmtSep)? (contactStatement stmtSep)?
+               | (descriptionStatement stmtSep)? (contactStatement stmtSep)? (referenceStatement stmtSep)? (organizationStatement stmtSep)?
+               | (descriptionStatement stmtSep)? (contactStatement stmtSep)? (organizationStatement stmtSep)? (referenceStatement stmtSep)?
+               | (descriptionStatement stmtSep)? (organizationStatement stmtSep)? (contactStatement stmtSep)? (referenceStatement stmtSep)?
+               | (descriptionStatement stmtSep)? (organizationStatement stmtSep)? (referenceStatement stmtSep)? (contactStatement stmtSep)?
                ;
 
     // revision-stmts      = *(revision-stmt stmtsep)
-    revisionStatements : revisionStatement*;
+    revisionStatements : (revisionStatement stmtSep)*;
 
     /**
      * body-stmts          = *((extension-stmt /
@@ -111,37 +111,28 @@
      *                          notification-stmt /
      *                          deviation-stmt) stmtsep)
      */
-    bodyStatements : (extensionStatement
-               | featureStatement
-               | identityStatement
-               | typedefStatement
-               | groupingStatement
-               | dataDefStatement
-               | augmentStatement
-               | rpcStatement
-               | notificationStatement
-               | deviationStatement
-               | compilerAnnotationStatement)*
-               ;
+    bodyStatements : ((extensionStatement | featureStatement | identityStatement
+               | typedefStatement | groupingStatement | dataDefStatement
+               | augmentStatement | rpcStatement | notificationStatement
+               | deviationStatement | compilerAnnotationStatement) stmtSep)*;
 
     /**
      * yang-version-stmt   = yang-version-keyword sep yang-version-arg-str
      *                       optsep stmtend
      */
-    yangVersionStatement :   YANG_VERSION_KEYWORD version STMTEND;
-
+    yangVersionStatement :   YANG_VERSION_KEYWORD version stmtEnd;
 
     /**
      * namespace-stmt      = namespace-keyword sep uri-str optsep stmtend
      * For namespace validation TODO in Listener
      */
-    namespaceStatement : NAMESPACE_KEYWORD string STMTEND;
+    namespaceStatement : NAMESPACE_KEYWORD string stmtEnd;
 
     /**
      * prefix-stmt         = prefix-keyword sep prefix-arg-str
      *                       optsep stmtend
      */
-    prefixStatement : PREFIX_KEYWORD identifier STMTEND;
+    prefixStatement : PREFIX_KEYWORD identifier stmtEnd;
 
     /**
      * import-stmt         = import-keyword sep identifier-arg-str optsep
@@ -150,12 +141,13 @@
      *                           [revision-date-stmt stmtsep]
      *                        "}"
      */
-    importStatement : IMPORT_KEYWORD identifier LEFT_CURLY_BRACE importStatementBody RIGHT_CURLY_BRACE;
+    importStatement : IMPORT_KEYWORD identifier LEFT_CURLY_BRACE
+            stmtSep importStatementBody RIGHT_CURLY_BRACE;
 
-    importStatementBody : prefixStatement revisionDateStatement?;
+    importStatementBody : prefixStatement stmtSep (revisionDateStatement stmtSep)?;
 
     // revision-date-stmt = revision-date-keyword sep revision-date stmtend
-    revisionDateStatement : REVISION_DATE_KEYWORD dateArgumentString STMTEND;
+    revisionDateStatement : REVISION_DATE_KEYWORD dateArgumentString stmtEnd;
 
     /**
      * include-stmt        = include-keyword sep identifier-arg-str optsep
@@ -164,22 +156,23 @@
      *                                  [revision-date-stmt stmtsep]
      *                            "}")
      */
-    includeStatement : INCLUDE_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE revisionDateStatement? RIGHT_CURLY_BRACE);
+    includeStatement : INCLUDE_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE
+            stmtSep (revisionDateStatement stmtSep)? RIGHT_CURLY_BRACE);
 
     /**
      * organization-stmt   = organization-keyword sep string
      *                            optsep stmtend
      */
-    organizationStatement : ORGANIZATION_KEYWORD string STMTEND;
+    organizationStatement : ORGANIZATION_KEYWORD string stmtEnd;
 
     // contact-stmt        = contact-keyword sep string optsep stmtend
-    contactStatement : CONTACT_KEYWORD string STMTEND;
+    contactStatement : CONTACT_KEYWORD string stmtEnd;
 
     // description-stmt    = description-keyword sep string optsep stmtend
-    descriptionStatement : DESCRIPTION_KEYWORD string STMTEND;
+    descriptionStatement : DESCRIPTION_KEYWORD string stmtEnd;
 
     // reference-stmt      = reference-keyword sep string optsep stmtend
-    referenceStatement : REFERENCE_KEYWORD string STMTEND;
+    referenceStatement : REFERENCE_KEYWORD string stmtEnd;
 
     /**
      * revision-stmt       = revision-keyword sep revision-date optsep
@@ -189,8 +182,10 @@
      *                                  [reference-stmt stmtsep]
      *                              "}")
      */
-    revisionStatement : REVISION_KEYWORD dateArgumentString (STMTEND | LEFT_CURLY_BRACE revisionStatementBody RIGHT_CURLY_BRACE);
-    revisionStatementBody : descriptionStatement? referenceStatement?;
+    revisionStatement : REVISION_KEYWORD dateArgumentString (STMTEND |
+             LEFT_CURLY_BRACE stmtSep revisionStatementBody RIGHT_CURLY_BRACE);
+    revisionStatementBody : (descriptionStatement stmtSep)?
+             (referenceStatement stmtSep)?;
 
     /**
      * submodule-stmt      = optsep submodule-keyword sep identifier-arg-str
@@ -203,7 +198,8 @@
      *                                 body-stmts
      *                             "}" optsep
      */
-    subModuleStatement : SUBMODULE_KEYWORD identifier LEFT_CURLY_BRACE submoduleBody RIGHT_CURLY_BRACE;
+    subModuleStatement : SUBMODULE_KEYWORD identifier LEFT_CURLY_BRACE
+             stmtSep submoduleBody RIGHT_CURLY_BRACE;
     submoduleBody : submoduleHeaderStatement linkageStatements metaStatements revisionStatements bodyStatements;
 
     /** submodule-header-stmts =
@@ -211,9 +207,8 @@
      *                            [yang-version-stmt stmtsep]
      *                             belongs-to-stmt stmtsep
      */
-    submoduleHeaderStatement : yangVersionStatement? belongstoStatement
-                               | belongstoStatement yangVersionStatement?
-                              ;
+    submoduleHeaderStatement : (yangVersionStatement stmtSep)? belongstoStatement stmtSep
+            | belongstoStatement stmtSep (yangVersionStatement stmtSep)? ;
 
     /**
      * belongs-to-stmt     = belongs-to-keyword sep identifier-arg-str
@@ -222,8 +217,9 @@
      *                           prefix-stmt stmtsep
      *                       "}"
      */
-    belongstoStatement : BELONGS_TO_KEYWORD identifier LEFT_CURLY_BRACE belongstoStatementBody RIGHT_CURLY_BRACE;
-    belongstoStatementBody : prefixStatement;
+    belongstoStatement : BELONGS_TO_KEYWORD identifier LEFT_CURLY_BRACE
+            stmtSep belongstoStatementBody RIGHT_CURLY_BRACE;
+    belongstoStatementBody : prefixStatement stmtSep;
 
     /**
      * extension-stmt      = extension-keyword sep identifier-arg-str optsep
@@ -236,31 +232,32 @@
      *                            [reference-stmt stmtsep]
      *                        "}")
      */
-    extensionStatement : EXTENSION_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE extensionBody RIGHT_CURLY_BRACE);
-    extensionBody : argumentStatement? statusStatement? descriptionStatement? referenceStatement?
-                   | argumentStatement? statusStatement? referenceStatement? descriptionStatement?
-                   | argumentStatement? descriptionStatement? statusStatement? referenceStatement?
-                   | argumentStatement? descriptionStatement? referenceStatement? statusStatement?
-                   | argumentStatement? referenceStatement? descriptionStatement? statusStatement?
-                   | argumentStatement? referenceStatement? statusStatement? descriptionStatement?
-                   | statusStatement? referenceStatement? argumentStatement? descriptionStatement?
-                   | statusStatement? referenceStatement? descriptionStatement? argumentStatement?
-                   | statusStatement? descriptionStatement? referenceStatement? argumentStatement?
-                   | statusStatement? descriptionStatement? argumentStatement? referenceStatement?
-                   | statusStatement? argumentStatement? referenceStatement? descriptionStatement?
-                   | statusStatement? argumentStatement? descriptionStatement? referenceStatement?
-                   | descriptionStatement? argumentStatement? statusStatement? referenceStatement?
-                   | descriptionStatement? argumentStatement? referenceStatement? statusStatement?
-                   | descriptionStatement? statusStatement? argumentStatement? referenceStatement?
-                   | descriptionStatement? statusStatement? referenceStatement? argumentStatement?
-                   | descriptionStatement? referenceStatement? statusStatement? argumentStatement?
-                   | descriptionStatement? referenceStatement? argumentStatement? statusStatement?
-                   | referenceStatement? descriptionStatement? argumentStatement? statusStatement?
-                   | referenceStatement? descriptionStatement? statusStatement? argumentStatement?
-                   | referenceStatement? statusStatement? argumentStatement? descriptionStatement?
-                   | referenceStatement? statusStatement? descriptionStatement? argumentStatement?
-                   | referenceStatement? argumentStatement? descriptionStatement? statusStatement?
-                   | referenceStatement? argumentStatement? statusStatement? descriptionStatement?
+    extensionStatement : EXTENSION_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE
+             stmtSep extensionBody RIGHT_CURLY_BRACE);
+    extensionBody : (argumentStatement stmtSep)? (statusStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)?
+                   | (argumentStatement stmtSep)? (statusStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)?
+                   | (argumentStatement stmtSep)? (descriptionStatement stmtSep)? (statusStatement stmtSep)? (referenceStatement stmtSep)?
+                   | (argumentStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (statusStatement stmtSep)?
+                   | (argumentStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (statusStatement stmtSep)?
+                   | (argumentStatement stmtSep)? (referenceStatement stmtSep)? (statusStatement stmtSep)? (descriptionStatement stmtSep)?
+                   | (statusStatement stmtSep)? (referenceStatement stmtSep)? (argumentStatement stmtSep)? (descriptionStatement stmtSep)?
+                   | (statusStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (argumentStatement stmtSep)?
+                   | (statusStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (argumentStatement stmtSep)?
+                   | (statusStatement stmtSep)? (descriptionStatement stmtSep)? (argumentStatement stmtSep)? (referenceStatement stmtSep)?
+                   | (statusStatement stmtSep)? (argumentStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)?
+                   | (statusStatement stmtSep)? (argumentStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)?
+                   | (descriptionStatement stmtSep)? (argumentStatement stmtSep)? (statusStatement stmtSep)? (referenceStatement stmtSep)?
+                   | (descriptionStatement stmtSep)? (argumentStatement stmtSep)? (referenceStatement stmtSep)? (statusStatement stmtSep)?
+                   | (descriptionStatement stmtSep)? (statusStatement stmtSep)? (argumentStatement stmtSep)? (referenceStatement stmtSep)?
+                   | (descriptionStatement stmtSep)? (statusStatement stmtSep)? (referenceStatement stmtSep)? (argumentStatement stmtSep)?
+                   | (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (statusStatement stmtSep)? (argumentStatement stmtSep)?
+                   | (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (argumentStatement stmtSep)? (statusStatement stmtSep)?
+                   | (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (argumentStatement stmtSep)? (statusStatement stmtSep)?
+                   | (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (statusStatement stmtSep)? (argumentStatement stmtSep)?
+                   | (referenceStatement stmtSep)? (statusStatement stmtSep)? (argumentStatement stmtSep)? (descriptionStatement stmtSep)?
+                   | (referenceStatement stmtSep)? (statusStatement stmtSep)? (descriptionStatement stmtSep)? (argumentStatement stmtSep)?
+                   | (referenceStatement stmtSep)? (argumentStatement stmtSep)? (descriptionStatement stmtSep)? (statusStatement stmtSep)?
+                   | (referenceStatement stmtSep)? (argumentStatement stmtSep)? (statusStatement stmtSep)? (descriptionStatement stmtSep)?
                    ;
 
     /**
@@ -270,14 +267,16 @@
      *                            [yin-element-stmt stmtsep]
      *                        "}")
      */
-    argumentStatement : ARGUMENT_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE argumentBody RIGHT_CURLY_BRACE);
-    argumentBody : yinElementStatement?;
+    argumentStatement : ARGUMENT_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE
+              stmtSep argumentBody RIGHT_CURLY_BRACE);
+    argumentBody : (yinElementStatement stmtSep)?;
 
     /**
      * yin-element-stmt    = yin-element-keyword sep yin-element-arg-str
      *                       stmtend
      */
-    yinElementStatement : YIN_ELEMENT_KEYWORD (TRUE_KEYWORD | FALSE_KEYWORD) STMTEND;
+    yinElementStatement : YIN_ELEMENT_KEYWORD (TRUE_KEYWORD | FALSE_KEYWORD)
+            stmtEnd;
 
     /**
      * identity-stmt       = identity-keyword sep identifier-arg-str optsep
@@ -290,32 +289,32 @@
      *                            [reference-stmt stmtsep]
      *                        "}")
      */
-    identityStatement : IDENTITY_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE identityBody RIGHT_CURLY_BRACE);
-    identityBody : baseStatement? statusStatement? descriptionStatement? referenceStatement?
-                  | baseStatement? statusStatement? referenceStatement? descriptionStatement?
-                  | baseStatement? descriptionStatement? statusStatement? referenceStatement?
-                  | baseStatement? descriptionStatement? referenceStatement? statusStatement?
-                  | baseStatement? referenceStatement? descriptionStatement? statusStatement?
-                  | baseStatement? referenceStatement? statusStatement? descriptionStatement?
-                  | referenceStatement? baseStatement? statusStatement? descriptionStatement?
-                  | referenceStatement? baseStatement? descriptionStatement? statusStatement?
-                  | referenceStatement? statusStatement? baseStatement? descriptionStatement?
-                  | referenceStatement? statusStatement? descriptionStatement? baseStatement?
-                  | referenceStatement? descriptionStatement? statusStatement? baseStatement?
-                  | referenceStatement? descriptionStatement? baseStatement? statusStatement?
-                  | descriptionStatement? referenceStatement? statusStatement? baseStatement?
-                  | descriptionStatement? referenceStatement? statusStatement? baseStatement?
-                  | descriptionStatement? referenceStatement? baseStatement? statusStatement?
-                  | descriptionStatement? statusStatement? baseStatement? referenceStatement?
-                  | descriptionStatement? statusStatement? referenceStatement? baseStatement?
-                  | descriptionStatement? baseStatement? referenceStatement? statusStatement?
-                  | descriptionStatement? baseStatement? statusStatement? referenceStatement?
-                  | statusStatement? baseStatement? descriptionStatement? referenceStatement?
-                  | statusStatement? baseStatement? referenceStatement? descriptionStatement?
-                  | statusStatement? descriptionStatement? baseStatement? referenceStatement?
-                  | statusStatement? descriptionStatement? referenceStatement? baseStatement?
-                  | statusStatement? referenceStatement? descriptionStatement? baseStatement?
-                  | statusStatement? referenceStatement? baseStatement? descriptionStatement?
+    identityStatement : IDENTITY_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE
+             stmtSep identityBody RIGHT_CURLY_BRACE);
+    identityBody : (baseStatement stmtSep)? (statusStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)?
+                  | (baseStatement stmtSep)? (statusStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)?
+                  | (baseStatement stmtSep)? (descriptionStatement stmtSep)? (statusStatement stmtSep)? (referenceStatement stmtSep)?
+                  | (baseStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (statusStatement stmtSep)?
+                  | (baseStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (statusStatement stmtSep)?
+                  | (baseStatement stmtSep)? (referenceStatement stmtSep)? (statusStatement stmtSep)? (descriptionStatement stmtSep)?
+                  | (referenceStatement stmtSep)? (baseStatement stmtSep)? (statusStatement stmtSep)? (descriptionStatement stmtSep)?
+                  | (referenceStatement stmtSep)? (baseStatement stmtSep)? (descriptionStatement stmtSep)? (statusStatement stmtSep)?
+                  | (referenceStatement stmtSep)? (statusStatement stmtSep)? (baseStatement stmtSep)? (descriptionStatement stmtSep)?
+                  | (referenceStatement stmtSep)? (statusStatement stmtSep)? (descriptionStatement stmtSep)? (baseStatement stmtSep)?
+                  | (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (statusStatement stmtSep)? (baseStatement stmtSep)?
+                  | (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (baseStatement stmtSep)? (statusStatement stmtSep)?
+                  | (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (statusStatement stmtSep)? (baseStatement stmtSep)?
+                  | (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (baseStatement stmtSep)? (statusStatement stmtSep)?
+                  | (descriptionStatement stmtSep)? (statusStatement stmtSep)? (baseStatement stmtSep)? (referenceStatement stmtSep)?
+                  | (descriptionStatement stmtSep)? (statusStatement stmtSep)? (referenceStatement stmtSep)? (baseStatement stmtSep)?
+                  | (descriptionStatement stmtSep)? (baseStatement stmtSep)? (referenceStatement stmtSep)? (statusStatement stmtSep)?
+                  | (descriptionStatement stmtSep)? (baseStatement stmtSep)? (statusStatement stmtSep)? (referenceStatement stmtSep)?
+                  | (statusStatement stmtSep)? (baseStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)?
+                  | (statusStatement stmtSep)? (baseStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)?
+                  | (statusStatement stmtSep)? (descriptionStatement stmtSep)? (baseStatement stmtSep)? (referenceStatement stmtSep)?
+                  | (statusStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (baseStatement stmtSep)?
+                  | (statusStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (baseStatement stmtSep)?
+                  | (statusStatement stmtSep)? (referenceStatement stmtSep)? (baseStatement stmtSep)? (descriptionStatement stmtSep)?
                   ;
 
     /**
@@ -323,7 +322,7 @@
      *                          optsep stmtend*
      * identifier-ref-arg  = [prefix ":"] identifier
      */
-    baseStatement : BASE_KEYWORD string STMTEND;
+    baseStatement : BASE_KEYWORD string stmtEnd;
 
     /**
      *  feature-stmt        = feature-keyword sep identifier-arg-str optsep
@@ -336,31 +335,32 @@
      *                             [reference-stmt stmtsep]
      *                         "}")
      */
-    featureStatement : FEATURE_KEYWORD string (STMTEND | LEFT_CURLY_BRACE featureBody RIGHT_CURLY_BRACE);
-    featureBody : ifFeatureStatement* statusStatement? descriptionStatement? referenceStatement?
-                 | ifFeatureStatement* statusStatement? referenceStatement? descriptionStatement?
-                 | ifFeatureStatement* descriptionStatement? statusStatement? referenceStatement?
-                 | ifFeatureStatement* descriptionStatement? referenceStatement? statusStatement?
-                 | ifFeatureStatement* referenceStatement? statusStatement? descriptionStatement?
-                 | ifFeatureStatement* referenceStatement? descriptionStatement? statusStatement?
-                 | statusStatement? ifFeatureStatement* descriptionStatement? referenceStatement?
-                 | statusStatement? ifFeatureStatement* referenceStatement? descriptionStatement?
-                 | statusStatement? descriptionStatement? ifFeatureStatement* referenceStatement?
-                 | statusStatement? descriptionStatement? referenceStatement? ifFeatureStatement*
-                 | statusStatement? referenceStatement? ifFeatureStatement* descriptionStatement?
-                 | statusStatement? referenceStatement? descriptionStatement? ifFeatureStatement*
-                 | descriptionStatement? ifFeatureStatement* statusStatement? referenceStatement?
-                 | descriptionStatement? ifFeatureStatement* referenceStatement? statusStatement?
-                 | descriptionStatement? statusStatement? ifFeatureStatement* referenceStatement?
-                 | descriptionStatement? statusStatement? referenceStatement? ifFeatureStatement*
-                 | descriptionStatement? referenceStatement* statusStatement? ifFeatureStatement*
-                 | descriptionStatement? referenceStatement* ifFeatureStatement? statusStatement?
-                 | referenceStatement? ifFeatureStatement* statusStatement? descriptionStatement?
-                 | referenceStatement? ifFeatureStatement* descriptionStatement? statusStatement?
-                 | referenceStatement? descriptionStatement? statusStatement? ifFeatureStatement*
-                 | referenceStatement? descriptionStatement? ifFeatureStatement* statusStatement?
-                 | referenceStatement? statusStatement? descriptionStatement? ifFeatureStatement*
-                 | referenceStatement? statusStatement? ifFeatureStatement* descriptionStatement?
+    featureStatement : FEATURE_KEYWORD string (STMTEND | LEFT_CURLY_BRACE
+            stmtSep featureBody RIGHT_CURLY_BRACE);
+    featureBody : (ifFeatureStatement stmtSep)* (statusStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)?
+                 | (ifFeatureStatement stmtSep)* (statusStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)?
+                 | (ifFeatureStatement stmtSep)* (descriptionStatement stmtSep)? (statusStatement stmtSep)? (referenceStatement stmtSep)?
+                 | (ifFeatureStatement stmtSep)* (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (statusStatement stmtSep)?
+                 | (ifFeatureStatement stmtSep)* (referenceStatement stmtSep)? (statusStatement stmtSep)? (descriptionStatement stmtSep)?
+                 | (ifFeatureStatement stmtSep)* (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (statusStatement stmtSep)?
+                 | (statusStatement stmtSep)? (ifFeatureStatement stmtSep)* (descriptionStatement stmtSep)? (referenceStatement stmtSep)?
+                 | (statusStatement stmtSep)? (ifFeatureStatement stmtSep)* (referenceStatement stmtSep)? (descriptionStatement stmtSep)?
+                 | (statusStatement stmtSep)? (descriptionStatement stmtSep)? (ifFeatureStatement stmtSep)* (referenceStatement stmtSep)?
+                 | (statusStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (ifFeatureStatement stmtSep)*
+                 | (statusStatement stmtSep)? (referenceStatement stmtSep)? (ifFeatureStatement stmtSep)* (descriptionStatement stmtSep)?
+                 | (statusStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (ifFeatureStatement stmtSep)*
+                 | (descriptionStatement stmtSep)? (ifFeatureStatement stmtSep)* (statusStatement stmtSep)? (referenceStatement stmtSep)?
+                 | (descriptionStatement stmtSep)? (ifFeatureStatement stmtSep)* (referenceStatement stmtSep)? (statusStatement stmtSep)?
+                 | (descriptionStatement stmtSep)? (statusStatement stmtSep)? (ifFeatureStatement stmtSep)* (referenceStatement stmtSep)?
+                 | (descriptionStatement stmtSep)? (statusStatement stmtSep)? (referenceStatement stmtSep)? (ifFeatureStatement stmtSep)*
+                 | (descriptionStatement stmtSep)? (referenceStatement stmtSep)* (statusStatement stmtSep)? (ifFeatureStatement stmtSep)*
+                 | (descriptionStatement stmtSep)? (referenceStatement stmtSep)* (ifFeatureStatement stmtSep)? (statusStatement stmtSep)?
+                 | (referenceStatement stmtSep)? (ifFeatureStatement stmtSep)* (statusStatement stmtSep)? (descriptionStatement stmtSep)?
+                 | (referenceStatement stmtSep)? (ifFeatureStatement stmtSep)* (descriptionStatement stmtSep)? (statusStatement stmtSep)?
+                 | (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (statusStatement stmtSep)? (ifFeatureStatement stmtSep)*
+                 | (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (ifFeatureStatement stmtSep)* (statusStatement stmtSep)?
+                 | (referenceStatement stmtSep)? (statusStatement stmtSep)? (descriptionStatement stmtSep)? (ifFeatureStatement stmtSep)*
+                 | (referenceStatement stmtSep)? (statusStatement stmtSep)? (ifFeatureStatement stmtSep)* (descriptionStatement stmtSep)?
                  ;
 
     /**
@@ -384,12 +384,12 @@
      *  if-feature-stmt     = if-feature-keyword sep identifier-ref-arg-str
      *                        optsep stmtend
      */
-    ifFeatureStatement : IF_FEATURE_KEYWORD string STMTEND;
+    ifFeatureStatement : IF_FEATURE_KEYWORD string stmtEnd;
 
     /**
     *    units-stmt          = units-keyword sep string optsep stmtend
     */
-    unitsStatement : UNITS_KEYWORD string STMTEND;
+    unitsStatement : UNITS_KEYWORD string stmtEnd;
 
     /**
      *   typedef-stmt        = typedef-keyword sep identifier-arg-str optsep
@@ -405,8 +405,10 @@
      * TODO : 0..1 occurance to be validated in listener
      */
     typedefStatement : TYPEDEF_KEYWORD identifier LEFT_CURLY_BRACE
-                   (typeStatement | unitsStatement | defaultStatement | statusStatement | descriptionStatement | referenceStatement)*
-                   RIGHT_CURLY_BRACE;
+             stmtSep ((typeStatement stmtSep) | (unitsStatement stmtSep)
+             | (defaultStatement stmtSep) | (statusStatement stmtSep)
+             | (descriptionStatement stmtSep) | (referenceStatement stmtSep))*
+             RIGHT_CURLY_BRACE;
 
     /**
      *  type-stmt           = type-keyword sep identifier-ref-arg-str optsep
@@ -415,7 +417,8 @@
      *                            type-body-stmts
      *                         "}")
      */
-    typeStatement : TYPE_KEYWORD string (STMTEND | LEFT_CURLY_BRACE typeBodyStatements RIGHT_CURLY_BRACE);
+    typeStatement : TYPE_KEYWORD string (STMTEND | LEFT_CURLY_BRACE
+            stmtSep typeBodyStatements RIGHT_CURLY_BRACE);
 
     /**
      *  type-body-stmts     = numerical-restrictions /
@@ -451,12 +454,12 @@
      *                              "5" / "6" / "7" / "8"])
      *                        / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9"
      */
-    fractionDigitStatement : FRACTION_DIGITS_KEYWORD fraction STMTEND;
+    fractionDigitStatement : FRACTION_DIGITS_KEYWORD fraction stmtEnd;
 
     /**
      *  numerical-restrictions = range-stmt stmtsep
      */
-    numericalRestrictions : rangeStatement;
+    numericalRestrictions : rangeStatement stmtSep;
 
     /**
      *  range-stmt          = range-keyword sep range-arg-str optsep
@@ -469,32 +472,33 @@
      *                             [reference-stmt stmtsep]
      *                          "}")
      */
-    rangeStatement : RANGE_KEYWORD range (STMTEND | LEFT_CURLY_BRACE commonStatements RIGHT_CURLY_BRACE);
+    rangeStatement : RANGE_KEYWORD range (STMTEND | LEFT_CURLY_BRACE
+             stmtSep commonStatements RIGHT_CURLY_BRACE);
 
-    commonStatements : errorMessageStatement? errorAppTagStatement? descriptionStatement? referenceStatement?
-                 | errorMessageStatement? errorAppTagStatement? referenceStatement? descriptionStatement?
-                 | errorMessageStatement? descriptionStatement? errorAppTagStatement? referenceStatement?
-                 | errorMessageStatement? descriptionStatement? referenceStatement? errorAppTagStatement?
-                 | errorMessageStatement? referenceStatement? errorAppTagStatement? descriptionStatement?
-                 | errorMessageStatement? referenceStatement? descriptionStatement? errorAppTagStatement?
-                 | errorAppTagStatement? errorMessageStatement? descriptionStatement? referenceStatement?
-                 | errorAppTagStatement? errorMessageStatement? referenceStatement? descriptionStatement?
-                 | errorAppTagStatement? descriptionStatement? descriptionStatement? errorMessageStatement?
-                 | errorAppTagStatement? descriptionStatement? errorMessageStatement? descriptionStatement?
-                 | errorAppTagStatement? referenceStatement? errorMessageStatement? descriptionStatement?
-                 | errorAppTagStatement? referenceStatement? descriptionStatement? errorMessageStatement?
-                 | descriptionStatement? errorMessageStatement? errorAppTagStatement? referenceStatement?
-                 | descriptionStatement? errorMessageStatement? referenceStatement? errorAppTagStatement?
-                 | descriptionStatement? errorAppTagStatement? errorMessageStatement? referenceStatement?
-                 | descriptionStatement? errorAppTagStatement? referenceStatement? errorMessageStatement?
-                 | descriptionStatement? referenceStatement? errorMessageStatement? errorAppTagStatement?
-                 | descriptionStatement? referenceStatement? errorAppTagStatement? errorMessageStatement?
-                 | referenceStatement? errorMessageStatement? descriptionStatement? errorAppTagStatement?
-                 | referenceStatement? errorMessageStatement? errorAppTagStatement? descriptionStatement?
-                 | referenceStatement? errorAppTagStatement? descriptionStatement? errorMessageStatement?
-                 | referenceStatement? errorAppTagStatement? errorMessageStatement? descriptionStatement?
-                 | referenceStatement? descriptionStatement? errorMessageStatement? errorAppTagStatement?
-                 | referenceStatement? descriptionStatement? errorAppTagStatement? errorMessageStatement?
+    commonStatements : (errorMessageStatement stmtSep)? (errorAppTagStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)?
+                 | (errorMessageStatement stmtSep)? (errorAppTagStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)?
+                 | (errorMessageStatement stmtSep)? (descriptionStatement stmtSep)? (errorAppTagStatement stmtSep)? (referenceStatement stmtSep)?
+                 | (errorMessageStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (errorAppTagStatement stmtSep)?
+                 | (errorMessageStatement stmtSep)? (referenceStatement stmtSep)? (errorAppTagStatement stmtSep)? (descriptionStatement stmtSep)?
+                 | (errorMessageStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (errorAppTagStatement stmtSep)?
+                 | (errorAppTagStatement stmtSep)? (errorMessageStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)?
+                 | (errorAppTagStatement stmtSep)? (errorMessageStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)?
+                 | (errorAppTagStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (errorMessageStatement stmtSep)?
+                 | (errorAppTagStatement stmtSep)? (descriptionStatement stmtSep)? (errorMessageStatement stmtSep)? (referenceStatement stmtSep)?
+                 | (errorAppTagStatement stmtSep)? (referenceStatement stmtSep)? (errorMessageStatement stmtSep)? (descriptionStatement stmtSep)?
+                 | (errorAppTagStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (errorMessageStatement stmtSep)?
+                 | (descriptionStatement stmtSep)? (errorMessageStatement stmtSep)? (errorAppTagStatement stmtSep)? (referenceStatement stmtSep)?
+                 | (descriptionStatement stmtSep)? (errorMessageStatement stmtSep)? (referenceStatement stmtSep)? (errorAppTagStatement stmtSep)?
+                 | (descriptionStatement stmtSep)? (errorAppTagStatement stmtSep)? (errorMessageStatement stmtSep)? (referenceStatement stmtSep)?
+                 | (descriptionStatement stmtSep)? (errorAppTagStatement stmtSep)? (referenceStatement stmtSep)? (errorMessageStatement stmtSep)?
+                 | (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (errorMessageStatement stmtSep)? (errorAppTagStatement stmtSep)?
+                 | (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (errorAppTagStatement stmtSep)? (errorMessageStatement stmtSep)?
+                 | (referenceStatement stmtSep)? (errorMessageStatement stmtSep)? (descriptionStatement stmtSep)? (errorAppTagStatement stmtSep)?
+                 | (referenceStatement stmtSep)? (errorMessageStatement stmtSep)? (errorAppTagStatement stmtSep)? (descriptionStatement stmtSep)?
+                 | (referenceStatement stmtSep)? (errorAppTagStatement stmtSep)? (descriptionStatement stmtSep)? (errorMessageStatement stmtSep)?
+                 | (referenceStatement stmtSep)? (errorAppTagStatement stmtSep)? (errorMessageStatement stmtSep)? (descriptionStatement stmtSep)?
+                 | (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (errorMessageStatement stmtSep)? (errorAppTagStatement stmtSep)?
+                 | (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (errorAppTagStatement stmtSep)? (errorMessageStatement stmtSep)?
                  ;
 
     /**
@@ -502,7 +506,8 @@
      *                        [length-stmt stmtsep]
      *                        *(pattern-stmt stmtsep)
      */
-    stringRestrictions : ((lengthStatement)? (patternStatement)*) | ((patternStatement)* (lengthStatement)?);
+    stringRestrictions : ((lengthStatement stmtSep)? (patternStatement stmtSep)*)
+             | ((patternStatement stmtSep)* (lengthStatement stmtSep)?);
 
     /**
      *  length-stmt         = length-keyword sep length-arg-str optsep
@@ -515,8 +520,8 @@
      *                             [reference-stmt stmtsep]
      *                          "}")
      */
-    lengthStatement : LENGTH_KEYWORD length
-                  (STMTEND | LEFT_CURLY_BRACE commonStatements RIGHT_CURLY_BRACE);
+    lengthStatement : LENGTH_KEYWORD length (STMTEND | LEFT_CURLY_BRACE
+              stmtSep commonStatements RIGHT_CURLY_BRACE);
 
     /**
      *  pattern-stmt        = pattern-keyword sep string optsep
@@ -529,17 +534,18 @@
      *                             [reference-stmt stmtsep]
      *                          "}")
      */
-    patternStatement : PATTERN_KEYWORD string (STMTEND | LEFT_CURLY_BRACE commonStatements RIGHT_CURLY_BRACE);
+    patternStatement : PATTERN_KEYWORD string (STMTEND | LEFT_CURLY_BRACE
+              stmtSep commonStatements RIGHT_CURLY_BRACE);
 
     /**
      *  default-stmt        = default-keyword sep string stmtend
      */
-    defaultStatement : DEFAULT_KEYWORD string STMTEND;
+    defaultStatement : DEFAULT_KEYWORD string stmtEnd;
 
     /**
      *  enum-specification  = 1*(enum-stmt stmtsep)
      */
-    enumSpecification : enumStatement+;
+    enumSpecification : (enumStatement stmtSep)+;
 
     /**
      *  enum-stmt           = enum-keyword sep string optsep
@@ -552,32 +558,33 @@
      *                             [reference-stmt stmtsep]
      *                          "}")
      */
-    enumStatement : ENUM_KEYWORD string (STMTEND | LEFT_CURLY_BRACE enumStatementBody RIGHT_CURLY_BRACE);
+    enumStatement : ENUM_KEYWORD string (STMTEND | LEFT_CURLY_BRACE
+             stmtSep enumStatementBody RIGHT_CURLY_BRACE);
 
-    enumStatementBody : valueStatement? statusStatement? descriptionStatement? referenceStatement?
-                   | valueStatement? statusStatement? referenceStatement? descriptionStatement?
-                   | valueStatement? descriptionStatement? statusStatement? referenceStatement?
-                   | valueStatement? descriptionStatement? referenceStatement? statusStatement?
-                   | valueStatement? referenceStatement? statusStatement? descriptionStatement?
-                   | valueStatement? referenceStatement? descriptionStatement? statusStatement?
-                   | statusStatement? valueStatement? descriptionStatement? referenceStatement?
-                   | statusStatement? valueStatement? referenceStatement? descriptionStatement?
-                   | statusStatement? descriptionStatement? descriptionStatement? valueStatement?
-                   | statusStatement? descriptionStatement? valueStatement? descriptionStatement?
-                   | statusStatement? referenceStatement? valueStatement? descriptionStatement?
-                   | statusStatement? referenceStatement? descriptionStatement? valueStatement?
-                   | descriptionStatement? valueStatement? statusStatement? referenceStatement?
-                   | descriptionStatement? valueStatement? referenceStatement? statusStatement?
-                   | descriptionStatement? statusStatement? valueStatement? referenceStatement?
-                   | descriptionStatement? statusStatement? referenceStatement? valueStatement?
-                   | descriptionStatement? referenceStatement? valueStatement? statusStatement?
-                   | descriptionStatement? referenceStatement? statusStatement? valueStatement?
-                   | referenceStatement? valueStatement? descriptionStatement? statusStatement?
-                   | referenceStatement? valueStatement? statusStatement? descriptionStatement?
-                   | referenceStatement? statusStatement? descriptionStatement? valueStatement?
-                   | referenceStatement? statusStatement? valueStatement? descriptionStatement?
-                   | referenceStatement? descriptionStatement? valueStatement? statusStatement?
-                   | referenceStatement? descriptionStatement? statusStatement? valueStatement?
+    enumStatementBody : (valueStatement stmtSep)? (statusStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)?
+                   | (valueStatement stmtSep)? (statusStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)?
+                   | (valueStatement stmtSep)? (descriptionStatement stmtSep)? (statusStatement stmtSep)? (referenceStatement stmtSep)?
+                   | (valueStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (statusStatement stmtSep)?
+                   | (valueStatement stmtSep)? (referenceStatement stmtSep)? (statusStatement stmtSep)? (descriptionStatement stmtSep)?
+                   | (valueStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (statusStatement stmtSep)?
+                   | (statusStatement stmtSep)? (valueStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)?
+                   | (statusStatement stmtSep)? (valueStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)?
+                   | (statusStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (valueStatement stmtSep)?
+                   | (statusStatement stmtSep)? (descriptionStatement stmtSep)? (valueStatement stmtSep)? (referenceStatement stmtSep)?
+                   | (statusStatement stmtSep)? (referenceStatement stmtSep)? (valueStatement stmtSep)? (descriptionStatement stmtSep)?
+                   | (statusStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (valueStatement stmtSep)?
+                   | (descriptionStatement stmtSep)? (valueStatement stmtSep)? (statusStatement stmtSep)? (referenceStatement stmtSep)?
+                   | (descriptionStatement stmtSep)? (valueStatement stmtSep)? (referenceStatement stmtSep)? (statusStatement stmtSep)?
+                   | (descriptionStatement stmtSep)? (statusStatement stmtSep)? (valueStatement stmtSep)? (referenceStatement stmtSep)?
+                   | (descriptionStatement stmtSep)? (statusStatement stmtSep)? (referenceStatement stmtSep)? (valueStatement stmtSep)?
+                   | (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (valueStatement stmtSep)? (statusStatement stmtSep)?
+                   | (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (statusStatement stmtSep)? (valueStatement stmtSep)?
+                   | (referenceStatement stmtSep)? (valueStatement stmtSep)? (descriptionStatement stmtSep)? (statusStatement stmtSep)?
+                   | (referenceStatement stmtSep)? (valueStatement stmtSep)? (statusStatement stmtSep)? (descriptionStatement stmtSep)?
+                   | (referenceStatement stmtSep)? (statusStatement stmtSep)? (descriptionStatement stmtSep)? (valueStatement stmtSep)?
+                   | (referenceStatement stmtSep)? (statusStatement stmtSep)? (valueStatement stmtSep)? (descriptionStatement stmtSep)?
+                   | (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (valueStatement stmtSep)? (statusStatement stmtSep)?
+                   | (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (statusStatement stmtSep)? (valueStatement stmtSep)?
                    ;
 
     /**
@@ -586,12 +593,13 @@
      *                        path-stmt stmtsep
      *                        [require-instance-stmt stmtsep]
      */
-    leafrefSpecification : (pathStatement (requireInstanceStatement)?) | ((requireInstanceStatement)? pathStatement);
+    leafrefSpecification : (pathStatement stmtSep (requireInstanceStatement stmtSep)?)
+             | ((requireInstanceStatement stmtSep)? pathStatement stmtSep);
 
     /**
      *  path-stmt           = path-keyword sep path-arg-str stmtend
      */
-    pathStatement : PATH_KEYWORD path STMTEND;
+    pathStatement : PATH_KEYWORD path stmtEnd;
 
     /**
      *  require-instance-stmt = require-instance-keyword sep
@@ -600,29 +608,29 @@
      *                             require-instance-arg >
      *  require-instance-arg = true-keyword / false-keyword
      */
-    requireInstanceStatement : REQUIRE_INSTANCE_KEYWORD requireInstance STMTEND;
+    requireInstanceStatement : REQUIRE_INSTANCE_KEYWORD requireInstance stmtEnd;
 
     /**
      *  instance-identifier-specification =
      *                        [require-instance-stmt stmtsep]
      */
-    instanceIdentifierSpecification : requireInstanceStatement?;
+    instanceIdentifierSpecification : (requireInstanceStatement stmtSep)?;
 
     /**
      * identityref-specification =
      *                        base-stmt stmtsep
      */
-    identityrefSpecification : baseStatement;
+    identityrefSpecification : baseStatement stmtSep;
 
     /**
      *  union-specification = 1*(type-stmt stmtsep)
      */
-    unionSpecification : typeStatement+;
+    unionSpecification : (typeStatement stmtSep)+;
 
     /**
      *  bits-specification  = 1*(bit-stmt stmtsep)
      */
-    bitsSpecification : bitStatement+;
+    bitsSpecification : (bitStatement stmtSep)+;
 
     /**
      * bit-stmt            = bit-keyword sep identifier-arg-str optsep
@@ -636,32 +644,33 @@
      *                          "}"
      *                        "}")
      */
-    bitStatement : BIT_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE bitBodyStatement RIGHT_CURLY_BRACE);
+    bitStatement : BIT_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE
+             stmtSep bitBodyStatement RIGHT_CURLY_BRACE);
 
-    bitBodyStatement : positionStatement? statusStatement? descriptionStatement? referenceStatement?
-                  | positionStatement? statusStatement? referenceStatement? descriptionStatement?
-                  | positionStatement? descriptionStatement? statusStatement? referenceStatement?
-                  | positionStatement? descriptionStatement? referenceStatement? statusStatement?
-                  | positionStatement? referenceStatement? statusStatement? descriptionStatement?
-                  | positionStatement? referenceStatement? descriptionStatement? statusStatement?
-                  | statusStatement? positionStatement? descriptionStatement? referenceStatement?
-                  | statusStatement? positionStatement? referenceStatement? descriptionStatement?
-                  | statusStatement? descriptionStatement? descriptionStatement? positionStatement?
-                  | statusStatement? descriptionStatement? positionStatement? descriptionStatement?
-                  | statusStatement? referenceStatement? positionStatement? descriptionStatement?
-                  | statusStatement? referenceStatement? descriptionStatement? positionStatement?
-                  | descriptionStatement? positionStatement? statusStatement? referenceStatement?
-                  | descriptionStatement? positionStatement? referenceStatement? statusStatement?
-                  | descriptionStatement? statusStatement? positionStatement? referenceStatement?
-                  | descriptionStatement? statusStatement? referenceStatement? positionStatement?
-                  | descriptionStatement? referenceStatement? positionStatement? statusStatement?
-                  | descriptionStatement? referenceStatement? statusStatement? positionStatement?
-                  | referenceStatement? positionStatement? descriptionStatement? statusStatement?
-                  | referenceStatement? positionStatement? statusStatement? descriptionStatement?
-                  | referenceStatement? statusStatement? descriptionStatement? positionStatement?
-                  | referenceStatement? statusStatement? positionStatement? descriptionStatement?
-                  | referenceStatement? descriptionStatement? positionStatement? statusStatement?
-                  | referenceStatement? descriptionStatement? statusStatement? positionStatement?
+    bitBodyStatement : (positionStatement stmtSep)? (statusStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)?
+                  | (positionStatement stmtSep)? (statusStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)?
+                  | (positionStatement stmtSep)? (descriptionStatement stmtSep)? (statusStatement stmtSep)? (referenceStatement stmtSep)?
+                  | (positionStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (statusStatement stmtSep)?
+                  | (positionStatement stmtSep)? (referenceStatement stmtSep)? (statusStatement stmtSep)? (descriptionStatement stmtSep)?
+                  | (positionStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (statusStatement stmtSep)?
+                  | (statusStatement stmtSep)? (positionStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)?
+                  | (statusStatement stmtSep)? (positionStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)?
+                  | (statusStatement stmtSep)? (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (positionStatement stmtSep)?
+                  | (statusStatement stmtSep)? (descriptionStatement stmtSep)? (positionStatement stmtSep)? (referenceStatement stmtSep)?
+                  | (statusStatement stmtSep)? (referenceStatement stmtSep)? (positionStatement stmtSep)? (descriptionStatement stmtSep)?
+                  | (statusStatement stmtSep)? (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (positionStatement stmtSep)?
+                  | (descriptionStatement stmtSep)? (positionStatement stmtSep)? (statusStatement stmtSep)? (referenceStatement stmtSep)?
+                  | (descriptionStatement stmtSep)? (positionStatement stmtSep)? (referenceStatement stmtSep)? (statusStatement stmtSep)?
+                  | (descriptionStatement stmtSep)? (statusStatement stmtSep)? (positionStatement stmtSep)? (referenceStatement stmtSep)?
+                  | (descriptionStatement stmtSep)? (statusStatement stmtSep)? (referenceStatement stmtSep)? (positionStatement stmtSep)?
+                  | (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (positionStatement stmtSep)? (statusStatement stmtSep)?
+                  | (descriptionStatement stmtSep)? (referenceStatement stmtSep)? (statusStatement stmtSep)? (positionStatement stmtSep)?
+                  | (referenceStatement stmtSep)? (positionStatement stmtSep)? (descriptionStatement stmtSep)? (statusStatement stmtSep)?
+                  | (referenceStatement stmtSep)? (positionStatement stmtSep)? (statusStatement stmtSep)? (descriptionStatement stmtSep)?
+                  | (referenceStatement stmtSep)? (statusStatement stmtSep)? (descriptionStatement stmtSep)? (positionStatement stmtSep)?
+                  | (referenceStatement stmtSep)? (statusStatement stmtSep)? (positionStatement stmtSep)? (descriptionStatement stmtSep)?
+                  | (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (positionStatement stmtSep)? (statusStatement stmtSep)?
+                  | (referenceStatement stmtSep)? (descriptionStatement stmtSep)? (statusStatement stmtSep)? (positionStatement stmtSep)?
                   ;
 
     /**
@@ -671,7 +680,7 @@
      *                              position-value-arg >
      *  position-value-arg  = non-negative-integer-value
      */
-    positionStatement : POSITION_KEYWORD position STMTEND;
+    positionStatement : POSITION_KEYWORD position stmtEnd;
 
     /**
      *  status-stmt         = status-keyword sep status-arg-str stmtend
@@ -681,7 +690,7 @@
      *                        obsolete-keyword /
      *                        deprecated-keyword
      */
-    statusStatement : STATUS_KEYWORD status STMTEND;
+    statusStatement : STATUS_KEYWORD status stmtEnd;
 
     /**
      *  config-stmt         = config-keyword sep
@@ -701,12 +710,12 @@
      *
      *  mandatory-arg       = true-keyword / false-keyword
      */
-    mandatoryStatement : MANDATORY_KEYWORD mandatory STMTEND;
+    mandatoryStatement : MANDATORY_KEYWORD mandatory stmtEnd;
 
     /**
      *  presence-stmt       = presence-keyword sep string stmtend
      */
-    presenceStatement : PRESENCE_KEYWORD string STMTEND;
+    presenceStatement : PRESENCE_KEYWORD string stmtEnd;
 
     /**
      *  ordered-by-stmt     = ordered-by-keyword sep
@@ -717,7 +726,7 @@
      *
      *  ordered-by-arg      = user-keyword / system-keyword
      */
-    orderedByStatement : ORDERED_BY_KEYWORD orderedBy STMTEND;
+    orderedByStatement : ORDERED_BY_KEYWORD orderedBy stmtEnd;
 
     /**
      *  must-stmt           = must-keyword sep string optsep
@@ -730,17 +739,18 @@
      *                             [reference-stmt stmtsep]
      *                          "}")
      */
-    mustStatement : MUST_KEYWORD string (STMTEND | LEFT_CURLY_BRACE commonStatements RIGHT_CURLY_BRACE);
+    mustStatement : MUST_KEYWORD string (STMTEND | LEFT_CURLY_BRACE
+             stmtSep commonStatements RIGHT_CURLY_BRACE);
 
     /**
      *   error-message-stmt  = error-message-keyword sep string stmtend
      */
-    errorMessageStatement : ERROR_MESSAGE_KEYWORD string STMTEND;
+    errorMessageStatement : ERROR_MESSAGE_KEYWORD string stmtEnd;
 
     /**
      *  error-app-tag-stmt  = error-app-tag-keyword sep string stmtend
      */
-    errorAppTagStatement : ERROR_APP_TAG_KEYWORD string STMTEND;
+    errorAppTagStatement : ERROR_APP_TAG_KEYWORD string stmtEnd;
 
     /**
      *  min-elements-stmt   = min-elements-keyword sep
@@ -749,7 +759,7 @@
      *                          min-value-arg >
      *  min-value-arg       = non-negative-integer-value
      */
-    minElementsStatement : MIN_ELEMENTS_KEYWORD minValue STMTEND;
+    minElementsStatement : MIN_ELEMENTS_KEYWORD minValue stmtEnd;
 
     /**
      *  max-elements-stmt   = max-elements-keyword sep
@@ -759,12 +769,12 @@
      *  max-value-arg       = unbounded-keyword /
      *                        positive-integer-value
      */
-    maxElementsStatement :  MAX_ELEMENTS_KEYWORD maxValue STMTEND;
+    maxElementsStatement :  MAX_ELEMENTS_KEYWORD maxValue stmtEnd;
 
     /**
      *  value-stmt          = value-keyword sep integer-value stmtend
      */
-    valueStatement : VALUE_KEYWORD value STMTEND;
+    valueStatement : VALUE_KEYWORD value stmtEnd;
 
     /**
      *   grouping-stmt       = grouping-keyword sep identifier-arg-str optsep
@@ -778,11 +788,11 @@
      *                                grouping-stmt) stmtsep)
      *                             *(data-def-stmt stmtsep)
      *                         "}")
-     * TODO : 0..1 occurance to be checked in listener
      */
     groupingStatement : GROUPING_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE
-                      (statusStatement | descriptionStatement | referenceStatement | typedefStatement | groupingStatement
-                       | dataDefStatement)* RIGHT_CURLY_BRACE);
+            stmtSep ((statusStatement | descriptionStatement
+            | referenceStatement | typedefStatement | groupingStatement
+            | dataDefStatement) stmtSep)* RIGHT_CURLY_BRACE);
 
     /**
      *  container-stmt      = container-keyword sep identifier-arg-str optsep
@@ -803,12 +813,14 @@
      *                             [default-deny-write-stmt stmtsep]
      *                             [default-deny-all-stmt stmtsep]
      *                         "}")
-     * TODO : 0..1 occurrence to be checked in listener
      */
-    containerStatement : CONTAINER_KEYWORD identifier
-                     (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | mustStatement | presenceStatement | configStatement
-                     | statusStatement | descriptionStatement | referenceStatement | typedefStatement | groupingStatement
-                     | dataDefStatement | defaultDenyWriteStatement | defaultDenyAllStatement )* RIGHT_CURLY_BRACE);
+    containerStatement : CONTAINER_KEYWORD identifier (STMTEND |
+            LEFT_CURLY_BRACE stmtSep ((whenStatement | ifFeatureStatement
+            | mustStatement | presenceStatement | configStatement
+            | statusStatement | descriptionStatement | referenceStatement
+            | typedefStatement | groupingStatement | dataDefStatement
+            | defaultDenyWriteStatement | defaultDenyAllStatement) stmtSep)*
+            RIGHT_CURLY_BRACE);
 
     /**
      *  leaf-stmt           = leaf-keyword sep identifier-arg-str optsep
@@ -828,11 +840,14 @@
      *                            [default-deny-write-stmt stmtsep]
      *                            [default-deny-all-stmt stmtsep]
      *                         "}"
-     * TODO : 0..1 occurrence to be checked in listener
      */
-    leafStatement : LEAF_KEYWORD identifier LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | typeStatement | unitsStatement
-              | mustStatement | defaultStatement | configStatement | mandatoryStatement | statusStatement  | descriptionStatement
-              | referenceStatement | defaultDenyWriteStatement | defaultDenyAllStatement )* RIGHT_CURLY_BRACE;
+    leafStatement : LEAF_KEYWORD identifier LEFT_CURLY_BRACE stmtSep
+            ((whenStatement | ifFeatureStatement | typeStatement
+            | unitsStatement | mustStatement | defaultStatement
+            | configStatement | mandatoryStatement | statusStatement
+            | descriptionStatement | referenceStatement
+            | defaultDenyWriteStatement | defaultDenyAllStatement) stmtSep)*
+            RIGHT_CURLY_BRACE;
 
     /**
      *  leaf-list-stmt      = leaf-list-keyword sep identifier-arg-str optsep
@@ -853,12 +868,14 @@
      *                            [default-deny-write-stmt stmtsep]
      *                            [default-deny-all-stmt stmtsep]
      *                         "}"
-     * TODO : 0..1 occurance to be checked in listener
      */
-    leafListStatement : LEAF_LIST_KEYWORD identifier LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | typeStatement
-                     | unitsStatement | mustStatement | configStatement | minElementsStatement | maxElementsStatement | orderedByStatement
-                     | statusStatement | descriptionStatement | referenceStatement
-                     | defaultDenyWriteStatement | defaultDenyAllStatement )* RIGHT_CURLY_BRACE;
+    leafListStatement : LEAF_LIST_KEYWORD identifier LEFT_CURLY_BRACE stmtSep
+            ((whenStatement | ifFeatureStatement | typeStatement
+            | unitsStatement | mustStatement | configStatement
+            | minElementsStatement | maxElementsStatement | orderedByStatement
+            | statusStatement | descriptionStatement | referenceStatement
+            | defaultDenyWriteStatement | defaultDenyAllStatement) stmtSep)*
+            RIGHT_CURLY_BRACE;
 
     /**
      *  list-stmt           = list-keyword sep identifier-arg-str optsep
@@ -882,22 +899,24 @@
      *                               grouping-stmt) stmtsep)
      *                            1*(data-def-stmt stmtsep)
      *                         "}"
-     * TODO : 0..1 occurance to be checked in listener
      */
-    listStatement : LIST_KEYWORD identifier LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | mustStatement | keyStatement
-              | uniqueStatement | configStatement | minElementsStatement | maxElementsStatement | orderedByStatement | statusStatement
-              | descriptionStatement | referenceStatement | defaultDenyWriteStatement | defaultDenyAllStatement
-              | typedefStatement | groupingStatement| dataDefStatement)* RIGHT_CURLY_BRACE;
+    listStatement : LIST_KEYWORD identifier LEFT_CURLY_BRACE stmtSep
+            ((whenStatement | ifFeatureStatement | mustStatement | keyStatement
+            | uniqueStatement | configStatement | minElementsStatement
+            | maxElementsStatement | orderedByStatement | statusStatement
+            | descriptionStatement | referenceStatement | defaultDenyWriteStatement
+            | defaultDenyAllStatement | typedefStatement | groupingStatement|
+             dataDefStatement) stmtSep)* RIGHT_CURLY_BRACE;
 
     /**
      *  key-stmt            = key-keyword sep key-arg-str stmtend
      */
-    keyStatement : KEY_KEYWORD key STMTEND;
+    keyStatement : KEY_KEYWORD key stmtEnd;
 
     /**
      *  unique-stmt         = unique-keyword sep unique-arg-str stmtend
      */
-    uniqueStatement: UNIQUE_KEYWORD unique STMTEND;
+    uniqueStatement: UNIQUE_KEYWORD unique stmtEnd;
 
     /**
      *  choice-stmt         = choice-keyword sep identifier-arg-str optsep
@@ -913,12 +932,16 @@
      *                             [description-stmt stmtsep]
      *                             [reference-stmt stmtsep]
      *                             *((short-case-stmt / case-stmt) stmtsep)
+     *                             [default-deny-write-stmt stmtsep]
+     *                             [default-deny-all-stmt stmtsep]
      *                         "}")
-     * TODO : 0..1 occurance to be checked in listener
      */
-    choiceStatement : CHOICE_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | defaultStatement
-                  | configStatement | mandatoryStatement | statusStatement | descriptionStatement | referenceStatement | shortCaseStatement
-                  | caseStatement)* RIGHT_CURLY_BRACE);
+    choiceStatement : CHOICE_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE
+            stmtSep ((whenStatement | ifFeatureStatement | defaultStatement
+            | configStatement | mandatoryStatement | statusStatement
+            | descriptionStatement | referenceStatement | shortCaseStatement
+            | caseStatement | defaultDenyAllStatement
+            | defaultDenyWriteStatement) stmtSep)* RIGHT_CURLY_BRACE);
 
     /**
      *  short-case-stmt     = container-stmt /
@@ -927,7 +950,8 @@
      *                        list-stmt /
      *                        anyxml-stmt
      */
-    shortCaseStatement : containerStatement | leafStatement | leafListStatement | listStatement | anyxmlStatement;
+    shortCaseStatement : containerStatement | leafStatement | leafListStatement
+            | listStatement | anyxmlStatement;
 
     /**
      *  case-stmt           = case-keyword sep identifier-arg-str optsep
@@ -941,10 +965,11 @@
      *                             [reference-stmt stmtsep]
      *                             *(data-def-stmt stmtsep)
      *                         "}")
-     * TODO : 0..1 occurance to be checked in listener
      */
-    caseStatement : CASE_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | statusStatement
-              | descriptionStatement | referenceStatement | dataDefStatement)* RIGHT_CURLY_BRACE);
+    caseStatement : CASE_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE stmtSep
+            ((whenStatement | ifFeatureStatement | statusStatement
+            | descriptionStatement | referenceStatement | dataDefStatement)
+            stmtSep)* RIGHT_CURLY_BRACE);
 
     /**
      *    anyxml-stmt         = anyxml-keyword sep identifier-arg-str optsep
@@ -959,11 +984,16 @@
      *                             [status-stmt stmtsep]
      *                             [description-stmt stmtsep]
      *                             [reference-stmt stmtsep]
+     *                             [default-deny-write-stmt stmtsep]
+     *                             [default-deny-all-stmt stmtsep]
      *                          "}")
      */
-     anyxmlStatement : ANYXML_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement
-                     | mustStatement | configStatement | mandatoryStatement | statusStatement | descriptionStatement
-                     | referenceStatement)* RIGHT_CURLY_BRACE);
+     anyxmlStatement : ANYXML_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE
+             stmtSep ((whenStatement | ifFeatureStatement | mustStatement
+             | configStatement | mandatoryStatement | statusStatement
+             | descriptionStatement | referenceStatement
+             | defaultDenyWriteStatement | defaultDenyAllStatement) stmtSep)*
+             RIGHT_CURLY_BRACE);
 
     /**
      *  uses-stmt           = uses-keyword sep identifier-ref-arg-str optsep
@@ -977,11 +1007,15 @@
      *                             [reference-stmt stmtsep]
      *                             *(refine-stmt stmtsep)
      *                             *(uses-augment-stmt stmtsep)
+     *                             [default-deny-write-stmt stmtsep]
+     *                             [default-deny-all-stmt stmtsep]
      *                         "}")
-     * TODO : 0..1 occurance to be checked in listener
      */
-    usesStatement : USES_KEYWORD string (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | statusStatement
-                | descriptionStatement | referenceStatement | refineStatement | augmentStatement)* RIGHT_CURLY_BRACE);
+    usesStatement : USES_KEYWORD string (STMTEND | LEFT_CURLY_BRACE
+            stmtSep ((whenStatement | ifFeatureStatement | statusStatement
+            | descriptionStatement | referenceStatement | refineStatement
+            | augmentStatement | defaultDenyAllStatement
+            | defaultDenyWriteStatement) stmtSep)* RIGHT_CURLY_BRACE);
 
     /**
      *  refine-stmt         = refine-keyword sep refine-arg-str optsep
@@ -996,9 +1030,11 @@
      *                              refine-anyxml-stmts)
      *                         "}")
      */
-    refineStatement : REFINE_KEYWORD refine (STMTEND  | LEFT_CURLY_BRACE (refineContainerStatements
-                    | refineLeafStatements | refineLeafListStatements | refineListStatements | refineChoiceStatements
-                    | refineCaseStatements | refineAnyxmlStatements) RIGHT_CURLY_BRACE);
+    refineStatement : REFINE_KEYWORD refine (STMTEND  | LEFT_CURLY_BRACE
+            stmtSep (refineContainerStatements | refineLeafStatements
+            | refineLeafListStatements | refineListStatements
+            | refineChoiceStatements | refineCaseStatements
+            | refineAnyxmlStatements) RIGHT_CURLY_BRACE);
 
     /**
      *  refine-container-stmts =
@@ -1010,7 +1046,9 @@
      *                         [reference-stmt stmtsep]
      * TODO : 0..1 occurance to be checked in listener
      */
-    refineContainerStatements : (mustStatement | presenceStatement | configStatement | descriptionStatement | referenceStatement)* ;
+    refineContainerStatements : ((mustStatement | presenceStatement
+            | configStatement | descriptionStatement stmtSep
+            | referenceStatement) stmtSep)* ;
 
     /**
      *   refine-leaf-stmts   = ;; these stmts can appear in any order
@@ -1022,7 +1060,9 @@
      *                        [reference-stmt stmtsep]
      * TODO : 0..1 occurance to be checked in listener
      */
-    refineLeafStatements : (mustStatement | defaultStatement | configStatement | mandatoryStatement | descriptionStatement | referenceStatement)*;
+    refineLeafStatements : ((mustStatement | defaultStatement
+            | configStatement | mandatoryStatement | descriptionStatement
+            | referenceStatement) stmtSep)*;
 
     /**
      *  refine-leaf-list-stmts =
@@ -1035,8 +1075,9 @@
      *                        [reference-stmt stmtsep]
      * TODO : 0..1 occurance to be checked in listener
      */
-    refineLeafListStatements : (mustStatement | configStatement | minElementsStatement | maxElementsStatement | descriptionStatement
-                             | referenceStatement)*;
+    refineLeafListStatements : ((mustStatement | configStatement
+            | minElementsStatement | maxElementsStatement
+            | descriptionStatement | referenceStatement) stmtSep)*;
 
     /**
      *  refine-list-stmts   = ;; these stmts can appear in any order
@@ -1048,8 +1089,9 @@
      *                        [reference-stmt stmtsep]
      * TODO : 0..1 occurance to be checked in listener
      */
-    refineListStatements : (mustStatement | configStatement | minElementsStatement | maxElementsStatement | descriptionStatement
-                        | referenceStatement)*;
+    refineListStatements : ((mustStatement | configStatement
+            | minElementsStatement | maxElementsStatement
+            | descriptionStatement | referenceStatement) stmtSep)*;
 
     /**
      *  refine-choice-stmts = ;; these stmts can appear in any order
@@ -1060,7 +1102,9 @@
      *                        [reference-stmt stmtsep]
      * TODO : 0..1 occurance to be checked in listener
      */
-    refineChoiceStatements : (defaultStatement | configStatement | mandatoryStatement | descriptionStatement | referenceStatement)*;
+    refineChoiceStatements : ((defaultStatement | configStatement
+            | mandatoryStatement | descriptionStatement
+            | referenceStatement) stmtSep)*;
 
     /**
      *  refine-case-stmts   = ;; these stmts can appear in any order
@@ -1068,7 +1112,9 @@
      *                        [reference-stmt stmtsep]
      *
      */
-    refineCaseStatements : (descriptionStatement | referenceStatement)? | (referenceStatement | descriptionStatement)?;
+    refineCaseStatements : ((descriptionStatement stmtSep)
+            | (referenceStatement stmtSep))? | ((referenceStatement stmtSep)
+            | (descriptionStatement stmtSep))?;
 
     /**
      *  refine-anyxml-stmts = ;; these stmts can appear in any order
@@ -1078,8 +1124,9 @@
      *                        [description-stmt stmtsep]
      *                        [reference-stmt stmtsep]
      */
-     refineAnyxmlStatements : (mustStatement | configStatement | mandatoryStatement | descriptionStatement
-                            | referenceStatement)*;
+    refineAnyxmlStatements : ((mustStatement | configStatement
+            | mandatoryStatement | descriptionStatement
+            | referenceStatement) stmtSep)*;
 
     /**
      *  augment-stmt        = augment-keyword sep augment-arg-str optsep
@@ -1093,10 +1140,11 @@
      *                            1*((data-def-stmt stmtsep) /
      *                               (case-stmt stmtsep))
      *                         "}"
-     * TODO : 0..1 occurance to be checked in listener
      */
-    augmentStatement : AUGMENT_KEYWORD augment LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | statusStatement
-                   | descriptionStatement | referenceStatement | dataDefStatement  | caseStatement)* RIGHT_CURLY_BRACE;
+    augmentStatement : AUGMENT_KEYWORD augment LEFT_CURLY_BRACE stmtSep
+            ((whenStatement | ifFeatureStatement | statusStatement
+            | descriptionStatement | referenceStatement
+            | dataDefStatement  | caseStatement) stmtSep)* RIGHT_CURLY_BRACE;
 
     /**
      *  when-stmt           = when-keyword sep string optsep
@@ -1108,8 +1156,10 @@
      *                          "}")
      *
      */
-    whenStatement : WHEN_KEYWORD string (STMTEND | LEFT_CURLY_BRACE ((descriptionStatement? referenceStatement?)
-                       | (referenceStatement? descriptionStatement?)) RIGHT_CURLY_BRACE);
+    whenStatement : WHEN_KEYWORD string (STMTEND | LEFT_CURLY_BRACE stmtSep
+            ((descriptionStatement stmtSep)? (referenceStatement stmtSep)?
+            | (referenceStatement stmtSep)? (descriptionStatement stmtSep)?)
+            RIGHT_CURLY_BRACE);
 
     /**
      *  rpc-stmt            = rpc-keyword sep identifier-arg-str optsep
@@ -1127,9 +1177,11 @@
      *                             [default-deny-all-stmt stmtsep]
      *                         "}")
      */
-    rpcStatement : RPC_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE (ifFeatureStatement | statusStatement | descriptionStatement
-                | referenceStatement | typedefStatement | groupingStatement | inputStatement | outputStatement
-                | defaultDenyAllStatement)* RIGHT_CURLY_BRACE);
+    rpcStatement : RPC_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE stmtSep
+            ((ifFeatureStatement | statusStatement | descriptionStatement
+            | referenceStatement | typedefStatement | groupingStatement
+            | inputStatement | outputStatement | defaultDenyAllStatement)
+            stmtSep)* RIGHT_CURLY_BRACE);
 
     /**
      * input-stmt          = input-keyword optsep
@@ -1140,7 +1192,8 @@
      *                           1*(data-def-stmt stmtsep)
      *                         "}"
      */
-    inputStatement : INPUT_KEYWORD LEFT_CURLY_BRACE (typedefStatement | groupingStatement | dataDefStatement)* RIGHT_CURLY_BRACE;
+    inputStatement : INPUT_KEYWORD LEFT_CURLY_BRACE stmtSep ((typedefStatement
+            | groupingStatement | dataDefStatement) stmtSep)* RIGHT_CURLY_BRACE;
 
     /**
      *  output-stmt         = output-keyword optsep
@@ -1151,7 +1204,8 @@
      *                            1*(data-def-stmt stmtsep)
      *                        "}"
      */
-    outputStatement : OUTPUT_KEYWORD LEFT_CURLY_BRACE (typedefStatement | groupingStatement | dataDefStatement)* RIGHT_CURLY_BRACE;
+    outputStatement : OUTPUT_KEYWORD LEFT_CURLY_BRACE stmtSep ((typedefStatement
+            | groupingStatement | dataDefStatement) stmtSep)* RIGHT_CURLY_BRACE;
 
     /**
      *  notification-stmt   = notification-keyword sep
@@ -1168,12 +1222,12 @@
      *                                grouping-stmt) stmtsep)
      *                             *(data-def-stmt stmtsep)
      *                         "}")
-     * TODO : 0..1 occurance to be checked in listener
      */
-     notificationStatement : NOTIFICATION_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE (ifFeatureStatement
-                           | statusStatement | descriptionStatement | referenceStatement
-                           | typedefStatement | defaultDenyAllStatement
-                           | groupingStatement | dataDefStatement)* RIGHT_CURLY_BRACE);
+    notificationStatement : NOTIFICATION_KEYWORD identifier (STMTEND | stmtSep
+            LEFT_CURLY_BRACE ((ifFeatureStatement | statusStatement
+            | descriptionStatement | referenceStatement | typedefStatement
+            | defaultDenyAllStatement | groupingStatement | dataDefStatement)
+            stmtSep)* RIGHT_CURLY_BRACE);
 
     /**
      *  deviation-stmt      = deviation-keyword sep
@@ -1187,11 +1241,11 @@
      *                                 deviate-replace-stmt /
      *                                 deviate-delete-stmt))
      *                        "}"
-     * TODO : 0..1 occurance to be checked in listener
      */
-    deviationStatement: DEVIATION_KEYWORD deviation LEFT_CURLY_BRACE (descriptionStatement | referenceStatement
-                      | deviateNotSupportedStatement | deviateAddStatement | deviateReplaceStatement
-                      | deviateDeleteStatement)* RIGHT_CURLY_BRACE;
+    deviationStatement: DEVIATION_KEYWORD deviation LEFT_CURLY_BRACE stmtSep
+            ((descriptionStatement stmtSep) | (referenceStatement stmtSep)
+            | deviateNotSupportedStatement | deviateAddStatement | deviateReplaceStatement
+            | deviateDeleteStatement)* RIGHT_CURLY_BRACE;
 
     /**
      * deviate-not-supported-stmt =
@@ -1201,7 +1255,8 @@
      *                        "{" stmtsep
      *                        "}")
      */
-    deviateNotSupportedStatement: DEVIATE_KEYWORD NOT_SUPPORTED_KEYWORD (STMTEND | LEFT_CURLY_BRACE RIGHT_CURLY_BRACE);
+    deviateNotSupportedStatement: DEVIATE_KEYWORD NOT_SUPPORTED_KEYWORD (STMTEND
+            | LEFT_CURLY_BRACE stmtSep RIGHT_CURLY_BRACE);
 
     /**
      *  deviate-add-stmt    = deviate-keyword sep add-keyword optsep
@@ -1218,11 +1273,10 @@
      *                         "}")
      */
     deviateAddStatement: DEVIATE_KEYWORD ADD_KEYWORD (STMTEND
-                       | LEFT_CURLY_BRACE (unitsStatement | mustStatement
-                         | uniqueStatement| defaultStatement| configStatement
-                         | mandatoryStatement | minElementsStatement
-                         | maxElementsStatement)*
-                       RIGHT_CURLY_BRACE);
+            | LEFT_CURLY_BRACE stmtSep ((unitsStatement | mustStatement
+            | uniqueStatement | defaultStatement | configStatement
+            | mandatoryStatement | minElementsStatement | maxElementsStatement)
+            stmtSep)* RIGHT_CURLY_BRACE);
 
     /**
      *  deviate-delete-stmt = deviate-keyword sep delete-keyword optsep
@@ -1235,8 +1289,8 @@
      *                           "}")
      */
     deviateDeleteStatement: DEVIATE_KEYWORD DELETE_KEYWORD (STMTEND
-                       | LEFT_CURLY_BRACE (unitsStatement | mustStatement |
-                       uniqueStatement | defaultStatement)* RIGHT_CURLY_BRACE);
+            | LEFT_CURLY_BRACE stmtSep ((unitsStatement | mustStatement
+            | uniqueStatement | defaultStatement) stmtSep)* RIGHT_CURLY_BRACE);
 
     /**
      *   deviate-replace-stmt = deviate-keyword sep replace-keyword optsep
@@ -1252,10 +1306,10 @@
      *                          "}")
      */
     deviateReplaceStatement: DEVIATE_KEYWORD REPLACE_KEYWORD (STMTEND
-                           | LEFT_CURLY_BRACE (typeStatement | unitsStatement
-                             | defaultStatement | configStatement
-                             | mandatoryStatement | minElementsStatement
-                             | maxElementsStatement)* RIGHT_CURLY_BRACE);
+            | LEFT_CURLY_BRACE stmtSep ((typeStatement | unitsStatement
+            | defaultStatement | configStatement | mandatoryStatement
+            | minElementsStatement | maxElementsStatement) stmtSep)*
+            RIGHT_CURLY_BRACE);
 
     /**
      *   compiler-annotation-stmt = prefix:compiler-annotation-keyword string
@@ -1265,9 +1319,10 @@
      *                          "}"
      */
     compilerAnnotationStatement : COMPILER_ANNOTATION string LEFT_CURLY_BRACE
-                                       compilerAnnotationBodyStatement RIGHT_CURLY_BRACE;
+            compilerAnnotationBodyStatement RIGHT_CURLY_BRACE;
 
-    compilerAnnotationBodyStatement : appDataStructureStatement? appExtendedStatement? ;
+    compilerAnnotationBodyStatement : (appDataStructureStatement stmtSep)?
+            (appExtendedStatement stmtSep)?;
 
     /**
      *   app-data-structure-stmt = prefix:app-data-structure-keyword string
@@ -1276,8 +1331,9 @@
      *                              [data-structure-key-stmt stmtsep]
      *                          "}")
      */
-    appDataStructureStatement : APP_DATA_STRUCTURE appDataStructure (STMTEND | (LEFT_CURLY_BRACE
-                  dataStructureKeyStatement? RIGHT_CURLY_BRACE));
+    appDataStructureStatement : APP_DATA_STRUCTURE appDataStructure (STMTEND
+            | (LEFT_CURLY_BRACE (dataStructureKeyStatement stmtSep)?
+            RIGHT_CURLY_BRACE));
 
     /**
      *   data-structure-key-stmt = prefix:key-keyword string ";"
@@ -1301,11 +1357,39 @@
      */
     defaultDenyAllStatement : DEFAULT_DENY_ALL STMTEND;
 
+    /**
+     * unknown-statement   = prefix ":" identifier [sep string] optsep
+     *                        (";" / "{" *unknown-statement2 "}")
+     */
+    unknownStatement : unknown string? (STMTEND
+                     | LEFT_CURLY_BRACE unknownStatement2* RIGHT_CURLY_BRACE);
+
+    /**
+     *   unknown-statement2   = [prefix ":"] identifier [sep string] optsep
+     *                          (";" / "{" *unknown-statement2 "}")
+     */
+    unknownStatement2 : unknown2 string? (STMTEND
+                      | LEFT_CURLY_BRACE unknownStatement2* RIGHT_CURLY_BRACE);
+
+    /**
+     *  stmtend             = ";" / "{" *unknown-statement "}"
+     */
+    stmtEnd : STMTEND | LEFT_CURLY_BRACE unknownStatement* RIGHT_CURLY_BRACE;
+
+    stmtSep : unknownStatement*;
+
     string : STRING (PLUS STRING)*
            | IDENTIFIER
            | INTEGER
+           | UNKNOWN_STATEMENT
+           | UNKNOWN_STATEMENT2
            | yangConstruct;
 
+    unknown : UNKNOWN_STATEMENT;
+
+    unknown2 : UNKNOWN_STATEMENT
+             | IDENTIFIER;
+
     identifier : STRING (PLUS STRING)*
                | IDENTIFIER
                | yangConstruct;
diff --git a/compiler/base/parser/src/main/resources/YangLexer.g4 b/compiler/base/parser/src/main/resources/YangLexer.g4
index cd942a0..792a2cb 100644
--- a/compiler/base/parser/src/main/resources/YangLexer.g4
+++ b/compiler/base/parser/src/main/resources/YangLexer.g4
@@ -142,6 +142,8 @@
     PLUS : '+';
     MINUS: '-';
 
+    UNKNOWN_STATEMENT : IDENTIFIER COLON IDENTIFIER;
+
     STRING : ((~( '\r' | '\n' | '\t' | ' ' | ';' | '{' | '"' | '+' | '\'')~( '\r' | '\n' | '\t' | ' ' | ';' | '{' | '+')* ) | SUB_STRING );
 
     //Fragment rules
diff --git a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/BelongstoListenerTest.java b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/BelongstoListenerTest.java
index c9336ce..1fd532b 100644
--- a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/BelongstoListenerTest.java
+++ b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/BelongstoListenerTest.java
@@ -46,7 +46,7 @@
     @Test
     public void processBelongsToWithoutPrefix() throws IOException, ParserException {
         thrown.expect(ParserException.class);
-        thrown.expectMessage("mismatched input '}' expecting 'prefix'");
+        thrown.expectMessage("mismatched input '}' expecting {'prefix', UNKNOWN_STATEMENT}");
         thrown.expect(CustomExceptionMatcher.errorLocation(4, 0));
         YangNode node = manager.getDataModel("src/test/resources/BelongsToWithoutPrefix.yang");
     }
@@ -57,7 +57,7 @@
     @Test
     public void processBelongsToDualPrefix() throws IOException, ParserException {
         thrown.expect(ParserException.class);
-        thrown.expectMessage("mismatched input 'prefix' expecting '}'");
+        thrown.expectMessage("mismatched input 'prefix' expecting {'}', UNKNOWN_STATEMENT}");
         thrown.expect(CustomExceptionMatcher.errorLocation(5, 0));
         YangNode node = manager.getDataModel("src/test/resources/BelongsToDualPrefix.yang");
     }
@@ -79,7 +79,7 @@
     @Test
     public void processSubModuleWithoutBelongsTo() throws IOException, ParserException {
         thrown.expect(ParserException.class);
-        thrown.expectMessage("mismatched input '}' expecting 'belongs-to'");
+        thrown.expectMessage("mismatched input '}' expecting {'belongs-to', UNKNOWN_STATEMENT");
         thrown.expect(CustomExceptionMatcher.errorLocation(3, 0));
         YangNode node = manager.getDataModel("src/test/resources/SubModuleWithoutBelongsTo.yang");
     }
diff --git a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/ContainerListenerTest.java b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/ContainerListenerTest.java
index 5e892db..d4fea9b 100644
--- a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/ContainerListenerTest.java
+++ b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/ContainerListenerTest.java
@@ -230,4 +230,19 @@
         thrown.expectMessage("YANG file error : container name 1valid is not valid.");
         YangNode node = manager.getDataModel("src/test/resources/ContainerInvalidIdentifier.yang");
     }
+
+    /**
+     * Checks container statement with unknown statement.
+     */
+    @Test
+    public void processContainerWithUnknownStatements() throws IOException,
+            ParserException {
+
+        YangNode node = manager.getDataModel("src/test/resources/" +
+                                                     "UnknownStatement.yang");
+        assertThat((node instanceof YangModule), is(true));
+        assertThat(node.getNodeType(), is(YangNodeType.MODULE_NODE));
+        YangModule yangNode = (YangModule) node;
+        assertThat(yangNode.getName(), is("TestUnknown"));
+    }
 }
diff --git a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/DescriptionListenerTest.java b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/DescriptionListenerTest.java
index 43b73d4..9cdd37f 100644
--- a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/DescriptionListenerTest.java
+++ b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/DescriptionListenerTest.java
@@ -79,7 +79,7 @@
     @Test
     public void processDescriptionWithoutStatementEnd() throws IOException, ParserException {
         thrown.expect(ParserException.class);
-        thrown.expectMessage("extraneous input '}' expecting {';', '+'}");
+        thrown.expectMessage("extraneous input '}' expecting {'{', ';', '+'}");
         YangNode node = manager.getDataModel("src/test/resources/DescriptionWithoutStatementEnd.yang");
     }
 
diff --git a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/KeyListenerTest.java b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/KeyListenerTest.java
index 271b5fb..a37c767 100644
--- a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/KeyListenerTest.java
+++ b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/KeyListenerTest.java
@@ -101,7 +101,7 @@
     @Test
     public void processKeyWithoutStatementEnd() throws IOException, ParserException {
         thrown.expect(ParserException.class);
-        thrown.expectMessage("mismatched input 'leaf' expecting {';', '+'}");
+        thrown.expectMessage("mismatched input 'leaf' expecting {'{', ';', '+'");
         YangNode node = manager.getDataModel("src/test/resources/KeyWithoutStatementEnd.yang");
     }
 
diff --git a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/MandatoryListenerTest.java b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/MandatoryListenerTest.java
index 31f0995..7d6b8b2 100644
--- a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/MandatoryListenerTest.java
+++ b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/MandatoryListenerTest.java
@@ -137,7 +137,7 @@
     @Test
     public void processMandatoryWithoutStatementEnd() throws IOException, ParserException {
         thrown.expect(ParserException.class);
-        thrown.expectMessage("missing ';' at '}'");
+        thrown.expectMessage("no viable alternative at input '}'");
         YangNode node = manager.getDataModel("src/test/resources/MandatoryWithoutStatementEnd.yang");
     }
 }
diff --git a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/MaxElementsListenerTest.java b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/MaxElementsListenerTest.java
index 7691acb..d870d23 100644
--- a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/MaxElementsListenerTest.java
+++ b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/MaxElementsListenerTest.java
@@ -98,7 +98,7 @@
     @Test
     public void processMaxElementsWithoutStatementEnd() throws IOException, ParserException {
         thrown.expect(ParserException.class);
-        thrown.expectMessage("missing ';' at 'description'");
+        thrown.expectMessage("no viable alternative at input 'description'");
         YangNode node = manager.getDataModel("src/test/resources/MaxElementsWithoutStatementEnd.yang");
     }
 
diff --git a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/MinElementsListenerTest.java b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/MinElementsListenerTest.java
index e43c4e0..cd444c2 100644
--- a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/MinElementsListenerTest.java
+++ b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/MinElementsListenerTest.java
@@ -120,7 +120,7 @@
     @Test
     public void processMinElementsWithoutStatementEnd() throws IOException, ParserException {
         thrown.expect(ParserException.class);
-        thrown.expectMessage("missing ';' at 'description'");
+        thrown.expectMessage("no viable alternative at input 'description'");
         YangNode node = manager.getDataModel("src/test/resources/MinElementsWithoutStatementEnd.yang");
     }
 
diff --git a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/PresenceListenerTest.java b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/PresenceListenerTest.java
index 1a1da94..30578a3 100644
--- a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/PresenceListenerTest.java
+++ b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/PresenceListenerTest.java
@@ -94,7 +94,7 @@
     @Test
     public void processPresenceWithoutStatementEnd() throws IOException, ParserException {
         thrown.expect(ParserException.class);
-        thrown.expectMessage("mismatched input 'leaf' expecting {';', '+'}");
+        thrown.expectMessage("mismatched input 'leaf' expecting {'{', ';', '+'}");
         YangNode node = manager.getDataModel("src/test/resources/PresenceWithoutStatementEnd.yang");
     }
 }
\ No newline at end of file
diff --git a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/ReferenceListenerTest.java b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/ReferenceListenerTest.java
index f55bf42..ad2f818 100644
--- a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/ReferenceListenerTest.java
+++ b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/ReferenceListenerTest.java
@@ -79,7 +79,7 @@
     @Test
     public void processReferenceWithoutStatementEnd() throws IOException, ParserException {
         thrown.expect(ParserException.class);
-        thrown.expectMessage("mismatched input '}' expecting {';', '+'}");
+        thrown.expectMessage("mismatched input '}' expecting {'{', ';', '+'}");
         YangNode node = manager.getDataModel("src/test/resources/ReferenceWithoutStatementEnd.yang");
     }
 
diff --git a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/StatusListenerTest.java b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/StatusListenerTest.java
index 57a0b2c..979495c 100644
--- a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/StatusListenerTest.java
+++ b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/StatusListenerTest.java
@@ -131,7 +131,7 @@
     @Test
     public void processStatusWithoutStatementEnd() throws IOException, ParserException {
         thrown.expect(ParserException.class);
-        thrown.expectMessage("missing ';' at '}'");
+        thrown.expectMessage("no viable alternative at input '}'");
         YangNode node = manager.getDataModel("src/test/resources/StatusWithoutStatementEnd.yang");
     }
 
diff --git a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/UnitsListenerTest.java b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/UnitsListenerTest.java
index 41e6660..f226475 100644
--- a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/UnitsListenerTest.java
+++ b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/UnitsListenerTest.java
@@ -78,7 +78,7 @@
     @Test
     public void processUnitsWithoutStatementEnd() throws IOException, ParserException {
         thrown.expect(ParserException.class);
-        thrown.expectMessage("mismatched input '}' expecting {';', '+'}");
+        thrown.expectMessage("mismatched input '}' expecting {'{', ';', '+'}");
         YangNode node = manager.getDataModel("src/test/resources/UnitsWithoutStatementEnd.yang");
     }
 
diff --git a/compiler/base/parser/src/test/resources/UnknownStatement.yang b/compiler/base/parser/src/test/resources/UnknownStatement.yang
new file mode 100644
index 0000000..801b9ec
--- /dev/null
+++ b/compiler/base/parser/src/test/resources/UnknownStatement.yang
@@ -0,0 +1,24 @@
+module TestUnknown {
+    yang-version 1;
+    namespace http://huawei.com/unknown;
+    prefix Ant  {
+        abc:statistics {
+            xyz:stats;
+        }
+    }
+    container nacm {
+        abc:statistics;
+        leaf enable-nacm {
+            abc:statistics;
+            type boolean;
+        }
+    }
+    list nacm1 {
+        abc:statistics;
+        config false;
+        leaf read-default {
+          type boolean;
+          description RFC:6020:;
+        }
+    }
+}
\ No newline at end of file