px4-firmware/Tools/uorb_graph
Daniel Williams 0f29b87101 [uorb-graph][squash][refactor] Rework of uorb-graph script -- Greatly expands handled test cases
- Source processing now happens on original source files:
    - processing to line-by-line
    - required overhaul of regex match patterns + processing
    - pros:
        - enable tracing of ambiguous parsing sites -- reports (module, file, line-number, line-contents)
        - simplifies code
        - reduces computational complexity
    - cons:
        - certain declarations are harder to parse: multiline declarations
- refactors:
    - added specific subclasses for each: Publications, Subscriptions, Ambiguities
    - added a "Scope" class to represent either a module ('ModuleScope') or a library ('LibraryScope')
- regexes:
    - added cases for C++-style classes
    - expanded C++-style regex cases to accommodate templates
    - `ORB_ID::` is accepted wherever `ORB_ID(` is accepted
    - adds 'orb_copy' regex to the subscription cases
    - emit ambiguous-line warning for declarations with `ORB_ID` on the same line
    - emit ambiguous-line warning for `ORB_ID` with a declaration on the same line
- changed 'module whitelist' to 'scope-whitelist'
    - whitelist may now apply to libraries
    - libraries are optionally merged with their depending modules (but not by default)
    - may be merged with their depending modules with the `--merge-depends` cli flag
    - eliminates some redundant 'special-case' handling code
- debug output
    - raises exception and aborts if a topic is found outside of a scope
    - debug output is now printed & filtered with the python 'logging' standard module
    - alphabetizes topic output in debug logging
    - fixes debug output if package dependencies are missing
    - now warns on ambiguous matches
    - prints a list of ambiguous source sites (aka warnings) on completion
    - (still) emits a warning if we find ORB_ID outside of a scope
    - adds warnings if any of the source paths are invalid
    - do not emit debug output for modules outside of the module/scope whitelist
- Expand script's CLI parameters
    - added 'none' output options: undocumented debugging option to silence file output while debugging
    - added the `--merge-depends` cli flag -- merges output of modules & their dependee libraries
2021-03-29 09:36:34 +02:00
..
.gitignore [uorb-graph][squash][refactor] Rework of uorb-graph script -- Greatly expands handled test cases 2021-03-20 08:11:41 +01:00
create.py [uorb-graph][squash][refactor] Rework of uorb-graph script -- Greatly expands handled test cases 2021-03-29 09:36:34 +02:00