diff options
| author | dos-reis <gdr@axiomatics.org> | 2008-01-08 04:28:41 +0000 |
|---|---|---|
| committer | dos-reis <gdr@axiomatics.org> | 2008-01-08 04:28:41 +0000 |
| commit | 8d42d860e9f2fa6b71cfc1840134ad3b2a0a5dc9 (patch) | |
| tree | 9337472021a5bf88da7f8edb1981684b6725b358 /src/boot/parser.boot.pamphlet | |
| parent | 2ccae4d36c4bad637025e668b550c1e72d738193 (diff) | |
| download | open-axiom-8d42d860e9f2fa6b71cfc1840134ad3b2a0a5dc9.tar.gz | |
Automate FFI at Boot level
Diffstat (limited to 'src/boot/parser.boot.pamphlet')
| -rw-r--r-- | src/boot/parser.boot.pamphlet | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/src/boot/parser.boot.pamphlet b/src/boot/parser.boot.pamphlet index 863ef202..2ff33d38 100644 --- a/src/boot/parser.boot.pamphlet +++ b/src/boot/parser.boot.pamphlet @@ -512,6 +512,9 @@ bpMoveTo n== <<Constant>> +++ Parse a module definitoin +++ Module: +++ MODULE QUOTE String bpModule() == bpEqKey "MODULE" => -- we really want to check that the next token is indeed @@ -521,16 +524,22 @@ bpModule() == bpConstTok() and bpPush Module bpPop1() false +++ Parse a module import, or a import declaration for a foreign entity. +++ Import: +++ IMPORT Name for Signature +++ IMPORT QUOTE String bpImport() == bpEqKey "IMPORT" => - -- we really want to check that the next token is indeed - -- a string. For the moment, we delay the type checking - -- to the Lisp compiler/interpreter. That is likely to - -- cause cryptic diagnostics. To be fixed. - bpConstTok() and bpPush Import bpPop1() + (bpName() and (bpEqKey "FOR" or bpTrap()) and bpSignature() + and bpPush ImportSignature(bpPop2(), bpPop1())) + or + -- we really want to check that the next token is indeed + -- a string. For the moment, we delay the type checking + -- to the Lisp compiler/interpreter. That is likely to + -- cause cryptic diagnostics. To be fixed. + (bpConstTok() and bpPush Import bpPop1()) false - -- Parse a type alias defnition: -- type-alias-definition: -- identifier <=> logical-expression @@ -538,7 +547,21 @@ bpTypeAliasDefition() == (bpName() or bpTrap()) and bpEqKey "TDEF" and bpLogical() and bpPush TypeAlias(bpPop2(), nil, bpPop1()) - + +++ Parse a signature declaration +++ Signature: +++ Name COLON Mapping +bpSignature() == + bpName() and bpEqKey "COLON" and bpMapping() + and bpPush Signature(bpPop2(), bpPop1()) + +++ Parse a mapping expression +++ Mapping: +++ (Name | IdList) -> Name +bpMapping() == + (bpName() or bpIdList()) and bpEqKey "ARROW" and bpName() + and bpPush Mapping(bpPop1(), bpPop1()) + bpCancel()== a:=bpState() if bpEqKeyNextTok "SETTAB" |
