Package org.antlr.tool

Examples of org.antlr.tool.Rule


                    continue;
                }

                Grammar g = discoveredLexerGrammar;
                if(g != null) {
                    Rule r = g.getRule(Grammar.ARTIFICIAL_TOKENS_RULENAME);
                    NFAState s = (NFAState)r.startState.transition(0).target;
                    if(s == null) {
                        System.err.println("NFAState s is null for rule "+r.name);
                        continue;
                    }
View Full Code Here


        Grammar g = eg.getLexerGrammar();
        if(g == null) {
            throw new Exception("Cannot show tokens DFA because there is no lexer grammar");
        }
        Rule r = g.getRule(Grammar.ARTIFICIAL_TOKENS_RULENAME);
        NFAState s = (NFAState)r.startState.transition(0).target;
        DFA dfa = g.getLookaheadDFA(s.getDecisionNumber());

        DOTGenerator dg = new DOTGenerator(g);
        dg.setArrowheadType("none");
View Full Code Here

   *
   *  TODO: what about gated vs regular preds?
   */
  public boolean detectConfoundingPredicates(NFAState s) {
    lookBusy.clear();
    Rule r = s.enclosingRule;
    return _detectConfoundingPredicates(s, r, false) == DETECT_PRED_FOUND;
  }
View Full Code Here

   *
   *  TODO: what about gated vs regular preds?
   */
  public boolean detectConfoundingPredicates(NFAState s) {
    lookBusy.clear();
    Rule r = s.enclosingRule;
    return _detectConfoundingPredicates(s, r, false) == DETECT_PRED_FOUND;
  }
View Full Code Here

   *
   *  TODO: what about gated vs regular preds?
   */
  public boolean detectConfoundingPredicates(NFAState s) {
    lookBusy.clear();
    Rule r = s.enclosingRule;
    return _detectConfoundingPredicates(s, r, false) == DETECT_PRED_FOUND;
  }
View Full Code Here

                  else if ( enclosingRule.getRuleLabel(x.getText())!=null ) {
                    // ref to rule label
                    Grammar.LabelElementPair pair = enclosingRule.getRuleLabel(x.getText());
                    pair.actionReferencesLabel = true;
                    refdRuleName = pair.referencedRuleName;
                    Rule refdRule = grammar.getRule(refdRuleName);
                    scope = refdRule.getLocalAttributeScope(y.getText());
                  }
                  else if ( enclosingRule.getRuleRefsInAlt(x.getText(), outerAltNum)!=null ) {
                    // ref to rule referenced in this alt
                    refdRuleName = x.getText();
                    Rule refdRule = grammar.getRule(refdRuleName);
                    scope = refdRule.getLocalAttributeScope(y.getText());
                  }
                  if ( scope!=null &&
                     (scope.isPredefinedRuleScope||scope.isPredefinedLexerRuleScope) )
                  {
                    grammar.referenceRuleLabelPredefinedAttribute(refdRuleName);
View Full Code Here

   *
   *  TODO: what about gated vs regular preds?
   */
  public boolean detectConfoundingPredicates(NFAState s) {
    lookBusy.clear();
    Rule r = s.enclosingRule;
    return _detectConfoundingPredicates(s, r, false) == DETECT_PRED_FOUND;
  }
View Full Code Here

   *
   *  TODO: what about gated vs regular preds?
   */
  public boolean detectConfoundingPredicates(NFAState s) {
    lookBusy.clear();
    Rule r = s.enclosingRule;
    return _detectConfoundingPredicates(s, r, false) == DETECT_PRED_FOUND;
  }
View Full Code Here

TOP

Related Classes of org.antlr.tool.Rule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.