예제 #1
0
    /// <summary>  Validates the row.</summary>
    /// <param name="inputRow">The input row.</param>
    /// <returns></returns>
    public bool ValidateRow(string inputRow)
    {
        stackAutomat = new Q_StackAutomat(grammar);


        foreach (char input in inputRow)
        {
            if (!stackAutomat.Transition(input))
            {
                return(false);
            }
        }

        return(true);
    }
예제 #2
0
 /// <summary>Initializes a new instance of the <see cref="Q" /> class.</summary>
 /// <param name="grammar">The grammar.</param>
 public Q(GenericGrammar grammar)
 {
     this.grammar = grammar;
     //Cond
     stackAutomat = new Q_StackAutomat(grammar);
 }