2024-02-10 03:23:34 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
x := (+ 10 20) "aaaa"; ##ERROR: syntax error - too many rvalues
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
##
|
|
|
|
|
2024-09-18 12:41:00 +00:00
|
|
|
x := (10 +); ##ERROR: syntax error - no operand after binary selector
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
10 + ##ERROR: syntax error - no operand after binary selector '+'
|
2024-02-10 03:23:34 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2024-01-02 15:45:34 +00:00
|
|
|
## you can't have another colon before the method..
|
|
|
|
(obj: :method) ##ERROR: syntax error - : disallowed
|
2024-02-04 17:43:50 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
## while EOL is ignored in explicitly parenthesized XLIST, a semicolon must not be.
|
|
|
|
(printf
|
|
|
|
"hello, world\n"
|
|
|
|
)
|
|
|
|
|
|
|
|
(printf; ##ERROR: syntax error - unexpected semicolon
|
|
|
|
"hello, world\n"
|
|
|
|
)
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
## semicolon inside #{} must raise a syntax error
|
|
|
|
|
|
|
|
a := #{
|
|
|
|
"k1":
|
|
|
|
"hello k1\n",
|
|
|
|
"k2":
|
|
|
|
"hello k2\n"; ##ERROR: syntax error - unexpected semicolon
|
|
|
|
};
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
{
|
|
|
|
;;;
|
|
|
|
|
|
|
|
(do
|
|
|
|
(printf "hello\n")
|
|
|
|
(printf "hello\n")
|
|
|
|
);;
|
|
|
|
|
2024-07-13 08:40:27 +00:00
|
|
|
k := #[10 ; 20 ]; ##ERROR: syntax error - unexpected semicolon
|
2024-02-04 17:43:50 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
## a code point greater than 255 is illegal in the character literal prefix fixed with b.
|
|
|
|
|
|
|
|
printf "[%c] [#x%x] [%d]\n" '★' '★' #x2605;
|
|
|
|
printf "[%c]\n" b'★'; ##ERROR: syntax error - wrong character literal
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
## #b can be followed by [ or binary digits.
|
|
|
|
|
|
|
|
printf "%O\n" #b[ 10 20 30 ];
|
|
|
|
printf "%010b\n" #b0101;
|
|
|
|
printf "%O\n" #bxy; ##ERROR: syntax error - neither valid radixed number nor valid directive #bxy
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
printf :*; ##ERROR: syntax error - prohibited in this context
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
defun :: fun1() { ##ERROR: syntax error - function name not symbol in defun
|
|
|
|
return 10;
|
|
|
|
};
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
defun :* fun1() { ##ERROR: syntax error - function name not symbol in defun
|
|
|
|
return 10;
|
|
|
|
};
|
2024-03-09 08:10:51 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2024-09-18 12:41:00 +00:00
|
|
|
(10 + 20 30) ##ERROR: syntax error - redundant operand '30'
|
2024-09-16 02:12:11 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
#**a ##ERROR: syntax error - invalid binary selector character 'a' after #**
|
2024-09-18 12:41:00 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
abc- := 20 ##ERROR: syntax error - '-' prohibited as last character of identifier or identifier segment
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
self.g- := 20 ##ERROR: syntax error - '-' prohibited as last character of identifier or identifier segment
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
self.-g := 20 ##ERROR: syntax error - '-' prohibited as first character of identifier or identifier segment
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
if.abc := 20 ##ERROR: syntax error - wrong multi-segment identifier
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
abc. := 20 ##ERROR: syntax error - blank segment after 'abc.'
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
abc.? := 20 ##ERROR: syntax error - '?' prohibited as first character of identifier or identifier segment after 'abc.'
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
- := 20 ##ERROR: syntax error - bad lvalue - invalid element - -
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
+++ := 20 ##ERROR: syntax error - bad lvalue - invalid element - +++
|
|
|
|
|
2024-09-18 13:21:11 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
1 + + + ##ERROR: syntax error - prohibited binary selector '+'
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
1 * 2 3 - 4 ##ERROR: syntax error - prohibited binary selector '-'
|
|
|
|
|
|
|
|
---
|
|
|
|
1 * 2 3 4 ##ERROR: syntax error - redundant operand '4'
|
2024-09-18 13:23:30 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
1 \ 2 ##ERROR: syntax error - stray backslash
|