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

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

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

        stackAutomat = new S_StackAutomat(grammar);
    }