Commit d6a7ba7d authored by petter's avatar petter

final changes, cleaning up conflict view, configuring Eclipse update site and migrating to new CUP

parent 096544bc
......@@ -878,6 +878,7 @@ public class lalr_state {
List<lalr_item> conflictingItems = new ArrayList<lalr_item>();
int relevancecounter = 0;
/* find and report on all items that shift under our conflict symbol */
for (Enumeration itms = items().all(); itms.hasMoreElements(); )
{
......@@ -890,6 +891,7 @@ public class lalr_state {
shift_sym = itm.symbol_after_dot();
if (!shift_sym.is_non_term() && shift_sym.index() == conflict_sym)
{
relevancecounter++;
conflictingItems.add(itm);
/* yes, report on it */
message += " and " + itm.to_simple_string()+"\n";
......@@ -899,7 +901,7 @@ public class lalr_state {
terminal.terminal_shared shared = terminal.getShared(context);
message += " under symbol "+ shared.find(conflict_sym).name() + "\n"+
" Resolved in favor of shifting.\n";
if (relevancecounter==0) return;
Conflict conflict = new ShiftReduceConflict(this, red_itm, conflictingItems, shared.find(conflict_sym));
ConflictManager cm = context.getConflictManager();
......
//----------------------------------------------------
// The following code was generated by CUP v0.11b 20140902 (SVN rev )
// The following code was generated by CUP v0.11b 20141202 (SVN rev 60)
//----------------------------------------------------
package de.in.tum.www2.cup.internal;
......
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
......
......@@ -11,6 +11,7 @@ import de.in.tum.www2.cup.CupConflictState;
import de.in.tum.www2.cup.internal.lalr_item;
import de.in.tum.www2.cup.internal.lalr_state;
import de.in.tum.www2.cup.internal.lalr_transition;
import de.tum.in.www2.cupplugin.views.CupConflictGraphView;
import de.tum.in.www2.cupplugin.views.CupConflictGraphView.ParserConflictNode;
import de.tum.in.www2.cupplugin.views.CupGraphBase.CupGraphNode;
......@@ -44,11 +45,11 @@ public class ConflictStateTooltip extends StateTooltip {
goneTransitions.add(current.getTransition());
}
Collections.reverse(goneTransitions);
builder.append("Actual gone path:\n");
for(lalr_transition trans : goneTransitions) {
builder.append(trans.toString());
builder.append("\n");
}
// builder.append("Actual gone path:\n");
// for(lalr_transition trans : goneTransitions) {
// builder.append(trans.toString());
// builder.append("\n");
// }
setText(builder.toString());
}
show();
......
<?xml version="1.0" encoding="UTF-8"?>
<site>
<description name="Cup Update Site" url="http://johannes.io/cup">
Test.
<description name="CUP Update Site" url="http://www2.in.tum.de/projects/cup/eclipse">
CUP is a Java LALR(1)-Parser Generator. The CUP Eclipse Plugin facilitates developing a CUP-based parser by syntax highlighting, outline and completion, conflict view, automaton view as well as the possibility to set breakpoints in CUP grammar files.
</description>
<feature url="features/CupEclipsePluginFeature_1.0.0.201412051433.jar" id="CupEclipsePluginFeature" version="1.0.0.201412051433">
<feature url="features/CupEclipsePluginFeature_1.0.0.201412081321.jar" id="CupEclipsePluginFeature" version="1.0.0.201412081321">
<category name="cup"/>
</feature>
<category-def name="cup" label="Cup"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment