[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Doubt about ebnf parser using lpeg.
- From: Tony Finch <dot@...>
- Date: Wed, 1 Jun 2011 19:05:26 +0100
Cleverton Hentz <email@example.com> wrote:
> I'm trying describe EBNF parser with lpeg library but my implementation of
> parser don't recognize some sentences.
The first alternative for Primary is TerminalString. This means that if
any other alternative starts with a TerminalString it cannot match, since
the Primary has already succeeded. For instance, a later alternative is
RepeatedSequence and many of its alternatives start with strings. Your
example should match a RepeatedSequence but cannot.
f.anthony.n.finch <firstname.lastname@example.org> http://dotat.at/
Rockall, Malin, Hebrides: South 5 to 7, occasionally gale 8 at first in
Rockall and Malin, veering west or northwest 4 or 5, then backing southwest 5
or 6 later. Rough or very rough. Occasional rain. Moderate or good,