/**
 * openHAB, the open Home Automation Bus.
 * Copyright (C) 2011, openHAB.org <admin@openhab.org>
 *
 * See the contributors.txt file in the distribution for a
 * full listing of individual contributors.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, see <http://www.gnu.org/licenses>.
 *
 * Additional permission under GNU GPL version 3 section 7
 *
 * If you modify this Program, or any covered work, by linking or
 * combining it with Eclipse (or a modified version of that library),
 * containing parts covered by the terms of the Eclipse Public License
 * (EPL), the licensors of this Program grant you additional permission
 * to convey the resulting work.
 */

/*
* generated by Xtext
*/
package org.openhab.model.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.openhab.model.services.SitemapGrammarAccess;

import com.google.inject.Inject;

@SuppressWarnings("all")
public class SitemapParsetreeConstructor extends AbstractParseTreeConstructor {
		
	@Inject
	private SitemapGrammarAccess 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 SitemapModel_Group(this, this, 0, inst);
			case 1: return new Sitemap_Group(this, this, 1, inst);
			case 2: return new Widget_Alternatives(this, this, 2, inst);
			case 3: return new LinkableWidget_Group(this, this, 3, inst);
			case 4: return new Frame_Group(this, this, 4, inst);
			case 5: return new Text_Group(this, this, 5, inst);
			case 6: return new Group_Group(this, this, 6, inst);
			case 7: return new Image_Group(this, this, 7, inst);
			case 8: return new Switch_Group(this, this, 8, inst);
			case 9: return new Slider_Group(this, this, 9, inst);
			case 10: return new Selection_Group(this, this, 10, inst);
			case 11: return new List_Group(this, this, 11, inst);
			case 12: return new Mapping_Group(this, this, 12, inst);
			default: return null;
		}	
	}	
}
	

/************ begin Rule SitemapModel ****************
 *
 * SitemapModel:
 * 	"sitemap" Sitemap;
 *
 **/

// "sitemap" Sitemap
protected class SitemapModel_Group extends GroupToken {
	
	public SitemapModel_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSitemapModelAccess().getGroup();
	}

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

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

}

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

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

}

// Sitemap
protected class SitemapModel_SitemapParserRuleCall_1 extends RuleCallToken {
	
	public SitemapModel_SitemapParserRuleCall_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public RuleCall getGrammarElement() {
		return grammarAccess.getSitemapModelAccess().getSitemapParserRuleCall_1();
	}

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

    @Override
	public IEObjectConsumer tryConsume() {
		if(checkForRecursion(Sitemap_Group.class, eObjectConsumer)) return null;
		return eObjectConsumer;
	}
	
    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SitemapModel_SitemapKeyword_0(lastRuleCallOrigin, next, actIndex, inst);
			default: return null;
		}	
	}	
}


/************ end Rule SitemapModel ****************/


/************ begin Rule Sitemap ****************
 *
 * Sitemap:
 * 	name=ID ("label=" label=STRING)? ("icon=" icon=STRING)? "{" children+=Widget+ "}";
 *
 **/

// name=ID ("label=" label=STRING)? ("icon=" icon=STRING)? "{" children+=Widget+ "}"
protected class Sitemap_Group extends GroupToken {
	
	public Sitemap_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSitemapAccess().getGroup();
	}

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

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

}

// name=ID
protected class Sitemap_NameAssignment_0 extends AssignmentToken  {
	
	public Sitemap_NameAssignment_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSitemapAccess().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.getSitemapAccess().getNameIDTerminalRuleCall_0_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSitemapAccess().getNameIDTerminalRuleCall_0_0();
			return obj;
		}
		return null;
	}

}

// ("label=" label=STRING)?
protected class Sitemap_Group_1 extends GroupToken {
	
	public Sitemap_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSitemapAccess().getGroup_1();
	}

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

}

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

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

}

// label=STRING
protected class Sitemap_LabelAssignment_1_1 extends AssignmentToken  {
	
	public Sitemap_LabelAssignment_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSitemapAccess().getLabelAssignment_1_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("label",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("label");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSitemapAccess().getLabelSTRINGTerminalRuleCall_1_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSitemapAccess().getLabelSTRINGTerminalRuleCall_1_1_0();
			return obj;
		}
		return null;
	}

}


// ("icon=" icon=STRING)?
protected class Sitemap_Group_2 extends GroupToken {
	
	public Sitemap_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSitemapAccess().getGroup_2();
	}

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

}

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

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

}

// icon=STRING
protected class Sitemap_IconAssignment_2_1 extends AssignmentToken  {
	
