aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-10-08 22:18:38 +0000
committerdos-reis <gdr@axiomatics.org>2008-10-08 22:18:38 +0000
commit1fdd3d6b44f1eececda6e23e7f044d911bb9a8eb (patch)
tree82052b4f8d4aaecbaddac9d7705e850bcfb43265 /src
parent2a99c68c951cc35192d8f0fe733f0c7ff0b7d31c (diff)
downloadopen-axiom-1fdd3d6b44f1eececda6e23e7f044d911bb9a8eb.tar.gz
Allow compound argument types in Boot signatures.
* boot/parser.boot (bpArgtypeList): New. (bpMapping); Use it. * boot/tokens.boot: Define neutral element for CONCAT.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/boot/parser.boot18
-rw-r--r--src/boot/tokens.boot1
3 files changed, 21 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index be8dd539..97f2c847 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,12 @@
2008-10-08 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ Allow compound argument types in Boot signatures.
+ * boot/parser.boot (bpArgtypeList): New.
+ (bpMapping); Use it.
+ * boot/tokens.boot: Define neutral element for CONCAT.
+
+2008-10-08 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* boot/ast.boot (bfReduce): Check neutral value for original
operator too.
(bfReduceCollect): Likewise.
diff --git a/src/boot/parser.boot b/src/boot/parser.boot
index 2ad0bac5..b881ffe2 100644
--- a/src/boot/parser.boot
+++ b/src/boot/parser.boot
@@ -458,8 +458,8 @@ bpModule() ==
++ Parse a module import, or a import declaration for a foreign entity.
++ Import:
-++ IMPORT Name for Signature
-++ IMPORT QUOTE String
+++ IMPORT Signature FOR Name
+++ IMPORT Name
bpImport() ==
bpEqKey "IMPORT" =>
a := bpState()
@@ -498,12 +498,20 @@ bpSimpleMapping() ==
true
false
+++ ArgtypeList:
+++ ( ArgtypeSequence )
+++ ArgtypeSequence:
+++ Application
+++ Application , ArgtypeSequence
+bpArgtypeList() ==
+ bpTuple function bpApplication
+
++ Parse a mapping expression
++ Mapping:
-++ (IdList) -> Application
-++ SimpleMapping
+++ ArgtypeList -> Application
+++ SimpleMapping
bpMapping() ==
- bpParenthesized function bpIdList and
+ bpParenthesized function bpArgtypeList and
bpEqKey "ARROW" and bpApplication() and
bpPush Mapping(bpPop1(), bfUntuple bpPop1())
or bpSimpleMapping()
diff --git a/src/boot/tokens.boot b/src/boot/tokens.boot
index 53dc38a9..6a98317a 100644
--- a/src/boot/tokens.boot
+++ b/src/boot/tokens.boot
@@ -208,6 +208,7 @@ for i in [ _
["lcm", 1] , _
["STRCONC", '""] , _
["strconc", '""] , _
+ ["CONCAT", '""] , _
["MAX", -999999] , _
["MIN", 999999] , _
["*", 1] , _