aboutsummaryrefslogtreecommitdiff
path: root/src/interp/spad-parser.boot
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp/spad-parser.boot')
-rw-r--r--src/interp/spad-parser.boot14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/interp/spad-parser.boot b/src/interp/spad-parser.boot
index 43e04256..894907b2 100644
--- a/src/interp/spad-parser.boot
+++ b/src/interp/spad-parser.boot
@@ -334,11 +334,10 @@ parseExpression() ==
parseSegmentTail() ==
parseGlyph ".." =>
- stackUpdated?($reduceStack) := false
- parseExpression()
- if not stackUpdated? $reduceStack then
- pushReduction('segmentTail,nil)
- pushReduction('parseSegmentTail,["SEGMENT",popStack2(),popStack1()])
+ seg :=
+ parseExpression() => ["SEGMENT",popStack2(),popStack1()]
+ ["SEGMENT",popStack1()]
+ pushReduction('parseSegmentTail,seg)
nil
parseReductionOp() ==
@@ -547,7 +546,7 @@ parseLoop() ==
parseOpenBracket() ==
s := currentSymbol()
- getToken s is "[" =>
+ s is "[" or s is ["elt",.,"["] =>
do
s is ["elt",:.] =>
pushReduction('parseOpenBracket,["elt",second s,"construct"])
@@ -558,7 +557,7 @@ parseOpenBracket() ==
parseOpenBrace() ==
s := currentSymbol()
- getToken s is "{" =>
+ s is "{" or s is ["elt",.,"{"] =>
do
s is ["elt",:.] =>
pushReduction('parseOpenBracket,["elt",second s,"brace"])
@@ -805,7 +804,6 @@ for x in [
[">", ["="], [">"]],_
["=", ["=", [">"]] ,[">"]],_
[".", ["."]],_
- ["^", ["="]],_
["~", ["="]],_
["[", ["|"]],_
[":", ["="], ["-"], [":"]]_