	public Sitemap_IconAssignment_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSitemapAccess().getIconAssignment_2_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("icon",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("icon");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSitemapAccess().getIconSTRINGTerminalRuleCall_2_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSitemapAccess().getIconSTRINGTerminalRuleCall_2_1_0();
			return obj;
		}
		return null;
	}

}


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

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

}

// children+=Widget+
protected class Sitemap_ChildrenAssignment_4 extends AssignmentToken  {
	
	public Sitemap_ChildrenAssignment_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSitemapAccess().getChildrenAssignment_4();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("children",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("children");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getWidgetRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getSitemapAccess().getChildrenWidgetParserRuleCall_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 Sitemap_ChildrenAssignment_4(lastRuleCallOrigin, next, actIndex, consumed);
			case 1: return new Sitemap_LeftCurlyBracketKeyword_3(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}

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

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

}


/************ end Rule Sitemap ****************/


/************ begin Rule Widget ****************
 *
 * Widget:
 * 	LinkableWidget | (Switch | Selection | Slider | List);
 *
 **/

// LinkableWidget | (Switch | Selection | Slider | List)
protected class Widget_Alternatives extends AlternativesToken {

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

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

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getFrameAccess().getFrameAction_1().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getGroupRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getImageRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getListRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getSelectionRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getSliderRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getSwitchRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getTextAccess().getTextAction_1().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// LinkableWidget
protected class Widget_LinkableWidgetParserRuleCall_0 extends RuleCallToken {
	
	public Widget_LinkableWidgetParserRuleCall_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public RuleCall getGrammarElement() {
		return grammarAccess.getWidgetAccess().getLinkableWidgetParserRuleCall_0();
	}

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

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getFrameAccess().getFrameAction_1().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getGroupRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getImageRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getTextAccess().getTextAction_1().getType().getClassifier())
			return null;
		if(checkForRecursion(LinkableWidget_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);
		}	
	}	
}

// Switch | Selection | Slider | List
protected class Widget_Alternatives_1 extends AlternativesToken {

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

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Widget_SwitchParserRuleCall_1_0(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Widget_SelectionParserRuleCall_1_1(lastRuleCallOrigin, this, 1, inst);
			case 2: return new Widget_SliderParserRuleCall_1_2(lastRuleCallOrigin, this, 2, inst);
			case 3: return new Widget_ListParserRuleCall_1_3(lastRuleCallOrigin, this, 3, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getListRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getSelectionRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getSliderRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getSwitchRule().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// Switch
protected class Widget_SwitchParserRuleCall_1_0 extends RuleCallToken {
	
	public Widget_SwitchParserRuleCall_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public RuleCall getGrammarElement() {
		return grammarAccess.getWidgetAccess().getSwitchParserRuleCall_1_0();
	}

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

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getSwitchRule().getType().getClassifier())
			return null;
		if(checkForRecursion(Switch_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);
		}	
	}	
}

// Selection
protected class Widget_SelectionParserRuleCall_1_1 extends RuleCallToken {
	
	public Widget_SelectionParserRuleCall_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public RuleCall getGrammarElement() {
		return grammarAccess.getWidgetAccess().getSelectionParserRuleCall_1_1();
	}

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

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getSelectionRule().getType().getClassifier())
			return null;
		if(checkForRecursion(Selection_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);
		}	
	}	
}

// Slider
protected class Widget_SliderParserRuleCall_1_2 extends RuleCallToken {
	
	public Widget_SliderParserRuleCall_1_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public RuleCall getGrammarElement() {
		return grammarAccess.getWidgetAccess().getSliderParserRuleCall_1_2();
	}

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

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getSliderRule().getType().getClassifier())
			return null;
		if(checkForRecursion(Slider_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);
		}	
	}	
}

// List
protected class Widget_ListParserRuleCall_1_3 extends RuleCallToken {
	
