/*
* generated by Xtext
*/
grammar InternalSitemap;

options {
	superClass=AbstractInternalAntlrParser;
	
}

@lexer::header {
package org.openhab.model.parser.antlr.internal;

// Hack: Use our own Lexer superclass by means of import. 
// Currently there is no other way to specify the superclass for the lexer.
import org.eclipse.xtext.parser.antlr.Lexer;
}

@parser::header {
package org.openhab.model.parser.antlr.internal; 

import java.io.InputStream;
import org.eclipse.xtext.*;
import org.eclipse.xtext.parser.*;
import org.eclipse.xtext.parser.impl.*;
import org.eclipse.xtext.parsetree.*;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
import org.eclipse.xtext.conversion.ValueConverterException;
import org.openhab.model.services.SitemapGrammarAccess;

}

@parser::members {

 	private SitemapGrammarAccess grammarAccess;
 	
    public InternalSitemapParser(TokenStream input, IAstFactory factory, SitemapGrammarAccess grammarAccess) {
        this(input);
        this.factory = factory;
        registerRules(grammarAccess.getGrammar());
        this.grammarAccess = grammarAccess;
    }
    
    @Override
    protected InputStream getTokenFile() {
    	ClassLoader classLoader = getClass().getClassLoader();
    	return classLoader.getResourceAsStream("org/openhab/model/parser/antlr/internal/InternalSitemap.tokens");
    }
    
    @Override
    protected String getFirstRuleName() {
    	return "SitemapModel";	
   	}
   	
   	@Override
   	protected SitemapGrammarAccess getGrammarAccess() {
   		return grammarAccess;
   	}
}

@rulecatch { 
    catch (RecognitionException re) { 
        recover(input,re); 
        appendSkippedTokens();
    } 
}




// Entry rule entryRuleSitemapModel
entryRuleSitemapModel returns [EObject current=null] 
	:
	{ currentNode = createCompositeNode(grammarAccess.getSitemapModelRule(), currentNode); }
	 iv_ruleSitemapModel=ruleSitemapModel 
	 { $current=$iv_ruleSitemapModel.current; } 
	 EOF 
;

// Rule SitemapModel
ruleSitemapModel returns [EObject current=null] 
    @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); 
    }
    @after { resetLookahead(); 
    	lastConsumedNode = currentNode;
    }:
(	'sitemap' 
    {
        createLeafNode(grammarAccess.getSitemapModelAccess().getSitemapKeyword_0(), null); 
    }

    { 
        currentNode=createCompositeNode(grammarAccess.getSitemapModelAccess().getSitemapParserRuleCall_1(), currentNode); 
    }
    this_Sitemap_1=ruleSitemap
    { 
        $current = $this_Sitemap_1.current; 
        currentNode = currentNode.getParent();
    }
)
;





// Entry rule entryRuleSitemap
entryRuleSitemap returns [EObject current=null] 
	:
	{ currentNode = createCompositeNode(grammarAccess.getSitemapRule(), currentNode); }
	 iv_ruleSitemap=ruleSitemap 
	 { $current=$iv_ruleSitemap.current; } 
	 EOF 
;

// Rule Sitemap
ruleSitemap returns [EObject current=null] 
    @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); 
    }
    @after { resetLookahead(); 
    	lastConsumedNode = currentNode;
    }:
