aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-10-14 21:17:34 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-10-16 23:28:34 +0200
commit418092c5d25ce8a262d206e7fe691733663b379c (patch)
tree4f06116e067501d86adb4d0e04a869291c041a64
parentChange gettext '_' to 'G_'. (diff)
downloadcalp-418092c5d25ce8a262d206e7fe691733663b379c.tar.gz
calp-418092c5d25ce8a262d206e7fe691733663b379c.tar.xz
Fix minor errors.
-rw-r--r--module/c/lex.scm8
-rw-r--r--module/datetime/zic.scm2
-rwxr-xr-xmodule/scripts/peg-to-graph.scm2
3 files changed, 6 insertions, 6 deletions
diff --git a/module/c/lex.scm b/module/c/lex.scm
index 34e52d88..977f497f 100644
--- a/module/c/lex.scm
+++ b/module/c/lex.scm
@@ -65,16 +65,16 @@
(define-peg-pattern char all
(and (ignore "'") (or escaped-char peg-any) (ignore "'")))
+;; whitespace
+(define-peg-pattern ws none
+ (or " " " " "\n"))
+
(define-peg-pattern* operator all
`(or ,@(map symbol->string symbol-binary-operators)
,@(map (lambda (op) `(and ,(symbol->string op) ws))
wordy-binary-operators)))
-;; whitespace
-(define-peg-pattern ws none
- (or " " " " "\n"))
-
;; space (for when whitespace is optional)
(define-peg-pattern sp none (* ws))
diff --git a/module/datetime/zic.scm b/module/datetime/zic.scm
index 955ecd1c..ace3d991 100644
--- a/module/datetime/zic.scm
+++ b/module/datetime/zic.scm
@@ -275,7 +275,7 @@
;; technical dept.
(scm-error 'misc-error "parse-zic-file"
(G_ "Invalid key ~s. Note that leap seconds and expries rules aren't yet implemented.")
- (list type)
+ (list (car tokens))
#f)))]))))))
diff --git a/module/scripts/peg-to-graph.scm b/module/scripts/peg-to-graph.scm
index e2a829f9..afd7a4c3 100755
--- a/module/scripts/peg-to-graph.scm
+++ b/module/scripts/peg-to-graph.scm
@@ -40,7 +40,7 @@
(unique-symbols (list body)))))))
(define (main . args)
- (define options (getopt-long (cons "peg-to-graph" argrs)
+ (define options (getopt-long (cons "peg-to-graph" args)
(getopt-opt option-spec)))
(define engine (option-ref options 'engine "dot"))
(define output-file (option-ref options 'output "lex2.pdf"))