build of tools bash scripts replaced by gradle build file
authorThomas Walker Lynch <xtujpz@reasoningtechnology.com>
Thu, 12 Sep 2024 02:18:43 +0000 (02:18 +0000)
committerThomas Walker Lynch <xtujpz@reasoningtechnology.com>
Thu, 12 Sep 2024 02:18:43 +0000 (02:18 +0000)
31 files changed:
.gitignore
Erebus/.gitignore [new file with mode: 0644]
build.gradle [new file with mode: 0644]
developer/.gitignore [deleted file]
developer/Erebus/.gitignore [new file with mode: 0644]
developer/Lethe/.githolder [new file with mode: 0644]
developer/Lethe/Hibou_build.gradle [new file with mode: 0644]
developer/Lethe/build.gradle [new file with mode: 0644]
developer/Lethe/make [new file with mode: 0755]
developer/Lethe/makefile-project.mk [new file with mode: 0644]
developer/Lethe/makefile-tool.mk [new file with mode: 0644]
developer/Lethe/makefile-top.mk [new file with mode: 0644]
developer/build.gradle [new file with mode: 0644]
developer/deprecated/.githolder [deleted file]
developer/deprecated/Hibou_build.gradle [deleted file]
developer/deprecated/build.gradle [deleted file]
developer/deprecated/make [deleted file]
developer/deprecated/makefile-project.mk [deleted file]
developer/deprecated/makefile-tool.mk [deleted file]
developer/deprecated/makefile-top.mk [deleted file]
developer/executor/build.gradle [deleted file]
developer/executor/gradle
developer/javac/ANTLR/.gitignore [new file with mode: 0644]
developer/jvm/.gitignore [new file with mode: 0644]
developer/ologist/#emacs.txt# [deleted file]
developer/ologist/emacs.txt
executor/env_dev
ologist/gradle_notes.txt [new file with mode: 0644]
ologist/log.md
settings.gradle
temporary/.gitignore [deleted file]

index 762861f..02b640c 100644 (file)
@@ -4,4 +4,4 @@
 #*#
 *~
 a.out
