Earlier quoted context omitted.
I seriously doubt it ever will, but you have to start somewhere. I've used Parsec before and it is certainly nice. Honestly I think it's a bit weird to try and shoehorn it into C, but hey maybe something interesting will come out of it. What bugs me is the suggestion that just because bison works well enough, nobody should try and make a new parser generator in C. They will probably not take over the wold, bison is b…
What you just said is this new thing isn't as good, and probably never will be, but you imply we should use it, even though the current tools are better. See my complaint? If they are going to introduce a new tool, it must be better than the current tool. It's not and it's worse and not as mature.
A Parser Combinator library for C
21–29 of 29 posts
Re: A Parser Combinator library for C
#22Earlier quoted context omitted.
Hmm. So for people who don't know how to use Unix/flex/yacc? This is just reinventing an existing wheel.
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
#23Earlier quoted context omitted.
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.
In recursive descent you simply do not have any shift/reduce conflicts.
Re: A Parser Combinator library for C
#24Earlier quoted context omitted.
I seriously doubt it ever will, but you have to start somewhere. I've used Parsec before and it is certainly nice. Honestly I think it's a bit weird to try and shoehorn it into C, but hey maybe something interesting will come out of it. What bugs me is the suggestion that just because bison works well enough, nobody should try and make a new parser generator in C. They will probably not take over the wold, bison is b…
What you just said is this new thing isn't as good, and probably never will be, but you imply we should use it, even though the current tools are better. See my complaint? If they are going to introduce a new tool, it must be better than the current tool. It's not and it's worse and not as mature.
Not to mention that this is not even really a parser generator like bison or yacc... it's a combinator library. It's an entirely different way to write a parser. It's like me saying Python shouldn't exist because I know how to write C.
Re: A Parser Combinator library for C
#25Earlier quoted context omitted.
In recursive descent you simply do not have any shift/reduce conflicts.
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
#26Earlier quoted context omitted.
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.
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
#27Earlier quoted context omitted.
What you just said is this new thing isn't as good, and probably never will be, but you imply we should use it, even though the current tools are better. See my complaint? If they are going to introduce a new tool, it must be better than the current tool. It's not and it's worse and not as mature.
I didn't say you should use it, nor would I. Only that it isn't pointless/futile to attempt. No tool will be as mature as bison or what have you until it has also been battle tested for 25+ years, but 25 years ago bison was also new and upcoming. Not to mention that this is not even really a parser generator like bison or yacc... it's a combinator library. It's an entirely different way to write a parser. It's like m…
Exactly! Exactly what I'm saying!
Re: A Parser Combinator library for C
#28Earlier quoted context omitted.
What you just said is this new thing isn't as good, and probably never will be, but you imply we should use it, even though the current tools are better. See my complaint? If they are going to introduce a new tool, it must be better than the current tool. It's not and it's worse and not as mature.
This one may not be that good. But any Packrat-based library is definitely much better than anything Yacc can offer.
Re: A Parser Combinator library for C
#29Earlier quoted context omitted.
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).
I didn't say that left recursion has anything to do with shift reduce conflicts. Please read again.