aboutsummaryrefslogtreecommitdiff
path: root/src/interp/parse.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-10-18 23:10:24 +0000
committerdos-reis <gdr@axiomatics.org>2011-10-18 23:10:24 +0000
commit8eb956703b1347fe2ced725dfba56d35c6aecd74 (patch)
treeb47fb6b57b4350a6d5bb7a77ca1fd69f4ce78677 /src/interp/parse.boot
parent630b6f25ff2900a31326141b67a187a685e7e9b8 (diff)
downloadopen-axiom-8eb956703b1347fe2ced725dfba56d35c6aecd74.tar.gz
* interp/postpar.boot (displayPreCompilationErrors): Dot not check
for interactive mode. (postBigFloat): Likewise. (postDef): Likewise. (postMDef): Likewise. (tuple2List): Likewise. (postReduce): Likewise. (postQUOTE): Remove. (postQuot): Likewise. (postOp): Likewise. (postTran): Adjust. * interp/newaux.lisp: Replace %LET with ':='. * interp/property.lisp: Likewise. * interp/g-util.boot (getTypeOfSyntax): Likewise. * interp/define.boot (checkRepresentation): Likewise. (doIt): Likewise. * interp/compiler.boot (compSetq): Likewise. (compRecoverGuard): Likewise. (compReduce1): Likewise. * interp/c-util.boot (lhsOfAssignment): Likewise. (isAlmostSimple): Likewise. * interp/c-doc.boot (recordAttributeDocumentation): Likewise. * interp/parse.boot (parseLeftArrow): Remove. (parseLETD): Likewise. (parseAssign): Rename from parseLET. * algebra/syntax.spad.pamphlet (SpadAst): Handle both cases.
Diffstat (limited to 'src/interp/parse.boot')
-rw-r--r--src/interp/parse.boot27
1 files changed, 8 insertions, 19 deletions
diff --git a/src/interp/parse.boot b/src/interp/parse.boot
index f980de7c..8fd23a1c 100644
--- a/src/interp/parse.boot
+++ b/src/interp/parse.boot
@@ -97,11 +97,6 @@ parseConstruct u ==
$insideConstructIfTrue: local:= true
[first u,:parseTranList rest u]
--- ??? This parser is unused at the moment.
-parseLeftArrow: %ParseForm -> %Form
-parseLeftArrow u ==
- parseTran ["%LET",:rest u]
-
parseIs: %ParseForm -> %Form
parseIs t ==
t isnt ["is",a,b] => systemErrorHere ["parseIs",t]
@@ -139,19 +134,14 @@ transIs1 u ==
[h,:v]
u
-parseLET: %ParseForm -> %Form
-parseLET t ==
- t isnt ["%LET",x,y] => systemErrorHere ["parseLET",t]
- p := ["%LET",parseTran x,parseTranCheckForRecord(y,opOf x)]
- opOf x = "cons" => ["%LET",transIs p.1,p.2]
+parseAssign: %ParseForm -> %Form
+parseAssign t ==
+ t isnt [":=",x,y] => systemErrorHere ["parseAssign",t]
+ p := [":=",parseTran x,parseTranCheckForRecord(y,opOf x)]
+ opOf x = "cons" => [":=",transIs p.1,p.2]
p
-parseLETD: %ParseForm -> %Form
-parseLETD t ==
- t isnt ["LETD",x,y] => systemErrorHere ["parseLETD",t]
- ["%Decl",parseTran x,parseTran y]
-
parseColon: %ParseForm -> %Form
parseColon u ==
u isnt [":",:.] => systemErrorHere ["parseColon",u]
@@ -355,7 +345,7 @@ makeSimplePredicateOrNil: %ParseForm -> %Form
makeSimplePredicateOrNil p ==
isSimple p => nil
u:= isAlmostSimple p => u
- wrapSEQExit [["%LET",g:= gensym(),p],g]
+ wrapSEQExit [[":=",g:= gensym(),p],g]
parseWhere: %List %Form -> %Form
@@ -378,7 +368,7 @@ transSeq l ==
l is [x] => decExitLevel x
[item,:tail] := l
item is ["SEQ",:l,["exit",1,["IF",p,["exit", =2,q],"%noBranch"]]] and
- (and/[x is ["%LET",:.] for x in l]) =>
+ (and/[x is [":=",:.] for x in l]) =>
["SEQ",:[decExitLevel x for x in l],["exit",1,["IF",decExitLevel p,
decExitLevel q,transSeq tail]]]
item is ["IF",a,["exit",1,b],"%noBranch"] =>
@@ -457,8 +447,7 @@ for x in [[":", :"parseColon"],_
["isnt", :"parseIsnt"],_
["Join", :"parseJoin"],_
["leave", :"doParseLeave"],_
- ["%LET", :"parseLET"],_
- ["LETD", :"parseLETD"],_
+ [":=", :"parseAssign"],_
["MDEF", :"parseMDEF"],_
["or", :"parseOr"],_
["pretend", :"parsePretend"],_