Exemplo n.º 1
0
    /// <summary>
    /// Method for checking if Atom can be applied to production
    /// </summary>
    /// <param name="atom">Atom to check</param>
    /// <returns>true if atom can be applied to production, false otherwise</returns>
    public Boolean passesGuards(Atom atom)
    {
        Boolean isOK = false;

        for (int i = 0; i < Guards.Count(); i++)
        {
            if (atom.Letter == Before && Guards[i].apply(atom.Parameters))
            {
                isOK = true;
            }
        }
        return(isOK);
    }