diff options
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/boot/parser.boot | 7 | ||||
-rw-r--r-- | src/boot/strap/parser.clisp | 13 |
3 files changed, 21 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index cdae0388..79f51db3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-05-14 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * boot/parser.boot (bpNamedScope): New. + (bpApplication): Call it. + 2011-05-13 Gabriel Dos Reis <gdr@cs.tamu.edu> * boot/utility.boot (charPosition): New. diff --git a/src/boot/parser.boot b/src/boot/parser.boot index 0149687e..6d27017b 100644 --- a/src/boot/parser.boot +++ b/src/boot/parser.boot @@ -592,10 +592,17 @@ bpSelector()== and bpPush(bfElt(bpPop2(),bpPop1())) or bpPush bfSuffixDot bpPop1() ) +++ NamedScope: +++ NAMESPACE (Name | DOT) +bpNamedScope() == + bpEqKey "NAMESPACE" and (bpName() or bpDot() or bpTrap()) and + bpPush %Namespace bpPop1() + bpApplication()== bpPrimary() and bpAnyNo function bpSelector and (bpApplication() and bpPush(bfApplication(bpPop2(),bpPop1())) or true) + or bpNamedScope() ++ Typing: ++ SimpleType diff --git a/src/boot/strap/parser.clisp b/src/boot/strap/parser.clisp index fc6e7dda..00381889 100644 --- a/src/boot/strap/parser.clisp +++ b/src/boot/strap/parser.clisp @@ -627,11 +627,16 @@ (|bpPush| (|bfElt| (|bpPop2|) (|bpPop1|)))) (|bpPush| (|bfSuffixDot| (|bpPop1|)))))) +(DEFUN |bpNamedScope| () + (AND (|bpEqKey| 'NAMESPACE) (OR (|bpName|) (|bpDot|) (|bpTrap|)) + (|bpPush| (|%Namespace| (|bpPop1|))))) + (DEFUN |bpApplication| () - (AND (|bpPrimary|) (|bpAnyNo| #'|bpSelector|) - (OR (AND (|bpApplication|) - (|bpPush| (|bfApplication| (|bpPop2|) (|bpPop1|)))) - T))) + (OR (AND (|bpPrimary|) (|bpAnyNo| #'|bpSelector|) + (OR (AND (|bpApplication|) + (|bpPush| (|bfApplication| (|bpPop2|) (|bpPop1|)))) + T)) + (|bpNamedScope|))) (DEFUN |bpTyping| () (COND |