From f75f5367773ef4132c94565d62301346b0846ae0 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Wed, 8 Dec 2010 18:14:00 +0000 Subject: * interp/fnewmeta.lisp: Replace MATCH-ADVANCE-GLYPH with PARSE-GlyphTok. (PARSE-GlyphTok): Now accept string instead of symbol. * interp/parsing.lisp (MATCH-ADVANCE-GLYPH): Remove as redundant. --- src/interp/fnewmeta.lisp | 13 +++++++------ src/interp/parsing.lisp | 4 ---- 2 files changed, 7 insertions(+), 10 deletions(-) (limited to 'src/interp') diff --git a/src/interp/fnewmeta.lisp b/src/interp/fnewmeta.lisp index e22af1f9..ae518dcd 100644 --- a/src/interp/fnewmeta.lisp +++ b/src/interp/fnewmeta.lisp @@ -337,10 +337,10 @@ (MATCH-KEYWORD-NEXT "catch") (ACTION (ADVANCE-TOKEN)) (ACTION (ADVANCE-TOKEN)) - (MUST (MATCH-ADVANCE-GLYPH "(")) + (MUST (|PARSE-GlyphTok| "(")) (MUST (|PARSE-QuantifiedVariable|)) (MUST (MATCH-ADVANCE-SPECIAL ")")) - (MUST (MATCH-ADVANCE-GLYPH "=>")) + (MUST (|PARSE-GlyphTok| "=>")) (MUST (|PARSE-Expression|)) (PUSH-REDUCTION '|PARSE-Catch| (CONS (POP-STACK-2) @@ -400,7 +400,7 @@ (DEFUN |PARSE-Seg| () - (AND (|PARSE-GliphTok| '|..|) + (AND (|PARSE-GlyphTok| "..") (BANG FIL_TEST (OPTIONAL (|PARSE-Expression|))) (PUSH-REDUCTION '|PARSE-Seg| (CONS 'SEGMENT @@ -772,7 +772,7 @@ (OPTIONAL (AND (STAR REPEATOR (|PARSE-Sexpr1|)) (OPTIONAL - (AND (|PARSE-GliphTok| '|.|) + (AND (|PARSE-GlyphTok| ".") (MUST (|PARSE-Sexpr1|)) (PUSH-REDUCTION '|PARSE-Sexpr1| (NCONC (POP-STACK-2) (POP-STACK-1)))))))) @@ -785,9 +785,10 @@ (ACTION (ADVANCE-TOKEN)))) -(DEFUN |PARSE-GliphTok| (|tok|) +(DEFUN |PARSE-GlyphTok| (|tok|) (DECLARE (SPECIAL |tok|)) - (AND (MATCH-CURRENT-TOKEN 'GLIPH |tok|) (ACTION (ADVANCE-TOKEN)))) + (AND (MATCH-CURRENT-TOKEN 'GLIPH (INTERN |tok|)) + (ACTION (ADVANCE-TOKEN)))) (DEFUN |PARSE-AnyId| () diff --git a/src/interp/parsing.lisp b/src/interp/parsing.lisp index 9dfe1d02..7f923a61 100644 --- a/src/interp/parsing.lisp +++ b/src/interp/parsing.lisp @@ -211,10 +211,6 @@ the stack, then stack a NIL. Return the value of prod." (and (match-token (current-token) 'keyword (intern str)) (action (advance-token)))) -(defun match-advance-glyph (str) - (and (match-token (current-token) 'gliph (intern str)) - (action (advance-token)))) - (defun match-advance-special (str) (and (match-token (current-token) 'special-char (character str)) (action (advance-token)))) -- cgit v1.2.3