-
+.gradle/
diff --git a/Erebus/.gitignore b/Erebus/.gitignore
new file mode 100644 (file)
index 0000000..120f485
--- /dev/null
@@ -0,0 +1,2 @@
+*
+!/.gitignore
diff --git a/build.gradle b/build.gradle
new file mode 100644 (file)
index 0000000..ec3a5bb
--- /dev/null
@@ -0,0 +1,145 @@
+
+defaultTasks 'installTools'
+
+/*--------------------------------------------------------------------------------
+
+ Configuration variables
+
+*/
+
+// project structure
+def repoHome    = rootDir
+def toolDir     = "${repoHome}/tool"
+def upstreamDir = "${toolDir}/upstream"
+def executorDir = "${toolDir}/executor"
+def erebusDir   = file("${rootDir}/Erebus")
+
+// tool versions
+def antlrVersion = '4.11.1'
+def jdkVersion   = '22.0.1'
+def jdkBuild     = '8'
+
+// The urls for upstream files
+def antlrUrl = "https://www.antlr.org/download/antlr-${antlrVersion}-complete.jar"
+def jdkUrl = "https://github.com/adoptium/temurin22-binaries/releases/download/jdk-${jdkVersion}%2B${jdkBuild}/OpenJDK22U-jdk_x64_linux_hotspot_${jdkVersion}_${jdkBuild}.tar.gz"
+
+task installAntlr {
+  doLast {
+    def antlrJar = file("${upstreamDir}/antlr-${antlrVersion}-complete.jar")
+    def antlrExecutorJar = file("${executorDir}/antlr-${antlrVersion}-complete.jar")
+
+    mkdir(upstreamDir)
+    mkdir(executorDir)
+
+    if (!antlrJar.exists()) {
+      println "Downloading ANTLR..."
+      new URL(antlrUrl).withInputStream { i -> antlrJar.withOutputStream { it << i } }
+    }
+
+    if (!antlrExecutorJar.exists()) {
+      copy {
+        from antlrJar
+        into executorDir
+      }
+      println "ANTLR installed in executor."
+    } else {
+      println "ANTLR already installed."
+    }
+  }
+}
+
+task installJava {
+  doLast {
+    def jdkTar = file("${upstreamDir}/jdk-${jdkVersion}.tar.gz")
+    def jdkDir = file("${toolDir}/jdk-${jdkVersion}+${jdkBuild}")
+    
+    mkdir(upstreamDir)
+    mkdir(toolDir)
+
+    if (!jdkTar.exists()) {
+      println "Downloading JDK..."
+      new URL(jdkUrl).withInputStream { i -> jdkTar.withOutputStream { it << i } }
+    }
+
+    if (!jdkDir.exists()) {
+      println "Extracting JDK..."
+      copy {
+        from tarTree(resources.gzip(jdkTar))
+        into toolDir
+      }
+      println "JDK installed."
+    } else {
+      println "JDK already installed."
+    }
+
+    // Set JAVA_HOME and test Java installation
+    def javaHome = file("${jdkDir}")
+    if (!javaHome.exists()) {
+      throw new GradleException("JDK extraction failed.")
+    }
+    
+    // variables saved for use in subproject build scripts
+    project.ext.javaHome = jdkDir
+
+    println "Java installation complete."
+  }
+}
+
+// Add a task to install both tools
+task installTools {
+  dependsOn installAntlr, installJava
+}
+
+// Ensure all subprojects depend on the tool installation
+subprojects {
+  afterEvaluate { project ->
+    project.tasks.each { task ->
+      task.dependsOn ':installTools'
+    }
+  }
+}
+
+task cleanTool {
+  description = 'Cleans the installed tools (but not upstream files)'
+  doLast {
+    // Define the directories or files to clean
+    def toolDirs = [
+      file("${rootDir}/tool/bin"),
+      file("${rootDir}/tool/executor"),
+      file("${rootDir}/tool/jdk-22.0.1+8")
+    ]
+
+    // Delete the tool directories
+    toolDirs.each { dir ->
+      if (dir.exists()) {
+        println "Deleting ${dir}..."
+        delete dir
+      }
+    }
+
+    println " ./tool cleaned."
+  }
+}
+
+task cleanErebus {
+  description = "Cleans the project level temporary directory 'Erebus'"  
+  
+  doLast {
+    if (erebusDir.exists()) {
+      erebusDir.eachFile { file ->
+        if (file.name != '.gitignore') {
+          if (file.isDirectory()) {
+            file.deleteDir()
+          } else {
+            file.delete()
+          }
+        }
+      }
+      println "Erebus directory cleaned, except for .gitignore."
+    } else {
+      println "Erebus directory does not exist."
+    }
+  }
+}
+
+
diff --git a/developer/.gitignore b/developer/.gitignore
deleted file mode 100644 (file)
index fd21199..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-
-/jvm/
-/javac/ANTLR/
-/temporary/
-
diff --git a/developer/Erebus/.gitignore b/developer/Erebus/.gitignore
new file mode 100644 (file)
index 0000000..2db43ed
--- /dev/null
@@ -0,0 +1,4 @@
+
+*
+!/.gitignore
+
diff --git a/developer/Lethe/.githolder b/developer/Lethe/.githolder
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/developer/Lethe/Hibou_build.gradle b/developer/Lethe/Hibou_build.gradle
new file mode 100644 (file)
index 0000000..ca38ddd
--- /dev/null
@@ -0,0 +1,106 @@
+task setup {
+  doLast {
+    def dirs = [
+      "$(ANTLR_IN_PRIMARY_DIR)",
+      "$(JAVA_COMP_IN_DIR)",
+      "$(JAVA_COMP_IN_PRIMARY_DIR)",
+      "$(JAVA_COMP_IN_ANTLR_DIR)",
+      "$(JAVA_COMP_IN_SYN_DIR)",
+      "$(JVM_IN_DIR)",
+      "$(EXECUTOR_IN_DIR)",
+      "test",
+      "deprecated",
+      "experiment",
+      "ologist",
+      "temporary"
+    ]
+    dirs.each { dir ->
+      if (!file(dir).exists()) {
+        mkdir dir
+      }
+    }
+  }
+}
+
+def compileJava(source, target) {
+  tasks.create(name: "compile${source}", type: Exec) {
+    commandLine '$(JAVA_COMP)', '-d', '$(JAVA_COMP_OUT_DIR)', '-sourcepath', '$(JAVA_COMP_IN_DL)', source
+    doLast {
+      println "Compiled ${source} to ${target}"
+    }
+  }
+}
+
+def createJar(source, target) {
+  tasks.create(name: "jar${source}", type: Exec) {
+    commandLine '$(JAVA_ARCHIVE)', 'cf', target, '-C', '$(JAVA_COMP_OUT_DIR)', source
+    doLast {
+      println "Created ${target}"
+    }
+  }
+}
+
+def createWrapper(source, target) {
+  tasks.create(name: "wrapper${source}", type: Exec) {
+    doLast {
+      def script = new File(target)
+      script.text = "#!/usr/bin/env bash\n$(JAVA_INTERP) -cp ${CLASSPATH}:${JVM_IN_DP}:${JVM_IN_DP}/${source}.jar ${source} \$@"
+      script.setExecutable(true)
+      println "Created program ${target}"
+    }
+  }
+}
+
+task ANTLR_OUT_FL {
+  dependsOn setup
+  doLast {
+    println "Building ANTLR_OUT_FL..."
+    // Add specific build steps for ANTLR_OUT_FL here
+  }
+}
+
+task all {
+  dependsOn ANTLR_OUT_FL
+  doLast {
+    println "Building all targets..."
+  }
+}
+
+task clean {
+  doLast {
+    println "Use the command `clean <option>` instead of make."
+  }
+}
+
+task version {
+  doLast {
+    println "ANTLR_JAR is '${notdir(ANTLR_JAR)}'"
+    exec {
+      commandLine '$(JAVA_COMP)', '--version'
+    }
+    exec {
+      commandLine '$(JAVA_ARCHIVE)', '--version'
+    }
+    exec {
+      commandLine 'make', '-v'
+    }
+    println "makefile 0.4"
+  }
+}
+
+task nothing {
+  doLast {
+    // useful for distinguishing between make syntax errors and build errors
+  }
+}
+
+tasks.withType(Exec) {
+  doFirst {
+    println "Executing $name"
+  }
+}
+
+// Example usage
+compileJava('$(JAVA_COMP_IN_PRIMARY_DIR)/Example.java', '$(JAVA_COMP_OUT_DIR)/Example.class')
+createJar('Example.class', '$(JAVA_COMP_OUT_DIR)/Example.jar')
+createWrapper('Example', '$(EXECUTOR_IN_DIR)/Example')
diff --git a/developer/Lethe/build.gradle b/developer/Lethe/build.gradle
new file mode 100644 (file)
index 0000000..b5ab4a6
--- /dev/null
@@ -0,0 +1,91 @@
+task setup {
+  doLast {
+    def dirs = ["$(ANTLR_IN_PRIMARY_DIR)", "$(JAVA_COMP_IN_PRIMARY_DIR)", "$(JVM_IN_DIR)", "$(EXECUTOR_IN_DIR)", "test", "deprecated", "experiment", "ologist", "temporary"]
+    dirs.each { dir ->
+      mkdir dir
+    }
+  }
+}
+
+task tool(type: Exec) {
+  dependsOn setup
+  commandLine '$(BIN_MAKE)', '-f', '$(EXECUTOR_IN_DIR)/makefile-tool.mk', '-$(MAKEFLAGS)', 'all'
+}
+
+task project(type: Exec) {
+  dependsOn tool
+  commandLine '$(BIN_MAKE)', '-f', '$(EXECUTOR_IN_DIR)/makefile-project.mk', '-$(MAKEFLAGS)', 'all'
+}
+
+task clean {
+  doLast {
+    println "Use the command `clean <option>` instead of make."
+  }
+}
+
+task version {
+  doLast {
+    println "ANTLR_JAR is '${notdir(ANTLR_JAR)}'"
+    exec {
+      commandLine '$(JAVA_COMP)', '--version'
+    }
+    exec {
+      commandLine '$(JAVA_ARCHIVE)', '--version'
+    }
+    exec {
+      commandLine 'make', '-v'
+    }
+    println "makefile 0.4"
+  }
+}
+
+task all {
+  dependsOn project
+}
+
+task nothing {
+  doLast {
+    // useful for distinguishing between make syntax errors and build errors
+  }
+}
+
+tasks.withType(Exec) {
+  doFirst {
+    println "Executing $name"
+  }
+}
+
+
+----------------------
+// Function to compile .java files to .class files
+def compileJava(source, target) {
+  tasks.create(name: "compile${source}", type: Exec) {
+    commandLine '$(JAVA_COMP)', '-d', '$(JAVA_COMP_OUT_DIR)', '-sourcepath', '$(JAVA_COMP_IN_DL)', source
+    doLast {
+      println "Compiled ${source} to ${target}"
+    }
+  }
+}
+
+// Function to create .jar files from .class files
+def createJar(source, target) {
+  tasks.create(name: "jar${source}", type: Exec) {
+    commandLine '$(JAVA_ARCHIVE)', 'cf', target, '-C', '$(JAVA_COMP_OUT_DIR)', source
+    doLast {
+      println "Created ${target}"
+    }
+  }
+}
+
+// Function to create wrapper scripts from .jar files
+def createWrapper(source, target) {
+  tasks.create(name: "wrapper${source}", type: Exec) {
+    doLast {
+      def script = new File(target)
+      script.text = "#!/usr/bin/env bash\n$(JAVA_INTERP) -cp ${CLASSPATH}:${JVM_IN_DP}:${JVM_IN_DP}/${source}.jar ${source} \$@"
+      script.setExecutable(true)
+      println "Created program ${target}"
+    }
+  }
+}
+  
diff --git a/developer/Lethe/make b/developer/Lethe/make
new file mode 100755 (executable)
index 0000000..714a070
--- /dev/null
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+if [[ -z "${DEVELOPER_HOME}" || -z "${EXECUTOR_IN_DIR}" ]]; then
+  echo "required variables not set. As seen by:"
+  echo "  DEVELOPER_HOME: $DEVELOPER_HOME"
+  echo "  EXECUTOR_IN_DIR: $EXECUTOR_IN_DIR"
+  exit 1
+fi
+
+cd "$DEVELOPER_HOME"
+
+# in case there have been edits to the environment
+source "${EXECUTOR_IN_DIR}"/env_build
+
+${BIN_MAKE} --no-print-directory -f "${EXECUTOR_IN_DIR}"/makefile-top.mk $@
diff --git a/developer/Lethe/makefile-project.mk b/developer/Lethe/makefile-project.mk
new file mode 100644 (file)
index 0000000..ea8a0f3
--- /dev/null
@@ -0,0 +1,250 @@
+#--------------------------------------------------------------------------------
+# Project build
+#
+# GNU makefile
+
+# turn off implicit rules, because they can do unexpected things.
+.SUFFIXES:
+MAKEFLAGS += -r
+
+# `make` considers that PHONY targets do not correspond to files (other
+# targets do and the files have their dates checked). This declaration renders
+# innocuous the "feature" where `make` always tries to make its own
+# makefiles. There is no command line switch to turn this "feature" off.
+.PHONY: $(MAKEFILE_LIST)
+
+# 'make' has a "feature" where it deletes what it determines to be intermediate
+# files. There is no command line switch to turn this "feature" off. Combine
+# this "feature" with implicit rules and have loads of fun.
+.PRECIOUS: $(MAKEFILE_LIST)
+
+#$(info makefile: $(MAKEFILE_LIST))
+#$(info project_MAKECMDGOALS: $(MAKECMDGOALS))
+
+# for recursive make without leaving this makefile
+REMAKE = $(MAKE) -$(MAKEFLAGS) -f $(MAKEFILE_LIST)
+
+#================================================================================
+# Custom make targets
+#
+
+all: $(EXECUTOR_IN_FPL)
+
+
+#-----------------------------------------------
+# These do not require antlr generated java files
+
+RuleNameListRegx: $(EXECUTOR_IN_DIR)/RuleNameListRegx
+RuleNameList: $(EXECUTOR_IN_DIR)/RuleNameList
+
+Synthesize_SyntaxAnnotate_PrintVisitorMethod:\
+  $(JAVA_COMP_IN_PRIMARY_DIR)/StringUtils.java\
+  $(EXECUTOR_IN_DIR)/Synthesize_SyntaxAnnotate_PrintVisitorMethod
+Synthesize_SyntaxAnnotate_PrintVisitor:\
+  $(JAVA_COMP_IN_PRIMARY_DIR)/StringUtils.java\
+  $(JAVA_COMP_IN_PRIMARY_DIR)/Synthesize_SyntaxAnnotate_PrintVisitorMethod.java\
+  $(EXECUTOR_IN_DIR)/Synthesize_SyntaxAnnotate_PrintVisitor
+
+Synthesize_SyntaxAnnotate:\
+  $(JAVA_COMP_IN_PRIMARY_DIR)/StringUtils.java\
+  $(EXECUTOR_IN_DIR)/Synthesize_SyntaxAnnotate
+
+#-----------------------------------------------
+# Arithmetic
+
+ANTLR_OUT_Arithmetic_FPL:= $(shell ANTLR_OUT_FL Arithmetic -path $(ANTLR_OUT_DIR))
+#$(info ANTLR_OUT_Arithmetic_FPL: $(ANTLR_OUT_Arithmetic_FPL))
+Arithmetic_Echo:\
+  $(ANTLR_OUT_Arithmetic_FPL)\
+  $(JAVA_COMP_IN_PRIMARY_DIR)/Arithmetic_Echo_PrintVisitor.java
+       @if [ -z "$(ANTLR_OUT_Arithmetic_FPL)" ]; then \
+         echo "variable ANTLR_OUT_Arithmetic_FPL empty."; \
+         exit 1; \
+       fi
+       $(REMAKE) $(EXECUTOR_IN_DIR)/Arithmetic_Echo
+
+Arithmetic_Echo__Test:\
+  $(ANTLR_OUT_Arithmetic_FPL)\
+  $(JAVA_COMP_IN_PRIMARY_DIR)/Arithmetic_Echo_PrintVisitor.java
+       @if [ -z "$(ANTLR_OUT_Arithmetic_FPL)" ]; then \
+         echo "variable ANTLR_OUT_Arithmetic_FPL empty."; \
+         exit 1; \
+       fi
+       $(REMAKE) $(EXECUTOR_IN_DIR)/Arithmetic_Echo__Test
+
+Arithmetic_SyntaxAnnotate:\
+  $(ANTLR_OUT_Arithmetic_FPL)\
+  $(JAVA_COMP_IN_PRIMARY_DIR)/Arithmetic_SyntaxAnnotate_PrintVisitor.java
+       @if [ -z "$(ANTLR_OUT_Arithmetic_FPL)" ]; then \
+         echo "variable ANTLR_OUT_Arithmetic_FPL empty."; \
+         exit 1; \
+       fi
+       $(REMAKE) $(EXECUTOR_IN_DIR)/Arithmetic_SyntaxAnnotate
+
+Arithmetic_SyntaxAnnotate__Test:\
+  $(ANTLR_OUT_Arithmetic_FPL)\
+  $(JAVA_COMP_IN_PRIMARY_DIR)/Arithmetic_SyntaxAnnotate_PrintVisitor.java
+       @if [ -z "$(ANTLR_OUT_Arithmetic_FPL)" ]; then \
+         echo "variable ANTLR_OUT_Arithmetic_FPL empty."; \
+         exit 1; \
+       fi
+       $(REMAKE) $(EXECUTOR_IN_DIR)/Arithmetic_SyntaxAnnotate__Test
+
+Arithmetic_Swap:\
+  $(ANTLR_OUT_Arithmetic_FPL)\
+  $(JAVA_COMP_IN_PRIMARY_DIR)/Arithmetic_SwapVisitor.java\
+  $(JAVA_COMP_IN_PRIMARY_DIR)/Arithmetic_Echo_PrintVisitor.java
+       @if [ -z "$(ANTLR_OUT_Arithmetic_FPL)" ]; then \
+         echo "variable ANTLR_OUT_Arithmetic_FPL empty."; \
+         exit 1; \
+       fi
+       $(REMAKE) $(EXECUTOR_IN_DIR)/Arithmetic_Swap
+
+#-----------------------------------------------
+# Arithmetic2
+# 
+
+ANTLR_OUT_Arithmetic2_FPL:= $(shell ANTLR_OUT_FL Arithmetic2 -path $(ANTLR_OUT_DIR))
+Arithmetic2_SyntaxAnnotate:\
+  $(ANTLR_OUT_Arithmetic2_FPL)\
+  $(JAVA_COMP_IN_PRIMARY_DIR)/Arithmetic2_SyntaxAnnotate_PrintVisitor.java
+       @if [ -z "$(ANTLR_OUT_Arithmetic2_FPL)" ]; then \
+         echo "variable ANTLR_OUT_Arithmetic2_FPL empty."; \
+         exit 1; \
+       fi
+       $(REMAKE) $(EXECUTOR_IN_DIR)/Arithmetic2_SyntaxAnnotate
+
+Arithmetic2_SyntaxAnnotate__Test:\
+  $(ANTLR_OUT_Arithmetic2_FPL)\
+  $(JAVA_COMP_IN_PRIMARY_DIR)/Arithmetic2_SyntaxAnnotate_PrintVisitor.java
+       @if [ -z "$(ANTLR_OUT_Arithmetic2_FPL)" ]; then \
+         echo "variable ANTLR_OUT_Arithmetic2_FPL empty."; \
+         exit 1; \
+       fi
+       $(REMAKE) $(EXECUTOR_IN_DIR)/Arithmetic2_SyntaxAnnotate__Test
+
+#-----------------------------------------------
+# Parsing/Analyzing ANTLR grammars
+#
+
+ANTLR_OUT_ANTLRv4_FPL:= $(shell ANTLR_OUT_FL ANTLRv4 -path $(ANTLR_OUT_DIR))
+ANTLRv4_SyntaxAnnotate:\
+  $(ANTLR_OUT_ANTLRv4_FPL)\
+  $(JAVA_COMP_IN_PRIMARY_DIR)/ANTLRv4_SyntaxAnnotate_PrintVisitor.java
+       @if [ -z "$(ANTLR_OUT_ANTLRv4_FPL)" ]; then \
+         echo "variable ANTLR_OUT_ANTLRv4_FPL empty."; \
+         exit 1; \
+       fi
+       $(REMAKE) $(EXECUTOR_IN_DIR)/ANTLRv4_SyntaxAnnotate
+
+
+#-----------------------------------------------
+#  GQL_20240412
+
+ANTLR_OUT_GQL_20240412_FPL := $(shell ANTLR_OUT_FL GQL_20240412 -path $(ANTLR_OUT_DIR))
+GQL_20240412_SyntaxAnnotate:\
+  $(ANTLR_OUT_GQL_20240412_FPL)\
+  $(JAVA_COMP_IN_PRIMARY_DIR)/GQL_20240412_SyntaxAnnotate_PrintVisitor.java
+       @if [ -z "$(ANTLR_OUT_GQL_20240412_FPL)" ]; then \
+         echo "variable ANTLR_OUT_GQL_20240412_FPL empty."; \
+         exit 1; \
+       fi
+       $(REMAKE) $(EXECUTOR_IN_DIR)/GQL_20240412_SyntaxAnnotate
+
+GQL_20240412_SyntaxAnnotate__Test: \
+  $(ANTLR_OUT_GQL_20240412_FPL) \
+  $(JAVA_COMP_IN_PRIMARY_DIR)/GQL_20240412_SyntaxAnnotate_PrintVisitor.java
+       @if [ -z "$(ANTLR_OUT_GQL_20240412_FPL)" ]; then \
+         echo "variable ANTLR_OUT_GQL_20240412_FPL empty."; \
+         exit 1; \
+       fi
+       $(REMAKE) $(EXECUTOR_IN_DIR)/GQL_20240412_SyntaxAnnotate__Test
+
+
+TerminalToCategory: 
+       $(REMAKE) $(EXECUTOR_IN_DIR)/TerminalToCategory
+
+GrammarSplitter: 
+       $(REMAKE) $(EXECUTOR_IN_DIR)/GrammarSplitter
+
+#-----------------------------------------------
+# Compile all the .java files.
+
+java: $(JAVA_COMP_OUT_FPL)
+
+
+#================================================================================
+# generic targets, aka recipes
+#
+
+# this section is not parallel make friendly
+# $(ANTLR_OUT_DIR)/%Lexer.java: $(ANTLR_IN_PRIMARY_DIR)/%.g4
+#      $(JAVA_INTERP) -jar $(ANTLR_JAR) -Dlanguage=Java -visitor -o $(ANTLR_OUT_DIR_PARENT) $<
+# $(ANTLR_OUT_DIR)/%Parser.java: $(ANTLR_IN_PRIMARY_DIR)/%.g4
+#      $(JAVA_INTERP) -jar $(ANTLR_JAR) -Dlanguage=Java -visitor -o $(ANTLR_OUT_DIR_PARENT) $<
+# $(ANTLR_OUT_DIR)/%BaseListener.java: $(ANTLR_IN_PRIMARY_DIR)/%.g4
+#      $(JAVA_INTERP) -jar $(ANTLR_JAR) -Dlanguage=Java -visitor -o $(ANTLR_OUT_DIR_PARENT) $<
+# $(ANTLR_OUT_DIR)/%Listener.java: $(ANTLR_IN_PRIMARY_DIR)/%.g4
+#      $(JAVA_INTERP) -jar $(ANTLR_JAR) -Dlanguage=Java -visitor -o $(ANTLR_OUT_DIR_PARENT) $<
+# $(ANTLR_OUT_DIR)/%BaseVisitor.java: $(ANTLR_IN_PRIMARY_DIR)/%.g4
+#      $(JAVA_INTERP) -jar $(ANTLR_JAR) -Dlanguage=Java -visitor -o $(ANTLR_OUT_DIR_PARENT) $<
+# $(ANTLR_OUT_DIR)/%Visitor.java: $(ANTLR_IN_PRIMARY_DIR)/%.g4
+#      $(JAVA_INTERP) -jar $(ANTLR_JAR) -Dlanguage=Java -visitor -o $(ANTLR_OUT_DIR_PARENT) $<
+
+#--------------------
+# for a single `<name>.g4` grammar file
+
+$(ANTLR_OUT_DIR)/%Lexer.java \
+$(ANTLR_OUT_DIR)/%Parser.java \
+$(ANTLR_OUT_DIR)/%BaseListener.java \
+$(ANTLR_OUT_DIR)/%Listener.java \
+$(ANTLR_OUT_DIR)/%BaseVisitor.java \
+$(ANTLR_OUT_DIR)/%Visitor.java: $(ANTLR_IN_PRIMARY_DIR)/%.g4
+       @echo "copiling grammar from:" $<
+       $(JAVA_INTERP) -jar $(ANTLR_JAR) -Dlanguage=Java -visitor -o $(ANTLR_OUT_DIR_PARENT) $<
+
+#--------------------
+# For separate `<mame>Lexer.g4` and `<name>Parser.g4` files.
+# `make` prefers shorter pattern matches, so this should work.
+#
+
+$(ANTLR_OUT_DIR)/LexerAdaptor.java: $(ANTLR_IN_PRIMARY_DIR)/LexerAdaptor.java
+       cp $(ANTLR_IN_PRIMARY_DIR)/LexerAdaptor.java $(ANTLR_OUT_DIR)
+
+$(ANTLR_OUT_DIR)/%Lexer.java: $(ANTLR_IN_PRIMARY_DIR)/%Lexer.g4 $(ANTLR_OUT_DIR)/LexerAdaptor.java
+       @echo "making lexer grammar from:" $<
+       $(JAVA_INTERP) -jar $(ANTLR_JAR) -Dlanguage=Java -visitor -o $(ANTLR_OUT_DIR_PARENT) $<
+
+# Rule for all generated files from Parser.g4
+$(ANTLR_OUT_DIR)/%Parser.java \
+$(ANTLR_OUT_DIR)/%BaseListener.java \
+$(ANTLR_OUT_DIR)/%Listener.java \
+$(ANTLR_OUT_DIR)/%BaseVisitor.java \
+$(ANTLR_OUT_DIR)/%Visitor.java: $(ANTLR_IN_PRIMARY_DIR)/%Parser.g4
+       @echo "making other grammar files from:" $<
+       $(JAVA_INTERP) -jar $(ANTLR_JAR) -Dlanguage=Java -visitor -lib $(ANTLR_OUT_DIR) -o $(ANTLR_OUT_DIR_PARENT) $<
+
+#---------------------
+
+# make .class file from .java file
+$(JAVA_COMP_OUT_DIR)/%.class: $(JAVA_COMP_IN_PRIMARY_DIR)/%.java
+       @echo "Compiling $<..."
+       $(JAVA_COMP) -d $(JAVA_COMP_OUT_DIR) -sourcepath $(JAVA_COMP_IN_DL) $<
+       @echo "Created $@"
+
+# Without this, `make` sees .jar files as intermediate and deletes them.
+.PRECIOUS: $(JAVA_COMP_OUT_DIR)/%.jar
+
+# make .jar from .class file
+$(JAVA_COMP_OUT_DIR)/%.jar: $(JAVA_COMP_OUT_DIR)/%.class
+       @echo "Building $*..."
+       $(JAVA_ARCHIVE) cf $@ -C $(JAVA_COMP_OUT_DIR) $*.class
+       @echo "Created $@"
+
+#make the wrapper script from the .jar file
+$(EXECUTOR_IN_DIR)/%: $(JVM_IN_DIR)/%.jar
+       @echo "Creating program for $*..."
+       @echo "#!/usr/bin/env bash" > $(EXECUTOR_IN_DIR)/$*
+       @echo "$(JAVA_INTERP) -cp ${CLASSPATH}:${JVM_IN_DP}:$(JVM_IN_DP)/$*.jar $*" \$$\@ >> $(EXECUTOR_IN_DIR)/$*
+       chmod +x $(EXECUTOR_IN_DIR)/$*
+       @echo "Created program $(EXECUTOR_IN_DIR)/$*"
diff --git a/developer/Lethe/makefile-tool.mk b/developer/Lethe/makefile-tool.mk
new file mode 100644 (file)
index 0000000..e43278b
--- /dev/null
@@ -0,0 +1,61 @@
+#================================================================================
+# Build the tools that are needed for building the project.
+#
+# GNU makefile
+
+# turn off implicit rules, because they can do unexpected things.
+.SUFFIXES:
+MAKEFLAGS += -r
+
+# `make` considers that PHONY targets do not correspond to files (other
+# targets do and the files have their dates checked). This declaration renders
+# innocuous the "feature" where `make` always tries to make its own
+# makefiles. There is no command line switch to turn this "feature" off.
+.PHONY: $(MAKEFILE_LIST)
+
+# 'make' has a "feature" where it deletes what it determines to be intermediate
+# files. There is no command line switch to turn this "feature" off. Combine
+# this "feature" with implicit rules and have loads of fun.
+.PRECIOUS: $(MAKEFILE_LIST)
+
+#$(info makefile: $(MAKEFILE_LIST))
+#$(info project_MAKECMDGOALS: $(MAKECMDGOALS))
+
+# for recursive make without leaving this makefile
+REMAKE = $(MAKE) -$(MAKEFLAGS) -f $(MAKEFILE_LIST)
+
+#================================================================================
+# Custom make targets
+#
+.PHONY: all ANTLR_OUT_FL
+
+all: ANTLR_OUT_FL
+
+ANTLR_OUT_FL: $(EXECUTOR_IN_DIR)/ANTLR_OUT_FL
+
+#================================================================================
+# generic targets, aka recipes
+#
+
+# Without this, `make` sees .jar files as intermediate and deletes them.
+.PRECIOUS: $(JAVA_COMP_OUT_DIR)/%.jar
+
+# make .class file from .java file
+$(JAVA_COMP_OUT_DIR)/%.class: $(JAVA_COMP_IN_PRIMARY_DIR)/%.java
+       @echo "Compiling $<..."
+       $(JAVA_COMP) -d $(JAVA_COMP_OUT_DIR) -sourcepath $(JAVA_COMP_IN_DL) $<
+       @echo "Created $@"
+
+# make .jar from .class file
+$(JAVA_COMP_OUT_DIR)/%.jar: $(JAVA_COMP_OUT_DIR)/%.class
+       @echo "Building $*..."
+       $(JAVA_ARCHIVE) cf $@ -C $(JAVA_COMP_OUT_DIR) $*.class
+       @echo "Created $@"
+
+#make the wrapper script from the .jar file
+$(EXECUTOR_IN_DIR)/%: $(JVM_IN_DIR)/%.jar
+       @echo "Creating program for $*..."
+       @echo "#!/usr/bin/env bash" > $(EXECUTOR_IN_DIR)/$*
+       @echo "$(JAVA_INTERP) -cp ${CLASSPATH}:${JVM_IN_DP}:$(JVM_IN_DP)/$*.jar $*" \$$\@ >> $(EXECUTOR_IN_DIR)/$*
+       chmod +x $(EXECUTOR_IN_DIR)/$*
+       @echo "Created program $(EXECUTOR_IN_DIR)/$*"
diff --git a/developer/Lethe/makefile-top.mk b/developer/Lethe/makefile-top.mk
new file mode 100644 (file)
index 0000000..0642609
--- /dev/null
@@ -0,0 +1,62 @@
+#================================================================================
+# top level makefile calls makefile-tool and makefile-project
+#
+# GNU makefile
+
+# turn off implicit rules, because they can do unexpected things.
+.SUFFIXES:
+MAKEFLAGS += -r
+
+# `make` considers that PHONY targets do not correspond to files (other
+# targets do and the files have their dates checked). This declaration renders
+# innocuous the "feature" where `make` always tries to make its own
+# makefiles. There is no command line switch to turn this "feature" off.
+.PHONY: $(MAKEFILE_LIST)
+
+# 'make' has a "feature" where it deletes what it determines to be intermediate
+# files. There is no command line switch to turn this "feature" off. Combine
+# this "feature" with implicit rules and have loads of fun.
+.PRECIOUS: $(MAKEFILE_LIST)
+
+#$(info makefile: $(MAKEFILE_LIST))
+#$(info project_MAKECMDGOALS: $(MAKECMDGOALS))
+
+# for recursive make without leaving this makefile
+REMAKE = $(MAKE) -$(MAKEFLAGS) -f $(MAKEFILE_LIST)
+
+#================================================================================
+# Custom make targets
+#
+.PHONY: all nothing version clean setup
+
+all: project-all
+
+# useful for distinguishing between make syntax errors and build errors
+nothing:
+       @:
+
+version:
+       $(info ANTLR_JAR is '$(notdir $(ANTLR_JAR))')
+       @ $(JAVA_COMP) --version
+       @ $(JAVA_ARCHIVE) --version
+       @ make -v | head -n 1
+       @ echo "makefile 0.4"
+
+# `clean` is program independent of `make`
+clean:
+       @echo "Use the command `clean <option>` instead of make.`"
+
+setup:
+       mkdir -p $(ANTLR_IN_PRIMARY_DIR) $(JAVA_COMP_IN_PRIMARY_DIR) $(JVM_IN_DIR) $(EXECUTOR_IN_DIR) test deprecated experiment ologist temporary
+
+# Ensure tools are built before building the project programs
+tool-%: setup
+       $(BIN_MAKE) -f $(EXECUTOR_IN_DIR)/makefile-tool.mk -$(MAKEFLAGS) $*
+
+project-%: tool-all
+       $(BIN_MAKE) -f $(EXECUTOR_IN_DIR)/makefile-project.mk -$(MAKEFLAGS) $*
+
+# delegate other targets to the project
+%: project-%
+       @:
+
diff --git a/developer/build.gradle b/developer/build.gradle
new file mode 100644 (file)
index 0000000..e53add0
--- /dev/null
@@ -0,0 +1,71 @@
+task setup {
+  doLast {
+    def dirs = [
+      "$(ANTLR_IN_PRIMARY_DIR)"
+      ,"$(JAVA_COMP_IN_DIR)"
+      ,"$(JAVA_COMP_IN_PRIMARY_DIR)"
+      ,"$(JAVA_COMP_IN_ANTLR_DIR)"
+      ,"$(JAVA_COMP_IN_SYN_DIR)"
+      ,"$(JVM_IN_DIR)"
+      ,"$(EXECUTOR_IN_DIR)"
+      ,"test"
+      ,"deprecated"
+      ,"experiment"
+      ,"ologist"
+      ,"temporary"
+    ]
+    dirs.each { dir ->
+      if (!file(dir).exists()) {
+        mkdir dir
+      }
+    }
+  }
+}
+
+task tool(type: Exec) {
+  dependsOn setup
+  commandLine '$(BIN_MAKE)', '-f', '$(EXECUTOR_IN_DIR)/makefile-tool.mk', '-$(MAKEFLAGS)', 'all'
+}
+
+task project(type: Exec) {
+  dependsOn tool
+  commandLine '$(BIN_MAKE)', '-f', '$(EXECUTOR_IN_DIR)/makefile-project.mk', '-$(MAKEFLAGS)', 'all'
+}
+
+task clean {
+  doLast {
+    println "Use the command `clean <option>` instead of make."
+  }
+}
+
+task version {
+  doLast {
+    println "ANTLR_JAR is '${notdir(ANTLR_JAR)}'"
+    exec {
+      commandLine '$(JAVA_COMP)', '--version'
+    }
+    exec {
+      commandLine '$(JAVA_ARCHIVE)', '--version'
+    }
+    exec {
+      commandLine 'make', '-v'
+    }
+    println "makefile 0.4"
+  }
+}
+
+task all {
+  dependsOn project
+}
+
+task nothing {
+  doLast {
+    // useful for distinguishing between make syntax errors and build errors
+  }
+}
+
+tasks.withType(Exec) {
+  doFirst {
+    println "Executing $name"
+  }
+}
diff --git a/developer/deprecated/.githolder b/developer/deprecated/.githolder
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/developer/deprecated/Hibou_build.gradle b/developer/deprecated/Hibou_build.gradle
deleted file mode 100644 (file)
index ca38ddd..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-task setup {
-  doLast {
-    def dirs = [
-      "$(ANTLR_IN_PRIMARY_DIR)",
-      "$(JAVA_COMP_IN_DIR)",
-      "$(JAVA_COMP_IN_PRIMARY_DIR)",
-      "$(JAVA_COMP_IN_ANTLR_DIR)",
-      "$(JAVA_COMP_IN_SYN_DIR)",
-      "$(JVM_IN_DIR)",
-      "$(EXECUTOR_IN_DIR)",
-      "test",
-      "deprecated",
-      "experiment",
-      "ologist",
-      "temporary"
-    ]
-    dirs.each { dir ->
-      if (!file(dir).exists()) {
-        mkdir dir
-      }
-    }
-  }
-}
-
-def compileJava(source, target) {
-  tasks.create(name: "compile${source}", type: Exec) {
-    commandLine '$(JAVA_COMP)', '-d', '$(JAVA_COMP_OUT_DIR)', '-sourcepath', '$(JAVA_COMP_IN_DL)', source
-    doLast {
-      println "Compiled ${source} to ${target}"
-    }
-  }
-}
-
-def createJar(source, target) {
-  tasks.create(name: "jar${source}", type: Exec) {
-    commandLine '$(JAVA_ARCHIVE)', 'cf', target, '-C', '$(JAVA_COMP_OUT_DIR)', source
-    doLast {
-      println "Created ${target}"
-    }
-  }
-}
-
-def createWrapper(source, target) {
-  tasks.create(name: "wrapper${source}", type: Exec) {
-    doLast {
-      def script = new File(target)
-      script.text = "#!/usr/bin/env bash\n$(JAVA_INTERP) -cp ${CLASSPATH}:${JVM_IN_DP}:${JVM_IN_DP}/${source}.jar ${source} \$@"
-      script.setExecutable(true)
-      println "Created program ${target}"
-    }
-  }
-}
-
-task ANTLR_OUT_FL {
-  dependsOn setup
-  doLast {
-    println "Building ANTLR_OUT_FL..."
-    // Add specific build steps for ANTLR_OUT_FL here
-  }
-}
-
-task all {
-  dependsOn ANTLR_OUT_FL
-  doLast {
-    println "Building all targets..."
-  }
-}
-
-task clean {
-  doLast {
-    println "Use the command `clean <option>` instead of make."
-  }
-}
-
-task version {
-  doLast {
-    println "ANTLR_JAR is '${notdir(ANTLR_JAR)}'"
-    exec {
-      commandLine '$(JAVA_COMP)', '--version'
-    }
-    exec {
-      commandLine '$(JAVA_ARCHIVE)', '--version'
-    }
-    exec {
-      commandLine 'make', '-v'
-    }
-    println "makefile 0.4"
-  }
-}
-
-task nothing {
-  doLast {
-    // useful for distinguishing between make syntax errors and build errors
-  }
-}
-
-tasks.withType(Exec) {
-  doFirst {
-    println "Executing $name"
-  }
-}
-
-// Example usage
-compileJava('$(JAVA_COMP_IN_PRIMARY_DIR)/Example.java', '$(JAVA_COMP_OUT_DIR)/Example.class')
-createJar('Example.class', '$(JAVA_COMP_OUT_DIR)/Example.jar')
-createWrapper('Example', '$(EXECUTOR_IN_DIR)/Example')
diff --git a/developer/deprecated/build.gradle b/developer/deprecated/build.gradle
deleted file mode 100644 (file)
index b5ab4a6..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-task setup {
-  doLast {
-    def dirs = ["$(ANTLR_IN_PRIMARY_DIR)", "$(JAVA_COMP_IN_PRIMARY_DIR)", "$(JVM_IN_DIR)", "$(EXECUTOR_IN_DIR)", "test", "deprecated", "experiment", "ologist", "temporary"]
-    dirs.each { dir ->
-      mkdir dir
-    }
-  }
-}
-
-task tool(type: Exec) {
-  dependsOn setup
-  commandLine '$(BIN_MAKE)', '-f', '$(EXECUTOR_IN_DIR)/makefile-tool.mk', '-$(MAKEFLAGS)', 'all'
-}
-
-task project(type: Exec) {
-  dependsOn tool
-  commandLine '$(BIN_MAKE)', '-f', '$(EXECUTOR_IN_DIR)/makefile-project.mk', '-$(MAKEFLAGS)', 'all'
-}
-
-task clean {
-  doLast {
-    println "Use the command `clean <option>` instead of make."
-  }
-}
-
-task version {
-  doLast {
-    println "ANTLR_JAR is '${notdir(ANTLR_JAR)}'"
-    exec {
-      commandLine '$(JAVA_COMP)', '--version'
-    }
-    exec {
-      commandLine '$(JAVA_ARCHIVE)', '--version'
-    }
-    exec {
-      commandLine 'make', '-v'
-    }
-    println "makefile 0.4"
-  }
-}
-
-task all {
-  dependsOn project
-}
-
-task nothing {
-  doLast {
-    // useful for distinguishing between make syntax errors and build errors
-  }
-}
-
-tasks.withType(Exec) {
-  doFirst {
-    println "Executing $name"
-  }
-}
-
-
-----------------------
-// Function to compile .java files to .class files
-def compileJava(source, target) {
-  tasks.create(name: "compile${source}", type: Exec) {
-    commandLine '$(JAVA_COMP)', '-d', '$(JAVA_COMP_OUT_DIR)', '-sourcepath', '$(JAVA_COMP_IN_DL)', source
-    doLast {
-      println "Compiled ${source} to ${target}"
-    }
-  }
-}
-
-// Function to create .jar files from .class files
-def createJar(source, target) {
-  tasks.create(name: "jar${source}", type: Exec) {
-    commandLine '$(JAVA_ARCHIVE)', 'cf', target, '-C', '$(JAVA_COMP_OUT_DIR)', source
-    doLast {
-      println "Created ${target}"
-    }
-  }
-}
-
-// Function to create wrapper scripts from .jar files
-def createWrapper(source, target) {
-  tasks.create(name: "wrapper${source}", type: Exec) {
-    doLast {
-      def script = new File(target)
-      script.text = "#!/usr/bin/env bash\n$(JAVA_INTERP) -cp ${CLASSPATH}:${JVM_IN_DP}:${JVM_IN_DP}/${source}.jar ${source} \$@"
-      script.setExecutable(true)
-      println "Created program ${target}"
-    }
-  }
-}
-  
diff --git a/developer/deprecated/make b/developer/deprecated/make
deleted file mode 100755 (executable)
index 714a070..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env bash
-
-if [[ -z "${DEVELOPER_HOME}" || -z "${EXECUTOR_IN_DIR}" ]]; then
-  echo "required variables not set. As seen by:"
-  echo "  DEVELOPER_HOME: $DEVELOPER_HOME"
-  echo "  EXECUTOR_IN_DIR: $EXECUTOR_IN_DIR"
-  exit 1
-fi
-
-cd "$DEVELOPER_HOME"
-
-# in case there have been edits to the environment
-source "${EXECUTOR_IN_DIR}"/env_build
-
-${BIN_MAKE} --no-print-directory -f "${EXECUTOR_IN_DIR}"/makefile-top.mk $@
diff --git a/developer/deprecated/makefile-project.mk b/developer/deprecated/makefile-project.mk
deleted file mode 100644 (file)
index ea8a0f3..0000000
+++ /dev/null
@@ -1,250 +0,0 @@
-#--------------------------------------------------------------------------------
-# Project build
-#
-# GNU makefile
-
-# turn off implicit rules, because they can do unexpected things.
-.SUFFIXES:
-MAKEFLAGS += -r
-
-# `make` considers that PHONY targets do not correspond to files (other
-# targets do and the files have their dates checked). This declaration renders
-# innocuous the "feature" where `make` always tries to make its own
-# makefiles. There is no command line switch to turn this "feature" off.
-.PHONY: $(MAKEFILE_LIST)
-
-# 'make' has a "feature" where it deletes what it determines to be intermediate
-# files. There is no command line switch to turn this "feature" off. Combine
-# this "feature" with implicit rules and have loads of fun.
-.PRECIOUS: $(MAKEFILE_LIST)
-
-#$(info makefile: $(MAKEFILE_LIST))
-#$(info project_MAKECMDGOALS: $(MAKECMDGOALS))
-
-# for recursive make without leaving this makefile
-REMAKE = $(MAKE) -$(MAKEFLAGS) -f $(MAKEFILE_LIST)
-
-#================================================================================
-# Custom make targets
-#
-
-all: $(EXECUTOR_IN_FPL)
-
-
-#-----------------------------------------------
-# These do not require antlr generated java files
-
-RuleNameListRegx: $(EXECUTOR_IN_DIR)/RuleNameListRegx
-RuleNameList: $(EXECUTOR_IN_DIR)/RuleNameList
-
-Synthesize_SyntaxAnnotate_PrintVisitorMethod:\
-  $(JAVA_COMP_IN_PRIMARY_DIR)/StringUtils.java\
-  $(EXECUTOR_IN_DIR)/Synthesize_SyntaxAnnotate_PrintVisitorMethod
-Synthesize_SyntaxAnnotate_PrintVisitor:\
-  $(JAVA_COMP_IN_PRIMARY_DIR)/StringUtils.java\
-  $(JAVA_COMP_IN_PRIMARY_DIR)/Synthesize_SyntaxAnnotate_PrintVisitorMethod.java\
-  $(EXECUTOR_IN_DIR)/Synthesize_SyntaxAnnotate_PrintVisitor
-
-Synthesize_SyntaxAnnotate:\
-  $(JAVA_COMP_IN_PRIMARY_DIR)/StringUtils.java\
-  $(EXECUTOR_IN_DIR)/Synthesize_SyntaxAnnotate
-
-#-----------------------------------------------
-# Arithmetic
-
-ANTLR_OUT_Arithmetic_FPL:= $(shell ANTLR_OUT_FL Arithmetic -path $(ANTLR_OUT_DIR))
-#$(info ANTLR_OUT_Arithmetic_FPL: $(ANTLR_OUT_Arithmetic_FPL))
-Arithmetic_Echo:\
-  $(ANTLR_OUT_Arithmetic_FPL)\
-  $(JAVA_COMP_IN_PRIMARY_DIR)/Arithmetic_Echo_PrintVisitor.java
-       @if [ -z "$(ANTLR_OUT_Arithmetic_FPL)" ]; then \
-         echo "variable ANTLR_OUT_Arithmetic_FPL empty."; \
-         exit 1; \
-       fi
-       $(REMAKE) $(EXECUTOR_IN_DIR)/Arithmetic_Echo
-
-Arithmetic_Echo__Test:\
-  $(ANTLR_OUT_Arithmetic_FPL)\
-  $(JAVA_COMP_IN_PRIMARY_DIR)/Arithmetic_Echo_PrintVisitor.java
-       @if [ -z "$(ANTLR_OUT_Arithmetic_FPL)" ]; then \
-         echo "variable ANTLR_OUT_Arithmetic_FPL empty."; \
-         exit 1; \
-       fi
-       $(REMAKE) $(EXECUTOR_IN_DIR)/Arithmetic_Echo__Test
-
-Arithmetic_SyntaxAnnotate:\
-  $(ANTLR_OUT_Arithmetic_FPL)\
-  $(JAVA_COMP_IN_PRIMARY_DIR)/Arithmetic_SyntaxAnnotate_PrintVisitor.java
-       @if [ -z "$(ANTLR_OUT_Arithmetic_FPL)" ]; then \
-         echo "variable ANTLR_OUT_Arithmetic_FPL empty."; \
-         exit 1; \
-       fi
-       $(REMAKE) $(EXECUTOR_IN_DIR)/Arithmetic_SyntaxAnnotate
-
-Arithmetic_SyntaxAnnotate__Test:\
-  $(ANTLR_OUT_Arithmetic_FPL)\
-  $(JAVA_COMP_IN_PRIMARY_DIR)/Arithmetic_SyntaxAnnotate_PrintVisitor.java
-       @if [ -z "$(ANTLR_OUT_Arithmetic_FPL)" ]; then \
-         echo "variable ANTLR_OUT_Arithmetic_FPL empty."; \
-         exit 1; \
-       fi
-       $(REMAKE) $(EXECUTOR_IN_DIR)/Arithmetic_SyntaxAnnotate__Test
-
-Arithmetic_Swap:\
-  $(ANTLR_OUT_Arithmetic_FPL)\
-  $(JAVA_COMP_IN_PRIMARY_DIR)/Arithmetic_SwapVisitor.java\
-  $(JAVA_COMP_IN_PRIMARY_DIR)/Arithmetic_Echo_PrintVisitor.java
-       @if [ -z "$(ANTLR_OUT_Arithmetic_FPL)" ]; then \
-         echo "variable ANTLR_OUT_Arithmetic_FPL empty."; \
-         exit 1; \
-       fi
-       $(REMAKE) $(EXECUTOR_IN_DIR)/Arithmetic_Swap
-
-#-----------------------------------------------
-# Arithmetic2
-# 
-
-ANTLR_OUT_Arithmetic2_FPL:= $(shell ANTLR_OUT_FL Arithmetic2 -path $(ANTLR_OUT_DIR))
-Arithmetic2_SyntaxAnnotate:\
-  $(ANTLR_OUT_Arithmetic2_FPL)\
-  $(JAVA_COMP_IN_PRIMARY_DIR)/Arithmetic2_SyntaxAnnotate_PrintVisitor.java
-       @if [ -z "$(ANTLR_OUT_Arithmetic2_FPL)" ]; then \
-         echo "variable ANTLR_OUT_Arithmetic2_FPL empty."; \
-         exit 1; \
-       fi
-       $(REMAKE) $(EXECUTOR_IN_DIR)/Arithmetic2_SyntaxAnnotate
-
-Arithmetic2_SyntaxAnnotate__Test:\
-  $(ANTLR_OUT_Arithmetic2_FPL)\
-  $(JAVA_COMP_IN_PRIMARY_DIR)/Arithmetic2_SyntaxAnnotate_PrintVisitor.java
-       @if [ -z "$(ANTLR_OUT_Arithmetic2_FPL)" ]; then \
-         echo "variable ANTLR_OUT_Arithmetic2_FPL empty."; \
-         exit 1; \
-       fi
-       $(REMAKE) $(EXECUTOR_IN_DIR)/Arithmetic2_SyntaxAnnotate__Test
-
-#-----------------------------------------------
-# Parsing/Analyzing ANTLR grammars
-#
-
-ANTLR_OUT_ANTLRv4_FPL:= $(shell ANTLR_OUT_FL ANTLRv4 -path $(ANTLR_OUT_DIR))
-ANTLRv4_SyntaxAnnotate:\
-  $(ANTLR_OUT_ANTLRv4_FPL)\
-  $(JAVA_COMP_IN_PRIMARY_DIR)/ANTLRv4_SyntaxAnnotate_PrintVisitor.java
-       @if [ -z "$(ANTLR_OUT_ANTLRv4_FPL)" ]; then \
-         echo "variable ANTLR_OUT_ANTLRv4_FPL empty."; \
-         exit 1; \
-       fi
-       $(REMAKE) $(EXECUTOR_IN_DIR)/ANTLRv4_SyntaxAnnotate
-
-
-#-----------------------------------------------
-#  GQL_20240412
-
-ANTLR_OUT_GQL_20240412_FPL := $(shell ANTLR_OUT_FL GQL_20240412 -path $(ANTLR_OUT_DIR))
-GQL_20240412_SyntaxAnnotate:\
-  $(ANTLR_OUT_GQL_20240412_FPL)\
-  $(JAVA_COMP_IN_PRIMARY_DIR)/GQL_20240412_SyntaxAnnotate_PrintVisitor.java
-       @if [ -z "$(ANTLR_OUT_GQL_20240412_FPL)" ]; then \
-         echo "variable ANTLR_OUT_GQL_20240412_FPL empty."; \
-         exit 1; \
-       fi
-       $(REMAKE) $(EXECUTOR_IN_DIR)/GQL_20240412_SyntaxAnnotate
-
-GQL_20240412_SyntaxAnnotate__Test: \
-  $(ANTLR_OUT_GQL_20240412_FPL) \
-  $(JAVA_COMP_IN_PRIMARY_DIR)/GQL_20240412_SyntaxAnnotate_PrintVisitor.java
-       @if [ -z "$(ANTLR_OUT_GQL_20240412_FPL)" ]; then \
-         echo "variable ANTLR_OUT_GQL_20240412_FPL empty."; \
-         exit 1; \
-       fi
-       $(REMAKE) $(EXECUTOR_IN_DIR)/GQL_20240412_SyntaxAnnotate__Test
-
-
-TerminalToCategory: 
-       $(REMAKE) $(EXECUTOR_IN_DIR)/TerminalToCategory
-
-GrammarSplitter: 
-       $(REMAKE) $(EXECUTOR_IN_DIR)/GrammarSplitter
-
-#-----------------------------------------------
-# Compile all the .java files.
-
-java: $(JAVA_COMP_OUT_FPL)
-
-
-#================================================================================
-# generic targets, aka recipes
-#
-
-# this section is not parallel make friendly
-# $(ANTLR_OUT_DIR)/%Lexer.java: $(ANTLR_IN_PRIMARY_DIR)/%.g4
-#      $(JAVA_INTERP) -jar $(ANTLR_JAR) -Dlanguage=Java -visitor -o $(ANTLR_OUT_DIR_PARENT) $<
-# $(ANTLR_OUT_DIR)/%Parser.java: $(ANTLR_IN_PRIMARY_DIR)/%.g4
-#      $(JAVA_INTERP) -jar $(ANTLR_JAR) -Dlanguage=Java -visitor -o $(ANTLR_OUT_DIR_PARENT) $<
-# $(ANTLR_OUT_DIR)/%BaseListener.java: $(ANTLR_IN_PRIMARY_DIR)/%.g4
-#      $(JAVA_INTERP) -jar $(ANTLR_JAR) -Dlanguage=Java -visitor -o $(ANTLR_OUT_DIR_PARENT) $<
-# $(ANTLR_OUT_DIR)/%Listener.java: $(ANTLR_IN_PRIMARY_DIR)/%.g4
-#      $(JAVA_INTERP) -jar $(ANTLR_JAR) -Dlanguage=Java -visitor -o $(ANTLR_OUT_DIR_PARENT) $<
-# $(ANTLR_OUT_DIR)/%BaseVisitor.java: $(ANTLR_IN_PRIMARY_DIR)/%.g4
-#      $(JAVA_INTERP) -jar $(ANTLR_JAR) -Dlanguage=Java -visitor -o $(ANTLR_OUT_DIR_PARENT) $<
-# $(ANTLR_OUT_DIR)/%Visitor.java: $(ANTLR_IN_PRIMARY_DIR)/%.g4
-#      $(JAVA_INTERP) -jar $(ANTLR_JAR) -Dlanguage=Java -visitor -o $(ANTLR_OUT_DIR_PARENT) $<
-
-#--------------------
-# for a single `<name>.g4` grammar file
-
-$(ANTLR_OUT_DIR)/%Lexer.java \
-$(ANTLR_OUT_DIR)/%Parser.java \
-$(ANTLR_OUT_DIR)/%BaseListener.java \
-$(ANTLR_OUT_DIR)/%Listener.java \
-$(ANTLR_OUT_DIR)/%BaseVisitor.java \
-$(ANTLR_OUT_DIR)/%Visitor.java: $(ANTLR_IN_PRIMARY_DIR)/%.g4
-       @echo "copiling grammar from:" $<
-       $(JAVA_INTERP) -jar $(ANTLR_JAR) -Dlanguage=Java -visitor -o $(ANTLR_OUT_DIR_PARENT) $<
-
-#--------------------
-# For separate `<mame>Lexer.g4` and `<name>Parser.g4` files.
-# `make` prefers shorter pattern matches, so this should work.
-#
-
-$(ANTLR_OUT_DIR)/LexerAdaptor.java: $(ANTLR_IN_PRIMARY_DIR)/LexerAdaptor.java
-       cp $(ANTLR_IN_PRIMARY_DIR)/LexerAdaptor.java $(ANTLR_OUT_DIR)
-
-$(ANTLR_OUT_DIR)/%Lexer.java: $(ANTLR_IN_PRIMARY_DIR)/%Lexer.g4 $(ANTLR_OUT_DIR)/LexerAdaptor.java
-       @echo "making lexer grammar from:" $<
-       $(JAVA_INTERP) -jar $(ANTLR_JAR) -Dlanguage=Java -visitor -o $(ANTLR_OUT_DIR_PARENT) $<
-
-# Rule for all generated files from Parser.g4
-$(ANTLR_OUT_DIR)/%Parser.java \
-$(ANTLR_OUT_DIR)/%BaseListener.java \
-$(ANTLR_OUT_DIR)/%Listener.java \
-$(ANTLR_OUT_DIR)/%BaseVisitor.java \
-$(ANTLR_OUT_DIR)/%Visitor.java: $(ANTLR_IN_PRIMARY_DIR)/%Parser.g4
-       @echo "making other grammar files from:" $<
-       $(JAVA_INTERP) -jar $(ANTLR_JAR) -Dlanguage=Java -visitor -lib $(ANTLR_OUT_DIR) -o $(ANTLR_OUT_DIR_PARENT) $<
-
-#---------------------
-
-# make .class file from .java file
-$(JAVA_COMP_OUT_DIR)/%.class: $(JAVA_COMP_IN_PRIMARY_DIR)/%.java
-       @echo "Compiling $<..."
-       $(JAVA_COMP) -d $(JAVA_COMP_OUT_DIR) -sourcepath $(JAVA_COMP_IN_DL) $<
-       @echo "Created $@"
-
-# Without this, `make` sees .jar files as intermediate and deletes them.
-.PRECIOUS: $(JAVA_COMP_OUT_DIR)/%.jar
-
-# make .jar from .class file
-$(JAVA_COMP_OUT_DIR)/%.jar: $(JAVA_COMP_OUT_DIR)/%.class
-       @echo "Building $*..."
-       $(JAVA_ARCHIVE) cf $@ -C $(JAVA_COMP_OUT_DIR) $*.class
-       @echo "Created $@"
-
-#make the wrapper script from the .jar file
-$(EXECUTOR_IN_DIR)/%: $(JVM_IN_DIR)/%.jar
-       @echo "Creating program for $*..."
-       @echo "#!/usr/bin/env bash" > $(EXECUTOR_IN_DIR)/$*
-       @echo "$(JAVA_INTERP) -cp ${CLASSPATH}:${JVM_IN_DP}:$(JVM_IN_DP)/$*.jar $*" \$$\@ >> $(EXECUTOR_IN_DIR)/$*
-       chmod +x $(EXECUTOR_IN_DIR)/$*
-       @echo "Created program $(EXECUTOR_IN_DIR)/$*"
diff --git a/developer/deprecated/makefile-tool.mk b/developer/deprecated/makefile-tool.mk
deleted file mode 100644 (file)
index e43278b..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#================================================================================
-# Build the tools that are needed for building the project.
-#
-# GNU makefile
-
-# turn off implicit rules, because they can do unexpected things.
-.SUFFIXES:
-MAKEFLAGS += -r
-
-# `make` considers that PHONY targets do not correspond to files (other
-# targets do and the files have their dates checked). This declaration renders
-# innocuous the "feature" where `make` always tries to make its own
-# makefiles. There is no command line switch to turn this "feature" off.
-.PHONY: $(MAKEFILE_LIST)
-
-# 'make' has a "feature" where it deletes what it determines to be intermediate
-# files. There is no command line switch to turn this "feature" off. Combine
-# this "feature" with implicit rules and have loads of fun.
-.PRECIOUS: $(MAKEFILE_LIST)
-
-#$(info makefile: $(MAKEFILE_LIST))
-#$(info project_MAKECMDGOALS: $(MAKECMDGOALS))
-
-# for recursive make without leaving this makefile
-REMAKE = $(MAKE) -$(MAKEFLAGS) -f $(MAKEFILE_LIST)
-
-#================================================================================
-# Custom make targets
-#
-.PHONY: all ANTLR_OUT_FL
-
-all: ANTLR_OUT_FL
-
-ANTLR_OUT_FL: $(EXECUTOR_IN_DIR)/ANTLR_OUT_FL
-
-#================================================================================
-# generic targets, aka recipes
-#
-
-# Without this, `make` sees .jar files as intermediate and deletes them.
-.PRECIOUS: $(JAVA_COMP_OUT_DIR)/%.jar
-
-# make .class file from .java file
-$(JAVA_COMP_OUT_DIR)/%.class: $(JAVA_COMP_IN_PRIMARY_DIR)/%.java
-       @echo "Compiling $<..."
-       $(JAVA_COMP) -d $(JAVA_COMP_OUT_DIR) -sourcepath $(JAVA_COMP_IN_DL) $<
-       @echo "Created $@"
-
-# make .jar from .class file
-$(JAVA_COMP_OUT_DIR)/%.jar: $(JAVA_COMP_OUT_DIR)/%.class
-       @echo "Building $*..."
-       $(JAVA_ARCHIVE) cf $@ -C $(JAVA_COMP_OUT_DIR) $*.class
-       @echo "Created $@"
-
-#make the wrapper script from the .jar file
-$(EXECUTOR_IN_DIR)/%: $(JVM_IN_DIR)/%.jar
-       @echo "Creating program for $*..."
-       @echo "#!/usr/bin/env bash" > $(EXECUTOR_IN_DIR)/$*
-       @echo "$(JAVA_INTERP) -cp ${CLASSPATH}:${JVM_IN_DP}:$(JVM_IN_DP)/$*.jar $*" \$$\@ >> $(EXECUTOR_IN_DIR)/$*
-       chmod +x $(EXECUTOR_IN_DIR)/$*
-       @echo "Created program $(EXECUTOR_IN_DIR)/$*"
diff --git a/developer/deprecated/makefile-top.mk b/developer/deprecated/makefile-top.mk
deleted file mode 100644 (file)
index 0642609..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-#================================================================================
-# top level makefile calls makefile-tool and makefile-project
-#
-# GNU makefile
-
-# turn off implicit rules, because they can do unexpected things.
-.SUFFIXES:
-MAKEFLAGS += -r
-
-# `make` considers that PHONY targets do not correspond to files (other
-# targets do and the files have their dates checked). This declaration renders
-# innocuous the "feature" where `make` always tries to make its own
-# makefiles. There is no command line switch to turn this "feature" off.
-.PHONY: $(MAKEFILE_LIST)
-
-# 'make' has a "feature" where it deletes what it determines to be intermediate
-# files. There is no command line switch to turn this "feature" off. Combine
-# this "feature" with implicit rules and have loads of fun.
-.PRECIOUS: $(MAKEFILE_LIST)
-
-#$(info makefile: $(MAKEFILE_LIST))
-#$(info project_MAKECMDGOALS: $(MAKECMDGOALS))
-
-# for recursive make without leaving this makefile
-REMAKE = $(MAKE) -$(MAKEFLAGS) -f $(MAKEFILE_LIST)
-
-#================================================================================
-# Custom make targets
-#
-.PHONY: all nothing version clean setup
-
-all: project-all
-
-# useful for distinguishing between make syntax errors and build errors
-nothing:
-       @:
-
-version:
-       $(info ANTLR_JAR is '$(notdir $(ANTLR_JAR))')
-       @ $(JAVA_COMP) --version
-       @ $(JAVA_ARCHIVE) --version
-       @ make -v | head -n 1
-       @ echo "makefile 0.4"
-
-# `clean` is program independent of `make`
-clean:
-       @echo "Use the command `clean <option>` instead of make.`"
-
-setup:
-       mkdir -p $(ANTLR_IN_PRIMARY_DIR) $(JAVA_COMP_IN_PRIMARY_DIR) $(JVM_IN_DIR) $(EXECUTOR_IN_DIR) test deprecated experiment ologist temporary
-
-# Ensure tools are built before building the project programs
-tool-%: setup
-       $(BIN_MAKE) -f $(EXECUTOR_IN_DIR)/makefile-tool.mk -$(MAKEFLAGS) $*
-
-project-%: tool-all
-       $(BIN_MAKE) -f $(EXECUTOR_IN_DIR)/makefile-project.mk -$(MAKEFLAGS) $*
-
-# delegate other targets to the project
-%: project-%
-       @:
-
diff --git a/developer/executor/build.gradle b/developer/executor/build.gradle
deleted file mode 100644 (file)
index e53add0..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-task setup {
-  doLast {
-    def dirs = [
-      "$(ANTLR_IN_PRIMARY_DIR)"
-      ,"$(JAVA_COMP_IN_DIR)"
-      ,"$(JAVA_COMP_IN_PRIMARY_DIR)"
-      ,"$(JAVA_COMP_IN_ANTLR_DIR)"
-      ,"$(JAVA_COMP_IN_SYN_DIR)"
-      ,"$(JVM_IN_DIR)"
-      ,"$(EXECUTOR_IN_DIR)"
-      ,"test"
-      ,"deprecated"
-      ,"experiment"
-      ,"ologist"
-      ,"temporary"
-    ]
-    dirs.each { dir ->
-      if (!file(dir).exists()) {
-        mkdir dir
-      }
-    }
-  }
-}
-
-task tool(type: Exec) {
-  dependsOn setup
-  commandLine '$(BIN_MAKE)', '-f', '$(EXECUTOR_IN_DIR)/makefile-tool.mk', '-$(MAKEFLAGS)', 'all'
-}
-
-task project(type: Exec) {
-  dependsOn tool
-  commandLine '$(BIN_MAKE)', '-f', '$(EXECUTOR_IN_DIR)/makefile-project.mk', '-$(MAKEFLAGS)', 'all'
-}
-
-task clean {
-  doLast {
-    println "Use the command `clean <option>` instead of make."
-  }
-}
-
-task version {
-  doLast {
-    println "ANTLR_JAR is '${notdir(ANTLR_JAR)}'"
-    exec {
-      commandLine '$(JAVA_COMP)', '--version'
-    }
-    exec {
-      commandLine '$(JAVA_ARCHIVE)', '--version'
-    }
-    exec {
-      commandLine 'make', '-v'
-    }
-    println "makefile 0.4"
-  }
-}
-
-task all {
-  dependsOn project
-}
-
-task nothing {
-  doLast {
-    // useful for distinguishing between make syntax errors and build errors
-  }
-}
-
-tasks.withType(Exec) {
-  doFirst {
-    println "Executing $name"
-  }
-}
index 9bd00ef..60ca7d7 100755 (executable)
@@ -12,4 +12,4 @@ cd "$DEVELOPER_HOME"
 # in case there have been edits to the environment
 source "${EXECUTOR_IN_DIR}"/env_build
 
