Logo Search packages:      
Sourcecode: wesnoth-1.9 version File versions  Download package

WMLParsetreeConstructor.java

/*
* generated by Xtext
*/
package org.wesnoth.parseTreeConstruction;

import org.eclipse.emf.ecore.*;
import org.eclipse.xtext.*;
import org.eclipse.xtext.parsetree.reconstr.IEObjectConsumer;
import org.eclipse.xtext.parsetree.reconstr.impl.AbstractParseTreeConstructor;

import org.wesnoth.services.WMLGrammarAccess;

import com.google.inject.Inject;

@SuppressWarnings("all")
public class WMLParsetreeConstructor extends AbstractParseTreeConstructor {
            
      @Inject
      private WMLGrammarAccess grammarAccess;
      
      @Override
      protected AbstractToken getRootToken(IEObjectConsumer inst) {
            return new ThisRootNode(inst);      
      }
      
protected class ThisRootNode extends RootToken {
      public ThisRootNode(IEObjectConsumer inst) {
            super(inst);
      }
      
      @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLRoot_Alternatives(this, this, 0, inst);
                  case 1: return new WMLTag_Group(this, this, 1, inst);
                  case 2: return new WMLKey_Group(this, this, 2, inst);
                  case 3: return new WMLKeyValue_Alternatives(this, this, 3, inst);
                  case 4: return new WMLMacroCall_Group(this, this, 4, inst);
                  case 5: return new WMLLuaCode_ValueAssignment(this, this, 5, inst);
                  case 6: return new WMLArrayCall_Group(this, this, 6, inst);
                  case 7: return new WMLMacroDefine_Group(this, this, 7, inst);
                  case 8: return new WMLPreprocIF_Group(this, this, 8, inst);
                  case 9: return new WMLTextdomain_NameAssignment(this, this, 9, inst);
                  case 10: return new WMLValue_ValueAssignment(this, this, 10, inst);
                  case 11: return new MacroTokens_ValAssignment(this, this, 11, inst);
                  default: return null;
            }     
      }     
}
      

/************ begin Rule WMLRoot ****************
 *
 * WMLRoot:
 *    (Tags+=WMLTag | MacroCalls+=WMLMacroCall | MacroDefines+=WMLMacroDefine | Textdomains+=WMLTextdomain |
 *    IfDefs+=WMLPreprocIF)*;
 *
 **/

// (Tags+=WMLTag | MacroCalls+=WMLMacroCall | MacroDefines+=WMLMacroDefine | Textdomains+=WMLTextdomain |
// IfDefs+=WMLPreprocIF)*
protected class WMLRoot_Alternatives extends AlternativesToken {

      public WMLRoot_Alternatives(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Alternatives getGrammarElement() {
            return grammarAccess.getWMLRootAccess().getAlternatives();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLRoot_TagsAssignment_0(lastRuleCallOrigin, this, 0, inst);
                  case 1: return new WMLRoot_MacroCallsAssignment_1(lastRuleCallOrigin, this, 1, inst);
                  case 2: return new WMLRoot_MacroDefinesAssignment_2(lastRuleCallOrigin, this, 2, inst);
                  case 3: return new WMLRoot_TextdomainsAssignment_3(lastRuleCallOrigin, this, 3, inst);
                  case 4: return new WMLRoot_IfDefsAssignment_4(lastRuleCallOrigin, this, 4, inst);
                  default: return null;
            }     
      }

}

// Tags+=WMLTag
protected class WMLRoot_TagsAssignment_0 extends AssignmentToken  {
      
      public WMLRoot_TagsAssignment_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLRootAccess().getTagsAssignment_0();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLTag_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("Tags",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("Tags");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLTagRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLRootAccess().getTagsWMLTagParserRuleCall_0_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLRoot_Alternatives(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index - 1, consumed);
            }     
      }     
}

// MacroCalls+=WMLMacroCall
protected class WMLRoot_MacroCallsAssignment_1 extends AssignmentToken  {
      
      public WMLRoot_MacroCallsAssignment_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLRootAccess().getMacroCallsAssignment_1();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLMacroCall_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("MacroCalls",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("MacroCalls");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLMacroCallRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLRootAccess().getMacroCallsWMLMacroCallParserRuleCall_1_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLRoot_Alternatives(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index - 1, consumed);
            }     
      }     
}

// MacroDefines+=WMLMacroDefine
protected class WMLRoot_MacroDefinesAssignment_2 extends AssignmentToken  {
      
      public WMLRoot_MacroDefinesAssignment_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLRootAccess().getMacroDefinesAssignment_2();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLMacroDefine_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("MacroDefines",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("MacroDefines");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLMacroDefineRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLRootAccess().getMacroDefinesWMLMacroDefineParserRuleCall_2_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLRoot_Alternatives(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index - 1, consumed);
            }     
      }     
}

// Textdomains+=WMLTextdomain
protected class WMLRoot_TextdomainsAssignment_3 extends AssignmentToken  {
      
      public WMLRoot_TextdomainsAssignment_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLRootAccess().getTextdomainsAssignment_3();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLTextdomain_NameAssignment(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("Textdomains",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("Textdomains");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLTextdomainRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLRootAccess().getTextdomainsWMLTextdomainParserRuleCall_3_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLRoot_Alternatives(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index - 1, consumed);
            }     
      }     
}

// IfDefs+=WMLPreprocIF
protected class WMLRoot_IfDefsAssignment_4 extends AssignmentToken  {
      
      public WMLRoot_IfDefsAssignment_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLRootAccess().getIfDefsAssignment_4();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLPreprocIF_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("IfDefs",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("IfDefs");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLPreprocIFRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLRootAccess().getIfDefsWMLPreprocIFParserRuleCall_4_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLRoot_Alternatives(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index - 1, consumed);
            }     
      }     
}


/************ end Rule WMLRoot ****************/


/************ begin Rule WMLTag ****************
 *
 * WMLTag:
 *    "[" plus?="+"? name=ID "]" (Tags+=WMLTag | Keys+=WMLKey | MacroCalls+=WMLMacroCall | MacroDefines+=WMLMacroDefine |
 *    Textdomains+=WMLTextdomain | IfDefs+=WMLPreprocIF)* "[/" endName=ID "]";
 *
 **/

// "[" plus?="+"? name=ID "]" (Tags+=WMLTag | Keys+=WMLKey | MacroCalls+=WMLMacroCall | MacroDefines+=WMLMacroDefine |
// Textdomains+=WMLTextdomain | IfDefs+=WMLPreprocIF)* "[/" endName=ID "]"
protected class WMLTag_Group extends GroupToken {
      
      public WMLTag_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Group getGrammarElement() {
            return grammarAccess.getWMLTagAccess().getGroup();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLTag_RightSquareBracketKeyword_7(lastRuleCallOrigin, this, 0, inst);
                  default: return null;
            }     
      }

    @Override
      public IEObjectConsumer tryConsume() {
            if(getEObject().eClass() != grammarAccess.getWMLTagRule().getType().getClassifier())
                  return null;
            return eObjectConsumer;
      }

}

// "["
protected class WMLTag_LeftSquareBracketKeyword_0 extends KeywordToken  {
      
      public WMLTag_LeftSquareBracketKeyword_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Keyword getGrammarElement() {
            return grammarAccess.getWMLTagAccess().getLeftSquareBracketKeyword_0();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
            }     
      }

}

// plus?="+"?
protected class WMLTag_PlusAssignment_1 extends AssignmentToken  {
      
      public WMLTag_PlusAssignment_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLTagAccess().getPlusAssignment_1();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLTag_LeftSquareBracketKeyword_0(lastRuleCallOrigin, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("plus",false)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("plus");
            if(Boolean.TRUE.equals(value)) { // org::eclipse::xtext::impl::KeywordImpl
                  type = AssignmentType.KEYWORD;
                  element = grammarAccess.getWMLTagAccess().getPlusPlusSignKeyword_1_0();
                  return obj;
            }
            return null;
      }

}

// name=ID
protected class WMLTag_NameAssignment_2 extends AssignmentToken  {
      
      public WMLTag_NameAssignment_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLTagAccess().getNameAssignment_2();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLTag_PlusAssignment_1(lastRuleCallOrigin, this, 0, inst);
                  case 1: return new WMLTag_LeftSquareBracketKeyword_0(lastRuleCallOrigin, this, 1, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("name",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("name");
            if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLTagAccess().getNameIDTerminalRuleCall_2_0(), value, null)) {
                  type = AssignmentType.TERMINAL_RULE_CALL;
                  element = grammarAccess.getWMLTagAccess().getNameIDTerminalRuleCall_2_0();
                  return obj;
            }
            return null;
      }

}

// "]"
protected class WMLTag_RightSquareBracketKeyword_3 extends KeywordToken  {
      
      public WMLTag_RightSquareBracketKeyword_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Keyword getGrammarElement() {
            return grammarAccess.getWMLTagAccess().getRightSquareBracketKeyword_3();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLTag_NameAssignment_2(lastRuleCallOrigin, this, 0, inst);
                  default: return null;
            }     
      }

}

// (Tags+=WMLTag | Keys+=WMLKey | MacroCalls+=WMLMacroCall | MacroDefines+=WMLMacroDefine | Textdomains+=WMLTextdomain |
// IfDefs+=WMLPreprocIF)*
protected class WMLTag_Alternatives_4 extends AlternativesToken {

      public WMLTag_Alternatives_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Alternatives getGrammarElement() {
            return grammarAccess.getWMLTagAccess().getAlternatives_4();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLTag_TagsAssignment_4_0(lastRuleCallOrigin, this, 0, inst);
                  case 1: return new WMLTag_KeysAssignment_4_1(lastRuleCallOrigin, this, 1, inst);
                  case 2: return new WMLTag_MacroCallsAssignment_4_2(lastRuleCallOrigin, this, 2, inst);
                  case 3: return new WMLTag_MacroDefinesAssignment_4_3(lastRuleCallOrigin, this, 3, inst);
                  case 4: return new WMLTag_TextdomainsAssignment_4_4(lastRuleCallOrigin, this, 4, inst);
                  case 5: return new WMLTag_IfDefsAssignment_4_5(lastRuleCallOrigin, this, 5, inst);
                  default: return null;
            }     
      }

}

// Tags+=WMLTag
protected class WMLTag_TagsAssignment_4_0 extends AssignmentToken  {
      
