summaryrefslogtreecommitdiff
path: root/macros/luatex/generic/luakeys/luakeys-doc.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-01-01 03:00:53 +0000
committerNorbert Preining <norbert@preining.info>2022-01-01 03:00:53 +0000
commit39877769ecfa442af71b4ddd1c266f401957cdd8 (patch)
tree06aaa106eb40b7e0b2ee91073f636bb5975e502c /macros/luatex/generic/luakeys/luakeys-doc.tex
parent2c09a813df08895666d3755db66718dcd501aee5 (diff)
CTAN sync 202201010300
Diffstat (limited to 'macros/luatex/generic/luakeys/luakeys-doc.tex')
-rw-r--r--macros/luatex/generic/luakeys/luakeys-doc.tex35
1 files changed, 21 insertions, 14 deletions
diff --git a/macros/luatex/generic/luakeys/luakeys-doc.tex b/macros/luatex/generic/luakeys/luakeys-doc.tex
index b7e525fc4b..99dfa6805b 100644
--- a/macros/luatex/generic/luakeys/luakeys-doc.tex
+++ b/macros/luatex/generic/luakeys/luakeys-doc.tex
@@ -30,17 +30,17 @@
\url{josef@friedrich.rocks}\\%
\href{https://github.com/Josef-Friedrich/luakeys}{github.com/Josef-Friedrich/luakeys}%
}
-\date{v0.3 from 2021/11/05}
+\date{v0.4 from 2021/12/31}
\maketitle
\vfill
-%\luakeysdebug{level1={level2={level3={dim=1cm,bool=true,num=-1e-03,str=lua}}}}
+%level1={level2={level3={dim=1cm,bool=true,num=-0.001,str=lua}}}
\begin{minted}{lua}
local luakeys = require('luakeys')
-local kv = luakeys.parse('level1={level2={level3={dim=1cm,bool=true,num=-1e-03,str=lua}}}')
+local kv = luakeys.parse('level1={level2={level3={dim=1cm,bool=true,num=-0.001,str=lua}}}')
luakeys.print(kv)
\end{minted}
@@ -217,11 +217,13 @@ lists (\texttt{level1=\{level2=\{key=value,value\}\}}).
\subsection{An (incomplete) attempt to put the syntax into the Extended Backus-Naur Form}
\begin{grammar}
-<list> ::= <list-item> | <list-item> <list>
+<list> ::= \{ <list-item> \}
-<list-item> ::= ( <key-value-pair> | <value-without-key> ) [ `,' ]
+<list-container> ::= `{' <list> `}'
-<list-container> ::== `{' <list> `}'
+<list-item> ::= ( <list-container> | <key-value-pair> | <value> ) [ `,' ]
+
+<key-value-pair> ::= <value> `=' ( <list-container> | <value> )
<value> ::= <boolean>
\alt <dimension>
@@ -247,6 +249,11 @@ lists (\texttt{level1=\{level2=\{key=value,value\}\}}).
\alt `pt' | `PT'
\alt `sp' | `SP'
+<boolean> ::= <boolean-true> | <boolean-false>
+
+<boolean-true> ::= `true' | `TRUE' | `True'
+
+<boolean-false> ::= `false' | `FALSE' | `False'
\end{grammar}
... to be continued
@@ -299,20 +306,14 @@ into Lua’s boolean type \lua{true}, the strings \texttt{false},
\luakeysdebug{
num1 = 4,
num2 = -4,
- num3 = 0.4,
- num4 = 4.57e-3,
- num5 = 0.3e12,
- num6 = 5e+20
+ num3 = 0.4
}
\end{minted}
\begin{minted}{lua}
{
['num1'] = 4,
['num2'] = -4,
- ['num3'] = 0.4,
- ['num4'] = 0.00457,
- ['num5'] = 300000000000.0,
- ['num6'] = 5e+20
+ ['num3'] = 0.4
}
\end{minted}
\end{multicols}
@@ -719,6 +720,12 @@ An example of how to use the command in \LaTeX:
* Add a plain LuaTeX wrapper “luakeys.tex”
* Rename the previous documentation file “luakeys.tex” to luakeys-doc.tex”
}
+\changes{v0.4}{2021/12/31}{
+* Parser: Add support for nested tables (for example {{'a', 'b'}})
+* Parser: Allow only strings and numbers as keys
+* Parser: Remove support from Lua numbers with exponents (for example '5e+20')
+* Switch the Lua testing framework to busted
+}
\pagebreak
\PrintChanges
\pagebreak