Menu ▾ ▴

#5725 noncommutative times operator changed by reloading saved data

None
open
nobody
5
6 hours ago
6 hours ago
No

save saves the properties of MNCTIMES (noncommutative multiplication) in a way that changes the behavior of . upon reloading the saved data. After reloading the saved stuff, floating point numbers without a leading digit (e.g. .12345) trigger a syntax error, "incorrect syntax: . is not a prefix operator".

I guess the parser thinks it is trying to construct an MNCTIMES expression instead of a number. I think there is a some special case in the parser to try to parse a number.

I bumped into this bug by run_testsuite(), then save("foo.lisp", all). Here is the excerpt from such a foo.lisp which has the stuff about MNCTIMES:

(DEFPROP MNCTIMES SIMPNCT OPERATORS) 
(DEFPROP MNCTIMES "." OP) 
(SETF (GETHASH "." *OPR-TABLE*) 'MNCTIMES) 
(ADD2LNC '"." $PROPS) 
(DEFINE-SYMBOL '".") 
(SETQ *MOPL* (CONS '"." *MOPL*)) 
(DEFPROP MNCTIMES DIMENSION-NARY DIMENSION) 
(DEFPROP MNCTIMES (#\Space #\FULL_STOP #\Space) DISSYM) 
(DEFPROP MNCTIMES MSIZE-NARY GRIND) 
(DEFPROP MNCTIMES 130. LBP) 
(DEFPROP MNCTIMES 129. RBP) 

I investigated a little bit, and I think the crucial bit is DEFINE-SYMBOL. Further verification needed.

Discussion


Log in to post a comment.