Alexander Burger wrote:
Hi Cle,
Hi Alex,
although not intended so, it seems I mutate the picoLisp mailing list
into a Pilog mailing list ;-)
Which is a good thing. This way we produce at last some Pilog
documentation ;-)
nice you see it that way :-)
(be attributes ((@H) @L @V) T (member (@H @V) @L) )
(be attributes ((@H . @) @L @V) (member (@H @V) @L) )
(be attributes ((@ . @T) @L @V) T (attributes @T @L @V) )
...
(? (attributes (b c) ((a 1) (b 2) (c 3)) @V))
...
good! But if I comment out the first rule, the Pilog interpreter gets
into an endless loop, I have to terminate explicitely.
Hmm, I cannot reproduce that. It works both with and without the first
rule.
Stupid me! Now I also cannot reproduce it! That is more than strange ...
or perhaps ... perhaps I did execute it with the ./p script and did not
hit the extra Enter afterwards? I have no another explanation, why it
does work now ... sorry for the noise I made ... :-(
BTW, let me explain a debugging aid in Pilog: You can trace the matching
process for individual rules (similar to (trace 'fun) in Lisp) if you
write the names of the rules you like to trace between the '?' and the
first expression:
: (? attributes (attributes (b c) ((a 1) (b 2) (c 3)) @V))
1 (attributes (b c) ((a 1) (b 2) (c 3)) @V)
@V=2
2 (attributes (b c) ((a 1) (b 2) (c 3)) @V)
1 (attributes (c) ((a 1) (b 2) (c 3)) @V)
@V=3
2 (attributes (c) ((a 1) (b 2) (c 3)) @V)
-> NIL
:
The numbers preceding the trace output indicate which one of the
'attributes' rule matched.
That is *really* nice! This will be very helpful in my future
investigations. Thank you! :-)
Cheers,
- Alex
Ciao,
Cle.
--040801020606010302090602
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Alexander Burger wrote:
Hi Cle,
Hi Alex,
although not intended so, it seems I mutate the picoLisp mailing list
into a Pilog mailing list ;-)
Which is a good thing. This way we produce at last some Pilog
documentation ;-)
nice you see it that way :-)
(be attributes ((@H) @L @V) T (member (@H @V) @L) )
(be attributes ((@H . @) @L @V) (member (@H @V) @L) )
(be attributes ((@ . @T) @L @V) T (attributes @T @L @V) )
..
(? (attributes (b c) ((a 1) (b 2) (c 3)) @V))
..
good! But if I comment out the first rule, the Pilog interpreter gets
into an endless loop, I have to terminate explicitely.
Hmm, I cannot reproduce that. It works both with and without the first
rule.
Stupid me! Now I also cannot reproduce it! That is more than strange
.. or perhaps ... perhaps I did execute it with the ./p script and did
not hit the extra Enter afterwards? I have no another explanation, why
it does work now ... sorry for the noise I made ... :-(
BTW, let me explain a debugging aid in Pilog: You can trace the
matching
process for individual rules (similar to (trace 'fun) in Lisp) if you
write the names of the rules you like to trace between the '?' and the
first expression:
: (? attributes (attributes (b c) ((a 1) (b 2) (c 3)) @V))
1 (attributes (b c) ((a 1) (b 2) (c 3)) @V)
@V=2
2 (attributes (b c) ((a 1) (b 2) (c 3)) @V)
1 (attributes (c) ((a 1) (b 2) (c 3)) @V)
@V=3
2 (attributes (c) ((a 1) (b 2) (c 3)) @V)
-> NIL
:
The numbers preceding the trace output indicate which one of the
'attributes' rule matched.
That is *really* nice! This will be very helpful in my future
investigations. Thank you! :-)
Cheers,
- Alex
Ciao,
Cle.
--040801020606010302090602--
--
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe