aboutsummaryrefslogtreecommitdiff
path: root/src/boot/parser.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2012-01-12 12:50:31 +0000
committerdos-reis <gdr@axiomatics.org>2012-01-12 12:50:31 +0000
commit4ebf86fc014d407548be8af728191fe02401bf1a (patch)
treee86ee14a7150fccd3183ee3e4803ce7fe6c60a94 /src/boot/parser.boot
parente9d8606f86600b7d581f93f346981bca1f291dc7 (diff)
downloadopen-axiom-4ebf86fc014d407548be8af728191fe02401bf1a.tar.gz
* boot/parser.boot (bpFunction): New.
(bpConstTok): Include it. * boot/ast.boot (bfFunction): New. * boot/tokens.boot: `function' is now a keyword.
Diffstat (limited to 'src/boot/parser.boot')
-rw-r--r--src/boot/parser.boot6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/boot/parser.boot b/src/boot/parser.boot
index a7706e9a..516b47de 100644
--- a/src/boot/parser.boot
+++ b/src/boot/parser.boot
@@ -385,7 +385,7 @@ bpConstTok() ==
bpNext()
bpRequire function bpSexp and
bpPush bfSymbol bpPop1()
- bpString()
+ bpString() or bpFunction()
bpChar() ==
$stok is ["ID",:.] and $ttok is "char" =>
@@ -663,6 +663,10 @@ bpString()==
shoeTokType $stok is "STRING" and
bpPush(quote makeSymbol $ttok) and bpNext()
+bpFunction() ==
+ bpEqKey "FUNCTION" and bpRequire function bpPrimary1
+ and bpPush bfFunction bpPop1()
+
bpThetaName() ==
$stok is ["ID",:.] and $ttok has SHOETHETA =>
bpPushId()