Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main: experimental implementation of multi-pass parsing #2741

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from

Commits on Jul 6, 2021

  1. build-sys: link libreadtags to ctags

    This change is preparation for adding features querying
    existing tags files during parsing.
    
    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
    masatake committed Jul 6, 2021
    Configuration menu
    Copy the full SHA
    686744f View commit details
    Browse the repository at this point in the history
  2. main: rename tagFile type to tagSinkInfo to avoid conflicting the typ…

    …e name defined in libreadtags
    
    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
    masatake committed Jul 6, 2021
    Configuration menu
    Copy the full SHA
    73b5335 View commit details
    Browse the repository at this point in the history
  3. main: enable TAG_{KIND,EXTRA,FIELD,ROLE}_DESCRIPTION pseudo tags

    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
    masatake committed Jul 6, 2021
    Configuration menu
    Copy the full SHA
    e5d7ced View commit details
    Browse the repository at this point in the history
  4. main: add minimum API for reading an existing tags file from ctags

    An option, --_hint-file=<tags-file> is also added.
    
    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
    masatake committed Jul 6, 2021
    Configuration menu
    Copy the full SHA
    8074f87 View commit details
    Browse the repository at this point in the history
  5. main: notify ptag descs that ptags are loaded from a hint file

    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
    masatake committed Jul 6, 2021
    Configuration menu
    Copy the full SHA
    13d4420 View commit details
    Browse the repository at this point in the history
  6. units.py,docs(web): add --_hint-file=hint.tags if hint.tags exists

    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
    masatake committed Jul 6, 2021
    Configuration menu
    Copy the full SHA
    573aef9 View commit details
    Browse the repository at this point in the history
  7. main: export getLanguageKindForName to parsers

    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
    masatake committed Jul 6, 2021
    Configuration menu
    Copy the full SHA
    0c8dd8a View commit details
    Browse the repository at this point in the history
  8. Python,refactor: make roles defined for "unknown" kind reusable

    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
    masatake committed Jul 6, 2021
    Configuration menu
    Copy the full SHA
    0bea0dd View commit details
    Browse the repository at this point in the history
  9. Python: resolve real kinds for tags with unknown kinds when a hint fi…

    …le is given
    
    As the first pass, make a tags file with --fields=+{language}.
    In the second pass, specified the tags file created in the first pass
    with --_hint-file=<tags file>.
    
    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
    masatake committed Jul 6, 2021
    Configuration menu
    Copy the full SHA
    5ba6a80 View commit details
    Browse the repository at this point in the history
  10. main: export ePtagType to parsers

    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
    masatake committed Jul 6, 2021
    Configuration menu
    Copy the full SHA
    dbdcb42 View commit details
    Browse the repository at this point in the history
  11. main: notify parser that ptags are loaded from a hint file

    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
    masatake committed Jul 6, 2021
    Configuration menu
    Copy the full SHA
    80b6156 View commit details
    Browse the repository at this point in the history
  12. main: provide the way to know whether a field is available or not in …

    …a hint file
    
    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
    masatake committed Jul 6, 2021
    Configuration menu
    Copy the full SHA
    39e924a View commit details
    Browse the repository at this point in the history
  13. main: notify parser that regular tags are loaded from a hint file

    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
    masatake committed Jul 6, 2021
    Configuration menu
    Copy the full SHA
    84352f9 View commit details
    Browse the repository at this point in the history
  14. main: provide the way to know whether a kind is available or not in a…

    … hint file
    
    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
    masatake committed Jul 6, 2021
    Configuration menu
    Copy the full SHA
    7b4b70d View commit details
    Browse the repository at this point in the history
  15. main: provide the way to know whether an extra (xtag) is available or…

    … not in a hint file
    
    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
    masatake committed Jul 6, 2021
    Configuration menu
    Copy the full SHA
    46404e7 View commit details
    Browse the repository at this point in the history
  16. main: provide the way to know whether a role is available or not in a…

    … hint file
    
    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
    masatake committed Jul 6, 2021
    Configuration menu
    Copy the full SHA
    4474e11 View commit details
    Browse the repository at this point in the history
  17. Cxx: hint based macro expansions

    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
    masatake committed Jul 6, 2021
    Configuration menu
    Copy the full SHA
    cd3d7b4 View commit details
    Browse the repository at this point in the history
  18. CPreProcessor: don't prepare per-input-file macro table if the client…

    … language doesn't enable symtab
    
    LDScript and Asm parsers use CPreProcessor parser code.
    However, they don't turn on their symtabs because they are not ready for utilize
    macro expanding feature. If CPreProcessor called symtab related functions, ctags crashed
    because there was no symtab.
    
    With this change, ctags can avoid the crash. CPreProcessor parser calls the symtab related
    functions only when the client language enables its symtab.
    
    TODO: TEST CASE IS NEEDED.
    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
    masatake committed Jul 6, 2021
    Configuration menu
    Copy the full SHA
    980b996 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    61e5266 View commit details
    Browse the repository at this point in the history