Menu

#498 Parsing of the doxygen comment "see also" command error

Undefined
open
nobody
Bug_Report
2017-06-03
2017-04-16
ollydbg
No

It looks like our build-in parser failed to parse the "see also" command.

\sa xxx yyy zzz
@see TokenizerState for more details

I think yyy and zzz should not be shown?
see the screen shot:

1 Attachments

Discussion

  • ollydbg

    ollydbg - 2017-04-16
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -2,6 +2,7 @@
    
     ~~~
     \sa xxx yyy zzz
    +@see TokenizerState for more details
     ~~~
     I think yyy and zzz should not be shown?
     see the screen shot:
    
     
  • White-Tiger

    White-Tiger - 2017-06-02

    well... a Doxygen example would look like:
    \sa Inside a see also section any word is checked, so EType, Val1, GVal1, ~Autolink_Test and member will be replaced by links in HTML.
    as seen here: https://www.stack.nl/~dimitri/doxygen/manual/autolink.html

    So that basically means that a real Doxygen is smart enough to detect "valid" links and only creates those.. Is it possible for our Code::Blocks plugin to verify names as required? I've seen other places that lack such "verification"...

     
  • ollydbg

    ollydbg - 2017-06-03

    For your example:

    \sa Inside a see also section any word is checked, so EType, Val1, GVal1, ~Autolink_Test and member will be replaced by links in HTML.
    

    The real Doxygen will check the term "Inside", "EType"... to see whether they are valid symbols, if yes, a link will be generated, see the document here: Doxygen Manual: Special Commands \sa

    This is doable in our CC, we can also check each items to see whether they are valid symbols, but since C++'s grammar is complex, those checks are quite complex and may failed.

    You suggest link: Doxygen Manual: Automatic link generation is much harder, because you don't need a \sa command to start the check, the total Doxygen comment will be checked.

    The checks should be happend in the run time, I mean those checkes can happens when a HTML hint window will be shown, not whan our CC's parser is parsing the files.

     
  • White-Tiger

    White-Tiger - 2017-06-03

    your link doesn't explain the way \sa works.. that's why I've linked the explanation to how it actually behaves.
    If you read the \sa description, you'd get the impression that every word in there is a function / variable, yet every word is checked as one but doesn't need to be one.

    And yes... Doxygen usually checks for functions and variables in any comment (type) but has only specific formats it actually parses like <func>(params) and ::variable (and others) while a \sa matches every single word (as in the example above, even: a, see, also, section, any, word, is, checked, so, ...)

    Basically, the plugin needs to be adapted to include this automatic linking the way Doxygen does. Which isn't just limited to \sa.
    I also agree that identifies shouldn't be parsed / handled at parse time.. but rather when the data is used (as in tooltips) simply because the Code::Blocks parser tends to fail sometimes or is still parsing / reparsing stuff. So we'll get the latest information that's available when we need it.
    But the question is still how slow a symbol check by CC is.. shouldn't take longer than 1ms, otherwise a tooltip might get delayed too much.

    I can offer to try to implement it... because my local Doxyblocks implementation is a bit more complete and partially refactored which might make it easier to implement this... But that'll take some time.. (likely weeks)

     
  • ollydbg

    ollydbg - 2017-06-03

    I think query a single Token in the TokenTree is fast, the tree is a Trie structure, see the documents here: Code Completion Design - CodeBlocks, a long statement is divided to several parts, such as AAA::BBB::CCC are divide to three parts, then we first query "AAA" in the current scope(which include the global scope and the current function body scope or class scope...), and query BBB under the result of the AAA, then continue the query for CCC.

    I'm not sure, but I think the html hint doxygen window should be shown asychronized, so speed normally dose not matters, right?

    I can offer to try to implement it... because my local Doxyblocks implementation is a bit more complete and partially refactored which might make it easier to implement this... But that'll take some time.. (likely weeks)

    Great, if you need any help, just ask me.

     

    Last edit: ollydbg 2017-06-03

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.