Example #1
0
 public BnfRule(Bnf bnf, ReferenceOperator symbol, Operator expression)
 {
     Bnf           = bnf;
     Symbol        = symbol;
     Expression    = expression;
     ExpressionFsm = new Fsm(ExpandReferences(expression));
 }
Example #2
0
 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));
     }
 }
Example #3
0
 public BnfState(Bnf bnf)
     : this(bnf, "FILE")
 {
 }
Example #4
0
 public BnfProduction(Bnf bnf, ReferenceOperator symbol, Operator expression) : base(bnf, symbol, expression)
 {
 }