Examples of Violations


Examples of net.sourceforge.chaperon.model.Violations

   *
   * @return Return a list of violations, if this pattern isn't valid.
   */
  public Violations validate()
  {
    Violations violations = new Violations();

    /*if (pattern==null)
      violations.addViolation("Multiplier contains no pattern",
                              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

   *
   * @return Return a list of violations, if this pattern isn't valid.
   */
  public Violations validate()
  {
    Violations violations = new Violations();

    if (getPatternCount()<1)
      violations.addViolation("Pattern group doesn't contain 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

   *
   * @return Return a list of violations, if this pattern isn't valid.
   */
  public Violations validate()
  {
    Violations violations = new Violations();

    /*if (pattern==null)
      violations.addViolation("Multiplier contains no pattern",
                              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

   *
   * @return Return a list of violations, if this pattern isn't valid.
   */
  public Violations validate()
  {
    Violations violations = new Violations();

    if (getPatternCount()==0)
      violations.addViolation("Concatenation 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

   *
   * @return Return a list of violations, if this pattern isn't valid.
   */
  public Violations validate()
  {
    Violations violations = new Violations();

    /*if (string.length()==0)
      violations.addViolation("Character string contains no characters",
                              getLocation());*/
    return violations;
View Full Code Here

Examples of net.sourceforge.chaperon.model.Violations

   *
   * @return Return a list of violations, if this object isn't valid.
   */
  public Violations validate()
  {
    Violations violations = new Violations();

    if (ntsymbol==null)
      violations.addViolation("No symbol is for the left side defined", location);

    /*if ((definition==null) || (definition.getSymbolCount()<=0))
      violations.addViolation("No symbols are for the right side defined",
                              location);*/
    return violations;
View Full Code Here

Examples of net.sourceforge.chaperon.model.Violations

   *
   * @return Return a list of violations, if this pattern isn't valid.
   */
  public Violations validate()
  {
    Violations violations = new Violations();

    if (minimum>maximum)
      violations.addViolation("Minimum is greater than the maximum", getLocation());

    if (minimum==maximum)
      violations.addViolation("Minimum is equal than the maximum", getLocation());

    return violations;
  }
View Full Code Here

Examples of net.sourceforge.chaperon.model.Violations

   *
   * @return Return a list of violations, if this pattern isn't valid.
   */
  public Violations validate()
  {
    Violations violations = new Violations();

    if ((string==null) || (string.length()<=0))
      violations.addViolation("Character string contains no characters", getLocation());

    return violations;
  }
View Full Code Here

Examples of net.sourceforge.chaperon.model.Violations

   *
   * @return Return a list of violations, if this object isn't valid.
   */
  public Violations validate()
  {
    Violations violations = new Violations();

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

    /*for (int i = 0; i<definitions.length; i++)
      for (int j = 0; j<definitions.length; j++)
        if ((i!=j) && (definitions[i].getSymbol().equals(definitions[j].getSymbol())))
          violations.addViolation("Element '"+definitions[i].getSymbol()+"' is already defined",
                                  definitions[i].getLocation());*/
    if (getDefinition(startSymbol)==null)
      violations.addViolation("Start symbol \""+startSymbol+"\""+
                              "is not defined through a definition", location);

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

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

    /*SymbolSet ntdefinitions = getSymbols().getNonterminals();

    for (int i = 0; i<ntdefinitions.getSymbolCount(); i++)
      if ( !contains(ntdefinitions.getSymbol(i)))
View Full Code Here

Examples of net.sourceforge.chaperon.model.Violations

   *
   * @return Return a list of violations, if this object isn't valid.
   */
  public Violations validate()
  {
    Violations violations = new Violations();

    if (lexemes.size()==0)
      violations.addViolation("Lexicon contains not lexemes", location);

    for (Enumeration en = lexemes.elements(); en.hasMoreElements();)
      violations.addViolations(((Lexeme)en.nextElement()).validate());

    return violations;
  }
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.