Commit 246cec35 authored by Sebastian Pretscher's avatar Sebastian Pretscher

Merge branch 'master' of git@github.com:jroith/cup-eclipse.git

parents 69255157 c93df143
package de.in.tum.www2.cup;
import java.io.FileInputStream;
import java.io.InputStream;
import de.in.tum.www2.cup.ast.*;
......@@ -38,9 +37,8 @@ public class CupParser
try {
parser.parse();
} catch (ParserAbortException e) {
context.getErrorManager().Fatal(ErrorSource.Parser, "PARSER ABORT!");
System.out.println("PARSER ABORT!");
this.context = null;
return null;
}
......
......@@ -16,7 +16,7 @@ import de.in.tum.www2.cup.Position;
public class CupEditorErrorReporter implements IErrorReporter {
private static final int MAX_DISPLAYED_ERRORS = 1000;
private static final int MAX_DISPLAYED_ERRORS = 100;
static class BufferedMessage {
public ErrorType errorType;
......
......@@ -160,41 +160,6 @@ public class CupJavaProjectWizard extends Wizard implements INewWizard {
return true;
ICommand command = desc.newCommand();
command.setBuilderName(builderName);
/*
* Map<String,String> map = command.getArguments();
* map.put("LaunchConfigHandle", "<project>/.externalToolBuilders/"+name
* +".launch"); command.setArguments(map);
* command.setBuilding(IncrementalProjectBuilder.FULL_BUILD, true);
* command.setBuilding(IncrementalProjectBuilder.INCREMENTAL_BU ILD,
* true);
*/
/*
*
* MyAntBuilder.launch
*
* <?xml version="1.0" encoding="UTF-8" standalone="no"?>
* <launchConfiguration
* type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
* <booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED"
* value="true"/> <booleanAttribute
* key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
* <booleanAttribute
* key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
* <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER"
* value="org.eclipse.ant.ui.AntClasspathProvider"/> <booleanAttribute
* key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
* <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR"
* value="ijwdjpqwd"/> <stringAttribute
* key="org.eclipse.ui.externaltools.ATTR_LOCATION"
* value="${workspace_loc:/ijwdjpqwd/build.xml}"/> <stringAttribute
* key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS"
* value="full,incremental,"/> <booleanAttribute
* key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED"
* value="true"/> </launchConfiguration>
*/
ICommand[] nc = new ICommand[commands.length + 1];
System.arraycopy(commands, 0, nc, 1, commands.length);
......@@ -222,17 +187,9 @@ public class CupJavaProjectWizard extends Wizard implements INewWizard {
try {
project.open(monitor);
} catch (CoreException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
/*
* IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
* IResource resource = root.findMember(new Path(containerName)); if
* (!resource.exists() || !(resource instanceof IContainer)) { throw new
* RuntimeException("container does not exist."); }
*/
IContainer srcDir = (IContainer) project.findMember(new Path("src"));
IFolder cupDir = createDirectory(srcDir, monitor, "cup");
IFolder exampleDir = createDirectory(cupDir, monitor, "example");
......@@ -348,6 +305,7 @@ public class CupJavaProjectWizard extends Wizard implements INewWizard {
+ "<launchConfiguration type=\"org.eclipse.ant.AntBuilderLaunchConfigurationType\">\n"
+ "<booleanAttribute key=\"org.eclipse.ant.ui.ATTR_TARGETS_UPDATED\" value=\"true\"/>\n"
+ "<booleanAttribute key=\"org.eclipse.ant.ui.DEFAULT_VM_INSTALL\" value=\"false\"/>\n"
+ "<stringAttribute key=\"org.eclipse.debug.core.ATTR_REFRESH_SCOPE\" value=\"${workspace}\"/>\n"
+ "<booleanAttribute key=\"org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND\" value=\"false\"/>\n"
+ "<stringAttribute key=\"org.eclipse.jdt.launching.CLASSPATH_PROVIDER\" value=\"org.eclipse.ant.ui.AntClasspathProvider\"/>\n"
+ "<booleanAttribute key=\"org.eclipse.jdt.launching.DEFAULT_CLASSPATH\" value=\"true\"/>\n"
......
my
\ No newline at end of file
27+15;
\ No newline at end of file
......@@ -56,7 +56,7 @@ import java.io.InputStreamReader;
Newline = \r | \n | \r\n
Whitespace = [ \t\f] | {Newline}
Number = [0-9]
Number = [0-9]+
/* comments */
Comment = {TraditionalComment} | {EndOfLineComment}
......
......@@ -31,7 +31,6 @@ init with {:
scan with {: return lexer.next_token(); :};
/* Terminals (tokens returned by the scanner). */
/*terminal SEMI, PLUS, MINUS, TIMES, UMINUS, LPAREN, RPAREN;*/
terminal SEMI, PLUS, MINUS, UMINUS, TIMES, LPAREN, RPAREN;
terminal Integer NUMBER; // our scanner provides numbers as integers
......
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