1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-04-22 03:38:31 +00:00

Removed support for pc parameter on inline kickasm Closes ,

This commit is contained in:
jespergravgaard 2020-06-22 08:16:47 +02:00
parent 3692797650
commit f027b58a16
15 changed files with 80 additions and 111 deletions

@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: com.ibm.icu:icu4j:58.2">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/ibm/icu/icu4j/58.2/icu4j-58.2.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/ibm/icu/icu4j/58.2/icu4j-58.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/ibm/icu/icu4j/58.2/icu4j-58.2-sources.jar!/" />
</SOURCES>
</library>
</component>

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Maven: com.ibm.icu:icu4j:61.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/ibm/icu/icu4j/61.1/icu4j-61.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/ibm/icu/icu4j/61.1/icu4j-61.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/ibm/icu/icu4j/61.1/icu4j-61.1-sources.jar!/" />
</SOURCES>
</library>
</component>

@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: org.antlr:ST4:4.0.8">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/ST4/4.0.8/ST4-4.0.8.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/ST4/4.0.8/ST4-4.0.8-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/ST4/4.0.8/ST4-4.0.8-sources.jar!/" />
</SOURCES>
</library>
</component>

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Maven: org.antlr:ST4:4.3">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/ST4/4.3/ST4-4.3.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/ST4/4.3/ST4-4.3-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/ST4/4.3/ST4-4.3-sources.jar!/" />
</SOURCES>
</library>
</component>

@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: org.antlr:antlr4:4.7.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4/4.7.1/antlr4-4.7.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4/4.7.1/antlr4-4.7.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4/4.7.1/antlr4-4.7.1-sources.jar!/" />
</SOURCES>
</library>
</component>

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Maven: org.antlr:antlr4:4.8-1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4/4.8-1/antlr4-4.8-1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4/4.8-1/antlr4-4.8-1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4/4.8-1/antlr4-4.8-1-sources.jar!/" />
</SOURCES>
</library>
</component>

@ -1,13 +1,13 @@
<component name="libraryTable">
<library name="Maven: org.antlr:antlr4-runtime:4.7.1">
<library name="Maven: org.antlr:antlr4-runtime:4.8-1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4-runtime/4.7.1/antlr4-runtime-4.7.1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4-runtime/4.8-1/antlr4-runtime-4.8-1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4-runtime/4.7.1/antlr4-runtime-4.7.1-javadoc.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4-runtime/4.8-1/antlr4-runtime-4.8-1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4-runtime/4.7.1/antlr4-runtime-4.7.1-sources.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4-runtime/4.8-1/antlr4-runtime-4.8-1-sources.jar!/" />
</SOURCES>
</library>
</component>

@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: org.antlr:antlr-runtime:3.5.2">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2-sources.jar!/" />
</SOURCES>
</library>
</component>

@ -1,32 +0,0 @@
<component name="libraryTable">
<library name="org.antlr:antlr4:4.7.1" type="repository">
<properties maven-id="org.antlr:antlr4:4.7.1" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4/4.7.1/antlr4-4.7.1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4-runtime/4.7.1/antlr4-runtime-4.7.1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/ST4/4.0.8/ST4-4.0.8.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/abego/treelayout/org.abego.treelayout.core/1.0.3/org.abego.treelayout.core-1.0.3.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/javax.json/1.0.4/javax.json-1.0.4.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/com/ibm/icu/icu4j/58.2/icu4j-58.2.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4/4.7.1/antlr4-4.7.1-javadoc.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4-runtime/4.7.1/antlr4-runtime-4.7.1-javadoc.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2-javadoc.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/ST4/4.0.8/ST4-4.0.8-javadoc.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/abego/treelayout/org.abego.treelayout.core/1.0.3/org.abego.treelayout.core-1.0.3-javadoc.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/javax.json/1.0.4/javax.json-1.0.4-javadoc.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/com/ibm/icu/icu4j/58.2/icu4j-58.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4/4.7.1/antlr4-4.7.1-sources.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4-runtime/4.7.1/antlr4-runtime-4.7.1-sources.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2-sources.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/ST4/4.0.8/ST4-4.0.8-sources.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/abego/treelayout/org.abego.treelayout.core/1.0.3/org.abego.treelayout.core-1.0.3-sources.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/javax.json/1.0.4/javax.json-1.0.4-sources.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/com/ibm/icu/icu4j/58.2/icu4j-58.2-sources.jar!/" />
</SOURCES>
</library>
</component>

@ -1,14 +0,0 @@
<component name="libraryTable">
<library name="org.antlr:antlr4-runtime:4.7.1" type="repository">
<properties maven-id="org.antlr:antlr4-runtime:4.7.1" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4-runtime/4.7.1/antlr4-runtime-4.7.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4-runtime/4.7.1/antlr4-runtime-4.7.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4-runtime/4.7.1/antlr4-runtime-4.7.1-sources.jar!/" />
</SOURCES>
</library>
</component>

10
.idea/misc.xml generated

@ -13,6 +13,16 @@
<option name="language" value="" />
<option name="generateVisitor" value="true" />
</PerGrammarGenerationSettings>
<PerGrammarGenerationSettings>
<option name="fileName" value="$PROJECT_DIR$/src/main/java/dk/camelot64/kickc/parser/KickCLexer.g4" />
<option name="autoGen" value="true" />
<option name="outputDir" value="$PROJECT_DIR$/src/main/java" />
<option name="libDir" value="" />
<option name="encoding" value="" />
<option name="pkg" value="" />
<option name="language" value="" />
<option name="generateVisitor" value="true" />
</PerGrammarGenerationSettings>
</list>
</option>
</component>

@ -11,14 +11,11 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="org.antlr:antlr4:4.7.1" level="project" />
<orderEntry type="library" name="org.antlr:antlr4-runtime:4.7.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.antlr:antlr4:4.7.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.antlr:antlr-runtime:3.5.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.antlr:ST4:4.0.8" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.antlr:antlr4:4.8-1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.antlr:ST4:4.3" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.abego.treelayout:org.abego.treelayout.core:1.0.3" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.ibm.icu:icu4j:58.2" level="project" />
<orderEntry type="library" name="Maven: org.antlr:antlr4-runtime:4.7.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.ibm.icu:icu4j:61.1" level="project" />
<orderEntry type="library" name="Maven: org.antlr:antlr4-runtime:4.8-1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" name="Maven: cml.kickass:kickassembler:5.15" level="project" />

@ -27,13 +27,13 @@
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4</artifactId>
<version>4.7.1</version>
<version>4.8-1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>4.7.1</version>
<version>4.8-1</version>
</dependency>
<dependency>
<groupId>junit</groupId>

@ -3358,6 +3358,11 @@ public class TestPrograms {
compileAndCompare("test-kasm-pc.c");
}
@Test
public void testKasmPcError() throws IOException, URISyntaxException {
assertError("test-kasm-pc-error.c", "mismatched input 'pc' expecting");
}
@Test
public void testKasm() throws IOException, URISyntaxException {
compileAndCompare("test-kasm.c");

@ -0,0 +1,16 @@
// Test inline KickAssembler code with PC location specification
char* const TABLE = 0x2000;
kickasm(pc TABLE) {{
.byte 1, 2, 3
}};
void main() {
byte* BORDER_COLOR = $d020;
byte i=0;
while(true) {
*BORDER_COLOR = TABLE[i++];
}
}