Codebase list lua-yaml / 7d155ec
New upstream snapshot. Debian Janitor 1 year, 3 months ago
31 changed file(s) with 89 addition(s) and 1791 deletion(s). Raw diff Collapse all Expand all
+0
-42
.github/workflows/spec.yml less more
0 name: spec
1
2 on:
3 push:
4 branches: [ '*' ]
5 pull_request:
6 branches: [ 'master' ]
7
8 jobs:
9 test:
10 strategy:
11 fail-fast: false
12 matrix:
13 lua-version: ["5.4", "5.3", "5.2", "5.1", "luajit"]
14
15 runs-on: ubuntu-latest
16
17 steps:
18 - uses: actions/checkout@v2
19
20 - uses: leafo/gh-actions-lua@v8.0.0
21 with:
22 luaVersion: ${{ matrix.lua-version }}
23
24 - uses: leafo/gh-actions-luarocks@v4.0.0
25
26 - name: install
27 run: |
28 sudo apt-get install -y libyaml-dev
29 luarocks install ansicolors
30 luarocks install ldoc
31 luarocks install luacov
32 luarocks install specl
33
34 - name: build
35 run: |
36 luarocks make --force
37
38 - name: test
39 run: |
40 specl -vfreport --coverage spec/*_spec.yaml
41 bash <(curl -s https://codecov.io/bash) -f luacov.report.out
+0
-9
.gitignore less more
0 *~
1 *.o
2 *.so
3 *.src.rock
4 /ChangeLog
5 /build-aux/config.ld
6 /luacov.*.out
7 /lyaml-*.tar.gz
8 /TAGS
33 unless noted otherwise in the body of that file.
44
55 ====================================================================
6 Copyright (C) 2013-2022 Gary V. Vaughan
6 Copyright (C) 2013-2023 Gary V. Vaughan
77
88 Permission is hereby granted, free of charge, to any person
99 obtaining a copy of this software and associated documentation
00 # lyaml NEWS - User visible changes
1
2 ## Noteworthy changes in release ?.? (????-??-??) [?]
3
14
25 ## Noteworthy changes in release 6.2.8 (2022-10-22) [stable]
36
00 LYAML
11 =====
22
3 Copyright (C) 2013-2022 Gary V. Vaughan
3 Copyright (C) 2013-2023 Gary V. Vaughan
44
55 [![License](https://img.shields.io/:license-mit-blue.svg)](https://mit-license.org)
6 [![workflow status](https://github.com/gvvaughan/lyaml/actions/workflows/spec.yml/badge.svg?branch=release-v6.2.8)](https://github.com/gvvaughan/lyaml/actions)
7 [![codecov.io](https://codecov.io/github/gvvaughan/lyaml/coverage.svg?branch=release-v6.2.8)](https://codecov.io/github/gvvaughan/lyaml?branch=release-v6.2.8)
6 [![workflow status](https://github.com/gvvaughan/lyaml/actions/workflows/spec.yml/badge.svg?branch=master)](https://github.com/gvvaughan/lyaml/actions)
7 [![codecov.io](https://codecov.io/github/gvvaughan/lyaml/coverage.svg?branch=master)](https://codecov.io/github/gvvaughan/lyaml?branch=master)
88
99 [LibYAML] binding for [Lua], with a fast C implementation
1010 for converting between [%YAML 1.1][yaml11] and [Lua] tables,
00 --[[
11 LYAML binding for Lua 5.1, 5.2, 5.3 & 5.4
2 Copyright (C) 2013-2022 Gary V. Vaughan
2 Copyright (C) 2013-2023 Gary V. Vaughan
33 ]]
44
55 title = '@package@ @version@ Reference'
0 lua-yaml (6.2.8+git20230107.1.d1df7a4-1) UNRELEASED; urgency=low
1
2 * New upstream snapshot.
3
4 -- Debian Janitor <janitor@jelmer.uk> Thu, 19 Jan 2023 03:36:35 -0000
5
06 lua-yaml (6.2.8-2) unstable; urgency=medium
17
28 [ Debian Janitor ]
+0
-97
doc/index.html less more
0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
1 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html>
3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
4 <head>
5 <title>lyaml 6.2.8 Reference</title>
6 <link rel="stylesheet" href="ldoc.css" type="text/css" />
7 </head>
8 <body>
9
10 <div id="container">
11
12 <div id="product">
13 <div id="product_logo"></div>
14 <div id="product_name"><big><b></b></big></div>
15 <div id="product_description"></div>
16 </div> <!-- id="product" -->
17
18
19 <div id="main">
20
21
22 <!-- Menu -->
23
24 <div id="navigation">
25 <br/>
26 <h1>lyaml 6.2.8</h1>
27
28
29
30
31 <h2>Modules</h2>
32 <ul class="nowrap">
33 <li><a href="modules/lyaml.html">lyaml</a></li>
34 <li><a href="modules/lyaml.explicit.html">lyaml.explicit</a></li>
35 <li><a href="modules/lyaml.functional.html">lyaml.functional</a></li>
36 <li><a href="modules/lyaml.implicit.html">lyaml.implicit</a></li>
37 </ul>
38
39 </div>
40
41 <div id="content">
42
43
44 <h2>
45 <h1>LYAML binding for Lua</h1>
46
47 <p>This is a Lua binding for the fast libYAML C library for converting
48 between <code>%YAML 1.1</code> and Lua tables, with a flexible Lua language
49 API to load and save YAML documents.</p>
50
51 <p>It works with Lua 5.1 (including LuaJIT), 5.2, 5.3 and 5.4.</p>
52
53 <h2>LICENSE</h2>
54
55 <p>The code is copyright by its respective authors, and released under the
56 MIT license (the same license as Lua itself). There is no warranty.</p>
57
58 </h2>
59
60 <h2>Modules</h2>
61 <table class="module_list">
62 <tr>
63 <td class="name" nowrap><a href="modules/lyaml.html">lyaml</a></td>
64 <td class="summary">
65
66 </td>
67 </tr>
68 <tr>
69 <td class="name" nowrap><a href="modules/lyaml.explicit.html">lyaml.explicit</a></td>
70 <td class="summary">
71
72 </td>
73 </tr>
74 <tr>
75 <td class="name" nowrap><a href="modules/lyaml.functional.html">lyaml.functional</a></td>
76 <td class="summary">
77
78 </td>
79 </tr>
80 <tr>
81 <td class="name" nowrap><a href="modules/lyaml.implicit.html">lyaml.implicit</a></td>
82 <td class="summary">
83
84 </td>
85 </tr>
86 </table>
87
88 </div> <!-- id="content" -->
89 </div> <!-- id="main" -->
90 <div id="about">
91 <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
92 <i style="float:right;">Last updated 2022-10-22 17:12:03 </i>
93 </div> <!-- id="about" -->
94 </div> <!-- id="container" -->
95 </body>
96 </html>
+0
-303
doc/ldoc.css less more
0 /* BEGIN RESET
1
2 Copyright (c) 2010, Yahoo! Inc. All rights reserved.
3 Code licensed under the BSD License:
4 http://developer.yahoo.com/yui/license.html
5 version: 2.8.2r1
6 */
7 html {
8 color: #000;
9 background: #FFF;
10 }
11 body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td {
12 margin: 0;
13 padding: 0;
14 }
15 table {
16 border-collapse: collapse;
17 border-spacing: 0;
18 }
19 fieldset,img {
20 border: 0;
21 }
22 address,caption,cite,code,dfn,em,strong,th,var,optgroup {
23 font-style: inherit;
24 font-weight: inherit;
25 }
26 del,ins {
27 text-decoration: none;
28 }
29 li {
30 margin-left: 20px;
31 }
32 caption,th {
33 text-align: left;
34 }
35 h1,h2,h3,h4,h5,h6 {
36 font-size: 100%;
37 font-weight: bold;
38 }
39 q:before,q:after {
40 content: '';
41 }
42 abbr,acronym {
43 border: 0;
44 font-variant: normal;
45 }
46 sup {
47 vertical-align: baseline;
48 }
49 sub {
50 vertical-align: baseline;
51 }
52 legend {
53 color: #000;
54 }
55 input,button,textarea,select,optgroup,option {
56 font-family: inherit;
57 font-size: inherit;
58 font-style: inherit;
59 font-weight: inherit;
60 }
61 input,button,textarea,select {*font-size:100%;
62 }
63 /* END RESET */
64
65 body {
66 margin-left: 1em;
67 margin-right: 1em;
68 font-family: arial, helvetica, geneva, sans-serif;
69 background-color: #ffffff; margin: 0px;
70 }
71
72 code, tt { font-family: monospace; font-size: 1.1em; }
73 span.parameter { font-family:monospace; }
74 span.parameter:after { content:":"; }
75 span.types:before { content:"("; }
76 span.types:after { content:")"; }
77 .type { font-weight: bold; font-style:italic }
78
79 body, p, td, th { font-size: .95em; line-height: 1.2em;}
80
81 p, ul { margin: 10px 0 0 0px;}
82
83 strong { font-weight: bold;}
84
85 em { font-style: italic;}
86
87 h1 {
88 font-size: 1.5em;
89 margin: 20px 0 20px 0;
90 }
91 h2, h3, h4 { margin: 15px 0 10px 0; }
92 h2 { font-size: 1.25em; }
93 h3 { font-size: 1.15em; }
94 h4 { font-size: 1.06em; }
95
96 a:link { font-weight: bold; color: #004080; text-decoration: none; }
97 a:visited { font-weight: bold; color: #006699; text-decoration: none; }
98 a:link:hover { text-decoration: underline; }
99
100 hr {
101 color:#cccccc;
102 background: #00007f;
103 height: 1px;
104 }
105
106 blockquote { margin-left: 3em; }
107
108 ul { list-style-type: disc; }
109
110 p.name {
111 font-family: "Andale Mono", monospace;
112 padding-top: 1em;
113 }
114
115 pre {
116 background-color: rgb(245, 245, 245);
117 border: 1px solid #C0C0C0; /* silver */
118 padding: 10px;
119 margin: 10px 0 10px 0;
120 overflow: auto;
121 font-family: "Andale Mono", monospace;
122 }
123
124 pre.example {
125 font-size: .85em;
126 }
127
128 table.index { border: 1px #00007f; }
129 table.index td { text-align: left; vertical-align: top; }
130
131 #container {
132 margin-left: 1em;
133 margin-right: 1em;
134 background-color: #f0f0f0;
135 }
136
137 #product {
138 text-align: center;
139 border-bottom: 1px solid #cccccc;
140 background-color: #ffffff;
141 }
142
143 #product big {
144 font-size: 2em;
145 }
146
147 #main {
148 background-color: #f0f0f0;
149 border-left: 2px solid #cccccc;
150 }
151
152 #navigation {
153 float: left;
154 width: 14em;
155 vertical-align: top;
156 background-color: #f0f0f0;
157 overflow: visible;
158 }
159
160 #navigation h2 {
161 background-color:#e7e7e7;
162 font-size:1.1em;
163 color:#000000;
164 text-align: left;
165 padding:0.2em;
166 border-top:1px solid #dddddd;
167 border-bottom:1px solid #dddddd;
168 }
169
170 #navigation ul
171 {
172 font-size:1em;
173 list-style-type: none;
174 margin: 1px 1px 10px 1px;
175 }
176
177 #navigation li {
178 text-indent: -1em;
179 display: block;
180 margin: 3px 0px 0px 22px;
181 }
182
183 #navigation li li a {
184 margin: 0px 3px 0px -1em;
185 }
186
187 #content {
188 margin-left: 14em;
189 padding: 1em;
190 width: 700px;
191 border-left: 2px solid #cccccc;
192 border-right: 2px solid #cccccc;
193 background-color: #ffffff;
194 }
195
196 #about {
197 clear: both;
198 padding: 5px;
199 border-top: 2px solid #cccccc;
200 background-color: #ffffff;
201 }
202
203 @media print {
204 body {
205 font: 12pt "Times New Roman", "TimeNR", Times, serif;
206 }
207 a { font-weight: bold; color: #004080; text-decoration: underline; }
208
209 #main {
210 background-color: #ffffff;
211 border-left: 0px;
212 }
213
214 #container {
215 margin-left: 2%;
216 margin-right: 2%;
217 background-color: #ffffff;
218 }
219
220 #content {
221 padding: 1em;
222 background-color: #ffffff;
223 }
224
225 #navigation {
226 display: none;
227 }
228 pre.example {
229 font-family: "Andale Mono", monospace;
230 font-size: 10pt;
231 page-break-inside: avoid;
232 }
233 }
234
235 table.module_list {
236 border-width: 1px;
237 border-style: solid;
238 border-color: #cccccc;
239 border-collapse: collapse;
240 }
241 table.module_list td {
242 border-width: 1px;
243 padding: 3px;
244 border-style: solid;
245 border-color: #cccccc;
246 }
247 table.module_list td.name { background-color: #f0f0f0; min-width: 200px; }
248 table.module_list td.summary { width: 100%; }
249
250
251 table.function_list {
252 border-width: 1px;
253 border-style: solid;
254 border-color: #cccccc;
255 border-collapse: collapse;
256 }
257 table.function_list td {
258 border-width: 1px;
259 padding: 3px;
260 border-style: solid;
261 border-color: #cccccc;
262 }
263 table.function_list td.name { background-color: #f0f0f0; min-width: 200px; }
264 table.function_list td.summary { width: 100%; }
265
266 ul.nowrap {
267 overflow:auto;
268 white-space:nowrap;
269 }
270
271 dl.table dt, dl.function dt {border-top: 1px solid #ccc; padding-top: 1em;}
272 dl.table dd, dl.function dd {padding-bottom: 1em; margin: 10px 0 0 20px;}
273 dl.table h3, dl.function h3 {font-size: .95em;}
274
275 /* stop sublists from having initial vertical space */
276 ul ul { margin-top: 0px; }
277 ol ul { margin-top: 0px; }
278 ol ol { margin-top: 0px; }
279 ul ol { margin-top: 0px; }
280
281 /* make the target distinct; helps when we're navigating to a function */
282 a:target + * {
283 background-color: #FF9;
284 }
285
286
287 /* styles for prettification of source */
288 pre .comment { color: #558817; }
289 pre .constant { color: #a8660d; }
290 pre .escape { color: #844631; }
291 pre .keyword { color: #aa5050; font-weight: bold; }
292 pre .library { color: #0e7c6b; }
293 pre .marker { color: #512b1e; background: #fedc56; font-weight: bold; }
294 pre .string { color: #8080ff; }
295 pre .number { color: #f8660d; }
296 pre .operator { color: #2239a8; font-weight: bold; }
297 pre .preprocessor, pre .prepro { color: #a33243; }
298 pre .global { color: #800080; }
299 pre .user-keyword { color: #800080; }
300 pre .prompt { color: #558817; }
301 pre .url { color: #272fc2; text-decoration: underline; }
302
+0
-267
doc/modules/lyaml.explicit.html less more
0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
1 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html>
3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
4 <head>
5 <title>lyaml 6.2.8 Reference</title>
6 <link rel="stylesheet" href="../ldoc.css" type="text/css" />
7 </head>
8 <body>
9
10 <div id="container">
11
12 <div id="product">
13 <div id="product_logo"></div>
14 <div id="product_name"><big><b></b></big></div>
15 <div id="product_description"></div>
16 </div> <!-- id="product" -->
17
18
19 <div id="main">
20
21
22 <!-- Menu -->
23
24 <div id="navigation">
25 <br/>
26 <h1>lyaml 6.2.8</h1>
27
28 <ul>
29 <li><a href="../index.html">Index</a></li>
30 </ul>
31
32 <h2>Contents</h2>
33 <ul>
34 <li><a href="#Functions">Functions</a></li>
35 </ul>
36
37
38 <h2>Modules</h2>
39 <ul class="nowrap">
40 <li><a href="../modules/lyaml.html">lyaml</a></li>
41 <li><strong>lyaml.explicit</strong></li>
42 <li><a href="../modules/lyaml.functional.html">lyaml.functional</a></li>
43 <li><a href="../modules/lyaml.implicit.html">lyaml.implicit</a></li>
44 </ul>
45
46 </div>
47
48 <div id="content">
49
50 <h1>Module <code>lyaml.explicit</code></h1>
51 <p>
52
53 </p>
54 <p>
55
56 </p>
57
58
59 <h2><a href="#Functions">Functions</a></h2>
60 <table class="function_list">
61 <tr>
62 <td class="name" nowrap><a href="#bool">bool (value)</a></td>
63 <td class="summary">Parse the value following an explicit <code>!!bool</code> tag.</td>
64 </tr>
65 <tr>
66 <td class="name" nowrap><a href="#float">float (value)</a></td>
67 <td class="summary">Parse the value following an explicit <code>!!float</code> tag.</td>
68 </tr>
69 <tr>
70 <td class="name" nowrap><a href="#int">int (value)</a></td>
71 <td class="summary">Parse the value following an explicit <code>!!int</code> tag.</td>
72 </tr>
73 <tr>
74 <td class="name" nowrap><a href="#null">null ()</a></td>
75 <td class="summary">Parse an explicit <code>!!null</code> tag.</td>
76 </tr>
77 <tr>
78 <td class="name" nowrap><a href="#str">str (value)</a></td>
79 <td class="summary">Parse the value following an explicit <code>!!str</code> tag.</td>
80 </tr>
81 </table>
82
83 <br/>
84 <br/>
85
86
87 <h2 class="section-header "><a name="Functions"></a>Functions</h2>
88
89 <dl class="function">
90 <dt>
91 <a name = "bool"></a>
92 <strong>bool (value)</strong>
93 </dt>
94 <dd>
95 Parse the value following an explicit <code>!!bool</code> tag.
96
97
98 <h3>Parameters:</h3>
99 <ul>
100 <li><span class="parameter">value</span>
101 token
102 </li>
103 </ul>
104
105 <h3>Returns:</h3>
106 <ol>
107
108 <span class="types"><a class="type" href="../modules/lyaml.explicit.html#bool">bool</a></span>
109 boolean equivalent, if a valid value was recognized
110 </ol>
111 <h3>Or</h3>
112 <ol>
113
114 <span class="types"><span class="type">nil</span></span>
115 otherwise, nil
116 </ol>
117
118
119
120 <h3>Usage:</h3>
121 <ul>
122 <pre class="example">maybe_bool = explicit.bool(tagarg)</pre>
123 </ul>
124
125 </dd>
126 <dt>
127 <a name = "float"></a>
128 <strong>float (value)</strong>
129 </dt>
130 <dd>
131 Parse the value following an explicit <code>!!float</code> tag.
132
133
134 <h3>Parameters:</h3>
135 <ul>
136 <li><span class="parameter">value</span>
137 token
138 </li>
139 </ul>
140
141 <h3>Returns:</h3>
142 <ol>
143
144 <span class="types"><span class="type">number</span></span>
145 float equivalent, if a valid value was recognized
146 </ol>
147 <h3>Or</h3>
148 <ol>
149
150 <span class="types"><span class="type">nil</span></span>
151 otherwise, nil
152 </ol>
153
154
155
156 <h3>Usage:</h3>
157 <ul>
158 <pre class="example">maybe_float = explicit.float(tagarg)</pre>
159 </ul>
160
161 </dd>
162 <dt>
163 <a name = "int"></a>
164 <strong>int (value)</strong>
165 </dt>
166 <dd>
167 Parse the value following an explicit <code>!!int</code> tag.
168
169
170 <h3>Parameters:</h3>
171 <ul>
172 <li><span class="parameter">value</span>
173 token
174 </li>
175 </ul>
176
177 <h3>Returns:</h3>
178 <ol>
179
180 <span class="types"><a class="type" href="../modules/lyaml.explicit.html#int">int</a></span>
181 integer equivalent, if a valid value was recognized
182 </ol>
183 <h3>Or</h3>
184 <ol>
185
186 <span class="types"><span class="type">nil</span></span>
187 otherwise, nil
188 </ol>
189
190
191
192 <h3>Usage:</h3>
193 <ul>
194 <pre class="example">maybe_int = explicit.int(tagarg)</pre>
195 </ul>
196
197 </dd>
198 <dt>
199 <a name = "null"></a>
200 <strong>null ()</strong>
201 </dt>
202 <dd>
203 Parse an explicit <code>!!null</code> tag.
204
205
206
207 <h3>Returns:</h3>
208 <ol>
209
210 <span class="types"><span class="type">lyaml.null</span></span>
211
212
213
214 </ol>
215
216
217
218 <h3>Usage:</h3>
219 <ul>
220 <pre class="example">null = explicit.null(tagarg)</pre>
221 </ul>
222
223 </dd>
224 <dt>
225 <a name = "str"></a>
226 <strong>str (value)</strong>
227 </dt>
228 <dd>
229 Parse the value following an explicit <code>!!str</code> tag.
230
231
232 <h3>Parameters:</h3>
233 <ul>
234 <li><span class="parameter">value</span>
235 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
236 token
237 </li>
238 </ul>
239
240 <h3>Returns:</h3>
241 <ol>
242
243 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
244 <em>value</em> which was a string already
245 </ol>
246
247
248
249 <h3>Usage:</h3>
250 <ul>
251 <pre class="example">tagarg = explicit.str(tagarg)</pre>
252 </ul>
253
254 </dd>
255 </dl>
256
257
258 </div> <!-- id="content" -->
259 </div> <!-- id="main" -->
260 <div id="about">
261 <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
262 <i style="float:right;">Last updated 2022-10-22 17:12:03 </i>
263 </div> <!-- id="about" -->
264 </div> <!-- id="container" -->
265 </body>
266 </html>
+0
-236
doc/modules/lyaml.functional.html less more
0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
1 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html>
3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
4 <head>
5 <title>lyaml 6.2.8 Reference</title>
6 <link rel="stylesheet" href="../ldoc.css" type="text/css" />
7 </head>
8 <body>
9
10 <div id="container">
11
12 <div id="product">
13 <div id="product_logo"></div>
14 <div id="product_name"><big><b></b></big></div>
15 <div id="product_description"></div>
16 </div> <!-- id="product" -->
17
18
19 <div id="main">
20
21
22 <!-- Menu -->
23
24 <div id="navigation">
25 <br/>
26 <h1>lyaml 6.2.8</h1>
27
28 <ul>
29 <li><a href="../index.html">Index</a></li>
30 </ul>
31
32 <h2>Contents</h2>
33 <ul>
34 <li><a href="#Functions">Functions</a></li>
35 <li><a href="#Tables">Tables</a></li>
36 </ul>
37
38
39 <h2>Modules</h2>
40 <ul class="nowrap">
41 <li><a href="../modules/lyaml.html">lyaml</a></li>
42 <li><a href="../modules/lyaml.explicit.html">lyaml.explicit</a></li>
43 <li><strong>lyaml.functional</strong></li>
44 <li><a href="../modules/lyaml.implicit.html">lyaml.implicit</a></li>
45 </ul>
46
47 </div>
48
49 <div id="content">
50
51 <h1>Module <code>lyaml.functional</code></h1>
52 <p>
53
54 </p>
55 <p>
56
57 </p>
58
59
60 <h2><a href="#Functions">Functions</a></h2>
61 <table class="function_list">
62 <tr>
63 <td class="name" nowrap><a href="#isnull">isnull (x)</a></td>
64 <td class="summary"><code>lyaml.null</code> predicate.</td>
65 </tr>
66 <tr>
67 <td class="name" nowrap><a href="#iscallable">iscallable (x)</a></td>
68 <td class="summary">Callable predicate.</td>
69 </tr>
70 <tr>
71 <td class="name" nowrap><a href="#anyof">anyof (fns)</a></td>
72 <td class="summary">Compose a function to try each callable with supplied args.</td>
73 </tr>
74 <tr>
75 <td class="name" nowrap><a href="#id">id (...)</a></td>
76 <td class="summary">Return arguments unchanged.</td>
77 </tr>
78 </table>
79 <h2><a href="#Tables">Tables</a></h2>
80 <table class="function_list">
81 <tr>
82 <td class="name" nowrap><a href="#NULL">NULL</a></td>
83 <td class="summary"><code>lyaml.null</code> value.</td>
84 </tr>
85 </table>
86
87 <br/>
88 <br/>
89
90
91 <h2 class="section-header "><a name="Functions"></a>Functions</h2>
92
93 <dl class="function">
94 <dt>
95 <a name = "isnull"></a>
96 <strong>isnull (x)</strong>
97 </dt>
98 <dd>
99 <code>lyaml.null</code> predicate.
100
101
102 <h3>Parameters:</h3>
103 <ul>
104 <li><span class="parameter">x</span>
105 operand
106 </li>
107 </ul>
108
109 <h3>Returns:</h3>
110 <ol>
111
112 <span class="types"><span class="type">bool</span></span>
113 <code>true</code> if <em>x</em> is <code>lyaml.null</code>.
114 </ol>
115
116
117
118
119 </dd>
120 <dt>
121 <a name = "iscallable"></a>
122 <strong>iscallable (x)</strong>
123 </dt>
124 <dd>
125 Callable predicate.
126
127
128 <h3>Parameters:</h3>
129 <ul>
130 <li><span class="parameter">x</span>
131 operand
132 </li>
133 </ul>
134
135 <h3>Returns:</h3>
136 <ol>
137
138 <span class="types"><span class="type">bool</span></span>
139 <code>true</code> if <em>x</em> is a function has a __call metamethod
140 </ol>
141
142
143
144 <h3>Usage:</h3>
145 <ul>
146 <pre class="example">r = iscallable(x) <span class="keyword">and</span> x(...)</pre>
147 </ul>
148
149 </dd>
150 <dt>
151 <a name = "anyof"></a>
152 <strong>anyof (fns)</strong>
153 </dt>
154 <dd>
155 Compose a function to try each callable with supplied args.
156
157
158 <h3>Parameters:</h3>
159 <ul>
160 <li><span class="parameter">fns</span>
161 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
162 list of functions to try
163 </li>
164 </ul>
165
166 <h3>Returns:</h3>
167 <ol>
168
169 <span class="types"><span class="type">function</span></span>
170
171 <p>a new function to call <em>...</em> functions, stopping</p>
172 <pre><code>and returning the first non-nil result, if any
173 </code></pre>
174
175 </ol>
176
177
178
179
180 </dd>
181 <dt>
182 <a name = "id"></a>
183 <strong>id (...)</strong>
184 </dt>
185 <dd>
186 Return arguments unchanged.
187
188
189 <h3>Parameters:</h3>
190 <ul>
191 <li><span class="parameter">...</span>
192 arguments
193 </li>
194 </ul>
195
196 <h3>Returns:</h3>
197 <ol>
198
199 <em>...</em>
200 </ol>
201
202
203
204
205 </dd>
206 </dl>
207 <h2 class="section-header "><a name="Tables"></a>Tables</h2>
208
209 <dl class="function">
210 <dt>
211 <a name = "NULL"></a>
212 <strong>NULL</strong>
213 </dt>
214 <dd>
215 <code>lyaml.null</code> value.
216
217
218
219
220
221
222
223 </dd>
224 </dl>
225
226
227 </div> <!-- id="content" -->
228 </div> <!-- id="main" -->
229 <div id="about">
230 <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
231 <i style="float:right;">Last updated 2022-10-22 17:12:03 </i>
232 </div> <!-- id="about" -->
233 </div> <!-- id="container" -->
234 </body>
235 </html>
+0
-224
doc/modules/lyaml.html less more
0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
1 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html>
3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
4 <head>
5 <title>lyaml 6.2.8 Reference</title>
6 <link rel="stylesheet" href="../ldoc.css" type="text/css" />
7 </head>
8 <body>
9
10 <div id="container">
11
12 <div id="product">
13 <div id="product_logo"></div>
14 <div id="product_name"><big><b></b></big></div>
15 <div id="product_description"></div>
16 </div> <!-- id="product" -->
17
18
19 <div id="main">
20
21
22 <!-- Menu -->
23
24 <div id="navigation">
25 <br/>
26 <h1>lyaml 6.2.8</h1>
27
28 <ul>
29 <li><a href="../index.html">Index</a></li>
30 </ul>
31
32 <h2>Contents</h2>
33 <ul>
34 <li><a href="#Functions">Functions</a></li>
35 <li><a href="#Tables">Tables</a></li>
36 </ul>
37
38
39 <h2>Modules</h2>
40 <ul class="nowrap">
41 <li><strong>lyaml</strong></li>
42 <li><a href="../modules/lyaml.explicit.html">lyaml.explicit</a></li>
43 <li><a href="../modules/lyaml.functional.html">lyaml.functional</a></li>
44 <li><a href="../modules/lyaml.implicit.html">lyaml.implicit</a></li>
45 </ul>
46
47 </div>
48
49 <div id="content">
50
51 <h1>Module <code>lyaml</code></h1>
52 <p>
53
54 </p>
55 <p>
56
57 </p>
58
59
60 <h2><a href="#Functions">Functions</a></h2>
61 <table class="function_list">
62 <tr>
63 <td class="name" nowrap><a href="#dump">dump (documents[, opts])</a></td>
64 <td class="summary">Dump a list of Lua tables to an equivalent YAML stream.</td>
65 </tr>
66 <tr>
67 <td class="name" nowrap><a href="#load">load (s[, opts])</a></td>
68 <td class="summary">Load a YAML stream into a Lua table.</td>
69 </tr>
70 </table>
71 <h2><a href="#Tables">Tables</a></h2>
72 <table class="function_list">
73 <tr>
74 <td class="name" nowrap><a href="#dumper_opts">dumper_opts</a></td>
75 <td class="summary">Dump options table.</td>
76 </tr>
77 <tr>
78 <td class="name" nowrap><a href="#loader_opts">loader_opts</a></td>
79 <td class="summary">Load options table.</td>
80 </tr>
81 </table>
82
83 <br/>
84 <br/>
85
86
87 <h2 class="section-header "><a name="Functions"></a>Functions</h2>
88
89 <dl class="function">
90 <dt>
91 <a name = "dump"></a>
92 <strong>dump (documents[, opts])</strong>
93 </dt>
94 <dd>
95 Dump a list of Lua tables to an equivalent YAML stream.
96
97
98 <h3>Parameters:</h3>
99 <ul>
100 <li><span class="parameter">documents</span>
101 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
102 a sequence of Lua tables.
103 </li>
104 <li><span class="parameter">opts</span>
105 <span class="types"><span class="type">dumper_opts</span></span>
106 initialisation options
107 (<em>optional</em>)
108 </li>
109 </ul>
110
111 <h3>Returns:</h3>
112 <ol>
113
114 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
115 equivalest YAML stream
116 </ol>
117
118
119
120
121 </dd>
122 <dt>
123 <a name = "load"></a>
124 <strong>load (s[, opts])</strong>
125 </dt>
126 <dd>
127 Load a YAML stream into a Lua table.
128
129
130 <h3>Parameters:</h3>
131 <ul>
132 <li><span class="parameter">s</span>
133 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
134 YAML stream
135 </li>
136 <li><span class="parameter">opts</span>
137 <span class="types"><span class="type">loader_opts</span></span>
138 initialisation options
139 (<em>optional</em>)
140 </li>
141 </ul>
142
143 <h3>Returns:</h3>
144 <ol>
145
146 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
147 Lua table equivalent of stream <em>s</em>
148 </ol>
149
150
151
152
153 </dd>
154 </dl>
155 <h2 class="section-header "><a name="Tables"></a>Tables</h2>
156
157 <dl class="function">
158 <dt>
159 <a name = "dumper_opts"></a>
160 <strong>dumper_opts</strong>
161 </dt>
162 <dd>
163 Dump options table.
164
165
166 <h3>Fields:</h3>
167 <ul>
168 <li><span class="parameter">anchors</span>
169 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
170 map initial anchor names to values
171 </li>
172 <li><span class="parameter">implicit_scalar</span>
173 <span class="types"><span class="type">function</span></span>
174 parse implicit scalar values
175 </li>
176 </ul>
177
178
179
180
181
182 </dd>
183 <dt>
184 <a name = "loader_opts"></a>
185 <strong>loader_opts</strong>
186 </dt>
187 <dd>
188 Load options table.
189
190
191 <h3>Fields:</h3>
192 <ul>
193 <li><span class="parameter">all</span>
194 <span class="types"><span class="type">boolean</span></span>
195 load all documents from the stream
196 </li>
197 <li><span class="parameter">explicit_scalar</span>
198 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
199 map full tag-names to parser functions
200 </li>
201 <li><span class="parameter">implicit_scalar</span>
202 <span class="types"><span class="type">function</span></span>
203 parse implicit scalar values
204 </li>
205 </ul>
206
207
208
209
210
211 </dd>
212 </dl>
213
214
215 </div> <!-- id="content" -->
216 </div> <!-- id="main" -->
217 <div id="about">
218 <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
219 <i style="float:right;">Last updated 2022-10-22 17:12:03 </i>
220 </div> <!-- id="about" -->
221 </div> <!-- id="container" -->
222 </body>
223 </html>
+0
-533
doc/modules/lyaml.implicit.html less more
0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
1 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html>
3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
4 <head>
5 <title>lyaml 6.2.8 Reference</title>
6 <link rel="stylesheet" href="../ldoc.css" type="text/css" />
7 </head>
8 <body>
9
10 <div id="container">
11
12 <div id="product">
13 <div id="product_logo"></div>
14 <div id="product_name"><big><b></b></big></div>
15 <div id="product_description"></div>
16 </div> <!-- id="product" -->
17
18
19 <div id="main">
20
21
22 <!-- Menu -->
23
24 <div id="navigation">
25 <br/>
26 <h1>lyaml 6.2.8</h1>
27
28 <ul>
29 <li><a href="../index.html">Index</a></li>
30 </ul>
31
32 <h2>Contents</h2>
33 <ul>
34 <li><a href="#Functions">Functions</a></li>
35 </ul>
36
37
38 <h2>Modules</h2>
39 <ul class="nowrap">
40 <li><a href="../modules/lyaml.html">lyaml</a></li>
41 <li><a href="../modules/lyaml.explicit.html">lyaml.explicit</a></li>
42 <li><a href="../modules/lyaml.functional.html">lyaml.functional</a></li>
43 <li><strong>lyaml.implicit</strong></li>
44 </ul>
45
46 </div>
47
48 <div id="content">
49
50 <h1>Module <code>lyaml.implicit</code></h1>
51 <p>
52
53 </p>
54 <p>
55
56 </p>
57
58
59 <h2><a href="#Functions">Functions</a></h2>
60 <table class="function_list">
61 <tr>
62 <td class="name" nowrap><a href="#null">null (value)</a></td>
63 <td class="summary">Parse a null token to a null value.</td>
64 </tr>
65 <tr>
66 <td class="name" nowrap><a href="#bool">bool (value)</a></td>
67 <td class="summary">Parse a boolean token to the equivalent value.</td>
68 </tr>
69 <tr>
70 <td class="name" nowrap><a href="#binary">binary (value)</a></td>
71 <td class="summary">Parse a binary token, such as '0b1010_0111_0100_1010_1110'.</td>
72 </tr>
73 <tr>
74 <td class="name" nowrap><a href="#octal">octal (value)</a></td>
75 <td class="summary">Parse an octal token, such as '012345'.</td>
76 </tr>
77 <tr>
78 <td class="name" nowrap><a href="#decimal">decimal (value)</a></td>
79 <td class="summary">Parse a decimal token, such as '0' or '12345'.</td>
80 </tr>
81 <tr>
82 <td class="name" nowrap><a href="#hexadecimal">hexadecimal (value)</a></td>
83 <td class="summary">Parse a hexadecimal token, such as '0xdeadbeef'.</td>
84 </tr>
85 <tr>
86 <td class="name" nowrap><a href="#sexagesimal">sexagesimal (value)</a></td>
87 <td class="summary">Parse a sexagesimal token, such as '190:20:30'.</td>
88 </tr>
89 <tr>
90 <td class="name" nowrap><a href="#nan">nan (value)</a></td>
91 <td class="summary">Parse a <code>nan</code> token.</td>
92 </tr>
93 <tr>
94 <td class="name" nowrap><a href="#inf">inf (value)</a></td>
95 <td class="summary">Parse a signed <code>inf</code> token.</td>
96 </tr>
97 <tr>
98 <td class="name" nowrap><a href="#float">float (value)</a></td>
99 <td class="summary">Parse a floating point number token, such as '1e-3' or '-0.12'.</td>
100 </tr>
101 <tr>
102 <td class="name" nowrap><a href="#sexfloat">sexfloat (value)</a></td>
103 <td class="summary">Parse a sexagesimal float, such as '190:20:30.15'.</td>
104 </tr>
105 </table>
106
107 <br/>
108 <br/>
109
110
111 <h2 class="section-header "><a name="Functions"></a>Functions</h2>
112
113 <dl class="function">
114 <dt>
115 <a name = "null"></a>
116 <strong>null (value)</strong>
117 </dt>
118 <dd>
119 Parse a null token to a null value.
120
121
122 <h3>Parameters:</h3>
123 <ul>
124 <li><span class="parameter">value</span>
125 token
126 </li>
127 </ul>
128
129 <h3>Returns:</h3>
130 <ol>
131
132 lyaml.null, for an empty string or literal ~
133 </ol>
134 <h3>Or</h3>
135 <ol>
136
137 nil otherwise, nil
138 </ol>
139
140
141
142 <h3>Usage:</h3>
143 <ul>
144 <pre class="example">maybe_null = implicit.null(token)</pre>
145 </ul>
146
147 </dd>
148 <dt>
149 <a name = "bool"></a>
150 <strong>bool (value)</strong>
151 </dt>
152 <dd>
153 Parse a boolean token to the equivalent value.
154 Treats capilalized, lower and upper-cased variants of true/false,
155 yes/no or on/off tokens as boolean <code>true</code> and <code>false</code> values.
156
157
158 <h3>Parameters:</h3>
159 <ul>
160 <li><span class="parameter">value</span>
161 token
162 </li>
163 </ul>
164
165 <h3>Returns:</h3>
166 <ol>
167
168 <span class="types"><a class="type" href="../modules/lyaml.implicit.html#bool">bool</a></span>
169 if a valid boolean token was recognized
170 </ol>
171 <h3>Or</h3>
172 <ol>
173
174 <span class="types"><span class="type">nil</span></span>
175 otherwise, nil
176 </ol>
177
178
179
180 <h3>Usage:</h3>
181 <ul>
182 <pre class="example">maybe_bool = implicit.bool(token)</pre>
183 </ul>
184
185 </dd>
186 <dt>
187 <a name = "binary"></a>
188 <strong>binary (value)</strong>
189 </dt>
190 <dd>
191 Parse a binary token, such as '0b1010_0111_0100_1010_1110'.
192
193
194 <h3>Parameters:</h3>
195 <ul>
196 <li><span class="parameter">value</span>
197 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
198 token
199 </li>
200 </ul>
201
202 <h3>Returns:</h3>
203 <ol>
204
205 <span class="types"><span class="type">int</span></span>
206 integer equivalent, if a valid token was recognized
207 </ol>
208 <h3>Or</h3>
209 <ol>
210
211 <span class="types"><span class="type">nil</span></span>
212 otherwise, nil
213 </ol>
214
215
216
217 <h3>Usage:</h3>
218 <ul>
219 <pre class="example">maybe_int = implicit.binary(value)</pre>
220 </ul>
221
222 </dd>
223 <dt>
224 <a name = "octal"></a>
225 <strong>octal (value)</strong>
226 </dt>
227 <dd>
228 Parse an octal token, such as '012345'.
229
230
231 <h3>Parameters:</h3>
232 <ul>
233 <li><span class="parameter">value</span>
234 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
235 token
236 </li>
237 </ul>
238
239 <h3>Returns:</h3>
240 <ol>
241
242 <span class="types"><span class="type">int</span></span>
243 integer equivalent, if a valid token was recognized
244 </ol>
245 <h3>Or</h3>
246 <ol>
247
248 <span class="types"><span class="type">nil</span></span>
249 otherwise, nil
250 </ol>
251
252
253
254 <h3>Usage:</h3>
255 <ul>
256 <pre class="example">maybe_int = implicit.octal(value)</pre>
257 </ul>
258
259 </dd>
260 <dt>
261 <a name = "decimal"></a>
262 <strong>decimal (value)</strong>
263 </dt>
264 <dd>
265 Parse a decimal token, such as '0' or '12345'.
266
267
268 <h3>Parameters:</h3>
269 <ul>
270 <li><span class="parameter">value</span>
271 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
272 token
273 </li>
274 </ul>
275
276 <h3>Returns:</h3>
277 <ol>
278
279 <span class="types"><span class="type">int</span></span>
280 integer equivalent, if a valid token was recognized
281 </ol>
282 <h3>Or</h3>
283 <ol>
284
285 <span class="types"><span class="type">nil</span></span>
286 otherwise, nil
287 </ol>
288
289
290
291 <h3>Usage:</h3>
292 <ul>
293 <pre class="example">maybe_int = implicit.decimal(value)</pre>
294 </ul>
295
296 </dd>
297 <dt>
298 <a name = "hexadecimal"></a>
299 <strong>hexadecimal (value)</strong>
300 </dt>
301 <dd>
302 Parse a hexadecimal token, such as '0xdeadbeef'.
303
304
305 <h3>Parameters:</h3>
306 <ul>
307 <li><span class="parameter">value</span>
308 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
309 token
310 </li>
311 </ul>
312
313 <h3>Returns:</h3>
314 <ol>
315
316 <span class="types"><span class="type">int</span></span>
317 integer equivalent, if a valid token was recognized
318 </ol>
319 <h3>Or</h3>
320 <ol>
321
322 <span class="types"><span class="type">nil</span></span>
323 otherwise, nil
324 </ol>
325
326
327
328 <h3>Usage:</h3>
329 <ul>
330 <pre class="example">maybe_int = implicit.hexadecimal(value)</pre>
331 </ul>
332
333 </dd>
334 <dt>
335 <a name = "sexagesimal"></a>
336 <strong>sexagesimal (value)</strong>
337 </dt>
338 <dd>
339 Parse a sexagesimal token, such as '190:20:30'.
340 Useful for times and angles.
341
342
343 <h3>Parameters:</h3>
344 <ul>
345 <li><span class="parameter">value</span>
346 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
347 token
348 </li>
349 </ul>
350
351 <h3>Returns:</h3>
352 <ol>
353
354 <span class="types"><span class="type">int</span></span>
355 integer equivalent, if a valid token was recognized
356 </ol>
357 <h3>Or</h3>
358 <ol>
359
360 <span class="types"><span class="type">nil</span></span>
361 otherwise, nil
362 </ol>
363
364
365
366 <h3>Usage:</h3>
367 <ul>
368 <pre class="example">maybe_int = implicit.sexagesimal(value)</pre>
369 </ul>
370
371 </dd>
372 <dt>
373 <a name = "nan"></a>
374 <strong>nan (value)</strong>
375 </dt>
376 <dd>
377 Parse a <code>nan</code> token.
378
379
380 <h3>Parameters:</h3>
381 <ul>
382 <li><span class="parameter">value</span>
383 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
384 token
385 </li>
386 </ul>
387
388 <h3>Returns:</h3>
389 <ol>
390
391 <span class="types"><a class="type" href="../modules/lyaml.implicit.html#nan">nan</a></span>
392 not-a-number, if a valid token was recognized
393 </ol>
394 <h3>Or</h3>
395 <ol>
396
397 <span class="types"><span class="type">nil</span></span>
398 otherwise, nil
399 </ol>
400
401
402
403 <h3>Usage:</h3>
404 <ul>
405 <pre class="example">maybe_nan = implicit.nan(value)</pre>
406 </ul>
407
408 </dd>
409 <dt>
410 <a name = "inf"></a>
411 <strong>inf (value)</strong>
412 </dt>
413 <dd>
414 Parse a signed <code>inf</code> token.
415
416
417 <h3>Parameters:</h3>
418 <ul>
419 <li><span class="parameter">value</span>
420 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
421 token
422 </li>
423 </ul>
424
425 <h3>Returns:</h3>
426 <ol>
427
428 <span class="types"><span class="type">number</span></span>
429 plus/minus-infinity, if a valid token was recognized
430 </ol>
431 <h3>Or</h3>
432 <ol>
433
434 <span class="types"><span class="type">nil</span></span>
435 otherwise, nil
436 </ol>
437
438
439
440 <h3>Usage:</h3>
441 <ul>
442 <pre class="example">maybe_inf = implicit.inf(value)</pre>
443 </ul>
444
445 </dd>
446 <dt>
447 <a name = "float"></a>
448 <strong>float (value)</strong>
449 </dt>
450 <dd>
451 Parse a floating point number token, such as '1e-3' or '-0.12'.
452
453
454 <h3>Parameters:</h3>
455 <ul>
456 <li><span class="parameter">value</span>
457 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
458 token
459 </li>
460 </ul>
461
462 <h3>Returns:</h3>
463 <ol>
464
465 <span class="types"><span class="type">number</span></span>
466 float equivalent, if a valid token was recognized
467 </ol>
468 <h3>Or</h3>
469 <ol>
470
471 <span class="types"><span class="type">nil</span></span>
472 otherwise, nil
473 </ol>
474
475
476
477 <h3>Usage:</h3>
478 <ul>
479 <pre class="example">maybe_float = implicit.float(value)</pre>
480 </ul>
481
482 </dd>
483 <dt>
484 <a name = "sexfloat"></a>
485 <strong>sexfloat (value)</strong>
486 </dt>
487 <dd>
488 Parse a sexagesimal float, such as '190:20:30.15'.
489 Useful for times and angles.
490
491
492 <h3>Parameters:</h3>
493 <ul>
494 <li><span class="parameter">value</span>
495 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
496 token
497 </li>
498 </ul>
499
500 <h3>Returns:</h3>
501 <ol>
502
503 <span class="types"><span class="type">number</span></span>
504 float equivalent, if a valid token was recognized
505 </ol>
506 <h3>Or</h3>
507 <ol>
508
509 <span class="types"><span class="type">nil</span></span>
510 otherwise, nil
511 </ol>
512
513
514
515 <h3>Usage:</h3>
516 <ul>
517 <pre class="example">maybe_float = implicit.sexfloat(value)</pre>
518 </ul>
519
520 </dd>
521 </dl>
522
523
524 </div> <!-- id="content" -->
525 </div> <!-- id="main" -->
526 <div id="about">
527 <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
528 <i style="float:right;">Last updated 2022-10-22 17:12:03 </i>
529 </div> <!-- id="about" -->
530 </div> <!-- id="container" -->
531 </body>
532 </html>
11 * emitter.c, LibYAML emitter binding for Lua
22 * Written by Gary V. Vaughan, 2013
33 *
4 * Copyright (C) 2013-2022 Gary V. Vaughan
4 * Copyright (C) 2013-2023 Gary V. Vaughan
55 *
66 * Permission is hereby granted, free of charge, to any person obtaining a copy
77 * of this software and associated documentation files (the "Software"), to deal
11 * lyaml.h, libyaml parser binding for Lua
22 * Written by Gary V. Vaughan, 2013
33 *
4 * Copyright (C) 2013-2022 Gary V. Vaughan
4 * Copyright (C) 2013-2023 Gary V. Vaughan
55 *
66 * Permission is hereby granted, free of charge, to any person obtaining a copy
77 * of this software and associated documentation files (the "Software"), to deal
11 * parser.c, libyaml parser binding for Lua
22 * Written by Gary V. Vaughan, 2013
33 *
4 * Copyright (C) 2013-2022 Gary V. Vaughan
4 * Copyright (C) 2013-2023 Gary V. Vaughan
55 *
66 * Permission is hereby granted, free of charge, to any person obtaining a copy
77 * of this software and associated documentation files (the "Software"), to deal
11 * scanner.c, libyaml scanner binding for Lua
22 * Written by Gary V. Vaughan, 2013
33 *
4 * Copyright (C) 2013-2022 Gary V. Vaughan
4 * Copyright (C) 2013-2023 Gary V. Vaughan
55 *
66 * Permission is hereby granted, free of charge, to any person obtaining a copy
77 * of this software and associated documentation files (the "Software"), to deal
11 * yaml.c, LibYAML binding for Lua
22 * Written by Andrew Danforth, 2009
33 *
4 * Copyright (C) 2014-2022 Gary V. Vaughan
4 * Copyright (C) 2014-2023 Gary V. Vaughan
55 * Copyright (C) 2009 Andrew Danforth
66 *
77 * Permission is hereby granted, free of charge, to any person obtaining a copy
00 -- LYAML parse explicit token values.
11 -- Written by Gary V. Vaughan, 2015
22 --
3 -- Copyright(C) 2015-2022 Gary V. Vaughan
3 -- Copyright(C) 2015-2023 Gary V. Vaughan
44 --
55 -- Permission is hereby granted, free of charge, to any person obtaining
66 -- a copy of this software and associated documentation files(the
00 -- Minimal functional programming utilities.
11 -- Written by Gary V. Vaughan, 2015
22 --
3 -- Copyright(C) 2015-2022 Gary V. Vaughan
3 -- Copyright(C) 2015-2023 Gary V. Vaughan
44 --
55 -- Permission is hereby granted, free of charge, to any person obtaining
66 -- a copy of this software and associated documentation files(the
00 -- LYAML parse implicit type tokens.
11 -- Written by Gary V. Vaughan, 2015
22 --
3 -- Copyright(C) 2015-2022 Gary V. Vaughan
3 -- Copyright(C) 2015-2023 Gary V. Vaughan
44 --
55 -- Permission is hereby granted, free of charge, to any person obtaining
66 -- a copy of this software and associated documentation files(the
00 -- Transform between YAML 1.1 streams and Lua table representations.
11 -- Written by Gary V. Vaughan, 2013
22 --
3 -- Copyright(C) 2013-2022 Gary V. Vaughan
3 -- Copyright(C) 2013-2023 Gary V. Vaughan
44 --
55 -- Permission is hereby granted, free of charge, to any person obtaining
66 -- a copy of this software and associated documentation files(the
00 --[[
11 LYAML binding for Lua 5.1, 5.2, 5.3 & 5.4
2 Copyright (C) 2013-2022 Gary V. Vaughan
2 Copyright (C) 2013-2023 Gary V. Vaughan
33 ]]
44
55 package = 'lyaml'
+0
-59
lyaml-6.2.8-1.rockspec less more
0 local _MODREV, _SPECREV = '6.2.8', '-1'
1
2 package = 'lyaml'
3 version = _MODREV .. _SPECREV
4
5 description = {
6 summary = 'libYAML binding for Lua',
7 detailed = 'Read and write YAML format files with Lua.',
8 homepage = 'http://github.com/gvvaughan/lyaml',
9 license = 'MIT/X11',
10 }
11
12 source = {
13 url = 'http://github.com/gvvaughan/lyaml/archive/v' .. _MODREV .. '.zip',
14 dir = 'lyaml-' .. _MODREV,
15 }
16
17 dependencies = {
18 'lua >= 5.1, < 5.5',
19 }
20
21 external_dependencies = {
22 YAML = {
23 library = 'yaml',
24 },
25 }
26
27 build = {
28 type = 'command',
29 build_command = '$(LUA) build-aux/luke'
30 .. ' package="' .. package .. '"'
31 .. ' version="' .. _MODREV .. '"'
32 .. ' PREFIX="$(PREFIX)"'
33 .. ' CFLAGS="$(CFLAGS)"'
34 .. ' LIBFLAG="$(LIBFLAG)"'
35 .. ' LIB_EXTENSION="$(LIB_EXTENSION)"'
36 .. ' OBJ_EXTENSION="$(OBJ_EXTENSION)"'
37 .. ' LUA="$(LUA)"'
38 .. ' LUA_DIR="$(LUADIR)"'
39 .. ' LUA_INCDIR="$(LUA_INCDIR)"'
40 .. ' YAML_DIR="$(YAML_DIR)"'
41 .. ' YAML_INCDIR="$(YAML_INCDIR)"'
42 .. ' YAML_LIBDIR="$(YAML_LIBDIR)"'
43 ,
44 install_command = '$(LUA) build-aux/luke install --quiet'
45 .. ' INST_LIBDIR="$(LIBDIR)"'
46 .. ' INST_LUADIR="$(LUADIR)"'
47 ,
48 copy_directories = {'doc'},
49 }
50
51 if _MODREV == 'git' then
52 build.copy_directories = nil
53
54 source = {
55 url = 'git://github.com/gvvaughan/lyaml.git',
56 }
57 end
58
0 local _MODREV, _SPECREV = 'git', '-1'
1
2 package = 'lyaml'
3 version = _MODREV .. _SPECREV
4
5 description = {
6 summary = 'libYAML binding for Lua',
7 detailed = 'Read and write YAML format files with Lua.',
8 homepage = 'http://github.com/gvvaughan/lyaml',
9 license = 'MIT/X11',
10 }
11
12 source = {
13 url = 'http://github.com/gvvaughan/lyaml/archive/v' .. _MODREV .. '.zip',
14 dir = 'lyaml-' .. _MODREV,
15 }
16
17 dependencies = {
18 'lua >= 5.1, < 5.5',
19 }
20
21 external_dependencies = {
22 YAML = {
23 library = 'yaml',
24 },
25 }
26
27 build = {
28 type = 'command',
29 build_command = '$(LUA) build-aux/luke'
30 .. ' package="' .. package .. '"'
31 .. ' version="' .. _MODREV .. '"'
32 .. ' PREFIX="$(PREFIX)"'
33 .. ' CFLAGS="$(CFLAGS)"'
34 .. ' LIBFLAG="$(LIBFLAG)"'
35 .. ' LIB_EXTENSION="$(LIB_EXTENSION)"'
36 .. ' OBJ_EXTENSION="$(OBJ_EXTENSION)"'
37 .. ' LUA="$(LUA)"'
38 .. ' LUA_DIR="$(LUADIR)"'
39 .. ' LUA_INCDIR="$(LUA_INCDIR)"'
40 .. ' YAML_DIR="$(YAML_DIR)"'
41 .. ' YAML_INCDIR="$(YAML_INCDIR)"'
42 .. ' YAML_LIBDIR="$(YAML_LIBDIR)"'
43 ,
44 install_command = '$(LUA) build-aux/luke install --quiet'
45 .. ' INST_LIBDIR="$(LIBDIR)"'
46 .. ' INST_LUADIR="$(LUADIR)"'
47 ,
48 copy_directories = {'doc'},
49 }
50
51 if _MODREV == 'git' then
52 build.copy_directories = nil
53
54 source = {
55 url = 'git://github.com/gvvaughan/lyaml.git',
56 }
57 end
58
00 # LYAML binding for Lua 5.1, 5.2, 5.3 & 5.4
1 # Copyright (C) 2013-2022 Gary V. Vaughan
1 # Copyright (C) 2013-2023 Gary V. Vaughan
22
33 specify emitting:
44 - it diagnoses an invalid event:
00 # LYAML binding for Lua 5.1, 5.2, 5.3 & 5.4
1 # Copyright (C) 2013-2022 Gary V. Vaughan
1 # Copyright (C) 2013-2023 Gary V. Vaughan
22
33 specify parsing:
44 - it parses empty streams:
00 # LYAML binding for Lua 5.1, 5.2, 5.3 & 5.4
1 # Copyright (C) 2013-2022 Gary V. Vaughan
1 # Copyright (C) 2013-2023 Gary V. Vaughan
22
33 before:
44 function consume (n, str)
00 # LYAML binding for Lua 5.1, 5.2, 5.3 & 5.4
1 # Copyright (C) 2013-2022 Gary V. Vaughan
1 # Copyright (C) 2013-2023 Gary V. Vaughan
22
33 before:
44 this_module = 'lyaml.functional'
00 # LYAML binding for Lua 5.1, 5.2, 5.3 & 5.4
1 # Copyright (C) 2013-2022 Gary V. Vaughan
1 # Copyright (C) 2013-2023 Gary V. Vaughan
22
33 before: |
44 lyaml = require "lyaml"
00 --[[
11 LYAML binding for Lua 5.1, 5.2, 5.3 & 5.4
2 Copyright (C) 2013-2022 Gary V. Vaughan
2 Copyright (C) 2013-2023 Gary V. Vaughan
33 ]]
44
55 do