Package net.sourceforge.chaperon.build.conflict

Examples of net.sourceforge.chaperon.build.conflict.ReduceReduceConflict


        IntegerSet reduceproductions = I.getReduceProductions(tsymbols.getSymbol(symbol));
        int productionpriority = -1;
        int highestproduction = -1;
        for (int k = 0; k<reduceproductions.getCount(); k++)
        {
          ReduceReduceConflict reduceconflict = null;

          if (k>0)
          {
            reduceconflict =
              new ReduceReduceConflict(grammar, itemsets, state,
                                       (Terminal)tsymbols.getSymbol(symbol),
                                       reduceproductions.get(k-1), reduceproductions.get(k));

            conflicts.addConflict(reduceconflict);
          }

          if (grammar.getPriority(grammar.getProduction(reduceproductions.get(k)))>productionpriority)
          {
            highestproduction = reduceproductions.get(k);
            productionpriority = grammar.getPriority(grammar.getProduction(highestproduction));

            if ((log!=null) && (reduceconflict!=null))
              log.info(reduceconflict.toString());
          }
          else if (grammar.getPriority(grammar.getProduction(reduceproductions.get(k)))==productionpriority)
          {
            if (log!=null)
              log.warn(reduceconflict.toString());
          }
        }

        if (reduceproductions.getCount()>1)
          if ((log!=null) && (log.isInfoEnabled()))
View Full Code Here

TOP

Related Classes of net.sourceforge.chaperon.build.conflict.ReduceReduceConflict

Copyright © 2018 www.massapicom. 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.