Examples of addViolation()


Examples of net.sourceforge.chaperon.model.Violations.addViolation()

  public Violations validate()
  {
    Violations violations = new Violations();

    if (getCharacterClassElementCount()<1)
      violations.addViolation("Character class doesn't contain 1 or more elements", getLocation());

    for (int i = 0; i<getCharacterClassElementCount(); i++)
      violations.addViolations(getCharacterClassElement(i).validate());

    return violations;
View Full Code Here

Examples of net.sourceforge.chaperon.model.Violations.addViolation()

  public Violations validate()
  {
    Violations violations = new Violations();

    if ((characters.length+intervals.length)==0)
      violations.addViolation("Character class is empty", getLocation());

    for (int i = 0; i<characters.length; i++)
      violations.addViolations(characters[i].validate());

    for (int i = 0; i<intervals.length; i++)
View Full Code Here

Examples of net.sourceforge.chaperon.model.Violations.addViolation()

  public Violations validate()
  {
    Violations violations = new Violations();

    if (getPatternCount()==0)
      violations.addViolation("Alternation doesn't contain any elements", getLocation());

    for (int i = 0; i<getPatternCount(); i++)
      violations.addViolations(getPattern(i).validate());

    return violations;
View Full Code Here

Examples of net.sourceforge.chaperon.model.Violations.addViolation()

  public Violations validate()
  {
    Violations violations = new Violations();

    if (getPatternCount()==0)
      violations.addViolation("Choice doesn't contain any elements", getLocation());

    for (int i = 0; i<getPatternCount(); i++)
      violations.addViolations(getPattern(i).validate());

    return violations;
View Full Code Here

Examples of net.sourceforge.chaperon.model.Violations.addViolation()

   */
  public Violations validate()
  {
    Violations violations = new Violations();
    if (startsymbol==null)
      violations.addViolation("Start symbol is not defined", location);

    if (getProductionCount() <= 0)
      violations.addViolation("No productions are defined", location);

    for (Enumeration e = productions.elements(); e.hasMoreElements() ;)
View Full Code Here

Examples of net.sourceforge.chaperon.model.Violations.addViolation()

    Violations violations = new Violations();
    if (startsymbol==null)
      violations.addViolation("Start symbol is not defined", location);

    if (getProductionCount() <= 0)
      violations.addViolation("No productions are defined", location);

    for (Enumeration e = productions.elements(); e.hasMoreElements() ;)
      violations.addViolations(((Production)e.nextElement()).validate());

    SymbolSet ntsymbols = getSymbols().getNonterminals();
View Full Code Here

Examples of net.sourceforge.chaperon.model.Violations.addViolation()

      violations.addViolations(((Production)e.nextElement()).validate());

    SymbolSet ntsymbols = getSymbols().getNonterminals();
    for (int i = 0; i < ntsymbols.getSymbolCount(); i++)
      if (!contains(ntsymbols.getSymbol(i)))
        violations.addViolation("Nonterminal symbol \"" + ntsymbols.getSymbol(i) + "\"" +
                                "is not defined through a production", location);

    return violations;
  }
View Full Code Here

Examples of net.sourceforge.chaperon.model.Violations.addViolation()

  public Violations validate()
  {
    Violations violations = new Violations();

    if (startsymbol==null)
      violations.addViolation("Start symbol is not defined", location);
    else if (!contains(startsymbol))
      violations.addViolation("Start symbol \""+startsymbol+"\""+
                              "is not defined through a production", location);

    if (getProductionCount()<=0)
View Full Code Here

Examples of net.sourceforge.chaperon.model.Violations.addViolation()

    Violations violations = new Violations();

    if (startsymbol==null)
      violations.addViolation("Start symbol is not defined", location);
    else if (!contains(startsymbol))
      violations.addViolation("Start symbol \""+startsymbol+"\""+
                              "is not defined through a production", location);

    if (getProductionCount()<=0)
      violations.addViolation("No productions are defined", location);
View Full Code Here

Examples of net.sourceforge.chaperon.model.Violations.addViolation()

    else if (!contains(startsymbol))
      violations.addViolation("Start symbol \""+startsymbol+"\""+
                              "is not defined through a production", location);

    if (getProductionCount()<=0)
      violations.addViolation("No productions are defined", location);

    for (Enumeration e = productions.elements(); e.hasMoreElements();)
      violations.addViolations(((Production)e.nextElement()).validate());

    SymbolSet ntsymbols = getSymbols().getNonterminals();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.