Returns the method name for accessing a rule via a GrammarAccess implementation.
@param rule the rule for which the accessor method is needed
@return the method's name.
324139
public String gaRuleAccessMethodName(final AbstractRule rule) {
    String _gaRuleIdentifyer = this.gaRuleIdentifyer(rule);
    String _plus = ("get" + _gaRuleIdentifyer);
    return (_plus + "Rule");
  }
973037
public final EObject ruleTerminalRuleCall() throws RecognitionException {
        EObject current = null;


        	enterRule();

        try {
            // InternalXtext.g:2059:2: ( ( ( ruleRuleID ) ) )
            // InternalXtext.g:2060:2: ( ( ruleRuleID ) )
            {
            // InternalXtext.g:2060:2: ( ( ruleRuleID ) )
            // InternalXtext.g:2061:3: ( ruleRuleID )
            {
            // InternalXtext.g:2061:3: ( ruleRuleID )
            // InternalXtext.g:2062:4: ruleRuleID
            {

            				if (current==null) {
            					current = createModelElement(grammarAccess.getTerminalRuleCallRule());
            				}
            			

            				newCompositeNode(grammarAccess.getTerminalRuleCallAccess().getRuleAbstractRuleCrossReference_0());
            			
            pushFollow(FollowSets000.FOLLOW_2);
            ruleRuleID();

            state._fsp--;


            				afterParserOrEnumRuleCall();
            			

            }


            }


            }


            	leaveRule();

        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
97276
public static AccessorPrefix determineAccessorPrefix(@Nonnull final String methodName) {
		Check.notEmpty(methodName, "methodName");
		final Matcher m = PATTERN.matcher(methodName);
		Check.stateIsTrue(m.find(), "passed method name '%s' is not applicable", methodName);
		return new AccessorPrefix(m.group(1));
	}
1236213
private String findParserName (final String grammar)
  {
    final String parserBegin = "PARSER_BEGIN\\s*\\(\\s*([^\\s\\)]+)\\s*\\)";
    final Matcher matcher = Pattern.compile (parserBegin).matcher (grammar);
    if (matcher.find ())
    {
      return matcher.group (1);
    }
    return "";
  }
487828
public final String entryRuleOperators() throws RecognitionException {
        String current = null;

        AntlrDatatypeRuleToken iv_ruleOperators = null;


        try {
            // InternalSARL.g:9544:49: (iv_ruleOperators= ruleOperators EOF )
            // InternalSARL.g:9545:2: iv_ruleOperators= ruleOperators EOF
            {
            if ( state.backtracking==0 ) {
               newCompositeNode(grammarAccess.getOperatorsRule()); 
            }
            pushFollow(FOLLOW_1);
            iv_ruleOperators=ruleOperators();

            state._fsp--;
            if (state.failed) return current;
            if ( state.backtracking==0 ) {
               current =iv_ruleOperators.getText(); 
            }
            match(input,EOF,FOLLOW_2); if (state.failed) return current;

            }

        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
892553
public final EObject ruleEOF() throws RecognitionException {
        EObject current = null;

        Token otherlv_1=null;


        	enterRule();

        try {
            // InternalXtext.g:3450:2: ( ( () otherlv_1= 'EOF' ) )
            // InternalXtext.g:3451:2: ( () otherlv_1= 'EOF' )
            {
            // InternalXtext.g:3451:2: ( () otherlv_1= 'EOF' )
            // InternalXtext.g:3452:3: () otherlv_1= 'EOF'
            {
            // InternalXtext.g:3452:3: ()
            // InternalXtext.g:3453:4: 
            {

            				current = forceCreateModelElement(
            					grammarAccess.getEOFAccess().getEOFAction_0(),
            					current);
            			

            }

            otherlv_1=(Token)match(input,48,FollowSets000.FOLLOW_2); 

            			newLeafNode(otherlv_1, grammarAccess.getEOFAccess().getEOFKeyword_1());
            		

            }


            }


            	leaveRule();

        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
973036
function grammarToString(grammarName) {
        return grammarRules(grammarName).map(function (r) { return r.fullName + " <- " + r.definition; }).join('\n');
    }
1302236
public GrammarRules toGrammarRulesData() {

    GrammarRules res = new GrammarRules();

    GrammarRuleRecord r0 = new GrammarRuleRecord();
    r0.setRuleNumber(0);
    r0.setRuleString(this.r0String);
    r0.setExpandedRuleString(this.r0ExpandedString);
    r0.setOccurrences(new int[] { 0 });
    r0.setMeanLength(-1);
    r0.setMinMaxLength(new int[] { -1 });
    res.addRule(r0);

    for (RePairRule rule : theRules.values()) {
      // System.out.println("processing the rule " + rule.ruleNumber);
      GrammarRuleRecord rec = new GrammarRuleRecord();

      rec.setRuleNumber(rule.ruleNumber);
      rec.setRuleString(rule.toRuleString());
      rec.setExpandedRuleString(rule.expandedRuleString);
      rec.setRuleYield(countSpaces(rule.expandedRuleString));
      rec.setOccurrences(rule.getOccurrences());
      rec.setRuleIntervals(rule.getRuleIntervals());
      rec.setRuleLevel(rule.getLevel());
      rec.setMinMaxLength(rule.getLengths());
      rec.setMeanLength(mean(rule.getRuleIntervals()));

      res.addRule(rec);
    }

    // count the rule use
    for (GrammarRuleRecord r : res) {
      String str = r.getRuleString();
      String[] tokens = str.split("\\s+");
      for (String t : tokens) {
        if (t.startsWith("R")) {
          Integer ruleId = Integer.valueOf(t.substring(1));
          GrammarRuleRecord rr = res.get(ruleId);
          // System.out.print(rr.getRuleUseFrequency() + " ");
          int newFreq = rr.getRuleUseFrequency() + 1;
          rr.setRuleUseFrequency(newFreq);
          // System.out.println(rr.getRuleUseFrequency());
        }
      }
    }

    return res;
  }
711478
public final void ruleTerminalRuleCall() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXtext.g:783:2: ( ( ( rule__TerminalRuleCall__RuleAssignment ) ) )
            // InternalXtext.g:784:2: ( ( rule__TerminalRuleCall__RuleAssignment ) )
            {
            // InternalXtext.g:784:2: ( ( rule__TerminalRuleCall__RuleAssignment ) )
            // InternalXtext.g:785:3: ( rule__TerminalRuleCall__RuleAssignment )
            {
             before(grammarAccess.getTerminalRuleCallAccess().getRuleAssignment()); 
            // InternalXtext.g:786:3: ( rule__TerminalRuleCall__RuleAssignment )
            // InternalXtext.g:786:4: rule__TerminalRuleCall__RuleAssignment
            {
            pushFollow(FollowSets000.FOLLOW_2);
            rule__TerminalRuleCall__RuleAssignment();

            state._fsp--;


            }

             after(grammarAccess.getTerminalRuleCallAccess().getRuleAssignment()); 

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
1093825
public static function checkClassMethodRule($rule, $className, $methodName)
    {
        list($classRule, $methodRule) = explode('::', $rule, 2);
        return static::checkRuleMatch($classRule, $className) && static::checkRuleMatch($methodRule, $methodName);
    }
920642
public final String entryRuleQualifiedName() throws RecognitionException {
        String current = null;

        AntlrDatatypeRuleToken iv_ruleQualifiedName = null;


        try {
            // InternalXtype.g:762:53: (iv_ruleQualifiedName= ruleQualifiedName EOF )
            // InternalXtype.g:763:2: iv_ruleQualifiedName= ruleQualifiedName EOF
            {
            if ( state.backtracking==0 ) {
               newCompositeNode(grammarAccess.getQualifiedNameRule()); 
            }
            pushFollow(FOLLOW_1);
            iv_ruleQualifiedName=ruleQualifiedName();

            state._fsp--;
            if (state.failed) return current;
            if ( state.backtracking==0 ) {
               current =iv_ruleQualifiedName.getText(); 
            }
            match(input,EOF,FOLLOW_2); if (state.failed) return current;

            }

        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
504837
public final void ruleParameter() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXtext.g:283:2: ( ( ( rule__Parameter__NameAssignment ) ) )
            // InternalXtext.g:284:2: ( ( rule__Parameter__NameAssignment ) )
            {
            // InternalXtext.g:284:2: ( ( rule__Parameter__NameAssignment ) )
            // InternalXtext.g:285:3: ( rule__Parameter__NameAssignment )
            {
             before(grammarAccess.getParameterAccess().getNameAssignment()); 
            // InternalXtext.g:286:3: ( rule__Parameter__NameAssignment )
            // InternalXtext.g:286:4: rule__Parameter__NameAssignment
            {
            pushFollow(FollowSets000.FOLLOW_2);
            rule__Parameter__NameAssignment();

            state._fsp--;


            }

             after(grammarAccess.getParameterAccess().getNameAssignment()); 

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
301364
public final EObject ruleParameterReference() throws RecognitionException {
        EObject current = null;

        Token otherlv_0=null;


        	enterRule();

        try {
            // InternalXtext.g:2029:2: ( ( (otherlv_0= RULE_ID ) ) )
            // InternalXtext.g:2030:2: ( (otherlv_0= RULE_ID ) )
            {
            // InternalXtext.g:2030:2: ( (otherlv_0= RULE_ID ) )
            // InternalXtext.g:2031:3: (otherlv_0= RULE_ID )
            {
            // InternalXtext.g:2031:3: (otherlv_0= RULE_ID )
            // InternalXtext.g:2032:4: otherlv_0= RULE_ID
            {

            				if (current==null) {
            					current = createModelElement(grammarAccess.getParameterReferenceRule());
            				}
            			
            otherlv_0=(Token)match(input,RULE_ID,FollowSets000.FOLLOW_2); 

            				newLeafNode(otherlv_0, grammarAccess.getParameterReferenceAccess().getParameterParameterCrossReference_0());
            			

            }


            }


            }


            	leaveRule();

        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
157866
protected static Assignment findAssignmentFromTerminalPattern(EObject rule, String pattern) {
		return IterableExtensions.findFirst(GrammarUtil.containedAssignments(rule),
				assignment -> nameMatches(assignment.getTerminal(), pattern));
	}
552554
public final void ruleAbstractTerminal() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXtext.g:508:2: ( ( ( rule__AbstractTerminal__Alternatives ) ) )
            // InternalXtext.g:509:2: ( ( rule__AbstractTerminal__Alternatives ) )
            {
            // InternalXtext.g:509:2: ( ( rule__AbstractTerminal__Alternatives ) )
            // InternalXtext.g:510:3: ( rule__AbstractTerminal__Alternatives )
            {
             before(grammarAccess.getAbstractTerminalAccess().getAlternatives()); 
            // InternalXtext.g:511:3: ( rule__AbstractTerminal__Alternatives )
            // InternalXtext.g:511:4: rule__AbstractTerminal__Alternatives
            {
            pushFollow(FollowSets000.FOLLOW_2);
            rule__AbstractTerminal__Alternatives();

            state._fsp--;


            }

             after(grammarAccess.getAbstractTerminalAccess().getAlternatives()); 

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
440220
public final void ruleOpOther() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXbase.g:396:2: ( ( ( rule__OpOther__Alternatives ) ) )
            // InternalXbase.g:397:2: ( ( rule__OpOther__Alternatives ) )
            {
            // InternalXbase.g:397:2: ( ( rule__OpOther__Alternatives ) )
            // InternalXbase.g:398:3: ( rule__OpOther__Alternatives )
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getOpOtherAccess().getAlternatives()); 
            }
            // InternalXbase.g:399:3: ( rule__OpOther__Alternatives )
            // InternalXbase.g:399:4: rule__OpOther__Alternatives
            {
            pushFollow(FOLLOW_2);
            rule__OpOther__Alternatives();

            state._fsp--;
            if (state.failed) return ;

            }

            if ( state.backtracking==0 ) {
               after(grammarAccess.getOpOtherAccess().getAlternatives()); 
            }

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
883266
@Pure
	protected String getLanguageScriptMemberGetter() {
		final Grammar grammar = getGrammar();
		final AbstractRule scriptRule = GrammarUtil.findRuleForName(grammar, getCodeBuilderConfig().getScriptRuleName());
		for (final Assignment assignment : GrammarUtil.containedAssignments(scriptRule)) {
			if ((assignment.getTerminal() instanceof RuleCall)
					&& Objects.equals(((RuleCall) assignment.getTerminal()).getRule().getName(),
					getCodeBuilderConfig().getTopElementRuleName())) {
				return "get" + Strings.toFirstUpper(assignment.getFeature()); //$NON-NLS-1$
			}
		}
		throw new IllegalStateException("member not found"); //$NON-NLS-1$
	}