public class FunctionsTblElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "FunctionsTbl"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final Keyword cIsnullKeyword_0 = (Keyword) cAlternatives.eContents().get(0); private final Keyword cInKeyword_1 = (Keyword) cAlternatives.eContents().get(1); private final Keyword cOutKeyword_2 = (Keyword) cAlternatives.eContents().get(2); // FunctionsTbl: // "isnull" | "in" | "out"; public ParserRule getRule() { return rule; } // "isnull" | "in" | "out" public Alternatives getAlternatives() { return cAlternatives; } // "isnull" public Keyword getIsnullKeyword_0() { return cIsnullKeyword_0; } // "in" public Keyword getInKeyword_1() { return cInKeyword_1; } // "out" public Keyword getOutKeyword_2() { return cOutKeyword_2; } }
public class NumberElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Number"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final RuleCall cFLOATTerminalRuleCall_0 = (RuleCall) cAlternatives.eContents().get(0); private final RuleCall cINTTerminalRuleCall_1 = (RuleCall) cAlternatives.eContents().get(1); // Number: // FLOAT | INT; public ParserRule getRule() { return rule; } // FLOAT | INT public Alternatives getAlternatives() { return cAlternatives; } // FLOAT public RuleCall getFLOATTerminalRuleCall_0() { return cFLOATTerminalRuleCall_0; } // INT public RuleCall getINTTerminalRuleCall_1() { return cINTTerminalRuleCall_1; } }
public class LogicalOpAliasesElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "LogicalOpAliases"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final Keyword cOrKeyword_0 = (Keyword) cAlternatives.eContents().get(0); private final Keyword cAndKeyword_1 = (Keyword) cAlternatives.eContents().get(1); private final Keyword cNotKeyword_2 = (Keyword) cAlternatives.eContents().get(2); // LogicalOpAliases: // "or" | "and" | "not"; public ParserRule getRule() { return rule; } // "or" | "and" | "not" public Alternatives getAlternatives() { return cAlternatives; } // "or" public Keyword getOrKeyword_0() { return cOrKeyword_0; } // "and" public Keyword getAndKeyword_1() { return cAndKeyword_1; } // "not" public Keyword getNotKeyword_2() { return cNotKeyword_2; } }
public class TypeElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Type"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final RuleCall cATypeParserRuleCall_0 = (RuleCall) cAlternatives.eContents().get(0); private final RuleCall cAnotherTypeParserRuleCall_1 = (RuleCall) cAlternatives.eContents().get(1); // Type returns root::AType: // AType | AnotherType; public ParserRule getRule() { return rule; } // AType | AnotherType public Alternatives getAlternatives() { return cAlternatives; } // AType public RuleCall getATypeParserRuleCall_0() { return cATypeParserRuleCall_0; } // AnotherType public RuleCall getAnotherTypeParserRuleCall_1() { return cAnotherTypeParserRuleCall_1; } }
public class StrvalElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Strval"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final RuleCall cNcharParserRuleCall_0 = (RuleCall) cAlternatives.eContents().get(0); private final RuleCall cPct_encodedParserRuleCall_1 = (RuleCall) cAlternatives.eContents().get(1); // Strval: // (Nchar | Pct_encoded)+; public ParserRule getRule() { return rule; } // (Nchar | Pct_encoded)+ public Alternatives getAlternatives() { return cAlternatives; } // Nchar public RuleCall getNcharParserRuleCall_0() { return cNcharParserRuleCall_0; } // Pct_encoded public RuleCall getPct_encodedParserRuleCall_1() { return cPct_encodedParserRuleCall_1; } }
public class EStringElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "EString"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final RuleCall cSTRINGTerminalRuleCall_0 = (RuleCall) cAlternatives.eContents().get(0); private final RuleCall cIDTerminalRuleCall_1 = (RuleCall) cAlternatives.eContents().get(1); // EString returns ecore::EString: // STRING | ID; @Override public ParserRule getRule() { return rule; } // STRING | ID public Alternatives getAlternatives() { return cAlternatives; } // STRING public RuleCall getSTRINGTerminalRuleCall_0() { return cSTRINGTerminalRuleCall_0; } // ID public RuleCall getIDTerminalRuleCall_1() { return cIDTerminalRuleCall_1; } }
public class SuppressedHiddenSubElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "SuppressedHiddenSub"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final RuleCall cSuppressedHiddenSubSubParserRuleCall_0 = (RuleCall) cAlternatives.eContents().get(0); private final RuleCall cSuppressedHiddenSubIDParserRuleCall_1 = (RuleCall) cAlternatives.eContents().get(1); // SuppressedHiddenSub: // SuppressedHiddenSubSub | SuppressedHiddenSubID; public ParserRule getRule() { return rule; } // SuppressedHiddenSubSub | SuppressedHiddenSubID public Alternatives getAlternatives() { return cAlternatives; } // SuppressedHiddenSubSub public RuleCall getSuppressedHiddenSubSubParserRuleCall_0() { return cSuppressedHiddenSubSubParserRuleCall_0; } // SuppressedHiddenSubID public RuleCall getSuppressedHiddenSubIDParserRuleCall_1() { return cSuppressedHiddenSubIDParserRuleCall_1; } }
public class TypeElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName( getGrammar(), "org.eclipse.xtext.idea.sdomain.SDomain.Type"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final RuleCall cEntityParserRuleCall_0 = (RuleCall) cAlternatives.eContents().get(0); private final RuleCall cDatatypeParserRuleCall_1 = (RuleCall) cAlternatives.eContents().get(1); // Type: // Entity | Datatype; @Override public ParserRule getRule() { return rule; } // Entity | Datatype public Alternatives getAlternatives() { return cAlternatives; } // Entity public RuleCall getEntityParserRuleCall_0() { return cEntityParserRuleCall_0; } // Datatype public RuleCall getDatatypeParserRuleCall_1() { return cDatatypeParserRuleCall_1; } }
public class TypeElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName( getGrammar(), "org.eclipse.xtext.ui.tests.editor.contentassist.DatatypeRuleTestLanguage.Type"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final RuleCall cSimpleTypeParserRuleCall_0 = (RuleCall) cAlternatives.eContents().get(0); private final RuleCall cCompositeTypeParserRuleCall_1 = (RuleCall) cAlternatives.eContents().get(1); // Type: // SimpleType | CompositeType; @Override public ParserRule getRule() { return rule; } // SimpleType | CompositeType public Alternatives getAlternatives() { return cAlternatives; } // SimpleType public RuleCall getSimpleTypeParserRuleCall_0() { return cSimpleTypeParserRuleCall_0; } // CompositeType public RuleCall getCompositeTypeParserRuleCall_1() { return cCompositeTypeParserRuleCall_1; } }
public class Scenario5Elements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName( getGrammar(), "org.eclipse.xtext.parser.parameters.TwoParametersTestLanguage.Scenario5"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final Group cGroup_0 = (Group) cAlternatives.eContents().get(0); private final Assignment cFirstAssignment_0_0 = (Assignment) cGroup_0.eContents().get(0); private final RuleCall cFirstIDTerminalRuleCall_0_0_0 = (RuleCall) cFirstAssignment_0_0.eContents().get(0); private final Group cGroup_1 = (Group) cAlternatives.eContents().get(1); private final Assignment cSecondAssignment_1_0 = (Assignment) cGroup_1.eContents().get(0); private final RuleCall cSecondIDTerminalRuleCall_1_0_0 = (RuleCall) cSecondAssignment_1_0.eContents().get(0); // Scenario5 <A, B Scenario: // <A & B> first=ID // | <!A | !B> second=ID @Override public ParserRule getRule() { return rule; } // <A & B> first=ID | <!A | !B> second=ID public Alternatives getAlternatives() { return cAlternatives; } // <A & B> first=ID public Group getGroup_0() { return cGroup_0; } // first=ID public Assignment getFirstAssignment_0_0() { return cFirstAssignment_0_0; } // ID public RuleCall getFirstIDTerminalRuleCall_0_0_0() { return cFirstIDTerminalRuleCall_0_0_0; } // <!A | !B> second=ID public Group getGroup_1() { return cGroup_1; } // second=ID public Assignment getSecondAssignment_1_0() { return cSecondAssignment_1_0; } // ID public RuleCall getSecondIDTerminalRuleCall_1_0_0() { return cSecondIDTerminalRuleCall_1_0_0; } }
public class BinaryOpAliasesElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "BinaryOpAliases"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final Keyword cNeKeyword_0 = (Keyword) cAlternatives.eContents().get(0); private final Keyword cEqKeyword_1 = (Keyword) cAlternatives.eContents().get(1); private final Keyword cLtKeyword_2 = (Keyword) cAlternatives.eContents().get(2); private final Keyword cLeKeyword_3 = (Keyword) cAlternatives.eContents().get(3); private final Keyword cGtKeyword_4 = (Keyword) cAlternatives.eContents().get(4); private final Keyword cGeKeyword_5 = (Keyword) cAlternatives.eContents().get(5); private final Keyword cLikeKeyword_6 = (Keyword) cAlternatives.eContents().get(6); // BinaryOpAliases: // "ne" | "eq" | "lt" | "le" | "gt" | "ge" | "like"; public ParserRule getRule() { return rule; } // "ne" | "eq" | "lt" | "le" | "gt" | "ge" | "like" public Alternatives getAlternatives() { return cAlternatives; } // "ne" public Keyword getNeKeyword_0() { return cNeKeyword_0; } // "eq" public Keyword getEqKeyword_1() { return cEqKeyword_1; } // "lt" public Keyword getLtKeyword_2() { return cLtKeyword_2; } // "le" public Keyword getLeKeyword_3() { return cLeKeyword_3; } // "gt" public Keyword getGtKeyword_4() { return cGtKeyword_4; } // "ge" public Keyword getGeKeyword_5() { return cGeKeyword_5; } // "like" public Keyword getLikeKeyword_6() { return cLikeKeyword_6; } }
public class ModelElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Model"); private final Group cGroup = (Group) rule.eContents().get(1); private final Assignment cOperandsAssignment_0 = (Assignment) cGroup.eContents().get(0); private final RuleCall cOperandsHoOperandParserRuleCall_0_0 = (RuleCall) cOperandsAssignment_0.eContents().get(0); private final Group cGroup_1 = (Group) cGroup.eContents().get(1); private final Alternatives cAlternatives_1_0 = (Alternatives) cGroup_1.eContents().get(0); private final Keyword cCommaKeyword_1_0_0 = (Keyword) cAlternatives_1_0.eContents().get(0); private final Keyword cAmpersandKeyword_1_0_1 = (Keyword) cAlternatives_1_0.eContents().get(1); private final RuleCall cHoOperandParserRuleCall_1_1 = (RuleCall) cGroup_1.eContents().get(1); // Model: // operands+=HoOperand (("," | "&") HoOperand)*; public ParserRule getRule() { return rule; } // operands+=HoOperand (("," | "&") HoOperand)* public Group getGroup() { return cGroup; } // operands+=HoOperand public Assignment getOperandsAssignment_0() { return cOperandsAssignment_0; } // HoOperand public RuleCall getOperandsHoOperandParserRuleCall_0_0() { return cOperandsHoOperandParserRuleCall_0_0; } // (("," | "&") HoOperand)* public Group getGroup_1() { return cGroup_1; } // "," | "&" public Alternatives getAlternatives_1_0() { return cAlternatives_1_0; } // "," public Keyword getCommaKeyword_1_0_0() { return cCommaKeyword_1_0_0; } // "&" public Keyword getAmpersandKeyword_1_0_1() { return cAmpersandKeyword_1_0_1; } // HoOperand public RuleCall getHoOperandParserRuleCall_1_1() { return cHoOperandParserRuleCall_1_1; } }
public class Enum1Elements extends AbstractEnumRuleElementFinder { private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "Enum1"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final EnumLiteralDeclaration cLit1EnumLiteralDeclaration_0 = (EnumLiteralDeclaration) cAlternatives.eContents().get(0); private final Keyword cLit1Lit1Keyword_0_0 = (Keyword) cLit1EnumLiteralDeclaration_0.eContents().get(0); private final EnumLiteralDeclaration cLit2EnumLiteralDeclaration_1 = (EnumLiteralDeclaration) cAlternatives.eContents().get(1); private final Keyword cLit2Lit2Keyword_1_0 = (Keyword) cLit2EnumLiteralDeclaration_1.eContents().get(0); private final EnumLiteralDeclaration cLit3EnumLiteralDeclaration_2 = (EnumLiteralDeclaration) cAlternatives.eContents().get(2); private final Keyword cLit3Lit3Keyword_2_0 = (Keyword) cLit3EnumLiteralDeclaration_2.eContents().get(0); // enum Enum1: // lit1 | lit2 | lit3; public EnumRule getRule() { return rule; } // lit1 | lit2 | lit3 public Alternatives getAlternatives() { return cAlternatives; } // lit1 public EnumLiteralDeclaration getLit1EnumLiteralDeclaration_0() { return cLit1EnumLiteralDeclaration_0; } // "lit1" public Keyword getLit1Lit1Keyword_0_0() { return cLit1Lit1Keyword_0_0; } // lit2 public EnumLiteralDeclaration getLit2EnumLiteralDeclaration_1() { return cLit2EnumLiteralDeclaration_1; } // "lit2" public Keyword getLit2Lit2Keyword_1_0() { return cLit2Lit2Keyword_1_0; } // lit3 public EnumLiteralDeclaration getLit3EnumLiteralDeclaration_2() { return cLit3EnumLiteralDeclaration_2; } // "lit3" public Keyword getLit3Lit3Keyword_2_0() { return cLit3Lit3Keyword_2_0; } }
public class RootElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Root"); private final Group cGroup = (Group) rule.eContents().get(1); private final Keyword cTestKeyword_0 = (Keyword) cGroup.eContents().get(0); private final Alternatives cAlternatives_1 = (Alternatives) cGroup.eContents().get(1); private final RuleCall cTestLinewrapParserRuleCall_1_0 = (RuleCall) cAlternatives_1.eContents().get(0); private final RuleCall cTestIndentationParserRuleCall_1_1 = (RuleCall) cAlternatives_1.eContents().get(1); private final RuleCall cTestLinewrapMinMaxParserRuleCall_1_2 = (RuleCall) cAlternatives_1.eContents().get(2); private final RuleCall cWrappingDataTypeTestParserRuleCall_1_3 = (RuleCall) cAlternatives_1.eContents().get(3); // Root: // "test" (TestLinewrap | TestIndentation | TestLinewrapMinMax | WrappingDataTypeTest); public ParserRule getRule() { return rule; } // "test" (TestLinewrap | TestIndentation | TestLinewrapMinMax | WrappingDataTypeTest) public Group getGroup() { return cGroup; } // "test" public Keyword getTestKeyword_0() { return cTestKeyword_0; } // TestLinewrap | TestIndentation | TestLinewrapMinMax | WrappingDataTypeTest public Alternatives getAlternatives_1() { return cAlternatives_1; } // TestLinewrap public RuleCall getTestLinewrapParserRuleCall_1_0() { return cTestLinewrapParserRuleCall_1_0; } // TestIndentation public RuleCall getTestIndentationParserRuleCall_1_1() { return cTestIndentationParserRuleCall_1_1; } // TestLinewrapMinMax public RuleCall getTestLinewrapMinMaxParserRuleCall_1_2() { return cTestLinewrapMinMaxParserRuleCall_1_2; } // WrappingDataTypeTest public RuleCall getWrappingDataTypeTestParserRuleCall_1_3() { return cWrappingDataTypeTestParserRuleCall_1_3; } }
public class ComparisonElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Comparison"); private final Group cGroup = (Group) rule.eContents().get(1); private final RuleCall cStrvalParserRuleCall_0 = (RuleCall) cGroup.eContents().get(0); private final RuleCall cWSPTerminalRuleCall_1 = (RuleCall) cGroup.eContents().get(1); private final Alternatives cAlternatives_2 = (Alternatives) cGroup.eContents().get(2); private final RuleCall cBinaryOpAliasesWithEqualsSignParserRuleCall_2_0 = (RuleCall) cAlternatives_2.eContents().get(0); private final RuleCall cCompOpsParserRuleCall_2_1 = (RuleCall) cAlternatives_2.eContents().get(1); private final RuleCall cPrimaryExprParserRuleCall_3 = (RuleCall) cGroup.eContents().get(3); // Comparison: // Strval WSP* (BinaryOpAliasesWithEqualsSign | CompOps) PrimaryExpr; public ParserRule getRule() { return rule; } // Strval WSP* (BinaryOpAliasesWithEqualsSign | CompOps) PrimaryExpr public Group getGroup() { return cGroup; } // Strval public RuleCall getStrvalParserRuleCall_0() { return cStrvalParserRuleCall_0; } // WSP* public RuleCall getWSPTerminalRuleCall_1() { return cWSPTerminalRuleCall_1; } // BinaryOpAliasesWithEqualsSign | CompOps public Alternatives getAlternatives_2() { return cAlternatives_2; } // BinaryOpAliasesWithEqualsSign public RuleCall getBinaryOpAliasesWithEqualsSignParserRuleCall_2_0() { return cBinaryOpAliasesWithEqualsSignParserRuleCall_2_0; } // CompOps public RuleCall getCompOpsParserRuleCall_2_1() { return cCompOpsParserRuleCall_2_1; } // PrimaryExpr public RuleCall getPrimaryExprParserRuleCall_3() { return cPrimaryExprParserRuleCall_3; } }
public class PrimaryElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Primary"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final Group cGroup_0 = (Group) cAlternatives.eContents().get(0); private final Action cNamedAction_0_0 = (Action) cGroup_0.eContents().get(0); private final Assignment cNameAssignment_0_1 = (Assignment) cGroup_0.eContents().get(1); private final RuleCall cNameIDTerminalRuleCall_0_1_0 = (RuleCall) cNameAssignment_0_1.eContents().get(0); private final RuleCall cParenthesizedParserRuleCall_1 = (RuleCall) cAlternatives.eContents().get(1); // Primary returns Expression: // {Named} name=ID | Parenthesized; @Override public ParserRule getRule() { return rule; } // {Named} name=ID | Parenthesized public Alternatives getAlternatives() { return cAlternatives; } // {Named} name=ID public Group getGroup_0() { return cGroup_0; } // {Named} public Action getNamedAction_0_0() { return cNamedAction_0_0; } // name=ID public Assignment getNameAssignment_0_1() { return cNameAssignment_0_1; } // ID public RuleCall getNameIDTerminalRuleCall_0_1_0() { return cNameIDTerminalRuleCall_0_1_0; } // Parenthesized public RuleCall getParenthesizedParserRuleCall_1() { return cParenthesizedParserRuleCall_1; } }
public class GeneratedEnumElements extends AbstractEnumRuleElementFinder { private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName( getGrammar(), "org.eclipse.xtext.ui.tests.enumrules.EnumRulesUiTestLanguage.GeneratedEnum"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final EnumLiteralDeclaration cSameNameEnumLiteralDeclaration_0 = (EnumLiteralDeclaration) cAlternatives.eContents().get(0); private final Keyword cSameNameSameNameKeyword_0_0 = (Keyword) cSameNameEnumLiteralDeclaration_0.eContents().get(0); private final EnumLiteralDeclaration cDifferentNameEnumLiteralDeclaration_1 = (EnumLiteralDeclaration) cAlternatives.eContents().get(1); private final Keyword cDifferentNameDifferentLiteralKeyword_1_0 = (Keyword) cDifferentNameEnumLiteralDeclaration_1.eContents().get(0); // enum GeneratedEnum: // SameName | DifferentName="DifferentLiteral"; public EnumRule getRule() { return rule; } // SameName | DifferentName="DifferentLiteral" public Alternatives getAlternatives() { return cAlternatives; } // SameName public EnumLiteralDeclaration getSameNameEnumLiteralDeclaration_0() { return cSameNameEnumLiteralDeclaration_0; } // "SameName" public Keyword getSameNameSameNameKeyword_0_0() { return cSameNameSameNameKeyword_0_0; } // DifferentName="DifferentLiteral" public EnumLiteralDeclaration getDifferentNameEnumLiteralDeclaration_1() { return cDifferentNameEnumLiteralDeclaration_1; } // "DifferentLiteral" public Keyword getDifferentNameDifferentLiteralKeyword_1_0() { return cDifferentNameDifferentLiteralKeyword_1_0; } }
@Override public Boolean caseAlternatives(Alternatives object) { boolean more = false; for (AbstractElement element : object.getElements()) { more = doSwitch(element) || more; } return more || isOptional(object); }
public class Scenario7Elements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName( getGrammar(), "org.eclipse.xtext.parser.parameters.TwoParametersTestLanguage.Scenario7"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final Assignment cFirstAssignment_0 = (Assignment) cAlternatives.eContents().get(0); private final RuleCall cFirstIdOrKeyword2ParserRuleCall_0_0 = (RuleCall) cFirstAssignment_0.eContents().get(0); private final Assignment cSecondAssignment_1 = (Assignment) cAlternatives.eContents().get(1); private final Keyword cSecondKeywordKeyword_1_0 = (Keyword) cSecondAssignment_1.eContents().get(0); // Scenario7 <A, B Scenario: // => first=IdOrKeyword2<A,B,A & B> | second='keyword' @Override public ParserRule getRule() { return rule; } // => first=IdOrKeyword2<A,B,A & B> | second='keyword' public Alternatives getAlternatives() { return cAlternatives; } // => first=IdOrKeyword2<A,B,A & B> public Assignment getFirstAssignment_0() { return cFirstAssignment_0; } // IdOrKeyword2<A,B,A & B> public RuleCall getFirstIdOrKeyword2ParserRuleCall_0_0() { return cFirstIdOrKeyword2ParserRuleCall_0_0; } // second='keyword' public Assignment getSecondAssignment_1() { return cSecondAssignment_1; } // 'keyword' public Keyword getSecondKeywordKeyword_1_0() { return cSecondKeywordKeyword_1_0; } }
public class PredTblElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "PredTbl"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final Keyword cSelectKeyword_0 = (Keyword) cAlternatives.eContents().get(0); private final Keyword cSortKeyword_1 = (Keyword) cAlternatives.eContents().get(1); private final Keyword cLimitKeyword_2 = (Keyword) cAlternatives.eContents().get(2); private final Keyword cImplementingKeyword_3 = (Keyword) cAlternatives.eContents().get(3); private final Keyword cComposingKeyword_4 = (Keyword) cAlternatives.eContents().get(4); // PredTbl: // "select" | "sort" | "limit" | "implementing" | "composing"; public ParserRule getRule() { return rule; } // "select" | "sort" | "limit" | "implementing" | "composing" public Alternatives getAlternatives() { return cAlternatives; } // "select" public Keyword getSelectKeyword_0() { return cSelectKeyword_0; } // "sort" public Keyword getSortKeyword_1() { return cSortKeyword_1; } // "limit" public Keyword getLimitKeyword_2() { return cLimitKeyword_2; } // "implementing" public Keyword getImplementingKeyword_3() { return cImplementingKeyword_3; } // "composing" public Keyword getComposingKeyword_4() { return cComposingKeyword_4; } }
protected String _toXtext(final Alternatives alt) { EList<AbstractElement> _elements = alt.getElements(); String _elvis = null; String _cardinality = alt.getCardinality(); if (_cardinality != null) { _elvis = _cardinality; } else { _elvis = ""; } String _plus = (")" + _elvis); final Function1<AbstractElement, CharSequence> _function = new Function1<AbstractElement, CharSequence>() { @Override public CharSequence apply(final AbstractElement it) { return PredicatedElementTest.this.toXtext(it); } }; return IterableExtensions.<AbstractElement>join(_elements, "(", " | ", _plus, _function); }
public class DatatypeElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Datatype"); private final Group cGroup = (Group) rule.eContents().get(1); private final Keyword cDatatypeKeyword_0 = (Keyword) cGroup.eContents().get(0); private final Alternatives cAlternatives_1 = (Alternatives) cGroup.eContents().get(1); private final RuleCall cDatatypeParserRuleCall_1_0 = (RuleCall) cAlternatives_1.eContents().get(0); private final RuleCall cIDTerminalRuleCall_1_1 = (RuleCall) cAlternatives_1.eContents().get(1); // Datatype: // "datatype" (Datatype | ID); @Override public ParserRule getRule() { return rule; } // "datatype" (Datatype | ID) public Group getGroup() { return cGroup; } // "datatype" public Keyword getDatatypeKeyword_0() { return cDatatypeKeyword_0; } // Datatype | ID public Alternatives getAlternatives_1() { return cAlternatives_1; } // Datatype public RuleCall getDatatypeParserRuleCall_1_0() { return cDatatypeParserRuleCall_1_0; } // ID public RuleCall getIDTerminalRuleCall_1_1() { return cIDTerminalRuleCall_1_1; } }
public class ConstFuncTblElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ConstFuncTbl"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final Keyword cTrueKeyword_0 = (Keyword) cAlternatives.eContents().get(0); private final Keyword cFalseKeyword_1 = (Keyword) cAlternatives.eContents().get(1); private final Keyword cEmptyKeyword_2 = (Keyword) cAlternatives.eContents().get(2); private final Keyword cNullKeyword_3 = (Keyword) cAlternatives.eContents().get(3); // ConstFuncTbl: // "true" | "false" | "empty" | "null"; public ParserRule getRule() { return rule; } // "true" | "false" | "empty" | "null" public Alternatives getAlternatives() { return cAlternatives; } // "true" public Keyword getTrueKeyword_0() { return cTrueKeyword_0; } // "false" public Keyword getFalseKeyword_1() { return cFalseKeyword_1; } // "empty" public Keyword getEmptyKeyword_2() { return cEmptyKeyword_2; } // "null" public Keyword getNullKeyword_3() { return cNullKeyword_3; } }
public class IdOrKeyword2Elements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName( getGrammar(), "org.eclipse.xtext.parser.parameters.TwoParametersTestLanguage.IdOrKeyword2"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final Group cGroup_0 = (Group) cAlternatives.eContents().get(0); private final Keyword cKeywordKeyword_0_0 = (Keyword) cGroup_0.eContents().get(0); private final RuleCall cIDTerminalRuleCall_1 = (RuleCall) cAlternatives.eContents().get(1); // IdOrKeyword2 <A, B, C>: // <A & B | C> 'keyword' // | ID; @Override public ParserRule getRule() { return rule; } // <A & B | C> 'keyword' | ID public Alternatives getAlternatives() { return cAlternatives; } // <A & B | C> 'keyword' public Group getGroup_0() { return cGroup_0; } // 'keyword' public Keyword getKeywordKeyword_0_0() { return cKeywordKeyword_0_0; } // ID public RuleCall getIDTerminalRuleCall_1() { return cIDTerminalRuleCall_1; } }
public class OrElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Or"); private final Group cGroup = (Group) rule.eContents().get(1); private final Alternatives cAlternatives_0 = (Alternatives) cGroup.eContents().get(0); private final Keyword cSemicolonKeyword_0_0 = (Keyword) cAlternatives_0.eContents().get(0); private final Keyword cVerticalLineKeyword_0_1 = (Keyword) cAlternatives_0.eContents().get(1); private final RuleCall cHoOperandParserRuleCall_1 = (RuleCall) cGroup.eContents().get(1); // Or: // (";" | "|") HoOperand; public ParserRule getRule() { return rule; } // (";" | "|") HoOperand public Group getGroup() { return cGroup; } // ";" | "|" public Alternatives getAlternatives_0() { return cAlternatives_0; } // ";" public Keyword getSemicolonKeyword_0_0() { return cSemicolonKeyword_0_0; } // "|" public Keyword getVerticalLineKeyword_0_1() { return cVerticalLineKeyword_0_1; } // HoOperand public RuleCall getHoOperandParserRuleCall_1() { return cHoOperandParserRuleCall_1; } }
public class ElementElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName( getGrammar(), "org.eclipse.xtext.idea.sdomain.SDomain.Element"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final RuleCall cNamespaceParserRuleCall_0 = (RuleCall) cAlternatives.eContents().get(0); private final RuleCall cTypeParserRuleCall_1 = (RuleCall) cAlternatives.eContents().get(1); private final RuleCall cImportParserRuleCall_2 = (RuleCall) cAlternatives.eContents().get(2); // Element: // Namespace | Type | Import; @Override public ParserRule getRule() { return rule; } // Namespace | Type | Import public Alternatives getAlternatives() { return cAlternatives; } // Namespace public RuleCall getNamespaceParserRuleCall_0() { return cNamespaceParserRuleCall_0; } // Type public RuleCall getTypeParserRuleCall_1() { return cTypeParserRuleCall_1; } // Import public RuleCall getImportParserRuleCall_2() { return cImportParserRuleCall_2; } }
@Override public Boolean caseAlternatives(Alternatives object) { Multimap<String, AbstractElement> prevAssignedFeatures = assignedFeatures; Multimap<String, AbstractElement> mergedAssignedFeatures = LinkedHashMultimap.create(); for (AbstractElement element : object.getElements()) { assignedFeatures = newMultimap(prevAssignedFeatures); doSwitch(element); mergedAssignedFeatures.putAll(assignedFeatures); } if (GrammarUtil.isOptionalCardinality(object)) { mergedAssignedFeatures.putAll(prevAssignedFeatures); } assignedFeatures = mergedAssignedFeatures; if (GrammarUtil.isMultipleCardinality(object)) { prevAssignedFeatures = assignedFeatures; for (AbstractElement element : object.getElements()) { assignedFeatures = newMultimap(prevAssignedFeatures); doSwitch(element); mergedAssignedFeatures.putAll(assignedFeatures); } assignedFeatures = mergedAssignedFeatures; } return Boolean.FALSE; }
public class CompOpsElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "CompOps"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final Keyword cExclamationMarkEqualsSignKeyword_0 = (Keyword) cAlternatives.eContents().get(0); private final Keyword cEqualsSignKeyword_1 = (Keyword) cAlternatives.eContents().get(1); private final Keyword cLessThanSignKeyword_2 = (Keyword) cAlternatives.eContents().get(2); private final Keyword cLessThanSignEqualsSignKeyword_3 = (Keyword) cAlternatives.eContents().get(3); private final Keyword cGreaterThanSignKeyword_4 = (Keyword) cAlternatives.eContents().get(4); private final Keyword cGreaterThanSignEqualsSignKeyword_5 = (Keyword) cAlternatives.eContents().get(5); // CompOps: // "!=" | "=" | "<" | "<=" | ">" | ">="; public ParserRule getRule() { return rule; } // "!=" | "=" | "<" | "<=" | ">" | ">=" public Alternatives getAlternatives() { return cAlternatives; } // "!=" public Keyword getExclamationMarkEqualsSignKeyword_0() { return cExclamationMarkEqualsSignKeyword_0; } // "=" public Keyword getEqualsSignKeyword_1() { return cEqualsSignKeyword_1; } // "<" public Keyword getLessThanSignKeyword_2() { return cLessThanSignKeyword_2; } // "<=" public Keyword getLessThanSignEqualsSignKeyword_3() { return cLessThanSignEqualsSignKeyword_3; } // ">" public Keyword getGreaterThanSignKeyword_4() { return cGreaterThanSignKeyword_4; } // ">=" public Keyword getGreaterThanSignEqualsSignKeyword_5() { return cGreaterThanSignEqualsSignKeyword_5; } }
public class ModelElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName( getGrammar(), "org.eclipse.xtext.ui.tests.enumrules.EnumRulesUiTestLanguage.Model"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final Group cGroup_0 = (Group) cAlternatives.eContents().get(0); private final Keyword cExistingKeyword_0_0 = (Keyword) cGroup_0.eContents().get(0); private final Assignment cExistingAssignment_0_1 = (Assignment) cGroup_0.eContents().get(1); private final RuleCall cExistingExistingEnumEnumRuleCall_0_1_0 = (RuleCall) cExistingAssignment_0_1.eContents().get(0); private final Group cGroup_0_2 = (Group) cGroup_0.eContents().get(2); private final Keyword cGeneratedKeyword_0_2_0 = (Keyword) cGroup_0_2.eContents().get(0); private final Assignment cGeneratedAssignment_0_2_1 = (Assignment) cGroup_0_2.eContents().get(1); private final RuleCall cGeneratedGeneratedEnumEnumRuleCall_0_2_1_0 = (RuleCall) cGeneratedAssignment_0_2_1.eContents().get(0); private final Group cGroup_1 = (Group) cAlternatives.eContents().get(1); private final Keyword cGeneratedKeyword_1_0 = (Keyword) cGroup_1.eContents().get(0); private final Assignment cGeneratedAssignment_1_1 = (Assignment) cGroup_1.eContents().get(1); private final RuleCall cGeneratedGeneratedEnumEnumRuleCall_1_1_0 = (RuleCall) cGeneratedAssignment_1_1.eContents().get(0); // Model: // 'existing' existing=ExistingEnum ('generated' generated=GeneratedEnum)? | 'generated' // generated=GeneratedEnum; @Override public ParserRule getRule() { return rule; } // 'existing' existing=ExistingEnum ('generated' generated=GeneratedEnum)? | 'generated' // generated=GeneratedEnum public Alternatives getAlternatives() { return cAlternatives; } // 'existing' existing=ExistingEnum ('generated' generated=GeneratedEnum)? public Group getGroup_0() { return cGroup_0; } // 'existing' public Keyword getExistingKeyword_0_0() { return cExistingKeyword_0_0; } // existing=ExistingEnum public Assignment getExistingAssignment_0_1() { return cExistingAssignment_0_1; } // ExistingEnum public RuleCall getExistingExistingEnumEnumRuleCall_0_1_0() { return cExistingExistingEnumEnumRuleCall_0_1_0; } // ('generated' generated=GeneratedEnum)? public Group getGroup_0_2() { return cGroup_0_2; } // 'generated' public Keyword getGeneratedKeyword_0_2_0() { return cGeneratedKeyword_0_2_0; } // generated=GeneratedEnum public Assignment getGeneratedAssignment_0_2_1() { return cGeneratedAssignment_0_2_1; } // GeneratedEnum public RuleCall getGeneratedGeneratedEnumEnumRuleCall_0_2_1_0() { return cGeneratedGeneratedEnumEnumRuleCall_0_2_1_0; } // 'generated' generated=GeneratedEnum public Group getGroup_1() { return cGroup_1; } // 'generated' public Keyword getGeneratedKeyword_1_0() { return cGeneratedKeyword_1_0; } // generated=GeneratedEnum public Assignment getGeneratedAssignment_1_1() { return cGeneratedAssignment_1_1; } // GeneratedEnum public RuleCall getGeneratedGeneratedEnumEnumRuleCall_1_1_0() { return cGeneratedGeneratedEnumEnumRuleCall_1_1_0; } }
public class LineElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Line"); private final Group cGroup = (Group) rule.eContents().get(1); private final Alternatives cAlternatives_0 = (Alternatives) cGroup.eContents().get(0); private final RuleCall cDeclParserRuleCall_0_0 = (RuleCall) cAlternatives_0.eContents().get(0); private final RuleCall cAssignParserRuleCall_0_1 = (RuleCall) cAlternatives_0.eContents().get(1); private final RuleCall cMethParserRuleCall_0_2 = (RuleCall) cAlternatives_0.eContents().get(2); private final RuleCall cFqnObjParserRuleCall_0_3 = (RuleCall) cAlternatives_0.eContents().get(3); private final RuleCall cFqnRefParserRuleCall_0_4 = (RuleCall) cAlternatives_0.eContents().get(4); private final RuleCall cEnumerationParserRuleCall_0_5 = (RuleCall) cAlternatives_0.eContents().get(5); private final Group cGroup_0_6 = (Group) cAlternatives_0.eContents().get(6); private final RuleCall cSuppressedHiddenParserRuleCall_0_6_0 = (RuleCall) cGroup_0_6.eContents().get(0); private final Keyword cPostKeyword_0_6_1 = (Keyword) cGroup_0_6.eContents().get(1); private final RuleCall cSpaceParserRuleCall_0_7 = (RuleCall) cAlternatives_0.eContents().get(7); private final RuleCall cDatatypesParserRuleCall_0_8 = (RuleCall) cAlternatives_0.eContents().get(8); private final Keyword cSemicolonKeyword_1 = (Keyword) cGroup.eContents().get(1); // Line: // (Decl | Assign | Meth | FqnObj | FqnRef | Enumeration | SuppressedHidden "post" | Space | // Datatypes) ";"; public ParserRule getRule() { return rule; } // (Decl | Assign | Meth | FqnObj | FqnRef | Enumeration | SuppressedHidden "post" | Space | // Datatypes) ";" public Group getGroup() { return cGroup; } // Decl | Assign | Meth | FqnObj | FqnRef | Enumeration | SuppressedHidden "post" | Space | // Datatypes public Alternatives getAlternatives_0() { return cAlternatives_0; } // Decl public RuleCall getDeclParserRuleCall_0_0() { return cDeclParserRuleCall_0_0; } // Assign public RuleCall getAssignParserRuleCall_0_1() { return cAssignParserRuleCall_0_1; } // Meth public RuleCall getMethParserRuleCall_0_2() { return cMethParserRuleCall_0_2; } // FqnObj public RuleCall getFqnObjParserRuleCall_0_3() { return cFqnObjParserRuleCall_0_3; } // FqnRef public RuleCall getFqnRefParserRuleCall_0_4() { return cFqnRefParserRuleCall_0_4; } // Enumeration public RuleCall getEnumerationParserRuleCall_0_5() { return cEnumerationParserRuleCall_0_5; } // SuppressedHidden "post" public Group getGroup_0_6() { return cGroup_0_6; } // SuppressedHidden public RuleCall getSuppressedHiddenParserRuleCall_0_6_0() { return cSuppressedHiddenParserRuleCall_0_6_0; } // "post" public Keyword getPostKeyword_0_6_1() { return cPostKeyword_0_6_1; } // Space public RuleCall getSpaceParserRuleCall_0_7() { return cSpaceParserRuleCall_0_7; } // Datatypes public RuleCall getDatatypesParserRuleCall_0_8() { return cDatatypesParserRuleCall_0_8; } // ";" public Keyword getSemicolonKeyword_1() { return cSemicolonKeyword_1; } }