Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Perhaps one of the most mind-boggling parts of this project is it has a hand-rolled parser for the subset of C++ that it can emit. All implemented in a single header. Equal parts impressive and crazy.

https://github.com/tpecholt/imrad/blob/main/src/cpp_parser.h



What does this comment mean? Since not particularly well-versed in programming, all I understood was that this project has something that can read data? What is impressive about a tool that can read C++?

Would appreciate if someone can explain, thanks!


C++ is a notoriously difficult language to parse [1], so hand-rolling a parser (even for a subset of the language) is an impressive feat. It's also interesting that they decided to implement their own tokenizer and lexer instead of using something "off the shelf".

[1] - https://en.wikipedia.org/wiki/Most_vexing_parse




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: