blob: 39761fbb29d8278e0b5e0ef74b85513b3c234e27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
(define-library (cook parse-internals)
(import (scheme base)
(srfi 1)
(srfi 9)
(srfi 26)
(srfi 69)
(chibi)
(chibi char-set ascii)
(chibi char-set)
(chibi parse)
(chibi regexp)
(chibi string)
(cook unicode))
(export ;; Data structures
<amount>
amount?
amount-quantity
amount-unit
<ingredient>
ingredient?
ingredient-name
ingredient-amount
<timer>
timer?
timer-name
timer-amount
<component>
component?
component-name
component-amount
<cookware>
cookware?
cookware-name
cookware-amount
<metadata-line>
metadata-line?
metadata-line-key
metadata-line-value
<recipe>
recipe?
recipe-metadata
recipe-body
recipe-ingredients
recipe-cookware
recipe-timers
<step>
step?
step-elements
<comment>
comment?
comment-text
<note>
note?
note-text
<section>
section?
section-name
;; Parsing functions
parse-cook
nl
whitespace
any-text-item
text-item
comment
note
word
unit
quantity
amount
meta-key
no-word-component
component
timer
cookware
ingredient
section
step
metadata
recipe)
(include "parse.scm"))
|