+ * The following features are supported: + *
+ *+ * The following features are supported: + *
+ *+ * The following features are supported: + *
+ *+ * The following features are supported: + *
+ *+ * The following features are supported: + *
+ *+ * The following features are supported: + *
+ *+ * The following features are supported: + *
+ *+ * The following features are supported: + *
+ *+ * The following features are supported: + *
+ *+ * The following features are implemented: + *
+ *+ * The following features are implemented: + *
+ *+ * The following features are implemented: + *
+ *+ * The following features are implemented: + *
+ *+ * The following features are implemented: + *
+ *+ * The following features are implemented: + *
+ *+ * The following features are implemented: + *
+ *Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see com.espressif.idf.componen.iDFComponentDsl.IDFComponentDslPackage#eNS_URI + * @see #init() + * @generated + */ + private IDFComponentDslPackageImpl() + { + super(eNS_URI, IDFComponentDslFactory.eINSTANCE); + } + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *
This method is used to initialize {@link IDFComponentDslPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static IDFComponentDslPackage init() + { + if (isInited) return (IDFComponentDslPackage)EPackage.Registry.INSTANCE.getEPackage(IDFComponentDslPackage.eNS_URI); + + // Obtain or create and register package + Object registeredIDFComponentDslPackage = EPackage.Registry.INSTANCE.get(eNS_URI); + IDFComponentDslPackageImpl theIDFComponentDslPackage = registeredIDFComponentDslPackage instanceof IDFComponentDslPackageImpl ? (IDFComponentDslPackageImpl)registeredIDFComponentDslPackage : new IDFComponentDslPackageImpl(); + + isInited = true; + + // Create package meta-data objects + theIDFComponentDslPackage.createPackageContents(); + + // Initialize created meta-data + theIDFComponentDslPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theIDFComponentDslPackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(IDFComponentDslPackage.eNS_URI, theIDFComponentDslPackage); + return theIDFComponentDslPackage; + } + + /** + * + * + * @generated + */ + @Override + public EClass getComponentModel() + { + return componentModelEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getComponentModel_Elements() + { + return (EReference)componentModelEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getType() + { + return typeEClass; + } + + /** + * + * + * @generated + */ + @Override + public EClass getDescription() + { + return descriptionEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getDescription_Name() + { + return (EAttribute)descriptionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getVersionInfo() + { + return versionInfoEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getVersionInfo_Name() + { + return (EAttribute)versionInfoEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getURL() + { + return urlEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getURL_Name() + { + return (EAttribute)urlEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getCOMMENT() + { + return commentEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getCOMMENT_Name() + { + return (EAttribute)commentEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getDependenciesComp() + { + return dependenciesCompEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getDependenciesComp_Features() + { + return (EReference)dependenciesCompEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getFeature() + { + return featureEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getFeature_Name() + { + return (EAttribute)featureEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getIDF() + { + return idfEClass; + } + + /** + * + * + * @generated + */ + @Override + public EClass getCOMPONENT_NAME() + { + return componenT_NAMEEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getCOMPONENT_NAME_Features() + { + return (EReference)componenT_NAMEEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getCOMPONENT_NAME_FEATURE() + { + return componenT_NAME_FEATUREEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getCOMPONENT_NAME_FEATURE_Name() + { + return (EAttribute)componenT_NAME_FEATUREEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getPUBLIC() + { + return publicEClass; + } + + /** + * + * + * @generated + */ + @Override + public EClass getOVERRIDE_PATH() + { + return overridE_PATHEClass; + } + + /** + * + * + * @generated + */ + @Override + public EClass getRULES() + { + return rulesEClass; + } + + /** + * + * + * @generated + */ + @Override + public IDFComponentDslFactory getIDFComponentDslFactory() + { + return (IDFComponentDslFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() + { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + componentModelEClass = createEClass(COMPONENT_MODEL); + createEReference(componentModelEClass, COMPONENT_MODEL__ELEMENTS); + + typeEClass = createEClass(TYPE); + + descriptionEClass = createEClass(DESCRIPTION); + createEAttribute(descriptionEClass, DESCRIPTION__NAME); + + versionInfoEClass = createEClass(VERSION_INFO); + createEAttribute(versionInfoEClass, VERSION_INFO__NAME); + + urlEClass = createEClass(URL); + createEAttribute(urlEClass, URL__NAME); + + commentEClass = createEClass(COMMENT); + createEAttribute(commentEClass, COMMENT__NAME); + + dependenciesCompEClass = createEClass(DEPENDENCIES_COMP); + createEReference(dependenciesCompEClass, DEPENDENCIES_COMP__FEATURES); + + featureEClass = createEClass(FEATURE); + createEAttribute(featureEClass, FEATURE__NAME); + + idfEClass = createEClass(IDF); + + componenT_NAMEEClass = createEClass(COMPONENT_NAME); + createEReference(componenT_NAMEEClass, COMPONENT_NAME__FEATURES); + + componenT_NAME_FEATUREEClass = createEClass(COMPONENT_NAME_FEATURE); + createEAttribute(componenT_NAME_FEATUREEClass, COMPONENT_NAME_FEATURE__NAME); + + publicEClass = createEClass(PUBLIC); + + overridE_PATHEClass = createEClass(OVERRIDE_PATH); + + rulesEClass = createEClass(RULES); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() + { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + descriptionEClass.getESuperTypes().add(this.getType()); + versionInfoEClass.getESuperTypes().add(this.getType()); + urlEClass.getESuperTypes().add(this.getType()); + commentEClass.getESuperTypes().add(this.getType()); + dependenciesCompEClass.getESuperTypes().add(this.getType()); + idfEClass.getESuperTypes().add(this.getFeature()); + componenT_NAMEEClass.getESuperTypes().add(this.getFeature()); + publicEClass.getESuperTypes().add(this.getCOMPONENT_NAME_FEATURE()); + overridE_PATHEClass.getESuperTypes().add(this.getFeature()); + rulesEClass.getESuperTypes().add(this.getCOMPONENT_NAME_FEATURE()); + + // Initialize classes and features; add operations and parameters + initEClass(componentModelEClass, ComponentModel.class, "ComponentModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getComponentModel_Elements(), this.getType(), null, "elements", null, 0, -1, ComponentModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(typeEClass, Type.class, "Type", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(descriptionEClass, Description.class, "Description", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDescription_Name(), ecorePackage.getEString(), "name", null, 0, 1, Description.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(versionInfoEClass, VersionInfo.class, "VersionInfo", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getVersionInfo_Name(), ecorePackage.getEString(), "name", null, 0, 1, VersionInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(urlEClass, com.espressif.idf.componen.iDFComponentDsl.URL.class, "URL", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getURL_Name(), ecorePackage.getEString(), "name", null, 0, 1, com.espressif.idf.componen.iDFComponentDsl.URL.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(commentEClass, com.espressif.idf.componen.iDFComponentDsl.COMMENT.class, "COMMENT", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCOMMENT_Name(), ecorePackage.getEString(), "name", null, 0, 1, com.espressif.idf.componen.iDFComponentDsl.COMMENT.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(dependenciesCompEClass, DependenciesComp.class, "DependenciesComp", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getDependenciesComp_Features(), this.getFeature(), null, "features", null, 0, -1, DependenciesComp.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(featureEClass, Feature.class, "Feature", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getFeature_Name(), ecorePackage.getEString(), "name", null, 0, 1, Feature.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(idfEClass, com.espressif.idf.componen.iDFComponentDsl.IDF.class, "IDF", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(componenT_NAMEEClass, com.espressif.idf.componen.iDFComponentDsl.COMPONENT_NAME.class, "COMPONENT_NAME", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCOMPONENT_NAME_Features(), this.getCOMPONENT_NAME_FEATURE(), null, "features", null, 0, -1, com.espressif.idf.componen.iDFComponentDsl.COMPONENT_NAME.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(componenT_NAME_FEATUREEClass, com.espressif.idf.componen.iDFComponentDsl.COMPONENT_NAME_FEATURE.class, "COMPONENT_NAME_FEATURE", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCOMPONENT_NAME_FEATURE_Name(), ecorePackage.getEString(), "name", null, 0, 1, com.espressif.idf.componen.iDFComponentDsl.COMPONENT_NAME_FEATURE.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(publicEClass, com.espressif.idf.componen.iDFComponentDsl.PUBLIC.class, "PUBLIC", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(overridE_PATHEClass, com.espressif.idf.componen.iDFComponentDsl.OVERRIDE_PATH.class, "OVERRIDE_PATH", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(rulesEClass, com.espressif.idf.componen.iDFComponentDsl.RULES.class, "RULES", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + } + +} //IDFComponentDslPackageImpl diff --git a/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/impl/IDFImpl.java b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/impl/IDFImpl.java new file mode 100644 index 000000000..d21cd6614 --- /dev/null +++ b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/impl/IDFImpl.java @@ -0,0 +1,41 @@ +/** + * generated by Xtext 2.28.0 + */ +package com.espressif.idf.componen.iDFComponentDsl.impl; + +import com.espressif.idf.componen.iDFComponentDsl.IDF; +import com.espressif.idf.componen.iDFComponentDsl.IDFComponentDslPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'IDF'. + * + * + * @generated + */ +public class IDFImpl extends FeatureImpl implements IDF +{ + /** + * + * + * @generated + */ + protected IDFImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return IDFComponentDslPackage.Literals.IDF; + } + +} //IDFImpl diff --git a/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/impl/OVERRIDE_PATHImpl.java b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/impl/OVERRIDE_PATHImpl.java new file mode 100644 index 000000000..e00e6d6a0 --- /dev/null +++ b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/impl/OVERRIDE_PATHImpl.java @@ -0,0 +1,41 @@ +/** + * generated by Xtext 2.28.0 + */ +package com.espressif.idf.componen.iDFComponentDsl.impl; + +import com.espressif.idf.componen.iDFComponentDsl.IDFComponentDslPackage; +import com.espressif.idf.componen.iDFComponentDsl.OVERRIDE_PATH; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'OVERRIDE PATH'. + * + * + * @generated + */ +public class OVERRIDE_PATHImpl extends FeatureImpl implements OVERRIDE_PATH +{ + /** + * + * + * @generated + */ + protected OVERRIDE_PATHImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return IDFComponentDslPackage.Literals.OVERRIDE_PATH; + } + +} //OVERRIDE_PATHImpl diff --git a/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/impl/PUBLICImpl.java b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/impl/PUBLICImpl.java new file mode 100644 index 000000000..1c34a3170 --- /dev/null +++ b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/impl/PUBLICImpl.java @@ -0,0 +1,41 @@ +/** + * generated by Xtext 2.28.0 + */ +package com.espressif.idf.componen.iDFComponentDsl.impl; + +import com.espressif.idf.componen.iDFComponentDsl.IDFComponentDslPackage; +import com.espressif.idf.componen.iDFComponentDsl.PUBLIC; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'PUBLIC'. + * + * + * @generated + */ +public class PUBLICImpl extends COMPONENT_NAME_FEATUREImpl implements PUBLIC +{ + /** + * + * + * @generated + */ + protected PUBLICImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return IDFComponentDslPackage.Literals.PUBLIC; + } + +} //PUBLICImpl diff --git a/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/impl/RULESImpl.java b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/impl/RULESImpl.java new file mode 100644 index 000000000..27972de5a --- /dev/null +++ b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/impl/RULESImpl.java @@ -0,0 +1,41 @@ +/** + * generated by Xtext 2.28.0 + */ +package com.espressif.idf.componen.iDFComponentDsl.impl; + +import com.espressif.idf.componen.iDFComponentDsl.IDFComponentDslPackage; +import com.espressif.idf.componen.iDFComponentDsl.RULES; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'RULES'. + * + * + * @generated + */ +public class RULESImpl extends COMPONENT_NAME_FEATUREImpl implements RULES +{ + /** + * + * + * @generated + */ + protected RULESImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return IDFComponentDslPackage.Literals.RULES; + } + +} //RULESImpl diff --git a/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/impl/TypeImpl.java b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/impl/TypeImpl.java new file mode 100644 index 000000000..105ac723b --- /dev/null +++ b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/impl/TypeImpl.java @@ -0,0 +1,43 @@ +/** + * generated by Xtext 2.28.0 + */ +package com.espressif.idf.componen.iDFComponentDsl.impl; + +import com.espressif.idf.componen.iDFComponentDsl.IDFComponentDslPackage; +import com.espressif.idf.componen.iDFComponentDsl.Type; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Type'. + * + * + * @generated + */ +public class TypeImpl extends MinimalEObjectImpl.Container implements Type +{ + /** + * + * + * @generated + */ + protected TypeImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return IDFComponentDslPackage.Literals.TYPE; + } + +} //TypeImpl diff --git a/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/impl/URLImpl.java b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/impl/URLImpl.java new file mode 100644 index 000000000..7d5ae43ae --- /dev/null +++ b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/impl/URLImpl.java @@ -0,0 +1,179 @@ +/** + * generated by Xtext 2.28.0 + */ +package com.espressif.idf.componen.iDFComponentDsl.impl; + +import com.espressif.idf.componen.iDFComponentDsl.IDFComponentDslPackage; +import com.espressif.idf.componen.iDFComponentDsl.URL; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'URL'. + * + *
+ * The following features are implemented: + *
+ *+ * The following features are implemented: + *
+ *createXXX method for each class of the model.
+ *
+ * @see com.espressif.idf.componen.iDFComponentDsl.IDFComponentDslPackage
+ * @generated
+ */
+public class IDFComponentDslAdapterFactory extends AdapterFactoryImpl
+{
+ /**
+ * The cached model package.
+ *
+ *
+ * @generated
+ */
+ protected static IDFComponentDslPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ *
+ *
+ * @generated
+ */
+ public IDFComponentDslAdapterFactory()
+ {
+ if (modelPackage == null)
+ {
+ modelPackage = IDFComponentDslPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ *
+ * This implementation returns true if the object is either the model's package or is an instance object of the model.
+ *
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object)
+ {
+ if (object == modelPackage)
+ {
+ return true;
+ }
+ if (object instanceof EObject)
+ {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the createXXX methods.
+ *
+ *
+ * @generated
+ */
+ protected IDFComponentDslSwitchtarget.
+ *
+ *
+ * @param target the object to adapt.
+ * @return the adapter for the target.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target)
+ {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.espressif.idf.componen.iDFComponentDsl.ComponentModel Component Model}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see com.espressif.idf.componen.iDFComponentDsl.ComponentModel
+ * @generated
+ */
+ public Adapter createComponentModelAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.espressif.idf.componen.iDFComponentDsl.Type Type}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see com.espressif.idf.componen.iDFComponentDsl.Type
+ * @generated
+ */
+ public Adapter createTypeAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.espressif.idf.componen.iDFComponentDsl.Description Description}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see com.espressif.idf.componen.iDFComponentDsl.Description
+ * @generated
+ */
+ public Adapter createDescriptionAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.espressif.idf.componen.iDFComponentDsl.VersionInfo Version Info}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see com.espressif.idf.componen.iDFComponentDsl.VersionInfo
+ * @generated
+ */
+ public Adapter createVersionInfoAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.espressif.idf.componen.iDFComponentDsl.URL URL}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see com.espressif.idf.componen.iDFComponentDsl.URL
+ * @generated
+ */
+ public Adapter createURLAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.espressif.idf.componen.iDFComponentDsl.COMMENT COMMENT}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see com.espressif.idf.componen.iDFComponentDsl.COMMENT
+ * @generated
+ */
+ public Adapter createCOMMENTAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.espressif.idf.componen.iDFComponentDsl.DependenciesComp Dependencies Comp}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see com.espressif.idf.componen.iDFComponentDsl.DependenciesComp
+ * @generated
+ */
+ public Adapter createDependenciesCompAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.espressif.idf.componen.iDFComponentDsl.Feature Feature}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see com.espressif.idf.componen.iDFComponentDsl.Feature
+ * @generated
+ */
+ public Adapter createFeatureAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.espressif.idf.componen.iDFComponentDsl.IDF IDF}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see com.espressif.idf.componen.iDFComponentDsl.IDF
+ * @generated
+ */
+ public Adapter createIDFAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.espressif.idf.componen.iDFComponentDsl.COMPONENT_NAME COMPONENT NAME}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see com.espressif.idf.componen.iDFComponentDsl.COMPONENT_NAME
+ * @generated
+ */
+ public Adapter createCOMPONENT_NAMEAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.espressif.idf.componen.iDFComponentDsl.COMPONENT_NAME_FEATURE COMPONENT NAME FEATURE}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see com.espressif.idf.componen.iDFComponentDsl.COMPONENT_NAME_FEATURE
+ * @generated
+ */
+ public Adapter createCOMPONENT_NAME_FEATUREAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.espressif.idf.componen.iDFComponentDsl.PUBLIC PUBLIC}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see com.espressif.idf.componen.iDFComponentDsl.PUBLIC
+ * @generated
+ */
+ public Adapter createPUBLICAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.espressif.idf.componen.iDFComponentDsl.OVERRIDE_PATH OVERRIDE PATH}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see com.espressif.idf.componen.iDFComponentDsl.OVERRIDE_PATH
+ * @generated
+ */
+ public Adapter createOVERRIDE_PATHAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.espressif.idf.componen.iDFComponentDsl.RULES RULES}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see com.espressif.idf.componen.iDFComponentDsl.RULES
+ * @generated
+ */
+ public Adapter createRULESAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ *
+ * This default implementation returns null.
+ *
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter()
+ {
+ return null;
+ }
+
+} //IDFComponentDslAdapterFactory
diff --git a/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/util/IDFComponentDslSwitch.java b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/util/IDFComponentDslSwitch.java
new file mode 100644
index 000000000..f22330ad9
--- /dev/null
+++ b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/iDFComponentDsl/util/IDFComponentDslSwitch.java
@@ -0,0 +1,429 @@
+/**
+ * generated by Xtext 2.28.0
+ */
+package com.espressif.idf.componen.iDFComponentDsl.util;
+
+import com.espressif.idf.componen.iDFComponentDsl.*;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+/**
+ *
+ * The Switch for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the caseXXX method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ *
+ * @see com.espressif.idf.componen.iDFComponentDsl.IDFComponentDslPackage
+ * @generated
+ */
+public class IDFComponentDslSwitchcaseXXX for each class of the model until one returns a non null result; it yields that result.
+ *
+ *
+ * @return the first non-null result returned by a caseXXX call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject)
+ {
+ switch (classifierID)
+ {
+ case IDFComponentDslPackage.COMPONENT_MODEL:
+ {
+ ComponentModel componentModel = (ComponentModel)theEObject;
+ T result = caseComponentModel(componentModel);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case IDFComponentDslPackage.TYPE:
+ {
+ Type type = (Type)theEObject;
+ T result = caseType(type);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case IDFComponentDslPackage.DESCRIPTION:
+ {
+ Description description = (Description)theEObject;
+ T result = caseDescription(description);
+ if (result == null) result = caseType(description);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case IDFComponentDslPackage.VERSION_INFO:
+ {
+ VersionInfo versionInfo = (VersionInfo)theEObject;
+ T result = caseVersionInfo(versionInfo);
+ if (result == null) result = caseType(versionInfo);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case IDFComponentDslPackage.URL:
+ {
+ URL url = (URL)theEObject;
+ T result = caseURL(url);
+ if (result == null) result = caseType(url);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case IDFComponentDslPackage.COMMENT:
+ {
+ COMMENT comment = (COMMENT)theEObject;
+ T result = caseCOMMENT(comment);
+ if (result == null) result = caseType(comment);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case IDFComponentDslPackage.DEPENDENCIES_COMP:
+ {
+ DependenciesComp dependenciesComp = (DependenciesComp)theEObject;
+ T result = caseDependenciesComp(dependenciesComp);
+ if (result == null) result = caseType(dependenciesComp);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case IDFComponentDslPackage.FEATURE:
+ {
+ Feature feature = (Feature)theEObject;
+ T result = caseFeature(feature);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case IDFComponentDslPackage.IDF:
+ {
+ IDF idf = (IDF)theEObject;
+ T result = caseIDF(idf);
+ if (result == null) result = caseFeature(idf);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case IDFComponentDslPackage.COMPONENT_NAME:
+ {
+ COMPONENT_NAME componenT_NAME = (COMPONENT_NAME)theEObject;
+ T result = caseCOMPONENT_NAME(componenT_NAME);
+ if (result == null) result = caseFeature(componenT_NAME);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case IDFComponentDslPackage.COMPONENT_NAME_FEATURE:
+ {
+ COMPONENT_NAME_FEATURE componenT_NAME_FEATURE = (COMPONENT_NAME_FEATURE)theEObject;
+ T result = caseCOMPONENT_NAME_FEATURE(componenT_NAME_FEATURE);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case IDFComponentDslPackage.PUBLIC:
+ {
+ PUBLIC public_ = (PUBLIC)theEObject;
+ T result = casePUBLIC(public_);
+ if (result == null) result = caseCOMPONENT_NAME_FEATURE(public_);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case IDFComponentDslPackage.OVERRIDE_PATH:
+ {
+ OVERRIDE_PATH overridE_PATH = (OVERRIDE_PATH)theEObject;
+ T result = caseOVERRIDE_PATH(overridE_PATH);
+ if (result == null) result = caseFeature(overridE_PATH);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case IDFComponentDslPackage.RULES:
+ {
+ RULES rules = (RULES)theEObject;
+ T result = caseRULES(rules);
+ if (result == null) result = caseCOMPONENT_NAME_FEATURE(rules);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Component Model'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Component Model'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseComponentModel(ComponentModel object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Type'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Type'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseType(Type object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Description'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Description'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDescription(Description object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Version Info'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Version Info'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseVersionInfo(VersionInfo object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'URL'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'URL'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseURL(URL object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'COMMENT'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'COMMENT'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCOMMENT(COMMENT object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Dependencies Comp'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Dependencies Comp'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDependenciesComp(DependenciesComp object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Feature'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Feature'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFeature(Feature object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'IDF'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'IDF'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseIDF(IDF object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'COMPONENT NAME'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'COMPONENT NAME'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCOMPONENT_NAME(COMPONENT_NAME object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'COMPONENT NAME FEATURE'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'COMPONENT NAME FEATURE'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCOMPONENT_NAME_FEATURE(COMPONENT_NAME_FEATURE object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'PUBLIC'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'PUBLIC'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePUBLIC(PUBLIC object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'OVERRIDE PATH'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'OVERRIDE PATH'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseOVERRIDE_PATH(OVERRIDE_PATH object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'RULES'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'RULES'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRULES(RULES object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'EObject'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'EObject'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object)
+ {
+ return null;
+ }
+
+} //IDFComponentDslSwitch
diff --git a/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/parser/antlr/IDFComponentDslAntlrTokenFileProvider.java b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/parser/antlr/IDFComponentDslAntlrTokenFileProvider.java
new file mode 100644
index 000000000..f0eba1773
--- /dev/null
+++ b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/parser/antlr/IDFComponentDslAntlrTokenFileProvider.java
@@ -0,0 +1,16 @@
+/*
+ * generated by Xtext 2.28.0
+ */
+package com.espressif.idf.componen.parser.antlr;
+
+import java.io.InputStream;
+import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
+
+public class IDFComponentDslAntlrTokenFileProvider implements IAntlrTokenFileProvider {
+
+ @Override
+ public InputStream getAntlrTokenFile() {
+ ClassLoader classLoader = getClass().getClassLoader();
+ return classLoader.getResourceAsStream("com/espressif/idf/componen/parser/antlr/internal/InternalIDFComponentDsl.tokens");
+ }
+}
diff --git a/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/parser/antlr/IDFComponentDslParser.java b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/parser/antlr/IDFComponentDslParser.java
new file mode 100644
index 000000000..7f71254f0
--- /dev/null
+++ b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/parser/antlr/IDFComponentDslParser.java
@@ -0,0 +1,40 @@
+/*
+ * generated by Xtext 2.28.0
+ */
+package com.espressif.idf.componen.parser.antlr;
+
+import com.espressif.idf.componen.parser.antlr.internal.InternalIDFComponentDslParser;
+import com.espressif.idf.componen.services.IDFComponentDslGrammarAccess;
+import com.google.inject.Inject;
+import org.eclipse.xtext.parser.antlr.AbstractAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+
+public class IDFComponentDslParser extends AbstractAntlrParser {
+
+ @Inject
+ private IDFComponentDslGrammarAccess grammarAccess;
+
+ @Override
+ protected void setInitialHiddenTokens(XtextTokenStream tokenStream) {
+ tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
+ }
+
+
+ @Override
+ protected InternalIDFComponentDslParser createParser(XtextTokenStream stream) {
+ return new InternalIDFComponentDslParser(stream, getGrammarAccess());
+ }
+
+ @Override
+ protected String getDefaultRuleName() {
+ return "ComponentModel";
+ }
+
+ public IDFComponentDslGrammarAccess getGrammarAccess() {
+ return this.grammarAccess;
+ }
+
+ public void setGrammarAccess(IDFComponentDslGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+}
diff --git a/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/parser/antlr/internal/InternalIDFComponentDsl.g b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/parser/antlr/internal/InternalIDFComponentDsl.g
new file mode 100644
index 000000000..c3eb846db
--- /dev/null
+++ b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/parser/antlr/internal/InternalIDFComponentDsl.g
@@ -0,0 +1,685 @@
+/*
+ * generated by Xtext 2.28.0
+ */
+grammar InternalIDFComponentDsl;
+
+options {
+ superClass=AbstractInternalAntlrParser;
+}
+
+@lexer::header {
+package com.espressif.idf.componen.parser.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+}
+
+@parser::header {
+package com.espressif.idf.componen.parser.antlr.internal;
+
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
+import com.espressif.idf.componen.services.IDFComponentDslGrammarAccess;
+
+}
+
+@parser::members {
+
+ private IDFComponentDslGrammarAccess grammarAccess;
+
+ public InternalIDFComponentDslParser(TokenStream input, IDFComponentDslGrammarAccess grammarAccess) {
+ this(input);
+ this.grammarAccess = grammarAccess;
+ registerRules(grammarAccess.getGrammar());
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "ComponentModel";
+ }
+
+ @Override
+ protected IDFComponentDslGrammarAccess getGrammarAccess() {
+ return grammarAccess;
+ }
+
+}
+
+@rulecatch {
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+}
+
+// Entry rule entryRuleComponentModel
+entryRuleComponentModel returns [EObject current=null]:
+ { newCompositeNode(grammarAccess.getComponentModelRule()); }
+ iv_ruleComponentModel=ruleComponentModel
+ { $current=$iv_ruleComponentModel.current; }
+ EOF;
+
+// Rule ComponentModel
+ruleComponentModel returns [EObject current=null]
+@init {
+ enterRule();
+}
+@after {
+ leaveRule();
+}:
+ (
+ (
+ {
+ newCompositeNode(grammarAccess.getComponentModelAccess().getElementsTypeParserRuleCall_0());
+ }
+ lv_elements_0_0=ruleType
+ {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getComponentModelRule());
+ }
+ add(
+ $current,
+ "elements",
+ lv_elements_0_0,
+ "com.espressif.idf.componen.IDFComponentDsl.Type");
+ afterParserOrEnumRuleCall();
+ }
+ )
+ )*
+;
+
+// Entry rule entryRuleType
+entryRuleType returns [EObject current=null]:
+ { newCompositeNode(grammarAccess.getTypeRule()); }
+ iv_ruleType=ruleType
+ { $current=$iv_ruleType.current; }
+ EOF;
+
+// Rule Type
+ruleType returns [EObject current=null]
+@init {
+ enterRule();
+}
+@after {
+ leaveRule();
+}:
+ (
+ {
+ newCompositeNode(grammarAccess.getTypeAccess().getDescriptionParserRuleCall_0());
+ }
+ this_Description_0=ruleDescription
+ {
+ $current = $this_Description_0.current;
+ afterParserOrEnumRuleCall();
+ }
+ |
+ {
+ newCompositeNode(grammarAccess.getTypeAccess().getVersionInfoParserRuleCall_1());
+ }
+ this_VersionInfo_1=ruleVersionInfo
+ {
+ $current = $this_VersionInfo_1.current;
+ afterParserOrEnumRuleCall();
+ }
+ |
+ {
+ newCompositeNode(grammarAccess.getTypeAccess().getDependenciesCompParserRuleCall_2());
+ }
+ this_DependenciesComp_2=ruleDependenciesComp
+ {
+ $current = $this_DependenciesComp_2.current;
+ afterParserOrEnumRuleCall();
+ }
+ |
+ {
+ newCompositeNode(grammarAccess.getTypeAccess().getURLParserRuleCall_3());
+ }
+ this_URL_3=ruleURL
+ {
+ $current = $this_URL_3.current;
+ afterParserOrEnumRuleCall();
+ }
+ |
+ {
+ newCompositeNode(grammarAccess.getTypeAccess().getCOMMENTParserRuleCall_4());
+ }
+ this_COMMENT_4=ruleCOMMENT
+ {
+ $current = $this_COMMENT_4.current;
+ afterParserOrEnumRuleCall();
+ }
+ )
+;
+
+// Entry rule entryRuleDescription
+entryRuleDescription returns [EObject current=null]:
+ { newCompositeNode(grammarAccess.getDescriptionRule()); }
+ iv_ruleDescription=ruleDescription
+ { $current=$iv_ruleDescription.current; }
+ EOF;
+
+// Rule Description
+ruleDescription returns [EObject current=null]
+@init {
+ enterRule();
+}
+@after {
+ leaveRule();
+}:
+ (
+ otherlv_0='description:'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getDescriptionAccess().getDescriptionKeyword_0());
+ }
+ (
+ (
+ lv_name_1_0=RULE_STRING
+ {
+ newLeafNode(lv_name_1_0, grammarAccess.getDescriptionAccess().getNameSTRINGTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getDescriptionRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_1_0,
+ "org.eclipse.xtext.common.Terminals.STRING");
+ }
+ )
+ )
+ )
+;
+
+// Entry rule entryRuleVersionInfo
+entryRuleVersionInfo returns [EObject current=null]:
+ { newCompositeNode(grammarAccess.getVersionInfoRule()); }
+ iv_ruleVersionInfo=ruleVersionInfo
+ { $current=$iv_ruleVersionInfo.current; }
+ EOF;
+
+// Rule VersionInfo
+ruleVersionInfo returns [EObject current=null]
+@init {
+ enterRule();
+}
+@after {
+ leaveRule();
+}:
+ (
+ otherlv_0='version:'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getVersionInfoAccess().getVersionKeyword_0());
+ }
+ (
+ (
+ lv_name_1_0=RULE_STRING
+ {
+ newLeafNode(lv_name_1_0, grammarAccess.getVersionInfoAccess().getNameSTRINGTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getVersionInfoRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_1_0,
+ "org.eclipse.xtext.common.Terminals.STRING");
+ }
+ )
+ )
+ )
+;
+
+// Entry rule entryRuleURL
+entryRuleURL returns [EObject current=null]:
+ { newCompositeNode(grammarAccess.getURLRule()); }
+ iv_ruleURL=ruleURL
+ { $current=$iv_ruleURL.current; }
+ EOF;
+
+// Rule URL
+ruleURL returns [EObject current=null]
+@init {
+ enterRule();
+}
+@after {
+ leaveRule();
+}:
+ (
+ otherlv_0='url:'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getURLAccess().getUrlKeyword_0());
+ }
+ (
+ (
+ lv_name_1_0=RULE_STRING
+ {
+ newLeafNode(lv_name_1_0, grammarAccess.getURLAccess().getNameSTRINGTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getURLRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_1_0,
+ "org.eclipse.xtext.common.Terminals.STRING");
+ }
+ )
+ )
+ )
+;
+
+// Entry rule entryRuleCOMMENT
+entryRuleCOMMENT returns [EObject current=null]:
+ { newCompositeNode(grammarAccess.getCOMMENTRule()); }
+ iv_ruleCOMMENT=ruleCOMMENT
+ { $current=$iv_ruleCOMMENT.current; }
+ EOF;
+
+// Rule COMMENT
+ruleCOMMENT returns [EObject current=null]
+@init {
+ enterRule();
+}
+@after {
+ leaveRule();
+}:
+ (
+ otherlv_0='#'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getCOMMENTAccess().getNumberSignKeyword_0());
+ }
+ (
+ (
+ lv_name_1_0=RULE_ID
+ {
+ newLeafNode(lv_name_1_0, grammarAccess.getCOMMENTAccess().getNameIDTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getCOMMENTRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_1_0,
+ "org.eclipse.xtext.common.Terminals.ID");
+ }
+ )
+ )*
+ )
+;
+
+// Entry rule entryRuleDependenciesComp
+entryRuleDependenciesComp returns [EObject current=null]:
+ { newCompositeNode(grammarAccess.getDependenciesCompRule()); }
+ iv_ruleDependenciesComp=ruleDependenciesComp
+ { $current=$iv_ruleDependenciesComp.current; }
+ EOF;
+
+// Rule DependenciesComp
+ruleDependenciesComp returns [EObject current=null]
+@init {
+ enterRule();
+}
+@after {
+ leaveRule();
+}:
+ (
+ otherlv_0='dependencies:'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getDependenciesCompAccess().getDependenciesKeyword_0());
+ }
+ (
+ (
+ {
+ newCompositeNode(grammarAccess.getDependenciesCompAccess().getFeaturesFeatureParserRuleCall_1_0());
+ }
+ lv_features_1_0=ruleFeature
+ {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getDependenciesCompRule());
+ }
+ add(
+ $current,
+ "features",
+ lv_features_1_0,
+ "com.espressif.idf.componen.IDFComponentDsl.Feature");
+ afterParserOrEnumRuleCall();
+ }
+ )
+ )*
+ )
+;
+
+// Entry rule entryRuleFeature
+entryRuleFeature returns [EObject current=null]:
+ { newCompositeNode(grammarAccess.getFeatureRule()); }
+ iv_ruleFeature=ruleFeature
+ { $current=$iv_ruleFeature.current; }
+ EOF;
+
+// Rule Feature
+ruleFeature returns [EObject current=null]
+@init {
+ enterRule();
+}
+@after {
+ leaveRule();
+}:
+ (
+ {
+ newCompositeNode(grammarAccess.getFeatureAccess().getIDFParserRuleCall_0());
+ }
+ this_IDF_0=ruleIDF
+ {
+ $current = $this_IDF_0.current;
+ afterParserOrEnumRuleCall();
+ }
+ |
+ {
+ newCompositeNode(grammarAccess.getFeatureAccess().getOVERRIDE_PATHParserRuleCall_1());
+ }
+ this_OVERRIDE_PATH_1=ruleOVERRIDE_PATH
+ {
+ $current = $this_OVERRIDE_PATH_1.current;
+ afterParserOrEnumRuleCall();
+ }
+ |
+ {
+ newCompositeNode(grammarAccess.getFeatureAccess().getCOMPONENT_NAMEParserRuleCall_2());
+ }
+ this_COMPONENT_NAME_2=ruleCOMPONENT_NAME
+ {
+ $current = $this_COMPONENT_NAME_2.current;
+ afterParserOrEnumRuleCall();
+ }
+ )
+;
+
+// Entry rule entryRuleIDF
+entryRuleIDF returns [EObject current=null]:
+ { newCompositeNode(grammarAccess.getIDFRule()); }
+ iv_ruleIDF=ruleIDF
+ { $current=$iv_ruleIDF.current; }
+ EOF;
+
+// Rule IDF
+ruleIDF returns [EObject current=null]
+@init {
+ enterRule();
+}
+@after {
+ leaveRule();
+}:
+ (
+ otherlv_0='idf:'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getIDFAccess().getIdfKeyword_0());
+ }
+ (
+ (
+ lv_name_1_0=RULE_STRING
+ {
+ newLeafNode(lv_name_1_0, grammarAccess.getIDFAccess().getNameSTRINGTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getIDFRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_1_0,
+ "org.eclipse.xtext.common.Terminals.STRING");
+ }
+ )
+ )
+ )
+;
+
+// Entry rule entryRuleCOMPONENT_NAME
+entryRuleCOMPONENT_NAME returns [EObject current=null]:
+ { newCompositeNode(grammarAccess.getCOMPONENT_NAMERule()); }
+ iv_ruleCOMPONENT_NAME=ruleCOMPONENT_NAME
+ { $current=$iv_ruleCOMPONENT_NAME.current; }
+ EOF;
+
+// Rule COMPONENT_NAME
+ruleCOMPONENT_NAME returns [EObject current=null]
+@init {
+ enterRule();
+}
+@after {
+ leaveRule();
+}:
+ (
+ (
+ (
+ lv_name_0_0=RULE_ID
+ {
+ newLeafNode(lv_name_0_0, grammarAccess.getCOMPONENT_NAMEAccess().getNameIDTerminalRuleCall_0_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getCOMPONENT_NAMERule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_0_0,
+ "org.eclipse.xtext.common.Terminals.ID");
+ }
+ )
+ )
+ otherlv_1=':'
+ {
+ newLeafNode(otherlv_1, grammarAccess.getCOMPONENT_NAMEAccess().getColonKeyword_1());
+ }
+ (
+ (
+ {
+ newCompositeNode(grammarAccess.getCOMPONENT_NAMEAccess().getFeaturesCOMPONENT_NAME_FEATUREParserRuleCall_2_0());
+ }
+ lv_features_2_0=ruleCOMPONENT_NAME_FEATURE
+ {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getCOMPONENT_NAMERule());
+ }
+ add(
+ $current,
+ "features",
+ lv_features_2_0,
+ "com.espressif.idf.componen.IDFComponentDsl.COMPONENT_NAME_FEATURE");
+ afterParserOrEnumRuleCall();
+ }
+ )
+ )*
+ )
+;
+
+// Entry rule entryRuleCOMPONENT_NAME_FEATURE
+entryRuleCOMPONENT_NAME_FEATURE returns [EObject current=null]:
+ { newCompositeNode(grammarAccess.getCOMPONENT_NAME_FEATURERule()); }
+ iv_ruleCOMPONENT_NAME_FEATURE=ruleCOMPONENT_NAME_FEATURE
+ { $current=$iv_ruleCOMPONENT_NAME_FEATURE.current; }
+ EOF;
+
+// Rule COMPONENT_NAME_FEATURE
+ruleCOMPONENT_NAME_FEATURE returns [EObject current=null]
+@init {
+ enterRule();
+}
+@after {
+ leaveRule();
+}:
+ (
+ {
+ newCompositeNode(grammarAccess.getCOMPONENT_NAME_FEATUREAccess().getRULESParserRuleCall_0());
+ }
+ this_RULES_0=ruleRULES
+ {
+ $current = $this_RULES_0.current;
+ afterParserOrEnumRuleCall();
+ }
+ |
+ {
+ newCompositeNode(grammarAccess.getCOMPONENT_NAME_FEATUREAccess().getPUBLICParserRuleCall_1());
+ }
+ this_PUBLIC_1=rulePUBLIC
+ {
+ $current = $this_PUBLIC_1.current;
+ afterParserOrEnumRuleCall();
+ }
+ )
+;
+
+// Entry rule entryRulePUBLIC
+entryRulePUBLIC returns [EObject current=null]:
+ { newCompositeNode(grammarAccess.getPUBLICRule()); }
+ iv_rulePUBLIC=rulePUBLIC
+ { $current=$iv_rulePUBLIC.current; }
+ EOF;
+
+// Rule PUBLIC
+rulePUBLIC returns [EObject current=null]
+@init {
+ enterRule();
+}
+@after {
+ leaveRule();
+}:
+ (
+ otherlv_0='public:'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getPUBLICAccess().getPublicKeyword_0());
+ }
+ (
+ (
+ lv_name_1_0=RULE_ID
+ {
+ newLeafNode(lv_name_1_0, grammarAccess.getPUBLICAccess().getNameIDTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getPUBLICRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_1_0,
+ "org.eclipse.xtext.common.Terminals.ID");
+ }
+ )
+ )
+ )
+;
+
+// Entry rule entryRuleOVERRIDE_PATH
+entryRuleOVERRIDE_PATH returns [EObject current=null]:
+ { newCompositeNode(grammarAccess.getOVERRIDE_PATHRule()); }
+ iv_ruleOVERRIDE_PATH=ruleOVERRIDE_PATH
+ { $current=$iv_ruleOVERRIDE_PATH.current; }
+ EOF;
+
+// Rule OVERRIDE_PATH
+ruleOVERRIDE_PATH returns [EObject current=null]
+@init {
+ enterRule();
+}
+@after {
+ leaveRule();
+}:
+ (
+ otherlv_0='override_path:'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getOVERRIDE_PATHAccess().getOverride_pathKeyword_0());
+ }
+ (
+ (
+ lv_name_1_0=RULE_STRING
+ {
+ newLeafNode(lv_name_1_0, grammarAccess.getOVERRIDE_PATHAccess().getNameSTRINGTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getOVERRIDE_PATHRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_1_0,
+ "org.eclipse.xtext.common.Terminals.STRING");
+ }
+ )
+ )
+ )
+;
+
+// Entry rule entryRuleRULES
+entryRuleRULES returns [EObject current=null]:
+ { newCompositeNode(grammarAccess.getRULESRule()); }
+ iv_ruleRULES=ruleRULES
+ { $current=$iv_ruleRULES.current; }
+ EOF;
+
+// Rule RULES
+ruleRULES returns [EObject current=null]
+@init {
+ enterRule();
+}
+@after {
+ leaveRule();
+}:
+ (
+ otherlv_0='rules:'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getRULESAccess().getRulesKeyword_0());
+ }
+ (
+ (
+ lv_name_1_0=RULE_STRING
+ {
+ newLeafNode(lv_name_1_0, grammarAccess.getRULESAccess().getNameSTRINGTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getRULESRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_1_0,
+ "org.eclipse.xtext.common.Terminals.STRING");
+ }
+ )
+ )
+ )
+;
+
+RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
+
+RULE_INT : ('0'..'9')+;
+
+RULE_STRING : ('"' ('\\' .|~(('\\'|'"')))* '"'|'\'' ('\\' .|~(('\\'|'\'')))* '\'');
+
+RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';
+
+RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?;
+
+RULE_WS : (' '|'\t'|'\r'|'\n')+;
+
+RULE_ANY_OTHER : .;
diff --git a/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/parser/antlr/internal/InternalIDFComponentDsl.tokens b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/parser/antlr/internal/InternalIDFComponentDsl.tokens
new file mode 100644
index 000000000..9d17493fb
--- /dev/null
+++ b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/parser/antlr/internal/InternalIDFComponentDsl.tokens
@@ -0,0 +1,27 @@
+'#'=14
+':'=17
+'dependencies:'=15
+'description:'=11
+'idf:'=16
+'override_path:'=19
+'public:'=18
+'rules:'=20
+'url:'=13
+'version:'=12
+RULE_ANY_OTHER=10
+RULE_ID=5
+RULE_INT=6
+RULE_ML_COMMENT=7
+RULE_SL_COMMENT=8
+RULE_STRING=4
+RULE_WS=9
+T__11=11
+T__12=12
+T__13=13
+T__14=14
+T__15=15
+T__16=16
+T__17=17
+T__18=18
+T__19=19
+T__20=20
diff --git a/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/parser/antlr/internal/InternalIDFComponentDslLexer.java b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/parser/antlr/internal/InternalIDFComponentDslLexer.java
new file mode 100644
index 000000000..dadfa961a
--- /dev/null
+++ b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/parser/antlr/internal/InternalIDFComponentDslLexer.java
@@ -0,0 +1,1089 @@
+package com.espressif.idf.componen.parser.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+@SuppressWarnings("all")
+public class InternalIDFComponentDslLexer extends Lexer {
+ public static final int RULE_STRING=4;
+ public static final int RULE_SL_COMMENT=8;
+ public static final int T__19=19;
+ public static final int T__15=15;
+ public static final int T__16=16;
+ public static final int T__17=17;
+ public static final int T__18=18;
+ public static final int T__11=11;
+ public static final int T__12=12;
+ public static final int T__13=13;
+ public static final int T__14=14;
+ public static final int EOF=-1;
+ public static final int RULE_ID=5;
+ public static final int RULE_WS=9;
+ public static final int RULE_ANY_OTHER=10;
+ public static final int RULE_INT=6;
+ public static final int RULE_ML_COMMENT=7;
+ public static final int T__20=20;
+
+ // delegates
+ // delegators
+
+ public InternalIDFComponentDslLexer() {;}
+ public InternalIDFComponentDslLexer(CharStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public InternalIDFComponentDslLexer(CharStream input, RecognizerSharedState state) {
+ super(input,state);
+
+ }
+ public String getGrammarFileName() { return "InternalIDFComponentDsl.g"; }
+
+ // $ANTLR start "T__11"
+ public final void mT__11() throws RecognitionException {
+ try {
+ int _type = T__11;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalIDFComponentDsl.g:11:7: ( 'description:' )
+ // InternalIDFComponentDsl.g:11:9: 'description:'
+ {
+ match("description:");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__11"
+
+ // $ANTLR start "T__12"
+ public final void mT__12() throws RecognitionException {
+ try {
+ int _type = T__12;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalIDFComponentDsl.g:12:7: ( 'version:' )
+ // InternalIDFComponentDsl.g:12:9: 'version:'
+ {
+ match("version:");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__12"
+
+ // $ANTLR start "T__13"
+ public final void mT__13() throws RecognitionException {
+ try {
+ int _type = T__13;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalIDFComponentDsl.g:13:7: ( 'url:' )
+ // InternalIDFComponentDsl.g:13:9: 'url:'
+ {
+ match("url:");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__13"
+
+ // $ANTLR start "T__14"
+ public final void mT__14() throws RecognitionException {
+ try {
+ int _type = T__14;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalIDFComponentDsl.g:14:7: ( '#' )
+ // InternalIDFComponentDsl.g:14:9: '#'
+ {
+ match('#');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__14"
+
+ // $ANTLR start "T__15"
+ public final void mT__15() throws RecognitionException {
+ try {
+ int _type = T__15;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalIDFComponentDsl.g:15:7: ( 'dependencies:' )
+ // InternalIDFComponentDsl.g:15:9: 'dependencies:'
+ {
+ match("dependencies:");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__15"
+
+ // $ANTLR start "T__16"
+ public final void mT__16() throws RecognitionException {
+ try {
+ int _type = T__16;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalIDFComponentDsl.g:16:7: ( 'idf:' )
+ // InternalIDFComponentDsl.g:16:9: 'idf:'
+ {
+ match("idf:");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__16"
+
+ // $ANTLR start "T__17"
+ public final void mT__17() throws RecognitionException {
+ try {
+ int _type = T__17;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalIDFComponentDsl.g:17:7: ( ':' )
+ // InternalIDFComponentDsl.g:17:9: ':'
+ {
+ match(':');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__17"
+
+ // $ANTLR start "T__18"
+ public final void mT__18() throws RecognitionException {
+ try {
+ int _type = T__18;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalIDFComponentDsl.g:18:7: ( 'public:' )
+ // InternalIDFComponentDsl.g:18:9: 'public:'
+ {
+ match("public:");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__18"
+
+ // $ANTLR start "T__19"
+ public final void mT__19() throws RecognitionException {
+ try {
+ int _type = T__19;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalIDFComponentDsl.g:19:7: ( 'override_path:' )
+ // InternalIDFComponentDsl.g:19:9: 'override_path:'
+ {
+ match("override_path:");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__19"
+
+ // $ANTLR start "T__20"
+ public final void mT__20() throws RecognitionException {
+ try {
+ int _type = T__20;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalIDFComponentDsl.g:20:7: ( 'rules:' )
+ // InternalIDFComponentDsl.g:20:9: 'rules:'
+ {
+ match("rules:");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__20"
+
+ // $ANTLR start "RULE_ID"
+ public final void mRULE_ID() throws RecognitionException {
+ try {
+ int _type = RULE_ID;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalIDFComponentDsl.g:673:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
+ // InternalIDFComponentDsl.g:673:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ {
+ // InternalIDFComponentDsl.g:673:11: ( '^' )?
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0=='^') ) {
+ alt1=1;
+ }
+ switch (alt1) {
+ case 1 :
+ // InternalIDFComponentDsl.g:673:11: '^'
+ {
+ match('^');
+
+ }
+ break;
+
+ }
+
+ if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+ // InternalIDFComponentDsl.g:673:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ loop2:
+ do {
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( ((LA2_0>='0' && LA2_0<='9')||(LA2_0>='A' && LA2_0<='Z')||LA2_0=='_'||(LA2_0>='a' && LA2_0<='z')) ) {
+ alt2=1;
+ }
+
+
+ switch (alt2) {
+ case 1 :
+ // InternalIDFComponentDsl.g:
+ {
+ if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop2;
+ }
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ID"
+
+ // $ANTLR start "RULE_INT"
+ public final void mRULE_INT() throws RecognitionException {
+ try {
+ int _type = RULE_INT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalIDFComponentDsl.g:675:10: ( ( '0' .. '9' )+ )
+ // InternalIDFComponentDsl.g:675:12: ( '0' .. '9' )+
+ {
+ // InternalIDFComponentDsl.g:675:12: ( '0' .. '9' )+
+ int cnt3=0;
+ loop3:
+ do {
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( ((LA3_0>='0' && LA3_0<='9')) ) {
+ alt3=1;
+ }
+
+
+ switch (alt3) {
+ case 1 :
+ // InternalIDFComponentDsl.g:675:13: '0' .. '9'
+ {
+ matchRange('0','9');
+
+ }
+ break;
+
+ default :
+ if ( cnt3 >= 1 ) break loop3;
+ EarlyExitException eee =
+ new EarlyExitException(3, input);
+ throw eee;
+ }
+ cnt3++;
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_INT"
+
+ // $ANTLR start "RULE_STRING"
+ public final void mRULE_STRING() throws RecognitionException {
+ try {
+ int _type = RULE_STRING;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalIDFComponentDsl.g:677:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
+ // InternalIDFComponentDsl.g:677:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ {
+ // InternalIDFComponentDsl.g:677:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+
+ if ( (LA6_0=='\"') ) {
+ alt6=1;
+ }
+ else if ( (LA6_0=='\'') ) {
+ alt6=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("", 6, 0, input);
+
+ throw nvae;
+ }
+ switch (alt6) {
+ case 1 :
+ // InternalIDFComponentDsl.g:677:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
+ {
+ match('\"');
+ // InternalIDFComponentDsl.g:677:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )*
+ loop4:
+ do {
+ int alt4=3;
+ int LA4_0 = input.LA(1);
+
+ if ( (LA4_0=='\\') ) {
+ alt4=1;
+ }
+ else if ( ((LA4_0>='\u0000' && LA4_0<='!')||(LA4_0>='#' && LA4_0<='[')||(LA4_0>=']' && LA4_0<='\uFFFF')) ) {
+ alt4=2;
+ }
+
+
+ switch (alt4) {
+ case 1 :
+ // InternalIDFComponentDsl.g:677:21: '\\\\' .
+ {
+ match('\\');
+ matchAny();
+
+ }
+ break;
+ case 2 :
+ // InternalIDFComponentDsl.g:677:28: ~ ( ( '\\\\' | '\"' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop4;
+ }
+ } while (true);
+
+ match('\"');
+
+ }
+ break;
+ case 2 :
+ // InternalIDFComponentDsl.g:677:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
+ {
+ match('\'');
+ // InternalIDFComponentDsl.g:677:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )*
+ loop5:
+ do {
+ int alt5=3;
+ int LA5_0 = input.LA(1);
+
+ if ( (LA5_0=='\\') ) {
+ alt5=1;
+ }
+ else if ( ((LA5_0>='\u0000' && LA5_0<='&')||(LA5_0>='(' && LA5_0<='[')||(LA5_0>=']' && LA5_0<='\uFFFF')) ) {
+ alt5=2;
+ }
+
+
+ switch (alt5) {
+ case 1 :
+ // InternalIDFComponentDsl.g:677:54: '\\\\' .
+ {
+ match('\\');
+ matchAny();
+
+ }
+ break;
+ case 2 :
+ // InternalIDFComponentDsl.g:677:61: ~ ( ( '\\\\' | '\\'' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop5;
+ }
+ } while (true);
+
+ match('\'');
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_STRING"
+
+ // $ANTLR start "RULE_ML_COMMENT"
+ public final void mRULE_ML_COMMENT() throws RecognitionException {
+ try {
+ int _type = RULE_ML_COMMENT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalIDFComponentDsl.g:679:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // InternalIDFComponentDsl.g:679:19: '/*' ( options {greedy=false; } : . )* '*/'
+ {
+ match("/*");
+
+ // InternalIDFComponentDsl.g:679:24: ( options {greedy=false; } : . )*
+ loop7:
+ do {
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+
+ if ( (LA7_0=='*') ) {
+ int LA7_1 = input.LA(2);
+
+ if ( (LA7_1=='/') ) {
+ alt7=2;
+ }
+ else if ( ((LA7_1>='\u0000' && LA7_1<='.')||(LA7_1>='0' && LA7_1<='\uFFFF')) ) {
+ alt7=1;
+ }
+
+
+ }
+ else if ( ((LA7_0>='\u0000' && LA7_0<=')')||(LA7_0>='+' && LA7_0<='\uFFFF')) ) {
+ alt7=1;
+ }
+
+
+ switch (alt7) {
+ case 1 :
+ // InternalIDFComponentDsl.g:679:52: .
+ {
+ matchAny();
+
+ }
+ break;
+
+ default :
+ break loop7;
+ }
+ } while (true);
+
+ match("*/");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ML_COMMENT"
+
+ // $ANTLR start "RULE_SL_COMMENT"
+ public final void mRULE_SL_COMMENT() throws RecognitionException {
+ try {
+ int _type = RULE_SL_COMMENT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalIDFComponentDsl.g:681:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
+ // InternalIDFComponentDsl.g:681:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
+ {
+ match("//");
+
+ // InternalIDFComponentDsl.g:681:24: (~ ( ( '\\n' | '\\r' ) ) )*
+ loop8:
+ do {
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( ((LA8_0>='\u0000' && LA8_0<='\t')||(LA8_0>='\u000B' && LA8_0<='\f')||(LA8_0>='\u000E' && LA8_0<='\uFFFF')) ) {
+ alt8=1;
+ }
+
+
+ switch (alt8) {
+ case 1 :
+ // InternalIDFComponentDsl.g:681:24: ~ ( ( '\\n' | '\\r' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop8;
+ }
+ } while (true);
+
+ // InternalIDFComponentDsl.g:681:40: ( ( '\\r' )? '\\n' )?
+ int alt10=2;
+ int LA10_0 = input.LA(1);
+
+ if ( (LA10_0=='\n'||LA10_0=='\r') ) {
+ alt10=1;
+ }
+ switch (alt10) {
+ case 1 :
+ // InternalIDFComponentDsl.g:681:41: ( '\\r' )? '\\n'
+ {
+ // InternalIDFComponentDsl.g:681:41: ( '\\r' )?
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0=='\r') ) {
+ alt9=1;
+ }
+ switch (alt9) {
+ case 1 :
+ // InternalIDFComponentDsl.g:681:41: '\\r'
+ {
+ match('\r');
+
+ }
+ break;
+
+ }
+
+ match('\n');
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_SL_COMMENT"
+
+ // $ANTLR start "RULE_WS"
+ public final void mRULE_WS() throws RecognitionException {
+ try {
+ int _type = RULE_WS;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalIDFComponentDsl.g:683:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
+ // InternalIDFComponentDsl.g:683:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ {
+ // InternalIDFComponentDsl.g:683:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ int cnt11=0;
+ loop11:
+ do {
+ int alt11=2;
+ int LA11_0 = input.LA(1);
+
+ if ( ((LA11_0>='\t' && LA11_0<='\n')||LA11_0=='\r'||LA11_0==' ') ) {
+ alt11=1;
+ }
+
+
+ switch (alt11) {
+ case 1 :
+ // InternalIDFComponentDsl.g:
+ {
+ if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ if ( cnt11 >= 1 ) break loop11;
+ EarlyExitException eee =
+ new EarlyExitException(11, input);
+ throw eee;
+ }
+ cnt11++;
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_WS"
+
+ // $ANTLR start "RULE_ANY_OTHER"
+ public final void mRULE_ANY_OTHER() throws RecognitionException {
+ try {
+ int _type = RULE_ANY_OTHER;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalIDFComponentDsl.g:685:16: ( . )
+ // InternalIDFComponentDsl.g:685:18: .
+ {
+ matchAny();
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ANY_OTHER"
+
+ public void mTokens() throws RecognitionException {
+ // InternalIDFComponentDsl.g:1:8: ( T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
+ int alt12=17;
+ alt12 = dfa12.predict(input);
+ switch (alt12) {
+ case 1 :
+ // InternalIDFComponentDsl.g:1:10: T__11
+ {
+ mT__11();
+
+ }
+ break;
+ case 2 :
+ // InternalIDFComponentDsl.g:1:16: T__12
+ {
+ mT__12();
+
+ }
+ break;
+ case 3 :
+ // InternalIDFComponentDsl.g:1:22: T__13
+ {
+ mT__13();
+
+ }
+ break;
+ case 4 :
+ // InternalIDFComponentDsl.g:1:28: T__14
+ {
+ mT__14();
+
+ }
+ break;
+ case 5 :
+ // InternalIDFComponentDsl.g:1:34: T__15
+ {
+ mT__15();
+
+ }
+ break;
+ case 6 :
+ // InternalIDFComponentDsl.g:1:40: T__16
+ {
+ mT__16();
+
+ }
+ break;
+ case 7 :
+ // InternalIDFComponentDsl.g:1:46: T__17
+ {
+ mT__17();
+
+ }
+ break;
+ case 8 :
+ // InternalIDFComponentDsl.g:1:52: T__18
+ {
+ mT__18();
+
+ }
+ break;
+ case 9 :
+ // InternalIDFComponentDsl.g:1:58: T__19
+ {
+ mT__19();
+
+ }
+ break;
+ case 10 :
+ // InternalIDFComponentDsl.g:1:64: T__20
+ {
+ mT__20();
+
+ }
+ break;
+ case 11 :
+ // InternalIDFComponentDsl.g:1:70: RULE_ID
+ {
+ mRULE_ID();
+
+ }
+ break;
+ case 12 :
+ // InternalIDFComponentDsl.g:1:78: RULE_INT
+ {
+ mRULE_INT();
+
+ }
+ break;
+ case 13 :
+ // InternalIDFComponentDsl.g:1:87: RULE_STRING
+ {
+ mRULE_STRING();
+
+ }
+ break;
+ case 14 :
+ // InternalIDFComponentDsl.g:1:99: RULE_ML_COMMENT
+ {
+ mRULE_ML_COMMENT();
+
+ }
+ break;
+ case 15 :
+ // InternalIDFComponentDsl.g:1:115: RULE_SL_COMMENT
+ {
+ mRULE_SL_COMMENT();
+
+ }
+ break;
+ case 16 :
+ // InternalIDFComponentDsl.g:1:131: RULE_WS
+ {
+ mRULE_WS();
+
+ }
+ break;
+ case 17 :
+ // InternalIDFComponentDsl.g:1:139: RULE_ANY_OTHER
+ {
+ mRULE_ANY_OTHER();
+
+ }
+ break;
+
+ }
+
+ }
+
+
+ protected DFA12 dfa12 = new DFA12(this);
+ static final String DFA12_eotS =
+ "\1\uffff\3\23\1\uffff\1\23\1\uffff\3\23\1\21\2\uffff\3\21\2\uffff\1\23\1\uffff\2\23\1\uffff\1\23\1\uffff\3\23\5\uffff\13\23\2\uffff\16\23\1\uffff\3\23\1\uffff\3\23\1\uffff\12\23\1\uffff\2\23\1\uffff\1\23\1\uffff";
+ static final String DFA12_eofS =
+ "\125\uffff";
+ static final String DFA12_minS =
+ "\1\0\2\145\1\162\1\uffff\1\144\1\uffff\1\165\1\166\1\165\1\101\2\uffff\2\0\1\52\2\uffff\1\160\1\uffff\1\162\1\154\1\uffff\1\146\1\uffff\1\142\1\145\1\154\5\uffff\1\143\1\145\1\163\2\72\1\154\1\162\1\145\1\162\1\156\1\151\2\uffff\1\151\1\162\1\163\1\151\1\144\1\157\1\143\1\151\1\72\1\160\1\145\1\156\1\72\1\144\1\uffff\1\164\1\156\1\72\1\uffff\1\145\1\151\1\143\1\uffff\1\137\1\157\1\151\1\160\1\156\1\145\1\141\1\72\1\163\1\164\1\uffff\1\72\1\150\1\uffff\1\72\1\uffff";
+ static final String DFA12_maxS =
+ "\1\uffff\2\145\1\162\1\uffff\1\144\1\uffff\1\165\1\166\1\165\1\172\2\uffff\2\uffff\1\57\2\uffff\1\163\1\uffff\1\162\1\154\1\uffff\1\146\1\uffff\1\142\1\145\1\154\5\uffff\1\143\1\145\1\163\2\72\1\154\1\162\1\145\1\162\1\156\1\151\2\uffff\1\151\1\162\1\163\1\151\1\144\1\157\1\143\1\151\1\72\1\160\1\145\1\156\1\72\1\144\1\uffff\1\164\1\156\1\72\1\uffff\1\145\1\151\1\143\1\uffff\1\137\1\157\1\151\1\160\1\156\1\145\1\141\1\72\1\163\1\164\1\uffff\1\72\1\150\1\uffff\1\72\1\uffff";
+ static final String DFA12_acceptS =
+ "\4\uffff\1\4\1\uffff\1\7\4\uffff\1\13\1\14\3\uffff\1\20\1\21\1\uffff\1\13\2\uffff\1\4\1\uffff\1\7\3\uffff\1\14\1\15\1\16\1\17\1\20\13\uffff\1\3\1\6\16\uffff\1\12\3\uffff\1\10\3\uffff\1\2\12\uffff\1\1\2\uffff\1\5\1\uffff\1\11";
+ static final String DFA12_specialS =
+ "\1\1\14\uffff\1\2\1\0\106\uffff}>";
+ static final String[] DFA12_transitionS = {
+ "\11\21\2\20\2\21\1\20\22\21\1\20\1\21\1\15\1\4\3\21\1\16\7\21\1\17\12\14\1\6\6\21\32\13\3\21\1\12\1\13\1\21\3\13\1\1\4\13\1\5\5\13\1\10\1\7\1\13\1\11\2\13\1\3\1\2\4\13\uff85\21",
+ "\1\22",
+ "\1\24",
+ "\1\25",
+ "",
+ "\1\27",
+ "",
+ "\1\31",
+ "\1\32",
+ "\1\33",
+ "\32\23\4\uffff\1\23\1\uffff\32\23",
+ "",
+ "",
+ "\0\35",
+ "\0\35",
+ "\1\36\4\uffff\1\37",
+ "",
+ "",
+ "\1\42\2\uffff\1\41",
+ "",
+ "\1\43",
+ "\1\44",
+ "",
+ "\1\45",
+ "",
+ "\1\46",
+ "\1\47",
+ "\1\50",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "\1\51",
+ "\1\52",
+ "\1\53",
+ "\1\54",
+ "\1\55",
+ "\1\56",
+ "\1\57",
+ "\1\60",
+ "\1\61",
+ "\1\62",
+ "\1\63",
+ "",
+ "",
+ "\1\64",
+ "\1\65",
+ "\1\66",
+ "\1\67",
+ "\1\70",
+ "\1\71",
+ "\1\72",
+ "\1\73",
+ "\1\74",
+ "\1\75",
+ "\1\76",
+ "\1\77",
+ "\1\100",
+ "\1\101",
+ "",
+ "\1\102",
+ "\1\103",
+ "\1\104",
+ "",
+ "\1\105",
+ "\1\106",
+ "\1\107",
+ "",
+ "\1\110",
+ "\1\111",
+ "\1\112",
+ "\1\113",
+ "\1\114",
+ "\1\115",
+ "\1\116",
+ "\1\117",
+ "\1\120",
+ "\1\121",
+ "",
+ "\1\122",
+ "\1\123",
+ "",
+ "\1\124",
+ ""
+ };
+
+ static final short[] DFA12_eot = DFA.unpackEncodedString(DFA12_eotS);
+ static final short[] DFA12_eof = DFA.unpackEncodedString(DFA12_eofS);
+ static final char[] DFA12_min = DFA.unpackEncodedStringToUnsignedChars(DFA12_minS);
+ static final char[] DFA12_max = DFA.unpackEncodedStringToUnsignedChars(DFA12_maxS);
+ static final short[] DFA12_accept = DFA.unpackEncodedString(DFA12_acceptS);
+ static final short[] DFA12_special = DFA.unpackEncodedString(DFA12_specialS);
+ static final short[][] DFA12_transition;
+
+ static {
+ int numStates = DFA12_transitionS.length;
+ DFA12_transition = new short[numStates][];
+ for (int i=0; i+ * Contexts: + * Type returns COMMENT + * COMMENT returns COMMENT + * + * Constraint: + * name=ID+ + *+ */ + protected void sequence_COMMENT(ISerializationContext context, COMMENT semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + *
+ * Contexts: + * Feature returns COMPONENT_NAME + * COMPONENT_NAME returns COMPONENT_NAME + * + * Constraint: + * (name=ID features+=COMPONENT_NAME_FEATURE*) + *+ */ + protected void sequence_COMPONENT_NAME(ISerializationContext context, COMPONENT_NAME semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + *
+ * Contexts: + * ComponentModel returns ComponentModel + * + * Constraint: + * elements+=Type+ + *+ */ + protected void sequence_ComponentModel(ISerializationContext context, ComponentModel semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + *
+ * Contexts: + * Type returns DependenciesComp + * DependenciesComp returns DependenciesComp + * + * Constraint: + * features+=Feature+ + *+ */ + protected void sequence_DependenciesComp(ISerializationContext context, DependenciesComp semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + *
+ * Contexts: + * Type returns Description + * Description returns Description + * + * Constraint: + * name=STRING + *+ */ + protected void sequence_Description(ISerializationContext context, Description semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, IDFComponentDslPackage.Literals.DESCRIPTION__NAME) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, IDFComponentDslPackage.Literals.DESCRIPTION__NAME)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getDescriptionAccess().getNameSTRINGTerminalRuleCall_1_0(), semanticObject.getName()); + feeder.finish(); + } + + + /** + *
+ * Contexts: + * Feature returns IDF + * IDF returns IDF + * + * Constraint: + * name=STRING + *+ */ + protected void sequence_IDF(ISerializationContext context, IDF semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, IDFComponentDslPackage.Literals.FEATURE__NAME) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, IDFComponentDslPackage.Literals.FEATURE__NAME)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getIDFAccess().getNameSTRINGTerminalRuleCall_1_0(), semanticObject.getName()); + feeder.finish(); + } + + + /** + *
+ * Contexts: + * Feature returns OVERRIDE_PATH + * OVERRIDE_PATH returns OVERRIDE_PATH + * + * Constraint: + * name=STRING + *+ */ + protected void sequence_OVERRIDE_PATH(ISerializationContext context, OVERRIDE_PATH semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, IDFComponentDslPackage.Literals.FEATURE__NAME) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, IDFComponentDslPackage.Literals.FEATURE__NAME)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getOVERRIDE_PATHAccess().getNameSTRINGTerminalRuleCall_1_0(), semanticObject.getName()); + feeder.finish(); + } + + + /** + *
+ * Contexts: + * COMPONENT_NAME_FEATURE returns PUBLIC + * PUBLIC returns PUBLIC + * + * Constraint: + * name=ID + *+ */ + protected void sequence_PUBLIC(ISerializationContext context, PUBLIC semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, IDFComponentDslPackage.Literals.COMPONENT_NAME_FEATURE__NAME) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, IDFComponentDslPackage.Literals.COMPONENT_NAME_FEATURE__NAME)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getPUBLICAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName()); + feeder.finish(); + } + + + /** + *
+ * Contexts: + * COMPONENT_NAME_FEATURE returns RULES + * RULES returns RULES + * + * Constraint: + * name=STRING + *+ */ + protected void sequence_RULES(ISerializationContext context, RULES semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, IDFComponentDslPackage.Literals.COMPONENT_NAME_FEATURE__NAME) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, IDFComponentDslPackage.Literals.COMPONENT_NAME_FEATURE__NAME)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getRULESAccess().getNameSTRINGTerminalRuleCall_1_0(), semanticObject.getName()); + feeder.finish(); + } + + + /** + *
+ * Contexts: + * Type returns URL + * URL returns URL + * + * Constraint: + * name=STRING + *+ */ + protected void sequence_URL(ISerializationContext context, URL semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, IDFComponentDslPackage.Literals.URL__NAME) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, IDFComponentDslPackage.Literals.URL__NAME)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getURLAccess().getNameSTRINGTerminalRuleCall_1_0(), semanticObject.getName()); + feeder.finish(); + } + + + /** + *
+ * Contexts: + * Type returns VersionInfo + * VersionInfo returns VersionInfo + * + * Constraint: + * name=STRING + *+ */ + protected void sequence_VersionInfo(ISerializationContext context, VersionInfo semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, IDFComponentDslPackage.Literals.VERSION_INFO__NAME) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, IDFComponentDslPackage.Literals.VERSION_INFO__NAME)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getVersionInfoAccess().getNameSTRINGTerminalRuleCall_1_0(), semanticObject.getName()); + feeder.finish(); + } + + +} diff --git a/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/serializer/IDFComponentDslSyntacticSequencer.java b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/serializer/IDFComponentDslSyntacticSequencer.java new file mode 100644 index 000000000..7505117db --- /dev/null +++ b/bundles/com.espressif.idf.component.dsl.parent/com.espressif.idf.component.dsl/src-gen/com/espressif/idf/componen/serializer/IDFComponentDslSyntacticSequencer.java @@ -0,0 +1,64 @@ +/* + * generated by Xtext 2.28.0 + */ +package com.espressif.idf.componen.serializer; + +import com.espressif.idf.componen.services.IDFComponentDslGrammarAccess; +import com.google.inject.Inject; +import java.util.List; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.IGrammarAccess; +import org.eclipse.xtext.RuleCall; +import org.eclipse.xtext.nodemodel.INode; +import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias; +import org.eclipse.xtext.serializer.analysis.GrammarAlias.AlternativeAlias; +import org.eclipse.xtext.serializer.analysis.GrammarAlias.TokenAlias; +import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynNavigable; +import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition; +import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer; + +@SuppressWarnings("all") +public class IDFComponentDslSyntacticSequencer extends AbstractSyntacticSequencer { + + protected IDFComponentDslGrammarAccess grammarAccess; + protected AbstractElementAlias match_COMMENT_DependenciesComp_DependenciesKeyword_0_or_NumberSignKeyword_0; + + @Inject + protected void init(IGrammarAccess access) { + grammarAccess = (IDFComponentDslGrammarAccess) access; + match_COMMENT_DependenciesComp_DependenciesKeyword_0_or_NumberSignKeyword_0 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getCOMMENTAccess().getNumberSignKeyword_0()), new TokenAlias(false, false, grammarAccess.getDependenciesCompAccess().getDependenciesKeyword_0())); + } + + @Override + protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) { + return ""; + } + + + @Override + protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) { + if (transition.getAmbiguousSyntaxes().isEmpty()) return; + List
+ * Ambiguous syntax: + * '#' | 'dependencies:' + * + * This ambiguous syntax occurs at: + * (rule start) (ambiguity) (rule start) + + *+ */ + protected void emit_COMMENT_DependenciesComp_DependenciesKeyword_0_or_NumberSignKeyword_0(EObject semanticObject, ISynNavigable transition, List