News for hackers. Stuff that matters.
Re:A Parser Combinator library for C by MichaelMoser123 on Sunday November 01, 2015 @07:38PM (#10489238)
In yacc the generator will tell you about shift reduce conflicts. Once you have debugged the grammar the parser is likely to work. With parser combinators you have no such assurance - you don't know if your grammar has loops, the parser might get stuck easily while parsing. However for a simple and regular input language like sexpr everything is fine.
Re:A Parser Combinator library for C by sklogic on Monday November 02, 2015 @04:06AM (#10490792)
In recursive descent you simply do not have any shift/reduce conflicts.
Re:A Parser Combinator library for C by MichaelMoser123 on Monday November 02, 2015 @03:02PM (#10494750)
you can have left recursion, or implicit left recursion in your recursive descent grammar, if you have then the parser gets stuck while parsing a clause that contains left recursion.
Re:A Parser Combinator library for C by sklogic on Monday November 02, 2015 @03:40PM (#10495044)
Firstly, this have nothing to do with shift/reduce. Secondly, you can safely handle left-recursive grammars in Packrat (which, in turn, can be implemented with combinators).
Re:A Parser Combinator library for C by MichaelMoser123 on Monday November 02, 2015 @06:15PM (#10496097)
I didn't say that left recursion has anything to do with shift reduce conflicts. Please read again.
Re:A Parser Combinator library for C by sklogic on Tuesday November 03, 2015 @04:30AM (#10498422)
I see, yes, you mentioned loops earlier. Anyway, it is not a problem for combinator-based parsing, just use Packrat with a left-recursive extension [1]

[1] http://www.vpri.org/pdf/tr2007002_packrat.pdf