Beispiel #1
0
        public ParsingState ExitRule()
        {
            var node           = new StringTreeNode(this.Rule, new StringFragment(this.Text, this.Parent.Pos, this.Pos - this.Parent.Pos), this.CurrChildren.ToArray());
            var parentChildren = this.Parent.CurrChildren.Concat(new[] { node }).ToArray();

            return(new ParsingState(this.Text, this, this.Pos, this.Parent.Parent, this.Grammar, this.Parent.Rule, parentChildren));
        }
Beispiel #2
0
 public ParsingResult(string text, StringTreeNode root)
 {
     this.Text = text;
     this.Root = root;
 }