Re: [Lxr-general] Fortran again
Brought to you by:
ajlittoz
From: Malcolm B. <ma...@br...> - 2002-02-02 15:25:05
|
Hi, Alexander Schuettelkopf wrote: > > Hi, > > I am trying to get some Fortran support into LXR (like so many others, > seemingly), but due to some surprising and annoying properties of the > language (I'm not a Fortran programmer myself) it is > inefficient/hard/impossible to do with LXR::Lang::Generic. So I thought > I'd just derive a new Lang class and write my own parser, but one of the > routines I most definitely need to override is &LXR::SimpleParse::nextfrag. > Now I could either write some really ugly code with lots of "if (... eq > 'Fortran')" _or_ duplicate the whole generic.conf mechanism for > SimpleParse or move all of SimpleParse into Lang::Generic (which I would > prefer). My question is: is there any good reason why the SimpleParse > routines are in a module of their own. I suspect the location of the SimpleParse routines is merely an implementation artifact. Originally SimpleParse had no dependancy on the type of the file. What is it about Fortran that causes problems for nextfrag? > Given their dependency on data > from generic.conf etc I would have thought it most sensible to move them > into Lang::Generic as two additional methods. If a derived class wants > to use the Generic mechanisms it automatically has the parser routines > that go with it, whereas if it doesn't it can simply overload them... > Does this make any sense? Of course I had also hoped that, once I got my > Fortran parser working, I could submit it, so I'd prefer to be as > compatible with the _real_ LXR as possible. There seems no good reason that I can think of that this would not work. I'd like to see Fortran working - it seems to be something that many are interested in as you say. <snip problem re tmpfiles> > Do I have to respectively am I allowed to file a bug report for this? I apologise if this should have gone to the -dev list. Is that one open for uninvited posting? Feel free to file a bug report on Sourceforge - anyone can and all are welcome to. I'll probably remember to apply this patch, but a bug report helps prod my memory! The dev list is also open to any who wish to participate, though you must be a subscriber to post. Cheers, Malcolm |