[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Profiling LPEG
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 26 Apr 2023 14:56:18 -0300
> Thanks for the confirmation. I'm going to have to rethink my approach.
If that indeed is the culprit, you can still build a grammar in LPeg.
You can build it piecemeal if you want:
+ local G = {}
...
- local P = <some pattern>
+ G.P = <some pattern>
+ P = lpeg.V"P"
...
+ G[1] = final_pattern
+ final_pattern = lpeg.P(G)
-- Roberto