From a6e1f2cade6e82eb251cba22330246891633cd2e Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Tue, 21 Nov 2017 00:30:16 +0100 Subject: [PATCH] Working on support for signed bytes. Syntax done, very simple program working - explicit casting needed, better asm fragment management needed --- .../kickc/fragment/AsmFragmentManager.java | 58 +- .../kickc/fragment/AsmFragmentSignature.java | 21 +- .../kickc/fragment/asm/asby=coby1.asm | 1 + .../fragment/asm/asby_lt_coby1_then_la1.asm | 6 + .../asm/cowo1_derefidx_zpby1=asby.asm | 2 + .../kickc/fragment/asm/zpsby1=_inc_zpsby1.asm | 1 + .../dk/camelot64/kickc/model/Registers.java | 90 +- .../kickc/model/SymbolTypeBasic.java | 4 + .../kickc/model/SymbolTypeInference.java | 4 + .../kickc/model/VariableUnversioned.java | 12 - .../java/dk/camelot64/kickc/parser/KickC.g4 | 1 + .../dk/camelot64/kickc/parser/KickC.tokens | 96 ++- .../kickc/parser/KickCBaseListener.java | 12 + .../kickc/parser/KickCBaseVisitor.java | 7 + .../dk/camelot64/kickc/parser/KickCLexer.java | 529 ++++++------ .../camelot64/kickc/parser/KickCLexer.tokens | 96 ++- .../camelot64/kickc/parser/KickCListener.java | 12 + .../camelot64/kickc/parser/KickCParser.java | 806 +++++++++--------- .../camelot64/kickc/parser/KickCVisitor.java | 7 + .../Pass1GenerateStatementSequence.java | 5 + .../kickc/passes/Pass4CodeGeneration.java | 2 +- ...ass4RegisterUpliftPotentialInitialize.java | 7 + .../kickc/passes/Pass4RegistersFinalize.java | 2 + .../dk/camelot64/kickc/test/TestPrograms.java | 4 + .../dk/camelot64/kickc/test/signed-bytes.kc | 12 + .../java/dk/camelot64/kickc/test/wordexpr.kc | 2 +- 26 files changed, 1032 insertions(+), 767 deletions(-) create mode 100644 src/main/java/dk/camelot64/kickc/fragment/asm/asby=coby1.asm create mode 100644 src/main/java/dk/camelot64/kickc/fragment/asm/asby_lt_coby1_then_la1.asm create mode 100644 src/main/java/dk/camelot64/kickc/fragment/asm/cowo1_derefidx_zpby1=asby.asm create mode 100644 src/main/java/dk/camelot64/kickc/fragment/asm/zpsby1=_inc_zpsby1.asm create mode 100644 src/main/java/dk/camelot64/kickc/test/signed-bytes.kc diff --git a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentManager.java b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentManager.java index f53af89e3..f224f5345 100644 --- a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentManager.java +++ b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentManager.java @@ -126,6 +126,14 @@ public class AsmFragmentManager { return result; } } + if (signature.startsWith("zpsby1=")) { + String subSignature = regexpRewriteSignature(signature, "zpsby1=(.*)", "asby=$1").replace("zpsby2", "zpsby1").replace("zpsby3", "zpsby2"); + CharStream subCharStream = loadOrSynthesizeFragment(subSignature); + if (subCharStream != null) { + CharStream result = CharStreams.fromString(subCharStream.toString().replace("zpsby2", "zpsby3").replace("zpsby1", "zpbsy2") + "\nsta {zpsby1}\n"); + return result; + } + } if (signature.startsWith("_deref_zpptrby1=")) { String subSignature = regexpRewriteSignature(signature, "_deref_zpptrby1=(.*)", "aby=$1").replace("zpptrby2", "zpptrby1").replace("zpptrby3", "zpptrby2"); CharStream subCharStream = loadOrSynthesizeFragment(subSignature); @@ -142,14 +150,6 @@ public class AsmFragmentManager { return result; } } - if (signature.startsWith("_deref_cowo1_neq_") && !signature.contains("aby")) { - String subSignature = regexpRewriteSignature(signature, "_deref_cowo1_neq_(.*)", "aby_neq_$1").replace("cowo2", "cowo1").replace("cowo3", "cowo2").replace("coby2", "coby1").replace("coby3", "coby2"); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString("lda {cowo1}\n"+subCharStream.toString().replace("cowo2", "cowo3").replace("cowo1", "cowo2").replace("coby2", "coby3").replace("coby1", "coby2")); - return result; - } - } if (signature.contains("=zpby1_") && !signature.matches(".*=.*aby.*")) { String subSignature = regexpRewriteSignature(signature, "(.*)=zpby1_(.*)", "$1=aby_$2").replace("zpby2", "zpby1").replace("zpby3", "zpby2"); CharStream subCharStream = loadOrSynthesizeFragment(subSignature); @@ -158,6 +158,22 @@ public class AsmFragmentManager { return result; } } + if (signature.contains("=zpsby1_") && !signature.matches(".*=.*asby.*") && !signature.matches(".*=.*aby.*")) { + String subSignature = regexpRewriteSignature(signature, "(.*)=zpsby1_(.*)", "$1=asby_$2").replace("zpsby2", "zpsby1").replace("zpsby3", "zpsby2"); + CharStream subCharStream = loadOrSynthesizeFragment(subSignature); + if (subCharStream != null) { + CharStream result = CharStreams.fromString("lda {zpsby1}\n"+subCharStream.toString().replace("zpsby2", "zpsby3").replace("zpsby1", "zpsby2")); + return result; + } + } + if (signature.contains("=zpsby1") && !signature.matches(".*=.*asby") && !signature.matches(".*=.*aby")) { + String subSignature = regexpRewriteSignature(signature, "(.*)=zpsby1", "$1=asby").replace("zpsby2", "zpsby1").replace("zpsby3", "zpsby2"); + CharStream subCharStream = loadOrSynthesizeFragment(subSignature); + if (subCharStream != null) { + CharStream result = CharStreams.fromString("lda {zpsby1}\n"+subCharStream.toString().replace("zpsby2", "zpsby3").replace("zpsby1", "zpsby2")); + return result; + } + } if (signature.contains("=xby_") && !signature.matches(".*=.*aby.*")) { String subSignature = regexpRewriteSignature(signature, "(.*)=xby_(.*)", "$1=aby_$2"); CharStream subCharStream = loadOrSynthesizeFragment(subSignature); @@ -223,6 +239,32 @@ public class AsmFragmentManager { } } + // TODO: Find a more general replacement method for comparators! + if (signature.startsWith("_deref_cowo1_neq_") && !signature.contains("aby")) { + String subSignature = regexpRewriteSignature(signature, "_deref_cowo1_neq_(.*)", "aby_neq_$1").replace("cowo2", "cowo1").replace("cowo3", "cowo2").replace("coby2", "coby1").replace("coby3", "coby2"); + CharStream subCharStream = loadOrSynthesizeFragment(subSignature); + if (subCharStream != null) { + CharStream result = CharStreams.fromString("lda {cowo1}\n"+subCharStream.toString().replace("cowo2", "cowo3").replace("cowo1", "cowo2").replace("coby2", "coby3").replace("coby1", "coby2")); + return result; + } + } + if (signature.startsWith("zpsby1_lt_") && !signature.contains("aby") && !signature.contains("asby")) { + String subSignature = regexpRewriteSignature(signature, "zpsby1_lt_(.*)", "asby_lt_$1").replace("zpsby2", "zpsby1").replace("zpsby3", "zpsby2"); + CharStream subCharStream = loadOrSynthesizeFragment(subSignature); + if (subCharStream != null) { + CharStream result = CharStreams.fromString("lda {zpsby1}\n"+subCharStream.toString().replace("zpsby2", "zpsby3").replace("zpsby1", "zpbsy2")); + return result; + } + } + if (signature.startsWith("zpby1_lt_") && !signature.contains("aby") && !signature.contains("asby")) { + String subSignature = regexpRewriteSignature(signature, "zpby1_lt_(.*)", "aby_lt_$1").replace("zpby2", "zpby1").replace("zpby3", "zpby2"); + CharStream subCharStream = loadOrSynthesizeFragment(subSignature); + if (subCharStream != null) { + CharStream result = CharStreams.fromString("lda {zpby1}\n"+subCharStream.toString().replace("zpby2", "zpby3").replace("zpby1", "zpby2")); + return result; + } + } + return null; } diff --git a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentSignature.java b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentSignature.java index 8867901a1..0fa427612 100644 --- a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentSignature.java +++ b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentSignature.java @@ -66,7 +66,7 @@ public class AsmFragmentSignature { Variable assignmentRValue2Var = program.getSymbolInfos().getVariable(assignmentRValue2); Registers.Register rVal2Register = assignmentRValue2Var.getAllocation(); - if (!rVal2Register.getType().equals(Registers.RegisterType.REG_ALU_BYTE)) { + if (!rVal2Register.getType().equals(Registers.RegisterType.REG_ALU)) { throw new AsmFragment.AluNotApplicableException("Error! ALU register only allowed as rValue2. " + assignment); } StringBuilder signature = new StringBuilder(); @@ -237,6 +237,7 @@ public class AsmFragmentSignature { * Zero page register name indexing. */ private int nextZpByteIdx = 1; + private int nextZpSByteIdx = 1; private int nextZpWordIdx = 1; private int nextZpBoolIdx = 1; private int nextZpPtrIdx = 1; @@ -290,6 +291,10 @@ public class AsmFragmentSignature { String name = "zpby" + nextZpByteIdx++; bindings.put(name, value); return name; + } else if (Registers.RegisterType.ZP_SBYTE.equals(register.getType())) { + String name = "zpsby" + nextZpSByteIdx++; + bindings.put(name, value); + return name; } else if (Registers.RegisterType.ZP_WORD.equals(register.getType())) { String name = "zpwo" + nextZpWordIdx++; bindings.put(name, value); @@ -310,11 +315,23 @@ public class AsmFragmentSignature { String name = "aby"; bindings.put(name, value); return name; + } else if (Registers.RegisterType.REG_X_SBYTE.equals(register.getType())) { + String name = "xsby"; + bindings.put(name, value); + return name; + } else if (Registers.RegisterType.REG_Y_SBYTE.equals(register.getType())) { + String name = "ysby"; + bindings.put(name, value); + return name; + } else if (Registers.RegisterType.REG_A_SBYTE.equals(register.getType())) { + String name = "asby"; + bindings.put(name, value); + return name; } else if (Registers.RegisterType.ZP_PTR_BYTE.equals(register.getType())) { String name = "zpptrby" + nextZpPtrIdx++; bindings.put(name, value); return name; - } else if (Registers.RegisterType.REG_ALU_BYTE.equals(register.getType())) { + } else if (Registers.RegisterType.REG_ALU.equals(register.getType())) { throw new AsmFragment.AluNotApplicableException(); } } else if (value instanceof ConstantVar) { diff --git a/src/main/java/dk/camelot64/kickc/fragment/asm/asby=coby1.asm b/src/main/java/dk/camelot64/kickc/fragment/asm/asby=coby1.asm new file mode 100644 index 000000000..bd3d863e1 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/fragment/asm/asby=coby1.asm @@ -0,0 +1 @@ +lda #{coby1} \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/fragment/asm/asby_lt_coby1_then_la1.asm b/src/main/java/dk/camelot64/kickc/fragment/asm/asby_lt_coby1_then_la1.asm new file mode 100644 index 000000000..6248a79c1 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/fragment/asm/asby_lt_coby1_then_la1.asm @@ -0,0 +1,6 @@ +sec +sbc #{coby1} +bvc !+ +eor #$80 +!: +bmi {la1} \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/fragment/asm/cowo1_derefidx_zpby1=asby.asm b/src/main/java/dk/camelot64/kickc/fragment/asm/cowo1_derefidx_zpby1=asby.asm new file mode 100644 index 000000000..1c9294ab6 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/fragment/asm/cowo1_derefidx_zpby1=asby.asm @@ -0,0 +1,2 @@ +ldx {zpby1} +sta {cowo1},x \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/fragment/asm/zpsby1=_inc_zpsby1.asm b/src/main/java/dk/camelot64/kickc/fragment/asm/zpsby1=_inc_zpsby1.asm new file mode 100644 index 000000000..26c2fa4b2 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/fragment/asm/zpsby1=_inc_zpsby1.asm @@ -0,0 +1 @@ +inc {zpsby1} \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/model/Registers.java b/src/main/java/dk/camelot64/kickc/model/Registers.java index 91d66ce34..9ade365d6 100644 --- a/src/main/java/dk/camelot64/kickc/model/Registers.java +++ b/src/main/java/dk/camelot64/kickc/model/Registers.java @@ -16,13 +16,33 @@ public class Registers { return new RegisterAByte(); } + public static Register getRegisterASigned() { + return new RegisterASignedByte(); + } + + public static Register getRegisterXSigned() { + return new RegisterXSignedByte(); + } + + public static Register getRegisterYSigned() { + return new RegisterYSignedByte(); + } + public static Register getRegisterALU() { return new RegisterALUByte(); } /** The register type. */ public enum RegisterType { - ZP_BYTE, ZP_BOOL, REG_A_BYTE, REG_ALU_BYTE, REG_Y_BYTE, REG_X_BYTE, ZP_PTR_BYTE, ZP_WORD, CONSTANT + REG_A_BYTE, REG_A_SBYTE, + REG_Y_BYTE, REG_Y_SBYTE, + REG_X_BYTE, REG_X_SBYTE, + REG_ALU, + ZP_BYTE, ZP_SBYTE, + ZP_PTR_BYTE, + ZP_WORD, + ZP_BOOL, + CONSTANT } /** A register used for storing a single variable. */ @@ -83,7 +103,7 @@ public class Registers { } - /** A zero page address used as a register for a single byte variable. */ + /** A zero page address used as a register for a single unsigned byte variable. */ public static class RegisterZpByte extends RegisterZp { public RegisterZpByte(int zp) { @@ -98,7 +118,22 @@ public class Registers { } - /** Two zero page addresses used as a register for a single word variable. */ + /** A zero page address used as a register for a single signed byte variable. */ + public static class RegisterZpSignedByte extends RegisterZp { + + public RegisterZpSignedByte(int zp) { + super(zp); + } + + @Override + public RegisterType getType() { + return RegisterType.ZP_SBYTE; + } + + + } + + /** Two zero page addresses used as a register for a single unsigned word variable. */ public static class RegisterZpWord extends RegisterZp { public RegisterZpWord(int zp) { @@ -127,7 +162,7 @@ public class Registers { } - /** A zro page address pair used as a register containing a pointer to a byte. */ + /** A zero page address pair used as a register containing a pointer to a byte. */ public static class RegisterZpPointerByte extends RegisterZp { public RegisterZpPointerByte(int zp) { @@ -206,7 +241,7 @@ public class Registers { } - /** The Y register. */ + /** The A unsigned register. */ public static class RegisterAByte extends RegisterCpuByte { @Override public RegisterType getType() { @@ -220,11 +255,54 @@ public class Registers { } + /** The A signed register. */ + public static class RegisterASignedByte extends RegisterCpuByte { + @Override + public RegisterType getType() { + return RegisterType.REG_A_SBYTE; + } + + @Override + public String toString() { + return "reg sbyte a"; + } + + } + + /** The X signed register. */ + public static class RegisterXSignedByte extends RegisterCpuByte { + @Override + public RegisterType getType() { + return RegisterType.REG_X_SBYTE; + } + + @Override + public String toString() { + return "reg sbyte x"; + } + + } + + /** The Y signed register. */ + public static class RegisterYSignedByte extends RegisterCpuByte { + @Override + public RegisterType getType() { + return RegisterType.REG_Y_SBYTE; + } + + @Override + public String toString() { + return "reg sbyte y"; + } + + } + + /** The special ALU register. */ public static class RegisterALUByte extends RegisterCpuByte { @Override public RegisterType getType() { - return RegisterType.REG_ALU_BYTE; + return RegisterType.REG_ALU; } @Override diff --git a/src/main/java/dk/camelot64/kickc/model/SymbolTypeBasic.java b/src/main/java/dk/camelot64/kickc/model/SymbolTypeBasic.java index bc591ad79..43f28bc89 100644 --- a/src/main/java/dk/camelot64/kickc/model/SymbolTypeBasic.java +++ b/src/main/java/dk/camelot64/kickc/model/SymbolTypeBasic.java @@ -7,7 +7,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; public class SymbolTypeBasic implements SymbolType { public static final SymbolTypeBasic BYTE = new SymbolTypeBasic("byte"); + public static final SymbolTypeBasic SBYTE = new SymbolTypeBasic("signed byte"); + public static final SymbolTypeBasic WORD = new SymbolTypeBasic("word"); + public static final SymbolTypeBasic STRING = new SymbolTypeBasic("string"); public static final SymbolTypeBasic BOOLEAN = new SymbolTypeBasic("boolean"); public static final SymbolTypeBasic DOUBLE = new SymbolTypeBasic("double"); @@ -33,6 +36,7 @@ public class SymbolTypeBasic implements SymbolType { public static SymbolTypeBasic get(String name) { switch (name) { case "byte": return BYTE; + case "signed byte": return SBYTE; case "word": return WORD; case "string": return STRING; case "boolean": return BOOLEAN; diff --git a/src/main/java/dk/camelot64/kickc/model/SymbolTypeInference.java b/src/main/java/dk/camelot64/kickc/model/SymbolTypeInference.java index 4af4b0dc2..5250504fa 100644 --- a/src/main/java/dk/camelot64/kickc/model/SymbolTypeInference.java +++ b/src/main/java/dk/camelot64/kickc/model/SymbolTypeInference.java @@ -63,6 +63,8 @@ public class SymbolTypeInference { return SymbolTypeBasic.WORD; } else if (SymbolTypeBasic.BYTE.equals(type1) && SymbolTypeBasic.BYTE.equals(type2)) { return SymbolTypeBasic.BYTE; + } else if (SymbolTypeBasic.SBYTE.equals(type1) && SymbolTypeBasic.SBYTE.equals(type2)) { + return SymbolTypeBasic.SBYTE; } throw new RuntimeException("Type inference case not handled " + type1 + " " + operator + " " + type2); case "*": @@ -73,6 +75,8 @@ public class SymbolTypeInference { return SymbolTypeBasic.WORD; } else if (SymbolTypeBasic.BYTE.equals(type1) && SymbolTypeBasic.BYTE.equals(type2)) { return SymbolTypeBasic.BYTE; + } else if (SymbolTypeBasic.SBYTE.equals(type1) && SymbolTypeBasic.SBYTE.equals(type2)) { + return SymbolTypeBasic.SBYTE; } throw new RuntimeException("Type inference case not handled " + type1 + " " + operator + " " + type2); case "*idx": diff --git a/src/main/java/dk/camelot64/kickc/model/VariableUnversioned.java b/src/main/java/dk/camelot64/kickc/model/VariableUnversioned.java index e5dcf018a..412ad0f87 100644 --- a/src/main/java/dk/camelot64/kickc/model/VariableUnversioned.java +++ b/src/main/java/dk/camelot64/kickc/model/VariableUnversioned.java @@ -1,8 +1,5 @@ package dk.camelot64.kickc.model; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; - /** * A Symbol (variable, jump label, etc.) */ @@ -21,15 +18,6 @@ public class VariableUnversioned extends Variable { this.nextVersionNumber = 0; } - @JsonCreator - public VariableUnversioned( - @JsonProperty("name") String name, - @JsonProperty("type") SymbolType type, - @JsonProperty("nextVersionNumber") Integer nextVersionNumber) { - super(name, null, type); - this.nextVersionNumber = nextVersionNumber; - } - /** * Get the version number of the next version. (if anyone versions the symbol). */ diff --git a/src/main/java/dk/camelot64/kickc/parser/KickC.g4 b/src/main/java/dk/camelot64/kickc/parser/KickC.g4 index 89bab99e5..86fb88342 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickC.g4 +++ b/src/main/java/dk/camelot64/kickc/parser/KickC.g4 @@ -44,6 +44,7 @@ parameterDecl typeDecl : SIMPLETYPE #typeSimple + | 'signed' SIMPLETYPE #typeSignedSimple | typeDecl '*' #typePtr | typeDecl '[' (expr)? ']' #typeArray ; diff --git a/src/main/java/dk/camelot64/kickc/parser/KickC.tokens b/src/main/java/dk/camelot64/kickc/parser/KickC.tokens index 4c5bf2b25..8daa77307 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickC.tokens +++ b/src/main/java/dk/camelot64/kickc/parser/KickC.tokens @@ -43,25 +43,26 @@ T__41=42 T__42=43 T__43=44 T__44=45 -MNEMONIC=46 -SIMPLETYPE=47 -STRING=48 -CHAR=49 -BOOLEAN=50 -NUMBER=51 -NUMFLOAT=52 -BINFLOAT=53 -DECFLOAT=54 -HEXFLOAT=55 -NUMINT=56 -BININTEGER=57 -DECINTEGER=58 -HEXINTEGER=59 -NAME=60 -ASMREL=61 -WS=62 -COMMENT_LINE=63 -COMMENT_BLOCK=64 +T__45=46 +MNEMONIC=47 +SIMPLETYPE=48 +STRING=49 +CHAR=50 +BOOLEAN=51 +NUMBER=52 +NUMFLOAT=53 +BINFLOAT=54 +DECFLOAT=55 +HEXFLOAT=56 +NUMINT=57 +BININTEGER=58 +DECINTEGER=59 +HEXINTEGER=60 +NAME=61 +ASMREL=62 +WS=63 +COMMENT_LINE=64 +COMMENT_BLOCK=65 '{'=1 '}'=2 '('=3 @@ -79,31 +80,32 @@ COMMENT_BLOCK=64 ':'=15 '..'=16 ','=17 -'*'=18 -'['=19 -']'=20 -'<'=21 -'>'=22 -'--'=23 -'++'=24 -'+'=25 -'-'=26 -'!'=27 -'&'=28 -'~'=29 -'>>'=30 -'<<'=31 -'/'=32 -'%'=33 -'=='=34 -'!='=35 -'<>'=36 -'<='=37 -'=<'=38 -'>='=39 -'=>'=40 -'^'=41 -'|'=42 -'&&'=43 -'||'=44 -'#'=45 +'signed'=18 +'*'=19 +'['=20 +']'=21 +'<'=22 +'>'=23 +'--'=24 +'++'=25 +'+'=26 +'-'=27 +'!'=28 +'&'=29 +'~'=30 +'>>'=31 +'<<'=32 +'/'=33 +'%'=34 +'=='=35 +'!='=36 +'<>'=37 +'<='=38 +'=<'=39 +'>='=40 +'=>'=41 +'^'=42 +'|'=43 +'&&'=44 +'||'=45 +'#'=46 diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCBaseListener.java b/src/main/java/dk/camelot64/kickc/parser/KickCBaseListener.java index 2f0272fb9..9930e3bc4 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCBaseListener.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCBaseListener.java @@ -275,6 +275,18 @@ public class KickCBaseListener implements KickCListener { *

