3 ms·
Well one problem could be that C++ does not have a context free grammar, and in fact its grammar is notoriously difficult to parse, so perhaps it's just as easy
by tbirdz 13y ago
Well one problem could be that C++ does not have a context free grammar, and in fact its grammar is notoriously difficult to parse, so perhaps it's just as easy to write it by hand as it is to bend an existing parser generator to fit C++'s grammar?
In fact, I am not aware of any modern C++ static analyzer or compiler that uses an automatic parser generator.
- riffraff 13y agobut this isn't a parser, it only tokenizes and then applies matching of rules against a stream of tokens. I.e. it doesn't need to know what C(X) means as long as it knows that it matches <ident,paropen,ident,parclose>. IIUC.