//* // * Adds a production pattern alternative. // * // * @param alt the production pattern alternative to add // * // * @throws ParserCreationException if an identical alternative has // * already been added // public void AddAlternative(ProductionPatternAlternative alt) { if (alternatives.Contains(alt)) { throw new ParserCreationException(ParserCreationException.ErrorType.INVALID_PRODUCTION, m_name, "two identical alternatives exist"); } alt.SetPattern(this); alternatives.Add(alt); }