aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-07-18 19:02:13 +0000
committerdos-reis <gdr@axiomatics.org>2010-07-18 19:02:13 +0000
commit08966a5a24823ba5605d9baacebbbb95632842e2 (patch)
tree65192cbb6291cddd41f22128e7c8b87754f81b4c /src
parent3467029153bc8d2115fb961eb5e4e995d62034f0 (diff)
downloadopen-axiom-08966a5a24823ba5605d9baacebbbb95632842e2.tar.gz
* boot/tokens.boot: Add char? as builtin function.
* interp/i-output.boot (appChar): Fix thinko. (outformWidth): Likewise. (WIDTH): Likewise.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/boot/strap/tokens.clisp3
-rw-r--r--src/boot/tokens.boot3
-rw-r--r--src/interp/i-output.boot14
-rw-r--r--src/interp/scan.boot2
5 files changed, 19 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 160d2232..8ce51027 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
+2010-07-18 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * boot/tokens.boot: Add char? as builtin function.
+ * interp/i-output.boot (appChar): Fix thinko.
+ (outformWidth): Likewise.
+ (WIDTH): Likewise.
+
2010-07-13 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/g-opt.boot: %sname is a side-effect free operator.
diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp
index c55ed69a..5b02904d 100644
--- a/src/boot/strap/tokens.clisp
+++ b/src/boot/strap/tokens.clisp
@@ -203,7 +203,7 @@
(LIST (LIST '|alphabetic?| 'ALPHA-CHAR-P)
(LIST '|and| 'AND) (LIST '|append| 'APPEND)
(LIST '|apply| 'APPLY) (LIST '|atom| 'ATOM)
- (LIST '|cons?| 'CONSP) (LIST '|readOnly?| 'CONSTANTP)
+ (LIST '|char?| 'CHARACTERP) (LIST '|cons?| 'CONSP)
(LIST '|copy| 'COPY) (LIST '|croak| 'CROAK)
(LIST '|digit?| 'DIGITP) (LIST '|drop| 'DROP)
(LIST '|exit| 'EXIT) (LIST '|false| 'NIL)
@@ -220,6 +220,7 @@
(LIST '|property| 'GET) (LIST '|readByte| 'READ-BYTE)
(LIST '|readInteger| 'PARSE-INTEGER)
(LIST '|readLine| 'READ-LINE)
+ (LIST '|readOnly?| 'CONSTANTP)
(LIST '|removeDuplicates| 'REMDUP)
(LIST '|rest| 'CDR) (LIST '|reverse| 'REVERSE)
(LIST '|second| 'CADR)
diff --git a/src/boot/tokens.boot b/src/boot/tokens.boot
index c2b2f120..e5160acd 100644
--- a/src/boot/tokens.boot
+++ b/src/boot/tokens.boot
@@ -239,8 +239,8 @@ for i in [ _
["append", "APPEND"] , _
["apply", "APPLY"] , _
["atom", "ATOM"] , _
+ ["char?", "CHARACTERP"] , _
["cons?", "CONSP"] , _
- ["readOnly?","CONSTANTP"], _
["copy", "COPY"] , _
["croak", "CROAK"] , _
["digit?", "DIGITP"] , _
@@ -269,6 +269,7 @@ for i in [ _
["readByte", "READ-BYTE"], _
["readInteger", "PARSE-INTEGER"], _
["readLine", "READ-LINE"], _
+ ["readOnly?","CONSTANTP"], _
["removeDuplicates", "REMDUP"] , _
["rest", "CDR"] , _
["reverse", "REVERSE"] , _
diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot
index 02dc2d1c..7484e2dd 100644
--- a/src/interp/i-output.boot
+++ b/src/interp/i-output.boot
@@ -441,12 +441,12 @@ atom2String x ==
appChar(string,x,y,d) ==
if CHARP string then string := PNAME string
line:= LASSOC(y,d) =>
- if MAXINDEX string = 1 and char(string.0) = "%" then
- string.1="b" =>
+ if MAXINDEX string = 1 and string.0 = char "%" then
+ string.1 = char "b" =>
bumpDeltaIfTrue:= true
string.0:= EBCDIC 29
string.1:= EBCDIC 200
- string.1="d" =>
+ string.1 = char "d" =>
bumpDeltaIfTrue:= true
string.0:= EBCDIC 29
string.1:= EBCDIC 65
@@ -595,7 +595,7 @@ outputTran x ==
['PAREN,["|",['AGGLST,:l],pred]]
op="tuple" => ['PAREN,['AGGLST,:l]]
op='LISTOF => ['AGGLST,:l]
- IDENTP op and not (op in '(_* _*_*) ) and char("*") = (PNAME op).0 =>
+ IDENTP op and not (op in '(_* _*_*) ) and char "*" = (PNAME op).0 =>
mkSuperSub(op,l)
[outputTran op,:l]
@@ -1027,7 +1027,7 @@ aggregateApp(u,x,y,d,s) ==
outformWidth u == --WIDTH as called from OUTFORM to do a COPY
string? u =>
u = $EmptyString => 0
- u.0="%" and ((u.1 = char 'b) or (u.1 = char 'd)) => 1
+ u.0 = char "%" and ((u.1 = char 'b) or (u.1 = char 'd)) => 1
#u
atom u => # atom2String u
WIDTH COPY u
@@ -1035,7 +1035,7 @@ outformWidth u == --WIDTH as called from OUTFORM to do a COPY
WIDTH u ==
string? u =>
u = $EmptyString => 0
- u.0="%" and ((u.1 = char 'b) or (u.1 = char 'd)) => 1
+ u.0 = char "%" and ((u.1 = char 'b) or (u.1 = char 'd)) => 1
#u
integer? u =>
if (u < 1) then
@@ -1789,7 +1789,7 @@ charyMinus(u,v,start,linelength) ==
'" "
charyBinary(d,u,v,start,linelength) ==
- member(d,'(" := " "= ")) =>
+ member(d,'(" := " " = ")) =>
charybdis(['CONCATB,v.1,d],start,linelength)
charybdis(v.2,start+2,linelength-2)
'" "
diff --git a/src/interp/scan.boot b/src/interp/scan.boot
index 51a84342..f52a4f65 100644
--- a/src/interp/scan.boot
+++ b/src/interp/scan.boot
@@ -516,7 +516,7 @@ scanTransform x==x
--idChar? x== scanLetter x or digit? x or x in '(_? _%)
--scanLetter x==
--- if not CHARP x
+-- if not char? x
-- then false
-- else STRPOSL(scanTrTable,x,0,NIL)