07-09-07 06:26 PM
>>> I am in search of a snippet that could parse a C/C++ source file and[vbcol=seagreen]
[vbcol=seagreen]
Unfortunately, parsing C requires more than lex&yacc. It also requires a
scoped symbol table to distinguish
(A)*B
where A is a typename, making this a cast of a pointer reference, from
simple multiplication. It's not hard, but it's not trivial.
Parsing C++ remains more of an art than a science. I doubt it can be done
with yacc without deep wizardry.
--
mac the naïf
[ Post a follow-up to this message ]
|