/*
* generated by Xtext
*/
package org.kermeta.language.sample.cellularautomata.rules.services;
import com.google.inject.Singleton;
import com.google.inject.Inject;
import java.util.List;
import org.eclipse.xtext.*;
import org.eclipse.xtext.service.GrammarProvider;
import org.eclipse.xtext.service.AbstractElementFinder.*;
import org.kermeta.language.sample.cellularautomata.rules.services.CoreGrammarAccess;
@Singleton
public class InitGrammarAccess extends AbstractGrammarElementFinder {
public class CellularAutomataInitializationElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "CellularAutomataInitialization");
private final Group cGroup = (Group)rule.eContents().get(1);
private final Action cCellularAutomatatInitializationAction_0 = (Action)cGroup.eContents().get(0);
private final Assignment cGeometryAssignment_1 = (Assignment)cGroup.eContents().get(1);
private final RuleCall cGeometryRegularGeometryParserRuleCall_1_0 = (RuleCall)cGeometryAssignment_1.eContents().get(0);
private final Assignment cSeedRulesAssignment_2 = (Assignment)cGroup.eContents().get(2);
private final RuleCall cSeedRulesRuleParserRuleCall_2_0 = (RuleCall)cSeedRulesAssignment_2.eContents().get(0);
private final Assignment cSeedRulesAssignment_3 = (Assignment)cGroup.eContents().get(3);
private final RuleCall cSeedRulesRuleParserRuleCall_3_0 = (RuleCall)cSeedRulesAssignment_3.eContents().get(0);
/// **
//
// * Root for Init
//
// * / CellularAutomataInitialization returns CellularAutomatatInitialization:
//
// {CellularAutomatatInitialization} geometry=RegularGeometry? seedRules+=Rule seedRules+=Rule*;
public ParserRule getRule() { return rule; }
//{CellularAutomatatInitialization} geometry=RegularGeometry? seedRules+=Rule seedRules+=Rule*
public Group getGroup() { return cGroup; }
//{CellularAutomatatInitialization}
public Action getCellularAutomatatInitializationAction_0() { return cCellularAutomatatInitializationAction_0; }
//geometry=RegularGeometry?
public Assignment getGeometryAssignment_1() { return cGeometryAssignment_1; }
//RegularGeometry
public RuleCall getGeometryRegularGeometryParserRuleCall_1_0() { return cGeometryRegularGeometryParserRuleCall_1_0; }
//seedRules+=Rule
public Assignment getSeedRulesAssignment_2() { return cSeedRulesAssignment_2; }
//Rule
public RuleCall getSeedRulesRuleParserRuleCall_2_0() { return cSeedRulesRuleParserRuleCall_2_0; }
//seedRules+=Rule*
public Assignment getSeedRulesAssignment_3() { return cSeedRulesAssignment_3; }
//Rule
public RuleCall getSeedRulesRuleParserRuleCall_3_0() { return cSeedRulesRuleParserRuleCall_3_0; }
}
public class RuleElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Rule");
private final Group cGroup = (Group)rule.eContents().get(1);
private final Keyword cWhereKeyword_0 = (Keyword)cGroup.eContents().get(0);
private final Assignment cFilterAssignment_1 = (Assignment)cGroup.eContents().get(1);
private final RuleCall cFilterGlobalPositionParserRuleCall_1_0 = (RuleCall)cFilterAssignment_1.eContents().get(0);
private final Keyword cInitValueKeyword_2 = (Keyword)cGroup.eContents().get(2);
private final Keyword cEqualsSignKeyword_3 = (Keyword)cGroup.eContents().get(3);
private final Keyword cLeftCurlyBracketKeyword_4 = (Keyword)cGroup.eContents().get(4);
private final Assignment cEvaluatedValAssignment_5 = (Assignment)cGroup.eContents().get(5);
private final RuleCall cEvaluatedValConditionalParserRuleCall_5_0 = (RuleCall)cEvaluatedValAssignment_5.eContents().get(0);
private final Keyword cRightCurlyBracketKeyword_6 = (Keyword)cGroup.eContents().get(6);
/// **
//
// * From Init
//
// * / Rule returns core::Rule:
//
// "where" filter=GlobalPosition? "initValue" "=" "{" evaluatedVal=Conditional "}";
public ParserRule getRule() { return rule; }
//"where" filter=GlobalPosition? "initValue" "=" "{" evaluatedVal=Conditional "}"
public Group getGroup() { return cGroup; }
//"where"
public Keyword getWhereKeyword_0() { return cWhereKeyword_0; }
//filter=GlobalPosition?
public Assignment getFilterAssignment_1() { return cFilterAssignment_1; }
//GlobalPosition
public RuleCall getFilterGlobalPositionParserRuleCall_1_0() { return cFilterGlobalPositionParserRuleCall_1_0; }
//"initValue"
public Keyword getInitValueKeyword_2() { return cInitValueKeyword_2; }
//"="
public Keyword getEqualsSignKeyword_3() { return cEqualsSignKeyword_3; }
//"{"
public Keyword getLeftCurlyBracketKeyword_4() { return cLeftCurlyBracketKeyword_4; }
//evaluatedVal=Conditional
public Assignment getEvaluatedValAssignment_5() { return cEvaluatedValAssignment_5; }
//Conditional
public RuleCall getEvaluatedValConditionalParserRuleCall_5_0() { return cEvaluatedValConditionalParserRuleCall_5_0; }
//"}"
public Keyword getRightCurlyBracketKeyword_6() { return cRightCurlyBracketKeyword_6; }
}
public class GlobalPositionElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "GlobalPosition");
private final Group cGroup = (Group)rule.eContents().get(1);
private final Action cGlobalPositionAction_0 = (Action)cGroup.eContents().get(0);
private final Keyword cLeftCurlyBracketKeyword_1 = (Keyword)cGroup.eContents().get(1);
private final Assignment cCoordinateRangesAssignment_2 = (Assignment)cGroup.eContents().get(2);
private final RuleCall cCoordinateRangesCoordinateRangeParserRuleCall_2_0 = (RuleCall)cCoordinateRangesAssignment_2.eContents().get(0);
private final Group cGroup_3 = (Group)cGroup.eContents().get(3);
private final Keyword cXKeyword_3_0 = (Keyword)cGroup_3.eContents().get(0);
private final Assignment cCoordinateRangesAssignment_3_1 = (Assignment)cGroup_3.eContents().get(1);
private final RuleCall cCoordinateRangesCoordinateRangeParserRuleCall_3_1_0 = (RuleCall)cCoordinateRangesAssignment_3_1.eContents().get(0);
private final Keyword cRightCurlyBracketKeyword_4 = (Keyword)cGroup.eContents().get(4);
//GlobalPosition:
//
// {GlobalPosition} "{" coordinateRanges+=CoordinateRange ("x" coordinateRanges+=CoordinateRange?)* "}";
public ParserRule getRule() { return rule; }
//{GlobalPosition} "{" coordinateRanges+=CoordinateRange ("x" coordinateRanges+=CoordinateRange?)* "}"
public Group getGroup() { return cGroup; }
//{GlobalPosition}
public Action getGlobalPositionAction_0() { return cGlobalPositionAction_0; }
//"{"
public Keyword getLeftCurlyBracketKeyword_1() { return cLeftCurlyBracketKeyword_1; }
//coordinateRanges+=CoordinateRange
public Assignment getCoordinateRangesAssignment_2() { return cCoordinateRangesAssignment_2; }
//CoordinateRange
public RuleCall getCoordinateRangesCoordinateRangeParserRuleCall_2_0() { return cCoordinateRangesCoordinateRangeParserRuleCall_2_0; }
//("x" coordinateRanges+=CoordinateRange?)*
public Group getGroup_3() { return cGroup_3; }
//"x"
public Keyword getXKeyword_3_0() { return cXKeyword_3_0; }
//coordinateRanges+=CoordinateRange?
public Assignment getCoordinateRangesAssignment_3_1() { return cCoordinateRangesAssignment_3_1; }
//CoordinateRange
public RuleCall getCoordinateRangesCoordinateRangeParserRuleCall_3_1_0() { return cCoordinateRangesCoordinateRangeParserRuleCall_3_1_0; }
//"}"
public Keyword getRightCurlyBracketKeyword_4() { return cRightCurlyBracketKeyword_4; }
}
public class CoordinateRangeElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "CoordinateRange");
private final Group cGroup = (Group)rule.eContents().get(1);
private final Keyword cLeftSquareBracketKeyword_0 = (Keyword)cGroup.eContents().get(0);
private final Assignment cLowerCoordinateAssignment_1 = (Assignment)cGroup.eContents().get(1);
private final RuleCall cLowerCoordinateEIntParserRuleCall_1_0 = (RuleCall)cLowerCoordinateAssignment_1.eContents().get(0);
private final Keyword cCommaKeyword_2 = (Keyword)cGroup.eContents().get(2);
private final Assignment cUpperCoordinateAssignment_3 = (Assignment)cGroup.eContents().get(3);
private final RuleCall cUpperCoordinateEIntParserRuleCall_3_0 = (RuleCall)cUpperCoordinateAssignment_3.eContents().get(0);
private final Keyword cRightSquareBracketKeyword_4 = (Keyword)cGroup.eContents().get(4);
//CoordinateRange:
//
// "[" lowerCoordinate=EInt "," upperCoordinate=EInt "]";
public ParserRule getRule() { return rule; }
//"[" lowerCoordinate=EInt "," upperCoordinate=EInt "]"
public Group getGroup() { return cGroup; }
//"["
public Keyword getLeftSquareBracketKeyword_0() { return cLeftSquareBracketKeyword_0; }
//lowerCoordinate=EInt
public Assignment getLowerCoordinateAssignment_1() { return cLowerCoordinateAssignment_1; }
//EInt
public RuleCall getLowerCoordinateEIntParserRuleCall_1_0() { return cLowerCoordinateEIntParserRuleCall_1_0; }
//","
public Keyword getCommaKeyword_2() { return cCommaKeyword_2; }
//upperCoordinate=EInt
public Assignment getUpperCoordinateAssignment_3() { return cUpperCoordinateAssignment_3; }
//EInt
public RuleCall getUpperCoordinateEIntParserRuleCall_3_0() { return cUpperCoordinateEIntParserRuleCall_3_0; }
//"]"
public Keyword getRightSquareBracketKeyword_4() { return cRightSquareBracketKeyword_4; }
}
public class LiteralsExpressionElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "LiteralsExpression");
private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
private final Group cGroup_0 = (Group)cAlternatives.eContents().get(0);
private final Keyword cLeftParenthesisKeyword_0_0 = (Keyword)cGroup_0.eContents().get(0);
private final RuleCall cConditionalParserRuleCall_0_1 = (RuleCall)cGroup_0.eContents().get(1);
private final Keyword cRightParenthesisKeyword_0_2 = (Keyword)cGroup_0.eContents().get(2);
private final RuleCall cPositionLiteralParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
private final RuleCall cIntegerLiteralParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2);
//LiteralsExpression returns core::IntegerExpression:
//
// "(" Conditional ")" | PositionLiteral | IntegerLiteral;
public ParserRule getRule() { return rule; }
//"(" Conditional ")" | PositionLiteral | IntegerLiteral
public Alternatives getAlternatives() { return cAlternatives; }
//"(" Conditional ")"
public Group getGroup_0() { return cGroup_0; }
//"("
public Keyword getLeftParenthesisKeyword_0_0() { return cLeftParenthesisKeyword_0_0; }
//Conditional
public RuleCall getConditionalParserRuleCall_0_1() { return cConditionalParserRuleCall_0_1; }
//")"
public Keyword getRightParenthesisKeyword_0_2() { return cRightParenthesisKeyword_0_2; }
//PositionLiteral
public RuleCall getPositionLiteralParserRuleCall_1() { return cPositionLiteralParserRuleCall_1; }
//IntegerLiteral
public RuleCall getIntegerLiteralParserRuleCall_2() { return cIntegerLiteralParserRuleCall_2; }
}
public class PositionLiteralElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "PositionLiteral");
private final Group cGroup = (Group)rule.eContents().get(1);
private final Action cPositionLiteralAction_0 = (Action)cGroup.eContents().get(0);
private final Keyword cPositionOnKeyword_1 = (Keyword)cGroup.eContents().get(1);
private final Keyword cLeftSquareBracketKeyword_2 = (Keyword)cGroup.eContents().get(2);
private final Assignment cDimensionIndexAssignment_3 = (Assignment)cGroup.eContents().get(3);
private final RuleCall cDimensionIndexEIntParserRuleCall_3_0 = (RuleCall)cDimensionIndexAssignment_3.eContents().get(0);
private final Keyword cRightSquareBracketKeyword_4 = (Keyword)cGroup.eContents().get(4);
//PositionLiteral returns core::IntegerExpression:
//
// {PositionLiteral} "positionOn" "[" dimensionIndex=EInt "]";
public ParserRule getRule() { return rule; }
//{PositionLiteral} "positionOn" "[" dimensionIndex=EInt "]"
public Group getGroup() { return cGroup; }
//{PositionLiteral}
public Action getPositionLiteralAction_0() { return cPositionLiteralAction_0; }
//"positionOn"
public Keyword getPositionOnKeyword_1() { return cPositionOnKeyword_1; }
//"["
public Keyword getLeftSquareBracketKeyword_2() { return cLeftSquareBracketKeyword_2; }
//dimensionIndex=EInt
public Assignment getDimensionIndexAssignment_3() { return cDimensionIndexAssignment_3; }
//EInt
public RuleCall getDimensionIndexEIntParserRuleCall_3_0() { return cDimensionIndexEIntParserRuleCall_3_0; }
//"]"
public Keyword getRightSquareBracketKeyword_4() { return cRightSquareBracketKeyword_4; }
}
public class RegularGeometryElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "RegularGeometry");
private final Group cGroup = (Group)rule.eContents().get(1);
private final Action cRegularGeometryAction_0 = (Action)cGroup.eContents().get(0);
private final Keyword cRegularGeometryKeyword_1 = (Keyword)cGroup.eContents().get(1);
private final Assignment cNeighborsNumberAssignment_2 = (Assignment)cGroup.eContents().get(2);
private final RuleCall cNeighborsNumberEIntParserRuleCall_2_0 = (RuleCall)cNeighborsNumberAssignment_2.eContents().get(0);
private final Keyword cLeftCurlyBracketKeyword_3 = (Keyword)cGroup.eContents().get(3);
private final Assignment cDimensionsAssignment_4 = (Assignment)cGroup.eContents().get(4);
private final RuleCall cDimensionsDimensionParserRuleCall_4_0 = (RuleCall)cDimensionsAssignment_4.eContents().get(0);
private final Group cGroup_5 = (Group)cGroup.eContents().get(5);
private final Keyword cXKeyword_5_0 = (Keyword)cGroup_5.eContents().get(0);
private final Assignment cDimensionsAssignment_5_1 = (Assignment)cGroup_5.eContents().get(1);
private final RuleCall cDimensionsDimensionParserRuleCall_5_1_0 = (RuleCall)cDimensionsAssignment_5_1.eContents().get(0);
private final Keyword cRightCurlyBracketKeyword_6 = (Keyword)cGroup.eContents().get(6);
/// **
//
// * From Geometry
//
// * / RegularGeometry:
//
// {RegularGeometry} "regularGeometry" neighborsNumber=EInt "{" dimensions+=Dimension ("x" dimensions+=Dimension)* "}";
public ParserRule getRule() { return rule; }
//{RegularGeometry} "regularGeometry" neighborsNumber=EInt "{" dimensions+=Dimension ("x" dimensions+=Dimension)* "}"
public Group getGroup() { return cGroup; }
//{RegularGeometry}
public Action getRegularGeometryAction_0() { return cRegularGeometryAction_0; }
//"regularGeometry"
public Keyword getRegularGeometryKeyword_1() { return cRegularGeometryKeyword_1; }
//neighborsNumber=EInt
public Assignment getNeighborsNumberAssignment_2() { return cNeighborsNumberAssignment_2; }
//EInt
public RuleCall getNeighborsNumberEIntParserRuleCall_2_0() { return cNeighborsNumberEIntParserRuleCall_2_0; }
//"{"
public Keyword getLeftCurlyBracketKeyword_3() { return cLeftCurlyBracketKeyword_3; }
//dimensions+=Dimension
public Assignment getDimensionsAssignment_4() { return cDimensionsAssignment_4; }
//Dimension
public RuleCall getDimensionsDimensionParserRuleCall_4_0() { return cDimensionsDimensionParserRuleCall_4_0; }
//("x" dimensions+=Dimension)*
public Group getGroup_5() { return cGroup_5; }
//"x"
public Keyword getXKeyword_5_0() { return cXKeyword_5_0; }
//dimensions+=Dimension
public Assignment getDimensionsAssignment_5_1() { return cDimensionsAssignment_5_1; }
//Dimension
public RuleCall getDimensionsDimensionParserRuleCall_5_1_0() { return cDimensionsDimensionParserRuleCall_5_1_0; }
//"}"
public Keyword getRightCurlyBracketKeyword_6() { return cRightCurlyBracketKeyword_6; }
}
public class DimensionElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Dimension");
private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
private final Group cGroup_0 = (Group)cAlternatives.eContents().get(0);
private final Action cDimensionAction_0_0 = (Action)cGroup_0.eContents().get(0);
private final Assignment cSizeAssignment_0_1 = (Assignment)cGroup_0.eContents().get(1);
private final RuleCall cSizeEIntParserRuleCall_0_1_0 = (RuleCall)cSizeAssignment_0_1.eContents().get(0);
private final Group cGroup_1 = (Group)cAlternatives.eContents().get(1);
private final Assignment cIsCircularAssignment_1_0 = (Assignment)cGroup_1.eContents().get(0);
private final Keyword cIsCircularLeftParenthesisKeyword_1_0_0 = (Keyword)cIsCircularAssignment_1_0.eContents().get(0);
private final Assignment cSizeAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1);
private final RuleCall cSizeEIntParserRuleCall_1_1_0 = (RuleCall)cSizeAssignment_1_1.eContents().get(0);
private final Keyword cRightParenthesisKeyword_1_2 = (Keyword)cGroup_1.eContents().get(2);
//Dimension:
//
// {Dimension} size=EInt | isCircular?="(" size=EInt ")";
public ParserRule getRule() { return rule; }
//{Dimension} size=EInt | isCircular?="(" size=EInt ")"
public Alternatives getAlternatives() { return cAlternatives; }
//{Dimension} size=EInt
public Group getGroup_0() { return cGroup_0; }
//{Dimension}
public Action getDimensionAction_0_0() { return cDimensionAction_0_0; }
//size=EInt
public Assignment getSizeAssignment_0_1() { return cSizeAssignment_0_1; }
//EInt
public RuleCall getSizeEIntParserRuleCall_0_1_0() { return cSizeEIntParserRuleCall_0_1_0; }
//isCircular?="(" size=EInt ")"
public Group getGroup_1() { return cGroup_1; }
//isCircular?="("
public Assignment getIsCircularAssignment_1_0() { return cIsCircularAssignment_1_0; }
//"("
public Keyword getIsCircularLeftParenthesisKeyword_1_0_0() { return cIsCircularLeftParenthesisKeyword_1_0_0; }
//size=EInt
public Assignment getSizeAssignment_1_1() { return cSizeAssignment_1_1; }
//EInt
public RuleCall getSizeEIntParserRuleCall_1_1_0() { return cSizeEIntParserRuleCall_1_1_0; }
//")"
public Keyword getRightParenthesisKeyword_1_2() { return cRightParenthesisKeyword_1_2; }
}
private CellularAutomataInitializationElements pCellularAutomataInitialization;
private RuleElements pRule;
private GlobalPositionElements pGlobalPosition;
private CoordinateRangeElements pCoordinateRange;
private LiteralsExpressionElements pLiteralsExpression;
private PositionLiteralElements pPositionLiteral;
private RegularGeometryElements pRegularGeometry;
private DimensionElements pDimension;
private final Grammar grammar;
private CoreGrammarAccess gaCore;
@Inject
public InitGrammarAccess(GrammarProvider grammarProvider,
CoreGrammarAccess gaCore) {
this.grammar = internalFindGrammar(grammarProvider);
this.gaCore = gaCore;
}
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
Grammar grammar = grammarProvider.getGrammar(this);
while (grammar != null) {
if ("org.kermeta.language.sample.cellularautomata.rules.Init".equals(grammar.getName())) {
return grammar;
}
List<Grammar> grammars = grammar.getUsedGrammars();
if (!grammars.isEmpty()) {
grammar = grammars.iterator().next();
} else {
return null;
}
}
return grammar;
}
public Grammar getGrammar() {
return grammar;
}
public CoreGrammarAccess getCoreGrammarAccess() {
return gaCore;
}
/// **
//
// * Root for Init
//
// * / CellularAutomataInitialization returns CellularAutomatatInitialization:
//
// {CellularAutomatatInitialization} geometry=RegularGeometry? seedRules+=Rule seedRules+=Rule*;
public CellularAutomataInitializationElements getCellularAutomataInitializationAccess() {
return (pCellularAutomataInitialization != null) ? pCellularAutomataInitialization : (pCellularAutomataInitialization = new CellularAutomataInitializationElements());
}
public ParserRule getCellularAutomataInitializationRule() {
return getCellularAutomataInitializationAccess().getRule();
}
/// **
//
// * From Init
//
// * / Rule returns core::Rule:
//
// "where" filter=GlobalPosition? "initValue" "=" "{" evaluatedVal=Conditional "}";
public RuleElements getRuleAccess() {
return (pRule != null) ? pRule : (pRule = new RuleElements());
}
public ParserRule getRuleRule() {
return getRuleAccess().getRule();
}
//GlobalPosition:
//
// {GlobalPosition} "{" coordinateRanges+=CoordinateRange ("x" coordinateRanges+=CoordinateRange?)* "}";
public GlobalPositionElements getGlobalPositionAccess() {
return (pGlobalPosition != null) ? pGlobalPosition : (pGlobalPosition = new GlobalPositionElements());
}
public ParserRule getGlobalPositionRule() {
return getGlobalPositionAccess().getRule();
}
//CoordinateRange:
//
// "[" lowerCoordinate=EInt "," upperCoordinate=EInt "]";
public CoordinateRangeElements getCoordinateRangeAccess() {
return (pCoordinateRange != null) ? pCoordinateRange : (pCoordinateRange = new CoordinateRangeElements());
}
public ParserRule getCoordinateRangeRule() {
return getCoordinateRangeAccess().getRule();
}
//LiteralsExpression returns core::IntegerExpression:
//
// "(" Conditional ")" | PositionLiteral | IntegerLiteral;
public LiteralsExpressionElements getLiteralsExpressionAccess() {
return (pLiteralsExpression != null) ? pLiteralsExpression : (pLiteralsExpression = new LiteralsExpressionElements());
}
public ParserRule getLiteralsExpressionRule() {
return getLiteralsExpressionAccess().getRule();
}
//PositionLiteral returns core::IntegerExpression:
//
// {PositionLiteral} "positionOn" "[" dimensionIndex=EInt "]";
public PositionLiteralElements getPositionLiteralAccess() {
return (pPositionLiteral != null) ? pPositionLiteral : (pPositionLiteral = new PositionLiteralElements());
}
public ParserRule getPositionLiteralRule() {
return getPositionLiteralAccess().getRule();
}
/// **
//
// * From Geometry
//
// * / RegularGeometry:
//
// {RegularGeometry} "regularGeometry" neighborsNumber=EInt "{" dimensions+=Dimension ("x" dimensions+=Dimension)* "}";
public RegularGeometryElements getRegularGeometryAccess() {
return (pRegularGeometry != null) ? pRegularGeometry : (pRegularGeometry = new RegularGeometryElements());
}
public ParserRule getRegularGeometryRule() {
return getRegularGeometryAccess().getRule();
}
//Dimension:
//
// {Dimension} size=EInt | isCircular?="(" size=EInt ")";
public DimensionElements getDimensionAccess() {
return (pDimension != null) ? pDimension : (pDimension = new DimensionElements());
}
public ParserRule getDimensionRule() {
return getDimensionAccess().getRule();
}
/// *
//
// * Conditional
//
// * / Conditional returns IntegerExpression:
//
// OrExpression | {Conditional} "if" condition=Conditional "{" ifTrueExpression=Conditional "}" "else" "{"
//
// ifFalseExpression=Conditional "}";
public CoreGrammarAccess.ConditionalElements getConditionalAccess() {
return gaCore.getConditionalAccess();
}
public ParserRule getConditionalRule() {
return getConditionalAccess().getRule();
}
/// *
//
// * Binary expressions
//
// * / OrExpression returns IntegerExpression:
//
// AndExpression ({Or.left=current} "|" right=AndExpression)*;
public CoreGrammarAccess.OrExpressionElements getOrExpressionAccess() {
return gaCore.getOrExpressionAccess();
}
public ParserRule getOrExpressionRule() {
return getOrExpressionAccess().getRule();
}
//AndExpression returns IntegerExpression:
//
// EqualExpression ({And.left=current} "&" right=EqualExpression)*;
public CoreGrammarAccess.AndExpressionElements getAndExpressionAccess() {
return gaCore.getAndExpressionAccess();
}
public ParserRule getAndExpressionRule() {
return getAndExpressionAccess().getRule();
}
//EqualExpression returns IntegerExpression:
//
// ComparisonExpression ({Equal.left=current} "==" right=ComparisonExpression)*;
public CoreGrammarAccess.EqualExpressionElements getEqualExpressionAccess() {
return gaCore.getEqualExpressionAccess();
}
public ParserRule getEqualExpressionRule() {
return getEqualExpressionAccess().getRule();
}
//ComparisonExpression returns IntegerExpression:
//
// AddExpression (({Greater.left=current} ">" | {Lower.left=current} "<") right=AddExpression)*;
public CoreGrammarAccess.ComparisonExpressionElements getComparisonExpressionAccess() {
return gaCore.getComparisonExpressionAccess();
}
public ParserRule getComparisonExpressionRule() {
return getComparisonExpressionAccess().getRule();
}
//AddExpression returns IntegerExpression:
//
// MultExpression (({Add.left=current} "+" | {Minus.left=current} "-") right=MultExpression)*;
public CoreGrammarAccess.AddExpressionElements getAddExpressionAccess() {
return gaCore.getAddExpressionAccess();
}
public ParserRule getAddExpressionRule() {
return getAddExpressionAccess().getRule();
}
//MultExpression returns IntegerExpression:
//
// UnaryExpression (({Mult.left=current} "*" | {Div.left=current} "/" | {Mod.left=current} "%") right=UnaryExpression)*;
public CoreGrammarAccess.MultExpressionElements getMultExpressionAccess() {
return gaCore.getMultExpressionAccess();
}
public ParserRule getMultExpressionRule() {
return getMultExpressionAccess().getRule();
}
/// *
//
// * Unary expressions
//
// * / UnaryExpression returns IntegerExpression:
//
// LiteralsExpression | {Not} "!" target=LiteralsExpression | {UMinus} "-" target=LiteralsExpression;
public CoreGrammarAccess.UnaryExpressionElements getUnaryExpressionAccess() {
return gaCore.getUnaryExpressionAccess();
}
public ParserRule getUnaryExpressionRule() {
return getUnaryExpressionAccess().getRule();
}
//IntegerLiteral:
//
// val=EInt;
public CoreGrammarAccess.IntegerLiteralElements getIntegerLiteralAccess() {
return gaCore.getIntegerLiteralAccess();
}
public ParserRule getIntegerLiteralRule() {
return getIntegerLiteralAccess().getRule();
}
//EInt returns ecore::EInt:
//
// "-"? INT;
public CoreGrammarAccess.EIntElements getEIntAccess() {
return gaCore.getEIntAccess();
}
public ParserRule getEIntRule() {
return getEIntAccess().getRule();
}
//terminal ID:
//
// "^"? ("a".."z" | "A".."Z" | "_") ("a".."z" | "A".."Z" | "_" | "0".."9")*;
public TerminalRule getIDRule() {
return gaCore.getIDRule();
}
//terminal INT returns ecore::EInt:
//
// "0".."9"+;
public TerminalRule getINTRule() {
return gaCore.getINTRule();
}
//terminal STRING:
//
// "\"" ("\\" ("b" | "t" | "n" | "f" | "r" | "u" | "\"" | "\'" | "\\") | !("\\" | "\""))* "\"" | "\'" ("\\" ("b" | "t" |
//
// "n" | "f" | "r" | "u" | "\"" | "\'" | "\\") | !("\\" | "\'"))* "\'";
public TerminalRule getSTRINGRule() {
return gaCore.getSTRINGRule();
}
//terminal ML_COMMENT:
//
// "/ *"->"* /";
public TerminalRule getML_COMMENTRule() {
return gaCore.getML_COMMENTRule();
}
//terminal SL_COMMENT:
//
// "//" !("\n" | "\r")* ("\r"? "\n")?;
public TerminalRule getSL_COMMENTRule() {
return gaCore.getSL_COMMENTRule();
}
//terminal WS:
//
// (" " | "\t" | "\r" | "\n")+;
public TerminalRule getWSRule() {
return gaCore.getWSRule();
}
//terminal ANY_OTHER:
//
// .;
public TerminalRule getANY_OTHERRule() {
return gaCore.getANY_OTHERRule();
}
}