Antlr3.Tool.Grammar.AltReferencesRule C# (CSharp) Method

AltReferencesRule() public method

public AltReferencesRule ( string enclosingRuleName, Antlr3.Tool.GrammarAST refScopeAST, Antlr3.Tool.GrammarAST refAST, int outerAltNum ) : void
enclosingRuleName string
refScopeAST Antlr3.Tool.GrammarAST
refAST Antlr3.Tool.GrammarAST
outerAltNum int
return void
        public virtual void AltReferencesRule( string enclosingRuleName,
                                      GrammarAST refScopeAST,
                                      GrammarAST refAST,
                                      int outerAltNum )
        {
            /* Do nothing for now; not sure need; track S.x as x
            String scope = null;
            Grammar scopeG = null;
            if ( refScopeAST!=null ) {
                if ( !scopedRuleRefs.contains(refScopeAST) ) {
                    scopedRuleRefs.add(refScopeAST);
                }
                scope = refScopeAST.getText();
            }
            */
            Rule r = GetRule( enclosingRuleName );
            if ( r == null )
            {
                return; // no error here; see NameSpaceChecker
            }
            r.TrackRuleReferenceInAlt( refAST, outerAltNum );
            IToken refToken = refAST.Token;
            if ( !ruleRefs.Contains( refAST ) )
            {
                ruleRefs.Add( refAST );
            }
        }
Grammar