Artifact 8fe170d9926731c17d772776ea6ba98d71ba1fdc9fe1bc3248d67e813e90b5da:
- File
psl-1983/3-1/util/parse-command-string.sl
— part of check-in
[eb17ceb7f6]
at
2020-04-21 19:40:01
on branch master
— Add Reduce 3.0 to the historical section of the archive, and some more
files relating to version sof PSL from the early 1980s. Thanks are due to
Paul McJones and Nelson Beebe for these, as well as to all the original
authors.git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/historical@5328 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 1092) [annotate] [blame] [check-ins using] [more...]
- File
psl-1983/util/parse-command-string.sl
— part of check-in
[eb17ceb7f6]
at
2020-04-21 19:40:01
on branch master
— Add Reduce 3.0 to the historical section of the archive, and some more
files relating to version sof PSL from the early 1980s. Thanks are due to
Paul McJones and Nelson Beebe for these, as well as to all the original
authors.git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/historical@5328 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 1092) [annotate] [blame] [check-ins using]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Parse-Command-String.SL - Parse Program Command String % % Author: Alan Snyder % Hewlett-Packard/CRC % Date: 10 August 1982 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% (BothTimes (load common fast-vector)) (de parse-command-string (s) % This procedure accepts a string and parses it into a sequence % of substrings separated by spaces. It is used to parse the % "command string" given to the PSL program when it is invoked. (let (s-list j (high (size s)) (i 0)) (while T % Scan for the beginning of an argument. (while (<= i high) (cond ((= (igets s i) (char space)) (setq i (+ i 1)) ) (t (exit))) ) (if (> i high) (exit)) % Scan for the end of the argument. (setq j i) (while (<= j high) (cond ((= (igets s j) (char space)) (exit) ) (t (setf j (+ j 1)))) ) (setq s-list (aconc s-list (substring s i j))) (setq i (+ j 1)) ) s-list))