On Thu, Oct 13, 2016 at 10:13 PM, Peter Cashin <cashin.pe...@gmail.com> wrote:
> Yes, I seem to remember that Bryan Ford pointed out the “middle finder” > grammar. > > It is CF but not PEG: > > s = x s x / x > > i.e an odd number of x’s. There is a similar one for an even number. > I'm a bit lost Are we distinguishing between the grammars and the languages expressible by the grammar systems? A PEG grammar that recognizes the language "an odd number of x" is: s = (xx)* x Another version: s = xx s / x Is there an algorithm that can deduce the PEG from the CF? Does every CF have a PEG equivalent? -- Juancarlo *Añez*
_______________________________________________ PEG mailing list PEG@lists.csail.mit.edu https://lists.csail.mit.edu/mailman/listinfo/peg