Earlier quoted context omitted.
I dunno that that's a fair criticism... by that same argument you could say yacc/bison is for people who don't know how to use C to write a parser. This looks like an attempt to do something along the lines of Parsec from Haskell, but in C. Edit, because it looks like we hit the max reply depth: It's not like this is ever going to seriously replace Bison, I think it's just someone trying a different approach. It's no…
But doing this in C already exists and works well. I don't understand the point of it. Although, in this day and age, rather than use the standard Unix toolset, people invent their own tools as if they are new. "Make" versus "npm" for example.
A Parser Combinator library for C
11–20 of 29 posts
Re: A Parser Combinator library for C
#12Earlier quoted context omitted.
But doing this in C already exists and works well. I don't understand the point of it. Although, in this day and age, rather than use the standard Unix toolset, people invent their own tools as if they are new. "Make" versus "npm" for example.
Do you really think Make could replace npm?
Re: A Parser Combinator library for C
#13Earlier quoted context omitted.
I dunno that that's a fair criticism... by that same argument you could say yacc/bison is for people who don't know how to use C to write a parser. This looks like an attempt to do something along the lines of Parsec from Haskell, but in C. Edit, because it looks like we hit the max reply depth: It's not like this is ever going to seriously replace Bison, I think it's just someone trying a different approach. It's no…
But doing this in C already exists and works well. I don't understand the point of it. Although, in this day and age, rather than use the standard Unix toolset, people invent their own tools as if they are new. "Make" versus "npm" for example.
Re: A Parser Combinator library for C
#14Earlier quoted context omitted.
From the readme, a workflow that doesn't make you want to kill yourself. Also no generated code that requires extra build steps and instantly breaks platform compatibility. That said, inline grammar definition might not be for everyone.
Hmm. So for people who don't know how to use Unix/flex/yacc? This is just reinventing an existing wheel.
Re: A Parser Combinator library for C
#15Earlier quoted context omitted.
But doing this in C already exists and works well. I don't understand the point of it. Although, in this day and age, rather than use the standard Unix toolset, people invent their own tools as if they are new. "Make" versus "npm" for example.
Recursive descent parsing can handle different class of languages from what yacc or bison can do. It is possible to build lexerless parsers this way (so scrap your old useless flex).
Re: A Parser Combinator library for C
#16Earlier 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
#17Earlier quoted context omitted.
Recursive descent parsing can handle different class of languages from what yacc or bison can do. It is possible to build lexerless parsers this way (so scrap your old useless flex).
So your trying to say this thing does a better job?
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 big and battle tested after all, but bison is itself also a replacement for older tools. And hey, maybe mpc here will succeed and revolutionize parsing for the best; then we can have this discussion again in 20 years about someone attempting to replace it.
Re: A Parser Combinator library for C
#18Earlier quoted context omitted.
So your trying to say this thing does a better job?
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…
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.
Re: A Parser Combinator library for C
#19Earlier quoted context omitted.
From the readme, a workflow that doesn't make you want to kill yourself. Also no generated code that requires extra build steps and instantly breaks platform compatibility. That said, inline grammar definition might not be for everyone.
Hmm. So for people who don't know how to use Unix/flex/yacc? This is just reinventing an existing wheel.
Re: A Parser Combinator library for C
#20Earlier quoted context omitted.
Recursive descent parsing can handle different class of languages from what yacc or bison can do. It is possible to build lexerless parsers this way (so scrap your old useless flex).
So your trying to say this thing does a better job?