Examples of addViolation()


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);

    /*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",
View Full Code Here

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

      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);

View Full Code Here

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

    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();
View Full Code Here

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

  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

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

    Violations violations = new Violations();

    if (definition==null)
    {
      if (symbol!=null)
        violations.addViolation("Lexeme "+symbol+" contains no definition", location);
      else
        violations.addViolation("Lexeme contains no definition", location);
    }

    if ((symbol!=null) && (symbol.getName().equals("error")))
View Full Code Here

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

    if (definition==null)
    {
      if (symbol!=null)
        violations.addViolation("Lexeme "+symbol+" contains no definition", location);
      else
        violations.addViolation("Lexeme contains no definition", location);
    }

    if ((symbol!=null) && (symbol.getName().equals("error")))
      violations.addViolation("Symbol with name \"error\" is not allowed", location);
View Full Code Here

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

      else
        violations.addViolation("Lexeme contains no definition", location);
    }

    if ((symbol!=null) && (symbol.getName().equals("error")))
      violations.addViolation("Symbol with name \"error\" is not allowed", location);

    return violations;
  }

  /**
 
View Full Code Here

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

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

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

    if (getPatternCount()==0)
      violations.addViolation("No pattern are for the right side defined", location);

    for (int i = 0; i<getPatternCount(); i++)
View Full Code Here

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

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

    if (getPatternCount()==0)
      violations.addViolation("No pattern are for the right side defined", location);

    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 (symbol==null)
      violations.addViolation("No symbol defined for element", location);

    return violations;
  }

  public String toString()
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.