Codebase list lua-yaml / 568ffdf
Update upstream source from tag 'upstream/6.2.8' Update to upstream version '6.2.8' with Debian dir 1c6a6702c0186429df0c358ea7c2025319ee1371 Victor Seva 1 year, 6 months ago
30 changed file(s) with 193 addition(s) and 161 deletion(s). Raw diff Collapse all Expand all
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
-36
.travis.yml less more
0 language: python
1
2 sudo: false
3
4 env:
5 matrix:
6 - VLUA="lua=5.4"
7 - VLUA="lua=5.3"
8 - VLUA="lua=5.2"
9 - VLUA="lua=5.1"
10 - VLUA="luajit=2.1"
11 - VLUA="luajit=2.0"
12
13 before_install:
14 - pip install hererocks
15 - hererocks here --luarocks 3 --$VLUA --patch
16 - export PATH=$PWD/here/bin:$PATH
17
18 - hererocks tools --luajit=2.0
19 - export PATH=$PATH:$PWD/here/bin
20
21 install:
22 - luarocks --lua-dir=$PWD/tools --tree=$PWD/tools install ldoc
23 - luarocks --lua-dir=$PWD/tools --tree=$PWD/tools install luacov
24 - luarocks install ansicolors
25
26 script:
27 - luarocks make --force
28 - luarocks install specl
29 - specl -vfreport --coverage spec/*_spec.yaml
30
31 after_success:
32 - bash <(curl -s https://codecov.io/bash) -f luacov.report.out
33
34 notifications:
35 slack: aspirinc:JyWeNrIdS0J5nf2Pn2BS1cih
33 unless noted otherwise in the body of that file.
44
55 ====================================================================
6 Copyright (C) 2013-2020 Gary V. Vaughan
6 Copyright (C) 2013-2022 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 6.2.8 (2022-10-22) [stable]
3
4 ### Bug fixes
5
6 - `luke` no longer crashes in `std.normalize` require loops
7 occasionally in Lua 5.4.
8
9 - lyaml emitter no longer leaks at least six bytes for every
10 map, sequence and scalar emitted.
11
112
213 ## Noteworthy changes in release 6.2.7 (2020-11-27) [stable]
314
00 LYAML
11 =====
22
3 Copyright (C) 2013-2020 Gary V. Vaughan
3 Copyright (C) 2013-2022 Gary V. Vaughan
44
55 [![License](https://img.shields.io/:license-mit-blue.svg)](https://mit-license.org)
6 [![travis-ci status](https://secure.travis-ci.org/gvvaughan/lyaml.png?branch=release-v6.2.7)](http://travis-ci.org/gvvaughan/lyaml/builds)
7 [![codecov.io](https://codecov.io/github/gvvaughan/lyaml/coverage.svg?branch=release-v6.2.7)](https://codecov.io/github/gvvaughan/lyaml?branch=release-v6.2.7)
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)
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-2020 Gary V. Vaughan
2 Copyright (C) 2013-2022 Gary V. Vaughan
33 ]]
44
55 title = '@package@ @version@ Reference'
1616 end
1717 package.preload['luke.cli']=function()
1818 local _ENV=require'std.normalize'{'luke._base','luke.lukefile','luke.platforms','std.functional',}local function version()print[[
19 luke (Luke) 0.2.1
19 luke (Luke) 0.2.3
2020 Written by Gary V. Vaughan <gary@gnu.org>, 2014
2121
22 Copyright (C) 2020, Gary V. Vaughan
22 Copyright (C) 2022, Gary V. Vaughan
2323 Luke comes with ABSOLUTELY NO WARRANTY.
2424 You may redistribute copies of Luke under the terms of the MIT license;
2525 it may be used for any purpose at absolutely no cost, without permission.
134134 end)end)L.log(found and'found '..found or prog..' not found')return found~=nil
135135 end
136136 local function check_header_compile(L,env,config,header,extra_hdrs)return with(CTest(),function(conftest)conftest:write(format('%s\n#include "%s"\n',extra_hdrs,header))return logspawn(L,env,compile_command(L,env,config,conftest.filename))end)end
137 local function check_struct_member_compile(L,env,config,structname,member,extra_hdrs)return with(CTest(),function(conftest)conftest:write(format([[
138 %s
139 int main () {
140 static %s aggr;
141 if (sizeof aggr.%s)
142 return 0;
143 return 0;
144 }
145 ]],extra_hdrs,structname,member))return logspawn(L,env,compile_command(L,env,config,conftest.filename))end)end
137146 local function try_link(L,env,config,lib,symbol)return with(CTest(),TmpFile(),function(conftest,a_out)conftest:write(format([[
138147 /* Override any GCC internal prototype to avoid an error.
139148 Use char because int might match the return type of a GCC
224233 CONFIGENV.libs=lib..CONFIGENV.libs
225234 end
226235 return found_library(L,lib)end
227 end)or call(function()L.verbose'\n'fatal("required symbol '%s' not found in any of libc, lib%s",symbol,concat(libraries,', lib'))end)end},{checkfunc=function(L,env,config)checking(L,'for',config.checkfunc)return found_result(L,check_func_link(L,env,config,config.checkfunc))end}),{__call=function(self,L,env,config,prefix)return case(type(config),{['number']=function()return str(config)end,['string']=function()return config
236 end)or call(function()L.verbose'\n'fatal("required symbol '%s' not found in any of libc, lib%s",symbol,concat(libraries,', lib'))end)end},{checkfunc=function(L,env,config)checking(L,'for',config.checkfunc)return found_result(L,check_func_link(L,env,config,config.checkfunc))end},{checkmember=function(L,env,config)checking(L,'for',config.checkmember)local extra_hdrs=concat(format_includes(config.includes),'\n')local i=find(config.checkmember,'%.')local structname=sub(config.checkmember,1,i-1)local member=sub(config.checkmember,i+1)return found_result(L,check_struct_member_compile(L,env,config,structname,member,extra_hdrs))end}),{__call=function(self,L,env,config,prefix)return case(type(config),{['number']=function()return str(config)end,['string']=function()return config
228237 end,['table']=function()return dropuntil(self,function(fname)if config[fname]~=nil then
229238 add_external_deps(env,config,prefix)return apply(self[fname],list(L,env,config))end
230239 end)or fatal("unable to configure with keys '%s'",concat(keys(config),"', '"))end,function(type)fatal("unsupported configure type '%s'",type)end,})end,})return{config_compiler=function(L,env)local CC=env.CC
587596 return setmetatable({append=function(seq,v)local n=(int(seq.n)or len(seq))+1
588597 seq.n,seq[n]=n,v
589598 return seq
590 end,arg=arg,assert=assert,char=string.char,close=io.close,concat=concat,copy=copy,dirsep=dirsep,exit=os.exit,format=string.format,getenv=os.getenv,getmetatable=getmetatable,getmetamethod=getmetamethod,gmatch=string.gmatch,gsub=string.gsub,int=int,iscallable=iscallable,len=len,lines=io.lines,list=pack,loadstring=loadstring,match=string.match,maxn=function(iterable)local n=0
599 end,arg=arg,assert=assert,char=string.char,close=io.close,concat=concat,copy=copy,dirsep=dirsep,exit=os.exit,find=string.find,format=string.format,getenv=os.getenv,getmetatable=getmetatable,getmetamethod=getmetamethod,gmatch=string.gmatch,gsub=string.gsub,int=int,iscallable=iscallable,len=len,lines=io.lines,list=pack,loadstring=loadstring,match=string.match,maxn=function(iterable)local n=0
591600 for k,v in next,iterable or{}do
592601 local i=int(k)if i and i>n then
593602 n=i
607616 end,popen=io.popen,print=print,rawget=rawget,rawset=rawset,rep=string.rep,rm=os.remove,select=select,setmetatable=setmetatable,sort=sort,stderr=io.stderr,stdout=io.stdout,str=str,sub=string.sub,tmpname=os.tmpname,tonumber=tonumber,type=type,unpack=function(seq,i,j)return unpack(seq,int(i)or 1,int(j)or int(seq.n)or len(seq))end,write=io.write,},{__call=function(self,env,level)local userenv,level=copy(self),level or 1
608617 for name,value in next,env do
609618 if int(name)and type(value)=='string'then
610 for k,v in next,require(value)do
619 for k,v in next,(require(value))do
611620 userenv[k]=userenv[k]or v
612621 end
613622 else
22 <html>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
44 <head>
5 <title>lyaml 6.2.7 Reference</title>
5 <title>lyaml 6.2.8 Reference</title>
66 <link rel="stylesheet" href="ldoc.css" type="text/css" />
77 </head>
88 <body>
2323
2424 <div id="navigation">
2525 <br/>
26 <h1>lyaml 6.2.7</h1>
26 <h1>lyaml 6.2.8</h1>
2727
2828
2929
8989 </div> <!-- id="main" -->
9090 <div id="about">
9191 <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
92 <i style="float:right;">Last updated 2020-11-27 16:17:28 </i>
92 <i style="float:right;">Last updated 2022-10-22 17:12:03 </i>
9393 </div> <!-- id="about" -->
9494 </div> <!-- id="container" -->
9595 </body>
22 <html>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
44 <head>
5 <title>lyaml 6.2.7 Reference</title>
5 <title>lyaml 6.2.8 Reference</title>
66 <link rel="stylesheet" href="../ldoc.css" type="text/css" />
77 </head>
88 <body>
2323
2424 <div id="navigation">
2525 <br/>
26 <h1>lyaml 6.2.7</h1>
26 <h1>lyaml 6.2.8</h1>
2727
2828 <ul>
2929 <li><a href="../index.html">Index</a></li>
232232 <h3>Parameters:</h3>
233233 <ul>
234234 <li><span class="parameter">value</span>
235 <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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.3/manual.html#6.4">string</a></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>
244244 <em>value</em> which was a string already
245245 </ol>
246246
259259 </div> <!-- id="main" -->
260260 <div id="about">
261261 <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
262 <i style="float:right;">Last updated 2020-11-27 16:17:28 </i>
262 <i style="float:right;">Last updated 2022-10-22 17:12:03 </i>
263263 </div> <!-- id="about" -->
264264 </div> <!-- id="container" -->
265265 </body>
22 <html>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
44 <head>
5 <title>lyaml 6.2.7 Reference</title>
5 <title>lyaml 6.2.8 Reference</title>
66 <link rel="stylesheet" href="../ldoc.css" type="text/css" />
77 </head>
88 <body>
2323
2424 <div id="navigation">
2525 <br/>
26 <h1>lyaml 6.2.7</h1>
26 <h1>lyaml 6.2.8</h1>
2727
2828 <ul>
2929 <li><a href="../index.html">Index</a></li>
158158 <h3>Parameters:</h3>
159159 <ul>
160160 <li><span class="parameter">fns</span>
161 <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
161 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
162162 list of functions to try
163163 </li>
164164 </ul>
228228 </div> <!-- id="main" -->
229229 <div id="about">
230230 <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
231 <i style="float:right;">Last updated 2020-11-27 16:17:28 </i>
231 <i style="float:right;">Last updated 2022-10-22 17:12:03 </i>
232232 </div> <!-- id="about" -->
233233 </div> <!-- id="container" -->
234234 </body>
22 <html>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
44 <head>
5 <title>lyaml 6.2.7 Reference</title>
5 <title>lyaml 6.2.8 Reference</title>
66 <link rel="stylesheet" href="../ldoc.css" type="text/css" />
77 </head>
88 <body>
2323
2424 <div id="navigation">
2525 <br/>
26 <h1>lyaml 6.2.7</h1>
26 <h1>lyaml 6.2.8</h1>
2727
2828 <ul>
2929 <li><a href="../index.html">Index</a></li>
9898 <h3>Parameters:</h3>
9999 <ul>
100100 <li><span class="parameter">documents</span>
101 <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
101 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
102102 a sequence of Lua tables.
103103 </li>
104104 <li><span class="parameter">opts</span>
111111 <h3>Returns:</h3>
112112 <ol>
113113
114 <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
114 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
115115 equivalest YAML stream
116116 </ol>
117117
130130 <h3>Parameters:</h3>
131131 <ul>
132132 <li><span class="parameter">s</span>
133 <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
133 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
134134 YAML stream
135135 </li>
136136 <li><span class="parameter">opts</span>
143143 <h3>Returns:</h3>
144144 <ol>
145145
146 <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
146 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
147147 Lua table equivalent of stream <em>s</em>
148148 </ol>
149149
166166 <h3>Fields:</h3>
167167 <ul>
168168 <li><span class="parameter">anchors</span>
169 <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
169 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
170170 map initial anchor names to values
171171 </li>
172172 <li><span class="parameter">implicit_scalar</span>
195195 load all documents from the stream
196196 </li>
197197 <li><span class="parameter">explicit_scalar</span>
198 <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
198 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
199199 map full tag-names to parser functions
200200 </li>
201201 <li><span class="parameter">implicit_scalar</span>
216216 </div> <!-- id="main" -->
217217 <div id="about">
218218 <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
219 <i style="float:right;">Last updated 2020-11-27 16:17:28 </i>
219 <i style="float:right;">Last updated 2022-10-22 17:12:03 </i>
220220 </div> <!-- id="about" -->
221221 </div> <!-- id="container" -->
222222 </body>
22 <html>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
44 <head>
5 <title>lyaml 6.2.7 Reference</title>
5 <title>lyaml 6.2.8 Reference</title>
66 <link rel="stylesheet" href="../ldoc.css" type="text/css" />
77 </head>
88 <body>
2323
2424 <div id="navigation">
2525 <br/>
26 <h1>lyaml 6.2.7</h1>
26 <h1>lyaml 6.2.8</h1>
2727
2828 <ul>
2929 <li><a href="../index.html">Index</a></li>
194194 <h3>Parameters:</h3>
195195 <ul>
196196 <li><span class="parameter">value</span>
197 <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
197 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
198198 token
199199 </li>
200200 </ul>
231231 <h3>Parameters:</h3>
232232 <ul>
233233 <li><span class="parameter">value</span>
234 <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
234 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
235235 token
236236 </li>
237237 </ul>
268268 <h3>Parameters:</h3>
269269 <ul>
270270 <li><span class="parameter">value</span>
271 <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
271 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
272272 token
273273 </li>
274274 </ul>
305305 <h3>Parameters:</h3>
306306 <ul>
307307 <li><span class="parameter">value</span>
308 <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
308 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
309309 token
310310 </li>
311311 </ul>
343343 <h3>Parameters:</h3>
344344 <ul>
345345 <li><span class="parameter">value</span>
346 <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
346 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
347347 token
348348 </li>
349349 </ul>
380380 <h3>Parameters:</h3>
381381 <ul>
382382 <li><span class="parameter">value</span>
383 <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
383 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
384384 token
385385 </li>
386386 </ul>
417417 <h3>Parameters:</h3>
418418 <ul>
419419 <li><span class="parameter">value</span>
420 <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
420 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
421421 token
422422 </li>
423423 </ul>
454454 <h3>Parameters:</h3>
455455 <ul>
456456 <li><span class="parameter">value</span>
457 <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
457 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
458458 token
459459 </li>
460460 </ul>
492492 <h3>Parameters:</h3>
493493 <ul>
494494 <li><span class="parameter">value</span>
495 <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
495 <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
496496 token
497497 </li>
498498 </ul>
525525 </div> <!-- id="main" -->
526526 <div id="about">
527527 <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
528 <i style="float:right;">Last updated 2020-11-27 16:17:28 </i>
528 <i style="float:right;">Last updated 2022-10-22 17:12:03 </i>
529529 </div> <!-- id="about" -->
530530 </div> <!-- id="container" -->
531531 </body>
11 * emitter.c, LibYAML emitter binding for Lua
22 * Written by Gary V. Vaughan, 2013
33 *
4 * Copyright (C) 2013-2020 Gary V. Vaughan
4 * Copyright (C) 2013-2022 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
183183 }
184184 #undef MENTRY
185185
186 if (style) free ((void *) style);
187
186188 RAWGET_YAML_CHARP (anchor); lua_pop (L, 1);
187189 RAWGET_YAML_CHARP (tag); lua_pop (L, 1);
188190 RAWGET_BOOLEAN (implicit); lua_pop (L, 1);
225227 "invalid sequence style '%s'", style));
226228 }
227229 #undef MENTRY
230
231 if (style) free ((void *) style);
228232
229233 RAWGET_YAML_CHARP (anchor); lua_pop (L, 1);
230234 RAWGET_YAML_CHARP (tag); lua_pop (L, 1);
271275 "invalid scalar style '%s'", style));
272276 }
273277 #undef MENTRY
278
279 if (style) free ((void *) style);
274280
275281 RAWGET_YAML_CHARP (anchor); lua_pop (L, 1);
276282 RAWGET_YAML_CHARP (tag); lua_pop (L, 1);
11 * lyaml.h, libyaml parser binding for Lua
22 * Written by Gary V. Vaughan, 2013
33 *
4 * Copyright (C) 2013-2020 Gary V. Vaughan
4 * Copyright (C) 2013-2022 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-2020 Gary V. Vaughan
4 * Copyright (C) 2013-2022 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-2020 Gary V. Vaughan
4 * Copyright (C) 2013-2022 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-2020 Gary V. Vaughan
4 * Copyright (C) 2014-2022 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-2020 Gary V. Vaughan
3 -- Copyright(C) 2015-2022 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-2020 Gary V. Vaughan
3 -- Copyright(C) 2015-2022 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-2020 Gary V. Vaughan
3 -- Copyright(C) 2015-2022 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-2020 Gary V. Vaughan
3 -- Copyright(C) 2013-2022 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-2020 Gary V. Vaughan
2 Copyright (C) 2013-2022 Gary V. Vaughan
33 ]]
44
55 package = 'lyaml'
+0
-59
lyaml-6.2.7-1.rockspec less more
0 local _MODREV, _SPECREV = '6.2.7', '-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 = '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
00 # LYAML binding for Lua 5.1, 5.2, 5.3 & 5.4
1 # Copyright (C) 2013-2020 Gary V. Vaughan
1 # Copyright (C) 2013-2022 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-2020 Gary V. Vaughan
1 # Copyright (C) 2013-2022 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-2020 Gary V. Vaughan
1 # Copyright (C) 2013-2022 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-2020 Gary V. Vaughan
1 # Copyright (C) 2013-2022 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-2020 Gary V. Vaughan
1 # Copyright (C) 2013-2022 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-2020 Gary V. Vaughan
2 Copyright (C) 2013-2022 Gary V. Vaughan
33 ]]
44
55 do