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