Hi, the function "utilities.parsers.stepper" from util-prs.lua gives me always the following error message when I try one of the examples from the source. %%%% begin error lua error > lua error on line 11 in file /Users/wolf/TeX/test/test.tex: ...eta/tex/texmf-context/tex/context/base/mkiv/util-prs.lua:596: attempt to call local 'action' (a number value) stack traceback: ...eta/tex/texmf-context/tex/context/base/mkiv/util-prs.lua:596: in function <...eta/tex/texmf-context/tex/context/base/mkiv/util-prs.lua:587> [C]: in function 'lpegmatch' ...eta/tex/texmf-context/tex/context/base/mkiv/util-prs.lua:617: in function 'stepper' [ctxlua]:4: in main chunk %%%% end error %%%% begin example \starttext \startluacode -- utilities.parsers.stepper("1,7-",9,function(i) print(">>>",i) end) utilities.parsers.stepper("1-3,7,8,9") -- utilities.parsers.stepper("1-3,6,7",function(i) print(">>>",i) end) -- utilities.parsers.stepper(" 1 : 3, ,7 ") -- utilities.parsers.stepper("1:4,9:13,24:*",30) \stopluacode \stoptext %%%% end example Wolfgang
On 1/2/2018 11:35 PM, Wolfgang Schuster wrote:
Hi,
the function "utilities.parsers.stepper" from util-prs.lua gives me always the following error message when I try one of the examples from the source. in line 609 and 612 remove the C in C(cardinal) because it gives a double capture (probably this code assumes a rather old lpeg)
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Wolfgang Schuster