((
(
		lv_name_0_0=RULE_ID
		{
			createLeafNode(grammarAccess.getSitemapAccess().getNameIDTerminalRuleCall_0_0(), "name"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSitemapRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"name",
	        		lv_name_0_0, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)
)(	'label=' 
    {
        createLeafNode(grammarAccess.getSitemapAccess().getLabelKeyword_1_0(), null); 
    }
(
(
		lv_label_2_0=RULE_STRING
		{
			createLeafNode(grammarAccess.getSitemapAccess().getLabelSTRINGTerminalRuleCall_1_1_0(), "label"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSitemapRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"label",
	        		lv_label_2_0, 
	        		"STRING", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)
))?(	'icon=' 
    {
        createLeafNode(grammarAccess.getSitemapAccess().getIconKeyword_2_0(), null); 
    }
(
(
		lv_icon_4_0=RULE_STRING
		{
			createLeafNode(grammarAccess.getSitemapAccess().getIconSTRINGTerminalRuleCall_2_1_0(), "icon"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSitemapRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"icon",
	        		lv_icon_4_0, 
	        		"STRING", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)
))?	'{' 
    {
        createLeafNode(grammarAccess.getSitemapAccess().getLeftCurlyBracketKeyword_3(), null); 
    }
(
(
		{ 
	        currentNode=createCompositeNode(grammarAccess.getSitemapAccess().getChildrenWidgetParserRuleCall_4_0(), currentNode); 
	    }
		lv_children_6_0=ruleWidget		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSitemapRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode.getParent(), $current);
	        }
	        try {
	       		add(
	       			$current, 
	       			"children",
	        		lv_children_6_0, 
	        		"Widget", 
	        		currentNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	        currentNode = currentNode.getParent();
	    }

)
)+	'}' 
    {
        createLeafNode(grammarAccess.getSitemapAccess().getRightCurlyBracketKeyword_5(), null); 
    }
)
;





// Entry rule entryRuleWidget
entryRuleWidget returns [EObject current=null] 
	:
	{ currentNode = createCompositeNode(grammarAccess.getWidgetRule(), currentNode); }
	 iv_ruleWidget=ruleWidget 
	 { $current=$iv_ruleWidget.current; } 
	 EOF 
;

// Rule Widget
ruleWidget returns [EObject current=null] 
    @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); 
    }
    @after { resetLookahead(); 
    	lastConsumedNode = currentNode;
    }:
(
    { 
        currentNode=createCompositeNode(grammarAccess.getWidgetAccess().getLinkableWidgetParserRuleCall_0(), currentNode); 
    }
    this_LinkableWidget_0=ruleLinkableWidget
    { 
        $current = $this_LinkableWidget_0.current; 
        currentNode = currentNode.getParent();
    }

    |(
    { 
        currentNode=createCompositeNode(grammarAccess.getWidgetAccess().getSwitchParserRuleCall_1_0(), currentNode); 
    }
    this_Switch_1=ruleSwitch
    { 
        $current = $this_Switch_1.current; 
        currentNode = currentNode.getParent();
    }

    |
    { 
        currentNode=createCompositeNode(grammarAccess.getWidgetAccess().getSelectionParserRuleCall_1_1(), currentNode); 
    }
    this_Selection_2=ruleSelection
    { 
        $current = $this_Selection_2.current; 
        currentNode = currentNode.getParent();
    }

    |
    { 
        currentNode=createCompositeNode(grammarAccess.getWidgetAccess().getSliderParserRuleCall_1_2(), currentNode); 
    }
    this_Slider_3=ruleSlider
    { 
        $current = $this_Slider_3.current; 
        currentNode = currentNode.getParent();
    }

    |
    { 
        currentNode=createCompositeNode(grammarAccess.getWidgetAccess().getListParserRuleCall_1_3(), currentNode); 
    }
    this_List_4=ruleList
    { 
        $current = $this_List_4.current; 
        currentNode = currentNode.getParent();
    }
))
;





// Entry rule entryRuleLinkableWidget
entryRuleLinkableWidget returns [EObject current=null] 
	:
	{ currentNode = createCompositeNode(grammarAccess.getLinkableWidgetRule(), currentNode); }
	 iv_ruleLinkableWidget=ruleLinkableWidget 
	 { $current=$iv_ruleLinkableWidget.current; } 
	 EOF 
;

// Rule LinkableWidget
ruleLinkableWidget returns [EObject current=null] 
    @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); 
    }
    @after { resetLookahead(); 
    	lastConsumedNode = currentNode;
    }:
((
    { 
        currentNode=createCompositeNode(grammarAccess.getLinkableWidgetAccess().getTextParserRuleCall_0_0(), currentNode); 
    }
    this_Text_0=ruleText
    { 
        $current = $this_Text_0.current; 
        currentNode = currentNode.getParent();
    }

    |
    { 
        currentNode=createCompositeNode(grammarAccess.getLinkableWidgetAccess().getGroupParserRuleCall_0_1(), currentNode); 
    }
    this_Group_1=ruleGroup
    { 
        $current = $this_Group_1.current; 
        currentNode = currentNode.getParent();
    }

    |
    { 
        currentNode=createCompositeNode(grammarAccess.getLinkableWidgetAccess().getImageParserRuleCall_0_2(), currentNode); 
    }
    this_Image_2=ruleImage
    { 
        $current = $this_Image_2.current; 
        currentNode = currentNode.getParent();
    }

    |
    { 
        currentNode=createCompositeNode(grammarAccess.getLinkableWidgetAccess().getFrameParserRuleCall_0_3(), currentNode); 
    }
    this_Frame_3=ruleFrame
    { 
        $current = $this_Frame_3.current; 
        currentNode = currentNode.getParent();
    }
)(	'label=' 
    {
        createLeafNode(grammarAccess.getLinkableWidgetAccess().getLabelKeyword_1_0(), null); 
    }
(
(
(
		lv_label_5_1=RULE_ID
		{
			createLeafNode(grammarAccess.getLinkableWidgetAccess().getLabelIDTerminalRuleCall_1_1_0_0(), "label"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getLinkableWidgetRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"label",
	        		lv_label_5_1, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

    |		lv_label_5_2=RULE_STRING
		{
			createLeafNode(grammarAccess.getLinkableWidgetAccess().getLabelSTRINGTerminalRuleCall_1_1_0_1(), "label"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getLinkableWidgetRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"label",
	        		lv_label_5_2, 
	        		"STRING", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)

)
))?(	'icon=' 
    {
        createLeafNode(grammarAccess.getLinkableWidgetAccess().getIconKeyword_2_0(), null); 
    }
(
(
(
		lv_icon_7_1=RULE_ID
		{
			createLeafNode(grammarAccess.getLinkableWidgetAccess().getIconIDTerminalRuleCall_2_1_0_0(), "icon"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getLinkableWidgetRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"icon",
	        		lv_icon_7_1, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

    |		lv_icon_7_2=RULE_STRING
		{
			createLeafNode(grammarAccess.getLinkableWidgetAccess().getIconSTRINGTerminalRuleCall_2_1_0_1(), "icon"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getLinkableWidgetRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"icon",
	        		lv_icon_7_2, 
	        		"STRING", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)

)
))?(	'{' 
    {
        createLeafNode(grammarAccess.getLinkableWidgetAccess().getLeftCurlyBracketKeyword_3_0(), null); 
    }
(
(
		{ 
	        currentNode=createCompositeNode(grammarAccess.getLinkableWidgetAccess().getChildrenWidgetParserRuleCall_3_1_0(), currentNode); 
	    }
		lv_children_9_0=ruleWidget		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getLinkableWidgetRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode.getParent(), $current);
	        }
	        try {
	       		add(
	       			$current, 
	       			"children",
	        		lv_children_9_0, 
	        		"Widget", 
	        		currentNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	        currentNode = currentNode.getParent();
	    }

)
)+	'}' 
    {
        createLeafNode(grammarAccess.getLinkableWidgetAccess().getRightCurlyBracketKeyword_3_2(), null); 
    }
)?)
;





// Entry rule entryRuleFrame
entryRuleFrame returns [EObject current=null] 
	:
	{ currentNode = createCompositeNode(grammarAccess.getFrameRule(), currentNode); }
	 iv_ruleFrame=ruleFrame 
	 { $current=$iv_ruleFrame.current; } 
	 EOF 
;

// Rule Frame
ruleFrame returns [EObject current=null] 
    @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); 
    }
    @after { resetLookahead(); 
    	lastConsumedNode = currentNode;
    }:
(	'Frame' 
    {
        createLeafNode(grammarAccess.getFrameAccess().getFrameKeyword_0(), null); 
    }
(
    { 
        temp=factory.create(grammarAccess.getFrameAccess().getFrameAction_1().getType().getClassifier());
        $current = temp; 
        temp = null;
        CompositeNode newNode = createCompositeNode(grammarAccess.getFrameAccess().getFrameAction_1(), currentNode.getParent());
    newNode.getChildren().add(currentNode);
    moveLookaheadInfo(currentNode, newNode);
    currentNode = newNode; 
        associateNodeWithAstElement(currentNode, $current); 
    }
)(	'item=' 
    {
        createLeafNode(grammarAccess.getFrameAccess().getItemKeyword_2_0(), null); 
    }
(
(
		lv_item_3_0=RULE_ID
		{
			createLeafNode(grammarAccess.getFrameAccess().getItemIDTerminalRuleCall_2_1_0(), "item"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getFrameRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"item",
	        		lv_item_3_0, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)
))?)
;





// Entry rule entryRuleText
entryRuleText returns [EObject current=null] 
	:
	{ currentNode = createCompositeNode(grammarAccess.getTextRule(), currentNode); }
	 iv_ruleText=ruleText 
	 { $current=$iv_ruleText.current; } 
	 EOF 
;

// Rule Text
ruleText returns [EObject current=null] 
    @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); 
    }
    @after { resetLookahead(); 
    	lastConsumedNode = currentNode;
    }:
(	'Text' 
    {
        createLeafNode(grammarAccess.getTextAccess().getTextKeyword_0(), null); 
    }
(
    { 
        temp=factory.create(grammarAccess.getTextAccess().getTextAction_1().getType().getClassifier());
        $current = temp; 
        temp = null;
        CompositeNode newNode = createCompositeNode(grammarAccess.getTextAccess().getTextAction_1(), currentNode.getParent());
    newNode.getChildren().add(currentNode);
    moveLookaheadInfo(currentNode, newNode);
    currentNode = newNode; 
        associateNodeWithAstElement(currentNode, $current); 
    }
)(	'item=' 
    {
        createLeafNode(grammarAccess.getTextAccess().getItemKeyword_2_0(), null); 
    }
(
(
		lv_item_3_0=RULE_ID
		{
			createLeafNode(grammarAccess.getTextAccess().getItemIDTerminalRuleCall_2_1_0(), "item"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getTextRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"item",
	        		lv_item_3_0, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)
))?)
;





// Entry rule entryRuleGroup
entryRuleGroup returns [EObject current=null] 
	:
	{ currentNode = createCompositeNode(grammarAccess.getGroupRule(), currentNode); }
	 iv_ruleGroup=ruleGroup 
	 { $current=$iv_ruleGroup.current; } 
	 EOF 
;

// Rule Group
ruleGroup returns [EObject current=null] 
    @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); 
    }
    @after { resetLookahead(); 
    	lastConsumedNode = currentNode;
    }:
(	'Group' 
    {
        createLeafNode(grammarAccess.getGroupAccess().getGroupKeyword_0(), null); 
    }
(	'item=' 
    {
        createLeafNode(grammarAccess.getGroupAccess().getItemKeyword_1_0(), null); 
    }
(
(
		lv_item_2_0=RULE_ID
		{
			createLeafNode(grammarAccess.getGroupAccess().getItemIDTerminalRuleCall_1_1_0(), "item"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getGroupRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"item",
	        		lv_item_2_0, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)
)))
;





// Entry rule entryRuleImage
entryRuleImage returns [EObject current=null] 
	:
	{ currentNode = createCompositeNode(grammarAccess.getImageRule(), currentNode); }
	 iv_ruleImage=ruleImage 
	 { $current=$iv_ruleImage.current; } 
	 EOF 
;

// Rule Image
ruleImage returns [EObject current=null] 
    @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); 
    }
    @after { resetLookahead(); 
    	lastConsumedNode = currentNode;
    }:
(	'Image' 
    {
        createLeafNode(grammarAccess.getImageAccess().getImageKeyword_0(), null); 
    }
(	'item=' 
    {
        createLeafNode(grammarAccess.getImageAccess().getItemKeyword_1_0(), null); 
    }
(
(
		lv_item_2_0=RULE_ID
		{
			createLeafNode(grammarAccess.getImageAccess().getItemIDTerminalRuleCall_1_1_0(), "item"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getImageRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"item",
	        		lv_item_2_0, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)
))?(	'url=' 
    {
        createLeafNode(grammarAccess.getImageAccess().getUrlKeyword_2_0(), null); 
    }
(
(
		lv_url_4_0=RULE_STRING
		{
			createLeafNode(grammarAccess.getImageAccess().getUrlSTRINGTerminalRuleCall_2_1_0(), "url"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getImageRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"url",
	        		lv_url_4_0, 
	        		"STRING", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)
)))
;





// Entry rule entryRuleSwitch
entryRuleSwitch returns [EObject current=null] 
	:
	{ currentNode = createCompositeNode(grammarAccess.getSwitchRule(), currentNode); }
	 iv_ruleSwitch=ruleSwitch 
	 { $current=$iv_ruleSwitch.current; } 
	 EOF 
;

// Rule Switch
ruleSwitch returns [EObject current=null] 
    @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); 
    }
    @after { resetLookahead(); 
    	lastConsumedNode = currentNode;
    }:
(	'Switch' 
    {
        createLeafNode(grammarAccess.getSwitchAccess().getSwitchKeyword_0(), null); 
    }
(	'item=' 
    {
        createLeafNode(grammarAccess.getSwitchAccess().getItemKeyword_1_0(), null); 
    }
(
(
		lv_item_2_0=RULE_ID
		{
			createLeafNode(grammarAccess.getSwitchAccess().getItemIDTerminalRuleCall_1_1_0(), "item"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSwitchRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"item",
	        		lv_item_2_0, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)
))(	'label=' 
    {
        createLeafNode(grammarAccess.getSwitchAccess().getLabelKeyword_2_0(), null); 
    }
(
(
(
		lv_label_4_1=RULE_ID
		{
			createLeafNode(grammarAccess.getSwitchAccess().getLabelIDTerminalRuleCall_2_1_0_0(), "label"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSwitchRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"label",
	        		lv_label_4_1, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

    |		lv_label_4_2=RULE_STRING
		{
			createLeafNode(grammarAccess.getSwitchAccess().getLabelSTRINGTerminalRuleCall_2_1_0_1(), "label"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSwitchRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"label",
	        		lv_label_4_2, 
	        		"STRING", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)

)
))?(	'icon=' 
    {
        createLeafNode(grammarAccess.getSwitchAccess().getIconKeyword_3_0(), null); 
    }
(
(
(
		lv_icon_6_1=RULE_ID
		{
			createLeafNode(grammarAccess.getSwitchAccess().getIconIDTerminalRuleCall_3_1_0_0(), "icon"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSwitchRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"icon",
	        		lv_icon_6_1, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

    |		lv_icon_6_2=RULE_STRING
		{
			createLeafNode(grammarAccess.getSwitchAccess().getIconSTRINGTerminalRuleCall_3_1_0_1(), "icon"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSwitchRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"icon",
	        		lv_icon_6_2, 
	        		"STRING", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)

)
))?(	'mappings=[' 
    {
        createLeafNode(grammarAccess.getSwitchAccess().getMappingsKeyword_4_0(), null); 
    }
(
(
		{ 
	        currentNode=createCompositeNode(grammarAccess.getSwitchAccess().getMappingsMappingParserRuleCall_4_1_0(), currentNode); 
	    }
		lv_mappings_8_0=ruleMapping		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSwitchRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode.getParent(), $current);
	        }
	        try {
	       		add(
	       			$current, 
	       			"mappings",
	        		lv_mappings_8_0, 
	        		"Mapping", 
	        		currentNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	        currentNode = currentNode.getParent();
	    }

)
)(	',' 
    {
        createLeafNode(grammarAccess.getSwitchAccess().getCommaKeyword_4_2_0(), null); 
    }
(
(
		{ 
	        currentNode=createCompositeNode(grammarAccess.getSwitchAccess().getMappingsMappingParserRuleCall_4_2_1_0(), currentNode); 
	    }
		lv_mappings_10_0=ruleMapping		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSwitchRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode.getParent(), $current);
	        }
	        try {
	       		add(
	       			$current, 
	       			"mappings",
	        		lv_mappings_10_0, 
	        		"Mapping", 
	        		currentNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	        currentNode = currentNode.getParent();
	    }

)
))*	']' 
    {
        createLeafNode(grammarAccess.getSwitchAccess().getRightSquareBracketKeyword_4_3(), null); 
    }
)?)
;





// Entry rule entryRuleSlider
entryRuleSlider returns [EObject current=null] 
	:
	{ currentNode = createCompositeNode(grammarAccess.getSliderRule(), currentNode); }
	 iv_ruleSlider=ruleSlider 
	 { $current=$iv_ruleSlider.current; } 
	 EOF 
;

// Rule Slider
ruleSlider returns [EObject current=null] 
    @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); 
    }
    @after { resetLookahead(); 
    	lastConsumedNode = currentNode;
    }:
(	'Slider' 
    {
        createLeafNode(grammarAccess.getSliderAccess().getSliderKeyword_0(), null); 
    }
(	'item=' 
    {
        createLeafNode(grammarAccess.getSliderAccess().getItemKeyword_1_0(), null); 
    }
(
(
		lv_item_2_0=RULE_ID
		{
			createLeafNode(grammarAccess.getSliderAccess().getItemIDTerminalRuleCall_1_1_0(), "item"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSliderRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"item",
	        		lv_item_2_0, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)
))(	'label=' 
    {
        createLeafNode(grammarAccess.getSliderAccess().getLabelKeyword_2_0(), null); 
    }
(
(
(
		lv_label_4_1=RULE_ID
		{
			createLeafNode(grammarAccess.getSliderAccess().getLabelIDTerminalRuleCall_2_1_0_0(), "label"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSliderRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"label",
	        		lv_label_4_1, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

    |		lv_label_4_2=RULE_STRING
		{
			createLeafNode(grammarAccess.getSliderAccess().getLabelSTRINGTerminalRuleCall_2_1_0_1(), "label"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSliderRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"label",
	        		lv_label_4_2, 
	        		"STRING", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)

)
))?(	'icon=' 
    {
        createLeafNode(grammarAccess.getSliderAccess().getIconKeyword_3_0(), null); 
    }
(
(
(
		lv_icon_6_1=RULE_ID
		{
			createLeafNode(grammarAccess.getSliderAccess().getIconIDTerminalRuleCall_3_1_0_0(), "icon"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSliderRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"icon",
	        		lv_icon_6_1, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

    |		lv_icon_6_2=RULE_STRING
		{
			createLeafNode(grammarAccess.getSliderAccess().getIconSTRINGTerminalRuleCall_3_1_0_1(), "icon"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSliderRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"icon",
	        		lv_icon_6_2, 
	        		"STRING", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)

)
))?(	'sendFrequency=' 
    {
        createLeafNode(grammarAccess.getSliderAccess().getSendFrequencyKeyword_4_0(), null); 
    }
(
(
		lv_frequency_8_0=RULE_ID
		{
			createLeafNode(grammarAccess.getSliderAccess().getFrequencyIDTerminalRuleCall_4_1_0(), "frequency"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSliderRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"frequency",
	        		lv_frequency_8_0, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)
))?(
(
		lv_switchEnabled_9_0=	'switchSupport' 
    {
        createLeafNode(grammarAccess.getSliderAccess().getSwitchEnabledSwitchSupportKeyword_5_0(), "switchEnabled"); 
    }
 
	    {
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSliderRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        
	        try {
	       		set($current, "switchEnabled", true, "switchSupport", lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)
)?)
;





// Entry rule entryRuleSelection
entryRuleSelection returns [EObject current=null] 
	:
	{ currentNode = createCompositeNode(grammarAccess.getSelectionRule(), currentNode); }
	 iv_ruleSelection=ruleSelection 
	 { $current=$iv_ruleSelection.current; } 
	 EOF 
;

// Rule Selection
ruleSelection returns [EObject current=null] 
    @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); 
    }
    @after { resetLookahead(); 
    	lastConsumedNode = currentNode;
    }:
(	'Selection' 
    {
        createLeafNode(grammarAccess.getSelectionAccess().getSelectionKeyword_0(), null); 
    }
(	'item=' 
    {
        createLeafNode(grammarAccess.getSelectionAccess().getItemKeyword_1_0(), null); 
    }
(
(
		lv_item_2_0=RULE_ID
		{
			createLeafNode(grammarAccess.getSelectionAccess().getItemIDTerminalRuleCall_1_1_0(), "item"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSelectionRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"item",
	        		lv_item_2_0, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)
))(	'label=' 
    {
        createLeafNode(grammarAccess.getSelectionAccess().getLabelKeyword_2_0(), null); 
    }
(
(
(
		lv_label_4_1=RULE_ID
		{
			createLeafNode(grammarAccess.getSelectionAccess().getLabelIDTerminalRuleCall_2_1_0_0(), "label"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSelectionRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"label",
	        		lv_label_4_1, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

    |		lv_label_4_2=RULE_STRING
		{
			createLeafNode(grammarAccess.getSelectionAccess().getLabelSTRINGTerminalRuleCall_2_1_0_1(), "label"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSelectionRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"label",
	        		lv_label_4_2, 
	        		"STRING", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)

)
))?(	'icon=' 
    {
        createLeafNode(grammarAccess.getSelectionAccess().getIconKeyword_3_0(), null); 
    }
(
(
(
		lv_icon_6_1=RULE_ID
		{
			createLeafNode(grammarAccess.getSelectionAccess().getIconIDTerminalRuleCall_3_1_0_0(), "icon"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSelectionRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"icon",
	        		lv_icon_6_1, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

    |		lv_icon_6_2=RULE_STRING
		{
			createLeafNode(grammarAccess.getSelectionAccess().getIconSTRINGTerminalRuleCall_3_1_0_1(), "icon"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSelectionRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"icon",
	        		lv_icon_6_2, 
	        		"STRING", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)

)
))?(	'mappings=[' 
    {
        createLeafNode(grammarAccess.getSelectionAccess().getMappingsKeyword_4_0(), null); 
    }
(
(
		{ 
	        currentNode=createCompositeNode(grammarAccess.getSelectionAccess().getMappingsMappingParserRuleCall_4_1_0(), currentNode); 
	    }
		lv_mappings_8_0=ruleMapping		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSelectionRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode.getParent(), $current);
	        }
	        try {
	       		add(
	       			$current, 
	       			"mappings",
	        		lv_mappings_8_0, 
	        		"Mapping", 
	        		currentNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	        currentNode = currentNode.getParent();
	    }

)
)(	',' 
    {
        createLeafNode(grammarAccess.getSelectionAccess().getCommaKeyword_4_2_0(), null); 
    }
(
(
		{ 
	        currentNode=createCompositeNode(grammarAccess.getSelectionAccess().getMappingsMappingParserRuleCall_4_2_1_0(), currentNode); 
	    }
		lv_mappings_10_0=ruleMapping		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getSelectionRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode.getParent(), $current);
	        }
	        try {
	       		add(
	       			$current, 
	       			"mappings",
	        		lv_mappings_10_0, 
	        		"Mapping", 
	        		currentNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	        currentNode = currentNode.getParent();
	    }

)
))*	']' 
    {
        createLeafNode(grammarAccess.getSelectionAccess().getRightSquareBracketKeyword_4_3(), null); 
    }
)?)
;





// Entry rule entryRuleList
entryRuleList returns [EObject current=null] 
	:
	{ currentNode = createCompositeNode(grammarAccess.getListRule(), currentNode); }
	 iv_ruleList=ruleList 
	 { $current=$iv_ruleList.current; } 
	 EOF 
;

// Rule List
ruleList returns [EObject current=null] 
    @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); 
    }
    @after { resetLookahead(); 
    	lastConsumedNode = currentNode;
    }:
(	'List' 
    {
        createLeafNode(grammarAccess.getListAccess().getListKeyword_0(), null); 
    }
(	'item=' 
    {
        createLeafNode(grammarAccess.getListAccess().getItemKeyword_1_0(), null); 
    }
(
(
		lv_item_2_0=RULE_ID
		{
			createLeafNode(grammarAccess.getListAccess().getItemIDTerminalRuleCall_1_1_0(), "item"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getListRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"item",
	        		lv_item_2_0, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)
))(	'label=' 
    {
        createLeafNode(grammarAccess.getListAccess().getLabelKeyword_2_0(), null); 
    }
(
(
(
		lv_label_4_1=RULE_ID
		{
			createLeafNode(grammarAccess.getListAccess().getLabelIDTerminalRuleCall_2_1_0_0(), "label"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getListRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"label",
	        		lv_label_4_1, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

    |		lv_label_4_2=RULE_STRING
		{
			createLeafNode(grammarAccess.getListAccess().getLabelSTRINGTerminalRuleCall_2_1_0_1(), "label"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getListRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"label",
	        		lv_label_4_2, 
	        		"STRING", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)

)
))?(	'icon=' 
    {
        createLeafNode(grammarAccess.getListAccess().getIconKeyword_3_0(), null); 
    }
(
(
(
		lv_icon_6_1=RULE_ID
		{
			createLeafNode(grammarAccess.getListAccess().getIconIDTerminalRuleCall_3_1_0_0(), "icon"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getListRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"icon",
	        		lv_icon_6_1, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

    |		lv_icon_6_2=RULE_STRING
		{
			createLeafNode(grammarAccess.getListAccess().getIconSTRINGTerminalRuleCall_3_1_0_1(), "icon"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getListRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"icon",
	        		lv_icon_6_2, 
	        		"STRING", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)

)
))?(	'separator=' 
    {
        createLeafNode(grammarAccess.getListAccess().getSeparatorKeyword_4_0(), null); 
    }
(
(
		lv_separator_8_0=RULE_STRING
		{
			createLeafNode(grammarAccess.getListAccess().getSeparatorSTRINGTerminalRuleCall_4_1_0(), "separator"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getListRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"separator",
	        		lv_separator_8_0, 
	        		"STRING", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)
)))
;





// Entry rule entryRuleMapping
entryRuleMapping returns [EObject current=null] 
	:
	{ currentNode = createCompositeNode(grammarAccess.getMappingRule(), currentNode); }
	 iv_ruleMapping=ruleMapping 
	 { $current=$iv_ruleMapping.current; } 
	 EOF 
;

// Rule Mapping
ruleMapping returns [EObject current=null] 
    @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); 
    }
    @after { resetLookahead(); 
    	lastConsumedNode = currentNode;
    }:
((
(
(
		lv_cmd_0_1=RULE_ID
		{
			createLeafNode(grammarAccess.getMappingAccess().getCmdIDTerminalRuleCall_0_0_0(), "cmd"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getMappingRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"cmd",
	        		lv_cmd_0_1, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

    |		lv_cmd_0_2=RULE_STRING
		{
			createLeafNode(grammarAccess.getMappingAccess().getCmdSTRINGTerminalRuleCall_0_0_1(), "cmd"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getMappingRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"cmd",
	        		lv_cmd_0_2, 
	        		"STRING", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)

)
)	'=' 
    {
        createLeafNode(grammarAccess.getMappingAccess().getEqualsSignKeyword_1(), null); 
    }
(
(
(
		lv_label_2_1=RULE_ID
		{
			createLeafNode(grammarAccess.getMappingAccess().getLabelIDTerminalRuleCall_2_0_0(), "label"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getMappingRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"label",
	        		lv_label_2_1, 
	        		"ID", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

    |		lv_label_2_2=RULE_STRING
		{
			createLeafNode(grammarAccess.getMappingAccess().getLabelSTRINGTerminalRuleCall_2_0_1(), "label"); 
		}
		{
	        if ($current==null) {
	            $current = factory.create(grammarAccess.getMappingRule().getType().getClassifier());
	            associateNodeWithAstElement(currentNode, $current);
	        }
	        try {
	       		set(
	       			$current, 
	       			"label",
	        		lv_label_2_2, 
	        		"STRING", 
	        		lastConsumedNode);
	        } catch (ValueConverterException vce) {
				handleValueConverterException(vce);
	        }
	    }

)

)
))
;





RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_'|'0'..'9')+;

RULE_INT : ('0'..'9')+;

RULE_STRING : ('"' ('\\' ('b'|'t'|'n'|'f'|'r'|'"'|'\''|'\\')|~(('\\'|'"')))* '"'|'\'' ('\\' ('b'|'t'|'n'|'f'|'r'|'"'|'\''|'\\')|~(('\\'|'\'')))* '\'');

RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';

RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?;

RULE_WS : (' '|'\t'|'\r'|'\n')+;

RULE_ANY_OTHER : .;