      public WMLTag_TagsAssignment_4_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLTagAccess().getTagsAssignment_4_0();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLTag_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("Tags",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("Tags");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLTagRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLTagAccess().getTagsWMLTagParserRuleCall_4_0_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLTag_Alternatives_4(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLTag_RightSquareBracketKeyword_3(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// Keys+=WMLKey
protected class WMLTag_KeysAssignment_4_1 extends AssignmentToken  {
      
      public WMLTag_KeysAssignment_4_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLTagAccess().getKeysAssignment_4_1();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLKey_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("Keys",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("Keys");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLKeyRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLTagAccess().getKeysWMLKeyParserRuleCall_4_1_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLTag_Alternatives_4(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLTag_RightSquareBracketKeyword_3(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// MacroCalls+=WMLMacroCall
protected class WMLTag_MacroCallsAssignment_4_2 extends AssignmentToken  {
      
      public WMLTag_MacroCallsAssignment_4_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLTagAccess().getMacroCallsAssignment_4_2();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLMacroCall_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("MacroCalls",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("MacroCalls");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLMacroCallRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLTagAccess().getMacroCallsWMLMacroCallParserRuleCall_4_2_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLTag_Alternatives_4(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLTag_RightSquareBracketKeyword_3(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// MacroDefines+=WMLMacroDefine
protected class WMLTag_MacroDefinesAssignment_4_3 extends AssignmentToken  {
      
      public WMLTag_MacroDefinesAssignment_4_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLTagAccess().getMacroDefinesAssignment_4_3();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLMacroDefine_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("MacroDefines",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("MacroDefines");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLMacroDefineRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLTagAccess().getMacroDefinesWMLMacroDefineParserRuleCall_4_3_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLTag_Alternatives_4(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLTag_RightSquareBracketKeyword_3(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// Textdomains+=WMLTextdomain
protected class WMLTag_TextdomainsAssignment_4_4 extends AssignmentToken  {
      
      public WMLTag_TextdomainsAssignment_4_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLTagAccess().getTextdomainsAssignment_4_4();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLTextdomain_NameAssignment(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("Textdomains",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("Textdomains");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLTextdomainRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLTagAccess().getTextdomainsWMLTextdomainParserRuleCall_4_4_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLTag_Alternatives_4(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLTag_RightSquareBracketKeyword_3(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// IfDefs+=WMLPreprocIF
protected class WMLTag_IfDefsAssignment_4_5 extends AssignmentToken  {
      
      public WMLTag_IfDefsAssignment_4_5(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLTagAccess().getIfDefsAssignment_4_5();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLPreprocIF_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("IfDefs",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("IfDefs");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLPreprocIFRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLTagAccess().getIfDefsWMLPreprocIFParserRuleCall_4_5_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLTag_Alternatives_4(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLTag_RightSquareBracketKeyword_3(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}


// "[/"
protected class WMLTag_LeftSquareBracketSolidusKeyword_5 extends KeywordToken  {
      
      public WMLTag_LeftSquareBracketSolidusKeyword_5(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Keyword getGrammarElement() {
            return grammarAccess.getWMLTagAccess().getLeftSquareBracketSolidusKeyword_5();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLTag_Alternatives_4(lastRuleCallOrigin, this, 0, inst);
                  case 1: return new WMLTag_RightSquareBracketKeyword_3(lastRuleCallOrigin, this, 1, inst);
                  default: return null;
            }     
      }

}

// endName=ID
protected class WMLTag_EndNameAssignment_6 extends AssignmentToken  {
      
      public WMLTag_EndNameAssignment_6(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLTagAccess().getEndNameAssignment_6();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLTag_LeftSquareBracketSolidusKeyword_5(lastRuleCallOrigin, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("endName",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("endName");
            if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLTagAccess().getEndNameIDTerminalRuleCall_6_0(), value, null)) {
                  type = AssignmentType.TERMINAL_RULE_CALL;
                  element = grammarAccess.getWMLTagAccess().getEndNameIDTerminalRuleCall_6_0();
                  return obj;
            }
            return null;
      }

}

// "]"
protected class WMLTag_RightSquareBracketKeyword_7 extends KeywordToken  {
      
      public WMLTag_RightSquareBracketKeyword_7(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Keyword getGrammarElement() {
            return grammarAccess.getWMLTagAccess().getRightSquareBracketKeyword_7();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLTag_EndNameAssignment_6(lastRuleCallOrigin, this, 0, inst);
                  default: return null;
            }     
      }

}


/************ end Rule WMLTag ****************/


/************ begin Rule WMLKey ****************
 *
 * WMLKey hidden(WS):
 *    name=ID "=" value+=WMLKeyValue* (EOL? "+" EOL? value+=WMLKeyValue+)* eol=(EOL | SL_COMMENT);
 *
 **/

// name=ID "=" value+=WMLKeyValue* (EOL? "+" EOL? value+=WMLKeyValue+)* eol=(EOL | SL_COMMENT)
protected class WMLKey_Group extends GroupToken {
      
      public WMLKey_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Group getGrammarElement() {
            return grammarAccess.getWMLKeyAccess().getGroup();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLKey_EolAssignment_4(lastRuleCallOrigin, this, 0, inst);
                  default: return null;
            }     
      }

    @Override
      public IEObjectConsumer tryConsume() {
            if(getEObject().eClass() != grammarAccess.getWMLKeyRule().getType().getClassifier())
                  return null;
            return eObjectConsumer;
      }

}

// name=ID
protected class WMLKey_NameAssignment_0 extends AssignmentToken  {
      
      public WMLKey_NameAssignment_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLKeyAccess().getNameAssignment_0();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("name",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("name");
            if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLKeyAccess().getNameIDTerminalRuleCall_0_0(), value, null)) {
                  type = AssignmentType.TERMINAL_RULE_CALL;
                  element = grammarAccess.getWMLKeyAccess().getNameIDTerminalRuleCall_0_0();
                  return obj;
            }
            return null;
      }

}

// "="
protected class WMLKey_EqualsSignKeyword_1 extends KeywordToken  {
      
      public WMLKey_EqualsSignKeyword_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Keyword getGrammarElement() {
            return grammarAccess.getWMLKeyAccess().getEqualsSignKeyword_1();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLKey_NameAssignment_0(lastRuleCallOrigin, this, 0, inst);
                  default: return null;
            }     
      }

}

// value+=WMLKeyValue*
protected class WMLKey_ValueAssignment_2 extends AssignmentToken  {
      
      public WMLKey_ValueAssignment_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLKeyAccess().getValueAssignment_2();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLKeyValue_Alternatives(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("value",false)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("value");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLKeyValueRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLKeyAccess().getValueWMLKeyValueParserRuleCall_2_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLKey_ValueAssignment_2(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLKey_EqualsSignKeyword_1(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// (EOL? "+" EOL? value+=WMLKeyValue+)*
protected class WMLKey_Group_3 extends GroupToken {
      
      public WMLKey_Group_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Group getGrammarElement() {
            return grammarAccess.getWMLKeyAccess().getGroup_3();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLKey_ValueAssignment_3_3(lastRuleCallOrigin, this, 0, inst);
                  default: return null;
            }     
      }

}

// "+"
protected class WMLKey_PlusSignKeyword_3_1 extends KeywordToken  {
      
      public WMLKey_PlusSignKeyword_3_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Keyword getGrammarElement() {
            return grammarAccess.getWMLKeyAccess().getPlusSignKeyword_3_1();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLKey_ValueAssignment_2(lastRuleCallOrigin, this, 0, inst);
                  case 1: return new WMLKey_EqualsSignKeyword_1(lastRuleCallOrigin, this, 1, inst);
                  default: return null;
            }     
      }

}

// value+=WMLKeyValue+
protected class WMLKey_ValueAssignment_3_3 extends AssignmentToken  {
      
      public WMLKey_ValueAssignment_3_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLKeyAccess().getValueAssignment_3_3();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLKeyValue_Alternatives(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("value",false)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("value");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLKeyValueRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLKeyAccess().getValueWMLKeyValueParserRuleCall_3_3_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLKey_ValueAssignment_3_3(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLKey_PlusSignKeyword_3_1(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}


// eol=(EOL | SL_COMMENT)
protected class WMLKey_EolAssignment_4 extends AssignmentToken  {
      
      public WMLKey_EolAssignment_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLKeyAccess().getEolAssignment_4();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLKey_Group_3(lastRuleCallOrigin, this, 0, inst);
                  case 1: return new WMLKey_ValueAssignment_2(lastRuleCallOrigin, this, 1, inst);
                  case 2: return new WMLKey_EqualsSignKeyword_1(lastRuleCallOrigin, this, 2, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("eol",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("eol");
            if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLKeyAccess().getEolEOLTerminalRuleCall_4_0_0(), value, null)) {
                  type = AssignmentType.TERMINAL_RULE_CALL;
                  element = grammarAccess.getWMLKeyAccess().getEolEOLTerminalRuleCall_4_0_0();
                  return obj;
            }
            if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLKeyAccess().getEolSL_COMMENTTerminalRuleCall_4_0_1(), value, null)) {
                  type = AssignmentType.TERMINAL_RULE_CALL;
                  element = grammarAccess.getWMLKeyAccess().getEolSL_COMMENTTerminalRuleCall_4_0_1();
                  return obj;
            }
            return null;
      }

}


/************ end Rule WMLKey ****************/


/************ begin Rule WMLKeyValue ****************
 *
 * WMLKeyValue:
 *    WMLValue | WMLMacroCall | WMLLuaCode | WMLArrayCall;
 *
 **/

// WMLValue | WMLMacroCall | WMLLuaCode | WMLArrayCall
protected class WMLKeyValue_Alternatives extends AlternativesToken {

      public WMLKeyValue_Alternatives(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Alternatives getGrammarElement() {
            return grammarAccess.getWMLKeyValueAccess().getAlternatives();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLKeyValue_WMLValueParserRuleCall_0(lastRuleCallOrigin, this, 0, inst);
                  case 1: return new WMLKeyValue_WMLMacroCallParserRuleCall_1(lastRuleCallOrigin, this, 1, inst);
                  case 2: return new WMLKeyValue_WMLLuaCodeParserRuleCall_2(lastRuleCallOrigin, this, 2, inst);
                  case 3: return new WMLKeyValue_WMLArrayCallParserRuleCall_3(lastRuleCallOrigin, this, 3, inst);
                  default: return null;
            }     
      }

    @Override
      public IEObjectConsumer tryConsume() {
            if(getEObject().eClass() != grammarAccess.getWMLArrayCallRule().getType().getClassifier() && 
               getEObject().eClass() != grammarAccess.getWMLLuaCodeRule().getType().getClassifier() && 
               getEObject().eClass() != grammarAccess.getWMLMacroCallRule().getType().getClassifier() && 
               getEObject().eClass() != grammarAccess.getWMLValueRule().getType().getClassifier())
                  return null;
            return eObjectConsumer;
      }

}

// WMLValue
protected class WMLKeyValue_WMLValueParserRuleCall_0 extends RuleCallToken {
      
      public WMLKeyValue_WMLValueParserRuleCall_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public RuleCall getGrammarElement() {
            return grammarAccess.getWMLKeyValueAccess().getWMLValueParserRuleCall_0();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLValue_ValueAssignment(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override
      public IEObjectConsumer tryConsume() {
            if(getEObject().eClass() != grammarAccess.getWMLValueRule().getType().getClassifier())
                  return null;
            if(checkForRecursion(WMLValue_ValueAssignment.class, eObjectConsumer)) return null;
            return eObjectConsumer;
      }
      
    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            switch(index) {
                  default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index, inst);
            }     
      }     
}

// WMLMacroCall
protected class WMLKeyValue_WMLMacroCallParserRuleCall_1 extends RuleCallToken {
      
      public WMLKeyValue_WMLMacroCallParserRuleCall_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public RuleCall getGrammarElement() {
            return grammarAccess.getWMLKeyValueAccess().getWMLMacroCallParserRuleCall_1();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLMacroCall_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override
      public IEObjectConsumer tryConsume() {
            if(getEObject().eClass() != grammarAccess.getWMLMacroCallRule().getType().getClassifier())
                  return null;
            if(checkForRecursion(WMLMacroCall_Group.class, eObjectConsumer)) return null;
            return eObjectConsumer;
      }
      
    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            switch(index) {
                  default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index, inst);
            }     
      }     
}

// WMLLuaCode
protected class WMLKeyValue_WMLLuaCodeParserRuleCall_2 extends RuleCallToken {
      
      public WMLKeyValue_WMLLuaCodeParserRuleCall_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public RuleCall getGrammarElement() {
            return grammarAccess.getWMLKeyValueAccess().getWMLLuaCodeParserRuleCall_2();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLLuaCode_ValueAssignment(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override
      public IEObjectConsumer tryConsume() {
            if(getEObject().eClass() != grammarAccess.getWMLLuaCodeRule().getType().getClassifier())
                  return null;
            if(checkForRecursion(WMLLuaCode_ValueAssignment.class, eObjectConsumer)) return null;
            return eObjectConsumer;
      }
      
    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            switch(index) {
                  default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index, inst);
            }     
      }     
}

// WMLArrayCall
protected class WMLKeyValue_WMLArrayCallParserRuleCall_3 extends RuleCallToken {
      
      public WMLKeyValue_WMLArrayCallParserRuleCall_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public RuleCall getGrammarElement() {
            return grammarAccess.getWMLKeyValueAccess().getWMLArrayCallParserRuleCall_3();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLArrayCall_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override
      public IEObjectConsumer tryConsume() {
            if(getEObject().eClass() != grammarAccess.getWMLArrayCallRule().getType().getClassifier())
                  return null;
            if(checkForRecursion(WMLArrayCall_Group.class, eObjectConsumer)) return null;
            return eObjectConsumer;
      }
      
    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            switch(index) {
                  default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index, inst);
            }     
      }     
}


/************ end Rule WMLKeyValue ****************/


/************ begin Rule WMLMacroCall ****************
 *
 * WMLMacroCall:
 *    "{" point?="./"? relative?="~"? name=ID (params+=(WMLValue | MacroTokens) | extraMacros+=WMLMacroCall)* "}";
 *
 **/

// "{" point?="./"? relative?="~"? name=ID (params+=(WMLValue | MacroTokens) | extraMacros+=WMLMacroCall)* "}"
protected class WMLMacroCall_Group extends GroupToken {
      
      public WMLMacroCall_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Group getGrammarElement() {
            return grammarAccess.getWMLMacroCallAccess().getGroup();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLMacroCall_RightCurlyBracketKeyword_5(lastRuleCallOrigin, this, 0, inst);
                  default: return null;
            }     
      }

    @Override
      public IEObjectConsumer tryConsume() {
            if(getEObject().eClass() != grammarAccess.getWMLMacroCallRule().getType().getClassifier())
                  return null;
            return eObjectConsumer;
      }

}

// "{"
protected class WMLMacroCall_LeftCurlyBracketKeyword_0 extends KeywordToken  {
      
      public WMLMacroCall_LeftCurlyBracketKeyword_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Keyword getGrammarElement() {
            return grammarAccess.getWMLMacroCallAccess().getLeftCurlyBracketKeyword_0();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
            }     
      }

}

// point?="./"?
protected class WMLMacroCall_PointAssignment_1 extends AssignmentToken  {
      
      public WMLMacroCall_PointAssignment_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLMacroCallAccess().getPointAssignment_1();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLMacroCall_LeftCurlyBracketKeyword_0(lastRuleCallOrigin, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("point",false)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("point");
            if(Boolean.TRUE.equals(value)) { // org::eclipse::xtext::impl::KeywordImpl
                  type = AssignmentType.KEYWORD;
                  element = grammarAccess.getWMLMacroCallAccess().getPointFullStopSolidusKeyword_1_0();
                  return obj;
            }
            return null;
      }

}

// relative?="~"?
protected class WMLMacroCall_RelativeAssignment_2 extends AssignmentToken  {
      
      public WMLMacroCall_RelativeAssignment_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLMacroCallAccess().getRelativeAssignment_2();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLMacroCall_PointAssignment_1(lastRuleCallOrigin, this, 0, inst);
                  case 1: return new WMLMacroCall_LeftCurlyBracketKeyword_0(lastRuleCallOrigin, this, 1, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("relative",false)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("relative");
            if(Boolean.TRUE.equals(value)) { // org::eclipse::xtext::impl::KeywordImpl
                  type = AssignmentType.KEYWORD;
                  element = grammarAccess.getWMLMacroCallAccess().getRelativeTildeKeyword_2_0();
                  return obj;
            }
            return null;
      }

}

// name=ID
protected class WMLMacroCall_NameAssignment_3 extends AssignmentToken  {
      
      public WMLMacroCall_NameAssignment_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLMacroCallAccess().getNameAssignment_3();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLMacroCall_RelativeAssignment_2(lastRuleCallOrigin, this, 0, inst);
                  case 1: return new WMLMacroCall_PointAssignment_1(lastRuleCallOrigin, this, 1, inst);
                  case 2: return new WMLMacroCall_LeftCurlyBracketKeyword_0(lastRuleCallOrigin, this, 2, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("name",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("name");
            if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLMacroCallAccess().getNameIDTerminalRuleCall_3_0(), value, null)) {
                  type = AssignmentType.TERMINAL_RULE_CALL;
                  element = grammarAccess.getWMLMacroCallAccess().getNameIDTerminalRuleCall_3_0();
                  return obj;
            }
            return null;
      }

}

// (params+=(WMLValue | MacroTokens) | extraMacros+=WMLMacroCall)*
protected class WMLMacroCall_Alternatives_4 extends AlternativesToken {

      public WMLMacroCall_Alternatives_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Alternatives getGrammarElement() {
            return grammarAccess.getWMLMacroCallAccess().getAlternatives_4();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLMacroCall_ParamsAssignment_4_0(lastRuleCallOrigin, this, 0, inst);
                  case 1: return new WMLMacroCall_ExtraMacrosAssignment_4_1(lastRuleCallOrigin, this, 1, inst);
                  default: return null;
            }     
      }

}

// params+=(WMLValue | MacroTokens)
protected class WMLMacroCall_ParamsAssignment_4_0 extends AssignmentToken  {
      
      public WMLMacroCall_ParamsAssignment_4_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLMacroCallAccess().getParamsAssignment_4_0();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLValue_ValueAssignment(this, this, 0, inst);
                  case 1: return new MacroTokens_ValAssignment(this, this, 1, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("params",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("params");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLValueRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLMacroCallAccess().getParamsWMLValueParserRuleCall_4_0_0_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getMacroTokensRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLMacroCallAccess().getParamsMacroTokensParserRuleCall_4_0_0_1(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLMacroCall_Alternatives_4(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLMacroCall_NameAssignment_3(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// extraMacros+=WMLMacroCall
protected class WMLMacroCall_ExtraMacrosAssignment_4_1 extends AssignmentToken  {
      
      public WMLMacroCall_ExtraMacrosAssignment_4_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLMacroCallAccess().getExtraMacrosAssignment_4_1();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLMacroCall_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("extraMacros",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("extraMacros");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLMacroCallRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLMacroCallAccess().getExtraMacrosWMLMacroCallParserRuleCall_4_1_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLMacroCall_Alternatives_4(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLMacroCall_NameAssignment_3(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}


// "}"
protected class WMLMacroCall_RightCurlyBracketKeyword_5 extends KeywordToken  {
      
      public WMLMacroCall_RightCurlyBracketKeyword_5(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Keyword getGrammarElement() {
            return grammarAccess.getWMLMacroCallAccess().getRightCurlyBracketKeyword_5();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLMacroCall_Alternatives_4(lastRuleCallOrigin, this, 0, inst);
                  case 1: return new WMLMacroCall_NameAssignment_3(lastRuleCallOrigin, this, 1, inst);
                  default: return null;
            }     
      }

}


/************ end Rule WMLMacroCall ****************/


/************ begin Rule WMLLuaCode ****************
 *
 * WMLLuaCode:
 *    value=LUA_CODE;
 *
 **/

// value=LUA_CODE
protected class WMLLuaCode_ValueAssignment extends AssignmentToken  {
      
      public WMLLuaCode_ValueAssignment(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLLuaCodeAccess().getValueAssignment();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if(getEObject().eClass() != grammarAccess.getWMLLuaCodeRule().getType().getClassifier())
                  return null;
            if((value = eObjectConsumer.getConsumable("value",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("value");
            if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLLuaCodeAccess().getValueLUA_CODETerminalRuleCall_0(), value, null)) {
                  type = AssignmentType.TERMINAL_RULE_CALL;
                  element = grammarAccess.getWMLLuaCodeAccess().getValueLUA_CODETerminalRuleCall_0();
                  return obj;
            }
            return null;
      }

}

/************ end Rule WMLLuaCode ****************/


/************ begin Rule WMLArrayCall ****************
 *
 * WMLArrayCall:
 *    "[" value+=WMLValue+ "]";
 *
 **/

// "[" value+=WMLValue+ "]"
protected class WMLArrayCall_Group extends GroupToken {
      
      public WMLArrayCall_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Group getGrammarElement() {
            return grammarAccess.getWMLArrayCallAccess().getGroup();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLArrayCall_RightSquareBracketKeyword_2(lastRuleCallOrigin, this, 0, inst);
                  default: return null;
            }     
      }

    @Override
      public IEObjectConsumer tryConsume() {
            if(getEObject().eClass() != grammarAccess.getWMLArrayCallRule().getType().getClassifier())
                  return null;
            return eObjectConsumer;
      }

}

// "["
protected class WMLArrayCall_LeftSquareBracketKeyword_0 extends KeywordToken  {
      
      public WMLArrayCall_LeftSquareBracketKeyword_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Keyword getGrammarElement() {
            return grammarAccess.getWMLArrayCallAccess().getLeftSquareBracketKeyword_0();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
            }     
      }

}

// value+=WMLValue+
protected class WMLArrayCall_ValueAssignment_1 extends AssignmentToken  {
      
      public WMLArrayCall_ValueAssignment_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLArrayCallAccess().getValueAssignment_1();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLValue_ValueAssignment(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("value",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("value");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLValueRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLArrayCallAccess().getValueWMLValueParserRuleCall_1_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLArrayCall_ValueAssignment_1(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLArrayCall_LeftSquareBracketKeyword_0(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// "]"
protected class WMLArrayCall_RightSquareBracketKeyword_2 extends KeywordToken  {
      
      public WMLArrayCall_RightSquareBracketKeyword_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Keyword getGrammarElement() {
            return grammarAccess.getWMLArrayCallAccess().getRightSquareBracketKeyword_2();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLArrayCall_ValueAssignment_1(lastRuleCallOrigin, this, 0, inst);
                  default: return null;
            }     
      }

}


/************ end Rule WMLArrayCall ****************/


/************ begin Rule WMLMacroDefine ****************
 *
 * WMLMacroDefine:
 *    name=DEFINE (Tags+=WMLTag | Keys+=WMLKey | MacroCalls+=WMLMacroCall | MacroDefines+=WMLMacroDefine |
 *    Textdomains+=WMLTextdomain | Values+=WMLValue | IfDefs+=WMLPreprocIF)* endName=ENDDEF;
 *
 **/

// name=DEFINE (Tags+=WMLTag | Keys+=WMLKey | MacroCalls+=WMLMacroCall | MacroDefines+=WMLMacroDefine |
// Textdomains+=WMLTextdomain | Values+=WMLValue | IfDefs+=WMLPreprocIF)* endName=ENDDEF
protected class WMLMacroDefine_Group extends GroupToken {
      
      public WMLMacroDefine_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Group getGrammarElement() {
            return grammarAccess.getWMLMacroDefineAccess().getGroup();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLMacroDefine_EndNameAssignment_2(lastRuleCallOrigin, this, 0, inst);
                  default: return null;
            }     
      }

    @Override
      public IEObjectConsumer tryConsume() {
            if(getEObject().eClass() != grammarAccess.getWMLMacroDefineRule().getType().getClassifier())
                  return null;
            return eObjectConsumer;
      }

}

// name=DEFINE
protected class WMLMacroDefine_NameAssignment_0 extends AssignmentToken  {
      
      public WMLMacroDefine_NameAssignment_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLMacroDefineAccess().getNameAssignment_0();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("name",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("name");
            if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLMacroDefineAccess().getNameDEFINETerminalRuleCall_0_0(), value, null)) {
                  type = AssignmentType.TERMINAL_RULE_CALL;
                  element = grammarAccess.getWMLMacroDefineAccess().getNameDEFINETerminalRuleCall_0_0();
                  return obj;
            }
            return null;
      }

}

// (Tags+=WMLTag | Keys+=WMLKey | MacroCalls+=WMLMacroCall | MacroDefines+=WMLMacroDefine | Textdomains+=WMLTextdomain |
// Values+=WMLValue | IfDefs+=WMLPreprocIF)*
protected class WMLMacroDefine_Alternatives_1 extends AlternativesToken {

      public WMLMacroDefine_Alternatives_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Alternatives getGrammarElement() {
            return grammarAccess.getWMLMacroDefineAccess().getAlternatives_1();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLMacroDefine_TagsAssignment_1_0(lastRuleCallOrigin, this, 0, inst);
                  case 1: return new WMLMacroDefine_KeysAssignment_1_1(lastRuleCallOrigin, this, 1, inst);
                  case 2: return new WMLMacroDefine_MacroCallsAssignment_1_2(lastRuleCallOrigin, this, 2, inst);
                  case 3: return new WMLMacroDefine_MacroDefinesAssignment_1_3(lastRuleCallOrigin, this, 3, inst);
                  case 4: return new WMLMacroDefine_TextdomainsAssignment_1_4(lastRuleCallOrigin, this, 4, inst);
                  case 5: return new WMLMacroDefine_ValuesAssignment_1_5(lastRuleCallOrigin, this, 5, inst);
                  case 6: return new WMLMacroDefine_IfDefsAssignment_1_6(lastRuleCallOrigin, this, 6, inst);
                  default: return null;
            }     
      }

}

// Tags+=WMLTag
protected class WMLMacroDefine_TagsAssignment_1_0 extends AssignmentToken  {
      
      public WMLMacroDefine_TagsAssignment_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLMacroDefineAccess().getTagsAssignment_1_0();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLTag_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("Tags",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("Tags");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLTagRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLMacroDefineAccess().getTagsWMLTagParserRuleCall_1_0_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLMacroDefine_Alternatives_1(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLMacroDefine_NameAssignment_0(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// Keys+=WMLKey
protected class WMLMacroDefine_KeysAssignment_1_1 extends AssignmentToken  {
      
      public WMLMacroDefine_KeysAssignment_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLMacroDefineAccess().getKeysAssignment_1_1();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLKey_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("Keys",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("Keys");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLKeyRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLMacroDefineAccess().getKeysWMLKeyParserRuleCall_1_1_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLMacroDefine_Alternatives_1(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLMacroDefine_NameAssignment_0(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// MacroCalls+=WMLMacroCall
protected class WMLMacroDefine_MacroCallsAssignment_1_2 extends AssignmentToken  {
      
      public WMLMacroDefine_MacroCallsAssignment_1_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLMacroDefineAccess().getMacroCallsAssignment_1_2();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLMacroCall_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("MacroCalls",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("MacroCalls");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLMacroCallRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLMacroDefineAccess().getMacroCallsWMLMacroCallParserRuleCall_1_2_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLMacroDefine_Alternatives_1(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLMacroDefine_NameAssignment_0(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// MacroDefines+=WMLMacroDefine
protected class WMLMacroDefine_MacroDefinesAssignment_1_3 extends AssignmentToken  {
      
      public WMLMacroDefine_MacroDefinesAssignment_1_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLMacroDefineAccess().getMacroDefinesAssignment_1_3();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLMacroDefine_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("MacroDefines",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("MacroDefines");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLMacroDefineRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLMacroDefineAccess().getMacroDefinesWMLMacroDefineParserRuleCall_1_3_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLMacroDefine_Alternatives_1(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLMacroDefine_NameAssignment_0(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// Textdomains+=WMLTextdomain
protected class WMLMacroDefine_TextdomainsAssignment_1_4 extends AssignmentToken  {
      
      public WMLMacroDefine_TextdomainsAssignment_1_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLMacroDefineAccess().getTextdomainsAssignment_1_4();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLTextdomain_NameAssignment(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("Textdomains",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("Textdomains");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLTextdomainRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLMacroDefineAccess().getTextdomainsWMLTextdomainParserRuleCall_1_4_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLMacroDefine_Alternatives_1(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLMacroDefine_NameAssignment_0(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// Values+=WMLValue
protected class WMLMacroDefine_ValuesAssignment_1_5 extends AssignmentToken  {
      
      public WMLMacroDefine_ValuesAssignment_1_5(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLMacroDefineAccess().getValuesAssignment_1_5();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLValue_ValueAssignment(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("Values",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("Values");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLValueRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLMacroDefineAccess().getValuesWMLValueParserRuleCall_1_5_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLMacroDefine_Alternatives_1(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLMacroDefine_NameAssignment_0(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// IfDefs+=WMLPreprocIF
protected class WMLMacroDefine_IfDefsAssignment_1_6 extends AssignmentToken  {
      
      public WMLMacroDefine_IfDefsAssignment_1_6(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLMacroDefineAccess().getIfDefsAssignment_1_6();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLPreprocIF_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("IfDefs",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("IfDefs");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLPreprocIFRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLMacroDefineAccess().getIfDefsWMLPreprocIFParserRuleCall_1_6_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLMacroDefine_Alternatives_1(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLMacroDefine_NameAssignment_0(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}


// endName=ENDDEF
protected class WMLMacroDefine_EndNameAssignment_2 extends AssignmentToken  {
      
      public WMLMacroDefine_EndNameAssignment_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLMacroDefineAccess().getEndNameAssignment_2();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLMacroDefine_Alternatives_1(lastRuleCallOrigin, this, 0, inst);
                  case 1: return new WMLMacroDefine_NameAssignment_0(lastRuleCallOrigin, this, 1, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("endName",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("endName");
            if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLMacroDefineAccess().getEndNameENDDEFTerminalRuleCall_2_0(), value, null)) {
                  type = AssignmentType.TERMINAL_RULE_CALL;
                  element = grammarAccess.getWMLMacroDefineAccess().getEndNameENDDEFTerminalRuleCall_2_0();
                  return obj;
            }
            return null;
      }

}


/************ end Rule WMLMacroDefine ****************/


/************ begin Rule WMLPreprocIF ****************
 *
 * WMLPreprocIF:
 *    name=(IFDEF | IFNDEF | IFHAVE | IFNHAVE) (Tags+=WMLTag | Keys+=WMLKey | MacroCalls+=WMLMacroCall |
 *    MacroDefines+=WMLMacroDefine | Textdomains+=WMLTextdomain | Values+=WMLValue | IfDefs+=WMLPreprocIF | Elses+=ELSE)*
 *    endName=ENDIF;
 *
 **/

// name=(IFDEF | IFNDEF | IFHAVE | IFNHAVE) (Tags+=WMLTag | Keys+=WMLKey | MacroCalls+=WMLMacroCall |
// MacroDefines+=WMLMacroDefine | Textdomains+=WMLTextdomain | Values+=WMLValue | IfDefs+=WMLPreprocIF | Elses+=ELSE)*
// endName=ENDIF
protected class WMLPreprocIF_Group extends GroupToken {
      
      public WMLPreprocIF_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Group getGrammarElement() {
            return grammarAccess.getWMLPreprocIFAccess().getGroup();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLPreprocIF_EndNameAssignment_2(lastRuleCallOrigin, this, 0, inst);
                  default: return null;
            }     
      }

    @Override
      public IEObjectConsumer tryConsume() {
            if(getEObject().eClass() != grammarAccess.getWMLPreprocIFRule().getType().getClassifier())
                  return null;
            return eObjectConsumer;
      }

}

// name=(IFDEF | IFNDEF | IFHAVE | IFNHAVE)
protected class WMLPreprocIF_NameAssignment_0 extends AssignmentToken  {
      
      public WMLPreprocIF_NameAssignment_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLPreprocIFAccess().getNameAssignment_0();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("name",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("name");
            if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLPreprocIFAccess().getNameIFDEFTerminalRuleCall_0_0_0(), value, null)) {
                  type = AssignmentType.TERMINAL_RULE_CALL;
                  element = grammarAccess.getWMLPreprocIFAccess().getNameIFDEFTerminalRuleCall_0_0_0();
                  return obj;
            }
            if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLPreprocIFAccess().getNameIFNDEFTerminalRuleCall_0_0_1(), value, null)) {
                  type = AssignmentType.TERMINAL_RULE_CALL;
                  element = grammarAccess.getWMLPreprocIFAccess().getNameIFNDEFTerminalRuleCall_0_0_1();
                  return obj;
            }
            if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLPreprocIFAccess().getNameIFHAVETerminalRuleCall_0_0_2(), value, null)) {
                  type = AssignmentType.TERMINAL_RULE_CALL;
                  element = grammarAccess.getWMLPreprocIFAccess().getNameIFHAVETerminalRuleCall_0_0_2();
                  return obj;
            }
            if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLPreprocIFAccess().getNameIFNHAVETerminalRuleCall_0_0_3(), value, null)) {
                  type = AssignmentType.TERMINAL_RULE_CALL;
                  element = grammarAccess.getWMLPreprocIFAccess().getNameIFNHAVETerminalRuleCall_0_0_3();
                  return obj;
            }
            return null;
      }

}

// (Tags+=WMLTag | Keys+=WMLKey | MacroCalls+=WMLMacroCall | MacroDefines+=WMLMacroDefine | Textdomains+=WMLTextdomain |
// Values+=WMLValue | IfDefs+=WMLPreprocIF | Elses+=ELSE)*
protected class WMLPreprocIF_Alternatives_1 extends AlternativesToken {

      public WMLPreprocIF_Alternatives_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Alternatives getGrammarElement() {
            return grammarAccess.getWMLPreprocIFAccess().getAlternatives_1();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLPreprocIF_TagsAssignment_1_0(lastRuleCallOrigin, this, 0, inst);
                  case 1: return new WMLPreprocIF_KeysAssignment_1_1(lastRuleCallOrigin, this, 1, inst);
                  case 2: return new WMLPreprocIF_MacroCallsAssignment_1_2(lastRuleCallOrigin, this, 2, inst);
                  case 3: return new WMLPreprocIF_MacroDefinesAssignment_1_3(lastRuleCallOrigin, this, 3, inst);
                  case 4: return new WMLPreprocIF_TextdomainsAssignment_1_4(lastRuleCallOrigin, this, 4, inst);
                  case 5: return new WMLPreprocIF_ValuesAssignment_1_5(lastRuleCallOrigin, this, 5, inst);
                  case 6: return new WMLPreprocIF_IfDefsAssignment_1_6(lastRuleCallOrigin, this, 6, inst);
                  case 7: return new WMLPreprocIF_ElsesAssignment_1_7(lastRuleCallOrigin, this, 7, inst);
                  default: return null;
            }     
      }

}

// Tags+=WMLTag
protected class WMLPreprocIF_TagsAssignment_1_0 extends AssignmentToken  {
      
      public WMLPreprocIF_TagsAssignment_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLPreprocIFAccess().getTagsAssignment_1_0();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLTag_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("Tags",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("Tags");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLTagRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLPreprocIFAccess().getTagsWMLTagParserRuleCall_1_0_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLPreprocIF_Alternatives_1(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLPreprocIF_NameAssignment_0(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// Keys+=WMLKey
protected class WMLPreprocIF_KeysAssignment_1_1 extends AssignmentToken  {
      
      public WMLPreprocIF_KeysAssignment_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLPreprocIFAccess().getKeysAssignment_1_1();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLKey_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("Keys",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("Keys");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLKeyRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLPreprocIFAccess().getKeysWMLKeyParserRuleCall_1_1_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLPreprocIF_Alternatives_1(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLPreprocIF_NameAssignment_0(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// MacroCalls+=WMLMacroCall
protected class WMLPreprocIF_MacroCallsAssignment_1_2 extends AssignmentToken  {
      
      public WMLPreprocIF_MacroCallsAssignment_1_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLPreprocIFAccess().getMacroCallsAssignment_1_2();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLMacroCall_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("MacroCalls",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("MacroCalls");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLMacroCallRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLPreprocIFAccess().getMacroCallsWMLMacroCallParserRuleCall_1_2_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLPreprocIF_Alternatives_1(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLPreprocIF_NameAssignment_0(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// MacroDefines+=WMLMacroDefine
protected class WMLPreprocIF_MacroDefinesAssignment_1_3 extends AssignmentToken  {
      
      public WMLPreprocIF_MacroDefinesAssignment_1_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLPreprocIFAccess().getMacroDefinesAssignment_1_3();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLMacroDefine_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("MacroDefines",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("MacroDefines");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLMacroDefineRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLPreprocIFAccess().getMacroDefinesWMLMacroDefineParserRuleCall_1_3_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLPreprocIF_Alternatives_1(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLPreprocIF_NameAssignment_0(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// Textdomains+=WMLTextdomain
protected class WMLPreprocIF_TextdomainsAssignment_1_4 extends AssignmentToken  {
      
      public WMLPreprocIF_TextdomainsAssignment_1_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLPreprocIFAccess().getTextdomainsAssignment_1_4();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLTextdomain_NameAssignment(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("Textdomains",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("Textdomains");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLTextdomainRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLPreprocIFAccess().getTextdomainsWMLTextdomainParserRuleCall_1_4_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLPreprocIF_Alternatives_1(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLPreprocIF_NameAssignment_0(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// Values+=WMLValue
protected class WMLPreprocIF_ValuesAssignment_1_5 extends AssignmentToken  {
      
      public WMLPreprocIF_ValuesAssignment_1_5(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLPreprocIFAccess().getValuesAssignment_1_5();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLValue_ValueAssignment(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("Values",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("Values");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLValueRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLPreprocIFAccess().getValuesWMLValueParserRuleCall_1_5_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLPreprocIF_Alternatives_1(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLPreprocIF_NameAssignment_0(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// IfDefs+=WMLPreprocIF
protected class WMLPreprocIF_IfDefsAssignment_1_6 extends AssignmentToken  {
      
      public WMLPreprocIF_IfDefsAssignment_1_6(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLPreprocIFAccess().getIfDefsAssignment_1_6();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLPreprocIF_Group(this, this, 0, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("IfDefs",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("IfDefs");
            if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
                  IEObjectConsumer param = createEObjectConsumer((EObject)value);
                  if(param.isInstanceOf(grammarAccess.getWMLPreprocIFRule().getType().getClassifier())) {
                        type = AssignmentType.PARSER_RULE_CALL;
                        element = grammarAccess.getWMLPreprocIFAccess().getIfDefsWMLPreprocIFParserRuleCall_1_6_0(); 
                        consumed = obj;
                        return param;
                  }
            }
            return null;
      }

    @Override
      public AbstractToken createFollowerAfterReturn(AbstractToken next,      int actIndex, int index, IEObjectConsumer inst) {
            if(value == inst.getEObject() && !inst.isConsumed()) return null;
            switch(index) {
                  case 0: return new WMLPreprocIF_Alternatives_1(lastRuleCallOrigin, next, actIndex, consumed);
                  case 1: return new WMLPreprocIF_NameAssignment_0(lastRuleCallOrigin, next, actIndex, consumed);
                  default: return null;
            }     
      }     
}

// Elses+=ELSE
protected class WMLPreprocIF_ElsesAssignment_1_7 extends AssignmentToken  {
      
      public WMLPreprocIF_ElsesAssignment_1_7(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLPreprocIFAccess().getElsesAssignment_1_7();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLPreprocIF_Alternatives_1(lastRuleCallOrigin, this, 0, inst);
                  case 1: return new WMLPreprocIF_NameAssignment_0(lastRuleCallOrigin, this, 1, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("Elses",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("Elses");
            if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLPreprocIFAccess().getElsesELSETerminalRuleCall_1_7_0(), value, null)) {
                  type = AssignmentType.TERMINAL_RULE_CALL;
                  element = grammarAccess.getWMLPreprocIFAccess().getElsesELSETerminalRuleCall_1_7_0();
                  return obj;
            }
            return null;
      }

}


// endName=ENDIF
protected class WMLPreprocIF_EndNameAssignment_2 extends AssignmentToken  {
      
      public WMLPreprocIF_EndNameAssignment_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLPreprocIFAccess().getEndNameAssignment_2();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  case 0: return new WMLPreprocIF_Alternatives_1(lastRuleCallOrigin, this, 0, inst);
                  case 1: return new WMLPreprocIF_NameAssignment_0(lastRuleCallOrigin, this, 1, inst);
                  default: return null;
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if((value = eObjectConsumer.getConsumable("endName",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("endName");
            if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLPreprocIFAccess().getEndNameENDIFTerminalRuleCall_2_0(), value, null)) {
                  type = AssignmentType.TERMINAL_RULE_CALL;
                  element = grammarAccess.getWMLPreprocIFAccess().getEndNameENDIFTerminalRuleCall_2_0();
                  return obj;
            }
            return null;
      }

}


/************ end Rule WMLPreprocIF ****************/


/************ begin Rule WMLTextdomain ****************
 *
 * WMLTextdomain:
 *    name=TEXTDOMAIN;
 *
 **/

// name=TEXTDOMAIN
protected class WMLTextdomain_NameAssignment extends AssignmentToken  {
      
      public WMLTextdomain_NameAssignment(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLTextdomainAccess().getNameAssignment();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if(getEObject().eClass() != grammarAccess.getWMLTextdomainRule().getType().getClassifier())
                  return null;
            if((value = eObjectConsumer.getConsumable("name",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("name");
            if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLTextdomainAccess().getNameTEXTDOMAINTerminalRuleCall_0(), value, null)) {
                  type = AssignmentType.TERMINAL_RULE_CALL;
                  element = grammarAccess.getWMLTextdomainAccess().getNameTEXTDOMAINTerminalRuleCall_0();
                  return obj;
            }
            return null;
      }

}

/************ end Rule WMLTextdomain ****************/


/************ begin Rule WMLValue ****************
 *
 * WMLValue:
 *    value=(ID | STRING | "_" | "~" | "." | "./" | "$" | "/" | "(" | ")" | ANY_OTHER);
 *
 **/

// value=(ID | STRING | "_" | "~" | "." | "./" | "$" | "/" | "(" | ")" | ANY_OTHER)
protected class WMLValue_ValueAssignment extends AssignmentToken  {
      
      public WMLValue_ValueAssignment(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getWMLValueAccess().getValueAssignment();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if(getEObject().eClass() != grammarAccess.getWMLValueRule().getType().getClassifier())
                  return null;
            if((value = eObjectConsumer.getConsumable("value",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("value");
            if(keywordSerializer.isValid(obj.getEObject(), grammarAccess.getWMLValueAccess().getValue_Keyword_0_2(), value, null)) {
                  type = AssignmentType.KEYWORD;
                  element = grammarAccess.getWMLValueAccess().getValue_Keyword_0_2();
                  return obj;
            }
            if(keywordSerializer.isValid(obj.getEObject(), grammarAccess.getWMLValueAccess().getValueTildeKeyword_0_3(), value, null)) {
                  type = AssignmentType.KEYWORD;
                  element = grammarAccess.getWMLValueAccess().getValueTildeKeyword_0_3();
                  return obj;
            }
            if(keywordSerializer.isValid(obj.getEObject(), grammarAccess.getWMLValueAccess().getValueFullStopKeyword_0_4(), value, null)) {
                  type = AssignmentType.KEYWORD;
                  element = grammarAccess.getWMLValueAccess().getValueFullStopKeyword_0_4();
                  return obj;
            }
            if(keywordSerializer.isValid(obj.getEObject(), grammarAccess.getWMLValueAccess().getValueFullStopSolidusKeyword_0_5(), value, null)) {
                  type = AssignmentType.KEYWORD;
                  element = grammarAccess.getWMLValueAccess().getValueFullStopSolidusKeyword_0_5();
                  return obj;
            }
            if(keywordSerializer.isValid(obj.getEObject(), grammarAccess.getWMLValueAccess().getValueDollarSignKeyword_0_6(), value, null)) {
                  type = AssignmentType.KEYWORD;
                  element = grammarAccess.getWMLValueAccess().getValueDollarSignKeyword_0_6();
                  return obj;
            }
            if(keywordSerializer.isValid(obj.getEObject(), grammarAccess.getWMLValueAccess().getValueSolidusKeyword_0_7(), value, null)) {
                  type = AssignmentType.KEYWORD;
                  element = grammarAccess.getWMLValueAccess().getValueSolidusKeyword_0_7();
                  return obj;
            }
            if(keywordSerializer.isValid(obj.getEObject(), grammarAccess.getWMLValueAccess().getValueLeftParenthesisKeyword_0_8(), value, null)) {
                  type = AssignmentType.KEYWORD;
                  element = grammarAccess.getWMLValueAccess().getValueLeftParenthesisKeyword_0_8();
                  return obj;
            }
            if(keywordSerializer.isValid(obj.getEObject(), grammarAccess.getWMLValueAccess().getValueRightParenthesisKeyword_0_9(), value, null)) {
                  type = AssignmentType.KEYWORD;
                  element = grammarAccess.getWMLValueAccess().getValueRightParenthesisKeyword_0_9();
                  return obj;
            }
            if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLValueAccess().getValueIDTerminalRuleCall_0_0(), value, null)) {
                  type = AssignmentType.TERMINAL_RULE_CALL;
                  element = grammarAccess.getWMLValueAccess().getValueIDTerminalRuleCall_0_0();
                  return obj;
            }
            if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLValueAccess().getValueSTRINGTerminalRuleCall_0_1(), value, null)) {
                  type = AssignmentType.TERMINAL_RULE_CALL;
                  element = grammarAccess.getWMLValueAccess().getValueSTRINGTerminalRuleCall_0_1();
                  return obj;
            }
            if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLValueAccess().getValueANY_OTHERTerminalRuleCall_0_10(), value, null)) {
                  type = AssignmentType.TERMINAL_RULE_CALL;
                  element = grammarAccess.getWMLValueAccess().getValueANY_OTHERTerminalRuleCall_0_10();
                  return obj;
            }
            return null;
      }

}

/************ end Rule WMLValue ****************/


/************ begin Rule MacroTokens ****************
 *
 * // we use this as a hack for any characters in the macro call
 * // so we won't trigger things like: key=value or [tag]
 * MacroTokens:
 *    val=("=" | "[" | "]" | "+" | "[/");
 *
 **/

// val=("=" | "[" | "]" | "+" | "[/")
protected class MacroTokens_ValAssignment extends AssignmentToken  {
      
      public MacroTokens_ValAssignment(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
            super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
      }
      
      @Override
      public Assignment getGrammarElement() {
            return grammarAccess.getMacroTokensAccess().getValAssignment();
      }

    @Override
      public AbstractToken createFollower(int index, IEObjectConsumer inst) {
            switch(index) {
                  default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
            }     
      }

    @Override     
      public IEObjectConsumer tryConsume() {
            if(getEObject().eClass() != grammarAccess.getMacroTokensRule().getType().getClassifier())
                  return null;
            if((value = eObjectConsumer.getConsumable("val",true)) == null) return null;
            IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("val");
            if(keywordSerializer.isValid(obj.getEObject(), grammarAccess.getMacroTokensAccess().getValEqualsSignKeyword_0_0(), value, null)) {
                  type = AssignmentType.KEYWORD;
                  element = grammarAccess.getMacroTokensAccess().getValEqualsSignKeyword_0_0();
                  return obj;
            }
            if(keywordSerializer.isValid(obj.getEObject(), grammarAccess.getMacroTokensAccess().getValLeftSquareBracketKeyword_0_1(), value, null)) {
                  type = AssignmentType.KEYWORD;
                  element = grammarAccess.getMacroTokensAccess().getValLeftSquareBracketKeyword_0_1();
                  return obj;
            }
            if(keywordSerializer.isValid(obj.getEObject(), grammarAccess.getMacroTokensAccess().getValRightSquareBracketKeyword_0_2(), value, null)) {
                  type = AssignmentType.KEYWORD;
                  element = grammarAccess.getMacroTokensAccess().getValRightSquareBracketKeyword_0_2();
                  return obj;
            }
            if(keywordSerializer.isValid(obj.getEObject(), grammarAccess.getMacroTokensAccess().getValPlusSignKeyword_0_3(), value, null)) {
                  type = AssignmentType.KEYWORD;
                  element = grammarAccess.getMacroTokensAccess().getValPlusSignKeyword_0_3();
                  return obj;
            }
            if(keywordSerializer.isValid(obj.getEObject(), grammarAccess.getMacroTokensAccess().getValLeftSquareBracketSolidusKeyword_0_4(), value, null)) {
                  type = AssignmentType.KEYWORD;
                  element = grammarAccess.getMacroTokensAccess().getValLeftSquareBracketSolidusKeyword_0_4();
                  return obj;
            }
            return null;
      }

}

/************ end Rule MacroTokens ****************/

}

Generated by  Doxygen 1.6.0   Back to index