That problem is a hard one. Distinguishing function calls
from function declarations, and both from function
definitions, is quite hard enough already. Comments in the
middle of an argument list can make it impossible.
The reason the earlier version worked better is that it's a
two-pass approach: it removes comments, first, and then
looks for syntactical elements. COMMENTS_BY_FLEX does both
in one pass, which causes additional problems.
I'll see what can be done about it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=27517
That problem is a hard one. Distinguishing function calls
from function declarations, and both from function
definitions, is quite hard enough already. Comments in the
middle of an argument list can make it impossible.
The reason the earlier version worked better is that it's a
two-pass approach: it removes comments, first, and then
looks for syntactical elements. COMMENTS_BY_FLEX does both
in one pass, which causes additional problems.
I'll see what can be done about it.
Logged In: YES
user_id=27517
Fix checked in. CAUTION: I didn't run tests against C++
sources to see if it breaks something elsewhere.