From bb63cc24d8ea38bc645c38cb7c44edf33b220bee Mon Sep 17 00:00:00 2001 From: Ludovic Court`es Date: Wed, 15 Feb 2006 08:46:55 +0000 Subject: Skribe reader: consider square brackets as delimiters. * src/guile/skribilo/reader/skribe.scm (%make-skribe-reader): Use the `r6rs-keyword-*' and `r6rs-number' token readers so that square brackets are rightfully considered as delimiters. git-archimport-id: lcourtes@laas.fr--2004-libre/skribilo--devel--1.2--patch-45 --- src/guile/skribilo/reader/skribe.scm | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'src/guile') diff --git a/src/guile/skribilo/reader/skribe.scm b/src/guile/skribilo/reader/skribe.scm index f24c2f7..f92f13b 100644 --- a/src/guile/skribilo/reader/skribe.scm +++ b/src/guile/skribilo/reader/skribe.scm @@ -65,25 +65,18 @@ the Skribe syntax." (let ((colon-keywords ;; keywords à la `:key' fashion (r:make-token-reader #\: (r:token-reader-procedure - (r:standard-token-reader 'keyword)))) - (square-bracket-free-symbol-misc-chars - (let* ((tr (r:standard-token-reader 'guile-symbol-misc-chars)) - (tr-spec (r:token-reader-specification tr)) - (tr-proc (r:token-reader-procedure tr))) - (r:make-token-reader (filter (lambda (chr) - (not (or (eq? chr #\[) - (eq? chr #\])))) - tr-spec) - tr-proc)))) + (r:standard-token-reader 'keyword))))) + ;; Note: we use the `r6rs-symbol-*' and `r6rs-number' token readers since + ;; they consider square brackets as delimiters. (r:make-reader (cons* (r:make-token-reader #\# &sharp-reader) colon-keywords - square-bracket-free-symbol-misc-chars (map r:standard-token-reader `(whitespace - sexp string guile-number - guile-symbol-lower-case - guile-symbol-upper-case + sexp string r6rs-number + r6rs-symbol-lower-case + r6rs-symbol-upper-case + r6rs-symbol-misc-chars quote-quasiquote-unquote semicolon-comment skribe-exp))) -- cgit v1.2.3