Re: [Lxr-dev] multi-language identifiers
Brought to you by:
ajlittoz
From: Dave B. <da...@br...> - 2004-07-22 20:35:41
|
On Thu, 22 Jul 2004, Malcolm Box wrote: > Dave Brondsema wrote: > > | On Wed, 21 Jul 2004, Malcolm Box wrote: > |>I think that's a misleading comment :-) The code does a !grep(/^$2$/, > |>$self->langinfo('reserved')) which should filter out any reserved words > |>as specified in the language info block. > |> > |>So there is a bug in the comment :-) > | > | Yes, reserved words are correctly limited to the current language. But > | identifiers are not. > > Good point - the comment and the problem you originally reported are > talking about different things: > > 1. ignoring any string which is a reserved word when checking if it is a > symbol > and > 2. making the lookup of identifiers language dependent so that if e.g. a > perl file defines foo and a C file defines foo then the correct one will > be linked to. > > AFAICT the code does the former correctly, but as commented doesn't do > the latter. This would require tagging each symbol with the language it > was defined in. Also suspect that it might break clever code like the > Javascript/C++ bridging in Mozilla - or at least make the LXR less useful. > Right. It'll be configurable then :-) The database already holds all the relationships, the code just has to take advantage of that. If configured to do so, it should be limited by version too. -- Dave Brondsema : da...@br... http://www.brondsema.net : personal http://www.splike.com : programming http://csx.calvin.edu : student org |