The default implementation does nothing.

*/ @Override public void exitTypeSimple(KickCParser.TypeSimpleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeSignedSimple(KickCParser.TypeSignedSimpleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeSignedSimple(KickCParser.TypeSignedSimpleContext ctx) { } /** * {@inheritDoc} * diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCBaseVisitor.java b/src/main/java/dk/camelot64/kickc/parser/KickCBaseVisitor.java index 5e80045a0..d1b987225 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCBaseVisitor.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCBaseVisitor.java @@ -165,6 +165,13 @@ public class KickCBaseVisitor extends AbstractParseTreeVisitor implements * {@link #visitChildren} on {@code ctx}.

*/ @Override public T visitTypeSimple(KickCParser.TypeSimpleContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitTypeSignedSimple(KickCParser.TypeSignedSimpleContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCLexer.java b/src/main/java/dk/camelot64/kickc/parser/KickCLexer.java index 114b409fe..0748075d1 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCLexer.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCLexer.java @@ -23,10 +23,10 @@ public class KickCLexer extends Lexer { T__24=25, T__25=26, T__26=27, T__27=28, T__28=29, T__29=30, T__30=31, T__31=32, T__32=33, T__33=34, T__34=35, T__35=36, T__36=37, T__37=38, T__38=39, T__39=40, T__40=41, T__41=42, T__42=43, T__43=44, T__44=45, - MNEMONIC=46, SIMPLETYPE=47, STRING=48, CHAR=49, BOOLEAN=50, NUMBER=51, - NUMFLOAT=52, BINFLOAT=53, DECFLOAT=54, HEXFLOAT=55, NUMINT=56, BININTEGER=57, - DECINTEGER=58, HEXINTEGER=59, NAME=60, ASMREL=61, WS=62, COMMENT_LINE=63, - COMMENT_BLOCK=64; + T__45=46, MNEMONIC=47, SIMPLETYPE=48, STRING=49, CHAR=50, BOOLEAN=51, + NUMBER=52, NUMFLOAT=53, BINFLOAT=54, DECFLOAT=55, HEXFLOAT=56, NUMINT=57, + BININTEGER=58, DECINTEGER=59, HEXINTEGER=60, NAME=61, ASMREL=62, WS=63, + COMMENT_LINE=64, COMMENT_BLOCK=65; public static String[] channelNames = { "DEFAULT_TOKEN_CHANNEL", "HIDDEN" }; @@ -41,25 +41,26 @@ public class KickCLexer extends Lexer { "T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "T__23", "T__24", "T__25", "T__26", "T__27", "T__28", "T__29", "T__30", "T__31", "T__32", "T__33", "T__34", "T__35", "T__36", "T__37", "T__38", "T__39", "T__40", - "T__41", "T__42", "T__43", "T__44", "MNEMONIC", "SIMPLETYPE", "STRING", - "CHAR", "BOOLEAN", "NUMBER", "NUMFLOAT", "BINFLOAT", "DECFLOAT", "HEXFLOAT", - "NUMINT", "BININTEGER", "DECINTEGER", "HEXINTEGER", "BINDIGIT", "DECDIGIT", - "HEXDIGIT", "NAME", "NAME_START", "NAME_CHAR", "ASMREL", "WS", "COMMENT_LINE", - "COMMENT_BLOCK" + "T__41", "T__42", "T__43", "T__44", "T__45", "MNEMONIC", "SIMPLETYPE", + "STRING", "CHAR", "BOOLEAN", "NUMBER", "NUMFLOAT", "BINFLOAT", "DECFLOAT", + "HEXFLOAT", "NUMINT", "BININTEGER", "DECINTEGER", "HEXINTEGER", "BINDIGIT", + "DECDIGIT", "HEXDIGIT", "NAME", "NAME_START", "NAME_CHAR", "ASMREL", "WS", + "COMMENT_LINE", "COMMENT_BLOCK" }; private static final String[] _LITERAL_NAMES = { null, "'{'", "'}'", "'('", "')'", "'const'", "'='", "';'", "'if'", "'else'", "'while'", "'do'", "'for'", "'return'", "'asm'", "':'", "'..'", "','", - "'*'", "'['", "']'", "'<'", "'>'", "'--'", "'++'", "'+'", "'-'", "'!'", - "'&'", "'~'", "'>>'", "'<<'", "'/'", "'%'", "'=='", "'!='", "'<>'", "'<='", - "'=<'", "'>='", "'=>'", "'^'", "'|'", "'&&'", "'||'", "'#'" + "'signed'", "'*'", "'['", "']'", "'<'", "'>'", "'--'", "'++'", "'+'", + "'-'", "'!'", "'&'", "'~'", "'>>'", "'<<'", "'/'", "'%'", "'=='", "'!='", + "'<>'", "'<='", "'=<'", "'>='", "'=>'", "'^'", "'|'", "'&&'", "'||'", + "'#'" }; private static final String[] _SYMBOLIC_NAMES = { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, "MNEMONIC", + null, null, null, null, null, null, null, null, null, null, null, "MNEMONIC", "SIMPLETYPE", "STRING", "CHAR", "BOOLEAN", "NUMBER", "NUMFLOAT", "BINFLOAT", "DECFLOAT", "HEXFLOAT", "NUMINT", "BININTEGER", "DECINTEGER", "HEXINTEGER", "NAME", "ASMREL", "WS", "COMMENT_LINE", "COMMENT_BLOCK" @@ -122,7 +123,7 @@ public class KickCLexer extends Lexer { public ATN getATN() { return _ATN; } public static final String _serializedATN = - "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2B\u02b3\b\1\4\2\t"+ + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2C\u02bc\b\1\4\2\t"+ "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ @@ -130,252 +131,262 @@ public class KickCLexer extends Lexer { "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ - "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\3\2\3\2\3\3\3\3"+ - "\3\4\3\4\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\6\3\7\3\7\3\b\3\b\3\t\3\t\3\t\3"+ - "\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\r\3\r\3"+ - "\r\3\r\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\17\3\17\3\17\3\17\3\20\3\20"+ - "\3\21\3\21\3\21\3\22\3\22\3\23\3\23\3\24\3\24\3\25\3\25\3\26\3\26\3\27"+ - "\3\27\3\30\3\30\3\30\3\31\3\31\3\31\3\32\3\32\3\33\3\33\3\34\3\34\3\35"+ - "\3\35\3\36\3\36\3\37\3\37\3\37\3 \3 \3 \3!\3!\3\"\3\"\3#\3#\3#\3$\3$\3"+ - "$\3%\3%\3%\3&\3&\3&\3\'\3\'\3\'\3(\3(\3(\3)\3)\3)\3*\3*\3+\3+\3,\3,\3"+ - ",\3-\3-\3-\3.\3.\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3"+ - "/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3"+ - "/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3"+ - "/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3"+ - "/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3"+ - "/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3"+ - "/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3"+ - "/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3"+ - "/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3"+ - "/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\5/\u01e7\n/\3\60"+ + "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\3\2\3\2\3"+ + "\3\3\3\3\4\3\4\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\6\3\7\3\7\3\b\3\b\3\t\3\t"+ + "\3\t\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\r"+ + "\3\r\3\r\3\r\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\17\3\17\3\17\3\17\3"+ + "\20\3\20\3\21\3\21\3\21\3\22\3\22\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3"+ + "\24\3\24\3\25\3\25\3\26\3\26\3\27\3\27\3\30\3\30\3\31\3\31\3\31\3\32\3"+ + "\32\3\32\3\33\3\33\3\34\3\34\3\35\3\35\3\36\3\36\3\37\3\37\3 \3 \3 \3"+ + "!\3!\3!\3\"\3\"\3#\3#\3$\3$\3$\3%\3%\3%\3&\3&\3&\3\'\3\'\3\'\3(\3(\3("+ + "\3)\3)\3)\3*\3*\3*\3+\3+\3,\3,\3-\3-\3-\3.\3.\3.\3/\3/\3\60\3\60\3\60"+ "\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60"+ - "\3\60\3\60\3\60\3\60\5\60\u01fc\n\60\3\61\3\61\3\61\3\61\7\61\u0202\n"+ - "\61\f\61\16\61\u0205\13\61\3\61\3\61\3\62\3\62\3\62\3\62\5\62\u020d\n"+ - "\62\3\62\3\62\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\63\5\63\u021a"+ - "\n\63\3\64\3\64\5\64\u021e\n\64\3\65\3\65\3\65\5\65\u0223\n\65\3\66\3"+ - "\66\3\66\3\66\3\66\5\66\u022a\n\66\3\66\7\66\u022d\n\66\f\66\16\66\u0230"+ - "\13\66\3\66\3\66\6\66\u0234\n\66\r\66\16\66\u0235\3\67\7\67\u0239\n\67"+ - "\f\67\16\67\u023c\13\67\3\67\3\67\6\67\u0240\n\67\r\67\16\67\u0241\38"+ - "\38\38\38\38\58\u0249\n8\38\78\u024c\n8\f8\168\u024f\138\38\38\68\u0253"+ - "\n8\r8\168\u0254\39\39\39\59\u025a\n9\3:\3:\3:\6:\u025f\n:\r:\16:\u0260"+ - "\3:\3:\6:\u0265\n:\r:\16:\u0266\5:\u0269\n:\3;\6;\u026c\n;\r;\16;\u026d"+ - "\3<\3<\3<\3<\3<\5<\u0275\n<\3<\6<\u0278\n<\r<\16<\u0279\3=\3=\3>\3>\3"+ - "?\3?\3@\3@\7@\u0284\n@\f@\16@\u0287\13@\3A\3A\3B\3B\3C\3C\7C\u028f\nC"+ - "\fC\16C\u0292\13C\3D\6D\u0295\nD\rD\16D\u0296\3D\3D\3E\3E\3E\3E\7E\u029f"+ - "\nE\fE\16E\u02a2\13E\3E\3E\3F\3F\3F\3F\7F\u02aa\nF\fF\16F\u02ad\13F\3"+ - "F\3F\3F\3F\3F\3\u02ab\2G\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f"+ - "\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32\63"+ - "\33\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'M(O)Q*S+U,W-Y.[/]\60_\61a\62"+ - "c\63e\64g\65i\66k\67m8o9q:s;u\u0081\2\u0083\2\u0085?"+ - "\u0087@\u0089A\u008bB\3\2\r\3\2$$\3\2))\4\2DDdd\3\2\62\63\3\2\62;\5\2"+ - "\62;CHch\5\2C\\aac|\6\2\62;C\\aac|\4\2--//\5\2\13\f\17\17\"\"\4\2\f\f"+ - "\17\17\2\u0317\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3"+ - "\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2"+ - "\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3"+ - "\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2"+ - "\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\2"+ - "9\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3"+ - "\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2"+ - "\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2"+ - "_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2i\3\2\2\2\2k\3"+ - "\2\2\2\2m\3\2\2\2\2o\3\2\2\2\2q\3\2\2\2\2s\3\2\2\2\2u\3\2\2\2\2w\3\2\2"+ - "\2\2\177\3\2\2\2\2\u0085\3\2\2\2\2\u0087\3\2\2\2\2\u0089\3\2\2\2\2\u008b"+ - "\3\2\2\2\3\u008d\3\2\2\2\5\u008f\3\2\2\2\7\u0091\3\2\2\2\t\u0093\3\2\2"+ - "\2\13\u0095\3\2\2\2\r\u009b\3\2\2\2\17\u009d\3\2\2\2\21\u009f\3\2\2\2"+ - "\23\u00a2\3\2\2\2\25\u00a7\3\2\2\2\27\u00ad\3\2\2\2\31\u00b0\3\2\2\2\33"+ - "\u00b4\3\2\2\2\35\u00bb\3\2\2\2\37\u00bf\3\2\2\2!\u00c1\3\2\2\2#\u00c4"+ - "\3\2\2\2%\u00c6\3\2\2\2\'\u00c8\3\2\2\2)\u00ca\3\2\2\2+\u00cc\3\2\2\2"+ - "-\u00ce\3\2\2\2/\u00d0\3\2\2\2\61\u00d3\3\2\2\2\63\u00d6\3\2\2\2\65\u00d8"+ - "\3\2\2\2\67\u00da\3\2\2\29\u00dc\3\2\2\2;\u00de\3\2\2\2=\u00e0\3\2\2\2"+ - "?\u00e3\3\2\2\2A\u00e6\3\2\2\2C\u00e8\3\2\2\2E\u00ea\3\2\2\2G\u00ed\3"+ - "\2\2\2I\u00f0\3\2\2\2K\u00f3\3\2\2\2M\u00f6\3\2\2\2O\u00f9\3\2\2\2Q\u00fc"+ - "\3\2\2\2S\u00ff\3\2\2\2U\u0101\3\2\2\2W\u0103\3\2\2\2Y\u0106\3\2\2\2["+ - "\u0109\3\2\2\2]\u01e6\3\2\2\2_\u01fb\3\2\2\2a\u01fd\3\2\2\2c\u0208\3\2"+ - "\2\2e\u0219\3\2\2\2g\u021d\3\2\2\2i\u0222\3\2\2\2k\u0229\3\2\2\2m\u023a"+ - "\3\2\2\2o\u0248\3\2\2\2q\u0259\3\2\2\2s\u0268\3\2\2\2u\u026b\3\2\2\2w"+ - "\u0274\3\2\2\2y\u027b\3\2\2\2{\u027d\3\2\2\2}\u027f\3\2\2\2\177\u0281"+ - "\3\2\2\2\u0081\u0288\3\2\2\2\u0083\u028a\3\2\2\2\u0085\u028c\3\2\2\2\u0087"+ - "\u0294\3\2\2\2\u0089\u029a\3\2\2\2\u008b\u02a5\3\2\2\2\u008d\u008e\7}"+ - "\2\2\u008e\4\3\2\2\2\u008f\u0090\7\177\2\2\u0090\6\3\2\2\2\u0091\u0092"+ - "\7*\2\2\u0092\b\3\2\2\2\u0093\u0094\7+\2\2\u0094\n\3\2\2\2\u0095\u0096"+ - "\7e\2\2\u0096\u0097\7q\2\2\u0097\u0098\7p\2\2\u0098\u0099\7u\2\2\u0099"+ - "\u009a\7v\2\2\u009a\f\3\2\2\2\u009b\u009c\7?\2\2\u009c\16\3\2\2\2\u009d"+ - "\u009e\7=\2\2\u009e\20\3\2\2\2\u009f\u00a0\7k\2\2\u00a0\u00a1\7h\2\2\u00a1"+ - "\22\3\2\2\2\u00a2\u00a3\7g\2\2\u00a3\u00a4\7n\2\2\u00a4\u00a5\7u\2\2\u00a5"+ - "\u00a6\7g\2\2\u00a6\24\3\2\2\2\u00a7\u00a8\7y\2\2\u00a8\u00a9\7j\2\2\u00a9"+ - "\u00aa\7k\2\2\u00aa\u00ab\7n\2\2\u00ab\u00ac\7g\2\2\u00ac\26\3\2\2\2\u00ad"+ - "\u00ae\7f\2\2\u00ae\u00af\7q\2\2\u00af\30\3\2\2\2\u00b0\u00b1\7h\2\2\u00b1"+ - "\u00b2\7q\2\2\u00b2\u00b3\7t\2\2\u00b3\32\3\2\2\2\u00b4\u00b5\7t\2\2\u00b5"+ - "\u00b6\7g\2\2\u00b6\u00b7\7v\2\2\u00b7\u00b8\7w\2\2\u00b8\u00b9\7t\2\2"+ - "\u00b9\u00ba\7p\2\2\u00ba\34\3\2\2\2\u00bb\u00bc\7c\2\2\u00bc\u00bd\7"+ - "u\2\2\u00bd\u00be\7o\2\2\u00be\36\3\2\2\2\u00bf\u00c0\7<\2\2\u00c0 \3"+ - "\2\2\2\u00c1\u00c2\7\60\2\2\u00c2\u00c3\7\60\2\2\u00c3\"\3\2\2\2\u00c4"+ - "\u00c5\7.\2\2\u00c5$\3\2\2\2\u00c6\u00c7\7,\2\2\u00c7&\3\2\2\2\u00c8\u00c9"+ - "\7]\2\2\u00c9(\3\2\2\2\u00ca\u00cb\7_\2\2\u00cb*\3\2\2\2\u00cc\u00cd\7"+ - ">\2\2\u00cd,\3\2\2\2\u00ce\u00cf\7@\2\2\u00cf.\3\2\2\2\u00d0\u00d1\7/"+ - "\2\2\u00d1\u00d2\7/\2\2\u00d2\60\3\2\2\2\u00d3\u00d4\7-\2\2\u00d4\u00d5"+ - "\7-\2\2\u00d5\62\3\2\2\2\u00d6\u00d7\7-\2\2\u00d7\64\3\2\2\2\u00d8\u00d9"+ - "\7/\2\2\u00d9\66\3\2\2\2\u00da\u00db\7#\2\2\u00db8\3\2\2\2\u00dc\u00dd"+ - "\7(\2\2\u00dd:\3\2\2\2\u00de\u00df\7\u0080\2\2\u00df<\3\2\2\2\u00e0\u00e1"+ - "\7@\2\2\u00e1\u00e2\7@\2\2\u00e2>\3\2\2\2\u00e3\u00e4\7>\2\2\u00e4\u00e5"+ - "\7>\2\2\u00e5@\3\2\2\2\u00e6\u00e7\7\61\2\2\u00e7B\3\2\2\2\u00e8\u00e9"+ - "\7\'\2\2\u00e9D\3\2\2\2\u00ea\u00eb\7?\2\2\u00eb\u00ec\7?\2\2\u00ecF\3"+ - "\2\2\2\u00ed\u00ee\7#\2\2\u00ee\u00ef\7?\2\2\u00efH\3\2\2\2\u00f0\u00f1"+ - "\7>\2\2\u00f1\u00f2\7@\2\2\u00f2J\3\2\2\2\u00f3\u00f4\7>\2\2\u00f4\u00f5"+ - "\7?\2\2\u00f5L\3\2\2\2\u00f6\u00f7\7?\2\2\u00f7\u00f8\7>\2\2\u00f8N\3"+ - "\2\2\2\u00f9\u00fa\7@\2\2\u00fa\u00fb\7?\2\2\u00fbP\3\2\2\2\u00fc\u00fd"+ - "\7?\2\2\u00fd\u00fe\7@\2\2\u00feR\3\2\2\2\u00ff\u0100\7`\2\2\u0100T\3"+ - "\2\2\2\u0101\u0102\7~\2\2\u0102V\3\2\2\2\u0103\u0104\7(\2\2\u0104\u0105"+ - "\7(\2\2\u0105X\3\2\2\2\u0106\u0107\7~\2\2\u0107\u0108\7~\2\2\u0108Z\3"+ - "\2\2\2\u0109\u010a\7%\2\2\u010a\\\3\2\2\2\u010b\u010c\7d\2\2\u010c\u010d"+ - "\7t\2\2\u010d\u01e7\7m\2\2\u010e\u010f\7q\2\2\u010f\u0110\7t\2\2\u0110"+ - "\u01e7\7c\2\2\u0111\u0112\7m\2\2\u0112\u0113\7k\2\2\u0113\u01e7\7n\2\2"+ - "\u0114\u0115\7u\2\2\u0115\u0116\7n\2\2\u0116\u01e7\7q\2\2\u0117\u0118"+ - "\7p\2\2\u0118\u0119\7q\2\2\u0119\u01e7\7r\2\2\u011a\u011b\7c\2\2\u011b"+ - "\u011c\7u\2\2\u011c\u01e7\7n\2\2\u011d\u011e\7r\2\2\u011e\u011f\7j\2\2"+ - "\u011f\u01e7\7r\2\2\u0120\u0121\7c\2\2\u0121\u0122\7p\2\2\u0122\u01e7"+ - "\7e\2\2\u0123\u0124\7d\2\2\u0124\u0125\7r\2\2\u0125\u01e7\7n\2\2\u0126"+ - "\u0127\7e\2\2\u0127\u0128\7n\2\2\u0128\u01e7\7e\2\2\u0129\u012a\7l\2\2"+ - "\u012a\u012b\7u\2\2\u012b\u01e7\7t\2\2\u012c\u012d\7c\2\2\u012d\u012e"+ - "\7p\2\2\u012e\u01e7\7f\2\2\u012f\u0130\7t\2\2\u0130\u0131\7n\2\2\u0131"+ - "\u01e7\7c\2\2\u0132\u0133\7d\2\2\u0133\u0134\7k\2\2\u0134\u01e7\7v\2\2"+ - "\u0135\u0136\7t\2\2\u0136\u0137\7q\2\2\u0137\u01e7\7n\2\2\u0138\u0139"+ - "\7r\2\2\u0139\u013a\7n\2\2\u013a\u01e7\7c\2\2\u013b\u013c\7r\2\2\u013c"+ - "\u013d\7n\2\2\u013d\u01e7\7r\2\2\u013e\u013f\7d\2\2\u013f\u0140\7o\2\2"+ - "\u0140\u01e7\7k\2\2\u0141\u0142\7u\2\2\u0142\u0143\7g\2\2\u0143\u01e7"+ - "\7e\2\2\u0144\u0145\7t\2\2\u0145\u0146\7v\2\2\u0146\u01e7\7k\2\2\u0147"+ - "\u0148\7g\2\2\u0148\u0149\7q\2\2\u0149\u01e7\7t\2\2\u014a\u014b\7u\2\2"+ - "\u014b\u014c\7t\2\2\u014c\u01e7\7g\2\2\u014d\u014e\7n\2\2\u014e\u014f"+ - "\7u\2\2\u014f\u01e7\7t\2\2\u0150\u0151\7r\2\2\u0151\u0152\7j\2\2\u0152"+ - "\u01e7\7c\2\2\u0153\u0154\7c\2\2\u0154\u0155\7n\2\2\u0155\u01e7\7t\2\2"+ - "\u0156\u0157\7l\2\2\u0157\u0158\7o\2\2\u0158\u01e7\7r\2\2\u0159\u015a"+ - "\7d\2\2\u015a\u015b\7x\2\2\u015b\u01e7\7e\2\2\u015c\u015d\7e\2\2\u015d"+ - "\u015e\7n\2\2\u015e\u01e7\7k\2\2\u015f\u0160\7t\2\2\u0160\u0161\7v\2\2"+ - "\u0161\u01e7\7u\2\2\u0162\u0163\7c\2\2\u0163\u0164\7f\2\2\u0164\u01e7"+ - "\7e\2\2\u0165\u0166\7t\2\2\u0166\u0167\7t\2\2\u0167\u01e7\7c\2\2\u0168"+ - "\u0169\7d\2\2\u0169\u016a\7x\2\2\u016a\u01e7\7u\2\2\u016b\u016c\7u\2\2"+ - "\u016c\u016d\7g\2\2\u016d\u01e7\7k\2\2\u016e\u016f\7u\2\2\u016f\u0170"+ - "\7c\2\2\u0170\u01e7\7z\2\2\u0171\u0172\7u\2\2\u0172\u0173\7v\2\2\u0173"+ - "\u01e7\7{\2\2\u0174\u0175\7u\2\2\u0175\u0176\7v\2\2\u0176\u01e7\7c\2\2"+ - "\u0177\u0178\7u\2\2\u0178\u0179\7v\2\2\u0179\u01e7\7z\2\2\u017a\u017b"+ - "\7f\2\2\u017b\u017c\7g\2\2\u017c\u01e7\7{\2\2\u017d\u017e\7v\2\2\u017e"+ - "\u017f\7z\2\2\u017f\u01e7\7c\2\2\u0180\u0181\7z\2\2\u0181\u0182\7c\2\2"+ - "\u0182\u01e7\7c\2\2\u0183\u0184\7d\2\2\u0184\u0185\7e\2\2\u0185\u01e7"+ - "\7e\2\2\u0186\u0187\7c\2\2\u0187\u0188\7j\2\2\u0188\u01e7\7z\2\2\u0189"+ - "\u018a\7v\2\2\u018a\u018b\7{\2\2\u018b\u01e7\7c\2\2\u018c\u018d\7v\2\2"+ - "\u018d\u018e\7z\2\2\u018e\u01e7\7u\2\2\u018f\u0190\7v\2\2\u0190\u0191"+ - "\7c\2\2\u0191\u01e7\7u\2\2\u0192\u0193\7u\2\2\u0193\u0194\7j\2\2\u0194"+ - "\u01e7\7{\2\2\u0195\u0196\7u\2\2\u0196\u0197\7j\2\2\u0197\u01e7\7z\2\2"+ - "\u0198\u0199\7n\2\2\u0199\u019a\7f\2\2\u019a\u01e7\7{\2\2\u019b\u019c"+ - "\7n\2\2\u019c\u019d\7f\2\2\u019d\u01e7\7c\2\2\u019e\u019f\7n\2\2\u019f"+ - "\u01a0\7f\2\2\u01a0\u01e7\7z\2\2\u01a1\u01a2\7n\2\2\u01a2\u01a3\7c\2\2"+ - "\u01a3\u01e7\7z\2\2\u01a4\u01a5\7v\2\2\u01a5\u01a6\7c\2\2\u01a6\u01e7"+ - "\7{\2\2\u01a7\u01a8\7v\2\2\u01a8\u01a9\7c\2\2\u01a9\u01e7\7z\2\2\u01aa"+ - "\u01ab\7d\2\2\u01ab\u01ac\7e\2\2\u01ac\u01e7\7u\2\2\u01ad\u01ae\7e\2\2"+ - "\u01ae\u01af\7n\2\2\u01af\u01e7\7x\2\2\u01b0\u01b1\7v\2\2\u01b1\u01b2"+ - "\7u\2\2\u01b2\u01e7\7z\2\2\u01b3\u01b4\7n\2\2\u01b4\u01b5\7c\2\2\u01b5"+ - "\u01e7\7u\2\2\u01b6\u01b7\7e\2\2\u01b7\u01b8\7r\2\2\u01b8\u01e7\7{\2\2"+ - "\u01b9\u01ba\7e\2\2\u01ba\u01bb\7o\2\2\u01bb\u01e7\7r\2\2\u01bc\u01bd"+ - "\7e\2\2\u01bd\u01be\7r\2\2\u01be\u01e7\7z\2\2\u01bf\u01c0\7f\2\2\u01c0"+ - "\u01c1\7e\2\2\u01c1\u01e7\7r\2\2\u01c2\u01c3\7f\2\2\u01c3\u01c4\7g\2\2"+ - "\u01c4\u01e7\7e\2\2\u01c5\u01c6\7k\2\2\u01c6\u01c7\7p\2\2\u01c7\u01e7"+ - "\7e\2\2\u01c8\u01c9\7c\2\2\u01c9\u01ca\7z\2\2\u01ca\u01e7\7u\2\2\u01cb"+ - "\u01cc\7d\2\2\u01cc\u01cd\7p\2\2\u01cd\u01e7\7g\2\2\u01ce\u01cf\7e\2\2"+ - "\u01cf\u01d0\7n\2\2\u01d0\u01e7\7f\2\2\u01d1\u01d2\7u\2\2\u01d2\u01d3"+ - "\7d\2\2\u01d3\u01e7\7e\2\2\u01d4\u01d5\7k\2\2\u01d5\u01d6\7u\2\2\u01d6"+ - "\u01e7\7e\2\2\u01d7\u01d8\7k\2\2\u01d8\u01d9\7p\2\2\u01d9\u01e7\7z\2\2"+ - "\u01da\u01db\7d\2\2\u01db\u01dc\7g\2\2\u01dc\u01e7\7s\2\2\u01dd\u01de"+ - "\7u\2\2\u01de\u01df\7g\2\2\u01df\u01e7\7f\2\2\u01e0\u01e1\7f\2\2\u01e1"+ - "\u01e2\7g\2\2\u01e2\u01e7\7z\2\2\u01e3\u01e4\7k\2\2\u01e4\u01e5\7p\2\2"+ - "\u01e5\u01e7\7{\2\2\u01e6\u010b\3\2\2\2\u01e6\u010e\3\2\2\2\u01e6\u0111"+ - "\3\2\2\2\u01e6\u0114\3\2\2\2\u01e6\u0117\3\2\2\2\u01e6\u011a\3\2\2\2\u01e6"+ - "\u011d\3\2\2\2\u01e6\u0120\3\2\2\2\u01e6\u0123\3\2\2\2\u01e6\u0126\3\2"+ - "\2\2\u01e6\u0129\3\2\2\2\u01e6\u012c\3\2\2\2\u01e6\u012f\3\2\2\2\u01e6"+ - "\u0132\3\2\2\2\u01e6\u0135\3\2\2\2\u01e6\u0138\3\2\2\2\u01e6\u013b\3\2"+ - "\2\2\u01e6\u013e\3\2\2\2\u01e6\u0141\3\2\2\2\u01e6\u0144\3\2\2\2\u01e6"+ - "\u0147\3\2\2\2\u01e6\u014a\3\2\2\2\u01e6\u014d\3\2\2\2\u01e6\u0150\3\2"+ - "\2\2\u01e6\u0153\3\2\2\2\u01e6\u0156\3\2\2\2\u01e6\u0159\3\2\2\2\u01e6"+ - "\u015c\3\2\2\2\u01e6\u015f\3\2\2\2\u01e6\u0162\3\2\2\2\u01e6\u0165\3\2"+ - "\2\2\u01e6\u0168\3\2\2\2\u01e6\u016b\3\2\2\2\u01e6\u016e\3\2\2\2\u01e6"+ - "\u0171\3\2\2\2\u01e6\u0174\3\2\2\2\u01e6\u0177\3\2\2\2\u01e6\u017a\3\2"+ - "\2\2\u01e6\u017d\3\2\2\2\u01e6\u0180\3\2\2\2\u01e6\u0183\3\2\2\2\u01e6"+ - "\u0186\3\2\2\2\u01e6\u0189\3\2\2\2\u01e6\u018c\3\2\2\2\u01e6\u018f\3\2"+ - "\2\2\u01e6\u0192\3\2\2\2\u01e6\u0195\3\2\2\2\u01e6\u0198\3\2\2\2\u01e6"+ - "\u019b\3\2\2\2\u01e6\u019e\3\2\2\2\u01e6\u01a1\3\2\2\2\u01e6\u01a4\3\2"+ - "\2\2\u01e6\u01a7\3\2\2\2\u01e6\u01aa\3\2\2\2\u01e6\u01ad\3\2\2\2\u01e6"+ - "\u01b0\3\2\2\2\u01e6\u01b3\3\2\2\2\u01e6\u01b6\3\2\2\2\u01e6\u01b9\3\2"+ - "\2\2\u01e6\u01bc\3\2\2\2\u01e6\u01bf\3\2\2\2\u01e6\u01c2\3\2\2\2\u01e6"+ - "\u01c5\3\2\2\2\u01e6\u01c8\3\2\2\2\u01e6\u01cb\3\2\2\2\u01e6\u01ce\3\2"+ - "\2\2\u01e6\u01d1\3\2\2\2\u01e6\u01d4\3\2\2\2\u01e6\u01d7\3\2\2\2\u01e6"+ - "\u01da\3\2\2\2\u01e6\u01dd\3\2\2\2\u01e6\u01e0\3\2\2\2\u01e6\u01e3\3\2"+ - "\2\2\u01e7^\3\2\2\2\u01e8\u01e9\7d\2\2\u01e9\u01ea\7{\2\2\u01ea\u01eb"+ - "\7v\2\2\u01eb\u01fc\7g\2\2\u01ec\u01ed\7y\2\2\u01ed\u01ee\7q\2\2\u01ee"+ - "\u01ef\7t\2\2\u01ef\u01fc\7f\2\2\u01f0\u01f1\7d\2\2\u01f1\u01f2\7q\2\2"+ - "\u01f2\u01f3\7q\2\2\u01f3\u01f4\7n\2\2\u01f4\u01f5\7g\2\2\u01f5\u01f6"+ - "\7c\2\2\u01f6\u01fc\7p\2\2\u01f7\u01f8\7x\2\2\u01f8\u01f9\7q\2\2\u01f9"+ - "\u01fa\7k\2\2\u01fa\u01fc\7f\2\2\u01fb\u01e8\3\2\2\2\u01fb\u01ec\3\2\2"+ - "\2\u01fb\u01f0\3\2\2\2\u01fb\u01f7\3\2\2\2\u01fc`\3\2\2\2\u01fd\u0203"+ - "\7$\2\2\u01fe\u01ff\7^\2\2\u01ff\u0202\7$\2\2\u0200\u0202\n\2\2\2\u0201"+ - "\u01fe\3\2\2\2\u0201\u0200\3\2\2\2\u0202\u0205\3\2\2\2\u0203\u0201\3\2"+ - "\2\2\u0203\u0204\3\2\2\2\u0204\u0206\3\2\2\2\u0205\u0203\3\2\2\2\u0206"+ - "\u0207\7$\2\2\u0207b\3\2\2\2\u0208\u020c\7)\2\2\u0209\u020a\7^\2\2\u020a"+ - "\u020d\7)\2\2\u020b\u020d\n\3\2\2\u020c\u0209\3\2\2\2\u020c\u020b\3\2"+ - "\2\2\u020d\u020e\3\2\2\2\u020e\u020f\7)\2\2\u020fd\3\2\2\2\u0210\u0211"+ - "\7v\2\2\u0211\u0212\7t\2\2\u0212\u0213\7w\2\2\u0213\u021a\7g\2\2\u0214"+ - "\u0215\7h\2\2\u0215\u0216\7c\2\2\u0216\u0217\7n\2\2\u0217\u0218\7u\2\2"+ - "\u0218\u021a\7g\2\2\u0219\u0210\3\2\2\2\u0219\u0214\3\2\2\2\u021af\3\2"+ - "\2\2\u021b\u021e\5i\65\2\u021c\u021e\5q9\2\u021d\u021b\3\2\2\2\u021d\u021c"+ - "\3\2\2\2\u021eh\3\2\2\2\u021f\u0223\5k\66\2\u0220\u0223\5m\67\2\u0221"+ - "\u0223\5o8\2\u0222\u021f\3\2\2\2\u0222\u0220\3\2\2\2\u0222\u0221\3\2\2"+ - "\2\u0223j\3\2\2\2\u0224\u022a\7\'\2\2\u0225\u0226\7\62\2\2\u0226\u022a"+ - "\7d\2\2\u0227\u0228\7\62\2\2\u0228\u022a\7D\2\2\u0229\u0224\3\2\2\2\u0229"+ - "\u0225\3\2\2\2\u0229\u0227\3\2\2\2\u022a\u022e\3\2\2\2\u022b\u022d\5y"+ - "=\2\u022c\u022b\3\2\2\2\u022d\u0230\3\2\2\2\u022e\u022c\3\2\2\2\u022e"+ - "\u022f\3\2\2\2\u022f\u0231\3\2\2\2\u0230\u022e\3\2\2\2\u0231\u0233\7\60"+ - "\2\2\u0232\u0234\5y=\2\u0233\u0232\3\2\2\2\u0234\u0235\3\2\2\2\u0235\u0233"+ - "\3\2\2\2\u0235\u0236\3\2\2\2\u0236l\3\2\2\2\u0237\u0239\5{>\2\u0238\u0237"+ - "\3\2\2\2\u0239\u023c\3\2\2\2\u023a\u0238\3\2\2\2\u023a\u023b\3\2\2\2\u023b"+ - "\u023d\3\2\2\2\u023c\u023a\3\2\2\2\u023d\u023f\7\60\2\2\u023e\u0240\5"+ - "{>\2\u023f\u023e\3\2\2\2\u0240\u0241\3\2\2\2\u0241\u023f\3\2\2\2\u0241"+ - "\u0242\3\2\2\2\u0242n\3\2\2\2\u0243\u0249\7&\2\2\u0244\u0245\7\62\2\2"+ - "\u0245\u0249\7z\2\2\u0246\u0247\7\62\2\2\u0247\u0249\7Z\2\2\u0248\u0243"+ - "\3\2\2\2\u0248\u0244\3\2\2\2\u0248\u0246\3\2\2\2\u0249\u024d\3\2\2\2\u024a"+ - "\u024c\5}?\2\u024b\u024a\3\2\2\2\u024c\u024f\3\2\2\2\u024d\u024b\3\2\2"+ - "\2\u024d\u024e\3\2\2\2\u024e\u0250\3\2\2\2\u024f\u024d\3\2\2\2\u0250\u0252"+ - "\7\60\2\2\u0251\u0253\5}?\2\u0252\u0251\3\2\2\2\u0253\u0254\3\2\2\2\u0254"+ - "\u0252\3\2\2\2\u0254\u0255\3\2\2\2\u0255p\3\2\2\2\u0256\u025a\5u;\2\u0257"+ - "\u025a\5w<\2\u0258\u025a\5s:\2\u0259\u0256\3\2\2\2\u0259\u0257\3\2\2\2"+ - "\u0259\u0258\3\2\2\2\u025ar\3\2\2\2\u025b\u025c\7\62\2\2\u025c\u025e\t"+ - "\4\2\2\u025d\u025f\5y=\2\u025e\u025d\3\2\2\2\u025f\u0260\3\2\2\2\u0260"+ - "\u025e\3\2\2\2\u0260\u0261\3\2\2\2\u0261\u0269\3\2\2\2\u0262\u0264\7\'"+ - "\2\2\u0263\u0265\5y=\2\u0264\u0263\3\2\2\2\u0265\u0266\3\2\2\2\u0266\u0264"+ - "\3\2\2\2\u0266\u0267\3\2\2\2\u0267\u0269\3\2\2\2\u0268\u025b\3\2\2\2\u0268"+ - "\u0262\3\2\2\2\u0269t\3\2\2\2\u026a\u026c\5{>\2\u026b\u026a\3\2\2\2\u026c"+ - "\u026d\3\2\2\2\u026d\u026b\3\2\2\2\u026d\u026e\3\2\2\2\u026ev\3\2\2\2"+ - "\u026f\u0275\7&\2\2\u0270\u0271\7\62\2\2\u0271\u0275\7z\2\2\u0272\u0273"+ - "\7\62\2\2\u0273\u0275\7Z\2\2\u0274\u026f\3\2\2\2\u0274\u0270\3\2\2\2\u0274"+ - "\u0272\3\2\2\2\u0275\u0277\3\2\2\2\u0276\u0278\5}?\2\u0277\u0276\3\2\2"+ - "\2\u0278\u0279\3\2\2\2\u0279\u0277\3\2\2\2\u0279\u027a\3\2\2\2\u027ax"+ - "\3\2\2\2\u027b\u027c\t\5\2\2\u027cz\3\2\2\2\u027d\u027e\t\6\2\2\u027e"+ - "|\3\2\2\2\u027f\u0280\t\7\2\2\u0280~\3\2\2\2\u0281\u0285\5\u0081A\2\u0282"+ - "\u0284\5\u0083B\2\u0283\u0282\3\2\2\2\u0284\u0287\3\2\2\2\u0285\u0283"+ - "\3\2\2\2\u0285\u0286\3\2\2\2\u0286\u0080\3\2\2\2\u0287\u0285\3\2\2\2\u0288"+ - "\u0289\t\b\2\2\u0289\u0082\3\2\2\2\u028a\u028b\t\t\2\2\u028b\u0084\3\2"+ - "\2\2\u028c\u0290\7#\2\2\u028d\u028f\t\n\2\2\u028e\u028d\3\2\2\2\u028f"+ - "\u0292\3\2\2\2\u0290\u028e\3\2\2\2\u0290\u0291\3\2\2\2\u0291\u0086\3\2"+ - "\2\2\u0292\u0290\3\2\2\2\u0293\u0295\t\13\2\2\u0294\u0293\3\2\2\2\u0295"+ - "\u0296\3\2\2\2\u0296\u0294\3\2\2\2\u0296\u0297\3\2\2\2\u0297\u0298\3\2"+ - "\2\2\u0298\u0299\bD\2\2\u0299\u0088\3\2\2\2\u029a\u029b\7\61\2\2\u029b"+ - "\u029c\7\61\2\2\u029c\u02a0\3\2\2\2\u029d\u029f\n\f\2\2\u029e\u029d\3"+ - "\2\2\2\u029f\u02a2\3\2\2\2\u02a0\u029e\3\2\2\2\u02a0\u02a1\3\2\2\2\u02a1"+ - "\u02a3\3\2\2\2\u02a2\u02a0\3\2\2\2\u02a3\u02a4\bE\2\2\u02a4\u008a\3\2"+ - "\2\2\u02a5\u02a6\7\61\2\2\u02a6\u02a7\7,\2\2\u02a7\u02ab\3\2\2\2\u02a8"+ - "\u02aa\13\2\2\2\u02a9\u02a8\3\2\2\2\u02aa\u02ad\3\2\2\2\u02ab\u02ac\3"+ - "\2\2\2\u02ab\u02a9\3\2\2\2\u02ac\u02ae\3\2\2\2\u02ad\u02ab\3\2\2\2\u02ae"+ - "\u02af\7,\2\2\u02af\u02b0\7\61\2\2\u02b0\u02b1\3\2\2\2\u02b1\u02b2\bF"+ - "\2\2\u02b2\u008c\3\2\2\2\37\2\u01e6\u01fb\u0201\u0203\u020c\u0219\u021d"+ - "\u0222\u0229\u022e\u0235\u023a\u0241\u0248\u024d\u0254\u0259\u0260\u0266"+ - "\u0268\u026d\u0274\u0279\u0285\u0290\u0296\u02a0\u02ab\3\b\2\2"; + "\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60"+ + "\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60"+ + "\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60"+ + "\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60"+ + "\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60"+ + "\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60"+ + "\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60"+ + "\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60"+ + "\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60"+ + "\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60"+ + "\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60"+ + "\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60"+ + "\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60"+ + "\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60"+ + "\3\60\3\60\3\60\3\60\3\60\3\60\5\60\u01f0\n\60\3\61\3\61\3\61\3\61\3\61"+ + "\3\61\3\61\3\61\3\61\3\61\3\61\3\61\3\61\3\61\3\61\3\61\3\61\3\61\3\61"+ + "\5\61\u0205\n\61\3\62\3\62\3\62\3\62\7\62\u020b\n\62\f\62\16\62\u020e"+ + "\13\62\3\62\3\62\3\63\3\63\3\63\3\63\5\63\u0216\n\63\3\63\3\63\3\64\3"+ + "\64\3\64\3\64\3\64\3\64\3\64\3\64\3\64\5\64\u0223\n\64\3\65\3\65\5\65"+ + "\u0227\n\65\3\66\3\66\3\66\5\66\u022c\n\66\3\67\3\67\3\67\3\67\3\67\5"+ + "\67\u0233\n\67\3\67\7\67\u0236\n\67\f\67\16\67\u0239\13\67\3\67\3\67\6"+ + "\67\u023d\n\67\r\67\16\67\u023e\38\78\u0242\n8\f8\168\u0245\138\38\38"+ + "\68\u0249\n8\r8\168\u024a\39\39\39\39\39\59\u0252\n9\39\79\u0255\n9\f"+ + "9\169\u0258\139\39\39\69\u025c\n9\r9\169\u025d\3:\3:\3:\5:\u0263\n:\3"+ + ";\3;\3;\6;\u0268\n;\r;\16;\u0269\3;\3;\6;\u026e\n;\r;\16;\u026f\5;\u0272"+ + "\n;\3<\6<\u0275\n<\r<\16<\u0276\3=\3=\3=\3=\3=\5=\u027e\n=\3=\6=\u0281"+ + "\n=\r=\16=\u0282\3>\3>\3?\3?\3@\3@\3A\3A\7A\u028d\nA\fA\16A\u0290\13A"+ + "\3B\3B\3C\3C\3D\3D\7D\u0298\nD\fD\16D\u029b\13D\3E\6E\u029e\nE\rE\16E"+ + "\u029f\3E\3E\3F\3F\3F\3F\7F\u02a8\nF\fF\16F\u02ab\13F\3F\3F\3G\3G\3G\3"+ + "G\7G\u02b3\nG\fG\16G\u02b6\13G\3G\3G\3G\3G\3G\3\u02b4\2H\3\3\5\4\7\5\t"+ + "\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23"+ + "%\24\'\25)\26+\27-\30/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G"+ + "%I&K\'M(O)Q*S+U,W-Y.[/]\60_\61a\62c\63e\64g\65i\66k\67m8o9q:s;u{"+ + "\2}\2\177\2\u0081?\u0083\2\u0085\2\u0087@\u0089A\u008bB\u008dC\3\2\r\3"+ + "\2$$\3\2))\4\2DDdd\3\2\62\63\3\2\62;\5\2\62;CHch\5\2C\\aac|\6\2\62;C\\"+ + "aac|\4\2--//\5\2\13\f\17\17\"\"\4\2\f\f\17\17\2\u0320\2\3\3\2\2\2\2\5"+ + "\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2"+ + "\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33"+ + "\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2"+ + "\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2"+ + "\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2"+ + "\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K"+ + "\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2"+ + "\2\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2"+ + "\2e\3\2\2\2\2g\3\2\2\2\2i\3\2\2\2\2k\3\2\2\2\2m\3\2\2\2\2o\3\2\2\2\2q"+ + "\3\2\2\2\2s\3\2\2\2\2u\3\2\2\2\2w\3\2\2\2\2y\3\2\2\2\2\u0081\3\2\2\2\2"+ + "\u0087\3\2\2\2\2\u0089\3\2\2\2\2\u008b\3\2\2\2\2\u008d\3\2\2\2\3\u008f"+ + "\3\2\2\2\5\u0091\3\2\2\2\7\u0093\3\2\2\2\t\u0095\3\2\2\2\13\u0097\3\2"+ + "\2\2\r\u009d\3\2\2\2\17\u009f\3\2\2\2\21\u00a1\3\2\2\2\23\u00a4\3\2\2"+ + "\2\25\u00a9\3\2\2\2\27\u00af\3\2\2\2\31\u00b2\3\2\2\2\33\u00b6\3\2\2\2"+ + "\35\u00bd\3\2\2\2\37\u00c1\3\2\2\2!\u00c3\3\2\2\2#\u00c6\3\2\2\2%\u00c8"+ + "\3\2\2\2\'\u00cf\3\2\2\2)\u00d1\3\2\2\2+\u00d3\3\2\2\2-\u00d5\3\2\2\2"+ + "/\u00d7\3\2\2\2\61\u00d9\3\2\2\2\63\u00dc\3\2\2\2\65\u00df\3\2\2\2\67"+ + "\u00e1\3\2\2\29\u00e3\3\2\2\2;\u00e5\3\2\2\2=\u00e7\3\2\2\2?\u00e9\3\2"+ + "\2\2A\u00ec\3\2\2\2C\u00ef\3\2\2\2E\u00f1\3\2\2\2G\u00f3\3\2\2\2I\u00f6"+ + "\3\2\2\2K\u00f9\3\2\2\2M\u00fc\3\2\2\2O\u00ff\3\2\2\2Q\u0102\3\2\2\2S"+ + "\u0105\3\2\2\2U\u0108\3\2\2\2W\u010a\3\2\2\2Y\u010c\3\2\2\2[\u010f\3\2"+ + "\2\2]\u0112\3\2\2\2_\u01ef\3\2\2\2a\u0204\3\2\2\2c\u0206\3\2\2\2e\u0211"+ + "\3\2\2\2g\u0222\3\2\2\2i\u0226\3\2\2\2k\u022b\3\2\2\2m\u0232\3\2\2\2o"+ + "\u0243\3\2\2\2q\u0251\3\2\2\2s\u0262\3\2\2\2u\u0271\3\2\2\2w\u0274\3\2"+ + "\2\2y\u027d\3\2\2\2{\u0284\3\2\2\2}\u0286\3\2\2\2\177\u0288\3\2\2\2\u0081"+ + "\u028a\3\2\2\2\u0083\u0291\3\2\2\2\u0085\u0293\3\2\2\2\u0087\u0295\3\2"+ + "\2\2\u0089\u029d\3\2\2\2\u008b\u02a3\3\2\2\2\u008d\u02ae\3\2\2\2\u008f"+ + "\u0090\7}\2\2\u0090\4\3\2\2\2\u0091\u0092\7\177\2\2\u0092\6\3\2\2\2\u0093"+ + "\u0094\7*\2\2\u0094\b\3\2\2\2\u0095\u0096\7+\2\2\u0096\n\3\2\2\2\u0097"+ + "\u0098\7e\2\2\u0098\u0099\7q\2\2\u0099\u009a\7p\2\2\u009a\u009b\7u\2\2"+ + "\u009b\u009c\7v\2\2\u009c\f\3\2\2\2\u009d\u009e\7?\2\2\u009e\16\3\2\2"+ + "\2\u009f\u00a0\7=\2\2\u00a0\20\3\2\2\2\u00a1\u00a2\7k\2\2\u00a2\u00a3"+ + "\7h\2\2\u00a3\22\3\2\2\2\u00a4\u00a5\7g\2\2\u00a5\u00a6\7n\2\2\u00a6\u00a7"+ + "\7u\2\2\u00a7\u00a8\7g\2\2\u00a8\24\3\2\2\2\u00a9\u00aa\7y\2\2\u00aa\u00ab"+ + "\7j\2\2\u00ab\u00ac\7k\2\2\u00ac\u00ad\7n\2\2\u00ad\u00ae\7g\2\2\u00ae"+ + "\26\3\2\2\2\u00af\u00b0\7f\2\2\u00b0\u00b1\7q\2\2\u00b1\30\3\2\2\2\u00b2"+ + "\u00b3\7h\2\2\u00b3\u00b4\7q\2\2\u00b4\u00b5\7t\2\2\u00b5\32\3\2\2\2\u00b6"+ + "\u00b7\7t\2\2\u00b7\u00b8\7g\2\2\u00b8\u00b9\7v\2\2\u00b9\u00ba\7w\2\2"+ + "\u00ba\u00bb\7t\2\2\u00bb\u00bc\7p\2\2\u00bc\34\3\2\2\2\u00bd\u00be\7"+ + "c\2\2\u00be\u00bf\7u\2\2\u00bf\u00c0\7o\2\2\u00c0\36\3\2\2\2\u00c1\u00c2"+ + "\7<\2\2\u00c2 \3\2\2\2\u00c3\u00c4\7\60\2\2\u00c4\u00c5\7\60\2\2\u00c5"+ + "\"\3\2\2\2\u00c6\u00c7\7.\2\2\u00c7$\3\2\2\2\u00c8\u00c9\7u\2\2\u00c9"+ + "\u00ca\7k\2\2\u00ca\u00cb\7i\2\2\u00cb\u00cc\7p\2\2\u00cc\u00cd\7g\2\2"+ + "\u00cd\u00ce\7f\2\2\u00ce&\3\2\2\2\u00cf\u00d0\7,\2\2\u00d0(\3\2\2\2\u00d1"+ + "\u00d2\7]\2\2\u00d2*\3\2\2\2\u00d3\u00d4\7_\2\2\u00d4,\3\2\2\2\u00d5\u00d6"+ + "\7>\2\2\u00d6.\3\2\2\2\u00d7\u00d8\7@\2\2\u00d8\60\3\2\2\2\u00d9\u00da"+ + "\7/\2\2\u00da\u00db\7/\2\2\u00db\62\3\2\2\2\u00dc\u00dd\7-\2\2\u00dd\u00de"+ + "\7-\2\2\u00de\64\3\2\2\2\u00df\u00e0\7-\2\2\u00e0\66\3\2\2\2\u00e1\u00e2"+ + "\7/\2\2\u00e28\3\2\2\2\u00e3\u00e4\7#\2\2\u00e4:\3\2\2\2\u00e5\u00e6\7"+ + "(\2\2\u00e6<\3\2\2\2\u00e7\u00e8\7\u0080\2\2\u00e8>\3\2\2\2\u00e9\u00ea"+ + "\7@\2\2\u00ea\u00eb\7@\2\2\u00eb@\3\2\2\2\u00ec\u00ed\7>\2\2\u00ed\u00ee"+ + "\7>\2\2\u00eeB\3\2\2\2\u00ef\u00f0\7\61\2\2\u00f0D\3\2\2\2\u00f1\u00f2"+ + "\7\'\2\2\u00f2F\3\2\2\2\u00f3\u00f4\7?\2\2\u00f4\u00f5\7?\2\2\u00f5H\3"+ + "\2\2\2\u00f6\u00f7\7#\2\2\u00f7\u00f8\7?\2\2\u00f8J\3\2\2\2\u00f9\u00fa"+ + "\7>\2\2\u00fa\u00fb\7@\2\2\u00fbL\3\2\2\2\u00fc\u00fd\7>\2\2\u00fd\u00fe"+ + "\7?\2\2\u00feN\3\2\2\2\u00ff\u0100\7?\2\2\u0100\u0101\7>\2\2\u0101P\3"+ + "\2\2\2\u0102\u0103\7@\2\2\u0103\u0104\7?\2\2\u0104R\3\2\2\2\u0105\u0106"+ + "\7?\2\2\u0106\u0107\7@\2\2\u0107T\3\2\2\2\u0108\u0109\7`\2\2\u0109V\3"+ + "\2\2\2\u010a\u010b\7~\2\2\u010bX\3\2\2\2\u010c\u010d\7(\2\2\u010d\u010e"+ + "\7(\2\2\u010eZ\3\2\2\2\u010f\u0110\7~\2\2\u0110\u0111\7~\2\2\u0111\\\3"+ + "\2\2\2\u0112\u0113\7%\2\2\u0113^\3\2\2\2\u0114\u0115\7d\2\2\u0115\u0116"+ + "\7t\2\2\u0116\u01f0\7m\2\2\u0117\u0118\7q\2\2\u0118\u0119\7t\2\2\u0119"+ + "\u01f0\7c\2\2\u011a\u011b\7m\2\2\u011b\u011c\7k\2\2\u011c\u01f0\7n\2\2"+ + "\u011d\u011e\7u\2\2\u011e\u011f\7n\2\2\u011f\u01f0\7q\2\2\u0120\u0121"+ + "\7p\2\2\u0121\u0122\7q\2\2\u0122\u01f0\7r\2\2\u0123\u0124\7c\2\2\u0124"+ + "\u0125\7u\2\2\u0125\u01f0\7n\2\2\u0126\u0127\7r\2\2\u0127\u0128\7j\2\2"+ + "\u0128\u01f0\7r\2\2\u0129\u012a\7c\2\2\u012a\u012b\7p\2\2\u012b\u01f0"+ + "\7e\2\2\u012c\u012d\7d\2\2\u012d\u012e\7r\2\2\u012e\u01f0\7n\2\2\u012f"+ + "\u0130\7e\2\2\u0130\u0131\7n\2\2\u0131\u01f0\7e\2\2\u0132\u0133\7l\2\2"+ + "\u0133\u0134\7u\2\2\u0134\u01f0\7t\2\2\u0135\u0136\7c\2\2\u0136\u0137"+ + "\7p\2\2\u0137\u01f0\7f\2\2\u0138\u0139\7t\2\2\u0139\u013a\7n\2\2\u013a"+ + "\u01f0\7c\2\2\u013b\u013c\7d\2\2\u013c\u013d\7k\2\2\u013d\u01f0\7v\2\2"+ + "\u013e\u013f\7t\2\2\u013f\u0140\7q\2\2\u0140\u01f0\7n\2\2\u0141\u0142"+ + "\7r\2\2\u0142\u0143\7n\2\2\u0143\u01f0\7c\2\2\u0144\u0145\7r\2\2\u0145"+ + "\u0146\7n\2\2\u0146\u01f0\7r\2\2\u0147\u0148\7d\2\2\u0148\u0149\7o\2\2"+ + "\u0149\u01f0\7k\2\2\u014a\u014b\7u\2\2\u014b\u014c\7g\2\2\u014c\u01f0"+ + "\7e\2\2\u014d\u014e\7t\2\2\u014e\u014f\7v\2\2\u014f\u01f0\7k\2\2\u0150"+ + "\u0151\7g\2\2\u0151\u0152\7q\2\2\u0152\u01f0\7t\2\2\u0153\u0154\7u\2\2"+ + "\u0154\u0155\7t\2\2\u0155\u01f0\7g\2\2\u0156\u0157\7n\2\2\u0157\u0158"+ + "\7u\2\2\u0158\u01f0\7t\2\2\u0159\u015a\7r\2\2\u015a\u015b\7j\2\2\u015b"+ + "\u01f0\7c\2\2\u015c\u015d\7c\2\2\u015d\u015e\7n\2\2\u015e\u01f0\7t\2\2"+ + "\u015f\u0160\7l\2\2\u0160\u0161\7o\2\2\u0161\u01f0\7r\2\2\u0162\u0163"+ + "\7d\2\2\u0163\u0164\7x\2\2\u0164\u01f0\7e\2\2\u0165\u0166\7e\2\2\u0166"+ + "\u0167\7n\2\2\u0167\u01f0\7k\2\2\u0168\u0169\7t\2\2\u0169\u016a\7v\2\2"+ + "\u016a\u01f0\7u\2\2\u016b\u016c\7c\2\2\u016c\u016d\7f\2\2\u016d\u01f0"+ + "\7e\2\2\u016e\u016f\7t\2\2\u016f\u0170\7t\2\2\u0170\u01f0\7c\2\2\u0171"+ + "\u0172\7d\2\2\u0172\u0173\7x\2\2\u0173\u01f0\7u\2\2\u0174\u0175\7u\2\2"+ + "\u0175\u0176\7g\2\2\u0176\u01f0\7k\2\2\u0177\u0178\7u\2\2\u0178\u0179"+ + "\7c\2\2\u0179\u01f0\7z\2\2\u017a\u017b\7u\2\2\u017b\u017c\7v\2\2\u017c"+ + "\u01f0\7{\2\2\u017d\u017e\7u\2\2\u017e\u017f\7v\2\2\u017f\u01f0\7c\2\2"+ + "\u0180\u0181\7u\2\2\u0181\u0182\7v\2\2\u0182\u01f0\7z\2\2\u0183\u0184"+ + "\7f\2\2\u0184\u0185\7g\2\2\u0185\u01f0\7{\2\2\u0186\u0187\7v\2\2\u0187"+ + "\u0188\7z\2\2\u0188\u01f0\7c\2\2\u0189\u018a\7z\2\2\u018a\u018b\7c\2\2"+ + "\u018b\u01f0\7c\2\2\u018c\u018d\7d\2\2\u018d\u018e\7e\2\2\u018e\u01f0"+ + "\7e\2\2\u018f\u0190\7c\2\2\u0190\u0191\7j\2\2\u0191\u01f0\7z\2\2\u0192"+ + "\u0193\7v\2\2\u0193\u0194\7{\2\2\u0194\u01f0\7c\2\2\u0195\u0196\7v\2\2"+ + "\u0196\u0197\7z\2\2\u0197\u01f0\7u\2\2\u0198\u0199\7v\2\2\u0199\u019a"+ + "\7c\2\2\u019a\u01f0\7u\2\2\u019b\u019c\7u\2\2\u019c\u019d\7j\2\2\u019d"+ + "\u01f0\7{\2\2\u019e\u019f\7u\2\2\u019f\u01a0\7j\2\2\u01a0\u01f0\7z\2\2"+ + "\u01a1\u01a2\7n\2\2\u01a2\u01a3\7f\2\2\u01a3\u01f0\7{\2\2\u01a4\u01a5"+ + "\7n\2\2\u01a5\u01a6\7f\2\2\u01a6\u01f0\7c\2\2\u01a7\u01a8\7n\2\2\u01a8"+ + "\u01a9\7f\2\2\u01a9\u01f0\7z\2\2\u01aa\u01ab\7n\2\2\u01ab\u01ac\7c\2\2"+ + "\u01ac\u01f0\7z\2\2\u01ad\u01ae\7v\2\2\u01ae\u01af\7c\2\2\u01af\u01f0"+ + "\7{\2\2\u01b0\u01b1\7v\2\2\u01b1\u01b2\7c\2\2\u01b2\u01f0\7z\2\2\u01b3"+ + "\u01b4\7d\2\2\u01b4\u01b5\7e\2\2\u01b5\u01f0\7u\2\2\u01b6\u01b7\7e\2\2"+ + "\u01b7\u01b8\7n\2\2\u01b8\u01f0\7x\2\2\u01b9\u01ba\7v\2\2\u01ba\u01bb"+ + "\7u\2\2\u01bb\u01f0\7z\2\2\u01bc\u01bd\7n\2\2\u01bd\u01be\7c\2\2\u01be"+ + "\u01f0\7u\2\2\u01bf\u01c0\7e\2\2\u01c0\u01c1\7r\2\2\u01c1\u01f0\7{\2\2"+ + "\u01c2\u01c3\7e\2\2\u01c3\u01c4\7o\2\2\u01c4\u01f0\7r\2\2\u01c5\u01c6"+ + "\7e\2\2\u01c6\u01c7\7r\2\2\u01c7\u01f0\7z\2\2\u01c8\u01c9\7f\2\2\u01c9"+ + "\u01ca\7e\2\2\u01ca\u01f0\7r\2\2\u01cb\u01cc\7f\2\2\u01cc\u01cd\7g\2\2"+ + "\u01cd\u01f0\7e\2\2\u01ce\u01cf\7k\2\2\u01cf\u01d0\7p\2\2\u01d0\u01f0"+ + "\7e\2\2\u01d1\u01d2\7c\2\2\u01d2\u01d3\7z\2\2\u01d3\u01f0\7u\2\2\u01d4"+ + "\u01d5\7d\2\2\u01d5\u01d6\7p\2\2\u01d6\u01f0\7g\2\2\u01d7\u01d8\7e\2\2"+ + "\u01d8\u01d9\7n\2\2\u01d9\u01f0\7f\2\2\u01da\u01db\7u\2\2\u01db\u01dc"+ + "\7d\2\2\u01dc\u01f0\7e\2\2\u01dd\u01de\7k\2\2\u01de\u01df\7u\2\2\u01df"+ + "\u01f0\7e\2\2\u01e0\u01e1\7k\2\2\u01e1\u01e2\7p\2\2\u01e2\u01f0\7z\2\2"+ + "\u01e3\u01e4\7d\2\2\u01e4\u01e5\7g\2\2\u01e5\u01f0\7s\2\2\u01e6\u01e7"+ + "\7u\2\2\u01e7\u01e8\7g\2\2\u01e8\u01f0\7f\2\2\u01e9\u01ea\7f\2\2\u01ea"+ + "\u01eb\7g\2\2\u01eb\u01f0\7z\2\2\u01ec\u01ed\7k\2\2\u01ed\u01ee\7p\2\2"+ + "\u01ee\u01f0\7{\2\2\u01ef\u0114\3\2\2\2\u01ef\u0117\3\2\2\2\u01ef\u011a"+ + "\3\2\2\2\u01ef\u011d\3\2\2\2\u01ef\u0120\3\2\2\2\u01ef\u0123\3\2\2\2\u01ef"+ + "\u0126\3\2\2\2\u01ef\u0129\3\2\2\2\u01ef\u012c\3\2\2\2\u01ef\u012f\3\2"+ + "\2\2\u01ef\u0132\3\2\2\2\u01ef\u0135\3\2\2\2\u01ef\u0138\3\2\2\2\u01ef"+ + "\u013b\3\2\2\2\u01ef\u013e\3\2\2\2\u01ef\u0141\3\2\2\2\u01ef\u0144\3\2"+ + "\2\2\u01ef\u0147\3\2\2\2\u01ef\u014a\3\2\2\2\u01ef\u014d\3\2\2\2\u01ef"+ + "\u0150\3\2\2\2\u01ef\u0153\3\2\2\2\u01ef\u0156\3\2\2\2\u01ef\u0159\3\2"+ + "\2\2\u01ef\u015c\3\2\2\2\u01ef\u015f\3\2\2\2\u01ef\u0162\3\2\2\2\u01ef"+ + "\u0165\3\2\2\2\u01ef\u0168\3\2\2\2\u01ef\u016b\3\2\2\2\u01ef\u016e\3\2"+ + "\2\2\u01ef\u0171\3\2\2\2\u01ef\u0174\3\2\2\2\u01ef\u0177\3\2\2\2\u01ef"+ + "\u017a\3\2\2\2\u01ef\u017d\3\2\2\2\u01ef\u0180\3\2\2\2\u01ef\u0183\3\2"+ + "\2\2\u01ef\u0186\3\2\2\2\u01ef\u0189\3\2\2\2\u01ef\u018c\3\2\2\2\u01ef"+ + "\u018f\3\2\2\2\u01ef\u0192\3\2\2\2\u01ef\u0195\3\2\2\2\u01ef\u0198\3\2"+ + "\2\2\u01ef\u019b\3\2\2\2\u01ef\u019e\3\2\2\2\u01ef\u01a1\3\2\2\2\u01ef"+ + "\u01a4\3\2\2\2\u01ef\u01a7\3\2\2\2\u01ef\u01aa\3\2\2\2\u01ef\u01ad\3\2"+ + "\2\2\u01ef\u01b0\3\2\2\2\u01ef\u01b3\3\2\2\2\u01ef\u01b6\3\2\2\2\u01ef"+ + "\u01b9\3\2\2\2\u01ef\u01bc\3\2\2\2\u01ef\u01bf\3\2\2\2\u01ef\u01c2\3\2"+ + "\2\2\u01ef\u01c5\3\2\2\2\u01ef\u01c8\3\2\2\2\u01ef\u01cb\3\2\2\2\u01ef"+ + "\u01ce\3\2\2\2\u01ef\u01d1\3\2\2\2\u01ef\u01d4\3\2\2\2\u01ef\u01d7\3\2"+ + "\2\2\u01ef\u01da\3\2\2\2\u01ef\u01dd\3\2\2\2\u01ef\u01e0\3\2\2\2\u01ef"+ + "\u01e3\3\2\2\2\u01ef\u01e6\3\2\2\2\u01ef\u01e9\3\2\2\2\u01ef\u01ec\3\2"+ + "\2\2\u01f0`\3\2\2\2\u01f1\u01f2\7d\2\2\u01f2\u01f3\7{\2\2\u01f3\u01f4"+ + "\7v\2\2\u01f4\u0205\7g\2\2\u01f5\u01f6\7y\2\2\u01f6\u01f7\7q\2\2\u01f7"+ + "\u01f8\7t\2\2\u01f8\u0205\7f\2\2\u01f9\u01fa\7d\2\2\u01fa\u01fb\7q\2\2"+ + "\u01fb\u01fc\7q\2\2\u01fc\u01fd\7n\2\2\u01fd\u01fe\7g\2\2\u01fe\u01ff"+ + "\7c\2\2\u01ff\u0205\7p\2\2\u0200\u0201\7x\2\2\u0201\u0202\7q\2\2\u0202"+ + "\u0203\7k\2\2\u0203\u0205\7f\2\2\u0204\u01f1\3\2\2\2\u0204\u01f5\3\2\2"+ + "\2\u0204\u01f9\3\2\2\2\u0204\u0200\3\2\2\2\u0205b\3\2\2\2\u0206\u020c"+ + "\7$\2\2\u0207\u0208\7^\2\2\u0208\u020b\7$\2\2\u0209\u020b\n\2\2\2\u020a"+ + "\u0207\3\2\2\2\u020a\u0209\3\2\2\2\u020b\u020e\3\2\2\2\u020c\u020a\3\2"+ + "\2\2\u020c\u020d\3\2\2\2\u020d\u020f\3\2\2\2\u020e\u020c\3\2\2\2\u020f"+ + "\u0210\7$\2\2\u0210d\3\2\2\2\u0211\u0215\7)\2\2\u0212\u0213\7^\2\2\u0213"+ + "\u0216\7)\2\2\u0214\u0216\n\3\2\2\u0215\u0212\3\2\2\2\u0215\u0214\3\2"+ + "\2\2\u0216\u0217\3\2\2\2\u0217\u0218\7)\2\2\u0218f\3\2\2\2\u0219\u021a"+ + "\7v\2\2\u021a\u021b\7t\2\2\u021b\u021c\7w\2\2\u021c\u0223\7g\2\2\u021d"+ + "\u021e\7h\2\2\u021e\u021f\7c\2\2\u021f\u0220\7n\2\2\u0220\u0221\7u\2\2"+ + "\u0221\u0223\7g\2\2\u0222\u0219\3\2\2\2\u0222\u021d\3\2\2\2\u0223h\3\2"+ + "\2\2\u0224\u0227\5k\66\2\u0225\u0227\5s:\2\u0226\u0224\3\2\2\2\u0226\u0225"+ + "\3\2\2\2\u0227j\3\2\2\2\u0228\u022c\5m\67\2\u0229\u022c\5o8\2\u022a\u022c"+ + "\5q9\2\u022b\u0228\3\2\2\2\u022b\u0229\3\2\2\2\u022b\u022a\3\2\2\2\u022c"+ + "l\3\2\2\2\u022d\u0233\7\'\2\2\u022e\u022f\7\62\2\2\u022f\u0233\7d\2\2"+ + "\u0230\u0231\7\62\2\2\u0231\u0233\7D\2\2\u0232\u022d\3\2\2\2\u0232\u022e"+ + "\3\2\2\2\u0232\u0230\3\2\2\2\u0233\u0237\3\2\2\2\u0234\u0236\5{>\2\u0235"+ + "\u0234\3\2\2\2\u0236\u0239\3\2\2\2\u0237\u0235\3\2\2\2\u0237\u0238\3\2"+ + "\2\2\u0238\u023a\3\2\2\2\u0239\u0237\3\2\2\2\u023a\u023c\7\60\2\2\u023b"+ + "\u023d\5{>\2\u023c\u023b\3\2\2\2\u023d\u023e\3\2\2\2\u023e\u023c\3\2\2"+ + "\2\u023e\u023f\3\2\2\2\u023fn\3\2\2\2\u0240\u0242\5}?\2\u0241\u0240\3"+ + "\2\2\2\u0242\u0245\3\2\2\2\u0243\u0241\3\2\2\2\u0243\u0244\3\2\2\2\u0244"+ + "\u0246\3\2\2\2\u0245\u0243\3\2\2\2\u0246\u0248\7\60\2\2\u0247\u0249\5"+ + "}?\2\u0248\u0247\3\2\2\2\u0249\u024a\3\2\2\2\u024a\u0248\3\2\2\2\u024a"+ + "\u024b\3\2\2\2\u024bp\3\2\2\2\u024c\u0252\7&\2\2\u024d\u024e\7\62\2\2"+ + "\u024e\u0252\7z\2\2\u024f\u0250\7\62\2\2\u0250\u0252\7Z\2\2\u0251\u024c"+ + "\3\2\2\2\u0251\u024d\3\2\2\2\u0251\u024f\3\2\2\2\u0252\u0256\3\2\2\2\u0253"+ + "\u0255\5\177@\2\u0254\u0253\3\2\2\2\u0255\u0258\3\2\2\2\u0256\u0254\3"+ + "\2\2\2\u0256\u0257\3\2\2\2\u0257\u0259\3\2\2\2\u0258\u0256\3\2\2\2\u0259"+ + "\u025b\7\60\2\2\u025a\u025c\5\177@\2\u025b\u025a\3\2\2\2\u025c\u025d\3"+ + "\2\2\2\u025d\u025b\3\2\2\2\u025d\u025e\3\2\2\2\u025er\3\2\2\2\u025f\u0263"+ + "\5w<\2\u0260\u0263\5y=\2\u0261\u0263\5u;\2\u0262\u025f\3\2\2\2\u0262\u0260"+ + "\3\2\2\2\u0262\u0261\3\2\2\2\u0263t\3\2\2\2\u0264\u0265\7\62\2\2\u0265"+ + "\u0267\t\4\2\2\u0266\u0268\5{>\2\u0267\u0266\3\2\2\2\u0268\u0269\3\2\2"+ + "\2\u0269\u0267\3\2\2\2\u0269\u026a\3\2\2\2\u026a\u0272\3\2\2\2\u026b\u026d"+ + "\7\'\2\2\u026c\u026e\5{>\2\u026d\u026c\3\2\2\2\u026e\u026f\3\2\2\2\u026f"+ + "\u026d\3\2\2\2\u026f\u0270\3\2\2\2\u0270\u0272\3\2\2\2\u0271\u0264\3\2"+ + "\2\2\u0271\u026b\3\2\2\2\u0272v\3\2\2\2\u0273\u0275\5}?\2\u0274\u0273"+ + "\3\2\2\2\u0275\u0276\3\2\2\2\u0276\u0274\3\2\2\2\u0276\u0277\3\2\2\2\u0277"+ + "x\3\2\2\2\u0278\u027e\7&\2\2\u0279\u027a\7\62\2\2\u027a\u027e\7z\2\2\u027b"+ + "\u027c\7\62\2\2\u027c\u027e\7Z\2\2\u027d\u0278\3\2\2\2\u027d\u0279\3\2"+ + "\2\2\u027d\u027b\3\2\2\2\u027e\u0280\3\2\2\2\u027f\u0281\5\177@\2\u0280"+ + "\u027f\3\2\2\2\u0281\u0282\3\2\2\2\u0282\u0280\3\2\2\2\u0282\u0283\3\2"+ + "\2\2\u0283z\3\2\2\2\u0284\u0285\t\5\2\2\u0285|\3\2\2\2\u0286\u0287\t\6"+ + "\2\2\u0287~\3\2\2\2\u0288\u0289\t\7\2\2\u0289\u0080\3\2\2\2\u028a\u028e"+ + "\5\u0083B\2\u028b\u028d\5\u0085C\2\u028c\u028b\3\2\2\2\u028d\u0290\3\2"+ + "\2\2\u028e\u028c\3\2\2\2\u028e\u028f\3\2\2\2\u028f\u0082\3\2\2\2\u0290"+ + "\u028e\3\2\2\2\u0291\u0292\t\b\2\2\u0292\u0084\3\2\2\2\u0293\u0294\t\t"+ + "\2\2\u0294\u0086\3\2\2\2\u0295\u0299\7#\2\2\u0296\u0298\t\n\2\2\u0297"+ + "\u0296\3\2\2\2\u0298\u029b\3\2\2\2\u0299\u0297\3\2\2\2\u0299\u029a\3\2"+ + "\2\2\u029a\u0088\3\2\2\2\u029b\u0299\3\2\2\2\u029c\u029e\t\13\2\2\u029d"+ + "\u029c\3\2\2\2\u029e\u029f\3\2\2\2\u029f\u029d\3\2\2\2\u029f\u02a0\3\2"+ + "\2\2\u02a0\u02a1\3\2\2\2\u02a1\u02a2\bE\2\2\u02a2\u008a\3\2\2\2\u02a3"+ + "\u02a4\7\61\2\2\u02a4\u02a5\7\61\2\2\u02a5\u02a9\3\2\2\2\u02a6\u02a8\n"+ + "\f\2\2\u02a7\u02a6\3\2\2\2\u02a8\u02ab\3\2\2\2\u02a9\u02a7\3\2\2\2\u02a9"+ + "\u02aa\3\2\2\2\u02aa\u02ac\3\2\2\2\u02ab\u02a9\3\2\2\2\u02ac\u02ad\bF"+ + "\2\2\u02ad\u008c\3\2\2\2\u02ae\u02af\7\61\2\2\u02af\u02b0\7,\2\2\u02b0"+ + "\u02b4\3\2\2\2\u02b1\u02b3\13\2\2\2\u02b2\u02b1\3\2\2\2\u02b3\u02b6\3"+ + "\2\2\2\u02b4\u02b5\3\2\2\2\u02b4\u02b2\3\2\2\2\u02b5\u02b7\3\2\2\2\u02b6"+ + "\u02b4\3\2\2\2\u02b7\u02b8\7,\2\2\u02b8\u02b9\7\61\2\2\u02b9\u02ba\3\2"+ + "\2\2\u02ba\u02bb\bG\2\2\u02bb\u008e\3\2\2\2\37\2\u01ef\u0204\u020a\u020c"+ + "\u0215\u0222\u0226\u022b\u0232\u0237\u023e\u0243\u024a\u0251\u0256\u025d"+ + "\u0262\u0269\u026f\u0271\u0276\u027d\u0282\u028e\u0299\u029f\u02a9\u02b4"+ + "\3\b\2\2"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCLexer.tokens b/src/main/java/dk/camelot64/kickc/parser/KickCLexer.tokens index 4c5bf2b25..8daa77307 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCLexer.tokens +++ b/src/main/java/dk/camelot64/kickc/parser/KickCLexer.tokens @@ -43,25 +43,26 @@ T__41=42 T__42=43 T__43=44 T__44=45 -MNEMONIC=46 -SIMPLETYPE=47 -STRING=48 -CHAR=49 -BOOLEAN=50 -NUMBER=51 -NUMFLOAT=52 -BINFLOAT=53 -DECFLOAT=54 -HEXFLOAT=55 -NUMINT=56 -BININTEGER=57 -DECINTEGER=58 -HEXINTEGER=59 -NAME=60 -ASMREL=61 -WS=62 -COMMENT_LINE=63 -COMMENT_BLOCK=64 +T__45=46 +MNEMONIC=47 +SIMPLETYPE=48 +STRING=49 +CHAR=50 +BOOLEAN=51 +NUMBER=52 +NUMFLOAT=53 +BINFLOAT=54 +DECFLOAT=55 +HEXFLOAT=56 +NUMINT=57 +BININTEGER=58 +DECINTEGER=59 +HEXINTEGER=60 +NAME=61 +ASMREL=62 +WS=63 +COMMENT_LINE=64 +COMMENT_BLOCK=65 '{'=1 '}'=2 '('=3 @@ -79,31 +80,32 @@ COMMENT_BLOCK=64 ':'=15 '..'=16 ','=17 -'*'=18 -'['=19 -']'=20 -'<'=21 -'>'=22 -'--'=23 -'++'=24 -'+'=25 -'-'=26 -'!'=27 -'&'=28 -'~'=29 -'>>'=30 -'<<'=31 -'/'=32 -'%'=33 -'=='=34 -'!='=35 -'<>'=36 -'<='=37 -'=<'=38 -'>='=39 -'=>'=40 -'^'=41 -'|'=42 -'&&'=43 -'||'=44 -'#'=45 +'signed'=18 +'*'=19 +'['=20 +']'=21 +'<'=22 +'>'=23 +'--'=24 +'++'=25 +'+'=26 +'-'=27 +'!'=28 +'&'=29 +'~'=30 +'>>'=31 +'<<'=32 +'/'=33 +'%'=34 +'=='=35 +'!='=36 +'<>'=37 +'<='=38 +'=<'=39 +'>='=40 +'=>'=41 +'^'=42 +'|'=43 +'&&'=44 +'||'=45 +'#'=46 diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCListener.java b/src/main/java/dk/camelot64/kickc/parser/KickCListener.java index 7429b4897..12a011535 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCListener.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCListener.java @@ -261,6 +261,18 @@ public interface KickCListener extends ParseTreeListener { * @param ctx the parse tree */ void exitTypeSimple(KickCParser.TypeSimpleContext ctx); + /** + * Enter a parse tree produced by the {@code typeSignedSimple} + * labeled alternative in {@link KickCParser#typeDecl}. + * @param ctx the parse tree + */ + void enterTypeSignedSimple(KickCParser.TypeSignedSimpleContext ctx); + /** + * Exit a parse tree produced by the {@code typeSignedSimple} + * labeled alternative in {@link KickCParser#typeDecl}. + * @param ctx the parse tree + */ + void exitTypeSignedSimple(KickCParser.TypeSignedSimpleContext ctx); /** * Enter a parse tree produced by the {@code initExpr} * labeled alternative in {@link KickCParser#initializer}. diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCParser.java b/src/main/java/dk/camelot64/kickc/parser/KickCParser.java index b7320e656..b2c165853 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCParser.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCParser.java @@ -23,10 +23,10 @@ public class KickCParser extends Parser { T__24=25, T__25=26, T__26=27, T__27=28, T__28=29, T__29=30, T__30=31, T__31=32, T__32=33, T__33=34, T__34=35, T__35=36, T__36=37, T__37=38, T__38=39, T__39=40, T__40=41, T__41=42, T__42=43, T__43=44, T__44=45, - MNEMONIC=46, SIMPLETYPE=47, STRING=48, CHAR=49, BOOLEAN=50, NUMBER=51, - NUMFLOAT=52, BINFLOAT=53, DECFLOAT=54, HEXFLOAT=55, NUMINT=56, BININTEGER=57, - DECINTEGER=58, HEXINTEGER=59, NAME=60, ASMREL=61, WS=62, COMMENT_LINE=63, - COMMENT_BLOCK=64; + T__45=46, MNEMONIC=47, SIMPLETYPE=48, STRING=49, CHAR=50, BOOLEAN=51, + NUMBER=52, NUMFLOAT=53, BINFLOAT=54, DECFLOAT=55, HEXFLOAT=56, NUMINT=57, + BININTEGER=58, DECINTEGER=59, HEXINTEGER=60, NAME=61, ASMREL=62, WS=63, + COMMENT_LINE=64, COMMENT_BLOCK=65; public static final int RULE_file = 0, RULE_asmFile = 1, RULE_stmtSeq = 2, RULE_stmt = 3, RULE_forDeclaration = 4, RULE_forIteration = 5, RULE_parameterListDecl = 6, RULE_parameterDecl = 7, @@ -43,15 +43,16 @@ public class KickCParser extends Parser { private static final String[] _LITERAL_NAMES = { null, "'{'", "'}'", "'('", "')'", "'const'", "'='", "';'", "'if'", "'else'", "'while'", "'do'", "'for'", "'return'", "'asm'", "':'", "'..'", "','", - "'*'", "'['", "']'", "'<'", "'>'", "'--'", "'++'", "'+'", "'-'", "'!'", - "'&'", "'~'", "'>>'", "'<<'", "'/'", "'%'", "'=='", "'!='", "'<>'", "'<='", - "'=<'", "'>='", "'=>'", "'^'", "'|'", "'&&'", "'||'", "'#'" + "'signed'", "'*'", "'['", "']'", "'<'", "'>'", "'--'", "'++'", "'+'", + "'-'", "'!'", "'&'", "'~'", "'>>'", "'<<'", "'/'", "'%'", "'=='", "'!='", + "'<>'", "'<='", "'=<'", "'>='", "'=>'", "'^'", "'|'", "'&&'", "'||'", + "'#'" }; private static final String[] _SYMBOLIC_NAMES = { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, "MNEMONIC", + null, null, null, null, null, null, null, null, null, null, null, "MNEMONIC", "SIMPLETYPE", "STRING", "CHAR", "BOOLEAN", "NUMBER", "NUMFLOAT", "BINFLOAT", "DECFLOAT", "HEXFLOAT", "NUMINT", "BININTEGER", "DECINTEGER", "HEXINTEGER", "NAME", "ASMREL", "WS", "COMMENT_LINE", "COMMENT_BLOCK" @@ -245,7 +246,7 @@ public class KickCParser extends Parser { setState(47); _errHandler.sync(this); _la = _input.LA(1); - } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__2) | (1L << T__4) | (1L << T__7) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__17) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << SIMPLETYPE) | (1L << STRING) | (1L << CHAR) | (1L << BOOLEAN) | (1L << NUMBER) | (1L << NAME))) != 0) ); + } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__2) | (1L << T__4) | (1L << T__7) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__17) | (1L << T__18) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << T__29) | (1L << SIMPLETYPE) | (1L << STRING) | (1L << CHAR) | (1L << BOOLEAN) | (1L << NUMBER) | (1L << NAME))) != 0) ); } } catch (RecognitionException re) { @@ -529,7 +530,7 @@ public class KickCParser extends Parser { setState(51); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__2) | (1L << T__4) | (1L << T__7) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__17) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << SIMPLETYPE) | (1L << STRING) | (1L << CHAR) | (1L << BOOLEAN) | (1L << NUMBER) | (1L << NAME))) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__2) | (1L << T__4) | (1L << T__7) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__17) | (1L << T__18) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << T__29) | (1L << SIMPLETYPE) | (1L << STRING) | (1L << CHAR) | (1L << BOOLEAN) | (1L << NUMBER) | (1L << NAME))) != 0)) { { setState(50); stmtSeq(); @@ -553,7 +554,7 @@ public class KickCParser extends Parser { setState(58); _errHandler.sync(this); _la = _input.LA(1); - if (_la==SIMPLETYPE) { + if (_la==T__17 || _la==SIMPLETYPE) { { setState(57); parameterListDecl(); @@ -567,7 +568,7 @@ public class KickCParser extends Parser { setState(63); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__2) | (1L << T__4) | (1L << T__7) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__17) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << SIMPLETYPE) | (1L << STRING) | (1L << CHAR) | (1L << BOOLEAN) | (1L << NUMBER) | (1L << NAME))) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__2) | (1L << T__4) | (1L << T__7) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__17) | (1L << T__18) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << T__29) | (1L << SIMPLETYPE) | (1L << STRING) | (1L << CHAR) | (1L << BOOLEAN) | (1L << NUMBER) | (1L << NAME))) != 0)) { { setState(62); stmtSeq(); @@ -711,7 +712,7 @@ public class KickCParser extends Parser { setState(112); _errHandler.sync(this); _la = _input.LA(1); - if (_la==SIMPLETYPE || _la==NAME) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__17) | (1L << SIMPLETYPE) | (1L << NAME))) != 0)) { { setState(111); forDeclaration(); @@ -735,7 +736,7 @@ public class KickCParser extends Parser { setState(120); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__2) | (1L << T__17) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << STRING) | (1L << CHAR) | (1L << BOOLEAN) | (1L << NUMBER) | (1L << NAME))) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__2) | (1L << T__18) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << T__29) | (1L << STRING) | (1L << CHAR) | (1L << BOOLEAN) | (1L << NUMBER) | (1L << NAME))) != 0)) { { setState(119); expr(0); @@ -819,7 +820,7 @@ public class KickCParser extends Parser { setState(131); _errHandler.sync(this); _la = _input.LA(1); - if (_la==SIMPLETYPE) { + if (_la==T__17 || _la==SIMPLETYPE) { { setState(130); typeDecl(0); @@ -930,7 +931,7 @@ public class KickCParser extends Parser { setState(142); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__2) | (1L << T__17) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << STRING) | (1L << CHAR) | (1L << BOOLEAN) | (1L << NUMBER) | (1L << NAME))) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__2) | (1L << T__18) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << T__29) | (1L << STRING) | (1L << CHAR) | (1L << BOOLEAN) | (1L << NUMBER) | (1L << NAME))) != 0)) { { setState(141); expr(0); @@ -1150,6 +1151,23 @@ public class KickCParser extends Parser { else return visitor.visitChildren(this); } } + public static class TypeSignedSimpleContext extends TypeDeclContext { + public TerminalNode SIMPLETYPE() { return getToken(KickCParser.SIMPLETYPE, 0); } + public TypeSignedSimpleContext(TypeDeclContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KickCListener ) ((KickCListener)listener).enterTypeSignedSimple(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KickCListener ) ((KickCListener)listener).exitTypeSignedSimple(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof KickCVisitor ) return ((KickCVisitor)visitor).visitTypeSignedSimple(this); + else return visitor.visitChildren(this); + } + } public final TypeDeclContext typeDecl() throws RecognitionException { return typeDecl(0); @@ -1167,64 +1185,83 @@ public class KickCParser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - { - _localctx = new TypeSimpleContext(_localctx); - _ctx = _localctx; - _prevctx = _localctx; + setState(166); + _errHandler.sync(this); + switch (_input.LA(1)) { + case SIMPLETYPE: + { + _localctx = new TypeSimpleContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; - setState(163); - match(SIMPLETYPE); + setState(163); + match(SIMPLETYPE); + } + break; + case T__17: + { + _localctx = new TypeSignedSimpleContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(164); + match(T__17); + setState(165); + match(SIMPLETYPE); + } + break; + default: + throw new NoViableAltException(this); } _ctx.stop = _input.LT(-1); - setState(175); + setState(178); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,17,_ctx); + _alt = getInterpreter().adaptivePredict(_input,18,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(173); + setState(176); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,16,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,17,_ctx) ) { case 1: { _localctx = new TypePtrContext(new TypeDeclContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_typeDecl); - setState(165); + setState(168); if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); - setState(166); - match(T__17); + setState(169); + match(T__18); } break; case 2: { _localctx = new TypeArrayContext(new TypeDeclContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_typeDecl); - setState(167); - if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(168); - match(T__18); setState(170); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(171); + match(T__19); + setState(173); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__2) | (1L << T__17) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << STRING) | (1L << CHAR) | (1L << BOOLEAN) | (1L << NUMBER) | (1L << NAME))) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__2) | (1L << T__18) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << T__29) | (1L << STRING) | (1L << CHAR) | (1L << BOOLEAN) | (1L << NUMBER) | (1L << NAME))) != 0)) { { - setState(169); + setState(172); expr(0); } } - setState(172); - match(T__19); + setState(175); + match(T__20); } break; } } } - setState(177); + setState(180); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,17,_ctx); + _alt = getInterpreter().adaptivePredict(_input,18,_ctx); } } } @@ -1297,12 +1334,11 @@ public class KickCParser extends Parser { enterRule(_localctx, 18, RULE_initializer); int _la; try { - setState(190); + setState(193); _errHandler.sync(this); switch (_input.LA(1)) { case T__2: - case T__17: - case T__20: + case T__18: case T__21: case T__22: case T__23: @@ -1311,6 +1347,7 @@ public class KickCParser extends Parser { case T__26: case T__27: case T__28: + case T__29: case STRING: case CHAR: case BOOLEAN: @@ -1319,7 +1356,7 @@ public class KickCParser extends Parser { _localctx = new InitExprContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(178); + setState(181); expr(0); } break; @@ -1327,27 +1364,27 @@ public class KickCParser extends Parser { _localctx = new InitListContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(179); + setState(182); match(T__0); - setState(180); + setState(183); initializer(); - setState(185); + setState(188); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__16) { { { - setState(181); + setState(184); match(T__16); - setState(182); + setState(185); initializer(); } } - setState(187); + setState(190); _errHandler.sync(this); _la = _input.LA(1); } - setState(188); + setState(191); match(T__1); } break; @@ -1488,16 +1525,16 @@ public class KickCParser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(203); + setState(206); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,20,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,21,_ctx) ) { case 1: { _localctx = new LvalueNameContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(193); + setState(196); match(NAME); } break; @@ -1506,9 +1543,9 @@ public class KickCParser extends Parser { _localctx = new LvaluePtrContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(194); - match(T__17); - setState(195); + setState(197); + match(T__18); + setState(198); match(NAME); } break; @@ -1517,13 +1554,13 @@ public class KickCParser extends Parser { _localctx = new LvaluePtrExprContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(196); - match(T__17); - setState(197); - match(T__2); - setState(198); - expr(0); setState(199); + match(T__18); + setState(200); + match(T__2); + setState(201); + expr(0); + setState(202); match(T__3); } break; @@ -1532,9 +1569,9 @@ public class KickCParser extends Parser { _localctx = new LvalueLoHiContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(201); + setState(204); _la = _input.LA(1); - if ( !(_la==T__20 || _la==T__21) ) { + if ( !(_la==T__21 || _la==T__22) ) { _errHandler.recoverInline(this); } else { @@ -1542,15 +1579,15 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(202); + setState(205); lvalue(2); } break; } _ctx.stop = _input.LT(-1); - setState(212); + setState(215); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,21,_ctx); + _alt = getInterpreter().adaptivePredict(_input,22,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); @@ -1559,20 +1596,20 @@ public class KickCParser extends Parser { { _localctx = new LvalueArrayContext(new LvalueContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_lvalue); - setState(205); - if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(206); - match(T__18); - setState(207); - expr(0); setState(208); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(209); match(T__19); + setState(210); + expr(0); + setState(211); + match(T__20); } } } - setState(214); + setState(217); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,21,_ctx); + _alt = getInterpreter().adaptivePredict(_input,22,_ctx); } } } @@ -1862,20 +1899,20 @@ public class KickCParser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(240); + setState(243); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,23,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,24,_ctx) ) { case 1: { _localctx = new ExprParContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(216); + setState(219); match(T__2); - setState(217); + setState(220); expr(0); - setState(218); + setState(221); match(T__3); } break; @@ -1884,21 +1921,21 @@ public class KickCParser extends Parser { _localctx = new ExprCallContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(220); - match(NAME); - setState(221); - match(T__2); setState(223); + match(NAME); + setState(224); + match(T__2); + setState(226); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__2) | (1L << T__17) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << STRING) | (1L << CHAR) | (1L << BOOLEAN) | (1L << NUMBER) | (1L << NAME))) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__2) | (1L << T__18) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << T__29) | (1L << STRING) | (1L << CHAR) | (1L << BOOLEAN) | (1L << NUMBER) | (1L << NAME))) != 0)) { { - setState(222); + setState(225); parameterList(); } } - setState(225); + setState(228); match(T__3); } break; @@ -1907,13 +1944,13 @@ public class KickCParser extends Parser { _localctx = new ExprCastContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(226); - match(T__2); - setState(227); - typeDecl(0); - setState(228); - match(T__3); setState(229); + match(T__2); + setState(230); + typeDecl(0); + setState(231); + match(T__3); + setState(232); expr(19); } break; @@ -1922,9 +1959,9 @@ public class KickCParser extends Parser { _localctx = new ExprPreModContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(231); + setState(234); _la = _input.LA(1); - if ( !(_la==T__22 || _la==T__23) ) { + if ( !(_la==T__23 || _la==T__24) ) { _errHandler.recoverInline(this); } else { @@ -1932,7 +1969,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(232); + setState(235); expr(17); } break; @@ -1941,9 +1978,9 @@ public class KickCParser extends Parser { _localctx = new ExprUnaryContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(233); + setState(236); _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__17) | (1L << T__20) | (1L << T__21) | (1L << T__24) | (1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28))) != 0)) ) { + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__18) | (1L << T__21) | (1L << T__22) | (1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << T__29))) != 0)) ) { _errHandler.recoverInline(this); } else { @@ -1951,7 +1988,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(234); + setState(237); expr(15); } break; @@ -1960,7 +1997,7 @@ public class KickCParser extends Parser { _localctx = new ExprIdContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(235); + setState(238); match(NAME); } break; @@ -1969,7 +2006,7 @@ public class KickCParser extends Parser { _localctx = new ExprNumberContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(236); + setState(239); match(NUMBER); } break; @@ -1978,7 +2015,7 @@ public class KickCParser extends Parser { _localctx = new ExprStringContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(237); + setState(240); match(STRING); } break; @@ -1987,7 +2024,7 @@ public class KickCParser extends Parser { _localctx = new ExprCharContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(238); + setState(241); match(CHAR); } break; @@ -1996,52 +2033,32 @@ public class KickCParser extends Parser { _localctx = new ExprBoolContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(239); + setState(242); match(BOOLEAN); } break; } _ctx.stop = _input.LT(-1); - setState(278); + setState(281); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,25,_ctx); + _alt = getInterpreter().adaptivePredict(_input,26,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(276); + setState(279); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,24,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,25,_ctx) ) { case 1: - { - _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); - pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(242); - if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)"); - setState(243); - _la = _input.LA(1); - if ( !(_la==T__29 || _la==T__30) ) { - _errHandler.recoverInline(this); - } - else { - if ( _input.LA(1)==Token.EOF ) matchedEOF = true; - _errHandler.reportMatch(this); - consume(); - } - setState(244); - expr(15); - } - break; - case 2: { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); setState(245); - if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); + if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)"); setState(246); _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__17) | (1L << T__31) | (1L << T__32))) != 0)) ) { + if ( !(_la==T__30 || _la==T__31) ) { _errHandler.recoverInline(this); } else { @@ -2050,18 +2067,18 @@ public class KickCParser extends Parser { consume(); } setState(247); - expr(14); + expr(15); } break; - case 3: + case 2: { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); setState(248); - if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); + if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); setState(249); _la = _input.LA(1); - if ( !(_la==T__24 || _la==T__25) ) { + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__18) | (1L << T__32) | (1L << T__33))) != 0)) ) { _errHandler.recoverInline(this); } else { @@ -2070,18 +2087,18 @@ public class KickCParser extends Parser { consume(); } setState(250); - expr(13); + expr(14); } break; - case 4: + case 3: { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); setState(251); - if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); + if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); setState(252); _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__20) | (1L << T__21) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__39))) != 0)) ) { + if ( !(_la==T__25 || _la==T__26) ) { _errHandler.recoverInline(this); } else { @@ -2090,6 +2107,26 @@ public class KickCParser extends Parser { consume(); } setState(253); + expr(13); + } + break; + case 4: + { + _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_expr); + setState(254); + if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); + setState(255); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__21) | (1L << T__22) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__39) | (1L << T__40))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(256); expr(12); } break; @@ -2097,13 +2134,13 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(254); + setState(257); if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); { - setState(255); - match(T__27); + setState(258); + match(T__28); } - setState(256); + setState(259); expr(11); } break; @@ -2111,13 +2148,13 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(257); + setState(260); if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); { - setState(258); - match(T__40); + setState(261); + match(T__41); } - setState(259); + setState(262); expr(10); } break; @@ -2125,13 +2162,13 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(260); + setState(263); if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); { - setState(261); - match(T__41); + setState(264); + match(T__42); } - setState(262); + setState(265); expr(9); } break; @@ -2139,13 +2176,13 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(263); + setState(266); if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); { - setState(264); - match(T__42); + setState(267); + match(T__43); } - setState(265); + setState(268); expr(8); } break; @@ -2153,13 +2190,13 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(266); + setState(269); if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); { - setState(267); - match(T__43); + setState(270); + match(T__44); } - setState(268); + setState(271); expr(7); } break; @@ -2167,25 +2204,25 @@ public class KickCParser extends Parser { { _localctx = new ExprArrayContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(269); - if (!(precpred(_ctx, 18))) throw new FailedPredicateException(this, "precpred(_ctx, 18)"); - setState(270); - match(T__18); - setState(271); - expr(0); setState(272); + if (!(precpred(_ctx, 18))) throw new FailedPredicateException(this, "precpred(_ctx, 18)"); + setState(273); match(T__19); + setState(274); + expr(0); + setState(275); + match(T__20); } break; case 11: { _localctx = new ExprPostModContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(274); + setState(277); if (!(precpred(_ctx, 16))) throw new FailedPredicateException(this, "precpred(_ctx, 16)"); - setState(275); + setState(278); _la = _input.LA(1); - if ( !(_la==T__22 || _la==T__23) ) { + if ( !(_la==T__23 || _la==T__24) ) { _errHandler.recoverInline(this); } else { @@ -2198,9 +2235,9 @@ public class KickCParser extends Parser { } } } - setState(280); + setState(283); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,25,_ctx); + _alt = getInterpreter().adaptivePredict(_input,26,_ctx); } } } @@ -2248,21 +2285,21 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(281); + setState(284); expr(0); - setState(286); + setState(289); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__16) { { { - setState(282); + setState(285); match(T__16); - setState(283); + setState(286); expr(0); } } - setState(288); + setState(291); _errHandler.sync(this); _la = _input.LA(1); } @@ -2312,17 +2349,17 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(292); + setState(295); _errHandler.sync(this); _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__26) | (1L << MNEMONIC) | (1L << NAME))) != 0)) { + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__27) | (1L << MNEMONIC) | (1L << NAME))) != 0)) { { { - setState(289); + setState(292); asmLine(); } } - setState(294); + setState(297); _errHandler.sync(this); _la = _input.LA(1); } @@ -2369,21 +2406,21 @@ public class KickCParser extends Parser { AsmLineContext _localctx = new AsmLineContext(_ctx, getState()); enterRule(_localctx, 28, RULE_asmLine); try { - setState(297); + setState(300); _errHandler.sync(this); switch (_input.LA(1)) { - case T__26: + case T__27: case NAME: enterOuterAlt(_localctx, 1); { - setState(295); + setState(298); asmLabel(); } break; case MNEMONIC: enterOuterAlt(_localctx, 2); { - setState(296); + setState(299); asmInstruction(); } break; @@ -2427,24 +2464,24 @@ public class KickCParser extends Parser { AsmLabelContext _localctx = new AsmLabelContext(_ctx, getState()); enterRule(_localctx, 30, RULE_asmLabel); try { - setState(303); + setState(306); _errHandler.sync(this); switch (_input.LA(1)) { case NAME: enterOuterAlt(_localctx, 1); { - setState(299); + setState(302); match(NAME); - setState(300); + setState(303); match(T__14); } break; - case T__26: + case T__27: enterOuterAlt(_localctx, 2); { - setState(301); - match(T__26); - setState(302); + setState(304); + match(T__27); + setState(305); match(T__14); } break; @@ -2493,14 +2530,14 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(305); + setState(308); match(MNEMONIC); - setState(307); + setState(310); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,30,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,31,_ctx) ) { case 1: { - setState(306); + setState(309); asmParamMode(); } break; @@ -2651,14 +2688,14 @@ public class KickCParser extends Parser { AsmParamModeContext _localctx = new AsmParamModeContext(_ctx, getState()); enterRule(_localctx, 34, RULE_asmParamMode); try { - setState(332); + setState(335); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,31,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,32,_ctx) ) { case 1: _localctx = new AsmModeAbsContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(309); + setState(312); asmExpr(0); } break; @@ -2666,9 +2703,9 @@ public class KickCParser extends Parser { _localctx = new AsmModeImmContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(310); - match(T__44); - setState(311); + setState(313); + match(T__45); + setState(314); asmExpr(0); } break; @@ -2676,11 +2713,11 @@ public class KickCParser extends Parser { _localctx = new AsmModeAbsXYContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(312); + setState(315); asmExpr(0); - setState(313); + setState(316); match(T__16); - setState(314); + setState(317); match(NAME); } break; @@ -2688,15 +2725,15 @@ public class KickCParser extends Parser { _localctx = new AsmModeIndIdxXYContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(316); - match(T__2); - setState(317); - asmExpr(0); - setState(318); - match(T__3); setState(319); - match(T__16); + match(T__2); setState(320); + asmExpr(0); + setState(321); + match(T__3); + setState(322); + match(T__16); + setState(323); match(NAME); } break; @@ -2704,15 +2741,15 @@ public class KickCParser extends Parser { _localctx = new AsmModeIdxIndXYContext(_localctx); enterOuterAlt(_localctx, 5); { - setState(322); - match(T__2); - setState(323); - asmExpr(0); - setState(324); - match(T__16); setState(325); - match(NAME); + match(T__2); setState(326); + asmExpr(0); + setState(327); + match(T__16); + setState(328); + match(NAME); + setState(329); match(T__3); } break; @@ -2720,11 +2757,11 @@ public class KickCParser extends Parser { _localctx = new AsmModeIndContext(_localctx); enterOuterAlt(_localctx, 6); { - setState(328); + setState(331); match(T__2); - setState(329); + setState(332); asmExpr(0); - setState(330); + setState(333); match(T__3); } break; @@ -2895,21 +2932,21 @@ public class KickCParser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(344); + setState(347); _errHandler.sync(this); switch (_input.LA(1)) { - case T__20: case T__21: - case T__24: + case T__22: case T__25: + case T__26: { _localctx = new AsmExprUnaryContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(335); + setState(338); _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__20) | (1L << T__21) | (1L << T__24) | (1L << T__25))) != 0)) ) { + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__21) | (1L << T__22) | (1L << T__25) | (1L << T__26))) != 0)) ) { _errHandler.recoverInline(this); } else { @@ -2917,7 +2954,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(336); + setState(339); asmExpr(8); } break; @@ -2926,7 +2963,7 @@ public class KickCParser extends Parser { _localctx = new AsmExprLabelContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(337); + setState(340); match(NAME); } break; @@ -2935,7 +2972,7 @@ public class KickCParser extends Parser { _localctx = new AsmExprLabelRelContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(338); + setState(341); match(ASMREL); } break; @@ -2944,11 +2981,11 @@ public class KickCParser extends Parser { _localctx = new AsmExprReplaceContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(339); + setState(342); match(T__0); - setState(340); + setState(343); match(NAME); - setState(341); + setState(344); match(T__1); } break; @@ -2957,7 +2994,7 @@ public class KickCParser extends Parser { _localctx = new AsmExprIntContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(342); + setState(345); match(NUMBER); } break; @@ -2966,7 +3003,7 @@ public class KickCParser extends Parser { _localctx = new AsmExprCharContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(343); + setState(346); match(CHAR); } break; @@ -2974,46 +3011,26 @@ public class KickCParser extends Parser { throw new NoViableAltException(this); } _ctx.stop = _input.LT(-1); - setState(354); + setState(357); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,34,_ctx); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(352); + setState(355); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,34,_ctx) ) { case 1: - { - _localctx = new AsmExprBinaryContext(new AsmExprContext(_parentctx, _parentState)); - pushNewRecursionContext(_localctx, _startState, RULE_asmExpr); - setState(346); - if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); - setState(347); - _la = _input.LA(1); - if ( !(_la==T__17 || _la==T__31) ) { - _errHandler.recoverInline(this); - } - else { - if ( _input.LA(1)==Token.EOF ) matchedEOF = true; - _errHandler.reportMatch(this); - consume(); - } - setState(348); - asmExpr(8); - } - break; - case 2: { _localctx = new AsmExprBinaryContext(new AsmExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_asmExpr); setState(349); - if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); + if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); setState(350); _la = _input.LA(1); - if ( !(_la==T__24 || _la==T__25) ) { + if ( !(_la==T__18 || _la==T__32) ) { _errHandler.recoverInline(this); } else { @@ -3022,15 +3039,35 @@ public class KickCParser extends Parser { consume(); } setState(351); + asmExpr(8); + } + break; + case 2: + { + _localctx = new AsmExprBinaryContext(new AsmExprContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_asmExpr); + setState(352); + if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); + setState(353); + _la = _input.LA(1); + if ( !(_la==T__25 || _la==T__26) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(354); asmExpr(7); } break; } } } - setState(356); + setState(359); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,34,_ctx); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); } } } @@ -3112,7 +3149,7 @@ public class KickCParser extends Parser { } public static final String _serializedATN = - "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3B\u0168\4\2\t\2\4"+ + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3C\u016b\4\2\t\2\4"+ "\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+ "\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ "\4\23\t\23\4\24\t\24\3\2\3\2\3\2\3\3\3\3\3\3\3\4\6\4\60\n\4\r\4\16\4\61"+ @@ -3123,129 +3160,130 @@ public class KickCParser extends Parser { "\3\5\3\5\3\5\3\5\5\5{\n\5\3\5\3\5\3\5\3\5\3\5\3\5\5\5\u0083\n\5\3\6\5"+ "\6\u0086\n\6\3\6\3\6\3\6\5\6\u008b\n\6\3\7\3\7\3\7\3\7\5\7\u0091\n\7\3"+ "\7\3\7\3\7\3\7\3\7\5\7\u0098\n\7\3\b\3\b\3\b\7\b\u009d\n\b\f\b\16\b\u00a0"+ - "\13\b\3\t\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\5\n\u00ad\n\n\3\n\7"+ - "\n\u00b0\n\n\f\n\16\n\u00b3\13\n\3\13\3\13\3\13\3\13\3\13\7\13\u00ba\n"+ - "\13\f\13\16\13\u00bd\13\13\3\13\3\13\5\13\u00c1\n\13\3\f\3\f\3\f\3\f\3"+ - "\f\3\f\3\f\3\f\3\f\3\f\3\f\5\f\u00ce\n\f\3\f\3\f\3\f\3\f\3\f\7\f\u00d5"+ - "\n\f\f\f\16\f\u00d8\13\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\5\r\u00e2\n\r"+ - "\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\5\r\u00f3"+ - "\n\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3"+ - "\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r"+ - "\7\r\u0117\n\r\f\r\16\r\u011a\13\r\3\16\3\16\3\16\7\16\u011f\n\16\f\16"+ - "\16\16\u0122\13\16\3\17\7\17\u0125\n\17\f\17\16\17\u0128\13\17\3\20\3"+ - "\20\5\20\u012c\n\20\3\21\3\21\3\21\3\21\5\21\u0132\n\21\3\22\3\22\5\22"+ - "\u0136\n\22\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23"+ - "\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\5\23\u014f\n\23"+ - "\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\5\24\u015b\n\24\3\24"+ - "\3\24\3\24\3\24\3\24\3\24\7\24\u0163\n\24\f\24\16\24\u0166\13\24\3\24"+ - "\2\6\22\26\30&\25\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&\2\13\3\2"+ - "\27\30\3\2\31\32\5\2\24\24\27\30\33\37\3\2 !\4\2\24\24\"#\3\2\33\34\4"+ - "\2\27\30$*\4\2\27\30\33\34\4\2\24\24\"\"\2\u019b\2(\3\2\2\2\4+\3\2\2\2"+ - "\6/\3\2\2\2\b\u0082\3\2\2\2\n\u0085\3\2\2\2\f\u0097\3\2\2\2\16\u0099\3"+ - "\2\2\2\20\u00a1\3\2\2\2\22\u00a4\3\2\2\2\24\u00c0\3\2\2\2\26\u00cd\3\2"+ - "\2\2\30\u00f2\3\2\2\2\32\u011b\3\2\2\2\34\u0126\3\2\2\2\36\u012b\3\2\2"+ - "\2 \u0131\3\2\2\2\"\u0133\3\2\2\2$\u014e\3\2\2\2&\u015a\3\2\2\2()\5\6"+ - "\4\2)*\7\2\2\3*\3\3\2\2\2+,\5\34\17\2,-\7\2\2\3-\5\3\2\2\2.\60\5\b\5\2"+ - "/.\3\2\2\2\60\61\3\2\2\2\61/\3\2\2\2\61\62\3\2\2\2\62\7\3\2\2\2\63\65"+ - "\7\3\2\2\64\66\5\6\4\2\65\64\3\2\2\2\65\66\3\2\2\2\66\67\3\2\2\2\67\u0083"+ - "\7\4\2\289\5\22\n\29:\7>\2\2:<\7\5\2\2;=\5\16\b\2<;\3\2\2\2<=\3\2\2\2"+ - "=>\3\2\2\2>?\7\6\2\2?A\7\3\2\2@B\5\6\4\2A@\3\2\2\2AB\3\2\2\2BC\3\2\2\2"+ - "CD\7\4\2\2D\u0083\3\2\2\2EG\7\7\2\2FE\3\2\2\2FG\3\2\2\2GH\3\2\2\2HI\5"+ - "\22\n\2IL\7>\2\2JK\7\b\2\2KM\5\24\13\2LJ\3\2\2\2LM\3\2\2\2MN\3\2\2\2N"+ - "O\7\t\2\2O\u0083\3\2\2\2PQ\5\26\f\2QR\7\b\2\2RS\5\30\r\2ST\7\t\2\2T\u0083"+ - "\3\2\2\2UV\5\30\r\2VW\7\t\2\2W\u0083\3\2\2\2XY\7\n\2\2YZ\7\5\2\2Z[\5\30"+ - "\r\2[\\\7\6\2\2\\_\5\b\5\2]^\7\13\2\2^`\5\b\5\2_]\3\2\2\2_`\3\2\2\2`\u0083"+ - "\3\2\2\2ab\7\f\2\2bc\7\5\2\2cd\5\30\r\2de\7\6\2\2ef\5\b\5\2f\u0083\3\2"+ - "\2\2gh\7\r\2\2hi\5\b\5\2ij\7\f\2\2jk\7\5\2\2kl\5\30\r\2lm\7\6\2\2mn\7"+ - "\t\2\2n\u0083\3\2\2\2op\7\16\2\2pr\7\5\2\2qs\5\n\6\2rq\3\2\2\2rs\3\2\2"+ - "\2st\3\2\2\2tu\5\f\7\2uv\7\6\2\2vw\5\b\5\2w\u0083\3\2\2\2xz\7\17\2\2y"+ - "{\5\30\r\2zy\3\2\2\2z{\3\2\2\2{|\3\2\2\2|\u0083\7\t\2\2}~\7\20\2\2~\177"+ - "\7\3\2\2\177\u0080\5\34\17\2\u0080\u0081\7\4\2\2\u0081\u0083\3\2\2\2\u0082"+ - "\63\3\2\2\2\u00828\3\2\2\2\u0082F\3\2\2\2\u0082P\3\2\2\2\u0082U\3\2\2"+ - "\2\u0082X\3\2\2\2\u0082a\3\2\2\2\u0082g\3\2\2\2\u0082o\3\2\2\2\u0082x"+ - "\3\2\2\2\u0082}\3\2\2\2\u0083\t\3\2\2\2\u0084\u0086\5\22\n\2\u0085\u0084"+ - "\3\2\2\2\u0085\u0086\3\2\2\2\u0086\u0087\3\2\2\2\u0087\u008a\7>\2\2\u0088"+ - "\u0089\7\b\2\2\u0089\u008b\5\24\13\2\u008a\u0088\3\2\2\2\u008a\u008b\3"+ - "\2\2\2\u008b\13\3\2\2\2\u008c\u008d\7\t\2\2\u008d\u008e\5\30\r\2\u008e"+ - "\u0090\7\t\2\2\u008f\u0091\5\30\r\2\u0090\u008f\3\2\2\2\u0090\u0091\3"+ - "\2\2\2\u0091\u0098\3\2\2\2\u0092\u0093\7\21\2\2\u0093\u0094\5\30\r\2\u0094"+ - "\u0095\7\22\2\2\u0095\u0096\5\30\r\2\u0096\u0098\3\2\2\2\u0097\u008c\3"+ - "\2\2\2\u0097\u0092\3\2\2\2\u0098\r\3\2\2\2\u0099\u009e\5\20\t\2\u009a"+ - "\u009b\7\23\2\2\u009b\u009d\5\20\t\2\u009c\u009a\3\2\2\2\u009d\u00a0\3"+ - "\2\2\2\u009e\u009c\3\2\2\2\u009e\u009f\3\2\2\2\u009f\17\3\2\2\2\u00a0"+ - "\u009e\3\2\2\2\u00a1\u00a2\5\22\n\2\u00a2\u00a3\7>\2\2\u00a3\21\3\2\2"+ - "\2\u00a4\u00a5\b\n\1\2\u00a5\u00a6\7\61\2\2\u00a6\u00b1\3\2\2\2\u00a7"+ - "\u00a8\f\4\2\2\u00a8\u00b0\7\24\2\2\u00a9\u00aa\f\3\2\2\u00aa\u00ac\7"+ - "\25\2\2\u00ab\u00ad\5\30\r\2\u00ac\u00ab\3\2\2\2\u00ac\u00ad\3\2\2\2\u00ad"+ - "\u00ae\3\2\2\2\u00ae\u00b0\7\26\2\2\u00af\u00a7\3\2\2\2\u00af\u00a9\3"+ - "\2\2\2\u00b0\u00b3\3\2\2\2\u00b1\u00af\3\2\2\2\u00b1\u00b2\3\2\2\2\u00b2"+ - "\23\3\2\2\2\u00b3\u00b1\3\2\2\2\u00b4\u00c1\5\30\r\2\u00b5\u00b6\7\3\2"+ - "\2\u00b6\u00bb\5\24\13\2\u00b7\u00b8\7\23\2\2\u00b8\u00ba\5\24\13\2\u00b9"+ - "\u00b7\3\2\2\2\u00ba\u00bd\3\2\2\2\u00bb\u00b9\3\2\2\2\u00bb\u00bc\3\2"+ - "\2\2\u00bc\u00be\3\2\2\2\u00bd\u00bb\3\2\2\2\u00be\u00bf\7\4\2\2\u00bf"+ - "\u00c1\3\2\2\2\u00c0\u00b4\3\2\2\2\u00c0\u00b5\3\2\2\2\u00c1\25\3\2\2"+ - "\2\u00c2\u00c3\b\f\1\2\u00c3\u00ce\7>\2\2\u00c4\u00c5\7\24\2\2\u00c5\u00ce"+ - "\7>\2\2\u00c6\u00c7\7\24\2\2\u00c7\u00c8\7\5\2\2\u00c8\u00c9\5\30\r\2"+ - "\u00c9\u00ca\7\6\2\2\u00ca\u00ce\3\2\2\2\u00cb\u00cc\t\2\2\2\u00cc\u00ce"+ - "\5\26\f\4\u00cd\u00c2\3\2\2\2\u00cd\u00c4\3\2\2\2\u00cd\u00c6\3\2\2\2"+ - "\u00cd\u00cb\3\2\2\2\u00ce\u00d6\3\2\2\2\u00cf\u00d0\f\3\2\2\u00d0\u00d1"+ - "\7\25\2\2\u00d1\u00d2\5\30\r\2\u00d2\u00d3\7\26\2\2\u00d3\u00d5\3\2\2"+ - "\2\u00d4\u00cf\3\2\2\2\u00d5\u00d8\3\2\2\2\u00d6\u00d4\3\2\2\2\u00d6\u00d7"+ - "\3\2\2\2\u00d7\27\3\2\2\2\u00d8\u00d6\3\2\2\2\u00d9\u00da\b\r\1\2\u00da"+ - "\u00db\7\5\2\2\u00db\u00dc\5\30\r\2\u00dc\u00dd\7\6\2\2\u00dd\u00f3\3"+ - "\2\2\2\u00de\u00df\7>\2\2\u00df\u00e1\7\5\2\2\u00e0\u00e2\5\32\16\2\u00e1"+ - "\u00e0\3\2\2\2\u00e1\u00e2\3\2\2\2\u00e2\u00e3\3\2\2\2\u00e3\u00f3\7\6"+ - "\2\2\u00e4\u00e5\7\5\2\2\u00e5\u00e6\5\22\n\2\u00e6\u00e7\7\6\2\2\u00e7"+ - "\u00e8\5\30\r\25\u00e8\u00f3\3\2\2\2\u00e9\u00ea\t\3\2\2\u00ea\u00f3\5"+ - "\30\r\23\u00eb\u00ec\t\4\2\2\u00ec\u00f3\5\30\r\21\u00ed\u00f3\7>\2\2"+ - "\u00ee\u00f3\7\65\2\2\u00ef\u00f3\7\62\2\2\u00f0\u00f3\7\63\2\2\u00f1"+ - "\u00f3\7\64\2\2\u00f2\u00d9\3\2\2\2\u00f2\u00de\3\2\2\2\u00f2\u00e4\3"+ - "\2\2\2\u00f2\u00e9\3\2\2\2\u00f2\u00eb\3\2\2\2\u00f2\u00ed\3\2\2\2\u00f2"+ - "\u00ee\3\2\2\2\u00f2\u00ef\3\2\2\2\u00f2\u00f0\3\2\2\2\u00f2\u00f1\3\2"+ - "\2\2\u00f3\u0118\3\2\2\2\u00f4\u00f5\f\20\2\2\u00f5\u00f6\t\5\2\2\u00f6"+ - "\u0117\5\30\r\21\u00f7\u00f8\f\17\2\2\u00f8\u00f9\t\6\2\2\u00f9\u0117"+ - "\5\30\r\20\u00fa\u00fb\f\16\2\2\u00fb\u00fc\t\7\2\2\u00fc\u0117\5\30\r"+ - "\17\u00fd\u00fe\f\r\2\2\u00fe\u00ff\t\b\2\2\u00ff\u0117\5\30\r\16\u0100"+ - "\u0101\f\f\2\2\u0101\u0102\7\36\2\2\u0102\u0117\5\30\r\r\u0103\u0104\f"+ - "\13\2\2\u0104\u0105\7+\2\2\u0105\u0117\5\30\r\f\u0106\u0107\f\n\2\2\u0107"+ - "\u0108\7,\2\2\u0108\u0117\5\30\r\13\u0109\u010a\f\t\2\2\u010a\u010b\7"+ - "-\2\2\u010b\u0117\5\30\r\n\u010c\u010d\f\b\2\2\u010d\u010e\7.\2\2\u010e"+ - "\u0117\5\30\r\t\u010f\u0110\f\24\2\2\u0110\u0111\7\25\2\2\u0111\u0112"+ - "\5\30\r\2\u0112\u0113\7\26\2\2\u0113\u0117\3\2\2\2\u0114\u0115\f\22\2"+ - "\2\u0115\u0117\t\3\2\2\u0116\u00f4\3\2\2\2\u0116\u00f7\3\2\2\2\u0116\u00fa"+ - "\3\2\2\2\u0116\u00fd\3\2\2\2\u0116\u0100\3\2\2\2\u0116\u0103\3\2\2\2\u0116"+ - "\u0106\3\2\2\2\u0116\u0109\3\2\2\2\u0116\u010c\3\2\2\2\u0116\u010f\3\2"+ - "\2\2\u0116\u0114\3\2\2\2\u0117\u011a\3\2\2\2\u0118\u0116\3\2\2\2\u0118"+ - "\u0119\3\2\2\2\u0119\31\3\2\2\2\u011a\u0118\3\2\2\2\u011b\u0120\5\30\r"+ - "\2\u011c\u011d\7\23\2\2\u011d\u011f\5\30\r\2\u011e\u011c\3\2\2\2\u011f"+ - "\u0122\3\2\2\2\u0120\u011e\3\2\2\2\u0120\u0121\3\2\2\2\u0121\33\3\2\2"+ - "\2\u0122\u0120\3\2\2\2\u0123\u0125\5\36\20\2\u0124\u0123\3\2\2\2\u0125"+ - "\u0128\3\2\2\2\u0126\u0124\3\2\2\2\u0126\u0127\3\2\2\2\u0127\35\3\2\2"+ - "\2\u0128\u0126\3\2\2\2\u0129\u012c\5 \21\2\u012a\u012c\5\"\22\2\u012b"+ - "\u0129\3\2\2\2\u012b\u012a\3\2\2\2\u012c\37\3\2\2\2\u012d\u012e\7>\2\2"+ - "\u012e\u0132\7\21\2\2\u012f\u0130\7\35\2\2\u0130\u0132\7\21\2\2\u0131"+ - "\u012d\3\2\2\2\u0131\u012f\3\2\2\2\u0132!\3\2\2\2\u0133\u0135\7\60\2\2"+ - "\u0134\u0136\5$\23\2\u0135\u0134\3\2\2\2\u0135\u0136\3\2\2\2\u0136#\3"+ - "\2\2\2\u0137\u014f\5&\24\2\u0138\u0139\7/\2\2\u0139\u014f\5&\24\2\u013a"+ - "\u013b\5&\24\2\u013b\u013c\7\23\2\2\u013c\u013d\7>\2\2\u013d\u014f\3\2"+ - "\2\2\u013e\u013f\7\5\2\2\u013f\u0140\5&\24\2\u0140\u0141\7\6\2\2\u0141"+ - "\u0142\7\23\2\2\u0142\u0143\7>\2\2\u0143\u014f\3\2\2\2\u0144\u0145\7\5"+ - "\2\2\u0145\u0146\5&\24\2\u0146\u0147\7\23\2\2\u0147\u0148\7>\2\2\u0148"+ - "\u0149\7\6\2\2\u0149\u014f\3\2\2\2\u014a\u014b\7\5\2\2\u014b\u014c\5&"+ - "\24\2\u014c\u014d\7\6\2\2\u014d\u014f\3\2\2\2\u014e\u0137\3\2\2\2\u014e"+ - "\u0138\3\2\2\2\u014e\u013a\3\2\2\2\u014e\u013e\3\2\2\2\u014e\u0144\3\2"+ - "\2\2\u014e\u014a\3\2\2\2\u014f%\3\2\2\2\u0150\u0151\b\24\1\2\u0151\u0152"+ - "\t\t\2\2\u0152\u015b\5&\24\n\u0153\u015b\7>\2\2\u0154\u015b\7?\2\2\u0155"+ - "\u0156\7\3\2\2\u0156\u0157\7>\2\2\u0157\u015b\7\4\2\2\u0158\u015b\7\65"+ - "\2\2\u0159\u015b\7\63\2\2\u015a\u0150\3\2\2\2\u015a\u0153\3\2\2\2\u015a"+ - "\u0154\3\2\2\2\u015a\u0155\3\2\2\2\u015a\u0158\3\2\2\2\u015a\u0159\3\2"+ - "\2\2\u015b\u0164\3\2\2\2\u015c\u015d\f\t\2\2\u015d\u015e\t\n\2\2\u015e"+ - "\u0163\5&\24\n\u015f\u0160\f\b\2\2\u0160\u0161\t\7\2\2\u0161\u0163\5&"+ - "\24\t\u0162\u015c\3\2\2\2\u0162\u015f\3\2\2\2\u0163\u0166\3\2\2\2\u0164"+ - "\u0162\3\2\2\2\u0164\u0165\3\2\2\2\u0165\'\3\2\2\2\u0166\u0164\3\2\2\2"+ - "%\61\65\3\2\2\2>?\7\6\2\2?A\7\3\2\2@B\5\6\4\2A@\3\2\2\2AB\3"+ + "\2\2\2BC\3\2\2\2CD\7\4\2\2D\u0083\3\2\2\2EG\7\7\2\2FE\3\2\2\2FG\3\2\2"+ + "\2GH\3\2\2\2HI\5\22\n\2IL\7?\2\2JK\7\b\2\2KM\5\24\13\2LJ\3\2\2\2LM\3\2"+ + "\2\2MN\3\2\2\2NO\7\t\2\2O\u0083\3\2\2\2PQ\5\26\f\2QR\7\b\2\2RS\5\30\r"+ + "\2ST\7\t\2\2T\u0083\3\2\2\2UV\5\30\r\2VW\7\t\2\2W\u0083\3\2\2\2XY\7\n"+ + "\2\2YZ\7\5\2\2Z[\5\30\r\2[\\\7\6\2\2\\_\5\b\5\2]^\7\13\2\2^`\5\b\5\2_"+ + "]\3\2\2\2_`\3\2\2\2`\u0083\3\2\2\2ab\7\f\2\2bc\7\5\2\2cd\5\30\r\2de\7"+ + "\6\2\2ef\5\b\5\2f\u0083\3\2\2\2gh\7\r\2\2hi\5\b\5\2ij\7\f\2\2jk\7\5\2"+ + "\2kl\5\30\r\2lm\7\6\2\2mn\7\t\2\2n\u0083\3\2\2\2op\7\16\2\2pr\7\5\2\2"+ + "qs\5\n\6\2rq\3\2\2\2rs\3\2\2\2st\3\2\2\2tu\5\f\7\2uv\7\6\2\2vw\5\b\5\2"+ + "w\u0083\3\2\2\2xz\7\17\2\2y{\5\30\r\2zy\3\2\2\2z{\3\2\2\2{|\3\2\2\2|\u0083"+ + "\7\t\2\2}~\7\20\2\2~\177\7\3\2\2\177\u0080\5\34\17\2\u0080\u0081\7\4\2"+ + "\2\u0081\u0083\3\2\2\2\u0082\63\3\2\2\2\u00828\3\2\2\2\u0082F\3\2\2\2"+ + "\u0082P\3\2\2\2\u0082U\3\2\2\2\u0082X\3\2\2\2\u0082a\3\2\2\2\u0082g\3"+ + "\2\2\2\u0082o\3\2\2\2\u0082x\3\2\2\2\u0082}\3\2\2\2\u0083\t\3\2\2\2\u0084"+ + "\u0086\5\22\n\2\u0085\u0084\3\2\2\2\u0085\u0086\3\2\2\2\u0086\u0087\3"+ + "\2\2\2\u0087\u008a\7?\2\2\u0088\u0089\7\b\2\2\u0089\u008b\5\24\13\2\u008a"+ + "\u0088\3\2\2\2\u008a\u008b\3\2\2\2\u008b\13\3\2\2\2\u008c\u008d\7\t\2"+ + "\2\u008d\u008e\5\30\r\2\u008e\u0090\7\t\2\2\u008f\u0091\5\30\r\2\u0090"+ + "\u008f\3\2\2\2\u0090\u0091\3\2\2\2\u0091\u0098\3\2\2\2\u0092\u0093\7\21"+ + "\2\2\u0093\u0094\5\30\r\2\u0094\u0095\7\22\2\2\u0095\u0096\5\30\r\2\u0096"+ + "\u0098\3\2\2\2\u0097\u008c\3\2\2\2\u0097\u0092\3\2\2\2\u0098\r\3\2\2\2"+ + "\u0099\u009e\5\20\t\2\u009a\u009b\7\23\2\2\u009b\u009d\5\20\t\2\u009c"+ + "\u009a\3\2\2\2\u009d\u00a0\3\2\2\2\u009e\u009c\3\2\2\2\u009e\u009f\3\2"+ + "\2\2\u009f\17\3\2\2\2\u00a0\u009e\3\2\2\2\u00a1\u00a2\5\22\n\2\u00a2\u00a3"+ + "\7?\2\2\u00a3\21\3\2\2\2\u00a4\u00a5\b\n\1\2\u00a5\u00a9\7\62\2\2\u00a6"+ + "\u00a7\7\24\2\2\u00a7\u00a9\7\62\2\2\u00a8\u00a4\3\2\2\2\u00a8\u00a6\3"+ + "\2\2\2\u00a9\u00b4\3\2\2\2\u00aa\u00ab\f\4\2\2\u00ab\u00b3\7\25\2\2\u00ac"+ + "\u00ad\f\3\2\2\u00ad\u00af\7\26\2\2\u00ae\u00b0\5\30\r\2\u00af\u00ae\3"+ + "\2\2\2\u00af\u00b0\3\2\2\2\u00b0\u00b1\3\2\2\2\u00b1\u00b3\7\27\2\2\u00b2"+ + "\u00aa\3\2\2\2\u00b2\u00ac\3\2\2\2\u00b3\u00b6\3\2\2\2\u00b4\u00b2\3\2"+ + "\2\2\u00b4\u00b5\3\2\2\2\u00b5\23\3\2\2\2\u00b6\u00b4\3\2\2\2\u00b7\u00c4"+ + "\5\30\r\2\u00b8\u00b9\7\3\2\2\u00b9\u00be\5\24\13\2\u00ba\u00bb\7\23\2"+ + "\2\u00bb\u00bd\5\24\13\2\u00bc\u00ba\3\2\2\2\u00bd\u00c0\3\2\2\2\u00be"+ + "\u00bc\3\2\2\2\u00be\u00bf\3\2\2\2\u00bf\u00c1\3\2\2\2\u00c0\u00be\3\2"+ + "\2\2\u00c1\u00c2\7\4\2\2\u00c2\u00c4\3\2\2\2\u00c3\u00b7\3\2\2\2\u00c3"+ + "\u00b8\3\2\2\2\u00c4\25\3\2\2\2\u00c5\u00c6\b\f\1\2\u00c6\u00d1\7?\2\2"+ + "\u00c7\u00c8\7\25\2\2\u00c8\u00d1\7?\2\2\u00c9\u00ca\7\25\2\2\u00ca\u00cb"+ + "\7\5\2\2\u00cb\u00cc\5\30\r\2\u00cc\u00cd\7\6\2\2\u00cd\u00d1\3\2\2\2"+ + "\u00ce\u00cf\t\2\2\2\u00cf\u00d1\5\26\f\4\u00d0\u00c5\3\2\2\2\u00d0\u00c7"+ + "\3\2\2\2\u00d0\u00c9\3\2\2\2\u00d0\u00ce\3\2\2\2\u00d1\u00d9\3\2\2\2\u00d2"+ + "\u00d3\f\3\2\2\u00d3\u00d4\7\26\2\2\u00d4\u00d5\5\30\r\2\u00d5\u00d6\7"+ + "\27\2\2\u00d6\u00d8\3\2\2\2\u00d7\u00d2\3\2\2\2\u00d8\u00db\3\2\2\2\u00d9"+ + "\u00d7\3\2\2\2\u00d9\u00da\3\2\2\2\u00da\27\3\2\2\2\u00db\u00d9\3\2\2"+ + "\2\u00dc\u00dd\b\r\1\2\u00dd\u00de\7\5\2\2\u00de\u00df\5\30\r\2\u00df"+ + "\u00e0\7\6\2\2\u00e0\u00f6\3\2\2\2\u00e1\u00e2\7?\2\2\u00e2\u00e4\7\5"+ + "\2\2\u00e3\u00e5\5\32\16\2\u00e4\u00e3\3\2\2\2\u00e4\u00e5\3\2\2\2\u00e5"+ + "\u00e6\3\2\2\2\u00e6\u00f6\7\6\2\2\u00e7\u00e8\7\5\2\2\u00e8\u00e9\5\22"+ + "\n\2\u00e9\u00ea\7\6\2\2\u00ea\u00eb\5\30\r\25\u00eb\u00f6\3\2\2\2\u00ec"+ + "\u00ed\t\3\2\2\u00ed\u00f6\5\30\r\23\u00ee\u00ef\t\4\2\2\u00ef\u00f6\5"+ + "\30\r\21\u00f0\u00f6\7?\2\2\u00f1\u00f6\7\66\2\2\u00f2\u00f6\7\63\2\2"+ + "\u00f3\u00f6\7\64\2\2\u00f4\u00f6\7\65\2\2\u00f5\u00dc\3\2\2\2\u00f5\u00e1"+ + "\3\2\2\2\u00f5\u00e7\3\2\2\2\u00f5\u00ec\3\2\2\2\u00f5\u00ee\3\2\2\2\u00f5"+ + "\u00f0\3\2\2\2\u00f5\u00f1\3\2\2\2\u00f5\u00f2\3\2\2\2\u00f5\u00f3\3\2"+ + "\2\2\u00f5\u00f4\3\2\2\2\u00f6\u011b\3\2\2\2\u00f7\u00f8\f\20\2\2\u00f8"+ + "\u00f9\t\5\2\2\u00f9\u011a\5\30\r\21\u00fa\u00fb\f\17\2\2\u00fb\u00fc"+ + "\t\6\2\2\u00fc\u011a\5\30\r\20\u00fd\u00fe\f\16\2\2\u00fe\u00ff\t\7\2"+ + "\2\u00ff\u011a\5\30\r\17\u0100\u0101\f\r\2\2\u0101\u0102\t\b\2\2\u0102"+ + "\u011a\5\30\r\16\u0103\u0104\f\f\2\2\u0104\u0105\7\37\2\2\u0105\u011a"+ + "\5\30\r\r\u0106\u0107\f\13\2\2\u0107\u0108\7,\2\2\u0108\u011a\5\30\r\f"+ + "\u0109\u010a\f\n\2\2\u010a\u010b\7-\2\2\u010b\u011a\5\30\r\13\u010c\u010d"+ + "\f\t\2\2\u010d\u010e\7.\2\2\u010e\u011a\5\30\r\n\u010f\u0110\f\b\2\2\u0110"+ + "\u0111\7/\2\2\u0111\u011a\5\30\r\t\u0112\u0113\f\24\2\2\u0113\u0114\7"+ + "\26\2\2\u0114\u0115\5\30\r\2\u0115\u0116\7\27\2\2\u0116\u011a\3\2\2\2"+ + "\u0117\u0118\f\22\2\2\u0118\u011a\t\3\2\2\u0119\u00f7\3\2\2\2\u0119\u00fa"+ + "\3\2\2\2\u0119\u00fd\3\2\2\2\u0119\u0100\3\2\2\2\u0119\u0103\3\2\2\2\u0119"+ + "\u0106\3\2\2\2\u0119\u0109\3\2\2\2\u0119\u010c\3\2\2\2\u0119\u010f\3\2"+ + "\2\2\u0119\u0112\3\2\2\2\u0119\u0117\3\2\2\2\u011a\u011d\3\2\2\2\u011b"+ + "\u0119\3\2\2\2\u011b\u011c\3\2\2\2\u011c\31\3\2\2\2\u011d\u011b\3\2\2"+ + "\2\u011e\u0123\5\30\r\2\u011f\u0120\7\23\2\2\u0120\u0122\5\30\r\2\u0121"+ + "\u011f\3\2\2\2\u0122\u0125\3\2\2\2\u0123\u0121\3\2\2\2\u0123\u0124\3\2"+ + "\2\2\u0124\33\3\2\2\2\u0125\u0123\3\2\2\2\u0126\u0128\5\36\20\2\u0127"+ + "\u0126\3\2\2\2\u0128\u012b\3\2\2\2\u0129\u0127\3\2\2\2\u0129\u012a\3\2"+ + "\2\2\u012a\35\3\2\2\2\u012b\u0129\3\2\2\2\u012c\u012f\5 \21\2\u012d\u012f"+ + "\5\"\22\2\u012e\u012c\3\2\2\2\u012e\u012d\3\2\2\2\u012f\37\3\2\2\2\u0130"+ + "\u0131\7?\2\2\u0131\u0135\7\21\2\2\u0132\u0133\7\36\2\2\u0133\u0135\7"+ + "\21\2\2\u0134\u0130\3\2\2\2\u0134\u0132\3\2\2\2\u0135!\3\2\2\2\u0136\u0138"+ + "\7\61\2\2\u0137\u0139\5$\23\2\u0138\u0137\3\2\2\2\u0138\u0139\3\2\2\2"+ + "\u0139#\3\2\2\2\u013a\u0152\5&\24\2\u013b\u013c\7\60\2\2\u013c\u0152\5"+ + "&\24\2\u013d\u013e\5&\24\2\u013e\u013f\7\23\2\2\u013f\u0140\7?\2\2\u0140"+ + "\u0152\3\2\2\2\u0141\u0142\7\5\2\2\u0142\u0143\5&\24\2\u0143\u0144\7\6"+ + "\2\2\u0144\u0145\7\23\2\2\u0145\u0146\7?\2\2\u0146\u0152\3\2\2\2\u0147"+ + "\u0148\7\5\2\2\u0148\u0149\5&\24\2\u0149\u014a\7\23\2\2\u014a\u014b\7"+ + "?\2\2\u014b\u014c\7\6\2\2\u014c\u0152\3\2\2\2\u014d\u014e\7\5\2\2\u014e"+ + "\u014f\5&\24\2\u014f\u0150\7\6\2\2\u0150\u0152\3\2\2\2\u0151\u013a\3\2"+ + "\2\2\u0151\u013b\3\2\2\2\u0151\u013d\3\2\2\2\u0151\u0141\3\2\2\2\u0151"+ + "\u0147\3\2\2\2\u0151\u014d\3\2\2\2\u0152%\3\2\2\2\u0153\u0154\b\24\1\2"+ + "\u0154\u0155\t\t\2\2\u0155\u015e\5&\24\n\u0156\u015e\7?\2\2\u0157\u015e"+ + "\7@\2\2\u0158\u0159\7\3\2\2\u0159\u015a\7?\2\2\u015a\u015e\7\4\2\2\u015b"+ + "\u015e\7\66\2\2\u015c\u015e\7\64\2\2\u015d\u0153\3\2\2\2\u015d\u0156\3"+ + "\2\2\2\u015d\u0157\3\2\2\2\u015d\u0158\3\2\2\2\u015d\u015b\3\2\2\2\u015d"+ + "\u015c\3\2\2\2\u015e\u0167\3\2\2\2\u015f\u0160\f\t\2\2\u0160\u0161\t\n"+ + "\2\2\u0161\u0166\5&\24\n\u0162\u0163\f\b\2\2\u0163\u0164\t\7\2\2\u0164"+ + "\u0166\5&\24\t\u0165\u015f\3\2\2\2\u0165\u0162\3\2\2\2\u0166\u0169\3\2"+ + "\2\2\u0167\u0165\3\2\2\2\u0167\u0168\3\2\2\2\u0168\'\3\2\2\2\u0169\u0167"+ + "\3\2\2\2&\61\65 extends ParseTreeVisitor { * @return the visitor result */ T visitTypeSimple(KickCParser.TypeSimpleContext ctx); + /** + * Visit a parse tree produced by the {@code typeSignedSimple} + * labeled alternative in {@link KickCParser#typeDecl}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitTypeSignedSimple(KickCParser.TypeSignedSimpleContext ctx); /** * Visit a parse tree produced by the {@code initExpr} * labeled alternative in {@link KickCParser#initializer}. diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass1GenerateStatementSequence.java b/src/main/java/dk/camelot64/kickc/passes/Pass1GenerateStatementSequence.java index d8fe39ff4..ba459a310 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass1GenerateStatementSequence.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass1GenerateStatementSequence.java @@ -436,6 +436,11 @@ public class Pass1GenerateStatementSequence extends KickCBaseVisitor { return SymbolTypeBasic.get(ctx.getText()); } + @Override + public SymbolType visitTypeSignedSimple(KickCParser.TypeSignedSimpleContext ctx) { + return SymbolTypeBasic.get("signed "+ctx.SIMPLETYPE().getText()); + } + @Override public SymbolType visitTypePtr(KickCParser.TypePtrContext ctx) { SymbolType elementType = (SymbolType) visit(ctx.typeDecl()); diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass4CodeGeneration.java b/src/main/java/dk/camelot64/kickc/passes/Pass4CodeGeneration.java index 7e4a48b84..456d2cf38 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass4CodeGeneration.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass4CodeGeneration.java @@ -220,7 +220,7 @@ public class Pass4CodeGeneration { if (lValue instanceof VariableRef) { VariableRef lValueRef = (VariableRef) lValue; Registers.Register lValRegister = program.getSymbolInfos().getVariable(lValueRef).getAllocation(); - if (lValRegister.getType().equals(Registers.RegisterType.REG_ALU_BYTE)) { + if (lValRegister.getType().equals(Registers.RegisterType.REG_ALU)) { asm.addComment(statement + " // ALU"); StatementAssignment assignmentAlu = assignment; aluState.setAluAssignment(assignmentAlu); diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass4RegisterUpliftPotentialInitialize.java b/src/main/java/dk/camelot64/kickc/passes/Pass4RegisterUpliftPotentialInitialize.java index 57acf50af..c7731cbb1 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass4RegisterUpliftPotentialInitialize.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass4RegisterUpliftPotentialInitialize.java @@ -30,6 +30,13 @@ public class Pass4RegisterUpliftPotentialInitialize extends Pass2Base { Registers.getRegisterX(), Registers.getRegisterY()); registerPotentials.setPotentialRegisters(equivalenceClass, potentials); + } else if (registerType.equals(Registers.RegisterType.ZP_SBYTE)) { + List potentials = Arrays.asList( + defaultRegister, + Registers.getRegisterASigned(), + Registers.getRegisterXSigned(), + Registers.getRegisterYSigned()); + registerPotentials.setPotentialRegisters(equivalenceClass, potentials); } else { registerPotentials.setPotentialRegisters(equivalenceClass, Arrays.asList(defaultRegister)); } diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass4RegistersFinalize.java b/src/main/java/dk/camelot64/kickc/passes/Pass4RegistersFinalize.java index 9176d0527..ade14b2a9 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass4RegistersFinalize.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass4RegistersFinalize.java @@ -136,6 +136,8 @@ public class Pass4RegistersFinalize extends Pass2Base { SymbolType varType = variable.getType(); if (varType.equals(SymbolTypeBasic.BYTE)) { return new Registers.RegisterZpByte(currentZp++); + } else if (varType.equals(SymbolTypeBasic.SBYTE)) { + return new Registers.RegisterZpSignedByte(currentZp++); } else if (varType.equals(SymbolTypeBasic.WORD)) { Registers.RegisterZpWord registerZpWord = new Registers.RegisterZpWord(currentZp); diff --git a/src/main/java/dk/camelot64/kickc/test/TestPrograms.java b/src/main/java/dk/camelot64/kickc/test/TestPrograms.java index b2c8d45e4..e793545bb 100644 --- a/src/main/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/main/java/dk/camelot64/kickc/test/TestPrograms.java @@ -24,6 +24,10 @@ public class TestPrograms extends TestCase { helper = new ReferenceHelper("dk/camelot64/kickc/test/ref/"); } + public void testSignedBytes() throws IOException, URISyntaxException { + compileAndCompare("signed-bytes"); + } + public void testScrollBig() throws IOException, URISyntaxException { compileAndCompare("scrollbig"); } diff --git a/src/main/java/dk/camelot64/kickc/test/signed-bytes.kc b/src/main/java/dk/camelot64/kickc/test/signed-bytes.kc new file mode 100644 index 000000000..676ee79db --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/test/signed-bytes.kc @@ -0,0 +1,12 @@ + +void main() { + byte[] screen = $0400; + byte j = 0; + signed byte i = -127; + while(i<127) { + screen[j] = i; + i++; + j++; + } + +} \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/test/wordexpr.kc b/src/main/java/dk/camelot64/kickc/test/wordexpr.kc index 5ef7b8db9..294fd80ca 100644 --- a/src/main/java/dk/camelot64/kickc/test/wordexpr.kc +++ b/src/main/java/dk/camelot64/kickc/test/wordexpr.kc @@ -1,4 +1,4 @@ -// Expressions based on bytes but resulting in words are erronously type infered as bytes - eg. b = b + 40*8; +// Expressions based on bytes but resulting in words are erroneously type infered as bytes - eg. b = b + 40*8; void main() { word b = 0;