I understand that this task is not easy, but I was wondering if the problem is not in way you handle symbols. I mean actually you collect much information about each of them, but maybe by simplifying the approach you can get the goal. When you meet a structure union you have simply to browse the names inside, if it contains any tag or is named structure you can create a new symbol with that names as if it was and independent structure. If the inner member is nameless you don't need to create another symbol, but simply put all the names together.
On member list side it could be just a recursive search, i.e. when the user type the symbol and it is a structure you can show the members related to it, when the user types the structure member restart checking this symbol if it's another structure, and in that case show its membership. What I mean is that to get the complete efficency you don't need complicate relations between database records, but simply to break down to the atom each part and search recursively each time (with a reentrancy limit anyway, I have seen other compiler loop inside the browser generator and stuck).
Part of the problem is that since declarations can be "recursive", so is the code in POBR. It's actually a chain of functions, and I would have to pass around additional information to know something about "outer scopes". It would be both messy and ugly. It's easier to write each struct/union as a separate item.
I think tag names will always be needed for "top level" structures, especially if it's also a typedef name. I can probably parse the "free text" field, containing the variable declaration, for substructures (especially since it's cleaned up and normalized in v4.0) - but I will not try that right now.
I have, however, rewritten two functions to be recursive, and as long as all structs/unions have tag names, even sub-structs/unions - it seem to work.
For the following code:
name1.name2.name3.
when the last
. is typed, I scan backwards all the way to name1, and build at list of names - this list is passed to the database search function. It will try to nest into the struct/union. This also means, like before, that you can type name1.name2.name3, move away in the code for a while, get back to the position after name3, press
., and it will still work - in other words, not in a specific "mode" while typing.
Requiring tag names is of course not perfect, but it's surely much better than before. I will include the changes in beta 3 - probably at the beginning of next week.
About the browsing info generation have you thought about using a background task with low priority that continuosly checks and updates the database?
Yes - I might do it some day, but I'm a little bit afraid about synchronization problems.
Pelle