diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangEnum.java b/src/main/java/org/onosproject/yangutils/datamodel/YangEnum.java
index 59da354..76ab0f3 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangEnum.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangEnum.java
@@ -20,6 +20,8 @@
 import org.onosproject.yangutils.parser.Parsable;
 import org.onosproject.yangutils.parser.ParsableDataType;
 
+import java.util.Objects;
+
 /*-
  * The "ENUM" statement, which is a sub-statement to the "type"
  *  statement, MUST be present if the type is "enumeration".  It is
@@ -188,6 +190,23 @@
         return ParsableDataType.ENUM_DATA;
     }
 
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj instanceof YangEnum) {
+            final YangEnum other = (YangEnum) obj;
+            return Objects.equals(this.namedValue, other.namedValue);
+        }
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(this.namedValue);
+    }
+
     /**
      * Validate the data on entering the corresponding parse tree node.
      *
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangEnumeration.java b/src/main/java/org/onosproject/yangutils/datamodel/YangEnumeration.java
index 7aae900..ec5374e 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangEnumeration.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangEnumeration.java
@@ -16,13 +16,12 @@
 
 package org.onosproject.yangutils.datamodel;
 
-import java.util.HashSet;
-import java.util.Set;
-
 import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
 import org.onosproject.yangutils.parser.Parsable;
 import org.onosproject.yangutils.parser.ParsableDataType;
-import org.onosproject.yangutils.translator.CachedFileHandle;
+
+import java.util.HashSet;
+import java.util.Set;
 
 /*
  * The enumeration built-in type represents values from a set of
@@ -32,20 +31,19 @@
 /**
  * Maintains the enumeration data type information.
  */
