Skip to content

Commit

Permalink
Moved grammar and parser generation scripts to batch compiler (eclips…
Browse files Browse the repository at this point in the history
…e-jdt#181)

- Grammar file belongs to compiler, build scripts for it too.
- Added grammar to sources.

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=562044 for original
contribution motivation for parser build scripts. No idea if the code
still works and no idea where to get the *right* native JikesPG
executable, so I can't test if that works or not.

See eclipse-jdt#181
  • Loading branch information
iloveeclipse committed Dec 7, 2022
1 parent cfe9a50 commit 002b055
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion org.eclipse.jdt.core.compiler.batch/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ bin.includes = META-INF/,\
about.html
src.includes = about.html,\
META-INF/services/,\
META-INF/eclipse.inf
META-INF/eclipse.inf,\
grammar/
jars.extra.classpath = lib/javax18api.jar,platform:/plugin/org.apache.ant/lib/ant.jar
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class GenerateParserScript {

public static void main(String[] args) throws IOException, InterruptedException {
File grammarDir = new File("../grammar");
File parserDir = new File("../compiler/org/eclipse/jdt/internal/compiler/parser");
File parserDir = new File("../src/org/eclipse/jdt/internal/compiler/parser");
String jikespg = System.getProperty("JIKESPG");
assertTrue(jikespg != null);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;resources&gt;&#10;&lt;item path=&quot;/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser&quot; type=&quot;2&quot;/&gt;&#10;&lt;/resources&gt;}"/>
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;resources&gt;&#10;&lt;item path=&quot;/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser&quot; type=&quot;2&quot;/&gt;&#10;&lt;/resources&gt;}"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/eclipse.jdt.core/org.eclipse.jdt.core/scripts/build-parser.xml"/>
<listEntry value="/eclipse.jdt.core/org.eclipse.jdt.core.compiler.batch/scripts/build-parser.xml"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
Expand All @@ -12,9 +12,9 @@
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ant.internal.launching.remote.InternalAntRunner"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jdt.core"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jdt.core.compiler.batch"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.jdt.core/scripts/build-parser.xml}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.jdt.core.compiler.batch/scripts/build-parser.xml}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-DJIKESPG=${JIKESPG}"/>
<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
</launchConfiguration>

0 comments on commit 002b055

Please sign in to comment.