-"${GRADLE_HOME}"/bin/gradle -b "${EXECUTOR_IN_DIR}"/build.gradle "$@"
+"${GRADLE_HOME}"/bin/gradle --project-dir ${REPO_HOME} "$@"
diff --git a/developer/javac/ANTLR/.gitignore b/developer/javac/ANTLR/.gitignore
new file mode 100644 (file)
index 0000000..2db43ed
--- /dev/null
@@ -0,0 +1,4 @@
+
+*
+!/.gitignore
+
diff --git a/developer/jvm/.gitignore b/developer/jvm/.gitignore
new file mode 100644 (file)
index 0000000..2db43ed
--- /dev/null
@@ -0,0 +1,4 @@
+
+*
+!/.gitignore
+
diff --git a/developer/ologist/#emacs.txt# b/developer/ologist/#emacs.txt#
deleted file mode 100644 (file)
index 7eaf367..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-antlr-mode.el -> .emacs.d
-(autoload 'antlr-mode "antlr-mode" "Major mode for editing ANTLR grammars." t)
-(add-to-list 'auto-mode-alist '("\\.g4\\'" . antlr-mode))
-
-un M-x package-install gradle-mode.
-(require 'gradle-mode)
-(gradle-mode 1)
-
-C-c C-g b to run gradle build
-C-c C-g t to run gradle test
-C-c C-g s to run a single test
-C-c C-g d to run a Gradle command with the daemon
-
-Run M-x package-install RET groovy-mode RET.
-(require 'groovy-mode)
-(add-to-list 'auto-mode-alist '("\\.gradle\\'" . groovy-mode))
-
-(electric-indent-mode 1)
-Run M-x package-install RET auto-indent-mode RET.
-
-(require 'auto-indent-mode)
-(auto-indent-global-mode)
-
-
-(defun my-groovy-mode-hook ()
-  (setq groovy-indent-offset 2))  ;; Set indentation level to 2 spaces
-
-(add-hook 'groovy-mode-hook 'my-groovy-mode-hook)
\ No newline at end of file
index c7b6404..ba4be63 100644 (file)
@@ -13,12 +13,22 @@ C-c C-g t to run gradle test
 C-c C-g s to run a single test
 C-c C-g d to run a Gradle command with the daemon
 
-Run M-x package-install RET groovy-mode RET.
+(package-install groovy-mode)
 (require 'groovy-mode)
 (add-to-list 'auto-mode-alist '("\\.gradle\\'" . groovy-mode))
 
-(electric-indent-mode 1)
-Run M-x package-install RET auto-indent-mode RET.
 
+;; buffer must be reloaded for it to work
+(package-install 'auto-indent-mode)
 (require 'auto-indent-mode)
-(auto-indent-global-mode)
+
+(add-hook 'groovy-mode-hook 'auto-indent-mode)
+(add-hook 'groovy-mode-hook
+  (lambda ()
+    (setq tab-width 2)
+    (setq groovy-indent-offset 2)
+    (auto-indent-mode t))) ;; Enable auto-indent-mode
+
+(electric-indent-mode 1)
+(auto-indent-global-mode nil)
+
index 20983a4..fa64f82 100644 (file)
@@ -13,21 +13,14 @@ if [ -z "$REPO_HOME" ]; then
 fi
 
 export DEVELOPER_HOME="$REPO_HOME/developer"
-
-export JAVA_HOME="$REPO_HOME/tool/jdk-22.0.1+8"
 export GRADLE_HOME="$REPO_HOME/tool/gradle-8.10-rc-1"
-export ANTLR_JAR="$REPO_HOME/tool/executor/antlr-4.11.1-complete.jar"
 
 export PATH=\
 "$DEVELOPER_HOME"/executor\
 :"$REPO_HOME"/tool/executor\
-:"$JAVA_HOME"/bin\
 :"$GRADLE_HOME"/bin\
 :"$PATH"
 
-export GRADLE_OPTS="--settings-file $REPO_HOME/settings.gradle"
-
-
 cd "$DEVELOPER_HOME"
 
 # This is helpful so that cut and paste from the makefile to the shell can be used for testing.
diff --git a/ologist/gradle_notes.txt b/ologist/gradle_notes.txt
new file mode 100644 (file)
index 0000000..c09e2a2
--- /dev/null
@@ -0,0 +1,30 @@
+
+gradle
+
+1. This is risky software.
+
+  It searches for its files, thus traverses the directory tree.
+
+  It access the internet for data.
+
+  The installer downloads binaries from the site. It is not distributed as a repo
+  with Fedora, Debian, or .. anything else.
+
+  It has access to everyone's projects. Big honeypot.
+
+
+2. Java
+
+  Gradle is a Java program so it needs the JVM to run.  
+
+  Gradle is being used to install most of the tools. 
+
+    It does not install  Gradle of course.  There is a bash script for that.
+
+    We assume that Gradle is using a version of Java on the system. But it will
+    still install a specific version of Java required by the project build.
+    `gradle.parameters` sets the version number for the build Java.  The build
+    Java will be installed under the 'tools' directory.
+    
+
+
index e421a8e..2dc2a77 100644 (file)
@@ -28,4 +28,22 @@ a pretty good job of that already.)
   categories were created manually. I wonder if categories are necessary, but
   they can't hurt, and as they are done I will keep them.
   
+2024-09-11
+
+  I have tried, have a working example of, a synthesis approach, where one
+  program synthesizes another program that does the syntax annotation. 
+
+  Also worked on reducing the GQL grammar by abstracting it. For example
+  creating one token that stands for all terminal symbols. Though not sure what
+  the advantage is of working with the abstracted grammar instead of the
+  original, as we will have to make a distinction among the various rules that
+  collapsed together before generating the output.
+
+  Now trying to apply rewrite rules to transform tree T0 to tree T1.
+
+  Make does not chain pattern rules, which is causing problems. Everyone in
+  Javaland apparently is using Maven or Gradle, so switching over to Gradle.
   
+
+<!--  LocalWords:  Javaland Gradle
+ -->
index bd233ed..9f75513 100644 (file)
@@ -1,3 +1,4 @@
 
+// settings.gradle
 rootProject.name = 'GQL_to_Cypher'
 
diff --git a/temporary/.gitignore b/temporary/.gitignore
deleted file mode 100644 (file)
index 120f485..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-!/.gitignore