3 ms·
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 h
by dymk 2y ago
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 https://github.com/tpecholt/imrad/blob/main/src/cpp_parser.h
- syeare 2y agoWhat 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!
- dymk 2y agoC++ 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 https://en.wikipedia.org/wiki/Most_vexing_parse