	public Widget_ListParserRuleCall_1_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public RuleCall getGrammarElement() {
		return grammarAccess.getWidgetAccess().getListParserRuleCall_1_3();
	}

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

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getListRule().getType().getClassifier())
			return null;
		if(checkForRecursion(List_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 Widget ****************/


/************ begin Rule LinkableWidget ****************
 *
 * LinkableWidget:
 * 	(Text | Group | Image | Frame) ("label=" label=(ID | STRING))? ("icon=" icon=(ID | STRING))? ("{" children+=Widget+
 * 	"}")?;
 *
 **/

// (Text | Group | Image | Frame) ("label=" label=(ID | STRING))? ("icon=" icon=(ID | STRING))? ("{" children+=Widget+
// "}")?
protected class LinkableWidget_Group extends GroupToken {
	
	public LinkableWidget_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getGroup();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new LinkableWidget_Group_3(lastRuleCallOrigin, this, 0, inst);
			case 1: return new LinkableWidget_Group_2(lastRuleCallOrigin, this, 1, inst);
			case 2: return new LinkableWidget_Group_1(lastRuleCallOrigin, this, 2, inst);
			case 3: return new LinkableWidget_Alternatives_0(lastRuleCallOrigin, this, 3, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getFrameAccess().getFrameAction_1().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getGroupRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getImageRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getTextAccess().getTextAction_1().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// Text | Group | Image | Frame
protected class LinkableWidget_Alternatives_0 extends AlternativesToken {

	public LinkableWidget_Alternatives_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Alternatives getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getAlternatives_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new LinkableWidget_TextParserRuleCall_0_0(lastRuleCallOrigin, this, 0, inst);
			case 1: return new LinkableWidget_GroupParserRuleCall_0_1(lastRuleCallOrigin, this, 1, inst);
			case 2: return new LinkableWidget_ImageParserRuleCall_0_2(lastRuleCallOrigin, this, 2, inst);
			case 3: return new LinkableWidget_FrameParserRuleCall_0_3(lastRuleCallOrigin, this, 3, inst);
			default: return null;
		}	
	}

}

// Text
protected class LinkableWidget_TextParserRuleCall_0_0 extends RuleCallToken {
	
	public LinkableWidget_TextParserRuleCall_0_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public RuleCall getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getTextParserRuleCall_0_0();
	}

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

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getTextAccess().getTextAction_1().getType().getClassifier())
			return null;
		if(checkForRecursion(Text_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);
		}	
	}	
}

// Group
protected class LinkableWidget_GroupParserRuleCall_0_1 extends RuleCallToken {
	
	public LinkableWidget_GroupParserRuleCall_0_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public RuleCall getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getGroupParserRuleCall_0_1();
	}

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

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getGroupRule().getType().getClassifier())
			return null;
		if(checkForRecursion(Group_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);
		}	
	}	
}

// Image
protected class LinkableWidget_ImageParserRuleCall_0_2 extends RuleCallToken {
	
	public LinkableWidget_ImageParserRuleCall_0_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public RuleCall getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getImageParserRuleCall_0_2();
	}

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

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getImageRule().getType().getClassifier())
			return null;
		if(checkForRecursion(Image_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);
		}	
	}	
}

// Frame
protected class LinkableWidget_FrameParserRuleCall_0_3 extends RuleCallToken {
	
	public LinkableWidget_FrameParserRuleCall_0_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public RuleCall getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getFrameParserRuleCall_0_3();
	}

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

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getFrameAccess().getFrameAction_1().getType().getClassifier())
			return null;
		if(checkForRecursion(Frame_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);
		}	
	}	
}


// ("label=" label=(ID | STRING))?
protected class LinkableWidget_Group_1 extends GroupToken {
	
	public LinkableWidget_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getGroup_1();
	}

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

}

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

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

}

// label=(ID | STRING)
protected class LinkableWidget_LabelAssignment_1_1 extends AssignmentToken  {
	
	public LinkableWidget_LabelAssignment_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getLabelAssignment_1_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("label",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("label");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getLinkableWidgetAccess().getLabelIDTerminalRuleCall_1_1_0_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getLinkableWidgetAccess().getLabelIDTerminalRuleCall_1_1_0_0();
			return obj;
		}
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getLinkableWidgetAccess().getLabelSTRINGTerminalRuleCall_1_1_0_1(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getLinkableWidgetAccess().getLabelSTRINGTerminalRuleCall_1_1_0_1();
			return obj;
		}
		return null;
	}

}


// ("icon=" icon=(ID | STRING))?
protected class LinkableWidget_Group_2 extends GroupToken {
	
	public LinkableWidget_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getGroup_2();
	}

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

}

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

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

}

// icon=(ID | STRING)
protected class LinkableWidget_IconAssignment_2_1 extends AssignmentToken  {
	
	public LinkableWidget_IconAssignment_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getIconAssignment_2_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("icon",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("icon");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getLinkableWidgetAccess().getIconIDTerminalRuleCall_2_1_0_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getLinkableWidgetAccess().getIconIDTerminalRuleCall_2_1_0_0();
			return obj;
		}
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getLinkableWidgetAccess().getIconSTRINGTerminalRuleCall_2_1_0_1(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getLinkableWidgetAccess().getIconSTRINGTerminalRuleCall_2_1_0_1();
			return obj;
		}
		return null;
	}

}


