[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: BNF to LPEG
- From: Dirk Laurie <dirk.laurie@...>
- Date: Sat, 9 Apr 2016 10:08:34 +0200
2016-04-09 8:27 GMT+02:00 Chris Emerson <firstname.lastname@example.org>:
> As an example from the paper, the regular expression "(ba|a)*a" is not, as you
> might expect, converted to the structurally similar:
> ((P"ba" + P"a")^0) * P"a"
That is the sort of thing I don't mind having to do manually.
With LPeg, there is no need to express every single case in
the PEG itself, you've got all of Lua to help you. P(1)^0/myfunc
if nothing else works.