[12 - Tree Grammar] Add type check
This commit is contained in:
@@ -16,21 +16,15 @@ import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
|
||||
import de.dhbw.compiler.antlrxcompiler.*;
|
||||
import org.antlr.runtime.ANTLRInputStream;
|
||||
import org.antlr.runtime.CommonTokenStream;
|
||||
import org.antlr.runtime.tree.CommonTreeNodeStream;
|
||||
|
||||
import de.dhbw.compiler.antlrxcompiler.XLexer;
|
||||
import de.dhbw.compiler.antlrxcompiler.XOptimizer;
|
||||
import de.dhbw.compiler.antlrxcompiler.XParser;
|
||||
import de.dhbw.compiler.antlrxcompiler.XTree;
|
||||
import de.dhbw.compiler.antlrxcompiler.XTreeAdaptor;
|
||||
import de.dhbw.compiler.antlrxcompiler.XTypeCheck;
|
||||
|
||||
public abstract class OptimizerTest {
|
||||
|
||||
protected void testTypeCheckTree(String in, String expected) throws Exception {
|
||||
XTreeAdaptor xTreeAdaptor = new XTreeAdaptor();
|
||||
XTreeAdaptor xTreeAdaptor = new XTreeAdaptor();
|
||||
ANTLRInputStream input = new ANTLRInputStream(new ByteArrayInputStream(in.getBytes()));
|
||||
XLexer scanner = new XLexer(input);
|
||||
CommonTokenStream tokens = new CommonTokenStream(scanner);
|
||||
|
||||
Reference in New Issue
Block a user