Much improved error messages for ca65. For most errors it will now say what
was expected and what was found instead. Also improved error recovery in a few places.
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
|
||||
.macpack cpu
|
||||
|
||||
; step 1: try to assemble an instruction that's exclusive to this set
|
||||
; (when possible)
|
||||
|
||||
|
||||
1
test/asm/listing/120-errormsg.s
Normal file
1
test/asm/listing/120-errormsg.s
Normal file
@@ -0,0 +1 @@
|
||||
0:
|
||||
1
test/asm/listing/121-errormsg.s
Normal file
1
test/asm/listing/121-errormsg.s
Normal file
@@ -0,0 +1 @@
|
||||
foo
|
||||
3
test/asm/listing/122-errormsg.s
Normal file
3
test/asm/listing/122-errormsg.s
Normal file
@@ -0,0 +1,3 @@
|
||||
.struct x
|
||||
.word
|
||||
.endstruct
|
||||
1
test/asm/listing/123-errormsg.s
Normal file
1
test/asm/listing/123-errormsg.s
Normal file
@@ -0,0 +1 @@
|
||||
lda #$00 foo
|
||||
1
test/asm/listing/124-errormsg.s
Normal file
1
test/asm/listing/124-errormsg.s
Normal file
@@ -0,0 +1 @@
|
||||
lda ($00),a
|
||||
1
test/asm/listing/125-errormsg.s
Normal file
1
test/asm/listing/125-errormsg.s
Normal file
@@ -0,0 +1 @@
|
||||
lda ($00,a)
|
||||
3
test/asm/listing/126-errormsg.s
Normal file
3
test/asm/listing/126-errormsg.s
Normal file
@@ -0,0 +1,3 @@
|
||||
.struct foo
|
||||
bar
|
||||
.endstruct
|
||||
1
test/asm/listing/127-errormsg.s
Normal file
1
test/asm/listing/127-errormsg.s
Normal file
@@ -0,0 +1 @@
|
||||
127
|
||||
1
test/asm/listing/128-errormsg.s
Normal file
1
test/asm/listing/128-errormsg.s
Normal file
@@ -0,0 +1 @@
|
||||
.fileopt author
|
||||
1
test/asm/listing/129-errormsg.s
Normal file
1
test/asm/listing/129-errormsg.s
Normal file
@@ -0,0 +1 @@
|
||||
.assert 1
|
||||
2
test/asm/listing/130-errormsg.s
Normal file
2
test/asm/listing/130-errormsg.s
Normal file
@@ -0,0 +1,2 @@
|
||||
lda |
|
||||
|
||||
1
test/asm/listing/131-errormsg.s
Normal file
1
test/asm/listing/131-errormsg.s
Normal file
@@ -0,0 +1 @@
|
||||
.byte 0 1
|
||||
@@ -1,6 +1,6 @@
|
||||
110-capabilities.s:3: Error: Arguments to .CAPABILITY must be identifiers
|
||||
110-capabilities.s:8: Error: Arguments to .CAPABILITY must be identifiers
|
||||
110-capabilities.s:8: Error: ')' expected
|
||||
110-capabilities.s:3: Error: Expected a capability name but found ')'
|
||||
110-capabilities.s:8: Error: Expected a capability name but found 'end-of-line'
|
||||
110-capabilities.s:8: Error: Expected ')' but found 'end-of-line'
|
||||
110-capabilities.s:12: Error: Not a valid capability name: CPU_HAS_BR
|
||||
110-capabilities.s:17: Error: ')' expected
|
||||
110-capabilities.s:17: Error: Unexpected trailing garbage characters
|
||||
110-capabilities.s:17: Error: Expected ')' but found 'cpu_has_bra8'
|
||||
110-capabilities.s:17: Error: Expected 'end-of-line' but found 'cpu_has_bra8'
|
||||
|
||||
1
test/asm/listing/ref/120-errormsg.err2
Normal file
1
test/asm/listing/ref/120-errormsg.err2
Normal file
@@ -0,0 +1 @@
|
||||
120-errormsg.s:1: Error: Expected 'end-of-line' but found '0'
|
||||
1
test/asm/listing/ref/121-errormsg.err2
Normal file
1
test/asm/listing/ref/121-errormsg.err2
Normal file
@@ -0,0 +1 @@
|
||||
121-errormsg.s:1: Error: Expected ':' after identifier to form a label but found 'end-of-line'
|
||||
1
test/asm/listing/ref/122-errormsg.err2
Normal file
1
test/asm/listing/ref/122-errormsg.err2
Normal file
@@ -0,0 +1 @@
|
||||
122-errormsg.s:1: Error: Expected a struct/union name but found 'X'
|
||||
1
test/asm/listing/ref/123-errormsg.err2
Normal file
1
test/asm/listing/ref/123-errormsg.err2
Normal file
@@ -0,0 +1 @@
|
||||
123-errormsg.s:1: Error: Expected 'end-of-line' but found 'foo'
|
||||
1
test/asm/listing/ref/124-errormsg.err2
Normal file
1
test/asm/listing/ref/124-errormsg.err2
Normal file
@@ -0,0 +1 @@
|
||||
124-errormsg.s:1: Error: Expected 'Y' but found 'A'
|
||||
2
test/asm/listing/ref/125-errormsg.err2
Normal file
2
test/asm/listing/ref/125-errormsg.err2
Normal file
@@ -0,0 +1,2 @@
|
||||
125-errormsg.s:1: Error: Expected 'X' or 'S' but found 'A'
|
||||
125-errormsg.s:1: Error: Illegal addressing mode
|
||||
1
test/asm/listing/ref/126-errormsg.err2
Normal file
1
test/asm/listing/ref/126-errormsg.err2
Normal file
@@ -0,0 +1 @@
|
||||
126-errormsg.s:2: Error: Expected a storage allocator after the field name but found 'end-of-line'
|
||||
1
test/asm/listing/ref/127-errormsg.err2
Normal file
1
test/asm/listing/ref/127-errormsg.err2
Normal file
@@ -0,0 +1 @@
|
||||
127-errormsg.s:1: Error: Expected a mnemonic but found '127'
|
||||
1
test/asm/listing/ref/128-errormsg.err2
Normal file
1
test/asm/listing/ref/128-errormsg.err2
Normal file
@@ -0,0 +1 @@
|
||||
128-errormsg.s:1: Error: Expected ',' but found 'end-of-line'
|
||||
1
test/asm/listing/ref/129-errormsg.err2
Normal file
1
test/asm/listing/ref/129-errormsg.err2
Normal file
@@ -0,0 +1 @@
|
||||
129-errormsg.s:1: Error: Expected ',' but found 'end-of-line'
|
||||
2
test/asm/listing/ref/130-errormsg.err2
Normal file
2
test/asm/listing/ref/130-errormsg.err2
Normal file
@@ -0,0 +1,2 @@
|
||||
130-errormsg.s:1: Error: Expected an expression but found '|'
|
||||
130-errormsg.s:1: Error: Expected an expression but found 'end-of-line'
|
||||
1
test/asm/listing/ref/131-errormsg.err2
Normal file
1
test/asm/listing/ref/131-errormsg.err2
Normal file
@@ -0,0 +1 @@
|
||||
131-errormsg.s:1: Error: Expected 'end-of-line' but found '1'
|
||||
Reference in New Issue
Block a user