diff options
| author | dos-reis <gdr@axiomatics.org> | 2010-05-08 14:20:57 +0000 |
|---|---|---|
| committer | dos-reis <gdr@axiomatics.org> | 2010-05-08 14:20:57 +0000 |
| commit | 9306af57a53ceace77f8f0cfea65f6ceed76d5c1 (patch) | |
| tree | 5ec4343bb04a9868541dea01c08a3244e15a831d /src/boot | |
| parent | 9ede6cd0b5be47c119455a8df1bc41cb56e2f5ff (diff) | |
| download | open-axiom-9306af57a53ceace77f8f0cfea65f6ceed76d5c1.tar.gz | |
* boot/parser.boot (bpArgumentList): New.
(bpParenthesizedApplication): Use it. New.
(bpPrimary1): Use it to implement function call with explicit
parenthesis as primary.
(bpOperator): Remove.
(bpAssignLHS): Rework. Allow field path after function call.
* boot/translator.boot: Remove debugging statement.
* interp/as.boot: Adjust to new syntax.
* interp/br-con.boot: Likewise.
* interp/br-data.boot: Likewise.
* interp/c-doc.boot: Likewise.
* interp/category.boot: Likewise.
* interp/cattable.boot: Likewise.
* interp/define.boot: Likewise.
* interp/functor.boot: Likewise.
* interp/g-util.boot: Likewise.
* interp/interop.boot: Likewise.
* interp/nrunopt.boot: Likewise.
* interp/pspad1.boot: Likewise.
* interp/setvars.boot: Likewise.
* interp/trace.boot: Likewise.
Diffstat (limited to 'src/boot')
| -rw-r--r-- | src/boot/parser.boot | 43 | ||||
| -rw-r--r-- | src/boot/translator.boot | 2 |
2 files changed, 26 insertions, 19 deletions
diff --git a/src/boot/parser.boot b/src/boot/parser.boot index 6e7a1efe..baf38b14 100644 --- a/src/boot/parser.boot +++ b/src/boot/parser.boot @@ -546,14 +546,21 @@ bpSexp1()== bpFirstTok() and bpPush nil bpPrimary1() == - bpName() or - bpDot() or - bpConstTok() or - bpConstruct() or - bpCase() or - bpStruct() or - bpPDefinition() or - bpBPileDefinition() + bpParenthesizedApplication() or + bpDot() or + bpConstTok() or + bpConstruct() or + bpCase() or + bpStruct() or + bpPDefinition() or + bpBPileDefinition() + +bpParenthesizedApplication() == + bpName() and bpAnyNo function bpArgumentList + +bpArgumentList() == + bpPDefinition() and + bpPush bfApplication(bpPop2(), bpPop1()) bpPrimary()== bpFirstTok() and (bpPrimary1() or bpPrefixOperator()) @@ -572,9 +579,6 @@ bpSelector()== and bpPush(bfElt(bpPop2(),bpPop1())) or bpPush bfSuffixDot bpPop1() ) -bpOperator() == - bpPrimary() and bpAnyNo function bpSelector - bpApplication()== bpPrimary() and bpAnyNo function bpSelector and (bpApplication() and @@ -1056,12 +1060,17 @@ bpAssignVariable()== bpBracketConstruct function bpPatternL or bpAssignLHS() bpAssignLHS()== - bpName() and (bpEqKey "COLON" and (bpApplication() or bpTrap()) - and bpPush bfLocal(bpPop2(),bpPop1()) - or bpEqKey "DOT" and bpList(function bpPrimary,"DOT") - and bpChecknull() and - bpPush bfTuple([bpPop2(),:bpPop1()]) - or true) + not bpName() => false + bpEqKey "COLON" => -- variable declaration + bpApplication() or bpTrap() + bpPush bfLocal(bpPop2(),bpPop1()) + bpArgumentList() and (bpEqPeek "DOT" or bpTrap()) + bpEqKey "DOT" => -- field path + bpList(function bpPrimary,"DOT") and + bpChecknull() and + bpPush bfTuple([bpPop2(),:bpPop1()]) + true + bpChecknull()== a := bpPop1() a = nil => bpTrap() diff --git a/src/boot/translator.boot b/src/boot/translator.boot index ff996f23..3a13d44a 100644 --- a/src/boot/translator.boot +++ b/src/boot/translator.boot @@ -750,8 +750,6 @@ retainFile? ext == Option 'no in $FilesToRetain => false Option ext in $FilesToRetain -TRACE retainFile? - compileBootHandler(progname, options, file) == intFile := BOOTTOCL(file, getIntermediateLispFile(file,options)) errorCount() ~= 0 => nil |