// ("{" children+=Widget+ "}")?
protected class LinkableWidget_Group_3 extends GroupToken {
	
	public LinkableWidget_Group_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getGroup_3();
	}

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

}

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

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

}

// children+=Widget+
protected class LinkableWidget_ChildrenAssignment_3_1 extends AssignmentToken  {
	
	public LinkableWidget_ChildrenAssignment_3_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getChildrenAssignment_3_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("children",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("children");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getWidgetRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getLinkableWidgetAccess().getChildrenWidgetParserRuleCall_3_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 LinkableWidget_ChildrenAssignment_3_1(lastRuleCallOrigin, next, actIndex, consumed);
			case 1: return new LinkableWidget_LeftCurlyBracketKeyword_3_0(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}

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

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

}



/************ end Rule LinkableWidget ****************/


/************ begin Rule Frame ****************
 *
 * Frame:
 * 	"Frame" {Frame} ("item=" item=ID)?;
 *
 **/

// "Frame" {Frame} ("item=" item=ID)?
protected class Frame_Group extends GroupToken {
	
	public Frame_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getFrameAccess().getGroup();
	}

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

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

}

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

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

}

// {Frame}
protected class Frame_FrameAction_1 extends ActionToken  {

	public Frame_FrameAction_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Action getGrammarElement() {
		return grammarAccess.getFrameAccess().getFrameAction_1();
	}

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

    @Override
	public IEObjectConsumer tryConsume() {
		if(!eObjectConsumer.isConsumed()) return null;
		return eObjectConsumer;
	}
}

// ("item=" item=ID)?
protected class Frame_Group_2 extends GroupToken {
	
	public Frame_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getFrameAccess().getGroup_2();
	}

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

}

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

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

}

// item=ID
protected class Frame_ItemAssignment_2_1 extends AssignmentToken  {
	
	public Frame_ItemAssignment_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getFrameAccess().getItemAssignment_2_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("item",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("item");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getFrameAccess().getItemIDTerminalRuleCall_2_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getFrameAccess().getItemIDTerminalRuleCall_2_1_0();
			return obj;
		}
		return null;
	}

}



/************ end Rule Frame ****************/


/************ begin Rule Text ****************
 *
 * Text:
 * 	"Text" {Text} ("item=" item=ID)?;
 *
 **/

// "Text" {Text} ("item=" item=ID)?
protected class Text_Group extends GroupToken {
	
	public Text_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getTextAccess().getGroup();
	}

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

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

}

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

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

}

// {Text}
protected class Text_TextAction_1 extends ActionToken  {

	public Text_TextAction_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Action getGrammarElement() {
		return grammarAccess.getTextAccess().getTextAction_1();
	}

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

    @Override
	public IEObjectConsumer tryConsume() {
		if(!eObjectConsumer.isConsumed()) return null;
		return eObjectConsumer;
	}
}

// ("item=" item=ID)?
protected class Text_Group_2 extends GroupToken {
	
	public Text_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getTextAccess().getGroup_2();
	}

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

}

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

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

}

// item=ID
protected class Text_ItemAssignment_2_1 extends AssignmentToken  {
	
	public Text_ItemAssignment_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getTextAccess().getItemAssignment_2_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("item",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("item");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getTextAccess().getItemIDTerminalRuleCall_2_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getTextAccess().getItemIDTerminalRuleCall_2_1_0();
			return obj;
		}
		return null;
	}

}



/************ end Rule Text ****************/


/************ begin Rule Group ****************
 *
 * Group:
 * 	"Group" ("item=" item=ID);
 *
 **/

// "Group" ("item=" item=ID)
protected class Group_Group extends GroupToken {
	
	public Group_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getGroupAccess().getGroup();
	}

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

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

}

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

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

}

// "item=" item=ID
protected class Group_Group_1 extends GroupToken {
	
	public Group_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getGroupAccess().getGroup_1();
	}

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

}

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

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

}

// item=ID
protected class Group_ItemAssignment_1_1 extends AssignmentToken  {
	
	public Group_ItemAssignment_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getGroupAccess().getItemAssignment_1_1();
	}

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

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

}



/************ end Rule Group ****************/


/************ begin Rule Image ****************
 *
 * Image:
 * 	"Image" ("item=" item=ID)? ("url=" url=STRING);
 *
 **/

// "Image" ("item=" item=ID)? ("url=" url=STRING)
protected class Image_Group extends GroupToken {
	
	public Image_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getImageAccess().getGroup();
	}

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

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

}

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

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

}

// ("item=" item=ID)?
protected class Image_Group_1 extends GroupToken {
	
	public Image_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getImageAccess().getGroup_1();
	}

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

}

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

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

}

