38 lines
780 B
Text
38 lines
780 B
Text
( ( T
|
|
=
|
|
. ( next
|
|
= node stack rhs
|
|
. !arg:%?node ?stack
|
|
& whl
|
|
' ( !node:(?node.?rhs)
|
|
& !rhs !stack:?stack
|
|
)
|
|
& (!node.!stack)
|
|
)
|
|
& !arg:(?stackA,?stackB)
|
|
& whl
|
|
' ( !stackA:~
|
|
& !stackB:~
|
|
& next$!stackA:(?leafA.?stackA)
|
|
& next$!stackB:(?leafB.?stackB)
|
|
& !leafA:!leafB
|
|
)
|
|
& out$!arg
|
|
& ( !stackA:!stackB:
|
|
& !leafA:!leafB
|
|
& out$equal
|
|
| out$"not equal"
|
|
)
|
|
)
|
|
& T$(x,x)
|
|
& T$((x.y),(x.y))
|
|
& T$(((x.y).z),(x.y.z))
|
|
& T$((x.y.z),(x.y.q))
|
|
& T$((x.y),(x.y.q))
|
|
& T$((x.y.z),(x.y))
|
|
& T$(((x.y).z),(x.z.y))
|
|
& T
|
|
$ ( (a.b.c.(x.y).z)
|
|
, (((a.b).c).x.y.z)
|
|
)
|
|
);
|