summaryrefslogtreecommitdiff
path: root/src/guile
diff options
context:
space:
mode:
authorLudovic Court`es2006-07-11 14:39:13 +0000
committerLudovic Court`es2006-07-11 14:39:13 +0000
commit4420b6ce4292ae201a95c8ad22a9cc233aa7437a (patch)
tree1ab81fc3f54ae70d20f6afb4e638fda86ba9441d /src/guile
parent6e7e437baa733554af1f452ad6c1d28f6702675f (diff)
downloadskribilo-4420b6ce4292ae201a95c8ad22a9cc233aa7437a.tar.gz
skribilo-4420b6ce4292ae201a95c8ad22a9cc233aa7437a.tar.lz
skribilo-4420b6ce4292ae201a95c8ad22a9cc233aa7437a.zip
By default, use (internally) a reader that does not record positions.
* src/guile/skribilo/utils/syntax.scm (%skribilo-module-reader): If debugging is not required (default), create a reader that does not record positions. * src/skribilo.in: Don't pass `--debug' by default. git-archimport-id: lcourtes@laas.fr--2005-libre/skribilo--devo--1.2--patch-4
Diffstat (limited to 'src/guile')
-rw-r--r--src/guile/skribilo/utils/syntax.scm27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/guile/skribilo/utils/syntax.scm b/src/guile/skribilo/utils/syntax.scm
index f7a5990..975b879 100644
--- a/src/guile/skribilo/utils/syntax.scm
+++ b/src/guile/skribilo/utils/syntax.scm
@@ -1,6 +1,6 @@
;;; syntax.scm -- Syntactic candy for Skribilo modules.
;;;
-;;; Copyright 2005 Ludovic Courtès <ludovic.courtes@laas.fr>
+;;; Copyright 2005, 2006 Ludovic Courtès <ludovic.courtes@laas.fr>
;;;
;;;
;;; This program is free software; you can redistribute it and/or modify
@@ -30,21 +30,26 @@
;;;
;;; Commentary:
;;;
-;;; A reader for the Skribe syntax, i.e. roughly R5RS Scheme plus DSSSL-style
-;;; keywords and sk-exps (expressions introduced using a square bracket).
+;;; This module provides syntactic candy for Skribilo modules, i.e., a syntax
+;;; similar to Guile's default syntax with a few extensions, plus various
+;;; convenience macros.
;;;
;;; Code:
(define %skribilo-module-reader
;; The syntax used to read Skribilo modules.
- (make-alternate-guile-reader '(colon-keywords
- no-scsh-block-comments
- srfi30-block-comments
- srfi62-sexp-comments)
- (lambda (chr port read)
- (error "unexpected character in Skribilo module"
- chr))
- 'reader/record-positions))
+ (apply make-alternate-guile-reader
+ '(colon-keywords no-scsh-block-comments
+ srfi30-block-comments srfi62-sexp-comments)
+ (lambda (chr port read)
+ (error "unexpected character in Skribilo module"
+ chr))
+
+ ;; By default, don't record positions: this yields a nice read
+ ;; performance improvement.
+ (if (memq 'debug (debug-options))
+ (list 'reader/record-positions)
+ '())))
(define %skribe-reader
;; The Skribe syntax reader.