From 1199c75025ca32764151d1230a648fe984203671 Mon Sep 17 00:00:00 2001 From: marcobaye Date: Sat, 13 Jun 2020 23:12:06 +0000 Subject: [PATCH] more test programs git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@229 4df02467-bbd4-4a76-a152-e7ce94205b78 --- docs/Errors.txt | 4 ++-- testing/errors/alreadydefined1.a | 4 ++-- testing/errors/forcebit1.a | 2 ++ testing/errors/forcebit2.a | 2 ++ testing/errors/toolateforpostfix3.a | 4 ++++ testing/errors/toolateforpostfix4.a | 6 ++++++ testing/errors/toolateforpostfix5.a | 4 ++++ testing/errors/toolateforpostfix6.a | 6 ++++++ 8 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 testing/errors/forcebit1.a create mode 100644 testing/errors/forcebit2.a create mode 100644 testing/errors/toolateforpostfix3.a create mode 100644 testing/errors/toolateforpostfix4.a create mode 100644 testing/errors/toolateforpostfix5.a create mode 100644 testing/errors/toolateforpostfix6.a diff --git a/docs/Errors.txt b/docs/Errors.txt index a051f84..43d612a 100644 --- a/docs/Errors.txt +++ b/docs/Errors.txt @@ -316,8 +316,8 @@ Source file contains illegal character. Your source code file contained a null byte. Symbol already defined. - You defined a symbol that already had a different value. To change - a symbol's value, use the "!set" pseudo opcode. + You defined a symbol that already had a different type or value. + To change a symbol's type or value, use the "!set" pseudo opcode. Syntax error. Guess what - there's a syntax error. diff --git a/testing/errors/alreadydefined1.a b/testing/errors/alreadydefined1.a index 06a8bbe..8340f83 100644 --- a/testing/errors/alreadydefined1.a +++ b/testing/errors/alreadydefined1.a @@ -1,3 +1,3 @@ ;ACME 0.96.5 - a = 3 - a = 3.0 ; -> "already defined" (type has changed) + a = 3.1 + a = 3.0 ; -> "already defined" (value has changed) diff --git a/testing/errors/forcebit1.a b/testing/errors/forcebit1.a new file mode 100644 index 0000000..2c34f8b --- /dev/null +++ b/testing/errors/forcebit1.a @@ -0,0 +1,2 @@ +;ACME 0.96.5 + label+2 = [1, 2, 3] diff --git a/testing/errors/forcebit2.a b/testing/errors/forcebit2.a new file mode 100644 index 0000000..c949095 --- /dev/null +++ b/testing/errors/forcebit2.a @@ -0,0 +1,2 @@ +;ACME 0.96.5 + !set label+2 = [1, 2, 3] diff --git a/testing/errors/toolateforpostfix3.a b/testing/errors/toolateforpostfix3.a new file mode 100644 index 0000000..926cd01 --- /dev/null +++ b/testing/errors/toolateforpostfix3.a @@ -0,0 +1,4 @@ +;ACME 0.96.5 + a = 3 + b = a ; read a + !set a+2 = 5 ; -> "too late for postfix" diff --git a/testing/errors/toolateforpostfix4.a b/testing/errors/toolateforpostfix4.a new file mode 100644 index 0000000..d31c4e5 --- /dev/null +++ b/testing/errors/toolateforpostfix4.a @@ -0,0 +1,6 @@ +;ACME 0.96.5 + a = 3 + b = a ; read a + !for a+2, 3, 4 { ; -> "too late for postfix" + ; + } diff --git a/testing/errors/toolateforpostfix5.a b/testing/errors/toolateforpostfix5.a new file mode 100644 index 0000000..c04c0ca --- /dev/null +++ b/testing/errors/toolateforpostfix5.a @@ -0,0 +1,4 @@ +;ACME 0.96.5 + a+1 = 3 + b = a ; read a + !set a+2 = 5 ; -> "too late for postfix" diff --git a/testing/errors/toolateforpostfix6.a b/testing/errors/toolateforpostfix6.a new file mode 100644 index 0000000..2ce7c14 --- /dev/null +++ b/testing/errors/toolateforpostfix6.a @@ -0,0 +1,6 @@ +;ACME 0.96.5 + a+1 = 3 + b = a ; read a + !for a+2, 3, 4 { ; -> "too late for postfix" + ; + }