aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-07-05 19:25:57 +0000
committerdos-reis <gdr@axiomatics.org>2011-07-05 19:25:57 +0000
commit6bd583e0e2bb0f965b02c984e9027c120642b4e6 (patch)
treed92f1848fb285e46844250fe7813311fb295ebfb /src
parentd9b3cb273671264edcd5fd5fa0acde22a181fd66 (diff)
downloadopen-axiom-6bd583e0e2bb0f965b02c984e9027c120642b4e6.tar.gz
* interp/br-util.boot ($charUnderscore): Move to br-search.boot
where it is used. * interp/br-search.boot (pmPreparse): Tidy. (mkGrepPattern1): Likewise. (genSearch): Don't try to remove default operations; they have already been left out by grepSplit. (docSearch): Likewise. * interp/br-con.boot (dbShowConsDoc1): Don't confusingly enclose a straightline documentation in a list. * interp/br-op1.boot (dbShowOpDocumentation): Remove redundant test. * interp/br-op2.boot (kFormatSlotDomain): Call isConstructorName only on identifiers. * interp/br-saturn.boot (displayDomainOp): Tidy. (bcConform1): Likewise.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog17
-rw-r--r--src/interp/br-con.boot2
-rw-r--r--src/interp/br-op1.boot2
-rw-r--r--src/interp/br-op2.boot2
-rw-r--r--src/interp/br-saturn.boot4
-rw-r--r--src/interp/br-search.boot14
-rw-r--r--src/interp/br-util.boot1
7 files changed, 28 insertions, 14 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5480f45c..a8fbefa4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,22 @@
2011-07-05 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/br-util.boot ($charUnderscore): Move to br-search.boot
+ where it is used.
+ * interp/br-search.boot (pmPreparse): Tidy.
+ (mkGrepPattern1): Likewise.
+ (genSearch): Don't try to remove default operations; they have
+ already been left out by grepSplit.
+ (docSearch): Likewise.
+ * interp/br-con.boot (dbShowConsDoc1): Don't confusingly enclose a
+ straightline documentation in a list.
+ * interp/br-op1.boot (dbShowOpDocumentation): Remove redundant test.
+ * interp/br-op2.boot (kFormatSlotDomain): Call isConstructorName
+ only on identifiers.
+ * interp/br-saturn.boot (displayDomainOp): Tidy.
+ (bcConform1): Likewise.
+
+2011-07-05 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* gui/gui.pro.in [Mac OS X]: Don't build application bundle.
2011-07-04 Gabriel Dos Reis <gdr@cs.tamu.edu>
diff --git a/src/interp/br-con.boot b/src/interp/br-con.boot
index ce241655..9fce6fae 100644
--- a/src/interp/br-con.boot
+++ b/src/interp/br-con.boot
@@ -1001,7 +1001,7 @@ dbShowConsDoc1(htPage,conform,indexOrNil) ==
sig := '((CATEGORY domain) (SetCategory) (SetCategory))
displayDomainOp(htPage,'"constructor",conform,conname,sig,true,doc,indexOrNil,'dbSelectCon,nil,nil)
exposeFlag := isExposedConstructor conname
- doc := [getConstructorDocumentation conname]
+ doc := getConstructorDocumentation conname
signature := getConstructorSignature conname
sig :=
getConstructorKindFromDB conname = "category" =>
diff --git a/src/interp/br-op1.boot b/src/interp/br-op1.boot
index 5d0e41e5..dad326ca 100644
--- a/src/interp/br-op1.boot
+++ b/src/interp/br-op1.boot
@@ -662,7 +662,7 @@ dbShowOpDocumentation(htPage,opAlist,which,data) ==
dbReadComments k
tail := CDDDDR item
tail.first := comments
- doc := (string? comments and comments isnt '"" => comments; nil)
+ doc := (comments isnt '"" => comments; nil)
pred := predicate or true
index := (exactlyOneOpSig => nil; base + j)
if which is '"package operation" then
diff --git a/src/interp/br-op2.boot b/src/interp/br-op2.boot
index 0b30f52c..bc9e0049 100644
--- a/src/interp/br-op2.boot
+++ b/src/interp/br-op2.boot
@@ -419,7 +419,7 @@ kFormatSlotDomain x == fn formatSlotDomain x where fn x ==
(op := first x) is '_$ => '_$
op is 'local => second x
op is ":" => [":",second x,fn third x]
- isConstructorName op => [fn y for y in x]
+ IDENTP op and isConstructorName op => [fn y for y in x]
integer? op => op
op is 'QUOTE and atom second x => second x
x
diff --git a/src/interp/br-saturn.boot b/src/interp/br-saturn.boot
index ad1871e3..efd037e3 100644
--- a/src/interp/br-saturn.boot
+++ b/src/interp/br-saturn.boot
@@ -1334,7 +1334,7 @@ displayDomainOp(htPage,which,origin,op,sig,predicate,
htSayIndentRel(-15,count > 1)
htSaySaturn '"\\"
-----------------------------------------------------------
- if doc and (doc ~= '"" and (doc isnt [d] or d ~= '"")) then
+ if doc ~= nil and doc isnt '"" and (doc isnt [d] or d ~= '"") then
htSaySaturn '"{\em Description:}"
htSaySaturnAmpersand()
htSayStandard('"\newline\tab{2}{\em Description:}")
@@ -1615,7 +1615,7 @@ bcConform1 form == main where
atom form =>
-- string literals, e.g. "failed", are constructor arguments
-- too, until we fix that.
- string? form or not isConstructorName form =>
+ string? form or not (IDENTP form and isConstructorName form) =>
s :=
string? form => strconc('"_"",form,'"_"")
STRINGIMAGE form
diff --git a/src/interp/br-search.boot b/src/interp/br-search.boot
index 7dec7f86..fd0eef31 100644
--- a/src/interp/br-search.boot
+++ b/src/interp/br-search.boot
@@ -35,6 +35,8 @@
import bc_-util
namespace BOOT
+$charUnderscore == char "__" --needed because of parser bug
+
--=======================================================================
-- Grepping Database libdb.text
-- Redone 12/95 for Saturn; previous function grep renamed as grepFile
@@ -50,7 +52,7 @@ grepConstruct(s,key,:options) == --key = a o c d p x k (all) . (aok) w (doc)
$localLibdb : local := fnameExists? '"libdb.text" and '"libdb.text"
lines := grepConstruct1(s,key)
lines is ["error",:.] => lines
- IFCAR options => grepSplit(lines,key = 'w) --leave now if a constructor
+ IFCAR options => grepSplit(lines,key is 'w) --leave now if a constructor
key in '(o a) => dbScreenForDefaultFunctions lines --kill default lines if a/o
lines
@@ -193,8 +195,8 @@ pmPreparse s == hn fn(s,0,#s) where--stupid insertion of chars to get correct pa
strconc('"_"",t,'"_"")
strconc(subString(s,n,i - n),middle,fn(s,j,siz))
gn(s,i,j) == --replace each underscore by 4 underscores!
- n := or/[k for k in i..j | s.k = $charUnderscore] =>
- strconc(subString(s,i,n - i + 1),$charUnderscore,gn(s,n + 1,j))
+ n := or/[k for k in i..j | stringChar(s,k) = $charUnderscore] =>
+ strconc(subString(s,i,n - i + 1),charString $charUnderscore,gn(s,n + 1,j))
subString(s,i,j - i + 1)
firstNonDelim(s,n) ==
@@ -272,7 +274,7 @@ mkGrepPattern1(x,:options) == --called by mkGrepPattern (and grepConstructName?)
else if res is [.,p,:r] and p = $wild1 then res := r
strconc/reverse! res
remUnderscores s ==
- (k := charPosition(char $charUnderscore,s,0)) < maxIndex s =>
+ (k := charPosition($charUnderscore,s,0)) < maxIndex s =>
strconc(subString(s,0,k),'"[",s.(k + 1),'"]",
remUnderscores(subString(s,k + 2)))
s
@@ -394,8 +396,6 @@ genSearch(filter,:options) == --"Complete" from HD (see man0.ht) and aokSearch
if includeDoc? then
docSearchAlist := grepConstruct(key,'w,true)
docSearchAlist is ['error,:.] => bcErrorPage docSearchAlist
- docSearchAlist := [x for x in docSearchAlist
- | stringChar(x,0) ~= char "x"]--drop defaults
genSearch1(filter,genSearchTran regSearchAlist,genSearchTran docSearchAlist)
genSearchTran alist == [[x,y,:y] for [x,:y] in alist]
@@ -549,8 +549,6 @@ docSearch filter == --"Documentation" from HD (see man0.ht)
key := removeSurroundingStars filter
docSearchAlist := grepConstruct(filter,'w,true)
docSearchAlist is ['error,:.] => bcErrorPage docSearchAlist
- docSearchAlist := [x for x in docSearchAlist
- | stringChar(x,0) ~= char "x"] --drop defaults
docSearch1(filter,genSearchTran docSearchAlist)
docSearch1(filter,doc) ==
diff --git a/src/interp/br-util.boot b/src/interp/br-util.boot
index c918690f..bc22ab8d 100644
--- a/src/interp/br-util.boot
+++ b/src/interp/br-util.boot
@@ -51,7 +51,6 @@ browserAutoloadOnceTrigger() == nil
----------------------> Global Variables <-----------------------
$includeUnexposed? := true --default setting
$tick == char "`" --field separator for database files
-$charUnderscore := ('__) --needed because of parser bug
$wild1 := '"[^`]*" --phrase used to convert keys to grep strings
$browseCountThreshold := 10 --the maximum number of names that will display
--on a general search