Basic parsing.
This commit is contained in:
parent
c296d167b5
commit
8764877e40
1 changed files with 3 additions and 2 deletions
|
@ -43,7 +43,8 @@
|
|||
listing)
|
||||
|
||||
;; Specification of known keys for various types of parsing
|
||||
(define known-keys '(nick mail phone name born joined))
|
||||
(define known-keys '(nick mail phone name born joined destroyed
|
||||
mail2 ID email suspended tel)) ;; Unknown keys
|
||||
(define start/stop-keys '(student suspend))
|
||||
(define multi-keys '(card desfire credit))
|
||||
|
||||
|
@ -89,7 +90,7 @@
|
|||
(lines (if (not (null? rest1)) (car rest1) #f))
|
||||
(rest2 (if (not (null? rest1)) (cdr rest1) '()))
|
||||
(line-number (if (not (null? rest2)) (car rest2) #f))
|
||||
(lc0 (irregex-replace "^[ \\t]*" l ""))
|
||||
(lc0 (irregex-replace "^[ \\t]*" (line-remove-comments l) ""))
|
||||
(lc (irregex-replace "[ \\t]*$" lc0 "")))
|
||||
(if (= (string-length lc) 0)
|
||||
#f
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue