diff options
40 files changed, 209 insertions, 159 deletions
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for OpenAxiom 1.4.0-2010-05-22. +# Generated by GNU Autoconf 2.63 for OpenAxiom 1.4.0-2010-05-26. # # Report bugs to <open-axiom-bugs@lists.sf.net>. # @@ -745,8 +745,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='OpenAxiom' PACKAGE_TARNAME='openaxiom' -PACKAGE_VERSION='1.4.0-2010-05-22' -PACKAGE_STRING='OpenAxiom 1.4.0-2010-05-22' +PACKAGE_VERSION='1.4.0-2010-05-26' +PACKAGE_STRING='OpenAxiom 1.4.0-2010-05-26' PACKAGE_BUGREPORT='open-axiom-bugs@lists.sf.net' ac_unique_file="src/Makefile.pamphlet" @@ -1513,7 +1513,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures OpenAxiom 1.4.0-2010-05-22 to adapt to many kinds of systems. +\`configure' configures OpenAxiom 1.4.0-2010-05-26 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1583,7 +1583,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of OpenAxiom 1.4.0-2010-05-22:";; + short | recursive ) echo "Configuration of OpenAxiom 1.4.0-2010-05-26:";; esac cat <<\_ACEOF @@ -1691,7 +1691,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -OpenAxiom configure 1.4.0-2010-05-22 +OpenAxiom configure 1.4.0-2010-05-26 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1705,7 +1705,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by OpenAxiom $as_me 1.4.0-2010-05-22, which was +It was created by OpenAxiom $as_me 1.4.0-2010-05-26, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -21182,7 +21182,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by OpenAxiom $as_me 1.4.0-2010-05-22, which was +This file was extended by OpenAxiom $as_me 1.4.0-2010-05-26, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21245,7 +21245,7 @@ Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -OpenAxiom config.status 1.4.0-2010-05-22 +OpenAxiom config.status 1.4.0-2010-05-26 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/configure.ac b/configure.ac index ea363dc9..5f879d6c 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ sinclude(config/open-axiom.m4) sinclude(config/aclocal.m4) -AC_INIT([OpenAxiom], [1.4.0-2010-05-22], +AC_INIT([OpenAxiom], [1.4.0-2010-05-26], [open-axiom-bugs@lists.sf.net]) AC_CONFIG_AUX_DIR(config) diff --git a/configure.ac.pamphlet b/configure.ac.pamphlet index 33025571..43c34f12 100644 --- a/configure.ac.pamphlet +++ b/configure.ac.pamphlet @@ -1210,7 +1210,7 @@ information: <<Autoconf init>>= sinclude(config/open-axiom.m4) sinclude(config/aclocal.m4) -AC_INIT([OpenAxiom], [1.4.0-2010-05-22], +AC_INIT([OpenAxiom], [1.4.0-2010-05-26], [open-axiom-bugs@lists.sf.net]) @ diff --git a/src/ChangeLog b/src/ChangeLog index f8d78fc8..639cb4bd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,43 @@ +2010-05-26 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * boot/tokens.boot: Automatically translate alphabetic?, digit?, + lowerCase?, upperCase?, readByte, readInteger, readLine, + writeByte, writeLine. + * interp/as.boot: Use them. + * interp/bc-matrix.boot: Likewise. + * interp/bc-solve.boot: Likewise. + * interp/br-con.boot: Likewise. + * interp/br-search.boot: Likewise. + * interp/br-util.boot: Likewise. + * interp/c-doc.boot: Likewise. + * interp/c-util.boot: Likewise. + * interp/database.boot: Likewise. + * interp/format.boot: Likewise. + * interp/fortcall.boot: Likewise. + * interp/functor.boot: Likewise. + * interp/g-util.boot: Likewise. + * interp/guess.boot: Likewise. + * interp/ht-root.boot: Likewise. + * interp/htcheck.boot: Likewise. + * interp/htsetvar.boot: Likewise. + * interp/i-map.boot: Likewise. + * interp/i-output.boot: Likewise. + * interp/i-syscmd.boot: Likewise. + * interp/i-util.boot: Likewise. + * interp/int-top.boot: Likewise. + * interp/intfile.boot: Likewise. + * interp/mark.boot: Likewise. + * interp/msgdb.boot: Likewise. + * interp/pf2sex.boot: Likewise. + * interp/pspad1.boot: Likewise. + * interp/pspad2.boot: Likewise. + * interp/scan.boot: Likewise. + * interp/slam.boot: Likewise. + * interp/sys-utility.boot: Likewise. + * interp/topics.boot: Likewise. + * interp/trace.boot: Likewise. + * interp/word.boot: Likewise. + 2010-05-25 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/c-util.boot ($ClearBodyToken): New constant. diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp index 88d2552a..43f54797 100644 --- a/src/boot/strap/tokens.clisp +++ b/src/boot/strap/tokens.clisp @@ -199,41 +199,43 @@ (SETQ |bfVar#8| (CDR |bfVar#8|))))) (EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) - (LET ((|bfVar#9| (LIST (LIST '|and| 'AND) (LIST '|append| 'APPEND) - (LIST '|apply| 'APPLY) (LIST '|atom| 'ATOM) - (LIST '|cons?| 'CONSP) (LIST '|copy| 'COPY) - (LIST '|croak| 'CROAK) (LIST '|drop| 'DROP) - (LIST '|exit| 'EXIT) (LIST '|false| 'NIL) - (LIST '|first| 'CAR) (LIST '|fourth| 'CADDDR) - (LIST '|function| 'FUNCTION) - (LIST '|gensym| 'GENSYM) - (LIST '|genvar| 'GENVAR) - (LIST '|integer?| 'INTEGERP) - (LIST '|lastNode| 'LAST) (LIST 'LAST '|last|) - (LIST '|list| 'LIST) (LIST '|mkpf| 'MKPF) - (LIST '|nconc| 'NCONC) (LIST '|nil| NIL) - (LIST '|not| 'NOT) - (LIST '|nreverse| 'NREVERSE) - (LIST '|null| 'NULL) (LIST '|or| 'OR) - (LIST '|otherwise| 'T) - (LIST '|removeDuplicates| 'REMDUP) - (LIST '|rest| 'CDR) (LIST '|reverse| 'REVERSE) - (LIST '|second| 'CADR) - (LIST '|setDifference| 'SETDIFFERENCE) - (LIST '|setIntersection| 'INTERSECTION) - (LIST '|setPart| 'SETELT) - (LIST '|setUnion| 'UNION) - (LIST '|strconc| 'CONCAT) - (LIST '|string?| 'STRINGP) - (LIST '|substitute| 'SUBST) - (LIST '|symbol?| 'SYMBOLP) - (LIST '|take| 'TAKE) (LIST '|third| 'CADDR) - (LIST '|true| 'T) (LIST 'PLUS '+) - (LIST 'MINUS '-) (LIST 'TIMES '*) - (LIST 'POWER 'EXPT) (LIST 'SLASH '/) - (LIST 'LT '<) (LIST 'GT '>) (LIST 'LE '<=) - (LIST 'GE '>=) (LIST 'SHOEEQ 'EQUAL) - (LIST 'SHOENE '/=) (LIST 'T 'T$))) + (LET ((|bfVar#9| + (LIST (LIST '|alphabetic?| 'ALPHA-CHAR-P) + (LIST '|and| 'AND) (LIST '|append| 'APPEND) + (LIST '|apply| 'APPLY) (LIST '|atom| 'ATOM) + (LIST '|cons?| 'CONSP) (LIST '|copy| 'COPY) + (LIST '|croak| 'CROAK) (LIST '|digit?| 'DIGITP) + (LIST '|drop| 'DROP) (LIST '|exit| 'EXIT) + (LIST '|false| 'NIL) (LIST '|first| 'CAR) + (LIST '|fourth| 'CADDDR) (LIST '|function| 'FUNCTION) + (LIST '|gensym| 'GENSYM) (LIST '|genvar| 'GENVAR) + (LIST '|integer?| 'INTEGERP) (LIST '|lastNode| 'LAST) + (LIST 'LAST '|last|) (LIST '|list| 'LIST) + (LIST '|lowerCase?| 'LOWER-CASE-P) + (LIST '|mkpf| 'MKPF) (LIST '|nconc| 'NCONC) + (LIST '|nil| NIL) (LIST '|not| 'NOT) + (LIST '|nreverse| 'NREVERSE) (LIST '|null| 'NULL) + (LIST '|or| 'OR) (LIST '|otherwise| 'T) + (LIST '|readByte| 'READ-BYTE) + (LIST '|readInteger| 'PARSE-INTEGER) + (LIST '|readLine| 'READ-LINE) + (LIST '|removeDuplicates| 'REMDUP) + (LIST '|rest| 'CDR) (LIST '|reverse| 'REVERSE) + (LIST '|second| 'CADR) + (LIST '|setDifference| 'SETDIFFERENCE) + (LIST '|setIntersection| 'INTERSECTION) + (LIST '|setPart| 'SETELT) (LIST '|setUnion| 'UNION) + (LIST '|strconc| 'CONCAT) (LIST '|string?| 'STRINGP) + (LIST '|substitute| 'SUBST) + (LIST '|symbol?| 'SYMBOLP) (LIST '|take| 'TAKE) + (LIST '|third| 'CADDR) (LIST '|true| 'T) + (LIST '|upperCase?| 'UPPER-CASE-P) + (LIST '|writeByte| 'WRITE-BYTE) + (LIST '|writeLine| 'WRITE-LINE) (LIST 'PLUS '+) + (LIST 'MINUS '-) (LIST 'TIMES '*) (LIST 'POWER 'EXPT) + (LIST 'SLASH '/) (LIST 'LT '<) (LIST 'GT '>) + (LIST 'LE '<=) (LIST 'GE '>=) (LIST 'SHOEEQ 'EQUAL) + (LIST 'SHOENE '/=) (LIST 'T 'T$))) (|i| NIL)) (LOOP (COND diff --git a/src/boot/tokens.boot b/src/boot/tokens.boot index 74c5e437..0c6e8818 100644 --- a/src/boot/tokens.boot +++ b/src/boot/tokens.boot @@ -234,6 +234,7 @@ for i in [ _ repeat SETF (GET(first i,'SHOETHETA),CDR i) for i in [ _ + ["alphabetic?", "ALPHA-CHAR-P"], _ ["and", "AND"] , _ ["append", "APPEND"] , _ ["apply", "APPLY"] , _ @@ -241,6 +242,7 @@ for i in [ _ ["cons?", "CONSP"] , _ ["copy", "COPY"] , _ ["croak", "CROAK"] , _ + ["digit?", "DIGITP"] , _ ["drop", "DROP"] , _ ["exit", "EXIT"] , _ ["false", 'NIL] , _ @@ -253,6 +255,7 @@ for i in [ _ ["lastNode", "LAST"] , _ ["LAST", "last"] , _ ["list", "LIST"] , _ + ["lowerCase?", "LOWER-CASE-P"], _ ["mkpf", "MKPF"] , _ ["nconc", "NCONC"] , _ ["nil" ,NIL ] , _ @@ -261,6 +264,9 @@ for i in [ _ ["null", "NULL"] , _ ["or", "OR"] , _ ["otherwise", "T"] , _ + ["readByte", "READ-BYTE"], _ + ["readInteger", "PARSE-INTEGER"], _ + ["readLine", "READ-LINE"], _ ["removeDuplicates", "REMDUP"] , _ ["rest", "CDR"] , _ ["reverse", "REVERSE"] , _ @@ -276,6 +282,9 @@ for i in [ _ ["take", "TAKE"] , ["third", "CADDR"] , _ ["true", "T"] , _ + ["upperCase?", "UPPER-CASE-P"], _ + ["writeByte", "WRITE-BYTE"], _ + ["writeLine", "WRITE-LINE"], _ ["PLUS", "+"] , _ ["MINUS", "-"] , _ ["TIMES", "*"] , _ diff --git a/src/interp/as.boot b/src/interp/as.boot index bd7ca583..6aa64624 100644 --- a/src/interp/as.boot +++ b/src/interp/as.boot @@ -248,7 +248,7 @@ displayDatabase x == main where zeroOneConversion opAlist == opAlist -- for u in opAlist repeat -- [op,:.] := u --- DIGITP (PNAME op).0 => u.first := string2Integer PNAME op +-- digit? (PNAME op).0 => u.first := string2Integer PNAME op -- opAlist asyDisplay(con,alist) == @@ -748,7 +748,7 @@ asyShorten x == asySplit(name,end) == end < 1 => [name] k := 0 - for i in 1..end while LOWER_-CASE_-P name.i repeat k := i + for i in 1..end while lowerCase? name.i repeat k := i k := k + 1 [SUBSTRING(name,0,k),:asySplit(SUBSTRING(name,k,nil),end-k)] diff --git a/src/interp/bc-matrix.boot b/src/interp/bc-matrix.boot index 91e326a1..f70c168c 100644 --- a/src/interp/bc-matrix.boot +++ b/src/interp/bc-matrix.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007, Gabriel Dos Reis. +-- Copyright (C) 2007-2010, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -84,10 +84,10 @@ bcInputMatrixByFormula(htPage,junk) == htMakeDoneButton('"Continue", 'bcInputMatrixByFormulaGen) nrows := null $bcParseOnly => objValUnwrap htpLabelSpadValue(htPage,'rows) - PARSE_-INTEGER htpLabelInputString(htPage,'rows) + readInteger htpLabelInputString(htPage,'rows) ncols := null $bcParseOnly => objValUnwrap htpLabelSpadValue(htPage,'cols) - PARSE_-INTEGER htpLabelInputString(htPage,'cols) + readInteger htpLabelInputString(htPage,'cols) htpSetProperty(page, 'nrows, nrows) htpSetProperty(page, 'ncols, ncols) htShowPage() @@ -105,10 +105,10 @@ bcInputMatrixByFormulaGen htPage == bcInputExplicitMatrix(htPage,junk) == nrows := null $bcParseOnly => objValUnwrap htpLabelSpadValue(htPage,'rows) - PARSE_-INTEGER htpLabelInputString(htPage,'rows) + readInteger htpLabelInputString(htPage,'rows) ncols := null $bcParseOnly => objValUnwrap htpLabelSpadValue(htPage,'cols) - PARSE_-INTEGER htpLabelInputString(htPage,'cols) + readInteger htpLabelInputString(htPage,'cols) cond := nil k := 0 wrows := # STRINGIMAGE nrows diff --git a/src/interp/bc-solve.boot b/src/interp/bc-solve.boot index 4cea69a1..7ccace8a 100644 --- a/src/interp/bc-solve.boot +++ b/src/interp/bc-solve.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2009, Gabriel Dos Reis. +-- Copyright (C) 2007-2010, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -134,7 +134,7 @@ bcInputSolveInfo htPage == bcInputEquations(htPage,solutionMethod) == numEqs := htpProperty(htPage, 'systemType) = 'onePolynomial => 1 - $bcParseOnly => PARSE_-INTEGER htpLabelInputString(htPage,'numberOfEquations) + $bcParseOnly => readInteger htpLabelInputString(htPage,'numberOfEquations) objValUnwrap htpLabelSpadValue(htPage, 'numberOfEquations) linearPred := htpProperty(htPage,'systemType) = 'linear labelList := diff --git a/src/interp/br-con.boot b/src/interp/br-con.boot index 51dcec48..188998f3 100644 --- a/src/interp/br-con.boot +++ b/src/interp/br-con.boot @@ -876,7 +876,7 @@ dbGetDocTable(op,$sig,docTable,$which,aux) == main where -- each entry is [sig,doc] and code is NIL or else a topic code for op main() == if null FIXP op and - DIGITP((s := STRINGIMAGE op).0) then op := string2Integer s + digit?((s := STRINGIMAGE op).0) then op := string2Integer s -- the above hack should be removed after 3/94 when 0 is not |0| aux is [[packageName,:.],:pred] => doc := dbConstructorDoc(first aux,$op,$sig) @@ -1309,7 +1309,7 @@ PUT('Enumeration, 'documentation, substitute(MESSAGE, 'MESSAGE, '( mkConArgSublis args == [[arg,:INTERN digits2Names PNAME arg] for arg in args - | (s := PNAME arg) and "or"/[DIGITP s.i for i in 0..MAXINDEX s]] + | (s := PNAME arg) and "or"/[digit? s.i for i in 0..MAXINDEX s]] digits2Names s == --This is necessary since arguments of conforms CANNOT have digits in TechExplorer diff --git a/src/interp/br-search.boot b/src/interp/br-search.boot index 9f094a3c..c3d57c9c 100644 --- a/src/interp/br-search.boot +++ b/src/interp/br-search.boot @@ -93,8 +93,8 @@ grepForAbbrev(s,key) == someUpperCaseChar := false for i in 0..MAXINDEX s repeat c := s . i - LOWER_-CASE_-P c => return (someLowerCaseChar := true) - UPPER_-CASE_-P c => someUpperCaseChar := true + lowerCase? c => return (someLowerCaseChar := true) + upperCase? c => someUpperCaseChar := true someLowerCaseChar or not someUpperCaseChar => false pattern := DOWNCASE s ['Abbreviations ,:[getConstructorFormFromDB x @@ -210,7 +210,7 @@ grepSplit(lines,doc?) == cons := atts := doms := nil while lines is [line, :lines] repeat if doc? then - N:=PARSE_-INTEGER dbPart(line,1,-1) + N:=readInteger dbPart(line,1,-1) if NUMBERP N then FILE_-POSITION(instream2,N) line := READLINE instream2 @@ -240,7 +240,7 @@ mkUpDownPattern s == recurse(s,0,#s) where i = n => '"" strconc(fixchar(s.i),recurse(s,i + 1,n)) fixchar(c) == - ALPHA_-CHAR_-P c => + alphabetic? c => strconc(char '_[,CHAR_-UPCASE c,CHAR_-DOWNCASE c,char '_]) c @@ -946,7 +946,7 @@ dbGetCommentOrigin line == key := INTERN SUBSTRING(firstPart,0,1) --extract this and throw away address := SUBSTRING(firstPart, 1, nil) --address in libdb instream := OPEN grepSource key --this always returns libdb now - FILE_-POSITION(instream,PARSE_-INTEGER address) + FILE_-POSITION(instream,readInteger address) line := READLINE instream CLOSE instream line diff --git a/src/interp/br-util.boot b/src/interp/br-util.boot index fe1bb927..91007ac8 100644 --- a/src/interp/br-util.boot +++ b/src/interp/br-util.boot @@ -534,7 +534,7 @@ emptySearchPage(kind,filter,:options) == isLoaded? conform == GETL(constructor? opOf conform,'LOADED) string2Integer s == - and/[DIGIT_-CHAR_-P (s.i) for i in 0..MAXINDEX s] => PARSE_-INTEGER s + and/[DIGIT_-CHAR_-P (s.i) for i in 0..MAXINDEX s] => readInteger s nil dbGetInputString htPage == @@ -618,7 +618,7 @@ dbPart(line,n,k) == --returns part n of line (n=1,..) beginning in column k dbXParts(line,n,m) == [.,nargs,:r] := dbParts(line,n,m) - [dbKindString line.0,dbName line,PARSE_-INTEGER nargs,:r] + [dbKindString line.0,dbName line,readInteger nargs,:r] dbParts(line,n,m) == --split line into n parts beginning in column m n = 0 => nil diff --git a/src/interp/c-doc.boot b/src/interp/c-doc.boot index 535c5e31..90bf1925 100644 --- a/src/interp/c-doc.boot +++ b/src/interp/c-doc.boot @@ -93,7 +93,7 @@ recordSignatureDocumentation(opSig,lineno) == recordAttributeDocumentation(['Attribute,att],lineno) == name := opOf att - UPPER_-CASE_-P PNAME(name).0 => nil + upperCase? PNAME(name).0 => nil recordDocumentation([name,['attribute,:IFCDR postTransform att]],lineno) recordDocumentation(key,lineno) == @@ -736,9 +736,9 @@ checkExtract(header,lines) == for line in firstLines repeat do m := #line - (k := firstNonBlankPosition line) = -1 => 'skip --include if blank - k > margin => 'skip --include if idented - not UPPER_-CASE_-P line.k => 'skip --also if not upcased + (k := firstNonBlankPosition line) = -1 => 'skip --include if blank + k > margin => 'skip --include if idented + not upperCase? line.k => 'skip --also if not upcased (j := charPosition(char '_:,line,k)) = m => 'skip --or if not colon, or (i := charPosition(char '_ ,line,k+1)) < j => 'skip --blank before colon return nil @@ -810,11 +810,11 @@ checkDecorate u == spadflag => ['",",:acc] ['",{}",:acc] x = '"\spad" => ['"\spad",:acc] - string? x and DIGITP x.0 => [x,:acc] + string? x and digit? x.0 => [x,:acc] not spadflag and - (CHARP x and ALPHA_-CHAR_-P x and not MEMQ(x,$charExclusions) or + (CHARP x and alphabetic? x and not MEMQ(x,$charExclusions) or member(x,$argl)) => [$charRbrace,x,$charLbrace,'"\spad",:acc] - not spadflag and ((string? x and not x.0 = $charBack and DIGITP(x.(MAXINDEX x))) or member(x,'("true" "false"))) => + not spadflag and ((string? x and not x.0 = $charBack and digit?(x.(MAXINDEX x))) or member(x,'("true" "false"))) => [$charRbrace,x,$charLbrace,'"\spad",:acc] --wrap x1, alpha3, etc xcount := SIZE x xcount = 3 and x.1 = char 't and x.2 = char 'h => @@ -941,7 +941,7 @@ checkSplitBackslash x == not string? x => [x] m := MAXINDEX x (k := charPosition($charBack,x,0)) < m => - m = 1 or ALPHA_-CHAR_-P(x . (k + 1)) => --starts with a backslash so.. + m = 1 or alphabetic?(x . (k + 1)) => --starts with a backslash so.. (k := charPosition($charBack,x,1)) < m => --..see if there is another [SUBSTRING(x,0,k),:checkSplitBackslash SUBSTRING(x,k,nil)] -- yup [x] --no, just return line @@ -968,7 +968,7 @@ checkSplitPunctuation x == m > 1 and x.(m - 1) = $charQuote => [SUBSTRING(x,0,m - 1),SUBSTRING(x,m-1,nil)] (k := charPosition($charBack,x,0)) < m => k = 0 => - m = 1 or HGET($htMacroTable,x) or ALPHA_-CHAR_-P x.1 => [x] + m = 1 or HGET($htMacroTable,x) or alphabetic? x.1 => [x] v := SUBSTRING(x,2,nil) [SUBSTRING(x,0,2),:checkSplitPunctuation v] u := SUBSTRING(x,0,k) @@ -1124,7 +1124,7 @@ checkTransformFirsts(opname,u,margin) == m := MAXINDEX u m < 2 => u u.0 = $charBack => u - ALPHA_-CHAR_-P u.0 => + alphabetic? u.0 => i := checkSkipToken(u,0,m) or return u j := checkSkipBlanks(u,i,m) or return u open := u.j @@ -1158,7 +1158,7 @@ checkTransformFirsts(opname,u,margin) == checkDocError ['"Improper initial operator in comments: ",infixOp] u strconc('"\spad{",SUBSTRING(u,0,n),'"}",SUBSTRING(u,n,nil)) --case 5 - true => -- not ALPHA_-CHAR_-P u.0 => + true => -- not alphabetic? u.0 => i := checkSkipToken(u,0,m) or return u namestring ~= (firstWord := SUBSTRING(u,0,i)) => checkDocError ['"Improper first word in comments: ",firstWord] @@ -1195,7 +1195,7 @@ checkSkipBlanks(u,i,m) == i checkSkipToken(u,i,m) == - ALPHA_-CHAR_-P(u.i) => checkSkipIdentifierToken(u,i,m) + alphabetic?(u.i) => checkSkipIdentifierToken(u,i,m) checkSkipOpToken(u,i,m) checkSkipOpToken(u,i,m) == @@ -1212,7 +1212,7 @@ checkSkipIdentifierToken(u,i,m) == ++ returns true if character `c' is alphabetic. checkAlphabetic c == - ALPHA_-CHAR_-P c or DIGITP c or MEMQ(c,$charIdentifierEndings) + alphabetic? c or digit? c or MEMQ(c,$charIdentifierEndings) --======================================================================= -- Code for creating a personalized report for ++ comments @@ -1303,9 +1303,9 @@ checkDecorateForHt u == checkDocError ["Symbol ",x,'" appearing outside \spad{}"] x = '"$" or x = '"%" => checkDocError ['"Unescaped ",x] -- null spadflag and string? x and (member(x,$argl) or #x = 1 --- and ALPHA_-CHAR_-P x.0) and not member(x,'("a" "A")) => +-- and alphabetic? x.0) and not member(x,'("a" "A")) => -- checkDocError1 ['"Naked ",x] --- null spadflag and string? x and (not x.0 = $charBack and not DIGITP(x.0) and DIGITP(x.(MAXINDEX x))or member(x,'("true" "false"))) +-- null spadflag and string? x and (not x.0 = $charBack and not digit?(x.0) and digit?(x.(MAXINDEX x))or member(x,'("true" "false"))) -- => checkDocError1 ["Naked ",x] u := rest u u diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index 3e264d35..42268eee 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -1397,7 +1397,7 @@ backendCompile2 code == ++ identifiers starting with '$', except domain variable names. backendFluidize x == IDENTP x and x ~= "$" and x ~= "$$" and - (PNAME x).0 = char "$" and not DIGITP((PNAME x).1) => x + (PNAME x).0 = char "$" and not digit?((PNAME x).1) => x isAtomicForm x => nil first x = "FLUID" => second x a := backendFluidize first x @@ -1415,7 +1415,7 @@ $SpecialVars := [] pushLocalVariable: %Symbol -> %List pushLocalVariable x == x ~= "$" and (p := PNAME x).0 = char "$" and - p.1 ~= char "," and not DIGITP p.1 => nil + p.1 ~= char "," and not digit? p.1 => nil PUSH(x,$LocalVars) diff --git a/src/interp/database.boot b/src/interp/database.boot index 3a1c99d0..b1885fe2 100644 --- a/src/interp/database.boot +++ b/src/interp/database.boot @@ -738,7 +738,7 @@ dropPrefix(fn) == --++ $globalExposureGroupAlist := NIL --++ egName := NIL --++ egFiles := NIL ---++ while (not PLACEP (x:= READ_-LINE stream)) repeat +--++ while (not PLACEP (x:= readLine stream)) repeat --++ x := DROPTRAILINGBLANKS x --++ SIZE(x) = 0 => 'iterate -- blank line --++ (x.0 = char "#") or (x.0 = char "*") => 'iterate -- comment diff --git a/src/interp/format.boot b/src/interp/format.boot index bbc3e33c..f762c33f 100644 --- a/src/interp/format.boot +++ b/src/interp/format.boot @@ -577,13 +577,13 @@ linearFormat x == numOfSpadArguments id == char("*") = (s:= PNAME id).0 => - +/[n for i in 1.. while integer? (n:=PARSE_-INTEGER PNAME s.i)] + +/[n for i in 1.. while integer? (n:=readInteger PNAME s.i)] keyedSystemError("S2IF0012",[id]) linearFormatForm(op,argl) == s:= PNAME op - indexList:= [PARSE_-INTEGER PNAME d for i in 1.. while - (DIGITP (d:= s.(maxIndex:= i)))] + indexList:= [readInteger PNAME d for i in 1.. while + (digit? (d:= s.(maxIndex:= i)))] cleanOp:= INTERN (strconc/[PNAME s.i for i in maxIndex..MAXINDEX s]) fnArgs:= indexList.0 > 0 => diff --git a/src/interp/fortcall.boot b/src/interp/fortcall.boot index fd3ad8b5..9106506b 100644 --- a/src/interp/fortcall.boot +++ b/src/interp/fortcall.boot @@ -89,18 +89,18 @@ makeFortranFun(name,args,fortranArgs,dummies,decls,results,file,dir, SYSTEM strconc("cc ",file,".c -o ",file,".spadexe ",$fortranLibraries) writeCFile(name,args,fortranArgs,dummies,decls,results,returnType,asps,fp) == - WRITE_-LINE('"#include <stdio.h>",fp) - WRITE_-LINE('"#include <sys/select.h>",fp) - WRITE_-LINE('"#include <rpc/rpc.h>",fp) - WRITE_-LINE('"#ifndef NULL",fp) - WRITE_-LINE('"#define NULL 0",fp) - WRITE_-LINE('"#endif NULL",fp) - WRITE_-LINE('"#define MAX__ARRAY(x) (x ? x : 20000)",fp) - WRITE_-LINE('"#define CHECK(x) if (!x) {fprintf(stderr,_"xdr failed_"); exit(1);}",fp) - WRITE_-LINE('"void main()",fp) - WRITE_-LINE('"{",fp) - WRITE_-LINE('" XDR xdrs;",fp) - WRITE_-LINE('" {",fp) + writeLine('"#include <stdio.h>",fp) + writeLine('"#include <sys/select.h>",fp) + writeLine('"#include <rpc/rpc.h>",fp) + writeLine('"#ifndef NULL",fp) + writeLine('"#define NULL 0",fp) + writeLine('"#endif NULL",fp) + writeLine('"#define MAX__ARRAY(x) (x ? x : 20000)",fp) + writeLine('"#define CHECK(x) if (!x) {fprintf(stderr,_"xdr failed_"); exit(1);}",fp) + writeLine('"void main()",fp) + writeLine('"{",fp) + writeLine('" XDR xdrs;",fp) + writeLine('" {",fp) if $addUnderscoreToFortranNames then routineName := strconc(name,STRING CODE_-CHAR 95) else @@ -117,7 +117,7 @@ writeCFile(name,args,fortranArgs,dummies,decls,results,returnType,asps,fp) == printDec(second first argList,a,asps,fp) argList := nreverse argList; -- read in the data - WRITE_-LINE('" xdrstdio__create(&xdrs, stdin, XDR__DECODE);",fp) + writeLine('" xdrstdio__create(&xdrs, stdin, XDR__DECODE);",fp) for a in argList repeat if LISTP second a then writeMalloc(first a,first second a,rest second a,fp) not MEMQ(first a,[:dummies,:asps]) => writeXDR(a,'"&xdrs",fp) @@ -134,16 +134,16 @@ writeCFile(name,args,fortranArgs,dummies,decls,results,returnType,asps,fp) == PRINC('",",fp) printCName(a,isPointer?(a,decls),asps,fp) writeStringLengths(fortranArgs,decls,fp) - WRITE_-LINE('");",fp) + writeLine('");",fp) -- now export the results. - WRITE_-LINE('" xdrstdio__create(&xdrs, stdout, XDR__ENCODE);",fp) + writeLine('" xdrstdio__create(&xdrs, stdout, XDR__ENCODE);",fp) if returnType then writeXDR([returnName,getCType returnType],'"&xdrs",fp) for r in results repeat writeXDR([r,getCType getFortranType(r,decls)],'"&xdrs",fp) - WRITE_-LINE('" exit(0);",fp) - WRITE_-LINE('" }",fp) - WRITE_-LINE('"}",fp) + writeLine('" exit(0);",fp) + writeLine('" }",fp) + writeLine('"}",fp) writeStringLengths(fortranArgs,decls,fp) == for a in fortranArgs repeat diff --git a/src/interp/functor.boot b/src/interp/functor.boot index 940c0959..f49dce21 100644 --- a/src/interp/functor.boot +++ b/src/interp/functor.boot @@ -975,7 +975,7 @@ encodeItem x == getCaps x == s:= STRINGIMAGE x - clist:= [c for i in 0..MAXINDEX s | UPPER_-CASE_-P (c:= s.i)] + clist:= [c for i in 0..MAXINDEX s | upperCase? (c:= s.i)] null clist => '"__" strconc/[first clist,:[L_-CASE u for u in rest clist]] @@ -1006,7 +1006,7 @@ alistSize c == count(CDAR x,level+1)+count(rest x,level) addSuffix(n,u) == - ALPHA_-CHAR_-P((s:= STRINGIMAGE u).(MAXINDEX s)) => + alphabetic?((s:= STRINGIMAGE u).(MAXINDEX s)) => INTERN strconc(s,STRINGIMAGE n) INTERNL strconc(s,STRINGIMAGE ";",STRINGIMAGE n) diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot index 56ea3096..e3c4ec2b 100644 --- a/src/interp/g-util.boot +++ b/src/interp/g-util.boot @@ -251,7 +251,7 @@ isSharpVarWithNum x == c := 0 for i in 1..(n-1) while ok repeat d := p.i - ok := DIGITP d => c := 10*c + DIG2FIX d + ok := digit? d => c := 10*c + DIG2FIX d if ok then c else nil ++ Returns true if `form' is either an atom or a quotation. @@ -633,7 +633,7 @@ stringChar2Integer(str,pos) == if IDENTP str then str := PNAME str null (string?(str) and integer?(pos) and (pos >= 0) and (pos < QCSIZE(str))) => NIL - not DIGITP(d := SCHAR(str,pos)) => NIL + not digit?(d := SCHAR(str,pos)) => NIL DIG2FIX d dropLeadingBlanks str == @@ -718,13 +718,13 @@ flattenSexpr s == [:flattenSexpr f,:flattenSexpr r] isLowerCaseLetter c == - LOWER_-CASE_-P c + lowerCase? c isUpperCaseLetter c == - UPPER_-CASE_-P c + upperCase? c isLetter c == - ALPHA_-CHAR_-P c + alphabetic? c update() == runCommand @@ -991,7 +991,7 @@ quickOr(a,b) == intern x == string? x => - DIGITP x.0 => string2Integer x + digit? x.0 => string2Integer x INTERN x x diff --git a/src/interp/guess.boot b/src/interp/guess.boot index ab1abb8e..30c4e96c 100644 --- a/src/interp/guess.boot +++ b/src/interp/guess.boot @@ -69,13 +69,13 @@ wordsOfString(s) == [UPCASE x for x in wordsOfStringKeepCase s] wordsOfStringKeepCase s == wordsOfString1(s,0) or [COPY s] wordsOfString1(s,j) == - k := or/[i for i in j..(MAXINDEX(s)-1) | UPPER_-CASE_-P s.i] => + k := or/[i for i in j..(MAXINDEX(s)-1) | upperCase? s.i] => tailWords:= - UPPER_-CASE_-P s.(k+1) => - n:= or/[i for i in (k+2)..(MAXINDEX(s)-1)|not UPPER_-CASE_-P s.i] + upperCase? s.(k+1) => + n:= or/[i for i in (k+2)..(MAXINDEX(s)-1)|not upperCase? s.i] null n => [SUBSTRING(s,k,nil)] n > k+1 => [SUBSTRING(s,k,n-k-1),:wordsOfString1(s,n-1)] - m := or/[i for i in (k+2)..(MAXINDEX(s)-1) | UPPER_-CASE_-P s.i] => + m := or/[i for i in (k+2)..(MAXINDEX(s)-1) | upperCase? s.i] => [SUBSTRING(s,k,m-k),:wordsOfString1(s,m)] [SUBSTRING(s,k,nil)] k > j+1 => [SUBSTRING(s,j,k-j),:tailWords] @@ -85,7 +85,7 @@ wordsOfString1(s,j) == wordKeys s == removeDuplicates [UPCASE s.0,:fn(s,1,-1,MAXINDEX s,nil)] where fn(s,i,lastKeyIndex,n,acc) == i > n => acc - UPPER_-CASE_-P s.i => + upperCase? s.i => -- i = lastKeyIndex + 1 => fn(s,i + 1,i,n,[s.i,:rest acc]) fn(s,i + 1,i,n,[s.i,:acc]) fn(s,i + 1,lastKeyIndex,n,acc) diff --git a/src/interp/ht-root.boot b/src/interp/ht-root.boot index 024d78e5..70270540 100644 --- a/src/interp/ht-root.boot +++ b/src/interp/ht-root.boot @@ -158,7 +158,7 @@ htGlossPage(htPage,pattern,tryAgain?) == tryAgain? and #pattern > 0 => (pattern.(k := MAXINDEX(pattern))) = char 's => htGlossPage(htPage,SUBSTRING(pattern,0,k),true) - UPPER_-CASE_-P pattern.0 => + upperCase? pattern.0 => htGlossPage(htPage,DOWNCASE pattern,false) errorPage(htPage,['"Sorry",nil,['"\centerline{",:heading,'"}"]]) errorPage(htPage,['"Sorry",nil,['"\centerline{",:heading,'"}"]]) diff --git a/src/interp/htcheck.boot b/src/interp/htcheck.boot index 34412254..70ac5d43 100644 --- a/src/interp/htcheck.boot +++ b/src/interp/htcheck.boot @@ -107,8 +107,8 @@ getHtMacroItem line == i = m => 0 j := charPosition(char '_],line,i + 1) digitString := SUBSTRING(line,i + 1,j - i - 1) - and/[DIGITP digitString.i for i in 0..MAXINDEX digitString] - => PARSE_-INTEGER digitString + and/[digit? digitString.i for i in 0..MAXINDEX digitString] + => readInteger digitString return nil [command,:numOfArgs] diff --git a/src/interp/htsetvar.boot b/src/interp/htsetvar.boot index 75f01be6..1806ab76 100644 --- a/src/interp/htsetvar.boot +++ b/src/interp/htsetvar.boot @@ -271,7 +271,7 @@ htCheck(checker,value) == parseWord x == string? x => - and/[DIGITP x.i for i in 0..MAXINDEX x] => PARSE_-INTEGER x + and/[digit? x.i for i in 0..MAXINDEX x] => readInteger x INTERN x x diff --git a/src/interp/i-map.boot b/src/interp/i-map.boot index 10b64ceb..ab24945f 100644 --- a/src/interp/i-map.boot +++ b/src/interp/i-map.boot @@ -60,7 +60,7 @@ isInternalMapName name == (not IDENTP(name)) or (name = "*") or (name = "**") => false sz := SIZE (name' := PNAME name) (sz < 7) or (char("*") ~= name'.0) => false - null DIGITP name'.1 => false + null digit? name'.1 => false null STRPOS('"_;",name',1,NIL) => false -- good enough true diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot index e4dd5b49..e7875ffe 100644 --- a/src/interp/i-output.boot +++ b/src/interp/i-output.boot @@ -734,8 +734,8 @@ mkSuperSub(op,argl) == -- for f in linearFormatForm(op,argl)] -- strconc/l s:= PNAME op - indexList:= [PARSE_-INTEGER PNAME d for i in 1.. while - (DIGITP (d:= s.(maxIndex:= i)))] + indexList:= [readInteger PNAME d for i in 1.. while + (digit? (d:= s.(maxIndex:= i)))] cleanOp:= INTERN (strconc/[PNAME s.i for i in maxIndex..MAXINDEX s]) -- if there is just a subscript use the SUB special form #indexList=2 => diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot index 71dc1fbb..77e4b866 100644 --- a/src/interp/i-syscmd.boot +++ b/src/interp/i-syscmd.boot @@ -1703,7 +1703,7 @@ writeInputLines(fn,initial) == file := histInputFileName(fn) histFileErase file inp:= DEFIOSTREAM(['(MODE . OUTPUT),['FILE,:file]],255,0) - for x in removeUndoLines nreverse lineList repeat WRITE_-LINE(x,inp) + for x in removeUndoLines nreverse lineList repeat writeLine(x,inp) -- see file "undo" for definition of removeUndoLines if fn ~= 'redo then sayKeyedMsg("S2IH0014",[namestring file]) SHUT inp @@ -2663,7 +2663,7 @@ undo(l) == null l => -1 first l if IDENTP n then - n := PARSE_-INTEGER PNAME n + n := readInteger PNAME n if not FIXP n then userError '"undo argument must be an integer" $InteractiveFrame := undoSteps(undoCount n,undoWhen) nil @@ -2826,7 +2826,7 @@ removeUndoLines u == --called by writeInputLines s2 := trimString SUBSTRING(s1,0,m) n := s1 = '")redo" => 0 - s2 ~= '"" => undoCount PARSE_-INTEGER s2 + s2 ~= '"" => undoCount readInteger s2 -1 y.first := strconc('">",code,STRINGIMAGE n) nil @@ -2835,7 +2835,7 @@ removeUndoLines u == --called by writeInputLines for y in tails nreverse u repeat (x := first y).0 = char '_> => code := x . 1 --code = a,b, or r - n := PARSE_-INTEGER SUBSTRING(x,2,nil) --n = number of undo steps + n := readInteger SUBSTRING(x,2,nil) --n = number of undo steps y := rest y --kill >n line while y repeat c := first y diff --git a/src/interp/i-util.boot b/src/interp/i-util.boot index 9c602844..cb81359f 100644 --- a/src/interp/i-util.boot +++ b/src/interp/i-util.boot @@ -142,7 +142,7 @@ makeInitialModemapFrame() == COPY $InitialModemapFrame isCapitalWord x == - (y := PNAME x) and and/[UPPER_-CASE_-P y.i for i in 0..MAXINDEX y] + (y := PNAME x) and and/[upperCase? y.i for i in 0..MAXINDEX y] mkPredList listOfEntries == [['EQCAR,"#1",i] for arg in listOfEntries for i in 0..] diff --git a/src/interp/int-top.boot b/src/interp/int-top.boot index db0257b2..90455fae 100644 --- a/src/interp/int-top.boot +++ b/src/interp/int-top.boot @@ -324,13 +324,13 @@ streamChop(n,s)== [[d,:a],b] ncloopPrintLines lines == - for line in lines repeat WRITE_-LINE rest line - WRITE_-LINE '" " + for line in lines repeat writeLine rest line + writeLine '" " ncloopIncFileName string== fn := incFileName string not fn => - WRITE_-LINE (strconc(string, '" not found")) + writeLine (strconc(string, '" not found")) [] fn diff --git a/src/interp/intfile.boot b/src/interp/intfile.boot index f89cb3cf..b362c134 100644 --- a/src/interp/intfile.boot +++ b/src/interp/intfile.boot @@ -38,7 +38,7 @@ namespace BOOT shoeInternFile(fn)== a:=shoeInputFile fn if null a - then WRITE_-LINE (strconc(fn,'" not found"),$ErrorStream) + then writeLine (strconc(fn,'" not found"),$ErrorStream) else shoeIntern incRgen a shoeIntern (s)== diff --git a/src/interp/mark.boot b/src/interp/mark.boot index ebaa4475..06f3a1fb 100644 --- a/src/interp/mark.boot +++ b/src/interp/mark.boot @@ -1244,12 +1244,12 @@ changeToEqualEqual lines == N := MAXINDEX x (n := charPosition($blank, x, 8)) > N => nil n = 0 => nil - not ALPHA_-CHAR_-P (x . (n - 1)) => nil + not alphabetic? (x . (n - 1)) => nil not substring?('":= ", x, n+1) => nil m := n + 3 - while (m := m + 1) <= N and ALPHA_-CHAR_-P (x . m) repeat nil + while (m := m + 1) <= N and alphabetic? (x . m) repeat nil m = n + 2 => nil - not UPPER_-CASE_-P (x . (n + 4)) => nil + not upperCase? (x . (n + 4)) => nil word := INTERN SUBSTRING(x, n + 4, m - n - 4) expandedWord := macroExpand(word,$e) not (word in '(Record Union Mapping) diff --git a/src/interp/msgdb.boot b/src/interp/msgdb.boot index b4bb9930..361ba344 100644 --- a/src/interp/msgdb.boot +++ b/src/interp/msgdb.boot @@ -173,7 +173,7 @@ substituteSegmentedMsg(msg,args) == l := NCONC(nreverse v,l) -- x requires parameter substitution - (x.0 = char "%") and (n > 1) and (DIGITP x.1) => + (x.0 = char "%") and (n > 1) and (digit? x.1) => a := DIG2FIX x.1 arg := a <= nargs => args.(a-1) @@ -217,7 +217,7 @@ substituteSegmentedMsg(msg,args) == for ch in '(_. _, _! _: _; _?) repeat if MEMQ(char ch,q) then l := [ch,:l] - c = char "%" and n > 1 and x.1 = char "x" and DIGITP x.2 => + c = char "%" and n > 1 and x.1 = char "x" and digit? x.2 => l := [fillerSpaces(DIG2FIX x.2, '" "),:l] --x is a plain word l := [x,:l] @@ -688,7 +688,7 @@ blankIndicator x == if IDENTP x then x := PNAME x null string? x or MAXINDEX x < 1 => nil x.0 = '% and x.1 = 'x => - MAXINDEX x > 1 => PARSE_-INTEGER SUBSTRING(x,2,nil) + MAXINDEX x > 1 => readInteger SUBSTRING(x,2,nil) 1 nil @@ -1029,7 +1029,7 @@ escapeSpecialChars s == u := LASSOC(s,$htCharAlist) => u member(s, $htSpecialChars) => strconc('"_\", s) null $saturn => s - ALPHA_-CHAR_-P (s.0) => s + alphabetic? (s.0) => s not (or/[dbSpecialDisplayOpChar? s.i for i in 0..MAXINDEX s]) => s buf := '"" for i in 0..MAXINDEX s repeat buf := diff --git a/src/interp/pf2sex.boot b/src/interp/pf2sex.boot index 1f8340d0..3ec5b720 100644 --- a/src/interp/pf2sex.boot +++ b/src/interp/pf2sex.boot @@ -183,9 +183,9 @@ pfLiteral2Sex pf == type = 'integer => txt := pfLiteralString pf MULTIPLE_-VALUE_-BIND(part1 pos1, - PARSE_-INTEGER(txt,KEYWORD::JUNK_-ALLOWED,true), + readInteger(txt,KEYWORD::JUNK_-ALLOWED,true), if pos1 = #txt then part1 - else PARSE_-INTEGER(SUBSTRING(txt,pos1+1,nil), + else readInteger(SUBSTRING(txt,pos1+1,nil), KEYWORD::RADIX, part1)) type = 'string or type = 'char => pfLiteralString pf diff --git a/src/interp/pspad1.boot b/src/interp/pspad1.boot index 75c0d97c..6e299b50 100644 --- a/src/interp/pspad1.boot +++ b/src/interp/pspad1.boot @@ -264,9 +264,9 @@ format(x,:options) == if op = "return" then argl := rest argl n := #argl op is ['elt,y,"construct"] => formatDollar(y,'construct,argl) - op is ['elt,name,p] and UPPER_-CASE_-P STRINGIMAGE(opOf name).0 => + op is ['elt,name,p] and upperCase? STRINGIMAGE(opOf name).0 => formatDollar(name,p,argl) - op = 'elt and UPPER_-CASE_-P STRINGIMAGE(opOf first argl).0 => + op = 'elt and upperCase? STRINGIMAGE(opOf first argl).0 => formatDollar1(first argl,second argl) fn:= GETL(op,"PSPAD") => formatFn(fn,x,$m,$c) if op in '(AND OR NOT) then op:= DOWNCASE op @@ -420,7 +420,7 @@ formatHasDollarOp x == x is ["elt",a,b] and isTypeProbably? a isTypeProbably? x == - IDENTP x and UPPER_-CASE_-P PNAME(x).0 + IDENTP x and upperCase? PNAME(x).0 formatOpPren(op,x) == formatOp op and formatPren x diff --git a/src/interp/pspad2.boot b/src/interp/pspad2.boot index 23beaf0d..3ece41b6 100644 --- a/src/interp/pspad2.boot +++ b/src/interp/pspad2.boot @@ -566,10 +566,10 @@ ident2PrintImage s == m := MAXINDEX s if m > 1 and s.(m - 1) = $underScore then s := strconc(SUBSTRING(s,0,m-1),s.m) u:= GETSTR (2*SIZE s) - if not (ALPHA_-CHAR_-P s.(0) or s.(0)=char '"$") then SUFFIX('__,u) + if not (alphabetic? s.(0) or s.(0)=char '"$") then SUFFIX('__,u) u:= SUFFIX(s.(0),u) for i in 1..MAXINDEX s repeat - if not (DIGITP s.i or ALPHA_-CHAR_-P s.i or ((c := s.i) = char '?) + if not (digit? s.i or alphabetic? s.i or ((c := s.i) = char '?) or (c = char '_!)) then SUFFIX('__,u) u:= SUFFIX(s.i,u) INTERN u @@ -578,15 +578,15 @@ isIdentifier x == IDENTP x => s:= PNAME x #s = 0 => nil - ALPHA_-CHAR_-P s.(0) => and/[s.i ~= char '" " for i in 1..MAXINDEX s] + alphabetic? s.(0) => and/[s.i ~= char '" " for i in 1..MAXINDEX s] #s>1 => - or/[ALPHA_-CHAR_-P s.i for i in 1..(m:= MAXINDEX s)] => + or/[alphabetic? s.i for i in 1..(m:= MAXINDEX s)] => and/[s.i ~= char '" " for i in 1..m] => true isGensym x == s := STRINGIMAGE x n := MAXINDEX s - s.0 = char '_G and and/[DIGITP s.i for i in 1..n] + s.0 = char '_G and and/[digit? s.i for i in 1..n] --====================================================================== -- Macro Helpers diff --git a/src/interp/scan.boot b/src/interp/scan.boot index 5b04893c..df6f4d8f 100644 --- a/src/interp/scan.boot +++ b/src/interp/scan.boot @@ -513,7 +513,7 @@ scanS()== strconc(str,b) scanTransform x==x ---idChar? x== scanLetter x or DIGITP x or x in '(_? _%) +--idChar? x== scanLetter x or digit? x or x in '(_? _%) --scanLetter x== -- if not CHARP x @@ -529,7 +529,6 @@ posend(line,n)== -- n --startsId? x== scanLetter x or x in '(_? _%) -digit? x== DIGITP x scanW(b)== -- starts pointing to first char n1:=$n -- store starting character position @@ -586,7 +585,7 @@ spleI1(dig,zro) == strconc(str,bb) scanCheckRadix(a,w)== - r := PARSE_-INTEGER a + r := readInteger a ns:=#w ns = 0 => ncSoftError([$linepos,:lnExtraBlanks $linepos+$n],"S2CN0004",[a]) diff --git a/src/interp/slam.boot b/src/interp/slam.boot index c3f79904..450e70a2 100644 --- a/src/interp/slam.boot +++ b/src/interp/slam.boot @@ -104,7 +104,7 @@ isRecurrenceRelation(op,body,minivectorName) == diffSlot := or/[i for i in 0.. for x in $minivector | EQ(x,diffCell)] or return nil --Check general term for references to just the k previous values - sharpPosition := PARSE_-INTEGER SUBSTRING(sharpArg,1,nil) + sharpPosition := readInteger SUBSTRING(sharpArg,1,nil) al:= mkDiffAssoc(op,generalTerm,k,sharpPosition,sharpArg,diffSlot,minivectorName) null al => false "$failed" in al => false diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot index 159fe1af..3a3bda71 100644 --- a/src/interp/sys-utility.boot +++ b/src/interp/sys-utility.boot @@ -299,11 +299,11 @@ openBinaryFile(file,mode) == ++ Attemp to read a byte from input file `ifile'. If not end of ++ file, return the read byte; %nothing. readByteFromFile ifile == - READ_-BYTE(ifile,false,%nothing) + readByte(ifile,false,%nothing) ++ Write byte `b' to output binary file `ofile'. writeByteToFile(ofile,b) == - WRITE_-BYTE(b,ofile) + writeByte(b,ofile) closeFile file == CLOSE file diff --git a/src/interp/topics.boot b/src/interp/topics.boot index 995120ee..de87df49 100644 --- a/src/interp/topics.boot +++ b/src/interp/topics.boot @@ -134,7 +134,7 @@ blankLine? line == string2OpAlist s == m := #s k := skipBlanks(s,0,m) or return nil - UPPER_-CASE_-P s.k => nil --skip constructor names + upperCase? s.k => nil --skip constructor names k := 0 while (k := skipBlanks(s,k,m)) repeat acc := [INTERN SUBSTRING(s,k,-k + (k := charPosition(char '_ ,s,k + 1))),:acc] diff --git a/src/interp/trace.boot b/src/interp/trace.boot index bae545c0..b36127e8 100644 --- a/src/interp/trace.boot +++ b/src/interp/trace.boot @@ -207,7 +207,7 @@ getTraceOption (x is [key,:l]) == key="of" => ["of",:[hn y for y in l]] where hn x == - atom x and not UPPER_-CASE_-P STRINGIMAGE(x).0 => + atom x and not upperCase? STRINGIMAGE(x).0 => isDomainOrPackage EVAL x => x stackTraceOptionError ["S2IT0013",[x]] g:= domainToGenvar x => g @@ -305,7 +305,7 @@ transTraceItem x == x := objVal value (y:= domainToGenvar x) => y x - UPPER_-CASE_-P STRINGIMAGE(x).0 => + upperCase? STRINGIMAGE(x).0 => y := opOf unabbrev x constructor? y => y (y:= domainToGenvar x) => y diff --git a/src/interp/word.boot b/src/interp/word.boot index 7fa391fd..ad819549 100644 --- a/src/interp/word.boot +++ b/src/interp/word.boot @@ -97,7 +97,7 @@ getListOfFunctionNames(fnames) == for fn in fnames repeat null IOSTATE(fn,'DIRECT,'_*) => 'iterate stream:= DEFIOSTREAM(['(MODE . INPUT),['FILE,fn,'DIRECT,'_*]],80,0) - while (not PLACEP (x:= READ_-LINE stream)) repeat + while (not PLACEP (x:= readLine stream)) repeat (s := SIZE x) < 26 => 'iterate res:= [SUBSTRING(x,26,NIL),:res] SHUT stream |