[luatex] [lpeg] increase MAXRULES

Philipp Gesang philipp.gesang at alumni.uni-heidelberg.de
Thu Feb 27 07:49:13 CET 2014


···<date: 2014-02-27, Thursday>···<from: Dirk Laurie>···

> 2014-02-26 23:23 GMT+02:00 Philipp Gesang
> <philipp.gesang at alumni.uni-heidelberg.de>:
> 
> > The reStructuredText module [1] is built around an Lpeg parser
> > with 225 rules. Currently (version 0.78.3), the value of MAXRULES
> > in lpeg.h is 200 (the default) which is too few for the module.
> > Others have reported similar problems in non-TeX contexts [2].
> >
> > Could MAXRULES be increased to something above, say 400? That
> > would make module usable again and there would be enough
> > breathing room for further additions.
> 
> Somewhere in that lua-l thread 1024 was suggested, why stop at 400?

Do greater values affect performance in some way, or just memory?

> LPeg is currently at version 0.12, which no longer has lpeg.h.
> MAXRULES is now defined in lptypes.h.

The lpeg.h in Luatex is a combination of multiple Lpeg v 0.12
header files:

    https://foundry.supelec.fr/scm/viewvc.php/trunk/source/texk/web2c/luatexdir/luapeg/lpeg.h?view=markup&revision=4770&root=luatex

Best,
Philipp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://tug.org/pipermail/luatex/attachments/20140227/3743fbb8/attachment.bin>


More information about the luatex mailing list