title: How to Generate and display ParseTree for an expression in C# using Irony?
body: <p>I want to generate and display context free grammar using irony and so far I am able to write the context free grammar by following code</p>
  
  <pre><code> public ExpressionGrammar()
              {
                      //// 1. Terminals
                      Terminal number = new NumberLiteral("number");
                      Terminal identifier = new IdentifierTerminal("identifier");
  
                      //// 2. Non-terminals
                      NonTerminal Stmt = new NonTerminal("Stmt");
                      NonTerminal Dec = new NonTerminal("Dec");
                      NonTerminal Datattype = new NonTerminal("Datatype");
                      NonTerminal Def = new NonTerminal("Def");
                      NonTerminal Var = new NonTerminal("Var");
                      NonTerminal Const = new NonTerminal("Const");
                      this.Root = Stmt;
                      ////3. BNF Rules
                      Stmt.Rule = "{"+Dec+"}";
                      Dec.Rule = Datattype + Def + ";";
                      Def.Rule = identifier | identifier + "=" + number;
  
                      //MarkPunctuation(""); ;
                     Datattype.Rule = ToTerm("int") | "char" | "float";
  }
  </code></pre>
  
  <p>And in my <code>form_load</code> event I have</p>
  
  <pre><code>       ExpressionGrammar ex = new ExpressionGrammar(); 
         //Grammar grammar = new ExpressionGrammar();
         Parser parser = new Parser(ex);
         ParseTree parseTree = parser.Parse("{int a=5;}");
         if (!parseTree.HasErrors())
         {
              //foreach (string p in parseTree.) { }
              MessageBox.Show(parseTree.Status.ToString());
             // ParseTreeNodeList ls = new ParseTreeNodeList();
              //ls.Add(parseTree.Root);
  
         }
         else 
         {
             MessageBox.Show("Error in parsing"); 
         }
  </code></pre>
  
  <p>and i am getting parsed message so it work fine now i want to generate parse tree. How can i do so?</p>