SourceForge has been redesigned. Learn more.
Close

#14 variable 'v' range

current_cvs
closed-fixed
genxref (49)
5
2001-10-24
2001-08-20
No

I downloaded devel version 0.8 (no group available :)

If you use the commented out example in the lxr.conf
how to set the range of the variable 'v' it doesn't work.

First, at the line 74 in genxref is this variable
accesed directly, there should be
@versions->varrange('v') I guess.

Second, after hacking this line it still doesn't work,
because the $LXR::Common::pathname (used in lxr.conf)
is not set at the time of the execution. I've no clue,
what was the original author's intention :)
It seems, that the range sould be read once per
processed file, because the releases (probably) and
revisions (for sure) may differ for each file. But I
didn't read the code so carefully to be sure.

HTH

Discussion

  • Peder O. Klingenberg

    Logged In: YES
    user_id=222352

    No, it doesn't work at the moment, because genxref is
    broken. I have fixed it, but the patch has not been
    committed yet. Your hunch is correct, it's intended to be
    called per file.

    Stay tuned.

     
  • Peder O. Klingenberg

    • assigned_to: nobody --> pok
     
  • Peder O. Klingenberg

    Logged In: YES
    user_id=222352

    See patch 453450.

     
  • Joseph Wilhelm

    Joseph Wilhelm - 2001-09-17

    Logged In: YES
    user_id=326177

    Actually I got this fixed on my copy by making the line
    look like this:
    @versions = eval($config->{variables}{v}{range});
    Instead of:
    @versions = @{$config->{variables}{v}{range}};

    And it's working perfectly now :)

     
  • Joseph Wilhelm

    Joseph Wilhelm - 2001-09-17

    Logged In: YES
    user_id=326177

    Hmm, on my last follow-up to this, perhaps it didn't work
    properly. I added a 'php' entry to generic.conf so that
    everything should work great in my PHP files... but I'm not
    getting any cross-references on functions or anything else.
    All I'm getting them on is require()'ed files in the
    current directory. Also, I looked at the lxr database in
    MySQL... and it's completely empty. Perhaps this is
    evidence that genxref didn't do quite what it was supposed
    to? :)

     
  • Malcolm Box

    Malcolm Box - 2001-09-26

    Logged In: YES
    user_id=215386

    Is there any chance you could post the stuff you added to
    generic.conf to get php working? I'm trying to flesh the
    file out, since it currently doesn't support a lot of the
    languages that ctags can cope with.

     
  • Joseph Wilhelm

    Joseph Wilhelm - 2001-09-26

    Logged In: YES
    user_id=326177

    Okay.. as far as I know, this is complete. I took the list
    of reserved words from the list on php.net.

    'php' => {
    'reserved' =>
    ['and','$argv','$argc','break','case','class',

     'continue','default','do','die','echo','else',
    
     'elseif','empty','endfor','endforeach','endif',
    
     'endswitch','endwhile','E\_ALL','E\_PARSE','E\_ERROR',
    
     'E\_WARNING','exit','extends','FALSE','for','foreach
    

    ',

     'function','HTTP\_COOKIE\_VARS','HTTP\_GET\_VARS',
    
     'HTTP\_POST\_VARS','HTTP\_POST\_FILES','HTTP\_ENV\_VARS',
    
     'HTTP\_SERVER\_VARS','if','global','list','new','not'
    

    ,

     'NULL','or','parent','PHP\_OS','PHP\_SELF','PHP\_VERSI
    

    ON',

     'print','return','static','switch','stdClass',
    
     'this','TRUE','var','xor','virtual','while','\_\_FILE
    

    __',

     '\_\_LINE\_\_','\_\_sleep','\_\_wakeup'
                        \],
          'spec' => \['comment',  '/\\\*',       '\\\*/',
    
     'comment',  '//',            "\$",
    
     'comment',  '\#',             "\$",
    
     'string',   '"',             '"',
    
     'string',   "'",             "'",
    
     'include',  'require',      "\$",
    
     'include',  'include',      "\$",
    
     'include',  'require\_once', "\$",
    
     'include',  'include\_once', "\$"
                    \],
        \},
    
     
  • Malcolm Box

    Malcolm Box - 2001-10-24
    • milestone: --> current_cvs
    • status: open --> closed-fixed
     

Log in to post a comment.