-public class YangEnumeration extends YangNode implements Parsable {
+public class YangEnumeration implements Parsable {
 
-    /**
-     * Enumeration info set.
-     */
+    // Enumeration info set.
     private Set<YangEnum> enumSet;
 
+    // Enumeration name.
+    private String enumerationName;
+
     /**
-     * Create an enumeration object.
+     * Creates an enumeration object.
      */
     public YangEnumeration() {
-        super(YangNodeType.ENUMERATION_NODE);
         setEnumSet(new HashSet<YangEnum>());
-
     }
 
     /**
@@ -67,12 +65,33 @@
     }
 
     /**
-     * Add ENUM value.
+     * Add ENUM information.
      *
-     * @param enumInfo the ENUM value of string
+     * @param enumInfo the ENUM information to be added.
+     * @throws DataModelException due to violation in data model rules.
      */
-    public void addEnumInfo(YangEnum enumInfo) {
+    public void addEnumInfo(YangEnum enumInfo) throws DataModelException {
+        if (!getEnumSet().add(enumInfo)) {
+            throw new DataModelException("YANG ENUM already exists");
+        }
+    }
 
+    /**
+     * Return enumeration name.
+     *
+     * @return the enumeration name
+     */
+    public String getEnumerationName() {
+        return enumerationName;
+    }
+
+    /**
+     * Set the enumeration name.
+     *
+     * @param enumerationName enumeration name
+     */
+    public void setEnumerationName(String enumerationName) {
+        this.enumerationName = enumerationName;
     }
 
     /**
@@ -104,70 +123,4 @@
     public void validateDataOnExit() throws DataModelException {
         // TODO auto-generated method stub, to be implemented by parser
     }
-
-    /* (non-Javadoc)
-     * @see org.onosproject.yangutils.datamodel.YangNode#getName()
-     */
-    @Override
-    public String getName() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    /* (non-Javadoc)
-     * @see org.onosproject.yangutils.datamodel.YangNode#setName(java.lang.String)
-     */
-    @Override
-    public void setName(String name) {
-        // TODO Auto-generated method stub
-
-    }
-
-    /* (non-Javadoc)
-     * @see org.onosproject.yangutils.datamodel.YangNode#getPackage()
-     */
-    @Override
-    public String getPackage() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    /* (non-Javadoc)
-     * @see org.onosproject.yangutils.datamodel.YangNode#setPackage(java.lang.String)
-     */
-    @Override
-    public void setPackage(String pkg) {
-        // TODO Auto-generated method stub
-
-    }
-
-    /* (non-Javadoc)
-     * @see org.onosproject.yangutils.translator.CodeGenerator#generateJavaCodeEntry()
-     */
-    @Override
-    public void generateJavaCodeEntry() {
-        // TODO Auto-generated method stub
-
-    }
-
-    /* (non-Javadoc)
-     * @see org.onosproject.yangutils.translator.CodeGenerator#generateJavaCodeExit()
-     */
-    @Override
-    public void generateJavaCodeExit() {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public CachedFileHandle getFileHandle() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
-    public void setFileHandle(CachedFileHandle fileHandle) {
-        // TODO Auto-generated method stub
-
-    }
 }
diff --git a/src/main/java/org/onosproject/yangutils/parser/ParsableDataType.java b/src/main/java/org/onosproject/yangutils/parser/ParsableDataType.java
index 41d790d..0e2366b 100644
--- a/src/main/java/org/onosproject/yangutils/parser/ParsableDataType.java
+++ b/src/main/java/org/onosproject/yangutils/parser/ParsableDataType.java
@@ -215,6 +215,11 @@
     DEFAULT_DATA,
 
     /**
+     * Identifies the YANG value element parsed data.
+     */
+    VALUE_DATA,
+
+    /**
      * Identifies the YANG organization parsed data.
      */
     ORGANIZATION_DATA;
@@ -228,88 +233,90 @@
     public static String getParsableDataType(ParsableDataType parsableDataType) {
 
         switch (parsableDataType) {
-        case MODULE_DATA:
-            return "module";
-        case SUB_MODULE_DATA:
-            return "submodule";
-        case TYPEDEF_DATA:
-            return "typedef";
-        case TYPE_DATA:
-            return "type";
-        case CHOICE_DATA:
-            return "choice";
-        case CASE_DATA:
-            return "case";
-        case ENUMERATION_DATA:
-            return "enumeration";
-        case GROUPING_DATA:
-            return "grouping";
-        case USES_DATA:
-            return "uses";
-        case AUGMENT_DATA:
-            return "augment";
-        case CONTAINER_DATA:
-            return "container";
-        case LIST_DATA:
-            return "list";
-        case BELONGS_TO_DATA:
-            return "belongs-to";
-        case BIT_DATA:
-            return "bit";
-        case BITS_DATA:
-            return "bits";
-        case ENUM_DATA:
-            return "enum";
-        case IMPORT_DATA:
-            return "import";
-        case INCLUDE_DATA:
-            return "include";
-        case LEAF_DATA:
-            return "leaf";
-        case LEAF_LIST_DATA:
-            return "leaf-list";
-        case MUST_DATA:
-            return "must";
-        case REVISION_DATA:
-            return "revision";
-        case REVISION_DATE_DATA:
-            return "revision-date";
-        case NAMESPACE_DATA:
-            return "namespace";
-        case CONTACT_DATA:
-            return "contact";
-        case CONFIG_DATA:
-            return "config";
-        case DESCRIPTION_DATA:
-            return "description";
-        case KEY_DATA:
-            return "key";
-        case MANDATORY_DATA:
-            return "mandatory";
-        case MAX_ELEMENT_DATA:
-            return "max-elements";
-        case MIN_ELEMENT_DATA:
-            return "min-elements";
-        case PRESENCE_DATA:
-            return "presence";
-        case REFERENCE_DATA:
-            return "reference";
-        case STATUS_DATA:
-            return "status";
-        case UNITS_DATA:
-            return "units";
-        case VERSION_DATA:
-            return "version";
-        case YANGBASE_DATA:
-            return "yangbase";
-        case PREFIX_DATA:
-            return "prefix";
-        case ORGANIZATION_DATA:
-            return "organization";
-        case DEFAULT_DATA:
-            return "default";
-        default:
-            return "yang";
+            case MODULE_DATA:
+                return "module";
+            case SUB_MODULE_DATA:
+                return "submodule";
+            case TYPEDEF_DATA:
+                return "typedef";
+            case TYPE_DATA:
+                return "type";
+            case CHOICE_DATA:
+                return "choice";
+            case CASE_DATA:
+                return "case";
+            case ENUMERATION_DATA:
+                return "enumeration";
+            case GROUPING_DATA:
+                return "grouping";
+            case USES_DATA:
+                return "uses";
+            case AUGMENT_DATA:
+                return "augment";
+            case CONTAINER_DATA:
+                return "container";
+            case LIST_DATA:
+                return "list";
+            case BELONGS_TO_DATA:
+                return "belongs-to";
+            case BIT_DATA:
+                return "bit";
+            case BITS_DATA:
+                return "bits";
+            case ENUM_DATA:
+                return "enum";
+            case IMPORT_DATA:
+                return "import";
+            case INCLUDE_DATA:
+                return "include";
+            case LEAF_DATA:
+                return "leaf";
+            case LEAF_LIST_DATA:
+                return "leaf-list";
+            case MUST_DATA:
+                return "must";
+            case REVISION_DATA:
+                return "revision";
+            case REVISION_DATE_DATA:
+                return "revision-date";
+            case NAMESPACE_DATA:
+                return "namespace";
+            case CONTACT_DATA:
+                return "contact";
+            case CONFIG_DATA:
+                return "config";
+            case DESCRIPTION_DATA:
+                return "description";
+            case KEY_DATA:
+                return "key";
+            case MANDATORY_DATA:
+                return "mandatory";
+            case MAX_ELEMENT_DATA:
+                return "max-elements";
+            case MIN_ELEMENT_DATA:
+                return "min-elements";
+            case PRESENCE_DATA:
+                return "presence";
+            case REFERENCE_DATA:
+                return "reference";
+            case STATUS_DATA:
+                return "status";
+            case UNITS_DATA:
+                return "units";
+            case VERSION_DATA:
+                return "version";
+            case YANGBASE_DATA:
+                return "yangbase";
+            case PREFIX_DATA:
+                return "prefix";
+            case ORGANIZATION_DATA:
+                return "organization";
+            case VALUE_DATA:
+                return "value";
+            case DEFAULT_DATA:
+                return "default";
+            default:
+                return "yang";
         }
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/TreeWalkListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/TreeWalkListener.java
index c0c128b..08b1da7 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/TreeWalkListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/TreeWalkListener.java
@@ -16,8 +16,6 @@
 
 package org.onosproject.yangutils.parser.impl;
 
-import java.util.Stack;
-
 import org.antlr.v4.runtime.ParserRuleContext;
 import org.antlr.v4.runtime.tree.ErrorNode;
 import org.antlr.v4.runtime.tree.TerminalNode;
@@ -32,6 +30,8 @@
 import org.onosproject.yangutils.parser.impl.listeners.ContainerListener;
 import org.onosproject.yangutils.parser.impl.listeners.DefaultListener;
 import org.onosproject.yangutils.parser.impl.listeners.DescriptionListener;
+import org.onosproject.yangutils.parser.impl.listeners.EnumListener;
+import org.onosproject.yangutils.parser.impl.listeners.EnumerationListener;
 import org.onosproject.yangutils.parser.impl.listeners.ImportListener;
 import org.onosproject.yangutils.parser.impl.listeners.IncludeListener;
 import org.onosproject.yangutils.parser.impl.listeners.KeyListener;
@@ -54,8 +54,11 @@
 import org.onosproject.yangutils.parser.impl.listeners.TypeDefListener;
 import org.onosproject.yangutils.parser.impl.listeners.TypeListener;
 import org.onosproject.yangutils.parser.impl.listeners.UnitsListener;
+import org.onosproject.yangutils.parser.impl.listeners.ValueListener;
 import org.onosproject.yangutils.parser.impl.listeners.VersionListener;
 
+import java.util.Stack;
+
 /**
  * ANTLR generates a parse-tree listener interface that responds to events
  * triggered by the built-in tree walker. The methods in listener are just
@@ -128,62 +131,62 @@
 
     @Override
     public void enterModuleBody(GeneratedYangParser.ModuleBodyContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitModuleBody(GeneratedYangParser.ModuleBodyContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterModuleHeaderStatement(GeneratedYangParser.ModuleHeaderStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitModuleHeaderStatement(GeneratedYangParser.ModuleHeaderStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterLinkageStatements(GeneratedYangParser.LinkageStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitLinkageStatements(GeneratedYangParser.LinkageStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterMetaStatements(GeneratedYangParser.MetaStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitMetaStatements(GeneratedYangParser.MetaStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterRevisionStatements(GeneratedYangParser.RevisionStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitRevisionStatements(GeneratedYangParser.RevisionStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterBodyStatements(GeneratedYangParser.BodyStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitBodyStatements(GeneratedYangParser.BodyStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -193,7 +196,7 @@
 
     @Override
     public void exitYangVersionStatement(GeneratedYangParser.YangVersionStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -203,7 +206,7 @@
 
     @Override
     public void exitNamespaceStatement(GeneratedYangParser.NamespaceStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -213,7 +216,7 @@
 
     @Override
     public void exitPrefixStatement(GeneratedYangParser.PrefixStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -228,12 +231,12 @@
 
     @Override
     public void enterImportStatementBody(GeneratedYangParser.ImportStatementBodyContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitImportStatementBody(GeneratedYangParser.ImportStatementBodyContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -243,7 +246,7 @@
 
     @Override
     public void exitRevisionDateStatement(GeneratedYangParser.RevisionDateStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -263,7 +266,7 @@
 
     @Override
     public void exitOrganizationStatement(GeneratedYangParser.OrganizationStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -273,7 +276,7 @@
 
     @Override
     public void exitContactStatement(GeneratedYangParser.ContactStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -283,7 +286,7 @@
 
     @Override
     public void exitDescriptionStatement(GeneratedYangParser.DescriptionStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -293,7 +296,7 @@
 
     @Override
     public void exitReferenceStatement(GeneratedYangParser.ReferenceStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -308,12 +311,12 @@
 
     @Override
     public void enterRevisionStatementBody(GeneratedYangParser.RevisionStatementBodyContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitRevisionStatementBody(GeneratedYangParser.RevisionStatementBodyContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -328,22 +331,22 @@
 
     @Override
     public void enterSubmoduleBody(GeneratedYangParser.SubmoduleBodyContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitSubmoduleBody(GeneratedYangParser.SubmoduleBodyContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterSubmoduleHeaderStatement(GeneratedYangParser.SubmoduleHeaderStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitSubmoduleHeaderStatement(GeneratedYangParser.SubmoduleHeaderStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -358,132 +361,132 @@
 
     @Override
     public void enterBelongstoStatementBody(GeneratedYangParser.BelongstoStatementBodyContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitBelongstoStatementBody(GeneratedYangParser.BelongstoStatementBodyContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterExtensionStatement(GeneratedYangParser.ExtensionStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitExtensionStatement(GeneratedYangParser.ExtensionStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterExtensionBody(GeneratedYangParser.ExtensionBodyContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitExtensionBody(GeneratedYangParser.ExtensionBodyContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterArgumentStatement(GeneratedYangParser.ArgumentStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitArgumentStatement(GeneratedYangParser.ArgumentStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterArgumentBody(GeneratedYangParser.ArgumentBodyContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitArgumentBody(GeneratedYangParser.ArgumentBodyContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterYinElementStatement(GeneratedYangParser.YinElementStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitYinElementStatement(GeneratedYangParser.YinElementStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterIdentityStatement(GeneratedYangParser.IdentityStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitIdentityStatement(GeneratedYangParser.IdentityStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterIdentityBody(GeneratedYangParser.IdentityBodyContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitIdentityBody(GeneratedYangParser.IdentityBodyContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterBaseStatement(GeneratedYangParser.BaseStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitBaseStatement(GeneratedYangParser.BaseStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterFeatureStatement(GeneratedYangParser.FeatureStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitFeatureStatement(GeneratedYangParser.FeatureStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterFeatureBody(GeneratedYangParser.FeatureBodyContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitFeatureBody(GeneratedYangParser.FeatureBodyContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterDataDefStatement(GeneratedYangParser.DataDefStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitDataDefStatement(GeneratedYangParser.DataDefStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterIfFeatureStatement(GeneratedYangParser.IfFeatureStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitIfFeatureStatement(GeneratedYangParser.IfFeatureStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -493,7 +496,7 @@
 
     @Override
     public void exitUnitsStatement(GeneratedYangParser.UnitsStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -513,77 +516,77 @@
 
     @Override
     public void exitTypeStatement(GeneratedYangParser.TypeStatementContext ctx) {
-        //TODO: implement the method.
+        TypeListener.processTypeExit(this, ctx);
     }
 
     @Override
     public void enterTypeBodyStatements(GeneratedYangParser.TypeBodyStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitTypeBodyStatements(GeneratedYangParser.TypeBodyStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterNumericalRestrictions(GeneratedYangParser.NumericalRestrictionsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitNumericalRestrictions(GeneratedYangParser.NumericalRestrictionsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterRangeStatement(GeneratedYangParser.RangeStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitRangeStatement(GeneratedYangParser.RangeStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterCommonStatements(GeneratedYangParser.CommonStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitCommonStatements(GeneratedYangParser.CommonStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterStringRestrictions(GeneratedYangParser.StringRestrictionsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitStringRestrictions(GeneratedYangParser.StringRestrictionsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterLengthStatement(GeneratedYangParser.LengthStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitLengthStatement(GeneratedYangParser.LengthStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterPatternStatement(GeneratedYangParser.PatternStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitPatternStatement(GeneratedYangParser.PatternStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -593,137 +596,137 @@
 
     @Override
     public void exitDefaultStatement(GeneratedYangParser.DefaultStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterEnumSpecification(GeneratedYangParser.EnumSpecificationContext ctx) {
-        //TODO: implement the method.
+        EnumerationListener.processEnumerationEntry(this, ctx);
     }
 
     @Override
     public void exitEnumSpecification(GeneratedYangParser.EnumSpecificationContext ctx) {
-        //TODO: implement the method.
+        EnumerationListener.processEnumerationExit(this, ctx);
     }
 
     @Override
     public void enterEnumStatement(GeneratedYangParser.EnumStatementContext ctx) {
-        //TODO: implement the method.
+        EnumListener.processEnumEntry(this, ctx);
     }
 
     @Override
     public void exitEnumStatement(GeneratedYangParser.EnumStatementContext ctx) {
-        //TODO: implement the method.
+        EnumListener.processEnumExit(this, ctx);
     }
 
     @Override
     public void enterEnumStatementBody(GeneratedYangParser.EnumStatementBodyContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitEnumStatementBody(GeneratedYangParser.EnumStatementBodyContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterLeafrefSpecification(GeneratedYangParser.LeafrefSpecificationContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitLeafrefSpecification(GeneratedYangParser.LeafrefSpecificationContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterPathStatement(GeneratedYangParser.PathStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitPathStatement(GeneratedYangParser.PathStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterRequireInstanceStatement(GeneratedYangParser.RequireInstanceStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitRequireInstanceStatement(GeneratedYangParser.RequireInstanceStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterInstanceIdentifierSpecification(GeneratedYangParser.InstanceIdentifierSpecificationContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitInstanceIdentifierSpecification(GeneratedYangParser.InstanceIdentifierSpecificationContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterIdentityrefSpecification(GeneratedYangParser.IdentityrefSpecificationContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitIdentityrefSpecification(GeneratedYangParser.IdentityrefSpecificationContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterUnionSpecification(GeneratedYangParser.UnionSpecificationContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitUnionSpecification(GeneratedYangParser.UnionSpecificationContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterBitsSpecification(GeneratedYangParser.BitsSpecificationContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitBitsSpecification(GeneratedYangParser.BitsSpecificationContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterBitStatement(GeneratedYangParser.BitStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitBitStatement(GeneratedYangParser.BitStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterBitBodyStatement(GeneratedYangParser.BitBodyStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitBitBodyStatement(GeneratedYangParser.BitBodyStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterPositionStatement(GeneratedYangParser.PositionStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitPositionStatement(GeneratedYangParser.PositionStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -733,7 +736,7 @@
 
     @Override
     public void exitStatusStatement(GeneratedYangParser.StatusStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -743,7 +746,7 @@
 
     @Override
     public void exitConfigStatement(GeneratedYangParser.ConfigStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -753,7 +756,7 @@
 
     @Override
     public void exitMandatoryStatement(GeneratedYangParser.MandatoryStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -763,47 +766,47 @@
 
     @Override
     public void exitPresenceStatement(GeneratedYangParser.PresenceStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterOrderedByStatement(GeneratedYangParser.OrderedByStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitOrderedByStatement(GeneratedYangParser.OrderedByStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterMustStatement(GeneratedYangParser.MustStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitMustStatement(GeneratedYangParser.MustStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterErrorMessageStatement(GeneratedYangParser.ErrorMessageStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitErrorMessageStatement(GeneratedYangParser.ErrorMessageStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterErrorAppTagStatement(GeneratedYangParser.ErrorAppTagStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitErrorAppTagStatement(GeneratedYangParser.ErrorAppTagStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -813,7 +816,7 @@
 
     @Override
     public void exitMinElementsStatement(GeneratedYangParser.MinElementsStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -823,37 +826,37 @@
 
     @Override
     public void exitMaxElementsStatement(GeneratedYangParser.MaxElementsStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterMaxValueArgument(GeneratedYangParser.MaxValueArgumentContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitMaxValueArgument(GeneratedYangParser.MaxValueArgumentContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterValueStatement(GeneratedYangParser.ValueStatementContext ctx) {
-        //TODO: implement the method.
+        ValueListener.processValueEntry(this, ctx);
     }
 
     @Override
     public void exitValueStatement(GeneratedYangParser.ValueStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterGroupingStatement(GeneratedYangParser.GroupingStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitGroupingStatement(GeneratedYangParser.GroupingStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
@@ -903,276 +906,276 @@
 
     @Override
     public void exitKeyStatement(GeneratedYangParser.KeyStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterUniqueStatement(GeneratedYangParser.UniqueStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitUniqueStatement(GeneratedYangParser.UniqueStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterChoiceStatement(GeneratedYangParser.ChoiceStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitChoiceStatement(GeneratedYangParser.ChoiceStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterShortCaseStatement(GeneratedYangParser.ShortCaseStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitShortCaseStatement(GeneratedYangParser.ShortCaseStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterCaseStatement(GeneratedYangParser.CaseStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitCaseStatement(GeneratedYangParser.CaseStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterUsesStatement(GeneratedYangParser.UsesStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitUsesStatement(GeneratedYangParser.UsesStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterRefineStatement(GeneratedYangParser.RefineStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitRefineStatement(GeneratedYangParser.RefineStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterRefineContainerStatements(GeneratedYangParser.RefineContainerStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitRefineContainerStatements(GeneratedYangParser.RefineContainerStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterRefineLeafStatements(GeneratedYangParser.RefineLeafStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitRefineLeafStatements(GeneratedYangParser.RefineLeafStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterRefineLeafListStatements(GeneratedYangParser.RefineLeafListStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitRefineLeafListStatements(GeneratedYangParser.RefineLeafListStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterRefineListStatements(GeneratedYangParser.RefineListStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitRefineListStatements(GeneratedYangParser.RefineListStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterRefineChoiceStatements(GeneratedYangParser.RefineChoiceStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitRefineChoiceStatements(GeneratedYangParser.RefineChoiceStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterRefineCaseStatements(GeneratedYangParser.RefineCaseStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitRefineCaseStatements(GeneratedYangParser.RefineCaseStatementsContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterUsesAugmentStatement(GeneratedYangParser.UsesAugmentStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitUsesAugmentStatement(GeneratedYangParser.UsesAugmentStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterAugmentStatement(GeneratedYangParser.AugmentStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitAugmentStatement(GeneratedYangParser.AugmentStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterWhenStatement(GeneratedYangParser.WhenStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitWhenStatement(GeneratedYangParser.WhenStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterRpcStatement(GeneratedYangParser.RpcStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitRpcStatement(GeneratedYangParser.RpcStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterInputStatement(GeneratedYangParser.InputStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitInputStatement(GeneratedYangParser.InputStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterOutputStatement(GeneratedYangParser.OutputStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitOutputStatement(GeneratedYangParser.OutputStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterNotificationStatement(GeneratedYangParser.NotificationStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitNotificationStatement(GeneratedYangParser.NotificationStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterDeviationStatement(GeneratedYangParser.DeviationStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitDeviationStatement(GeneratedYangParser.DeviationStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterDeviateNotSupportedStatement(GeneratedYangParser.DeviateNotSupportedStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitDeviateNotSupportedStatement(GeneratedYangParser.DeviateNotSupportedStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterDeviateAddStatement(GeneratedYangParser.DeviateAddStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitDeviateAddStatement(GeneratedYangParser.DeviateAddStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterDeviateDeleteStatement(GeneratedYangParser.DeviateDeleteStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitDeviateDeleteStatement(GeneratedYangParser.DeviateDeleteStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterDeviateReplaceStatement(GeneratedYangParser.DeviateReplaceStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitDeviateReplaceStatement(GeneratedYangParser.DeviateReplaceStatementContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterString(GeneratedYangParser.StringContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitString(GeneratedYangParser.StringContext ctx) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void visitTerminal(TerminalNode terminalNode) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void visitErrorNode(ErrorNode errorNode) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void enterEveryRule(ParserRuleContext parserRuleContext) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
 
     @Override
     public void exitEveryRule(ParserRuleContext parserRuleContext) {
-        //TODO: implement the method.
+        // TODO: implement the method.
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/EnumListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/EnumListener.java
new file mode 100644
index 0000000..e255441
--- /dev/null
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/EnumListener.java
@@ -0,0 +1,168 @@
+/*
+ * Copyright 2014-2016 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.yangutils.parser.impl.listeners;
+
+/*
+ * Reference: RFC6020 and YANG ANTLR Grammar
+ *
+ * ABNF grammar as per RFC6020
+ *  enum-stmt           = enum-keyword sep string optsep
+ *                        (";" /
+ *                         "{" stmtsep
+ *                             ;; these stmts can appear in any order
+ *                             [value-stmt stmtsep]
+ *                             [status-stmt stmtsep]
+ *                             [description-stmt stmtsep]
+ *                             [reference-stmt stmtsep]
+ *                          "}")
+ *
+ * ANTLR grammar rule
+ * enumStatement : ENUM_KEYWORD string (STMTEND | LEFT_CURLY_BRACE 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?
+ *         ;
+ */
+
+import org.onosproject.yangutils.datamodel.YangEnum;
+import org.onosproject.yangutils.datamodel.YangEnumeration;
+import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
+import org.onosproject.yangutils.parser.Parsable;
+import static org.onosproject.yangutils.parser.ParsableDataType.ENUM_DATA;
+import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
+import org.onosproject.yangutils.parser.exceptions.ParserException;
+import org.onosproject.yangutils.parser.impl.TreeWalkListener;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructExtendedListenerErrorMessage;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.DUPLICATE_ENTRY;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+
+/**
+ * Implements listener based call back function corresponding to the "enum" rule
+ * defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
+ */
+public final class EnumListener {
+
+    /**
+     * Creates a new enum listener.
+     */
+    private EnumListener() {
+    }
+
+    /**
+     * It is called when parser enters grammar rule (enum), it perform
+     * validations and updates the data model tree.
+     *
+     * @param listener listener's object.
+     * @param ctx context object of the grammar rule.
+     */
+    public static void processEnumEntry(TreeWalkListener listener, GeneratedYangParser.EnumStatementContext ctx) {
+
+        // Check for stack to be non empty.
+        checkStackIsNotEmpty(listener, MISSING_HOLDER, ENUM_DATA, ctx.string().getText(), ENTRY);
+
+        YangEnum enumNode = new YangEnum();
+        enumNode.setNamedValue(ctx.string().getText());
+        listener.getParsedDataStack().push(enumNode);
+    }
+
+    /**
+     * It is called when parser exits from grammar rule (enum), it perform
+     * validations and update the data model tree.
+     *
+     * @param listener Listener's object.
+     * @param ctx context object of the grammar rule.
+     */
+    public static void processEnumExit(TreeWalkListener listener, GeneratedYangParser.EnumStatementContext ctx) {
+
+        // Check for stack to be non empty.
+        checkStackIsNotEmpty(listener, MISSING_HOLDER, ENUM_DATA, ctx.string().getText(), EXIT);
+
+        Parsable tmpEnumNode = listener.getParsedDataStack().peek();
+        if (tmpEnumNode instanceof YangEnum) {
+            listener.getParsedDataStack().pop();
+
+            // Check for stack to be non empty.
+            checkStackIsNotEmpty(listener, MISSING_HOLDER, ENUM_DATA, ctx.string().getText(), EXIT);
+
+            Parsable tmpNode = listener.getParsedDataStack().peek();
+            switch (tmpNode.getParsableDataType()) {
+                case ENUMERATION_DATA: {
+                    YangEnumeration yangEnumeration = (YangEnumeration) tmpNode;
+                    if ((ctx.enumStatementBody() == null) || (ctx.enumStatementBody().valueStatement() == null)) {
+                        int maxValue = 0;
+                        boolean isValuePresent = false;
+
+                        for (YangEnum curEnum : yangEnumeration.getEnumSet()) {
+                            if (maxValue <= curEnum.getValue()) {
+                                maxValue = curEnum.getValue();
+                                isValuePresent = true;
+                            }
+                        }
+                        if (isValuePresent) {
+                            maxValue++;
+                        }
+                        ((YangEnum) tmpEnumNode).setValue(maxValue);
+                    }
+                    try {
+                        yangEnumeration.addEnumInfo((YangEnum) tmpEnumNode);
+                    } catch (DataModelException e) {
+                        ParserException parserException = new ParserException(constructExtendedListenerErrorMessage(
+                                DUPLICATE_ENTRY, ENUM_DATA, ctx.string().getText(), EXIT, e.getMessage()));
+                        parserException.setLine(ctx.string().STRING(0).getSymbol().getLine());
+                        parserException.setCharPosition(ctx.string().STRING(0).getSymbol().getCharPositionInLine());
+                        throw parserException;
+                    }
+                    break;
+                }
+                default:
+                    throw new ParserException(
+                            constructListenerErrorMessage(INVALID_HOLDER, ENUM_DATA, ctx.string().getText(), EXIT));
+            }
+        } else {
+            throw new ParserException(
+                    constructListenerErrorMessage(MISSING_CURRENT_HOLDER, ENUM_DATA, ctx.string().getText(), EXIT));
+        }
+    }
+}
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/EnumerationListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/EnumerationListener.java
new file mode 100644
index 0000000..f83c49c
--- /dev/null
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/EnumerationListener.java
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2014-2016 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.yangutils.parser.impl.listeners;
+
+/*
+ * Reference: RFC6020 and YANG ANTLR Grammar
+ *
+ * ABNF grammar as per RFC6020
+ * type-body-stmts     = numerical-restrictions /
+ *                       decimal64-specification /
+ *                      string-restrictions /
+ *                       enum-specification /
+ *                       leafref-specification /
+ *                       identityref-specification /
+ *                       instance-identifier-specification /
+ *                       bits-specification /
+ *                       union-specification
+ *
+ * enum-specification  = 1*(enum-stmt stmtsep)
+ *
+ * ANTLR grammar rule
+ *
+ * typeBodyStatements : numericalRestrictions | stringRestrictions | enumSpecification
+ *                 | leafrefSpecification | identityrefSpecification | instanceIdentifierSpecification
+ *                 | bitsSpecification | unionSpecification;
+ *
+ * enumSpecification : enumStatement+;
+ */
+
+import org.onosproject.yangutils.datamodel.YangEnumeration;
+import org.onosproject.yangutils.datamodel.YangLeaf;
+import org.onosproject.yangutils.datamodel.YangLeafList;
+import org.onosproject.yangutils.datamodel.YangType;
+import org.onosproject.yangutils.parser.Parsable;
+import static org.onosproject.yangutils.parser.ParsableDataType.ENUMERATION_DATA;
+import static org.onosproject.yangutils.parser.ParsableDataType.TYPE_DATA;
+import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
+import org.onosproject.yangutils.parser.exceptions.ParserException;
+import org.onosproject.yangutils.parser.impl.TreeWalkListener;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+
+/**
+ * Implements listener based call back function corresponding to the
+ * "enumeration" rule defined in ANTLR grammar file for corresponding ABNF rule
+ * in RFC 6020.
+ */
+public final class EnumerationListener {
+
+    /**
+     * Creates a new enumeration listener.
+     */
+    private EnumerationListener() {
+    }
+
+    /**
+     * It is called when parser enters grammar rule (enumeration), it perform
+     * validations and updates the data model tree.
+     *
+     * @param listener listener's object.
+     * @param ctx context object of the grammar rule.
+     */
+    public static void processEnumerationEntry(TreeWalkListener listener,
+            GeneratedYangParser.EnumSpecificationContext ctx) {
+
+        // Check for stack to be non empty.
+        checkStackIsNotEmpty(listener, MISSING_HOLDER, ENUMERATION_DATA, "", ENTRY);
+
+        if (listener.getParsedDataStack().peek() instanceof YangType) {
+            YangEnumeration enumerationNode = new YangEnumeration();
+            Parsable typeData = listener.getParsedDataStack().pop();
+
+            // Check for stack to be non empty.
+            checkStackIsNotEmpty(listener, MISSING_HOLDER, ENUMERATION_DATA, "", ENTRY);
+
+            Parsable tmpData = listener.getParsedDataStack().peek();
+
+            switch (tmpData.getParsableDataType()) {
+                case LEAF_DATA:
+                    enumerationNode.setEnumerationName(((YangLeaf) tmpData).getLeafName());
+                    break;
+                case LEAF_LIST_DATA:
+                    enumerationNode.setEnumerationName(((YangLeafList) tmpData).getLeafName());
+                    break;
+                // TODO typedef, union, deviate.
+                default:
+                    throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, TYPE_DATA,
+                            ((YangType) typeData).getDataTypeName(), ENTRY));
+            }
+            listener.getParsedDataStack().push(typeData);
+            listener.getParsedDataStack().push(enumerationNode);
+        } else {
+            throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, ENUMERATION_DATA, "", ENTRY));
+        }
+    }
+
+    /**
+     * It is called when parser exits from grammar rule (enumeration), it
+     * perform validations and update the data model tree.
+     *
+     * @param listener Listener's object.
+     * @param ctx context object of the grammar rule.
+     */
+    public static void processEnumerationExit(TreeWalkListener listener,
+            GeneratedYangParser.EnumSpecificationContext ctx) {
+
+        // Check for stack to be non empty.
+        checkStackIsNotEmpty(listener, MISSING_HOLDER, ENUMERATION_DATA, "", EXIT);
+
+        Parsable tmpEnumerationNode = listener.getParsedDataStack().peek();
+        if (tmpEnumerationNode instanceof YangEnumeration) {
+            listener.getParsedDataStack().pop();
+
+            // Check for stack to be non empty.
+            checkStackIsNotEmpty(listener, MISSING_HOLDER, ENUMERATION_DATA, "", EXIT);
+
+            Parsable tmpNode = listener.getParsedDataStack().peek();
+            switch (tmpNode.getParsableDataType()) {
+                case TYPE_DATA: {
+                    YangType typeNode = (YangType) tmpNode;
+                    typeNode.setDataTypeExtendedInfo((YangEnumeration) tmpEnumerationNode);
+                    break;
+                }
+                default:
+                    throw new ParserException(
+                            constructListenerErrorMessage(INVALID_HOLDER, ENUMERATION_DATA, "", EXIT));
+            }
+        } else {
+            throw new ParserException(
+                    constructListenerErrorMessage(MISSING_CURRENT_HOLDER, ENUMERATION_DATA, "", EXIT));
+        }
+    }
+}
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/TypeListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/TypeListener.java
index e5ebf36..de595f5 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/TypeListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/TypeListener.java
@@ -21,18 +21,18 @@
 import org.onosproject.yangutils.datamodel.YangLeafList;
 import org.onosproject.yangutils.datamodel.YangType;
 import org.onosproject.yangutils.parser.Parsable;
