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

GetAllImportedRules() public method

public GetAllImportedRules ( ) : HashSet
return HashSet
        public virtual HashSet<Rule> GetAllImportedRules()
        {
            return composite.GetAllImportedRules( this );
        }

Usage Example

Beispiel #1
0
        protected virtual void GenerateNFAs( Grammar g )
        {
            IGraphGenerator generator = GenerateDgmlGraphs ? (IGraphGenerator)new DgmlGenerator(g) : new DOTGenerator(g);
            HashSet<Rule> rules = g.GetAllImportedRules();
            rules.UnionWith( g.Rules );

            foreach ( Rule r in rules )
            {
                try
                {
                    string dot = generator.GenerateGraph( r.StartState );
                    if ( dot != null )
                    {
                        WriteGraphFile( g, r, dot, generator.FileExtension );
                    }
                }
                catch ( IOException ioe )
                {
                    ErrorManager.Error( ErrorManager.MSG_CANNOT_WRITE_FILE, ioe );
                }
            }
        }
All Usage Examples Of Antlr3.Tool.Grammar::GetAllImportedRules
Grammar