diff --git a/.idea/modules.xml b/.idea/modules.xml index ffd326279..1593991ec 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -5,7 +5,7 @@ - + diff --git a/codeGenExperimental6502/build.gradle b/codeGenExperimental/build.gradle similarity index 100% rename from codeGenExperimental6502/build.gradle rename to codeGenExperimental/build.gradle diff --git a/codeGenExperimental6502/codeGenExperimental6502.iml b/codeGenExperimental/codeGenExperimental.iml similarity index 100% rename from codeGenExperimental6502/codeGenExperimental6502.iml rename to codeGenExperimental/codeGenExperimental.iml diff --git a/codeGenExperimental6502/src/prog8/codegen/experimental6502/AsmGen.kt b/codeGenExperimental/src/prog8/codegen/experimental/AsmGen.kt similarity index 91% rename from codeGenExperimental6502/src/prog8/codegen/experimental6502/AsmGen.kt rename to codeGenExperimental/src/prog8/codegen/experimental/AsmGen.kt index 533f720b9..b0f64d853 100644 --- a/codeGenExperimental6502/src/prog8/codegen/experimental6502/AsmGen.kt +++ b/codeGenExperimental/src/prog8/codegen/experimental/AsmGen.kt @@ -1,4 +1,4 @@ -package prog8.codegen.experimental6502 +package prog8.codegen.experimental import prog8.code.SymbolTable import prog8.code.ast.PtProgram @@ -25,7 +25,7 @@ class AsmGen(internal val program: PtProgram, override fun compileToAssembly(): IAssemblyProgram? { - println("\n** experimental 65(c)02 code generator **\n") + println("\n** experimental code generator **\n") symbolTable.print() symbolTable.flat.forEach { println(it) } diff --git a/codeGenExperimental6502/src/prog8/codegen/experimental6502/AssemblyProgram.kt b/codeGenExperimental/src/prog8/codegen/experimental/AssemblyProgram.kt similarity index 88% rename from codeGenExperimental6502/src/prog8/codegen/experimental6502/AssemblyProgram.kt rename to codeGenExperimental/src/prog8/codegen/experimental/AssemblyProgram.kt index e60d6d068..1f41460a6 100644 --- a/codeGenExperimental6502/src/prog8/codegen/experimental6502/AssemblyProgram.kt +++ b/codeGenExperimental/src/prog8/codegen/experimental/AssemblyProgram.kt @@ -1,4 +1,4 @@ -package prog8.codegen.experimental6502 +package prog8.codegen.experimental import prog8.code.core.CompilationOptions import prog8.code.core.IAssemblyProgram diff --git a/compiler/build.gradle b/compiler/build.gradle index 61e825beb..1da302737 100644 --- a/compiler/build.gradle +++ b/compiler/build.gradle @@ -32,7 +32,7 @@ dependencies { implementation project(':codeOptimizers') implementation project(':compilerAst') implementation project(':codeGenCpu6502') - implementation project(':codeGenExperimental6502') + implementation project(':codeGenExperimental') implementation 'org.antlr:antlr4-runtime:4.9.3' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" // implementation "org.jetbrains.kotlin:kotlin-reflect" diff --git a/compiler/compiler.iml b/compiler/compiler.iml index 46056d941..ff5ec1887 100644 --- a/compiler/compiler.iml +++ b/compiler/compiler.iml @@ -21,6 +21,6 @@ - + \ No newline at end of file diff --git a/compiler/src/prog8/compiler/Compiler.kt b/compiler/src/prog8/compiler/Compiler.kt index 8a56f172e..4ce778e4f 100644 --- a/compiler/src/prog8/compiler/Compiler.kt +++ b/compiler/src/prog8/compiler/Compiler.kt @@ -403,7 +403,7 @@ internal fun asmGeneratorFor(program: Program, // TODO for now, only use the new Intermediary Ast for this experimental codegen: val intermediateAst = IntermediateAstMaker(program).transform() - return prog8.codegen.experimental6502.AsmGen(intermediateAst, errors, symbolTable, options) + return prog8.codegen.experimental.AsmGen(intermediateAst, errors, symbolTable, options) } } else { if (options.compTarget.machine.cpu in arrayOf(CpuType.CPU6502, CpuType.CPU65c02)) diff --git a/parser/antlr/Makefile b/parser/antlr/Makefile index 7f16168e9..a93c9da55 100644 --- a/parser/antlr/Makefile +++ b/parser/antlr/Makefile @@ -1,3 +1,3 @@ parser: - ./antlr.sh -o ../src/prog8/parser -no-listener -no-visitor -package prog8.parser -Dlanguage=Java Prog8ANTLR.g4 + antlr4 -o ../src/prog8/parser -no-listener -no-visitor -package prog8.parser -Dlanguage=Java Prog8ANTLR.g4 diff --git a/parser/antlr/antlr.sh b/parser/antlr/antlr.sh deleted file mode 100755 index b78d9e76b..000000000 --- a/parser/antlr/antlr.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -PROJECT=~/Projects/prog8/compiler/antlr - -export CLASSPATH=".:${PROJECT}/lib/antlr-4.7.1-complete.jar:${CLASSPATH}" -java -jar ${PROJECT}/lib/antlr-4.7.1-complete.jar $* diff --git a/parser/antlr/grun.sh b/parser/antlr/grun.sh deleted file mode 100755 index 8d6713600..000000000 --- a/parser/antlr/grun.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -PROJECT=~/Projects/prog8/compiler/antlr - -export CLASSPATH=".:${PROJECT}/lib/antlr-4.7.1-complete.jar:${CLASSPATH}" -java org.antlr.v4.gui.TestRig $* - diff --git a/scripts/clean.sh b/scripts/clean.sh index 075e6f6e1..1938c9f7d 100755 --- a/scripts/clean.sh +++ b/scripts/clean.sh @@ -2,5 +2,5 @@ rm -f *.bin *.xex *.jar *.asm *.prg *.vm.txt *.vice-mon-list *.list a.out imgui.ini rm -rf build out -rm -rf compiler/build codeGenCpu6502/build codeGenExperimental6502/build codeOptimizers/build compilerAst/build dbusCompilerService/build httpCompilerService/build parser/build +rm -rf compiler/build codeGenCpu6502/build codeGenExperimental/build codeOptimizers/build compilerAst/build dbusCompilerService/build httpCompilerService/build parser/build diff --git a/settings.gradle b/settings.gradle index d55135e79..d0da69186 100644 --- a/settings.gradle +++ b/settings.gradle @@ -5,7 +5,7 @@ include( ':compilerAst', ':codeOptimizers', ':codeGenCpu6502', - ':codeGenExperimental6502', + ':codeGenExperimental', ':compiler', ':dbusCompilerService', ':httpCompilerService'