+import static org.onosproject.yangutils.parser.ParsableDataType.TYPE_DATA;
 import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
 import org.onosproject.yangutils.parser.exceptions.ParserException;
 import org.onosproject.yangutils.parser.impl.TreeWalkListener;
-
-import static org.onosproject.yangutils.parser.ParsableDataType.TYPE_DATA;
 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER;
 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
 
-
 /*
  * Reference: RFC6020 and YANG ANTLR Grammar
  *
@@ -48,8 +48,8 @@
  */
 
 /**
- * Implements listener based call back function corresponding to the "type"
- * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
+ * Implements listener based call back function corresponding to the "type" rule
+ * defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
  */
 public final class TypeListener {
 
@@ -60,15 +60,14 @@
     }
 
     /**
-     * It is called when parser receives an input matching the grammar
-     * rule (type), performs validation and updates the data model
-     * tree.
+     * It is called when parser receives an input matching the grammar rule
+     * (type), performs validation and updates the data model tree.
      *
      * @param listener listener's object.
      * @param ctx context object of the grammar rule.
      */
     public static void processTypeEntry(TreeWalkListener listener,
-                                        GeneratedYangParser.TypeStatementContext ctx) {
+            GeneratedYangParser.TypeStatementContext ctx) {
 
         // Check for stack to be non empty.
         checkStackIsNotEmpty(listener, MISSING_HOLDER, TYPE_DATA, ctx.string().getText(), ENTRY);
@@ -78,21 +77,46 @@
         type.setDataTypeName(ctx.string().getText());
         type.setDataType(yangDataTypes);
 
+        listener.getParsedDataStack().push(type);
+    }
+
+    /**
+     * It is called when parser exits from grammar rule (type), it perform
+     * validations and update the data model tree.
+     *
+     * @param listener Listener's object.
+     * @param ctx context object of the grammar rule.
+     */
+    public static void processTypeExit(TreeWalkListener listener,
+            GeneratedYangParser.TypeStatementContext ctx) {
+
+        // Check for stack to be non empty.
+        checkStackIsNotEmpty(listener, MISSING_CURRENT_HOLDER, TYPE_DATA, ctx.string().getText(), EXIT);
+
+        Parsable type = listener.getParsedDataStack().pop();
+        if (!(type instanceof YangType)) {
+            throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, TYPE_DATA,
+                    ctx.string().getText(), EXIT));
+        }
+
+        // Check for stack to be non empty.
+        checkStackIsNotEmpty(listener, MISSING_HOLDER, TYPE_DATA, ctx.string().getText(), EXIT);
+
         Parsable tmpData = listener.getParsedDataStack().peek();
         switch (tmpData.getParsableDataType()) {
             case LEAF_DATA:
                 YangLeaf leaf = (YangLeaf) tmpData;
-                leaf.setDataType(type);
+                leaf.setDataType((YangType) type);
                 break;
             case LEAF_LIST_DATA:
                 YangLeafList leafList = (YangLeafList) tmpData;
-                leafList.setDataType(type);
+                leafList.setDataType((YangType) type);
                 break;
             case TYPEDEF_DATA: //TODO
                 break;
             default:
                 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, TYPE_DATA,
-                        ctx.string().getText(), ENTRY));
+                        ctx.string().getText(), EXIT));
         }
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ValueListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ValueListener.java
new file mode 100644
index 0000000..07ada45
--- /dev/null
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ValueListener.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2014-2016 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.yangutils.parser.impl.listeners;
+
+/*
+ * Reference: RFC6020 and YANG ANTLR Grammar
+ *
+ * ABNF grammar as per RFC6020
+ * value-stmt = value-keyword sep integer-value stmtend
+ *
+ * ANTLR grammar rule
+ * valueStatement : VALUE_KEYWORD ((MINUS INTEGER) | INTEGER) STMTEND;
+ */
+
+import org.onosproject.yangutils.datamodel.YangEnum;
+import org.onosproject.yangutils.datamodel.YangEnumeration;
+import org.onosproject.yangutils.parser.Parsable;
+import static org.onosproject.yangutils.parser.ParsableDataType.VALUE_DATA;
+import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
+import org.onosproject.yangutils.parser.exceptions.ParserException;
+import org.onosproject.yangutils.parser.impl.TreeWalkListener;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+
+/**
+ * Implements listener based call back function corresponding to the "value"
+ * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
+ */
+public final class ValueListener {
+
+    /**
+     * Creates a new value listener.
+     */
+    private ValueListener() {
+    }
+
+    /**
+     * It is called when parser receives an input matching the grammar rule
+     * (value), perform validations and update the data model tree.
+     *
+     * @param listener Listener's object.
+     * @param ctx context object of the grammar rule.
+     */
+    public static void processValueEntry(TreeWalkListener listener, GeneratedYangParser.ValueStatementContext ctx) {
+
+        // Check for stack to be non empty.
+        checkStackIsNotEmpty(listener, MISSING_HOLDER, VALUE_DATA, ctx.INTEGER().getText(), ENTRY);
+
+        // Obtain the node of the stack.
+        Parsable tmpNode = listener.getParsedDataStack().peek();
+        switch (tmpNode.getParsableDataType()) {
+            case ENUM_DATA: {
+                YangEnum enumNode = (YangEnum) tmpNode;
+                if (!isEnumValueValid(listener, ctx)) {
+                    ParserException parserException = new ParserException("Input version not supported");
+                    parserException.setLine(ctx.INTEGER().getSymbol().getLine());
+                    parserException.setCharPosition(ctx.INTEGER().getSymbol().getCharPositionInLine());
+                    throw parserException;
+                }
+                enumNode.setValue(Integer.valueOf(ctx.INTEGER().getText()));
+                break;
+            }
+            default:
+                throw new ParserException(
+                        constructListenerErrorMessage(INVALID_HOLDER, VALUE_DATA, ctx.INTEGER().getText(), ENTRY));
+        }
+    }
+
+    /**
+     * Validates ENUM value uniqueness.
+     *
+     * @param listener Listener's object.
+     * @param ctx context object of the grammar rule.
+     * @return validation result
+     */
+    private static boolean isEnumValueValid(TreeWalkListener listener, GeneratedYangParser.ValueStatementContext ctx) {
+        Parsable enumNode = listener.getParsedDataStack().pop();
+        Parsable tmpNode = listener.getParsedDataStack().peek();
+        switch (tmpNode.getParsableDataType()) {
+            case ENUMERATION_DATA: {
+                YangEnumeration yangEnumeration = (YangEnumeration) tmpNode;
+                for (YangEnum curEnum : yangEnumeration.getEnumSet()) {
+                    if (Integer.valueOf(ctx.INTEGER().getText()) == curEnum.getValue()) {
+                        listener.getParsedDataStack().push(enumNode);
+                        return false;
+                    }
+                }
+                listener.getParsedDataStack().push(enumNode);
+                return true;
+            }
+            default:
+                listener.getParsedDataStack().push(enumNode);
+                throw new ParserException(
+                        constructListenerErrorMessage(INVALID_HOLDER, VALUE_DATA, ctx.INTEGER().getText(), EXIT));
+        }
+    }
+}
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerErrorType.java b/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerErrorType.java
index 13925bc..e28d186 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerErrorType.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerErrorType.java
@@ -21,22 +21,26 @@
  */
 public enum ListenerErrorType {
     /**
-     * Represents the parent holder in parsable stack for given YANG construct is invalid.
+     * Represents the parent holder in parsable stack for given YANG construct
+     * is invalid.
      */
     INVALID_HOLDER(),
 
     /**
-     * Represents the parent holder in parsable stack for given YANG construct is missing.
+     * Represents the parent holder in parsable stack for given YANG construct
+     * is missing.
      */
     MISSING_HOLDER(),
 
     /**
-     * Represents the current holder in parsable stack for given YANG construct is missing.
+     * Represents the current holder in parsable stack for given YANG construct
+     * is missing.
      */
     MISSING_CURRENT_HOLDER(),
 
     /**
-     * Represents that the child in parsable stack for given YANG construct is invalid.
+     * Represents that the child in parsable stack for given YANG construct is
+     * invalid.
      */
     INVALID_CHILD(),
 
@@ -46,6 +50,11 @@
     INVALID_CARDINALITY(),
 
     /**
+     * Represents that the entry is duplicate.
+     */
+    DUPLICATE_ENTRY(),
+
+    /**
      * Represents that some of earlier parsed data is not handled correctly.
      */
     UNHANDLED_PARSED_DATA();
@@ -59,20 +68,22 @@
     public static String getErrorType(ListenerErrorType errorType) {
 
         switch (errorType) {
-        case INVALID_HOLDER:
-            return "Invalid holder for";
-        case MISSING_HOLDER:
-            return "Missing holder at";
-        case MISSING_CURRENT_HOLDER:
-            return "Missing";
-        case INVALID_CHILD:
-            return "Invalid child in";
-        case INVALID_CARDINALITY:
-            return "Invalid cardinality in";
-        case UNHANDLED_PARSED_DATA:
-            return "Unhandled parsed data at";
-        default:
-            return "Problem in";
+            case INVALID_HOLDER:
+                return "Invalid holder for";
+            case MISSING_HOLDER:
+                return "Missing holder at";
+            case MISSING_CURRENT_HOLDER:
+                return "Missing";
+            case INVALID_CHILD:
+                return "Invalid child in";
+            case INVALID_CARDINALITY:
+                return "Invalid cardinality in";
+            case DUPLICATE_ENTRY:
+                return "Duplicate";
+            case UNHANDLED_PARSED_DATA:
+                return "Unhandled parsed data at";
+            default:
+                return "Problem in";
         }
     }
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/onosproject/yangutils/parser/impl/listeners/EnumListenerTest.java b/src/test/java/org/onosproject/yangutils/parser/impl/listeners/EnumListenerTest.java
new file mode 100644
index 0000000..60de57f
--- /dev/null
+++ b/src/test/java/org/onosproject/yangutils/parser/impl/listeners/EnumListenerTest.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2014-2016 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.yangutils.parser.impl.listeners;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.Is.is;
+import org.junit.Test;
+import org.onosproject.yangutils.datamodel.YangDataTypes;
+import org.onosproject.yangutils.datamodel.YangEnum;
+import org.onosproject.yangutils.datamodel.YangEnumeration;
+import org.onosproject.yangutils.datamodel.YangLeaf;
+import org.onosproject.yangutils.datamodel.YangModule;
+import org.onosproject.yangutils.datamodel.YangNode;
+import org.onosproject.yangutils.datamodel.YangNodeType;
+import org.onosproject.yangutils.parser.exceptions.ParserException;
+import org.onosproject.yangutils.parser.impl.YangUtilsParserManager;
+
+import java.io.IOException;
+import java.util.ListIterator;
+import java.util.Set;
+
+/**
+ * Test cases for enum listener.
+ */
+public class EnumListenerTest {
+
+    private final YangUtilsParserManager manager = new YangUtilsParserManager();
+
+    /**
+     * Checks enum statement without value.
+     */
+    @Test
+    public void processEnumTypeStatement() throws IOException, ParserException {
+
+        YangNode node = manager.getDataModel("src/test/resources/EnumTypeStatement.yang");
+
+        // Check whether the data model tree returned is of type module.
+        assertThat((node instanceof YangModule), is(true));
+
+        // Check whether the node type is set properly to module.
+        assertThat(node.getNodeType(), is(YangNodeType.MODULE_NODE));
+
+        // Check whether the module name is set correctly.
+        YangModule yangNode = (YangModule) node;
+        assertThat(yangNode.getName(), is("Test"));
+
+        ListIterator<YangLeaf> leafIterator = yangNode.getListOfLeaf().listIterator();
+        YangLeaf leafInfo = leafIterator.next();
+
+        assertThat(leafInfo.getLeafName(), is("speed"));
+        assertThat(leafInfo.getDataType().getDataTypeName(), is("enumeration"));
+        assertThat(leafInfo.getDataType().getDataType(), is(YangDataTypes.ENUMERATION));
+        assertThat(((YangEnumeration) leafInfo.getDataType().getDataTypeExtendedInfo()).getEnumerationName(),
+                is("speed"));
+
+        Set<YangEnum> enumSet = ((YangEnumeration) leafInfo.getDataType().getDataTypeExtendedInfo()).getEnumSet();
+        for (YangEnum tmp : enumSet) {
+            if (tmp.getNamedValue().equals("10m")) {
+                assertThat(tmp.getValue(), is(0));
+            } else if (tmp.getNamedValue().equals("100m")) {
+                assertThat(tmp.getValue(), is(1));
+            } else if (tmp.getNamedValue().equals("auto")) {
+                assertThat(tmp.getValue(), is(2));
+            }
+        }
+    }
+}
diff --git a/src/test/java/org/onosproject/yangutils/parser/impl/listeners/ValueListenerTest.java b/src/test/java/org/onosproject/yangutils/parser/impl/listeners/ValueListenerTest.java
new file mode 100644
index 0000000..2339363
--- /dev/null
+++ b/src/test/java/org/onosproject/yangutils/parser/impl/listeners/ValueListenerTest.java
@@ -0,0 +1,138 @@
+/*
+ * Copyright 2014-2016 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.yangutils.parser.impl.listeners;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.Is.is;
+import org.junit.Test;
+import org.onosproject.yangutils.datamodel.YangDataTypes;
+import org.onosproject.yangutils.datamodel.YangEnum;
+import org.onosproject.yangutils.datamodel.YangEnumeration;
+import org.onosproject.yangutils.datamodel.YangLeaf;
+import org.onosproject.yangutils.datamodel.YangModule;
+import org.onosproject.yangutils.datamodel.YangNode;
+import org.onosproject.yangutils.datamodel.YangNodeType;
+import org.onosproject.yangutils.parser.exceptions.ParserException;
+import org.onosproject.yangutils.parser.impl.YangUtilsParserManager;
+
+import java.io.IOException;
+import java.util.ListIterator;
+import java.util.Set;
+
+/**
+ * Test cases for value listener.
+ */
+public class ValueListenerTest {
+
+    private final YangUtilsParserManager manager = new YangUtilsParserManager();
+
+    /**
+     * Checks explicitly configured value.
+     */
+    @Test
+    public void processValueStatement() throws IOException, ParserException {
+
+        YangNode node = manager.getDataModel("src/test/resources/ValueStatement.yang");
+
+        // Check whether the data model tree returned is of type module.
+        assertThat((node instanceof YangModule), is(true));
+
+        // Check whether the node type is set properly to module.
+        assertThat(node.getNodeType(), is(YangNodeType.MODULE_NODE));
+
+        // Check whether the module name is set correctly.
+        YangModule yangNode = (YangModule) node;
+        assertThat(yangNode.getName(), is("Test"));
+
+        ListIterator<YangLeaf> leafIterator = yangNode.getListOfLeaf().listIterator();
+        YangLeaf leafInfo = leafIterator.next();
+
+        assertThat(leafInfo.getLeafName(), is("speed"));
+        assertThat(leafInfo.getDataType().getDataTypeName(), is("enumeration"));
+        assertThat(leafInfo.getDataType().getDataType(), is(YangDataTypes.ENUMERATION));
+        assertThat(((YangEnumeration) leafInfo.getDataType().getDataTypeExtendedInfo()).getEnumerationName(),
+                is("speed"));
+
+        Set<YangEnum> enumSet = ((YangEnumeration) leafInfo.getDataType().getDataTypeExtendedInfo()).getEnumSet();
+        for (YangEnum tmp : enumSet) {
+            if (tmp.getNamedValue().equals("10m")) {
+                assertThat(tmp.getValue(), is(10));
+            } else if (tmp.getNamedValue().equals("100m")) {
+                assertThat(tmp.getValue(), is(100));
+            } else if (tmp.getNamedValue().equals("auto")) {
+                assertThat(tmp.getValue(), is(1000));
+            }
+        }
+    }
+
+    /**
+     * Checks explicit value and auto generated value.
+     */
+    @Test
+    public void processValueAndAutoStatement() throws IOException, ParserException {
+
+        YangNode node = manager.getDataModel("src/test/resources/ValueAndAutoStatement.yang");
+
+        // Check whether the data model tree returned is of type module.
+        assertThat((node instanceof YangModule), is(true));
+
+        // Check whether the node type is set properly to module.
+        assertThat(node.getNodeType(), is(YangNodeType.MODULE_NODE));
+
+        // Check whether the module name is set correctly.
+        YangModule yangNode = (YangModule) node;
+        assertThat(yangNode.getName(), is("Test"));
+
+        ListIterator<YangLeaf> leafIterator = yangNode.getListOfLeaf().listIterator();
+        YangLeaf leafInfo = leafIterator.next();
+
+        assertThat(leafInfo.getLeafName(), is("speed"));
+        assertThat(leafInfo.getDataType().getDataTypeName(), is("enumeration"));
+        assertThat(leafInfo.getDataType().getDataType(), is(YangDataTypes.ENUMERATION));
+        assertThat(((YangEnumeration) leafInfo.getDataType().getDataTypeExtendedInfo()).getEnumerationName(),
+                is("speed"));
+
+        Set<YangEnum> enumSet = ((YangEnumeration) leafInfo.getDataType().getDataTypeExtendedInfo()).getEnumSet();
+        for (YangEnum tmp : enumSet) {
+            if (tmp.getNamedValue().equals("10m")) {
+                assertThat(tmp.getValue(), is(10));
+            } else if (tmp.getNamedValue().equals("100m")) {
+                assertThat(tmp.getValue(), is(11));
+            } else if (tmp.getNamedValue().equals("auto")) {
+                assertThat(tmp.getValue(), is(1000));
+            }
+        }
+    }
+
+    /**
+     * Checks explicit value should not be repeated.
+     */
+    @Test(expected = ParserException.class)
+    public void processValueDuplication() throws IOException, ParserException {
+
+        YangNode node = manager.getDataModel("src/test/resources/ValueDuplication.yang");
+    }
+
+    /**
+     * Checks explicit or auto generated value should not be repeated.
+     */
+    @Test(expected = ParserException.class)
+    public void processValueExplicitAndAutoDuplication() throws IOException, ParserException {
+
+        YangNode node = manager.getDataModel("src/test/resources/ValueExplicitAndAutoDuplication.yang");
+    }
+}
diff --git a/src/test/resources/EnumTypeStatement.yang b/src/test/resources/EnumTypeStatement.yang
new file mode 100644
index 0000000..1d64805
--- /dev/null
+++ b/src/test/resources/EnumTypeStatement.yang
@@ -0,0 +1,12 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+    leaf speed {
+        type enumeration {
+          enum 10m;
+          enum 100m;
+          enum auto;
+        }
+    }
+}
diff --git a/src/test/resources/ValueAndAutoStatement.yang b/src/test/resources/ValueAndAutoStatement.yang
new file mode 100644
index 0000000..31f098e
--- /dev/null
+++ b/src/test/resources/ValueAndAutoStatement.yang
@@ -0,0 +1,16 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+    leaf speed {
+        type enumeration {
+          enum 10m {
+	     value 10;
+          }
+          enum 100m;
+          enum auto {
+	     value 1000;
+          }
+        }
+    }
+}
diff --git a/src/test/resources/ValueDuplication.yang b/src/test/resources/ValueDuplication.yang
new file mode 100644
index 0000000..339a737
--- /dev/null
+++ b/src/test/resources/ValueDuplication.yang
@@ -0,0 +1,18 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+    leaf speed {
+        type enumeration {
+          enum 10m {
+	     value 10;
+          }
+          enum 100m {
+	     value 100;
+          }
+          enum auto {
+	     value 10;
+          }
+        }
+    }
+}
diff --git a/src/test/resources/ValueExplicitAndAutoDuplication.yang b/src/test/resources/ValueExplicitAndAutoDuplication.yang
new file mode 100644
index 0000000..3e58155
--- /dev/null
+++ b/src/test/resources/ValueExplicitAndAutoDuplication.yang
@@ -0,0 +1,16 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+    leaf speed {
+        type enumeration {
+          enum 10m {
+	     value 10;
+          }
+          enum 100m;
+          enum auto {
+	     value 11;
+          }
+        }
+    }
+}
diff --git a/src/test/resources/ValueStatement.yang b/src/test/resources/ValueStatement.yang
new file mode 100644
index 0000000..f461359
--- /dev/null
+++ b/src/test/resources/ValueStatement.yang
@@ -0,0 +1,18 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+    leaf speed {
+        type enumeration {
+          enum 10m {
+	     value 10;
+          }
+          enum 100m {
+	     value 100;
+          }
+          enum auto {
+	     value 1000;
+          }
+        }
+    }
+}
