aboutsummaryrefslogtreecommitdiff
path: root/src/interp/lexing.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-10-12 00:08:34 +0000
committerdos-reis <gdr@axiomatics.org>2011-10-12 00:08:34 +0000
commitb630bc7d49b335b41b50293952ffc64b65718a7b (patch)
tree8278202f762a8413a1ea4db8cb8c241343a86e3f /src/interp/lexing.boot
parent4aa013faa1399b7e31fa4220ae09b039c4a1b0e2 (diff)
downloadopen-axiom-b630bc7d49b335b41b50293952ffc64b65718a7b.tar.gz
* interp/lexing.boot (matchAdvanceKeyword): New.
* interp/spad-parser.boot: New parsing functions. * interp/fnewmeta.lisp: Use them. (PARSE-NewExpr): Remove. (PARSE-Command): Likewise. (PARSE-SpecialKeyWord): Likewise. (PARSE-TokenOption): Likewise. (PARSE-PrimaryOrQM): Likewise. (PARSE-InfixWith): Likewise. (PARSE-With): Likewise. (PARSE-Inline): Likewise. (PARSE-Quanifier): Likewise. (PARSE-QuantifiedVariable): Likewise. (PARSE-Infix): Likewise. (PARSE-Prefix): Likewise. (PARSE-Suffix): Likewise. (PARSE-TokTail): Likewise. (PARSE-Qualification): Likewise. (PARSE-Primary): Likewise. (PARSE-PrimaryNoFloat): Likewise. (PARSE-Quad): Likewise.
Diffstat (limited to 'src/interp/lexing.boot')
-rw-r--r--src/interp/lexing.boot7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/interp/lexing.boot b/src/interp/lexing.boot
index 8be1464f..d0f1c065 100644
--- a/src/interp/lexing.boot
+++ b/src/interp/lexing.boot
@@ -42,6 +42,7 @@ namespace BOOT
module lexing where
matchString: %String -> %Maybe %Short
matchAdvanceString: %String -> %Maybe %Short
+ matchAdvanceKeyword: %Symbol -> %Thing
--%
--% Line abstract datatype
@@ -402,6 +403,12 @@ matchAdvanceString x ==
n
nil
+matchAdvanceKeyword kwd ==
+ matchToken(currentToken(),'KEYWORD,kwd) =>
+ advanceToken()
+ true
+ false
+
--%
--% Stack abstract datatype.
--% Operational semantics: