diff options
author | dos-reis <gdr@axiomatics.org> | 2008-08-02 10:21:14 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-08-02 10:21:14 +0000 |
commit | c129ad817cd16aef92f5b433a509e15254b9ccd3 (patch) | |
tree | 006c41bd43cfeea3a3a85e007f2e2efbb6b9a410 /src/boot/parser.boot | |
parent | ed7ceb86d0c98c28c2dc545c3fc20594d6c325df (diff) | |
download | open-axiom-c129ad817cd16aef92f5b433a509e15254b9ccd3.tar.gz |
* boot/parser.boot (bpTerm): Term forms depend on the kind of
variable.
(bpTypeItem): New.
(bpTypeItemList): Use it.
(bpTypeAliasDefition): Tidy.
(bpCaseItem): Accept wildchars in pattern terms.
* boot/ast.boot (bfCompDef): Don't name unused pattern variables.
(bfSmintable): A character compares EQL.
(bfCI): Ignore wildcard pattern variables.
* boot/strap: Update cached Lisp translation.
Diffstat (limited to 'src/boot/parser.boot')
-rw-r--r-- | src/boot/parser.boot | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/boot/parser.boot b/src/boot/parser.boot index abb743f7..87ade687 100644 --- a/src/boot/parser.boot +++ b/src/boot/parser.boot @@ -473,7 +473,7 @@ bpImport() == -- type-alias-definition: -- identifier <=> logical-expression bpTypeAliasDefition() == - (bpTerm() or bpTrap()) and + (bpTerm function bpIdList or bpTrap()) and bpEqKey "TDEF" and bpLogical() and bpPush %TypeAlias(bpPop2(), bpPop1()) @@ -1110,13 +1110,17 @@ bpStruct()== bpTypeList() and bpPush bfStruct(bpPop2(),bpPop1()) bpTypeList() == bpPileBracketed function bpTypeItemList - or bpTerm() and bpPush [bpPop1()] + or bpTerm function bpIdList and bpPush [bpPop1()] + +bpTypeItem() == + bpTerm function bpIdList -bpTypeItemList() == bpListAndRecover function bpTerm +bpTypeItemList() == + bpListAndRecover function bpTypeItem -bpTerm() == +bpTerm idListParser == (bpName() or bpTrap()) and - ((bpParenthesized function bpIdList and + ((bpParenthesized idListParser and bpPush bfNameArgs (bpPop2(),bpPop1())) or bpName() and bpPush bfNameArgs(bpPop2(),bpPop1())) or bpPush(bfNameOnly bpPop1()) @@ -1132,11 +1136,18 @@ bpCase()== bpPiledCaseItems()== bpPileBracketed function bpCaseItemList and bpPush bfCase(bpPop2(),bpPop1()) + bpCaseItemList()== bpListAndRecover function bpCaseItem + +bpCasePatternVar() == + bpName() or bpDot() + +bpCasePatternVarList() == + bpTuple function bpCasePatternVar bpCaseItem()== - (bpTerm() or bpTrap()) and + (bpTerm function bpCasePatternVarList or bpTrap()) and (bpEqKey "EXIT" or bpTrap()) and (bpWhere() or bpTrap()) and bpPush bfCaseItem (bpPop2(),bpPop1()) |