PEG left recursion Posted by pdf23ds on Tue 17 of Jun, 2008 16:43 GMT posts: 143 Use this thread to discuss the PEG left recursion page.
Posted by pdf23ds on Tue 17 of Jun, 2008 16:43 GMT posts: 143 The PEG grammar has some left-recursion issues that could be taken care of if I implement support for left recursion in my parser. On the other hand, Rats!, which is what the grammar was initially written toward, and *many* other PEG parsers/parsegens don't support real left-recursion. So I don't know if we want the (eventual) official grammar to use a non-standard feature of a tool. But it wouldn't be a feature unique to my parser: http://www.mail-archive.com/peg@lists.csail.mit.edu/msg00096.html Left recursion is a very desirable feature to have, even though it's hard to implement, so other parsers have it and will have it. (Rewriting doesn't count (ever, I think), because it creates parse trees that group things right-associatively even though they match the same inputs.) Another worry would be that you actually have to change PEG semantics to do left recursion like this, and the change that needs to be made isn't obvious or unique, so it could end up that different PEG parsers implement different left recursion semantics that require slight modifications to lojban's grammar to use with it, which would be less than ideal. Chris Capel -- "What is it like to be a bat? What is it like to bat a bee? What is it like to be a bee being batted? What is it like to be a batted bee?" -- The Mind's I (Hofstadter, Dennet) To unsubscribe from this list, send mail to lojban-list-request@lojban.org with the subject unsubscribe, or go to http://www.lojban.org/lsg2/, or if you're really stuck, send mail to secretary@lojban.org for help.