// item=ID
protected class Image_ItemAssignment_1_1 extends AssignmentToken  {
	
	public Image_ItemAssignment_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getImageAccess().getItemAssignment_1_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("item",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("item");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getImageAccess().getItemIDTerminalRuleCall_1_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getImageAccess().getItemIDTerminalRuleCall_1_1_0();
			return obj;
		}
		return null;
	}

}


// "url=" url=STRING
protected class Image_Group_2 extends GroupToken {
	
	public Image_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getImageAccess().getGroup_2();
	}

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

}

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

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

}

// url=STRING
protected class Image_UrlAssignment_2_1 extends AssignmentToken  {
	
	public Image_UrlAssignment_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getImageAccess().getUrlAssignment_2_1();
	}

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

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

}



/************ end Rule Image ****************/


/************ begin Rule Switch ****************
 *
 * Switch:
 * 	"Switch" ("item=" item=ID) ("label=" label=(ID | STRING))? ("icon=" icon=(ID | STRING))? ("mappings=["
 * 	mappings+=Mapping ("," mappings+=Mapping)* "]")?;
 *
 **/

// "Switch" ("item=" item=ID) ("label=" label=(ID | STRING))? ("icon=" icon=(ID | STRING))? ("mappings=[" mappings+=Mapping
// ("," mappings+=Mapping)* "]")?
protected class Switch_Group extends GroupToken {
	
	public Switch_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSwitchAccess().getGroup();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Switch_Group_4(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Switch_Group_3(lastRuleCallOrigin, this, 1, inst);
			case 2: return new Switch_Group_2(lastRuleCallOrigin, this, 2, inst);
			case 3: return new Switch_Group_1(lastRuleCallOrigin, this, 3, inst);
			default: return null;
		}	
	}

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

}

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

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

}

// "item=" item=ID
protected class Switch_Group_1 extends GroupToken {
	
	public Switch_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSwitchAccess().getGroup_1();
	}

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

}

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

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

}

// item=ID
protected class Switch_ItemAssignment_1_1 extends AssignmentToken  {
	
	public Switch_ItemAssignment_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSwitchAccess().getItemAssignment_1_1();
	}

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

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

}


// ("label=" label=(ID | STRING))?
protected class Switch_Group_2 extends GroupToken {
	
	public Switch_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSwitchAccess().getGroup_2();
	}

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

}

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

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

}

// label=(ID | STRING)
protected class Switch_LabelAssignment_2_1 extends AssignmentToken  {
	
	public Switch_LabelAssignment_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSwitchAccess().getLabelAssignment_2_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("label",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("label");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSwitchAccess().getLabelIDTerminalRuleCall_2_1_0_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSwitchAccess().getLabelIDTerminalRuleCall_2_1_0_0();
			return obj;
		}
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSwitchAccess().getLabelSTRINGTerminalRuleCall_2_1_0_1(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSwitchAccess().getLabelSTRINGTerminalRuleCall_2_1_0_1();
			return obj;
		}
		return null;
	}

}


// ("icon=" icon=(ID | STRING))?
protected class Switch_Group_3 extends GroupToken {
	
	public Switch_Group_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSwitchAccess().getGroup_3();
	}

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

}

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

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

}

// icon=(ID | STRING)
protected class Switch_IconAssignment_3_1 extends AssignmentToken  {
	
	public Switch_IconAssignment_3_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSwitchAccess().getIconAssignment_3_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("icon",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("icon");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSwitchAccess().getIconIDTerminalRuleCall_3_1_0_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSwitchAccess().getIconIDTerminalRuleCall_3_1_0_0();
			return obj;
		}
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSwitchAccess().getIconSTRINGTerminalRuleCall_3_1_0_1(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSwitchAccess().getIconSTRINGTerminalRuleCall_3_1_0_1();
			return obj;
		}
		return null;
	}

}


// ("mappings=[" mappings+=Mapping ("," mappings+=Mapping)* "]")?
protected class Switch_Group_4 extends GroupToken {
	
	public Switch_Group_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSwitchAccess().getGroup_4();
	}

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

}

// "mappings=["
protected class Switch_MappingsKeyword_4_0 extends KeywordToken  {
	
	public Switch_MappingsKeyword_4_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSwitchAccess().getMappingsKeyword_4_0();
	}

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

}

// mappings+=Mapping
protected class Switch_MappingsAssignment_4_1 extends AssignmentToken  {
	
