Commit f670dfec authored by baueko's avatar baueko

added missing files

parent 346b473d
......@@ -25,8 +25,6 @@ public class CupParser {
/**
* Should contain a path to java-cup-runtime-jar
*
* @param classpathEntries
*/
public static void setClasspathEntries(String[] classpathEntries) {
CupParser.classpathEntries = classpathEntries;
......
package de.in.tum.www2.cup;
import java.io.File;
import java.io.FileInputStream;
import de.in.tum.www2.cup.ast.ParserResult;
class Demo {
public static void main(String[] blah) throws Exception {
IErrorReporter er = new NoopErrorReporter();
FileInputStream input = new FileInputStream("C:/workspace/testCUP/minijava/bin/cup/test.cup");
FileInputStream input = new FileInputStream("E:/Dropbox/Studium/WiSe16/Praktikum/Testdateien/Input.cup");
CupParser parser = new CupParser(er, input);
String[] classpathEntries = new String[] { "lib\\java-cup-11b-runtime.jar" };
ParserResult res = parser.parse(classpathEntries);
CupParser.setClasspathEntries(createClasspath());
ParserResult res = parser.parse();
System.out.println(res);
}
public static String[] createClasspath() {
final String PATH_TO_JAVA_CUP_RUNTIME = "tools" + File.separator + "java-cup-11b-runtime.jar";
// final String PATH_TO_JAVA_LANG = "C:\\Program Files\\Java\\jre1.8.0_45\\lib\\rt.jar";
return new String[] { PATH_TO_JAVA_CUP_RUNTIME/* , PATH_TO_JAVA_LANG */ };
}
}
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