aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog7
-rw-r--r--src/interp/br-search.boot5
-rw-r--r--src/interp/br-util.boot7
3 files changed, 14 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 02f1cfb1..1d9fdd81 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,12 @@
2012-08-20 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/br-util.boot (htPred2English,gn): Tidy.
+ * interp/br-search.boot (pmPreparse): Do not apply pmPreparse,hn.
+ Tidy.
+ (pmPreparse,hn): Remove.
+
+2012-08-20 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* interp/spad.lisp (SPAD): Remove obfuscated binding of OUT-STREAM.
* interp/spad-parser.boot (paarseEcho): Use $OutputStream in lieu
of OUT-STREAM.
diff --git a/src/interp/br-search.boot b/src/interp/br-search.boot
index 090d7752..9890e86b 100644
--- a/src/interp/br-search.boot
+++ b/src/interp/br-search.boot
@@ -180,15 +180,14 @@ pmParseFromString s ==
[op,:[flatten x for x in argl]]
s
-pmPreparse s == hn fn(s,0,#s) where--stupid insertion of chars to get correct parse
- hn x == SUBLISLIS('(and or not),'("and" "or" "not"),x)
+pmPreparse s == fn(s,0,#s) where--stupid insertion of chars to get correct parse
fn(s,n,siz) == --main function: s is string, n is origin
n = siz => '""
i := firstNonDelim(s,n) or return subString(s,n)
j := firstDelim(s,i + 1) or siz
t := gn(s,i,j - 1)
middle :=
- t in '("and" "or" "not") => t
+ member(t,'("and" "or" "not")) => t
--the following 2 lines make commutative("*") parse correctly!!!!
stringChar(t,0) = char "_"" => t
j < siz - 1 and s.j = char "(" => t
diff --git a/src/interp/br-util.boot b/src/interp/br-util.boot
index acc4ed9a..fadc5bf9 100644
--- a/src/interp/br-util.boot
+++ b/src/interp/br-util.boot
@@ -162,11 +162,14 @@ htPred2English(x,:options) ==
bcConform(first l,$emList)
htSay('" has ")
fnAttr CADADR l
- op in '(_has ofCategory) =>
+ op in '(has ofCategory) =>
bcConform(first l,$emList)
htSay('" has ")
[a,b] := l
- b is ['ATTRIBUTE,c] and not constructor? c => fnAttr c
+ b is ['ATTRIBUTE,c] =>
+ symbol? c and not constructor? c => fnAttr c
+ c is [.,:.] and symbol? c.op and not constructor? c.op => fnAttr c
+ bcConform(c,$emList)
bcConform(b, $emList)
bcConform(x,$emList)
fnAttr c ==