public BnfRule(Bnf bnf, ReferenceOperator symbol, Operator expression) { Bnf = bnf; Symbol = symbol; Expression = expression; ExpressionFsm = new Fsm(ExpandReferences(expression)); }
public BnfState(Bnf bnf, string root) { this.Bnf = bnf; Rules = new Stack <KeyValuePair <BnfRule, FsmState> >(); IsEnterBlockTime = false; if (Bnf.Definitions.ContainsKey(root)) { Rules.Push(new KeyValuePair <BnfRule, FsmState>(Bnf.Definitions[root], Bnf.Definitions[root].ExpressionFsm.Root)); } else { Rules.Push(new KeyValuePair <BnfRule, FsmState>(Bnf.Productions[root], Bnf.Productions[root].ExpressionFsm.Root)); } }
public BnfState(Bnf bnf) : this(bnf, "FILE") { }
public BnfProduction(Bnf bnf, ReferenceOperator symbol, Operator expression) : base(bnf, symbol, expression) { }