summaryrefslogtreecommitdiffstats
path: root/mpi/logtab.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-08-10 06:43:37 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-08-10 06:43:37 -0700
commitf2a2306a8bd6fb86b4819875f752e3a836f1533d (patch)
tree8fd5b8b11f6d114d13d8414511b134a7251f7991 /mpi/logtab.h
parentc9f9e9419a485b383da3229ca130fdd820db3f33 (diff)
downloadtxr-f2a2306a8bd6fb86b4819875f752e3a836f1533d.tar.gz
txr-f2a2306a8bd6fb86b4819875f752e3a836f1533d.tar.bz2
txr-f2a2306a8bd6fb86b4819875f752e3a836f1533d.zip
Diagnose bad consing dot syntax like (a . b . c).
* parser.y (r_exprs): Use unique object in the terminating cons to indicate the empty spot where the dotted cdr item will go. Check for misplaced consing dot. (misplaced_consing_dot_check): New static function. Checks for the terminator atom spot being taken already. Thus, the spot may be taken only by the very last reduction, such that the next reduction is r_exprs -> n_exprs where the terminating atom is processed. * parser.c (unique_s): New global variable. (parse_init): Initialize unique_s. * parser.h (unique_s): Declared. * share/txr/stdlib/place.tl (sys:placelet-1): We have a misplaced consing dot here! It was working correctly by "terminating atom propagation" behavior, which allowed (a . b c d) to produce (a c d . b). If a single terminating atom occurred in the middle of a list, it was promoted to the end.
Diffstat (limited to 'mpi/logtab.h')
0 files changed, 0 insertions, 0 deletions