--- i-syscmd.boot.pamphlet 2004-12-02 00:18:25.000000000 -0500 +++ i-syscmd.boot-0.1.pamphlet 2004-12-03 02:44:39.000000000 -0500 @@ -20,6 +20,56 @@ It appears that probe-file is now case-sensitive. In order to get around this we include the file extensions in both upper and lower case in the search lists. Lower case names are preferred. + +\section{handleNoParseCommands} +The system commands given by the global variable +[[|$noParseCommands|]]\cite{1} require essentially no +preprocessing/parsing of their arguments. Here we dispatch the +functions which implement these commands. + +There are four standard commands which receive arguments -- [[lisp]], +[[synonym]], [[system]] and [[boot]]. There are five standard commands +which do not receive arguments -- [[quit]], [[fin]], [[pquit]], +[[credits]] and [[copyright]]. As these commands do not necessarily +exhaust those mentioned in [[|$noParseCommands|]], we provide a +generic dispatch based on two conventions: commands which do not +require an argument name themselves, those which do have their names +prefixed by [[np]]. + +<>= +handleNoParseCommands(unab, string) == + string := stripSpaces string + spaceIndex := SEARCH('" ", string) + unab = "lisp" => + if (null spaceIndex) then + sayKeyedMsg("S2IV0005", NIL) + nil + else nplisp(stripLisp string) + unab = "boot" => + if (null spaceIndex) then + sayKeyedMsg("S2IV0005", NIL) + nil + else npboot(SUBSEQ(string, spaceIndex+1)) + unab = "system" => + if (null spaceIndex) then + sayKeyedMsg("S2IV0005", NIL) + nil + else npsystem(unab, string) + unab = "synonym" => + npsynonym(unab, (null spaceIndex => '""; SUBSEQ(string, spaceIndex+1))) + null spaceIndex => + FUNCALL unab + MEMBER(unab, '( quit _ + fin _ + pquit _ + credits _ + copyright )) => + sayKeyedMsg("S2IV0005", NIL) + nil + funName := INTERN CONCAT('"np",STRING unab) + FUNCALL(funName, SUBSEQ(string, spaceIndex+1)) + +@ \section{License} <>= -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. @@ -1483,8 +1533,7 @@ null u => nil $doNotAddEmptyModeIfTrue: local:= true u = $quadSymbol => - sayBrightly ['" mode",:bright '"", - '"denotes",:bright '"any","type"] + sayBrightly ['" mode denotes", :bright '"any", "type"] u = "%" => sayKeyedMsg("S2IZ0063",NIL) sayKeyedMsg("S2IZ0064",NIL) @@ -1959,19 +2008,7 @@ nil nil -handleNoParseCommands(unab, string) == - string := stripSpaces string - spaceIndex := SEARCH('" ", string) - unab = "lisp" => - nplisp(stripLisp string) - unab = "synonym" => - npsynonym(unab, (null spaceIndex => '""; SUBSEQ(string, spaceIndex+1))) - unab = "system" => - npsystem(unab, string) - null spaceIndex => - FUNCALL unab - funName := INTERN CONCAT('"np",STRING unab) - FUNCALL(funName, SUBSEQ(string, spaceIndex+1)) +<> npboot str == sex := string2BootTree str @@ -2124,6 +2161,6 @@ @ \eject \begin{thebibliography}{99} -\bibitem{1} nothing +\bibitem{1} [[src/interp/setq.lisp.pamphlet]] \end{thebibliography} \end{document}