3 ms·
> Text parsing for programming languages is NOT a difficult problem And of course that's why the world is littered with a million 100%-functional C++ parsers,
by wfunction 10y ago
> Text parsing for programming languages is NOT a difficult problem
And of course that's why the world is littered with a million 100%-functional C++ parsers, right?
- PeCaN 10y agoGiven that parsing C++ may be Turing complete¹ I'm not exactly sure that's the best example to use. The world _is_ littered with a million JavaScript and Python parsers. ¹ http://stackoverflow.com/questions/14589346/is-c-context-free-or-context-sensitive/14589567#14589567 http://stackoverflow.com/questions/14589346/is-c-context-fre...
- thwd 10y agoC++ is a bad example because its' grammar is not actually context free. Writing a recursive descent parser is actually quite intuitive. It's the solution that you'd eventually arrive at if given the problem of parsing some specific context free language. GLR, GLL and PwD are solutions to parsing non-cfg (i.e. grammars that have more than one parse-tree) in optimal time.
- jackmott 10y agoIt kind of is yeah. A new language is posted on reddit every day.