ISO/IEC JTC1 SC22 WG17
Conformity Assessment I: Syntax

(see also all documents, number_chars/2, variable_names/1)

The Query entry below including a newline character at the end is sent as input to read(X),X. or read(X),X, read(Y),Y. For queries marked /**/ the preceding query which does not start with /**/ must be executed first.

In all cases where a syntax error is required, an implementation may provide some value as an implementation specific extension due to 5.5.1. However, it turns out that those extensions are frequently incompatible between systems.

Full compliance as well as minor deviations or various valid interpretations of the standard are green.

read/1 is used to read the entire given text. Sometimes, read/1 needs further input or EOF to finish. Such differences are labeled as

Some of the queries below assume that the processor character set (6.5) contains the same collating sequence integers (6.6) as ASCII.

#
 
Query 13211-1:1995
²: Cor.2
IF
V5.1B
SWI
6.3.18-3*
YAP
6.3.4
B
7.8#5
GNU
1.4.4-g
SICStus
4.3beta2
Minerva
2.4
XSB
3.5.0
Ciao
1.13.0
Prolog IV
1.4.2
conformance 267/271 208 187 186 196 268 244 186 126 189 234
recent improvements 6 28 50 62 43 48 6
recent regressions 1 8 1 2
misinterpretations 26 39 31 19 1 0 21 71 36 12
rejections 15 13 13 23 0 0 27 26 2 9
write syntax deviations 4 2 3 7 5 1 0 17 13 4 2
extensions 20 29 34 28 1 27 20 35 40 14
read/1 syntax OK yes #203 #56 #39 #111 yes yes new #151 #164 #73 #35
write_canonical/1 OK yes #18 #227 #227 #172 yes yes new #18 #1, #172 #1 yes
writeq/1 OK #33 #135 #156 #150 #18 yes yes new #135 #1 #1 #135
1 writeq('\n'). '\n' OK OK OK OK OK OK OK '
'
'
'
OK
2 ' syntax err. OK waits waits waits/OK OK waits OK waits waits waits
3 ) waits sy._e.(..) OK OK OK OK OK OK OK OK OK
261 )
'
syntax err. OK waits waits waits waits waits OK waits waits waits
4 . syntax err. OK OK OK OK OK new OK OK OK OK OK
5 writeq(' '). % horiz. tab syntax err. '\t' '\t' '\t' '\t' OK new OK '\t' ' ' ' ' '\t'
177 0'\t=0' . % horiz. tab syntax err. succeeds succeeds succeeds succeeds OK new OK succeeds fails succeeds succeeds
6 writeq('
').
syntax err. OK '\n' '\n' '\n' OK OK OK '
'
'
'
OK
7 writeq('\
'). % "\\\n"
'' OK OK new OK new OK new OK OK sy._e.(..) OK OK OK
8 writeq('\
a'). % "\\\na"
a OK OK OK new OK new OK OK sy._e.(..) OK OK OK
9 writeq('a\
b'). % "a\\\nb"
ab OK OK OK OK new OK OK sy._e.(..) OK OK OK
10 writeq('a\
 b'). % "a\\\n b"
'a b' OK ab OK new OK new OK OK sy._e.(..) ab OK OK
11 writeq('\ '). syntax err. OK OK new OK new OK new OK OK OK '\\ ' new '' '\\ '
193 writeq('\
'). % "\\ \n"
syntax err. OK OK new OK new OK new OK OK OK '\\
'
'
'
OK
12 writeq('\ '). % "\\\t" syntax err. OK OK new OK new OK new OK OK OK '\ ' '' '\\\t'
13 writeq('\t'). '\t' OK OK OK OK OK OK OK ' ' ' ' OK
14 writeq('\a'). e.g. '\a' OK OK OK OK OK OK '\u0007' '' '' OK
15 writeq('\7\'). e.g. '\a' OK OK OK new OK OK OK '\u0007' '' '' OK
16 writeq('\ca'). syntax err. OK a '\a' new OK new OK OK OK '\\ca' new a '\\ca'
241 writeq('\d'). syntax err. OK OK '\177\' new OK OK '\x7F\' new OK '\\d' new '??' '\\d'
17 writeq('\e'). syntax err. '\e' '\033\' '\033\' new OK new OK '\x1B\' new '\u001b' '\\e' new '^[' '\\e'
18 writeq('\033\'). e.g. '\33\' '\e' '\033\' '\033\' new '^[' '\x1b\' '\x1B\' new '\u001b' '\' '^[' '\x1b\'
19 char_code('\e',C). syntax err. C = 27 C = 27 C = 27 OK new OK C = 27 C = 27 fails C = 27 ty._e.(ch.,..)
21 char_code('\d',C). syntax err. OK OK new C = 127 OK new OK C = 127 OK fails C = 127 ty._e.(ch.,..)
22 writeq('\u1'). syntax err. OK OK OK new OK new OK OK OK '' new u1 '\\u1'
23 X = 0'\u1. syntax err. OK OK new OK new OK OK OK OK X = 1 reg OK OK
24 writeq(' syntax err. OK waits waits waits OK new waits OK waits waits waits
25 writeq(. syntax err. OK OK OK OK OK new OK OK OK OK OK
26 '\
''.
syntax err. OK waits waits new waits OK waits ex._e.(..) waits waits waits
210 X = 0'\. syntax err. OK waits waits OK OK new OK OK X = 92. waits X = 92.
211 X = 0'\. . syntax err. OK OK new OK new OK OK OK OK X = 92. X = 46. OK
222 writeq((-)-(-)). (-)-(-) (-) - (-) (-)- (-) (-)- (-) OK OK OK (-) - (-) - - - OK OK
223 writeq(((:-):-(:-))). (:-):-(:-) (:-) :- (:-) (:-):- (:-) (:-):- (:-) OK OK OK new (:-) :- (:-) (:- :- :-) (:-):- :- OK
27 writeq((*)=(*)). (*)=(*) (*) = (*) (*)= (*) (*)= (*) new OK new OK OK new (*) = (*) * = * * = * OK
28 writeq([:-,-]). [:-,-] OK OK OK OK new OK OK [(:-),(-)] OK OK OK
29 writeq(f(*)). f(*) OK OK OK OK new OK OK f((*)) OK OK OK
30 writeq(a*(b+c)). a*(b+c) a * (b + c) a* (b+c) a* (b+c) OK OK OK a * (b + c) a * (b + c) OK OK
31 writeq(f(;,'|',';;')). f(;,'|',';;') OK OK OK OK new OK OK f((';'),'|',';;') f(';','|',';;') OK OK
32 writeq([.,.(.,.,.)]). ['.','.'('.','.','.')] OK OK OK OK new OK OK OK OK new OK OK
33 writeq((a :- b,c)). a:-b,c ³ a :- b , c OK OK OK OK OK a :- b , c (a :- b ',' c) OK OK
34 write_canonical([a]). '.'(a,[]) 8.14.2.4 2³ OK OK '.'(a, []) new OK new OK OK [a] [a] OK .(a,[])
35 writeq('/*'). '/*' OK OK OK new OK OK OK OK OK OK sy._e.(..)
203 writeq(//*). //* waits OK OK OK new OK OK '//*' OK OK OK
36 writeq('/**'). '/**' OK OK OK new OK OK new OK OK OK OK sy._e.(..)
37 writeq('*/'). */ OK OK OK OK new OK new OK OK OK OK OK
38 "\'\`\"" = "'`""". % " succeeds syn. e. OK waits reg OK OK OK OK fails OK OK
179 "\'\"" = "'""". % " succeeds OK OK waits reg OK OK OK OK fails OK OK
178 "\`" = "`". succeeds syn. e. OK OK OK OK OK OK OK OK OK
39 '\'\`\"' = '''`"'. succeeds syn. e. OK waits reg OK OK OK OK waits OK OK
40 writeq('\'\`\"\"'). e.g. '\'`""' syn. e. OK waits reg OK '''`""' OK '\'`\"\"' waits '''`""' OK
41 ('\\') = (\). succeeds OK OK OK OK OK OK OK OK OK OK
42 op(1,xf,xf1).
1xf1 = xf1(1).
succeeds OK OK new OK OK OK OK OK OK OK OK
43 X = 0X1. syntax err. OK OK OK new OK OK new OK OK OK OK OK
44 float(.0). syntax err. OK OK OK OK new OK OK OK succeeds OK OK
45 op(100,xfx,.).
functor(3 .2,F,A).
F = ('.'), A = 2. OK OK OK OK new OK OK OK sy._e.(...) OK OK
46 float(- .0). syntax err. OK OK fails OK new OK OK OK succeeds OK OK
47 float(1E9). syntax err. succeeds succeeds succeeds OK OK OK succeeds OK OK OK
48 integer(1e). syntax err. succeeds OK OK OK OK OK OK OK OK OK
49 op(9,xf,e9).
1e9 = e9(1).
succeeds fails fails fails OK OK OK fails OK OK OK
50 op(9,xf,e).
1e-9 = -(e(1),9).
succeeds fails fails fails OK OK OK fails OK OK OK
51  /**/ 1.0e- 9 = -(e(1.0),9). succeeds fails OK OK sy._e.(..) OK OK OK sy._e.(..) OK OK
204  /**/ writeq(1e). e.g. 1 e 1 OK OK OK OK OK OK OK OK OK
220  /**/ writeq(1.0e). e.g. 1.0 e 1.0 OK OK sy._e.(..) OK OK OK sy._e.(..) OK OK
52 op(9,xfy,e).
1.2e 3 = e(X,Y).
X = 1.2, Y = 3. sy._e.(..) OK new OK sy._e.(..) OK OK OK sy._e.(..) OK OK
53 writeq(1.0e100). e.g. 1.0e+100 OK OK new OK new OK OK OK OK OK OK OK
54 float(1.0ee9). syntax err. OK OK OK OK new OK OK OK OK OK OK
56 integer(- 1). succeeds OK fails OK OK OK new OK OK OK OK OK
57 integer('-'1). succeeds fails fails OK OK OK OK OK OK OK OK
58 integer('-' 1). succeeds fails fails OK OK OK new OK OK OK OK OK
59 integer(- /**/1). succeeds OK fails OK OK OK new OK OK OK OK OK
60 integer(-/**/1). syntax err. succeeds OK OK OK OK OK OK OK OK OK
61 integer('-'/**/1). succeeds fails fails OK OK OK new OK OK OK OK OK
62 atom(-/**/-). succeeds fails OK OK OK OK OK OK OK OK OK
63 op(0,fy,-). succeeds OK OK OK OK OK OK OK OK OK OK
180  /**/ integer(-1). succeeds OK OK OK new OK OK OK OK OK OK sy._e.(..)
64  /**/ integer(- 1). succeeds OK sy._e.(..) OK new OK OK new OK OK OK OK sy._e.(..)
135 writeq(-(1)). - (1) - 1 - 1 OK new OK new OK new OK new - 1 -1 -(1) -1
136 op(0,fy,-),writeq(-(1)). -(1) OK OK OK OK new OK OK OK -1 OK OK
182 writeq(-(-1)). - -1 OK - -1 OK new - (-1) OK OK new OK --1 -(-1) OK
183 writeq(-(1^2)). - (1^2)³ - 1 ^ 2 - 1^2 - (1)^2 new OK new OK new OK new - 1 ^ 2 -(1 ^ 2) -1^2 -1^2
260 writeq(-(a^2)). - (a^2)³ - a ^ 2 -a^2 -a^2 -a^2 -a^2 OK new - a ^ 2 -(a ^ 2) -a^2 -a^2
139 writeq(-((a,b))). - (a,b) ³ - (a , b) OK new OK new OK new OK OK new - (a , b) -(a ',' b) OK OK
218 writeq(-(1*2)). - (1*2) - (1 * 2) OK new OK - ( (1*2)) OK OK new - (1 * 2) -(1 * 2) OK OK
140 writeq(-a). -a - a OK OK OK new OK OK new - a OK OK OK
184 writeq(-(-)). - (-) OK OK new OK new -(-) OK OK new OK -- OK OK
185 writeq(-[-]). -[-] - [-] OK OK OK new OK OK new - [(-)] OK OK OK
188 writeq(-p(c)). -p(c) - p(c) OK OK OK new OK OK new - p(c) OK OK OK
189 writeq(-{}). -{} - {} OK OK - {} OK OK new - {} -'{}' OK OK
190 writeq(-{a}). -{a} ³ - {a} OK OK OK new OK OK new - {}(a) ³ OK OK OK
191 writeq(-(-a)). - -a. - - a. OK OK OK new OK OK new - - a. -(-a) OK OK
192 writeq(-(-(-a))). - - -a. - - - a. OK OK OK new OK OK new - - - a. -(-(-a)) OK OK
216 writeq(-(-(1))). - - (1) - - 1 - - 1 OK new - (- (1)) OK OK new - - 1 -(-1) - -(1) - -1
215 op(100,yfx,~).
writeq(-(1~2~3)).
- (1~2~3) ³ - 1 ~ 2 ~ 3 - 1~2~3 - (1)~2~3
new
OK new OK new OK new - 1 ~ 2 ~ 3 -1 ~ 2 ~ 3 -1~2~3 -1~2~3
248  /**/ writeq(- (1~2)). - (1~2) ³ - 1 ~ 2 - 1~2 - (1)~2 OK OK OK new - 1 ~ 2 -1 ~ 2 -1~2 -1~2
249  /**/ writeq(1~2). 1~2 1 ~ 2 OK OK OK OK OK 1 ~ 2 1 ~ 2 OK OK
55 op(1,yf,yf1).
{-1 yf1}={yf1(X)}.
X = -1. OK OK OK OK OK OK sy._e.(..) OK OK OK
65 compound(+1). succeeds ² OK fails OK new OK OK OK new OK with op OK OK OK with op
66 compound(+ 1). succeeds ² OK OK OK new OK OK OK new OK with op OK OK OK with op
257 writeq([+{a},+[]]). [+{a},+[]] [+ {a},+ []] OK OK [+{a},+ []] OK OK new [+ {}(a),+ []] OK OK OK with op
67 op(0,fy,+).
compound(+1).
syntax err. OK fails OK OK new OK OK new OK succeeds OK OK
68 [(:-)|(:-)]=[:-|:-]. succeeds OK OK OK OK OK new OK OK OK OK OK
69 X=[a|b,c]. syntax err. X=[a|(b,c)] OK OK OK OK OK OK OK OK OK
70 op(1000,xfy,','). p._e.(m., o.,',') OK OK OK OK OK OK succeeds OK succeeds OK
71 op(1001,xfy,','). p._e.(m., o.,',') or
p._e.(c., o.,',')
OK OK OK OK OK OK succeeds OK OK OK
72 op(999,xfy,'|'). p._e.(c., o.,'|') ² succeeds OK OK p._e.(m., o.,'|') OK new OK new succeeds succeeds succeeds succeeds
73  /**/ X=[a|b]. X=[a|b]. OK OK OK OK OK OK OK OK X=[(a|b)] OK
219  /**/ [a|[]]=[a]. succeeds OK OK OK OK OK OK OK OK fails OK
74  /**/ X=[a|b|c]. syntax err. X=[a|(b|c)] OK OK OK OK OK OK OK X=[(a|b|c)] OK
75 var(a:-b). syntax err. OK fails OK OK OK OK OK OK OK OK
76 :- = :- . syntax err. OK OK OK succeeds OK succeeds OK OK succeeds OK
77 - = - . syntax err. OK succeeds OK succeeds OK succeeds OK succeeds succeeds OK
78 * = * . syntax err. succeeds succeeds succeeds succeeds OK succeeds succeeds succeeds succeeds OK
79 current_op(200,fy,-). succeeds OK OK OK new OK OK OK OK fails OK OK
80 current_op(200,fy,+). succeeds ² OK OK OK OK OK OK fails fails OK OK
81 {- - c}={-(-(c))}. succeeds OK OK OK OK new OK OK OK fails OK OK
82 (- -) = -(-). syntax err. succeeds succeeds succeeds succeeds OK succeeds succeeds OK succeeds OK
83 (- - -) = -(-(-)). syntax err. succeeds succeeds succeeds succeeds OK succeeds succeeds fails succeeds OK
84 (- - - -) = -(-(-(-))). syntax err. succeeds succeeds succeeds succeeds OK succeeds succeeds OK succeeds OK
85 {:- :- c} = {:-(:-,c)}. syntax err. OK OK succeeds succeeds OK succeeds OK OK succeeds OK
86 {- = - 1}={(-(=)) - 1}. syntax err. succeeds fails succeeds succeeds OK succeeds succeeds fails succeeds OK
87 write_canonical((- = - 1)). syntax err. -(-(=),1) =(-,-(1)) -(-(=),1) -(-(=),1) OK -(-(=),1) -(-(=),1) =(-,-1) -(-(=),1) OK
88 write_canonical((- = -1)). syntax err. -(-(=),1) =(-,-1) -(-(=),1) -(-(=),1) OK -(-(=),1) -(-(=),1) =(-,-1) -(-(=),1) OK
89 write_canonical((-;)). syntax err. OK OK -(;) -(;) OK -(;) -(';') -(';') -(;) OK
90 write_canonical((-;-)). syntax err. ;(-,-) ;(-,-) OK ;(-,-) OK ;(-,-) OK OK ;(-,-) OK
91 write_canonical((:-;-)). syntax err. ;(:-,-) OK OK ;(:-,-) OK ;(:-,-) OK OK ;(:-,-) OK
92 [:- -c] = [(:- -c)]. syntax err. OK succeeds fails fails OK fails OK OK fails OK
93 writeq([a,b|,]). syntax err. OK [a,b|','] OK OK OK OK OK OK OK OK
94 X ={,}. syntax err. OK X = {','}. OK OK OK OK OK OK OK OK
95 {1} = {}(1). succeeds OK OK OK OK new OK OK OK sy._e.(..) OK OK
96 write_canonical({1}). {}(1) OK OK OK OK new OK OK OK '{}'(1) OK OK
97 '[]'(1) = [ ](X). X = 1 OK OK OK OK new OK OK OK sy._e.(..) OK OK
98 X = [] (1). syntax err. OK OK X = [](1) X = [](1) reg OK OK OK OK X = [](1) OK
99 op(100,yfy,op). do._e.(op._s., yfy) OK OK new OK OK OK OK succ./no eff. OK OK OK
100 '''' = '\''. succeeds OK OK waits reg OK OK OK OK waits OK OK
101 a = '\141\'. succeeds OK OK OK new OK new OK OK OK fails OK OK
102 a = '\141'. syntax err. OK succeeds OK new OK OK OK OK succeeds waits OK
103 X = '\141\141'. X = a141 OK OK OK new OK new OK OK OK X = aa OK OK
104 X = '\9'. syntax err. OK OK new OK new OK new OK OK OK X = '\\9' X = '9' X = '\\9'
105 X = '\N'. syntax err. OK OK new OK new OK new OK OK waits X = '\\N' X = 'N' X = '\\N'
106 X = '\\' . syntax err. X = (\) X = (\) X = (\) X = (\) OK new X = (\) X = (\) X = (\) X = (\) OK
107 X = '\77777777777\'. syntax/repr. err. OK OK new OK new OK new OK OK OK X = ... halts X = .
108 a = '\x61\'. succeeds OK OK OK new OK OK OK OK fails OK OK
109 atom_codes('\xG\',Cs). syntax err./waits OK waits OK new OK OK new OK waits Cs = [] halts waits
110 atom_codes('\xG1\',Cs). syntax err./waits OK waits Cs = [1] reg OK OK new waits waits Cs = [] Cs = [1] waits
111 atom(`). syntax err. succeeds succeeds succeeds succeeds OK new waits OK succeeds succeeds waits
112 atom(`+). syntax err. succeeds succeeds succeeds succeeds OK new waits OK succeeds succeeds waits
113 X = `a`. syntax err./succ. sy._e.(..) waits waits sy._e.(..) X = 'a' X = 'a' OK waits waits OK
114 integer(0'\'). succeeds OK OK new OK OK OK OK OK OK OK OK
115 integer(0'''). succeeds OK OK new sy._e.(..) OK OK OK OK OK OK OK
116 0''' = 0'\'. succeeds OK OK new sy._e.(..) OK new OK OK OK fails OK OK
117 integer(0''). syntax err. OK succeeds succeeds OK new OK new OK OK succeeds succeeds OK
195 op(100,xf,''). succeeds OK OK OK OK OK OK OK OK OK OK
205  /**/ (0 '') = ''(X). X = 0. OK OK OK OK OK OK OK OK OK OK
196  /**/ writeq(0 ''). 0'' or 0 '' 0 '' 0 '' 0'' 0 '' new 0 '' 0 '' 0 '' 0 0 '' 0''
197  /**/ writeq(0''). 0'' or 0 '' sy._e.(..) 39 39 sy._e.(..) 0 '' new 0 '' new sy._e.(..) 39 39 sy._e.(..)
118 op(100,xfx,''). succeeds OK OK OK OK OK OK OK OK OK OK
119  /**/ functor(0 ''1, F, A). F = (''), A = 2. OK OK OK OK OK OK OK OK OK OK
120  /**/ functor(0''1, F, A). F = (''), A = 2. sy._e.(..) sy._e.(..) sy._e.(..) F= -1, A=0 OK OK new sy._e.(..) sy._e.(..) sy._e.(..) sy._e.(..)
206 op(100,xf,f).
writeq(0'f').
syntax err. OK waits waits 102 OK waits OK 102 waits waits
207  /**/ writeq(0'f'f'). e.g. 102 f OK OK OK syn. e. OK OK OK waits OK OK
209  /**/ writeq(0'ff). 102 f OK OK OK OK OK OK OK OK OK OK
256  /**/ writeq(0f). 0 f OK OK OK OK OK OK OK OK OK OK
208 op(100,xf,'f ').
writeq(0 'f ').
0 'f ' OK OK OK OK new OK new OK OK OK OK 0'f '
121 X = 2'1. syntax err. OK X = 1 X = 1 X = 1 OK new waits OK X = 1 X = 1 waits
122 op(100,xfx,'1').
functor(2'1'y, F, A).
F = ('1'), A = 2. OK waits waits sy._e.(..) OK OK OK sy._e.(..) waits OK
262  /**/ functor(2 '1'y, F, A). F = ('1'), A = 2. OK OK OK OK OK OK OK OK OK OK
123 X =0'\x41\ . X = 65 repr. error OK sy._e.(..) OK new OK OK OK sy._e.(..) OK OK
124 X =0'\x41\. X = 65 repr. err. waits waits OK new OK OK OK waits OK OK
125 X =0'\x1\. X = 1 repr. err. waits waits OK new OK OK OK waits OK OK
127 X is 16'mod'2. X = 0 OK OK new ty._e.(..) sy._e.(..) OK OK OK waits OK OK
128 X is 37'mod'2. X = 1 OK OK new sy._e.(..) t._a.(..) OK OK OK sy._e.(..) OK OK
129 X is 0'mod'1. syntax err. waits waits waits OK OK new waits OK waits waits waits.
130 X is 1'+'1. X = 2 OK OK new ty._e.(..) reg sy._e.(..) OK OK OK sy._e.(..) OK OK
212 X is 1'\
+'1.
X = 2. OK OK sy._e.(..) waits OK OK sy._e.(..) waits OK OK
213 X is 0'\
+'1.
X = 1. repr. err. waits waits sy._e.(..) OK new OK new sy._e.(..) sy._e.(..) waits waits
259 X = 0'\
+'/*'. %*/1.
X = 0+1 repr. err. X = 10+'/*'. X = 43 sy._e.(..) sy._e.(..) OK new OK new sy._e.(..) sy._e.(..) sy._e.(..) sy._e.(..)
214 X is 0'\ waits repr. err. OK OK OK OK new OK new sy._e.(..) OK OK OK
126 X = 0'\
.\
waits repr. err. sy._e.(..) OK new OK OK OK new sy._e.(..) OK OK OK
131 op(100,fx,' op'). succeeds OK OK OK OK OK OK OK OK OK OK
132  /**/ writeq(' op' '1'). ' op' '1' OK OK new OK ' op' '1' OK OK OK OK OK OK
133  /**/ writeq(' op'[]). ' op'[] ' op' [] OK ' op' [] ' op' [] OK OK ' op' [] ' op' [] OK OK
134 op(1,xf,xf1).
writeq({- =xf1}).
syntax err. {- (=) xf1} { (-)= (xf1)} {- (=)xf1} {-(=)xf1} OK {- ((=)xf1)} {}(- (=) xf1) {- = xf1} {- =xf1} OK
137 writeq(- (a*b)). - (a*b) - (a * b) OK new OK OK new OK OK new - (a * b) -(a * b) OK OK
138 writeq(\ (a*b)). \ (a*b) \ (a * b) OK OK OK new OK OK \ (a * b) \(a * b) OK OK
141 current_op(P,xfy,.). fails OK OK P = 999 OK new OK OK OK P = 661 OK OK
142 op(400,xfy,.). succeeds OK OK OK OK new OK OK OK OK OK OK
143  /**/ writeq(1 .2). [1|2] OK OK OK OK new OK OK 1 '.' 2 syn. e. OK OK
144  /**/ writeq([1]). [1] OK OK OK OK OK OK 1 '.' [] OK OK OK
221  /**/ X = 1.e. X = [1|e]. OK OK OK OK OK OK X = 1 '.' e. OK OK OK
258  /**/ writeq(ok).%
1 = X.
ok X = 1 OK OK OK X = [writeq(
ok)|1]
OK OK OK OK OK OK
145 write_canonical('$VAR'(0)). '$VAR'(0) OK OK new OK OK OK OK OK OK OK OK
146 write_term('$VAR'(0),[]). $VAR(0) OK OK OK A OK new OK OK $VAR( 0) OK OK
244 writeq('$VAR'(0)). A OK OK OK OK OK OK OK OK OK OK
245 writeq('$VAR'(-1)). '$VAR'(-1) OK S_1 _ OK OK OK OK Z OK OK
246 writeq('$VAR'(-2)). '$VAR'(-2) OK S_2 ? OK OK OK OK Y OK OK
247 writeq('$VAR'(x)). '$VAR'(x) OK OK x x OK OK new OK OK x OK
147 op(9,fy,fy),op(9,yf,yf).
write_canonical(fy 1 yf).
fy(yf(1)) OK yf(fy(1)) OK OK OK OK syn. e. OK OK OK
148  /**/ write_canonical(fy yf). syntax err. fy(yf) fy(yf) fy(yf) fy(yf) OK fy(yf) fy(yf) yf(fy) fy(yf) OK
149  /**/ writeq(fy(yf(1))). fy 1 yf OK OK OK OK OK OK fy yf(1) OK OK OK
150  /**/ writeq(yf(fy(1))). (fy 1)yf (fy 1) yf fy 1 yf fy 1 yf OK OK OK yf(fy 1) fy 1 yf OK OK
151 op(9,fy,fy),op(9,yfx,yfx).
write_canonical(fy 1 yfx 2).
fy(yfx(1,2)) OK yfx(fy(1), 2) OK OK OK OK yfx(fy(1), 2) OK OK OK
152  /**/ writeq(fy(yfx(1,2))). fy 1 yfx 2 OK OK OK OK OK OK OK OK OK OK
153  /**/ writeq(yfx(fy(1),2)). (fy 1)yfx 2 (fy 1) yfx 2 fy 1 yfx 2 fy 1 yfx 2 OK OK OK fy 1 yfx 2 fy 1 yfx 2 OK OK
154 op(9,yf,yf),op(9,xfy,xfy).
write_canonical(1 xfy 2 yf).
xfy(1,yf(2)) OK yf(xfy(1, 2)) OK OK OK OK syn. e. OK OK OK
155  /**/ writeq(xfy(1,yf(2))). 1 xfy 2 yf OK OK OK OK OK OK 1 xfy yf(2) OK OK OK
156  /**/ writeq(yf(xfy(1,2))). (1 xfy 2)yf (1 xfy 2) yf 1 xfy 2 yf 1 xfy 2 yf OK OK OK yf(1 xfy 2) 1 xfy 2 yf OK OK
157 op(0,xfy,:-).
current_op(P,xfx,:-).
fails OK OK OK p._e.(m., o.,:-) OK OK OK P = 1200 OK OK
158 op(0,xfy,','). p._e.(m., o.,',') OK OK OK OK OK OK succ./no eff. OK OK OK
159 op(9,fy,f),op(9,yf,f).
write_canonical(f f 0).
f(f(0)) OK OK OK OK OK OK OK syn. e. OK OK
201  /**/ writeq(f(f(0))). e.g. f f 0 f f 0 f f 0 f f 0 0 f f f f 0 0 f f f f 0 f f 0 0 f f f f 0
202  /**/ write_canonical(f 0 f). f(f(0)) OK OK OK OK OK OK syn. e. OK OK OK
160  /**/ write_canonical(0 f f). f(f(0)) OK OK OK OK OK OK syn. e. OK OK OK
161  /**/ write_canonical(f f). syntax err. f(f) f(f) f(f) f(f) OK f(f) f(f) f(f) f(f) OK
162 op(9,fy,p),op(9,yfx,p).
write_canonical(1 p p p 2).
syntax err. OK OK p(p(1,p), 2) p(p(1,p), 2) OK p(p(1,p), 2) OK OK p(p(1,p), 2) OK
163 op(9,fy,p),op(9,xfy,p).
write_canonical(1 p p p 2).
p(1, p(p(2))) OK OK OK OK OK OK OK OK OK OK
164 op(7,fy,p),op(9,yfx,p).
write_canonical(1 p p p 2).
p(1, p(p(2))) OK OK OK OK new OK OK OK p(p(1,p), 2) OK OK
165 atom('.''-''.'). succeeds OK OK OK OK OK OK OK OK OK OK
166 op(0,xfy,'|'). succeeds OK OK OK new p._e.(m., o.,'|') OK new OK OK OK OK OK
167  /**/ writeq((a|b)). syntax err. OK OK OK new a|b OK new a;b OK (a ';' b) OK OK
168 op(9,yf,.). succeeds OK OK OK OK new OK OK OK OK OK OK
169  /**/ writeq(.(.)). ('.')'.' ('.') '.' OK OK ('.') '.' new OK OK new '.'('.') '.'. '.' '.' OK
194 writeq((.)+(.)). '.'+'.' '.' + '.' OK ('.')+('.') OK new OK OK '.' + '.' '.' + '.' OK OK
170 set_prolog_flag(
 double_quotes,chars).
succeeds OK OK OK OK OK OK OK d._e.(p., d.). OK OK
171  /**/ writeq("a"). [a] OK OK OK OK OK OK OK [97] [97] OK
229  /**/ writeq("\z"). syntax err. OK OK [] OK OK OK OK [92,112] reg [122] OK
172 X is 10.0** -323, writeq(X). e.g. 1.0e-323. 9.8..e-324 1.0e-323 1.0e-323 new 0.0 9.8..e-324 1.0E-323 1.0E-323 0.0000 1.0e-323 1.0e-323
173 1.0e-323=:=10.0** -323. succeeds re._e.(num.) OK new OK OK OK OK OK OK fails OK
174 -1 = -0x1. succeeds OK OK OK OK OK OK OK OK OK OK
175 T = t(0b1,0o1,0x1). T = t(1,1,1) OK OK OK OK OK OK OK OK OK OK
176 X is 0b1mod 2. X = 1 OK OK OK OK OK OK OK OK OK OK
217 op(1105,xfy,'|'). succeeds OK OK OK p._e.(m., o.,'|') OK OK OK OK OK OK
181  /**/ writeq((a-->b,c|d)). a-->b,c|d ² ³ a --> b , c '|' d OK new OK new OK OK OK new syn. e. (a --> b ',' c ';' d) a-->b,c | d sy._e.(..)
186 X/* /*/=7. X = 7 OK waits OK new OK OK OK OK OK OK OK
187 X/*/*/=7. X = 7 OK waits OK new OK OK OK OK OK OK OK
198 atom($-). OK OK OK OK OK OK OK OK OK OK OK
199 atom(-$). succeeds OK OK OK fails OK OK OK OK OK OK
200 op(900, fy, [$]).
write_canonical($a+b).
$(+(a,b)) OK OK OK +('$a',b) OK OK OK OK OK OK
224 \ . ex._e.(..) OK OK OK OK OK OK OK OK OK u._c.((\)/0)
225 char_code(C,0), writeq(C). '\0\' or rep._e. rep._e. '\000\' '' rep._e. rep._e. '\x0\' '\u0000' '' de._e. ''
250 writeq('\0\'). rep._e. or '\0\' sy._e.(..) '\000\' '' ' sy._e.(..) '\x0\' '\u0000' '' d._e. ''
226 write_canonical(_+_). e.g. +(_1,_2) +(_164,
_165)
+(_,_) +(_,_) +(_2f0,
_314)
+(_23,
_24)
+(_430,
_448)
+(_583,
_657)
+(_h164,
_h173)
+(_5692,
_5705)
+(_905,
_906)
227 write_canonical(B+B). e.g. +(_1,
_1)
+(_164,
_164)
+(A,A) +(A,A) +(_338,
_338)
+(_23,
_23)
+(_430,
_430)
+(_583,
_583)
+(_h164,
_h164)
+(_5692,
_5692)
+(_259,
_259)
228 writeq(0'\z). syntax err. OK OK -1 OK OK OK OK OK 122 OK
230 char_code('\^',X). syntax err. OK OK OK OK OK OK OK fails X = 94 ty._e.(..)
231 writeq(0'\c). syntax err. OK 99 OK OK OK OK OK OK OK OK
232 writeq(0'\ ). syntax err. OK OK 32 OK OK OK OK 92 OK 92
233 writeq(nop (1)). syntax err. OK OK OK OK OK OK OK OK OK OK
234 op(400,fx,f).
writeq(f/*.*/(1,2)).
f (1,2) ³ OK OK OK OK OK OK f (1 , 2) f (1 ',' 2) OK OK
235  /**/ writeq(1 = f). syntax err. 1 = (f) 1= (f) 1= (f) 1=(f) OK 1=(f) 1 = (f) 1 = f 1=(f) OK
236 write_canonical(a- - -b). -(a,-(-(b))) OK OK OK OK OK OK OK -(-(a,-),b) OK OK
237 op(699,xf,>). p._e.(c.,op,>) OK succeeds succeeds succeeds OK succeeds succeeds succeeds succeeds OK
238  /**/ writeq(>(>(a),b)). >(a)>b >(a) > b a> > b a> >b (a>)>b >(a)>b (a>)>b >(a >,b) a> > b (a>)>b >(a)>b
239  /**/ write_canonical(a> >b). syntax err. OK syntax err. >(>(a),b) syntax err. OK >(>(a),b) syntax err. syntax err. >(>(a),b) OK
242  /**/ write_canonical(a> =b). syntax err. OK syntax err. =(>(a),b) syntax err. OK =(>(a),b) =(>(a),b) syntax err. =(>(a),b) OK
243  /**/ write_canonical((a>,b)). syntax err. OK ','(>(a),b) ','(>(a),b) syntax err. OK ','(>(a),b) ','(>(a),b) syntax err. ','(>(a),b) OK
240  /**/ write_canonical(a>). syntax err. OK >(a) >(a) syntax err. OK >(a) syntax err. syntax err. >(a) OK
251 op(9,yfx,[bop,bo,b,op,xor]).
writeq(0bop 2).
0 bop 2 OK sy._e.(..) 0 op 2 sy._e.(..) OK new OK new sy._e.(..) 0 op 2 OK OK
263  /**/ writeq(0 bop 2). 0 bop 2 OK OK OK OK OK OK OK OK OK OK
252  /**/ writeq(0bo 2). 0 bo 2 OK sy._e.(..) sy._e.(..) sy._e.(..) OK new OK new sy._e.(..) sy._e.(..) OK OK
253  /**/ writeq(0b 2). 0 b 2 OK sy._e.(..) sy._e.(..) sy._e.(..) OK new OK new sy._e.(..) sy._e.(..) OK OK
254  /**/ writeq(0op 2). 0 op 2 OK sy._e.(..) sy._e.(..) sy._e.(..) OK new OK new sy._e.(..) sy._e.(..) OK OK
255  /**/ writeq(0xor 2). 0 xor 2 OK sy._e.(..) sy._e.(..) sy._e.(..) OK new OK new sy._e.(..) sy._e.(..) OK sy._e.(..)
264 writeq('^`'). '^`' ^` ^` ^` OK OK OK OK ^` ^` OK
265 op(9,yf,[b2,o8]). succeeds OK OK OK OK OK OK OK OK OK OK
266  /**/ writeq(0b2). 0 b2 OK sy._e.(..) sy._e.(..) sy._e.(..) OK new OK new sy._e.(..) sy._e.(..) OK OK
267  /**/ writeq(0o8). 0 o8 OK sy._e.(..) sy._e.(..) sy._e.(..) OK new OK new sy._e.(..) sy._e.(..) OK OK
268 op(500, xfy, {}). p._e.(c.,o.,{}) ² succ succ. reg OK new OK new OK new OK new succ succ succ succ
269 writeq('\b\r\f\t\n'). '\b\r\f\t\n' OK OK OK OK OK OK OK '

'
'

'
OK
270 get_char(C). %a C = ' ' C = '%' C = '%' C = '%' C = '%' C = '%' OK OK C = '%' C = '%' OK
271 get_char(C).%a C = '%' C = '\n' + C = '\n' + C = '\n' + waits OK OK OK waits C = '\n' + OK
272 Finis (). syntax err. OK OK OK OK OK OK OK OK OK OK
Remarks:
/**/requires preceding test without /**/
² including Cor. 2 (from approved DTC2)
³ including/ignoring WDCor.3
XXXlicense expired
*more recent versions are not considered for conformity reasons
+Requires an extra newline as input
@@@not yet tested (difficult reproduction)
n/anot applicable (for parser only)
#71 There are two possible errors:
permission_error(modify, operator, ',') due to 8.14.3.3 j
permission_error(create, operator, ',') due to 8.14.3.3 l which applies because Priority 1001 for comma is invalid due to 6.3.4.3.

Deleted cases

20: Subsumed by #18

8.14.1.1 defines when a syntax error may be produced. There are actually two possibilities: Syntax errors on the token level and on the syntax level. Syntax level errors may only be produced when an end token (6.4.8) is encountered.

History

2010-11-04: start
2010-11-14: revision 1.1
2010-11-26: revision 1.11
2011-05-25: revision 1.66
Version Control
Validated HTML