aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-11-06 04:16:59 +0000
committerdos-reis <gdr@axiomatics.org>2011-11-06 04:16:59 +0000
commit3211bee5956a195168721f7d85737bc6e2ad2a2b (patch)
treea3c4bb4d7b63cc62096962a7f027846093840082
parentd42107e007d8111d16eff7157e3c0eacd227bd2a (diff)
downloadopen-axiom-3211bee5956a195168721f7d85737bc6e2ad2a2b.tar.gz
* interp/c-doc.boot (checkBalance): Fix a latent logic bug.
* algebra/Makefile.in: Tidy.
-rw-r--r--src/ChangeLog5
-rw-r--r--src/algebra/Makefile.in15
-rw-r--r--src/interp/c-doc.boot27
3 files changed, 24 insertions, 23 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4a163d39..cdaa9035 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
2011-11-05 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/c-doc.boot (checkBalance): Fix a latent logic bug.
+ * algebra/Makefile.in: Tidy.
+
+2011-11-05 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* algebra/Makefile.in: Rework bootstrap dependency.
2011-11-04 Gabriel Dos Reis <gdr@cs.tamu.edu>
diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in
index ac71f4ef..b09976bc 100644
--- a/src/algebra/Makefile.in
+++ b/src/algebra/Makefile.in
@@ -100,6 +100,7 @@ BOOTSTRAP = $(DRIVER) --execpath=$(INTERPSYS) \
## They are needed only for their being known as constructors.
## Consequently, the dependencies listed here are at the categories
## inheritance level; not necessarily at the use level.
+strap-0/TYPE.$(FASLEXT): initdb.daase
strap-0/UTYPE.$(FASLEXT): strap-0/TYPE.$(FASLEXT)
strap-0/BASTYPE.$(FASLEXT): strap-0/TYPE.$(FASLEXT)
strap-0/KOERCE.$(FASLEXT): strap-0/TYPE.$(FASLEXT)
@@ -1214,9 +1215,12 @@ subdir = src/algebra/
## the built of several other domains and categories as essential
## to ignite the algebra build. We require Category only because
## we would like not to have too many special cases for it.
-$(OUT)/TYPE.$(FASLEXT): strap-2/CATEGORY.$(FASLEXT) \
+strap-stamp: strap-2/CATEGORY.$(FASLEXT) \
strap-2/SINT.$(FASLEXT) strap-2/NNI.$(FASLEXT) \
strap-2/PI.$(FASLEXT)
+ $(STAMP) $@
+
+$(OUT)/TYPE.$(FASLEXT): strap-stamp
$(OUT)/SINT.$(FASLEXT): $(OUT)/INT.$(FASLEXT)
$(OUT)/NNI.$(FASLEXT): $(OUT)/INT.$(FASLEXT)
@@ -2135,7 +2139,7 @@ ${INPUT}/VIEW2D.input: $(srcdir)/view2D.spad.pamphlet
${DOC}/diagrams.tex: $(axiom_src_docdir)/diagrams.tex
@cp -p $< $@
-$(oa_algebra_layer_0_objects): initdb-stamp
+$(oa_algebra_layer_0_objects): strap-stamp
$(axiom_algebra_layer_1_objects): 0-stamp
$(axiom_algebra_layer_2_objects): 1-stamp
$(axiom_algebra_layer_3_objects): 2-stamp
@@ -2165,7 +2169,7 @@ $(oa_algebra_layer_0_objects): | $(OUT)
$(OUT):
$(mkdir_p) $@
-0-stamp: initdb-stamp $(oa_algebra_layer_0_objects)
+0-stamp: $(oa_algebra_layer_0_objects)
@ rm -f 0-stamp
@ $(STAMP) 0-stamp
@ echo ==================================
@@ -2351,17 +2355,12 @@ $(SPADFILES): | $(OUTSRC)
.PHONY: all-initdb
all-initdb: initdb.daase
-.PRECIOUS: initdb.daase
initdb.daase: $(SPADFILES)
$(DRIVER) --execpath=$(INTERPSYS) --system="$(AXIOM)" \
--spad-srcdir=$(OUTSRC) \
--output=initdb.$$$$ --build-initdb && \
$(top_confdir)/move-if-change initdb.$$$$ $@
-initdb-stamp: initdb.daase
- $(STAMP) $@
-
-
mostlyclean-local:
@rm -f $(OUT)/*.$(FASLEXT) $(OUT)/*.daase
@rm -rf *.NRLIB
diff --git a/src/interp/c-doc.boot b/src/interp/c-doc.boot
index 63473e10..c56883af 100644
--- a/src/interp/c-doc.boot
+++ b/src/interp/c-doc.boot
@@ -1009,23 +1009,20 @@ checkSplitOn(x) ==
checkBalance u ==
checkBeginEnd u
stack := nil
- while u repeat
- do
- x := first u
- closer := scalarTarget(x,$checkPrenAlist) --is it an open bracket?
- => stack := [closer,:stack] --yes, push the open bracket
- open := rassoc(x,$checkPrenAlist) => --it is a close bracket!
- stack is [top,:restStack] => --does corresponding open bracket match?
- if open ~= top then --yes: just pop the stack
- checkDocError
- ['"Mismatch: left ",checkSayBracket top,'" matches right ",checkSayBracket open]
- stack := restStack
- checkDocError ['"Missing left ",checkSayBracket open]
- u := rest u
- if stack then
+ while u is [x,:u] repeat
+ not char? x => nil
+ closer := scalarTarget(x,$checkPrenAlist) => --is it an open bracket?
+ stack := [closer,:stack] --yes, push the open bracket
+ open := rassoc(x,$checkPrenAlist) => --it is a close bracket!
+ stack is [top,:restStack] => --does corresponding open bracket match?
+ x = top => stack := restStack --yes: just pop the stack
+ checkDocError
+ ['"Mismatch: left ",checkSayBracket open,'" matches right ",checkSayBracket x]
+ checkDocError ['"Missing left ",checkSayBracket x]
+ stack ~= nil =>
for x in reverse! stack repeat
checkDocError ['"Missing right ",checkSayBracket x]
- u
+ nil
++ returns the class of the parenthesis x
++ pren ::= '(' | ')'