Commit 6c57869d authored by Sebastian Pretscher's avatar Sebastian Pretscher

Fixed some settings gor new Parser

parent 722b7ce9
......@@ -6,13 +6,11 @@ import java.util.Arrays;
import java.util.List;
import java.util.Map;
import javax.inject.Singleton;
import java_cup.Lexer;
import java_cup.sym;
import java_cup.runtime.ComplexSymbolFactory;
import java_cup.runtime.ComplexSymbolFactory.ComplexSymbol;
import javax.inject.Singleton;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.TextAttribute;
import org.eclipse.jface.text.presentation.PresentationReconciler;
......@@ -25,6 +23,10 @@ import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.SourceViewerConfiguration;
import org.eclipse.swt.SWT;
import de.in.tum.www2.cup.CupScanner;
import de.in.tum.www2.cup.DefaultErrorReporter;
import de.in.tum.www2.cup.internal.sym;
public class CupSourceViewerConfiguration extends SourceViewerConfiguration {
CupTextEditor editor;
......@@ -63,8 +65,7 @@ public class CupSourceViewerConfiguration extends SourceViewerConfiguration {
static class TokenScanner implements ITokenScanner {
Lexer scanner;
ComplexSymbolFactory csf = new ComplexSymbolFactory();
CupScanner scanner;
int offset;
ComplexSymbol last;
......@@ -78,7 +79,7 @@ public class CupSourceViewerConfiguration extends SourceViewerConfiguration {
@Override
public void setRange(IDocument document, int offset, int length) {
scanner = new Lexer(csf, new StringReader(document.get()
scanner = new CupScanner(new DefaultErrorReporter(), new StringReader(document.get()
.substring(offset,offset+length)));
this.last=null;
this.offset=offset;
......
......@@ -58,6 +58,8 @@ Export-Package: EDU.oswego.cs.dl.util.concurrent,
com.ctc.wstx.sw,
com.ctc.wstx.util,
corejava,
de.in.tum.www2.cup,
de.in.tum.www2.cup.internal,
edu.uci.ics.jung.algorithms.blockmodel,
edu.uci.ics.jung.algorithms.cluster,
edu.uci.ics.jung.algorithms.filters,
......@@ -101,7 +103,6 @@ Export-Package: EDU.oswego.cs.dl.util.concurrent,
hep.aida,
hep.aida.bin,
hep.aida.ref,
java_cup,
java_cup.runtime,
javax.media.j3d,
javax.vecmath,
......
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