	public Switch_MappingsAssignment_4_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSwitchAccess().getMappingsAssignment_4_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("mappings",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("mappings");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getMappingRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getSwitchAccess().getMappingsMappingParserRuleCall_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 Switch_MappingsKeyword_4_0(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}

// ("," mappings+=Mapping)*
protected class Switch_Group_4_2 extends GroupToken {
	
	public Switch_Group_4_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSwitchAccess().getGroup_4_2();
	}

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

}

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

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

}

// mappings+=Mapping
protected class Switch_MappingsAssignment_4_2_1 extends AssignmentToken  {
	
	public Switch_MappingsAssignment_4_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSwitchAccess().getMappingsAssignment_4_2_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("mappings",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("mappings");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getMappingRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getSwitchAccess().getMappingsMappingParserRuleCall_4_2_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 Switch_CommaKeyword_4_2_0(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}


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

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

}



/************ end Rule Switch ****************/


/************ begin Rule Slider ****************
 *
 * Slider:
 * 	"Slider" ("item=" item=ID) ("label=" label=(ID | STRING))? ("icon=" icon=(ID | STRING))? ("sendFrequency="
 * 	frequency=ID)? switchEnabled?="switchSupport"?;
 *
 **/

// "Slider" ("item=" item=ID) ("label=" label=(ID | STRING))? ("icon=" icon=(ID | STRING))? ("sendFrequency="
// frequency=ID)? switchEnabled?="switchSupport"?
protected class Slider_Group extends GroupToken {
	
	public Slider_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSliderAccess().getGroup();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Slider_SwitchEnabledAssignment_5(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Slider_Group_4(lastRuleCallOrigin, this, 1, inst);
			case 2: return new Slider_Group_3(lastRuleCallOrigin, this, 2, inst);
			case 3: return new Slider_Group_2(lastRuleCallOrigin, this, 3, inst);
			case 4: return new Slider_Group_1(lastRuleCallOrigin, this, 4, inst);
			default: return null;
		}	
	}

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

}

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

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

}

// "item=" item=ID
protected class Slider_Group_1 extends GroupToken {
	
	public Slider_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSliderAccess().getGroup_1();
	}

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

}

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

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

}

// item=ID
protected class Slider_ItemAssignment_1_1 extends AssignmentToken  {
	
	public Slider_ItemAssignment_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSliderAccess().getItemAssignment_1_1();
	}

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

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

}


// ("label=" label=(ID | STRING))?
protected class Slider_Group_2 extends GroupToken {
	
	public Slider_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSliderAccess().getGroup_2();
	}

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

}

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

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

}

// label=(ID | STRING)
protected class Slider_LabelAssignment_2_1 extends AssignmentToken  {
	
	public Slider_LabelAssignment_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSliderAccess().getLabelAssignment_2_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("label",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("label");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSliderAccess().getLabelIDTerminalRuleCall_2_1_0_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSliderAccess().getLabelIDTerminalRuleCall_2_1_0_0();
			return obj;
		}
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSliderAccess().getLabelSTRINGTerminalRuleCall_2_1_0_1(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSliderAccess().getLabelSTRINGTerminalRuleCall_2_1_0_1();
			return obj;
		}
		return null;
	}

}


// ("icon=" icon=(ID | STRING))?
protected class Slider_Group_3 extends GroupToken {
	
	public Slider_Group_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSliderAccess().getGroup_3();
	}

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

}

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

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

}

// icon=(ID | STRING)
protected class Slider_IconAssignment_3_1 extends AssignmentToken  {
	
	public Slider_IconAssignment_3_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSliderAccess().getIconAssignment_3_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("icon",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("icon");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSliderAccess().getIconIDTerminalRuleCall_3_1_0_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSliderAccess().getIconIDTerminalRuleCall_3_1_0_0();
			return obj;
		}
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSliderAccess().getIconSTRINGTerminalRuleCall_3_1_0_1(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSliderAccess().getIconSTRINGTerminalRuleCall_3_1_0_1();
			return obj;
		}
		return null;
	}

}


// ("sendFrequency=" frequency=ID)?
protected class Slider_Group_4 extends GroupToken {
	
	public Slider_Group_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSliderAccess().getGroup_4();
	}

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

}

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

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

}

// frequency=ID
protected class Slider_FrequencyAssignment_4_1 extends AssignmentToken  {
	
	public Slider_FrequencyAssignment_4_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSliderAccess().getFrequencyAssignment_4_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("frequency",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("frequency");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSliderAccess().getFrequencyIDTerminalRuleCall_4_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSliderAccess().getFrequencyIDTerminalRuleCall_4_1_0();
			return obj;
		}
		return null;
	}

}


// switchEnabled?="switchSupport"?
protected class Slider_SwitchEnabledAssignment_5 extends AssignmentToken  {
	
	public Slider_SwitchEnabledAssignment_5(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSliderAccess().getSwitchEnabledAssignment_5();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Slider_Group_4(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Slider_Group_3(lastRuleCallOrigin, this, 1, inst);
			case 2: return new Slider_Group_2(lastRuleCallOrigin, this, 2, inst);
			case 3: return new Slider_Group_1(lastRuleCallOrigin, this, 3, inst);
			default: return null;
		}	
	}

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

}


/************ end Rule Slider ****************/


/************ begin Rule Selection ****************
 *
 * Selection:
 * 	"Selection" ("item=" item=ID) ("label=" label=(ID | STRING))? ("icon=" icon=(ID | STRING))? ("mappings=["
 * 	mappings+=Mapping ("," mappings+=Mapping)* "]")?;
 *
 **/

// "Selection" ("item=" item=ID) ("label=" label=(ID | STRING))? ("icon=" icon=(ID | STRING))? ("mappings=["
// mappings+=Mapping ("," mappings+=Mapping)* "]")?
protected class Selection_Group extends GroupToken {
	
	public Selection_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSelectionAccess().getGroup();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Selection_Group_4(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Selection_Group_3(lastRuleCallOrigin, this, 1, inst);
			case 2: return new Selection_Group_2(lastRuleCallOrigin, this, 2, inst);
			case 3: return new Selection_Group_1(lastRuleCallOrigin, this, 3, inst);
			default: return null;
		}	
	}

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

}

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

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

}

// "item=" item=ID
protected class Selection_Group_1 extends GroupToken {
	
	public Selection_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSelectionAccess().getGroup_1();
	}

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

}

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

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

}

// item=ID
protected class Selection_ItemAssignment_1_1 extends AssignmentToken  {
	
	public Selection_ItemAssignment_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSelectionAccess().getItemAssignment_1_1();
	}

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

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

}


// ("label=" label=(ID | STRING))?
protected class Selection_Group_2 extends GroupToken {
	
	public Selection_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSelectionAccess().getGroup_2();
	}

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

}

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

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

}

// label=(ID | STRING)
protected class Selection_LabelAssignment_2_1 extends AssignmentToken  {
	
	public Selection_LabelAssignment_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSelectionAccess().getLabelAssignment_2_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("label",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("label");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSelectionAccess().getLabelIDTerminalRuleCall_2_1_0_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSelectionAccess().getLabelIDTerminalRuleCall_2_1_0_0();
			return obj;
		}
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSelectionAccess().getLabelSTRINGTerminalRuleCall_2_1_0_1(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSelectionAccess().getLabelSTRINGTerminalRuleCall_2_1_0_1();
			return obj;
		}
		return null;
	}

}


// ("icon=" icon=(ID | STRING))?
protected class Selection_Group_3 extends GroupToken {
	
	public Selection_Group_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSelectionAccess().getGroup_3();
	}

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

}

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

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

}

// icon=(ID | STRING)
protected class Selection_IconAssignment_3_1 extends AssignmentToken  {
	
	public Selection_IconAssignment_3_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSelectionAccess().getIconAssignment_3_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("icon",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("icon");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSelectionAccess().getIconIDTerminalRuleCall_3_1_0_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSelectionAccess().getIconIDTerminalRuleCall_3_1_0_0();
			return obj;
		}
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSelectionAccess().getIconSTRINGTerminalRuleCall_3_1_0_1(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSelectionAccess().getIconSTRINGTerminalRuleCall_3_1_0_1();
			return obj;
		}
		return null;
	}

}


// ("mappings=[" mappings+=Mapping ("," mappings+=Mapping)* "]")?
protected class Selection_Group_4 extends GroupToken {
	
	public Selection_Group_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSelectionAccess().getGroup_4();
	}

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

}

// "mappings=["
protected class Selection_MappingsKeyword_4_0 extends KeywordToken  {
	
	public Selection_MappingsKeyword_4_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSelectionAccess().getMappingsKeyword_4_0();
	}

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

}

// mappings+=Mapping
protected class Selection_MappingsAssignment_4_1 extends AssignmentToken  {
	
	public Selection_MappingsAssignment_4_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSelectionAccess().getMappingsAssignment_4_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("mappings",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("mappings");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getMappingRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getSelectionAccess().getMappingsMappingParserRuleCall_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 Selection_MappingsKeyword_4_0(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}

// ("," mappings+=Mapping)*
protected class Selection_Group_4_2 extends GroupToken {
	
	public Selection_Group_4_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSelectionAccess().getGroup_4_2();
	}

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

}

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

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

}

