From b630bc7d49b335b41b50293952ffc64b65718a7b Mon Sep 17 00:00:00 2001 From: dos-reis Date: Wed, 12 Oct 2011 00:08:34 +0000 Subject: * 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. --- src/interp/lexing.boot | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/interp/lexing.boot') 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: -- cgit v1.2.3