diff --git a/org.eclipse.xtext/emf-gen/org/eclipse/xtext/Grammar.java b/org.eclipse.xtext/emf-gen/org/eclipse/xtext/Grammar.java index 43cc2c261..775459ed9 100644 --- a/org.eclipse.xtext/emf-gen/org/eclipse/xtext/Grammar.java +++ b/org.eclipse.xtext/emf-gen/org/eclipse/xtext/Grammar.java @@ -22,6 +22,8 @@ import org.eclipse.emf.ecore.EObject; *
  • {@link org.eclipse.xtext.Grammar#getMetamodelDeclarations Metamodel Declarations}
  • *
  • {@link org.eclipse.xtext.Grammar#getRules Rules}
  • *
  • {@link org.eclipse.xtext.Grammar#getInitBlock Init Block}
  • + *
  • {@link org.eclipse.xtext.Grammar#getTokenLimit Token Limit}
  • + *
  • {@link org.eclipse.xtext.Grammar#isDebug Debug}
  • * * * @see org.eclipse.xtext.XtextPackage#getGrammar() @@ -167,4 +169,48 @@ public interface Grammar extends EObject { */ void setInitBlock(InitBlock value); + /** + * Returns the value of the 'Token Limit' attribute. + * + * + * @return the value of the 'Token Limit' attribute. + * @see #setTokenLimit(int) + * @see org.eclipse.xtext.XtextPackage#getGrammar_TokenLimit() + * @model + * @generated + */ + int getTokenLimit(); + + /** + * Sets the value of the '{@link org.eclipse.xtext.Grammar#getTokenLimit Token Limit}' attribute. + * + * + * @param value the new value of the 'Token Limit' attribute. + * @see #getTokenLimit() + * @generated + */ + void setTokenLimit(int value); + + /** + * Returns the value of the 'Debug' attribute. + * + * + * @return the value of the 'Debug' attribute. + * @see #setDebug(boolean) + * @see org.eclipse.xtext.XtextPackage#getGrammar_Debug() + * @model + * @generated + */ + boolean isDebug(); + + /** + * Sets the value of the '{@link org.eclipse.xtext.Grammar#isDebug Debug}' attribute. + * + * + * @param value the new value of the 'Debug' attribute. + * @see #isDebug() + * @generated + */ + void setDebug(boolean value); + } // Grammar diff --git a/org.eclipse.xtext/emf-gen/org/eclipse/xtext/XtextPackage.java b/org.eclipse.xtext/emf-gen/org/eclipse/xtext/XtextPackage.java index a0d86fd8e..12f6525b0 100644 --- a/org.eclipse.xtext/emf-gen/org/eclipse/xtext/XtextPackage.java +++ b/org.eclipse.xtext/emf-gen/org/eclipse/xtext/XtextPackage.java @@ -130,6 +130,24 @@ public interface XtextPackage extends EPackage { */ int GRAMMAR__INIT_BLOCK = 6; + /** + * The feature id for the 'Token Limit' attribute. + * + * + * @generated + * @ordered + */ + int GRAMMAR__TOKEN_LIMIT = 7; + + /** + * The feature id for the 'Debug' attribute. + * + * + * @generated + * @ordered + */ + int GRAMMAR__DEBUG = 8; + /** * The number of structural features of the 'Grammar' class. * @@ -137,7 +155,7 @@ public interface XtextPackage extends EPackage { * @generated * @ordered */ - int GRAMMAR_FEATURE_COUNT = 7; + int GRAMMAR_FEATURE_COUNT = 9; /** * The meta object id for the '{@link org.eclipse.xtext.impl.AbstractRuleImpl Abstract Rule}' class. @@ -2305,6 +2323,28 @@ public interface XtextPackage extends EPackage { */ EReference getGrammar_InitBlock(); + /** + * Returns the meta object for the attribute '{@link org.eclipse.xtext.Grammar#getTokenLimit Token Limit}'. + * + * + * @return the meta object for the attribute 'Token Limit'. + * @see org.eclipse.xtext.Grammar#getTokenLimit() + * @see #getGrammar() + * @generated + */ + EAttribute getGrammar_TokenLimit(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.xtext.Grammar#isDebug Debug}'. + * + * + * @return the meta object for the attribute 'Debug'. + * @see org.eclipse.xtext.Grammar#isDebug() + * @see #getGrammar() + * @generated + */ + EAttribute getGrammar_Debug(); + /** * Returns the meta object for class '{@link org.eclipse.xtext.AbstractRule Abstract Rule}'. * @@ -3389,6 +3429,22 @@ public interface XtextPackage extends EPackage { */ EReference GRAMMAR__INIT_BLOCK = eINSTANCE.getGrammar_InitBlock(); + /** + * The meta object literal for the 'Token Limit' attribute feature. + * + * + * @generated + */ + EAttribute GRAMMAR__TOKEN_LIMIT = eINSTANCE.getGrammar_TokenLimit(); + + /** + * The meta object literal for the 'Debug' attribute feature. + * + * + * @generated + */ + EAttribute GRAMMAR__DEBUG = eINSTANCE.getGrammar_Debug(); + /** * The meta object literal for the '{@link org.eclipse.xtext.impl.AbstractRuleImpl Abstract Rule}' class. * diff --git a/org.eclipse.xtext/emf-gen/org/eclipse/xtext/impl/GrammarImpl.java b/org.eclipse.xtext/emf-gen/org/eclipse/xtext/impl/GrammarImpl.java index 3c4e974ea..b7b57f5ce 100644 --- a/org.eclipse.xtext/emf-gen/org/eclipse/xtext/impl/GrammarImpl.java +++ b/org.eclipse.xtext/emf-gen/org/eclipse/xtext/impl/GrammarImpl.java @@ -41,6 +41,8 @@ import org.eclipse.xtext.XtextPackage; *
  • {@link org.eclipse.xtext.impl.GrammarImpl#getMetamodelDeclarations Metamodel Declarations}
  • *
  • {@link org.eclipse.xtext.impl.GrammarImpl#getRules Rules}
  • *
  • {@link org.eclipse.xtext.impl.GrammarImpl#getInitBlock Init Block}
  • + *
  • {@link org.eclipse.xtext.impl.GrammarImpl#getTokenLimit Token Limit}
  • + *
  • {@link org.eclipse.xtext.impl.GrammarImpl#isDebug Debug}
  • * * * @generated @@ -136,6 +138,46 @@ public class GrammarImpl extends MinimalEObjectImpl.Container implements Grammar */ protected InitBlock initBlock; + /** + * The default value of the '{@link #getTokenLimit() Token Limit}' attribute. + * + * + * @see #getTokenLimit() + * @generated + * @ordered + */ + protected static final int TOKEN_LIMIT_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getTokenLimit() Token Limit}' attribute. + * + * + * @see #getTokenLimit() + * @generated + * @ordered + */ + protected int tokenLimit = TOKEN_LIMIT_EDEFAULT; + + /** + * The default value of the '{@link #isDebug() Debug}' attribute. + * + * + * @see #isDebug() + * @generated + * @ordered + */ + protected static final boolean DEBUG_EDEFAULT = false; + + /** + * The cached value of the '{@link #isDebug() Debug}' attribute. + * + * + * @see #isDebug() + * @generated + * @ordered + */ + protected boolean debug = DEBUG_EDEFAULT; + /** * * @@ -298,6 +340,52 @@ public class GrammarImpl extends MinimalEObjectImpl.Container implements Grammar eNotify(new ENotificationImpl(this, Notification.SET, XtextPackage.GRAMMAR__INIT_BLOCK, newInitBlock, newInitBlock)); } + /** + * + * + * @generated + */ + @Override + public int getTokenLimit() { + return tokenLimit; + } + + /** + * + * + * @generated + */ + @Override + public void setTokenLimit(int newTokenLimit) { + int oldTokenLimit = tokenLimit; + tokenLimit = newTokenLimit; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, XtextPackage.GRAMMAR__TOKEN_LIMIT, oldTokenLimit, tokenLimit)); + } + + /** + * + * + * @generated + */ + @Override + public boolean isDebug() { + return debug; + } + + /** + * + * + * @generated + */ + @Override + public void setDebug(boolean newDebug) { + boolean oldDebug = debug; + debug = newDebug; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, XtextPackage.GRAMMAR__DEBUG, oldDebug, debug)); + } + /** * * @@ -338,6 +426,10 @@ public class GrammarImpl extends MinimalEObjectImpl.Container implements Grammar return getRules(); case XtextPackage.GRAMMAR__INIT_BLOCK: return getInitBlock(); + case XtextPackage.GRAMMAR__TOKEN_LIMIT: + return getTokenLimit(); + case XtextPackage.GRAMMAR__DEBUG: + return isDebug(); } return super.eGet(featureID, resolve, coreType); } @@ -376,6 +468,12 @@ public class GrammarImpl extends MinimalEObjectImpl.Container implements Grammar case XtextPackage.GRAMMAR__INIT_BLOCK: setInitBlock((InitBlock)newValue); return; + case XtextPackage.GRAMMAR__TOKEN_LIMIT: + setTokenLimit((Integer)newValue); + return; + case XtextPackage.GRAMMAR__DEBUG: + setDebug((Boolean)newValue); + return; } super.eSet(featureID, newValue); } @@ -409,6 +507,12 @@ public class GrammarImpl extends MinimalEObjectImpl.Container implements Grammar case XtextPackage.GRAMMAR__INIT_BLOCK: setInitBlock((InitBlock)null); return; + case XtextPackage.GRAMMAR__TOKEN_LIMIT: + setTokenLimit(TOKEN_LIMIT_EDEFAULT); + return; + case XtextPackage.GRAMMAR__DEBUG: + setDebug(DEBUG_EDEFAULT); + return; } super.eUnset(featureID); } @@ -435,6 +539,10 @@ public class GrammarImpl extends MinimalEObjectImpl.Container implements Grammar return rules != null && !rules.isEmpty(); case XtextPackage.GRAMMAR__INIT_BLOCK: return initBlock != null; + case XtextPackage.GRAMMAR__TOKEN_LIMIT: + return tokenLimit != TOKEN_LIMIT_EDEFAULT; + case XtextPackage.GRAMMAR__DEBUG: + return debug != DEBUG_EDEFAULT; } return super.eIsSet(featureID); } @@ -453,6 +561,10 @@ public class GrammarImpl extends MinimalEObjectImpl.Container implements Grammar result.append(name); result.append(", definesHiddenTokens: "); result.append(definesHiddenTokens); + result.append(", tokenLimit: "); + result.append(tokenLimit); + result.append(", debug: "); + result.append(debug); result.append(')'); return result.toString(); } diff --git a/org.eclipse.xtext/emf-gen/org/eclipse/xtext/impl/XtextPackageImpl.java b/org.eclipse.xtext/emf-gen/org/eclipse/xtext/impl/XtextPackageImpl.java index dacd9e411..c1b29d309 100644 --- a/org.eclipse.xtext/emf-gen/org/eclipse/xtext/impl/XtextPackageImpl.java +++ b/org.eclipse.xtext/emf-gen/org/eclipse/xtext/impl/XtextPackageImpl.java @@ -499,6 +499,26 @@ public class XtextPackageImpl extends EPackageImpl implements XtextPackage { return (EReference)grammarEClass.getEStructuralFeatures().get(6); } + /** + * + * + * @generated + */ + @Override + public EAttribute getGrammar_TokenLimit() { + return (EAttribute)grammarEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getGrammar_Debug() { + return (EAttribute)grammarEClass.getEStructuralFeatures().get(8); + } + /** * * @@ -1467,6 +1487,8 @@ public class XtextPackageImpl extends EPackageImpl implements XtextPackage { createEReference(grammarEClass, GRAMMAR__METAMODEL_DECLARATIONS); createEReference(grammarEClass, GRAMMAR__RULES); createEReference(grammarEClass, GRAMMAR__INIT_BLOCK); + createEAttribute(grammarEClass, GRAMMAR__TOKEN_LIMIT); + createEAttribute(grammarEClass, GRAMMAR__DEBUG); abstractRuleEClass = createEClass(ABSTRACT_RULE); createEAttribute(abstractRuleEClass, ABSTRACT_RULE__NAME); @@ -1674,6 +1696,8 @@ public class XtextPackageImpl extends EPackageImpl implements XtextPackage { initEReference(getGrammar_MetamodelDeclarations(), this.getAbstractMetamodelDeclaration(), null, "metamodelDeclarations", null, 0, -1, Grammar.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getGrammar_Rules(), this.getAbstractRule(), null, "rules", null, 0, -1, Grammar.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getGrammar_InitBlock(), this.getInitBlock(), null, "initBlock", null, 0, 1, Grammar.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGrammar_TokenLimit(), ecorePackage.getEInt(), "tokenLimit", null, 0, 1, Grammar.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGrammar_Debug(), ecorePackage.getEBoolean(), "debug", null, 0, 1, Grammar.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(abstractRuleEClass, AbstractRule.class, "AbstractRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getAbstractRule_Name(), theEcorePackage.getEString(), "name", null, 0, 1, AbstractRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); diff --git a/org.eclipse.xtext/org/eclipse/xtext/Xtext.ecore b/org.eclipse.xtext/org/eclipse/xtext/Xtext.ecore index 1a7696c0e..1ab932718 100644 --- a/org.eclipse.xtext/org/eclipse/xtext/Xtext.ecore +++ b/org.eclipse.xtext/org/eclipse/xtext/Xtext.ecore @@ -14,6 +14,8 @@ eType="#//AbstractRule" containment="true"/> + + diff --git a/org.eclipse.xtext/org/eclipse/xtext/Xtext.genmodel b/org.eclipse.xtext/org/eclipse/xtext/Xtext.genmodel index 12ea2fea4..e88527ea0 100644 --- a/org.eclipse.xtext/org/eclipse/xtext/Xtext.genmodel +++ b/org.eclipse.xtext/org/eclipse/xtext/Xtext.genmodel @@ -17,6 +17,8 @@ + +