// mappings+=Mapping
protected class Selection_MappingsAssignment_4_2_1 extends AssignmentToken  {
	
	public Selection_MappingsAssignment_4_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSelectionAccess().getMappingsAssignment_4_2_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("mappings",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("mappings");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getMappingRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getSelectionAccess().getMappingsMappingParserRuleCall_4_2_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 Selection_CommaKeyword_4_2_0(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}


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

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

}



/************ end Rule Selection ****************/


/************ begin Rule List ****************
 *
 * List:
 * 	"List" ("item=" item=ID) ("label=" label=(ID | STRING))? ("icon=" icon=(ID | STRING))? ("separator="
 * 	separator=STRING);
 *
 **/

// "List" ("item=" item=ID) ("label=" label=(ID | STRING))? ("icon=" icon=(ID | STRING))? ("separator=" separator=STRING)
protected class List_Group extends GroupToken {
	
	public List_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getListAccess().getGroup();
	}

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

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

}

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

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

}

// "item=" item=ID
protected class List_Group_1 extends GroupToken {
	
	public List_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getListAccess().getGroup_1();
	}

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

}

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

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

}

// item=ID
protected class List_ItemAssignment_1_1 extends AssignmentToken  {
	
	public List_ItemAssignment_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getListAccess().getItemAssignment_1_1();
	}

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

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

}


// ("label=" label=(ID | STRING))?
protected class List_Group_2 extends GroupToken {
	
	public List_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getListAccess().getGroup_2();
	}

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

}

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

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

}

// label=(ID | STRING)
protected class List_LabelAssignment_2_1 extends AssignmentToken  {
	
	public List_LabelAssignment_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getListAccess().getLabelAssignment_2_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("label",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("label");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getListAccess().getLabelIDTerminalRuleCall_2_1_0_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getListAccess().getLabelIDTerminalRuleCall_2_1_0_0();
			return obj;
		}
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getListAccess().getLabelSTRINGTerminalRuleCall_2_1_0_1(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getListAccess().getLabelSTRINGTerminalRuleCall_2_1_0_1();
			return obj;
		}
		return null;
	}

}


// ("icon=" icon=(ID | STRING))?
protected class List_Group_3 extends GroupToken {
	
	public List_Group_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getListAccess().getGroup_3();
	}

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

}

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

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

}

// icon=(ID | STRING)
protected class List_IconAssignment_3_1 extends AssignmentToken  {
	
	public List_IconAssignment_3_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getListAccess().getIconAssignment_3_1();
	}

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

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("icon",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("icon");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getListAccess().getIconIDTerminalRuleCall_3_1_0_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getListAccess().getIconIDTerminalRuleCall_3_1_0_0();
			return obj;
		}
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getListAccess().getIconSTRINGTerminalRuleCall_3_1_0_1(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getListAccess().getIconSTRINGTerminalRuleCall_3_1_0_1();
			return obj;
		}
		return null;
	}

}


// "separator=" separator=STRING
protected class List_Group_4 extends GroupToken {
	
	public List_Group_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getListAccess().getGroup_4();
	}

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

}

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

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

}

// separator=STRING
protected class List_SeparatorAssignment_4_1 extends AssignmentToken  {
	
	public List_SeparatorAssignment_4_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getListAccess().getSeparatorAssignment_4_1();
	}

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

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

}



/************ end Rule List ****************/


/************ begin Rule Mapping ****************
 *
 * Mapping:
 * 	cmd=(ID | STRING) "=" label=(ID | STRING);
 *
 **/

// cmd=(ID | STRING) "=" label=(ID | STRING)
protected class Mapping_Group extends GroupToken {
	
	public Mapping_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getMappingAccess().getGroup();
	}

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

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

}

// cmd=(ID | STRING)
protected class Mapping_CmdAssignment_0 extends AssignmentToken  {
	
	public Mapping_CmdAssignment_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getMappingAccess().getCmdAssignment_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("cmd",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("cmd");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getMappingAccess().getCmdIDTerminalRuleCall_0_0_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getMappingAccess().getCmdIDTerminalRuleCall_0_0_0();
			return obj;
		}
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getMappingAccess().getCmdSTRINGTerminalRuleCall_0_0_1(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getMappingAccess().getCmdSTRINGTerminalRuleCall_0_0_1();
			return obj;
		}
		return null;
	}

}

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

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

}

// label=(ID | STRING)
protected class Mapping_LabelAssignment_2 extends AssignmentToken  {
	
	public Mapping_LabelAssignment_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getMappingAccess().getLabelAssignment_2();
	}

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

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

}


/************ end Rule Mapping ****************/

}
