コード例 #1
0
        public DotGraph <TVertexId> Parse(TextReader reader)
        {
            var antlrStream = new ANTLRReaderStream(reader);
            var lexer       = new DotGrammarLexer(antlrStream);
            var tokenStream = new CommonTokenStream(lexer);
            var parser      = new DotGrammarParser(tokenStream);

            parser.Builder = builder;
            parser.dot();
            return(builder.DotGraph);
        }
コード例 #2
0
ファイル: ParserTests.cs プロジェクト: babcca/BoBox.Debug
 private static DotGraph<int> Parse(string content)
 {
     var antlrStream = new ANTLRStringStream(content);
     var lexer = new DotGrammarLexer(antlrStream);
     var tokenStream = new CommonTokenStream(lexer);
     var parser = new DotGrammarParser(tokenStream);
     var builder = new IntDotGraphBuilder();
     parser.Builder = builder;
     parser.dot();
     return builder.DotGraph;
 }