Repository: universal-ctags/ctags Branch: master Commit: d436dace81c2 Files: 7216 Total size: 13.4 MB Directory structure: gitextract_ldlramtq/ ├── .ctags.d/ │ └── exclusion.ctags ├── .dir-locals.el ├── .editorconfig ├── .gdbinit ├── .gitattributes ├── .github/ │ ├── ISSUE_TEMPLATE.md │ ├── dependabot.yml │ └── workflows/ │ ├── building-with-nmake.yml │ ├── building-with-pegof.yml │ ├── code-coverage-on-ubuntu.yml │ ├── cross-compile-for--netbsd-on-ubuntu.yml │ ├── cross-compile-for-android-on-macos.yml │ ├── cross-compile-for-android-on-ubuntu.yml │ ├── cross-compile-for-freebsd-on-ubuntu.yml │ ├── cross-compile-for-openbsd-on-ubuntu.yml │ ├── cross-compile-for-windows-on-macos.yml │ ├── cross-compile-for-windows-on-ubuntu.yml │ ├── run-citre-tests.yml │ ├── tagging.yml │ ├── testing-bsds.yml.bak │ ├── testing-on-alpine.yml │ ├── testing-on-cygwin.yml │ ├── testing-on-freebsd.yml │ ├── testing-on-macos.yml │ ├── testing-on-msys2.yml │ ├── testing-on-netbsd.yml │ ├── testing-on-openbsd.yml │ ├── testing-on-ubi.yml │ ├── testing-on-ubuntu.yml │ └── testing-with-valgrind.yml ├── .gitignore ├── .indent.pro ├── .readthedocs.yaml ├── .uncrustify.cfg ├── COPYING ├── Makefile.am ├── README.md ├── Tmain/ │ ├── abnormal-output-file-names.d/ │ │ ├── input.c │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── alias-for-unknown-language.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── allow-null-tag.d/ │ │ ├── exit-expected.txt │ │ ├── input.json │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── avoid-null-tag-warning.d/ │ │ ├── input-0.sql │ │ ├── input.asm │ │ ├── input.sql │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── broken-extradef.d/ │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── broken-fielddef.d/ │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── broken-json-output.d/ │ │ ├── exit-expected.tx │ │ ├── input.f │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── broken-langdef.d/ │ │ ├── input.c │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── broken-paramdef.d/ │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── broken-regex-pattern.d/ │ │ ├── broken-pattern.ctags │ │ ├── exit-expected.txt │ │ ├── input.py │ │ ├── run.sh │ │ └── stderr-expected.txt │ ├── broken-tagname-in-ectags-format.d/ │ │ ├── exit-expected.txt │ │ ├── input.cst │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── broken-tagname-quiet.d/ │ │ ├── exit-expected.txt │ │ ├── input.cst │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── broken-tagname.d/ │ │ ├── exit-expected.txt │ │ ├── input.cst │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── broken-version.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ └── stderr-expected.txt │ ├── c-anon-counter.d/ │ │ ├── exit-expected.txt │ │ ├── input1.c │ │ ├── input2.c │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── c-large-enum.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── case-insensitive-pattern.d/ │ │ ├── INPUT.MK │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── clear-aliases.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── client-vista-vim-fields-expectation.d/ │ │ ├── README.md │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ ├── stdout-expected.txt │ │ └── test.vim │ ├── combination-of-fields-Zs.d/ │ │ ├── input.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── combination-of-fields-zkK.d/ │ │ ├── input.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── common-prelude.d/ │ │ ├── aindex.expected │ │ ├── aindex.ps │ │ ├── amember.expected │ │ ├── amember.ps │ │ ├── buildstring.expected │ │ ├── buildstring.ps │ │ ├── chop.expected │ │ ├── chop.ps │ │ ├── dedup.expected │ │ ├── dedup.ps │ │ ├── dedup_spaces.expected │ │ ├── dedup_spaces.ps │ │ ├── ndup.expected │ │ ├── ndup.ps │ │ ├── normalize_spaces.expected │ │ ├── normalize_spaces.ps │ │ ├── putlast.expected │ │ ├── putlast.ps │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ ├── stdout-expected.txt │ │ ├── tr.expected │ │ └── tr.ps │ ├── cxx-how-kinds-defs-are-shared-or-copyed.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── disable-fixed-field.d/ │ │ ├── exit-expected.txt │ │ ├── input.c │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── disable-languages.d/ │ │ ├── input-matlab.m │ │ ├── input-objc.m │ │ ├── input.m │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── dot-ctags-with-indentation.d/ │ │ ├── args.ctags │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── dynamic-kinds.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── e-ctags-output.d/ │ │ ├── input_file.cc │ │ ├── input_scope.rst │ │ ├── input_space.rst │ │ ├── input_tab.rst │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── early--version-opt-processing.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── emacs-modeline-downcased-mode.d/ │ │ ├── exti-expected.txt │ │ ├── functions │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── emacs-modeline-non-alnum-in-head.d/ │ │ ├── input │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── emacs-modeline-non-alnum-in-head2.d/ │ │ ├── input │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── emacs-modeline-non-alnum-in-tail.d/ │ │ ├── input │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── emacs-modeline-uppercased-marker.d/ │ │ ├── exti-expected.txt │ │ ├── macros │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── emacs-modline-shell-script-zsh.d/ │ │ ├── input-firstline0.unknown │ │ ├── input-firstline1.unknown │ │ ├── input-firstline2.unknown │ │ ├── input-firstline3.unknown │ │ ├── input-firstline4.unknown │ │ ├── input-firstline5.unknown │ │ ├── input-lastlist0.unknown │ │ ├── input-lastlist1.unknown │ │ ├── input-lastlist2.unknown │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── enable-kind-postfix-with-wildcard.d/ │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── enable-kind-postfix.d/ │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── enable-kind-prefix-with-wildcard.d/ │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── enable-kind-prefix.d/ │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── enable-non-existing-kind.d/ │ │ ├── run.sh │ │ └── stderr-expected.txt │ ├── epoch-field.d/ │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── errors-about-parser-specific-extras.d/ │ │ ├── run.sh │ │ └── stderr-expected.txt │ ├── errors-if-tags-exits-as-directory.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── errors-in-options-roles.d/ │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── excmd-combine-backward.d/ │ │ ├── input.cpp │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── excmd-combine.d/ │ │ ├── input.cpp │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── extension-vs-pattern.d/ │ │ ├── exit-expected.txt │ │ ├── input.xxx │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── extras-field-for-pseudo-tags.d/ │ │ ├── input.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── extras-field.d/ │ │ ├── exit-expected.txt │ │ ├── input.cpp │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── extras-long.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── filter-option-write-to-file.d/ │ │ ├── input.c │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── filter-option.d/ │ │ ├── input.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── fixed-field-handling-in-json-format.d/ │ │ ├── input.c │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── fixed-field-handling.d/ │ │ ├── input.c │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── flags-fielddef-datatype.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── force-initializing-option.d/ │ │ ├── README │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── xit-expected.txt │ ├── gcov-sandbox.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── generate-anon-ids.d/ │ │ ├── input0.c │ │ ├── input1.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── getter-extras-field.d/ │ │ ├── input.unknown │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ ├── stdout-expected.txt │ │ └── x.ctags │ ├── input-encoding-option.d/ │ │ ├── exit-expected.txt │ │ ├── input.java │ │ ├── input.js │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ ├── stdout-expected.txt │ │ └── tags-expected.txt │ ├── interactive-mode.d/ │ │ ├── run.sh │ │ ├── stdout-expected.txt │ │ ├── test.c │ │ └── test.rb │ ├── interactive-notice-output.d/ │ │ ├── input.cst │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── interactive-option-write-to-file.d/ │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ ├── stdout-expected.txt │ │ └── test.rb │ ├── interactive-resource-management.d/ │ │ ├── input.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── invalid-encoding-option.d/ │ │ ├── exit-expected.txt │ │ ├── input.java │ │ ├── input.js │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── json-output-backslash-in-input-field.d/ │ │ ├── exit-expected.txt │ │ ├── input.php │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── json-output-for-broken-input.d/ │ │ ├── exit-expected.txt │ │ ├── input.cs │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── json-output-format.d/ │ │ ├── input.1 │ │ ├── input.c │ │ ├── input.go │ │ ├── input.py │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── json-output-much-parser-fields.d/ │ │ ├── exit-expected.txt │ │ ├── input.h │ │ └── run.sh │ ├── json-output-ptag-in-list-extras.d/ │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── json-output-to-file.d/ │ │ ├── input.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── json-output-typed-fields.d/ │ │ ├── input.c │ │ ├── input.ctst │ │ ├── input.rst │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── json-parser-limit-recursion.d/ │ │ ├── exit-expected.txt │ │ ├── input512-one.json │ │ ├── input512-two.json │ │ ├── input513-one.json │ │ ├── input513-two.json │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── kind-abnormal-spec.d/ │ │ ├── input.x │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── kind-and-role-defaults.d/ │ │ ├── input.cst │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── kind-long-lregex.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── kind-long.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── kinddef.d/ │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── kinds-all-with-spec.d/ │ │ ├── exit-expected.txt │ │ ├── input.c │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── lang-sequel.d/ │ │ ├── args.ctags │ │ ├── exit-expected.txt │ │ ├── input.unknown │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── lang-with-no-pattern.d/ │ │ ├── exit-expected.txt │ │ ├── input.foo │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── langmap-option-including-patterns.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── langmap-option.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── language-filed-optscript.d/ │ │ ├── foo.ctags │ │ ├── input.foo │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── language-names.d/ │ │ ├── exit-expected.txt │ │ └── run.sh │ ├── languages-and-language-force-options.d/ │ │ ├── exit-expected.txt │ │ ├── input.c │ │ ├── run.sh │ │ └── stderr-expected.txt │ ├── line-regex-optscript.d/ │ │ ├── exit-expected.txt │ │ ├── hello.ctags │ │ ├── input.hello │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── list-aliases.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── list-excludes.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── list-extras.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── list-fields-fixed-field-handling.d/ │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── list-fields-none.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── list-fields-with-prefix.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── list-fields.d/ │ │ ├── exit-expected.txt │ │ ├── input.c │ │ ├── input.java │ │ ├── input.sh │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── list-kinds-full.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── list-language-fields.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── list-language-flags.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── list-map-extensions.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── list-map-patterns.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── list-map-rexprs.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── something/ │ │ │ ├── input.CPP │ │ │ ├── input.c │ │ │ └── input.h │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── list-mline-regex-flags.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── list-mtable-regex-flags.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── list-output-formats.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── list-params.d/ │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── list-pseudo-tags.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── list-regex-flags.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── list-roles-with-kind-names.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── list-roles.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── list-subparsers-all.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── load-conf-files-under-cwd-no-dot.d/ │ │ ├── ctags.d/ │ │ │ ├── a.ctags │ │ │ ├── b.ctags │ │ │ └── c.ctags │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── load-conf-files-under-cwd.d/ │ │ ├── .ctags.d/ │ │ │ ├── a.ctags │ │ │ ├── b.ctags │ │ │ └── c.ctags │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── load-conf-files-under-default-xdg-config-home.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── load-conf-files-under-home.d/ │ │ ├── exit-expected.txt │ │ ├── myhome/ │ │ │ └── .ctags.d/ │ │ │ ├── a.ctags │ │ │ ├── b.ctags │ │ │ └── c.ctags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── load-conf-files-under-xdg-config-home.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── load-dot-ctags-twice.d/ │ │ ├── dot.ctags │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── lregex-clear-patterns.d/ │ │ ├── input.c │ │ ├── mylang.ctags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── lregex-kind-letter.d/ │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── lregex-kind-name.d/ │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── lregex-list-kinds-full.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── lregex-list-kinds-uniquely.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── lregex-list-kinds.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── lregex-reject-reserved-kind.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── lregex-scan-the-rest-of-input.d/ │ │ ├── exit-expected.txt │ │ ├── input.cst │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── lregex-unexpected-regex-kind.d/ │ │ ├── X.ctags │ │ ├── Y-r-regex-with-kinddef.ctags │ │ ├── Y-r-regex.ctags │ │ ├── Y-r.ctags │ │ ├── Y-regex.ctags │ │ ├── Yempty1.ctags │ │ ├── Yempty2.ctags │ │ ├── Ynokind.ctags │ │ ├── input.yyy │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── map-for-unknown-language.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── map-lang-option.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── map-removing.d/ │ │ ├── ada.m │ │ ├── exit-expected.txt │ │ ├── matlab.m │ │ ├── objc.m │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── map-rexpr.d/ │ │ ├── macros.d/ │ │ │ └── macros.vim │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── maxdepth.d/ │ │ ├── run.sh │ │ ├── src/ │ │ │ ├── a.c │ │ │ └── subdir/ │ │ │ └── b.c │ │ └── stdout-expected.txt │ ├── mline-no-advance.d/ │ │ ├── args.ctags │ │ ├── input.foo │ │ ├── run.sh │ │ └── stderr-expected.txt │ ├── mtable-avoid-infinite-loop-at-the-eof.d/ │ │ ├── args.ctags │ │ ├── input.foo │ │ ├── input2.foo │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── mtable-mutual-entering.d/ │ │ ├── args.ctags │ │ ├── input0.foo │ │ ├── input1.foo │ │ ├── input2.bar │ │ ├── input3.baz │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── mtable-pinning.d/ │ │ ├── args.ctags │ │ ├── input0.foo │ │ ├── input1.foo │ │ ├── run.sh │ │ └── stderr-expected.txt │ ├── mtable-stats.d/ │ │ ├── args.ctags │ │ ├── input.foo │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── multi-roles.d/ │ │ ├── input.x │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── nameless-long-option.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── nested-mio.d/ │ │ ├── exit-expected.txt │ │ ├── input.cst │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── nested-subparsers-multilines.d/ │ │ ├── event.ctags │ │ ├── hook.ctags │ │ ├── input.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── nested-subparsers.d/ │ │ ├── event.ctags │ │ ├── hook.ctags │ │ ├── input.c │ │ ├── plugin.ctags │ │ ├── run.sh │ │ ├── stdout-expected.txt │ │ └── unused-attr.ctags │ ├── no-empty-tag.d/ │ │ ├── input-0.mak │ │ ├── run.sh │ │ └── stderr-expected.txt │ ├── no-input-encoding-option.d/ │ │ ├── exit-expected.txt │ │ ├── input.java │ │ ├── input.js │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── notice-about-broken-symlink.d/ │ │ ├── .gitignore │ │ ├── run.sh │ │ └── stderr-expected.txt │ ├── null-description-in-pseudo-tag.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── nulltag-extra.d/ │ │ ├── input.cst │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── omit-long-patterns-etags.d/ │ │ ├── input.sh │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── omit-long-patterns.d/ │ │ ├── gen.sh │ │ ├── input.sh │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── option-dump-keywords.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── option-dump-options.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── option-echo-and-force-quit.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── option-exclude-exception.d/ │ │ ├── input.d/ │ │ │ ├── bazel-x/ │ │ │ │ └── x.c │ │ │ ├── bazel-y/ │ │ │ │ └── y.c │ │ │ └── bazel-z/ │ │ │ └── z.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── option-exclude-including-fsep.d/ │ │ ├── input.d/ │ │ │ ├── bazel-x/ │ │ │ │ └── x.c │ │ │ ├── bazel-y/ │ │ │ │ └── y.c │ │ │ ├── bazel-z/ │ │ │ │ └── z.c │ │ │ └── labze-a/ │ │ │ └── a.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── option-exclude-simple.d/ │ │ ├── input.d/ │ │ │ ├── a.h │ │ │ ├── bazel-x/ │ │ │ │ └── x.c │ │ │ ├── bazel-y/ │ │ │ │ └── y.c │ │ │ └── bazel-z/ │ │ │ └── z.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── option-extradef-in-mtable.d/ │ │ ├── input.mtextra │ │ ├── mtextra.ctags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── option-extras-enabling-all.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── option-no-such-foreign-extra.d/ │ │ ├── run.sh │ │ └── stderr-expected.txt │ ├── option-no-such-foreign-field.d/ │ │ ├── run.sh │ │ └── stderr-expected.txt │ ├── option-options-directory.d/ │ │ ├── exit-expected.txt │ │ ├── optlib/ │ │ │ ├── a.ctags │ │ │ ├── b.ctags │ │ │ └── c.ctags │ │ ├── run.sh │ │ └── stderr-expected.txt │ ├── option-options-maybe.d/ │ │ ├── exit-expected.txt │ │ ├── input-maybe.c │ │ ├── input.c │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── option-pseudo-tags.d/ │ │ ├── input.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── option-totals-extra.d/ │ │ ├── input.unknown │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── option-use-slash-as-filename-separator.d/ │ │ ├── run.sh │ │ ├── src/ │ │ │ └── input.c │ │ └── stdout-expected.txt │ ├── optlib-dir-option.d/ │ │ ├── optlib/ │ │ │ ├── a.ctags │ │ │ ├── b.ctags │ │ │ └── c.ctags │ │ ├── run.sh │ │ └── stderr-expected.txt │ ├── optlib-message-flag.d/ │ │ ├── args.ctags │ │ ├── input0.foo │ │ ├── input1.foo │ │ ├── input2.foo │ │ ├── input3.foo │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── optscript-preludes-stack.d/ │ │ ├── args-c.ctags │ │ ├── args-cpreprocessor.ctags │ │ ├── args-dts.ctags │ │ ├── exit-expected.txt │ │ ├── input.c │ │ ├── input.dts │ │ ├── input.i │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── optscript-scope.d/ │ │ ├── exit-expected.txt │ │ ├── input.unknown │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ ├── stdout-expected.txt │ │ └── unknown.ctags │ ├── optscript.d/ │ │ ├── arithmetic.expected │ │ ├── arithmetic.ps │ │ ├── array.expected │ │ ├── array.ps │ │ ├── arrayx.expected │ │ ├── arrayx.ps │ │ ├── compound.expected │ │ ├── compound.ps │ │ ├── control.expected │ │ ├── control.ps │ │ ├── dict.expected │ │ ├── dict.ps │ │ ├── dictx.expected │ │ ├── dictx.ps │ │ ├── error-undefined-if-if.expected │ │ ├── error-undefined-if-if.ps │ │ ├── error-undefined-if.expected │ │ ├── error-undefined-if.ps │ │ ├── exit-expected.txt │ │ ├── misc.expected │ │ ├── misc.ps │ │ ├── pstack.expected │ │ ├── pstack.ps │ │ ├── read-and-print.expected │ │ ├── read-and-print.ps │ │ ├── relalogbits.expected │ │ ├── relalogbits.ps │ │ ├── run.sh │ │ ├── stack.expected │ │ ├── stack.ps │ │ ├── stderr-expected.txt │ │ ├── stdout-expected.txt │ │ ├── string.expected │ │ ├── string.ps │ │ ├── typeattrconv.expected │ │ └── typeattrconv.ps │ ├── output-encoding-option.d/ │ │ ├── exit-expected.txt │ │ ├── input.java │ │ ├── input.js │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ ├── stdout-expected.txt │ │ └── tags-expected.txt │ ├── output-file-resource-management.d/ │ │ ├── input.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── output-format-option.d/ │ │ ├── input.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── output-input-field-with-no-escape.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── parser-init-useCork.d/ │ │ ├── input.x │ │ ├── run.sh │ │ ├── stdout-expected.txt │ │ └── x.ctags │ ├── parser-specific-extras-for-foreign-lang.d/ │ │ ├── input-0.x1 │ │ ├── input-1.x1 │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ ├── stdout-expected.txt │ │ ├── x0.ctags │ │ └── x1.ctags │ ├── parser-specific-extras.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── parser-specific-fields-clearing-all.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── parser-specific-fields-for-foreign-lang-in-json.d/ │ │ ├── input.unknownx │ │ ├── knownz.ctags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ ├── stdout-expected.txt │ │ └── unknownx.ctags │ ├── parser-specific-fields-for-foreign-lang.d/ │ │ ├── input.unknownx │ │ ├── knownz.ctags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ ├── stdout-expected.txt │ │ └── unknownx.ctags │ ├── parser-specific-fields-with-datatype.d/ │ │ ├── exit-expected.txt │ │ ├── input.testlang │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ ├── stdout-expected.txt │ │ └── testlang.ctags │ ├── parser-specific-fields-with-scripts.d/ │ │ ├── exit-expected.txt │ │ ├── input.testlang │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ ├── stdout-expected.txt │ │ └── testlang.ctags │ ├── parser-specific-fields.d/ │ │ ├── input.unknownx │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ ├── stdout-expected.txt │ │ └── unknownx.ctags │ ├── pattern-length-limit.d/ │ │ ├── input-iso-8859-1.py │ │ ├── input-utf8.py │ │ ├── input.java │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── pretend-option.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── ptag-dont-emit-to-stdout-by-default.d/ │ │ ├── input.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── ptag-emits-even-when-rewinding.d/ │ │ ├── README │ │ ├── exit-expected.txt │ │ ├── input.cpp │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── ptag-extra-desc.d/ │ │ ├── input.robot │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── ptag-field-sec.d/ │ │ ├── input.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── ptag-in-optlib-parser.d/ │ │ ├── input.foo │ │ ├── input.sh │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── ptag-kind-desc.d/ │ │ ├── input.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── ptag-kind-sep.d/ │ │ ├── exit-expected.txt │ │ ├── input.php │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── ptag-output-excmd.d/ │ │ ├── input.c │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── ptag-proc-cwd-including-tab.d/ │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── ptag-proc-cwd.d/ │ │ ├── input.c │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── ptag-role-desc.d/ │ │ ├── input.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── readtags-alias.d/ │ │ ├── input.c │ │ ├── output.tags │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── readtags-broken-input.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ ├── stdout-expected.txt │ │ └── target.tags │ ├── readtags-canonicalize-input-names.d/ │ │ ├── drive-letter0.tags │ │ ├── drive-letter1.tags │ │ ├── exit-expected.txt │ │ ├── good-ptags.tags │ │ ├── good0.tags │ │ ├── good1.tags │ │ ├── good2.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-combine.d/ │ │ ├── backward.tags │ │ ├── exit-expected.txt │ │ ├── forward.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-default-field-val.d/ │ │ ├── exit-expected.txt │ │ ├── input.c │ │ ├── output.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-error-conflicting-actions.d/ │ │ ├── exit-expected.txt │ │ ├── input.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-error-in-sorter.d/ │ │ ├── exit-expected.txt │ │ ├── input.c │ │ ├── output.tags │ │ └── run.sh │ ├── readtags-error-no-action.d/ │ │ ├── exit-expected.txt │ │ ├── input.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-error-no-input.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-escaping.d/ │ │ ├── exit-expected.txt │ │ ├── output.tags │ │ ├── output2.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-formatter-op-regex-extraction.d/ │ │ ├── exit-expected.txt │ │ ├── input.c │ │ ├── output.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-formatter-op-tr.d/ │ │ ├── input.cpp │ │ ├── output.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-formatter.d/ │ │ ├── exit-expected.txt │ │ ├── input.c │ │ ├── output.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-list-pseudo-tags.d/ │ │ ├── ptag-sort-no.tags │ │ ├── ptag-sort-yes.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-ptags-dls.d/ │ │ ├── exit-expected.txt │ │ ├── input.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-ptags-escaping.d/ │ │ ├── exit-expected.txt │ │ ├── pseudo-input-b_.tags │ │ ├── pseudo-input-bb.tags │ │ ├── pseudo-input-bt.tags │ │ ├── pseudo-name-b_.tags │ │ ├── pseudo-name-bb.tags │ │ ├── pseudo-name-bt.tags │ │ ├── regular-input-b_.tags │ │ ├── regular-input-bb.tags │ │ ├── regular-input-bt.tags │ │ ├── regular-kind-b_.tags │ │ ├── regular-kind-bb.tags │ │ ├── regular-name-b_.tags │ │ ├── regular-name-bb.tags │ │ ├── regular-name-bt.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-ptags-escaping2.d/ │ │ ├── example-_-_.tags │ │ ├── example-_-b.tags │ │ ├── example-_-s.tags │ │ ├── example-e-_.tags │ │ ├── example-e-b.tags │ │ ├── example-e-s.tags │ │ ├── example-u-_.tags │ │ ├── example-u-b.tags │ │ ├── example-u-s.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-qualifier-begin.d/ │ │ ├── exit-expected.txt │ │ ├── output.tags │ │ ├── run.sh │ │ ├── sample.c │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-qualifier-broken-exp.d/ │ │ ├── exit-expected.txt │ │ ├── input.c │ │ ├── output.tags │ │ ├── run.sh │ │ └── stderr-expected.txt │ ├── readtags-qualifier-end-field.d/ │ │ ├── exit-expected.txt │ │ ├── output.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-qualifier-exp-with-garbage.d/ │ │ ├── exit-expected.txt │ │ ├── input.c │ │ ├── output.tags │ │ ├── run.sh │ │ └── stderr-expected.txt │ ├── readtags-qualifier-nth-field.d/ │ │ ├── exit-expected.txt │ │ ├── input.c │ │ ├── output.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-qualifier-op-downcase-upcase.d/ │ │ ├── input.cpp │ │ ├── output.tags │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── readtags-qualifier-op-length.d/ │ │ ├── input.el │ │ ├── output.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-qualifier-op-list.d/ │ │ ├── input.c │ │ ├── output.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-qualifier-op-regexp-quote.d/ │ │ ├── exit-expected.txt │ │ ├── input.x │ │ ├── output.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ ├── stdout-expected.txt │ │ └── x.ctags │ ├── readtags-qualifier-op-string-append.d/ │ │ ├── input.c │ │ ├── output.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-qualifier-regex.d/ │ │ ├── input.hxx │ │ ├── output.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-qualifier-sf-cond.d/ │ │ ├── input.c │ │ ├── output.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-qualifier.d/ │ │ ├── base.c │ │ ├── base.py │ │ ├── c.tags │ │ ├── exit-expected.txt │ │ ├── output.tags │ │ ├── roles.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-simple-listing.d/ │ │ ├── exit-expected.txt │ │ ├── input.c │ │ ├── run.sh │ │ ├── sorted.tags │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-sorter-cmp_or-sform.d/ │ │ ├── README.md │ │ ├── exit-expected.txt │ │ ├── input.d/ │ │ │ ├── bar.c │ │ │ ├── decl.h │ │ │ └── foo.c │ │ ├── output.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-sorter-if-sform-order.d/ │ │ ├── exit-expected.txt │ │ ├── output.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-sorter-if-sform.d/ │ │ ├── exit-expected.txt │ │ ├── input.c │ │ ├── output.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-sorter.d/ │ │ ├── .ctags.d/ │ │ │ ├── 0.ctags │ │ │ └── src.list │ │ ├── exit-expected.txt │ │ ├── output.tags │ │ ├── run.sh │ │ ├── src/ │ │ │ ├── input-area.cpp │ │ │ ├── input-volume.cpp │ │ │ └── input.h │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-stdin.d/ │ │ ├── exit-expected.txt │ │ ├── output.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── readtags-with-list-pseudo-tags.d/ │ │ ├── ptag-sort-no.tags │ │ ├── ptag-sort-yes.tags │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── regex-for-unknown-language.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── regex-patterns-from-file.d/ │ │ ├── input.c │ │ ├── list.regex │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── reset-fields.d/ │ │ ├── exit-expected.txt │ │ ├── input.h │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── roledef.d/ │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── roles-field-optscript.d/ │ │ ├── foo.ctags │ │ ├── input.foo │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── ruby-scope-loop-oom.d/ │ │ ├── README │ │ ├── a.rb │ │ ├── b.rb │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── run-as-etags.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ └── stderr-expected.txt │ ├── sandbox-crash.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── sandbox-default-req.d/ │ │ ├── exit-expected.txt │ │ ├── input.c │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── sandbox-no-eager-guessing.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── sandbox-unknown-submode.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── sandbox-with-eager-guessing.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── sandbox.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── scopesep.d/ │ │ ├── input.tcl │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── selector-dont-select-disabled-lang.d/ │ │ ├── exit-expected.txt │ │ ├── input.h │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── selector-select-C-for-dot-h.d/ │ │ ├── exit-expected.txt │ │ ├── input.h │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── selector-select-perl6-for-dot-pm.d/ │ │ ├── input0.pm │ │ ├── input1.pm │ │ ├── input2.pm │ │ ├── input3.pm │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── selector-xml-root-elelement.d/ │ │ ├── input.xml │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── sorted-list-languages.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── subparser-direction.d/ │ │ ├── input.cc │ │ ├── input.mojom │ │ ├── mojom-bidirectional.ctags │ │ ├── mojom-dedicated.ctags │ │ ├── mojom-default.ctags │ │ ├── mojom-shared.ctags │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── tab-in-parser-specific-field.d/ │ │ ├── foo.ctags │ │ ├── input.foo │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── tag-relative-option-in-etags.d/ │ │ ├── indirect/ │ │ │ └── src/ │ │ │ └── input.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── tag-relative-option-no-optarg.d/ │ │ ├── exit-expected.txt │ │ └── run.sh │ ├── tag-relative-option.d/ │ │ ├── input.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── tags-output-typed-fields.d/ │ │ ├── input.c │ │ ├── input.ctst │ │ ├── input.rst │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── tmain-example.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ ├── stdout-expected.txt │ │ └── tags-expected.txt │ ├── tmain-skip-example.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── trace-option.d/ │ │ ├── exit-expected.txt │ │ ├── input.unknown │ │ ├── run.sh │ │ └── stderr-expected.txt │ ├── two-inputs-requiring-scope-stack.d/ │ │ ├── a.dts │ │ └── b.dts │ ├── unreadable-input.d/ │ │ ├── input-1.c │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── utils.sh │ ├── version-option.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── versioning.d/ │ │ ├── broken-extra.ctags │ │ ├── broken-field.ctags │ │ ├── broken-kind.ctags │ │ ├── broken-role.ctags │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ ├── stdout-expected.txt │ │ ├── test.ctags │ │ ├── warning-extra.ctags │ │ ├── warning-field.ctags │ │ ├── warning-kind.ctags │ │ └── warning-role.ctags │ ├── w32-slash-in-exclude-option.d/ │ │ ├── input.d/ │ │ │ ├── capture_me/ │ │ │ │ └── input.c │ │ │ ├── dont_capture_me/ │ │ │ │ └── input.c │ │ │ └── input.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── warn-garbage-on-ostack.d/ │ │ ├── exit-expected.txt │ │ ├── garbage.ctags │ │ ├── input.garbage │ │ ├── input.kconfig │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── warn-reusing-kind-letter.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── wildcard-in-lang-of-fields-option.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── wrong-parser-name-in-field.d/ │ │ ├── exit-expected.txt │ │ ├── run.sh │ │ └── stderr-expected.txt │ ├── xref-output-common-fields.d/ │ │ ├── input.py │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── xref-output-formatting-parser-specific-field.d/ │ │ ├── input.rst │ │ ├── run.sh │ │ ├── stderr-expected.txt │ │ └── stdout-expected.txt │ ├── xref-output-ptag-in-list-extras.d/ │ │ ├── run.sh │ │ └── stdout-expected.txt │ ├── xref-output-to-file.d/ │ │ ├── input.c │ │ ├── run.sh │ │ └── stdout-expected.txt │ └── xref-output-typed-fields.d/ │ ├── input.c │ ├── input.ctst │ ├── input.rst │ ├── run.sh │ ├── stderr-expected.txt │ └── stdout-expected.txt ├── Units/ │ ├── afl-fuzz.r/ │ │ ├── github-issue-528-sml.d/ │ │ │ ├── expected.tags │ │ │ └── input.sml │ │ ├── github-issue-529-bas.d/ │ │ │ └── input.bas │ │ ├── github-issue-530-css.d/ │ │ │ └── input.css │ │ ├── github-issue-531-make.d/ │ │ │ └── input.mk │ │ ├── github-issue-532-vim.d/ │ │ │ └── input.vim │ │ ├── github-issue-536-flex.d/ │ │ │ └── input.as │ │ ├── github-issue-537-beta.d/ │ │ │ └── input.bet │ │ ├── github-issue-538-sql.d/ │ │ │ └── input.sql │ │ ├── github-issue-539-js.d/ │ │ │ └── input.js │ │ ├── github-issue-540-fortran.d/ │ │ │ └── input.f │ │ ├── github-issue-541-json.d/ │ │ │ └── input.json │ │ ├── github-issue-542-vhdl.d/ │ │ │ └── input.vhdl │ │ ├── github-issue-543-eiffel.d/ │ │ │ └── input.e │ │ ├── github-issue-625-r.d/ │ │ │ └── input.r │ │ ├── github-issue-627-perl.d/ │ │ │ └── input.pl │ │ └── github-issue-628-vera.d/ │ │ └── input.vr │ ├── csharp-review-needed.r/ │ │ ├── array_ref_and_out.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── attributes.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── bug1515910.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── bug1611054.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── bug1800065.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── bug1830343.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── bug1830344.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── bug2411878.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── events.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── general.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── indexer.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── interface_indexers.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── interface_properties.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── internal.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_abstract.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_catch_try.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_class.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_const.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_delegate.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_enum.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_event.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_explicit.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_extern.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_implicit.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_interface.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_namespace.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_out.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_override.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_params.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_private.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_protected.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_public.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_sealed.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_static.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_struct.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_virtual.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── keyword_volatile.cs.t/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ └── property.cs.t/ │ │ ├── expected.tags │ │ └── input.cs │ ├── extension-with-template-suffix.d/ │ │ ├── expected.tags │ │ └── input.c.in │ ├── extra-anonymous.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-0.js │ │ └── input.c │ ├── extra-disabling-anonymous.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-0.js │ │ └── input.c │ ├── extra-file-scope-option.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.c │ ├── extra-total-lines.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── foo.h │ │ └── input.c │ ├── flags-langdef-directions.r/ │ │ ├── bidirectional.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.sub │ │ │ └── input.base │ │ ├── dedicated.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.sub │ │ │ └── input.base │ │ ├── default.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.sub │ │ │ └── input.base │ │ └── shared.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-0.sub │ │ └── input.base │ ├── foreign-tags.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.docc │ ├── fuzz-hitting-assertions.r/ │ │ ├── README │ │ ├── csharp-fha-0.d/ │ │ │ ├── expected.tags │ │ │ └── input.cs │ │ ├── d-fha-0.d/ │ │ │ ├── README │ │ │ ├── expected.tags │ │ │ └── input.d │ │ ├── eiffel-fha-0.d/ │ │ │ ├── expected.tags │ │ │ └── input.e │ │ ├── java-fha-0.d/ │ │ │ ├── expected.tags │ │ │ └── input.java │ │ ├── systemverilog-fha-0.d/ │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── vera-fha-0.d/ │ │ │ ├── expected.tags │ │ │ └── input.vr │ │ └── verilog-fha-0.d/ │ │ ├── expected.tags │ │ └── input.v │ ├── guest-in-optlib-single-line.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-0.single │ │ ├── input-1.single │ │ ├── input-2.single │ │ └── input.single │ ├── main-guessing.r/ │ │ ├── nolang-modeline-emacs-after-shbang.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nolang │ │ ├── nolang-modeline-emacs-eof.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nolang │ │ ├── nolang-modeline-emacs-firstline0.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nolang │ │ ├── nolang-modeline-emacs-firstline1.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nolang │ │ ├── nolang-modeline-vim0-head.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nolang │ │ ├── nolang-modeline-vim0-tail.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nolang │ │ ├── nolang-modeline-vim1-head.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nolang │ │ ├── nolang-modeline-vim1-tail.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nolang │ │ ├── nolang-modeline-vim2-head.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nolang │ │ ├── nolang-modeline-vim2-tail.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nolang │ │ ├── nolang-modeline-zsh-autoload.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nolang │ │ ├── nolang-modeline-zsh-compdef.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nolang │ │ └── nolang-shebang-python3.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.nolang │ ├── matlab-tg-corpus.d/ │ │ ├── expected.tags │ │ ├── features │ │ └── input.m │ ├── mtable-simple-with-continuation.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.mtable │ ├── mtable-simple-with-table-extending.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.mtable │ ├── mtable-simple.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.mtable │ ├── noext-tg-matlab.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.nolang │ ├── noext-tg-objc.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.nolang │ ├── objc-tg-corpus.d/ │ │ ├── expected.tags │ │ └── input.m │ ├── option-add-alias.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.nolang │ ├── option-disable-kind-in-both.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.c │ ├── option-disable-kind-in-builtin.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.c │ ├── option-disable-kind-in-regex.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.c │ ├── option-extradef.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.py │ ├── option-file-tags-no.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.mk │ ├── option-file-tags.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.mk │ ├── option-input-file.d/ │ │ ├── README │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.c │ ├── option-lang-compatibility.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.foo │ ├── option-langmap-ext--ext.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.x │ ├── option-langmap-ext--pat-ext.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.zzz │ ├── option-langmap-ext-pat--ext.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.x │ ├── option-langmap-pat--ext.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.x │ ├── option-langmap-pat--pat-ext.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.zzz │ ├── option-regex-attaching-role.r/ │ │ ├── extending-existing-parser.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.scm │ │ └── standing-alone-line-parser.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.foo │ ├── option-same-kind-in-regex-and-builtin.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.c │ ├── optlib-recursive.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ ├── input.cof │ │ └── optlib/ │ │ └── lang/ │ │ ├── a.ctags │ │ ├── b.ctags │ │ ├── c.ctags │ │ ├── d.ctags │ │ └── e.ctags │ ├── optlib-simple.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ ├── input.coffee │ │ └── optlib/ │ │ └── coffee.ctags │ ├── optscript.r/ │ │ ├── op-access.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.unknown │ │ ├── op-anongen.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.foo │ │ ├── op-end.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.unknown │ │ ├── op-extras.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.unknown │ │ ├── op-inherits.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.unknown │ │ ├── op-intervaltab.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── op-line.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.unknown │ │ ├── op-markplaceholder.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.unknown │ │ ├── op-matchloc2line.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.unknown │ │ ├── op-not-traced.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.unknown │ │ ├── op-reftag.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.foo │ │ ├── op-scope.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.unknown │ │ ├── op-signature.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.unknown │ │ ├── op-taction.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.unknown │ │ ├── op-tagloc.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.foo │ │ ├── op-traced.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.unknown │ │ ├── op-typeref.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.unknown │ │ └── with-foreignLanguage-flag.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-0.c │ │ └── input.xxx │ ├── paramdef.r/ │ │ ├── no-set.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.foo │ │ └── simple.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.foo │ ├── parser-I18nRubyGem.r/ │ │ ├── language-force.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.i18n │ │ ├── locale-kind.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ ├── input-0.yml │ │ │ └── input.yml │ │ ├── no-language-force.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ ├── input-0.yml │ │ │ └── input.yml │ │ ├── no-locale.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ ├── input-0.yml │ │ │ └── input.yml │ │ ├── qualified.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ ├── input-0.yml │ │ │ └── input.yml │ │ ├── simple-I18nRubyGem.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ ├── input-0.yml │ │ │ └── input.yml │ │ └── symbols.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ ├── input-0.yml │ │ └── input.yml │ ├── parser-ada.r/ │ │ ├── ada-adb.d/ │ │ │ ├── expected.tags │ │ │ └── input.adb │ │ ├── ada-ads.d/ │ │ │ ├── expected.tags │ │ │ └── input.ads │ │ ├── ada-block-tracking.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.adb │ │ │ └── validator │ │ ├── ada-char-literal.d/ │ │ │ ├── expected.tags-e │ │ │ └── input.adb │ │ ├── ada-end-without-designator.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.adb │ │ │ └── validator │ │ ├── ada-entry.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.adb │ │ │ ├── input_0.gpr │ │ │ ├── input_1.adb │ │ │ └── input_1.ads │ │ ├── ada-etags-suffix.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags-e │ │ │ ├── input.ads │ │ │ ├── input_0.adb │ │ │ └── input_0.ads │ │ ├── ada-expression-function-with-generic.d/ │ │ │ ├── expected.tags-e │ │ │ └── input.adb │ │ ├── ada-expression-function.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.adb │ │ ├── ada-function.d/ │ │ │ ├── args.ctags │ │ │ └── input.broken │ │ ├── ada-generic-in-package.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags-e │ │ │ ├── input.ads │ │ │ ├── input_1.adb │ │ │ └── input_2.ads │ │ ├── ada-is-end.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ada │ │ ├── ada-label.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.adb │ │ ├── ada-overriding.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.ads │ │ │ ├── input_2.adb │ │ │ └── input_3.ads │ │ ├── ada-partial-bug.d/ │ │ │ ├── expected.tags │ │ │ └── input.adb │ │ ├── ada-partial-bug2.d/ │ │ │ └── input.adb │ │ ├── ada-partial-type.d/ │ │ │ ├── expected.tags │ │ │ └── input.ads │ │ ├── ada-protected.d/ │ │ │ └── input.adb │ │ ├── ada-separate.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-1.adb │ │ │ └── input.adb │ │ ├── ada-string-literal.d/ │ │ │ ├── expected.tags-e │ │ │ └── input.adb │ │ ├── ada-type-new-without-with.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.adb │ │ └── ada-whitespaces-between-id-and-colon.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.adb │ ├── parser-ansibleplaybook.r/ │ │ ├── broken-input.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── features │ │ │ └── input.yml │ │ └── play-name.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.yml │ ├── parser-ant.r/ │ │ ├── regex-based.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.xml │ │ ├── xpath-based-unix.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.xml │ │ └── xpath-based.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.xml │ ├── parser-asciidoc.r/ │ │ ├── anchor-asciidoc.d/ │ │ │ ├── expected.tags │ │ │ └── input.asciidoc │ │ ├── anchor-invalid-asciidoc.d/ │ │ │ ├── expected.tags │ │ │ └── input.adoc │ │ ├── one-character-title.d/ │ │ │ ├── expected.tags │ │ │ └── input.adoc │ │ ├── simple-asciidoc.d/ │ │ │ ├── expected.tags │ │ │ └── input.asciidoc │ │ └── utf8-asciidoc.d/ │ │ ├── expected.tags │ │ └── input.asc │ ├── parser-asm.r/ │ │ ├── 68hc11.asm.d/ │ │ │ ├── expected.tags │ │ │ └── input.asm │ │ ├── asm-cpp-macro-expansion-cmdline.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.S │ │ ├── asm-cpp-macro-expansion-with-limitation.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.S │ │ ├── asm-cpp-macro-expansion-with-multi-line-args-last-items.b/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.S │ │ ├── asm-cpp-macro-expansion-with-multi-line-args.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.S │ │ ├── asm-cpp-macro-expansion.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.S │ │ │ ├── input-1.S │ │ │ ├── input-2.S │ │ │ ├── input-3.S │ │ │ ├── input-4.S │ │ │ ├── input-5.S │ │ │ ├── input-6.S │ │ │ ├── input-7.S │ │ │ └── input.S │ │ ├── bd32.s.d/ │ │ │ ├── expected.tags │ │ │ └── input.s │ │ ├── bug538629.asm.d/ │ │ │ ├── expected.tags │ │ │ └── input.asm │ │ ├── cpp-parameter-false.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.s │ │ ├── cpp-parameter-true.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.S │ │ ├── crash-when-deleting-token.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ └── input.S │ │ ├── directive-before-label.d/ │ │ │ ├── expected.tags │ │ │ └── input.s │ │ ├── gas-parameterized-comment-no-cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.s │ │ ├── gas-parameterized-comment.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.s │ │ ├── gas-parameterized-linesep-no-cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.s │ │ ├── gas-parameterized-linesep.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.s │ │ ├── gas-section.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.s │ │ │ ├── input-1.s │ │ │ └── input.s │ │ ├── gas.s.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.s │ │ ├── label-capturing.d/ │ │ │ ├── expected.tags │ │ │ └── input.S │ │ ├── label-just-before-comment-no-cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.s │ │ ├── label-just-before-comment.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.s │ │ ├── macro-params.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.asm │ │ ├── masm.asm.d/ │ │ │ ├── expected.tags │ │ │ └── input.asm │ │ ├── moniker.x68.d/ │ │ │ ├── expected.tags │ │ │ └── input.x68 │ │ └── unbalanced-end-macro.d/ │ │ ├── expected.tags │ │ └── input.S │ ├── parser-autoconf.r/ │ │ ├── disabling-m4.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ac │ │ ├── forcing-autoconf-and-disabling-m4.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.m4 │ │ ├── nested-block.ac.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ac │ │ ├── no-string-literal.d/ │ │ │ ├── expected.tags │ │ │ └── input.ac │ │ ├── simple.ac.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ac │ │ └── simple2.ac.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.ac │ ├── parser-autoit.r/ │ │ └── simple-au3.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.au3 │ ├── parser-automake.r/ │ │ ├── disable-make-parser.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.am │ │ ├── eof-value.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ └── input.am │ │ ├── langstack.am.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.am │ │ ├── noinst.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.am │ │ ├── objprefix.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.am │ │ ├── simple.am.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.am │ │ └── subdirs.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.am │ ├── parser-awk.r/ │ │ ├── functions.d/ │ │ │ ├── expected.tags │ │ │ └── input.awk │ │ ├── gawk-alias.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.unknown │ │ ├── simple-awk.d/ │ │ │ ├── expected.tags │ │ │ └── input.awk │ │ └── simple2-awk.d/ │ │ ├── expected.tags │ │ └── input.awk │ ├── parser-basic.r/ │ │ ├── basic-labels.d/ │ │ │ ├── expected.tags │ │ │ └── input.bas │ │ ├── freebasic-access.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.bas │ │ ├── freebasic-decls.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.bas │ │ ├── freebasic-namespace.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.bas │ │ ├── simple.bas.d/ │ │ │ ├── expected.tags │ │ │ └── input.bas │ │ └── simple.bb.d/ │ │ ├── expected.tags │ │ └── input.bb │ ├── parser-bats.r/ │ │ └── bats-simple.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.bats │ ├── parser-bibtex.r/ │ │ └── bib-simple.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.bib │ ├── parser-c.r/ │ │ ├── anonymous-param-in-broken-paramlist.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── input-0.c │ │ │ ├── input-1.c │ │ │ └── input.c │ │ ├── attr-attached-to-array-failed.b/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── attr-attached-to-array.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── backslash-in-input.c.d/ │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── bit_field.c.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── broken-input-cxx-operator.d/ │ │ │ └── input.c │ │ ├── bug1020715.c.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── bug1085585.c.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── bug1086609.c.d/ │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── bug1198.c.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── bug1201689.c.d/ │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── bug1458930.c.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── bug1466117.c.d/ │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── bug1491666.c.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── bug1764143.h.d/ │ │ │ ├── expected.tags │ │ │ └── input.h │ │ ├── bug2554.c.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── bug507864.c.d/ │ │ │ ├── README │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── bug556645.c.d/ │ │ │ ├── README │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── bug556646.c.d/ │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── bug945.c.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── bug950.c.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── c-define-mixed.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── c-digraphs.d/ │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── c-include.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── c-keyword-alignas.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── c-knr.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── c-label.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── c-multichars-between-single-quotes.d/ │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── c-sample.d/ │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── c-size_t-wchar_t-typedef.d/ │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── c-struct-var-with-initializer.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── c-trigraphs.d/ │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── c-var-initialized-using-macro.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── complex_decl.c.d/ │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── cxx-keywords-simple.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.h │ │ ├── cxx-scope-keywords.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.h │ │ ├── directives-2.c.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── directives.c.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── end-field-of-macro.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── end-field-of-var.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── enum-bit-fields.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── enum.c.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── extern_variable.h.b/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.h │ │ ├── func-after-typedef-for-fptr-returning-enum.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── func-after-typedef-for-fptr-returning-struct.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── func_typedef.h.d/ │ │ │ ├── expected.tags │ │ │ └── input.h │ │ ├── if0.c.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── line_directives.c.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── local.c.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── macrodef.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── macroexpand-empty-arg.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── macroexpand-typeof.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── macroexpand-with-linenum-adjustment.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── macros.c.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── option-disable-undef.c.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── properties-thread.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── properties.c.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── prototype.h.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.h │ │ ├── recursive-macros-2.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── recursive-macros.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── spurious_label_tags.c.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── static_array.c.d/ │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── using-cxx-keyword-in-c-code.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ └── vardef-surrounded-by-parentheses.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.c │ ├── parser-cargo.r/ │ │ └── simple.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.cargo │ ├── parser-clojure.r/ │ │ ├── broken-ns.d/ │ │ │ ├── expected.tags │ │ │ ├── input-0.clj │ │ │ ├── input-1.clj │ │ │ └── input.clj │ │ ├── clojure-def-in-unknown-scope.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.clj │ │ ├── clojure-metadata-in-fn.d/ │ │ │ ├── expected.tags │ │ │ └── input.clj │ │ ├── clojure-metadata-in-ns.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.clj │ │ │ └── input.clj │ │ ├── clojure-methods.b/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.clj │ │ ├── clojure-vars.b/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.clj │ │ ├── macros.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.clj │ │ └── simple-clojure.d/ │ │ ├── expected.tags │ │ └── input.clj │ ├── parser-cmake.r/ │ │ ├── cmake-comments.d/ │ │ │ ├── expected.tags │ │ │ └── input.cmake │ │ ├── cmake-function.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cmake │ │ ├── cmake-macro.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cmake │ │ ├── cmake-option.d/ │ │ │ ├── expected.tags │ │ │ └── input.cmake │ │ ├── cmake-project.d/ │ │ │ ├── expected.tags │ │ │ └── input.cmake │ │ ├── cmake-scoped-variable.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cmake │ │ ├── cmake-simple.d/ │ │ │ ├── expected.tags │ │ │ └── input.cmake │ │ ├── cmake-target.d/ │ │ │ ├── expected.tags │ │ │ └── input.cmake │ │ └── cmake-variable.d/ │ │ ├── expected.tags │ │ └── input.cmake │ ├── parser-cobol-to-review.r/ │ │ ├── HelloWorld.d/ │ │ │ ├── expected.tags │ │ │ └── input.cbl │ │ ├── HelloWorldFree.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cbl │ │ ├── HelloWorldLatin1.d/ │ │ │ ├── expected.tags │ │ │ └── input.cbl │ │ ├── MALFORMED.d/ │ │ │ ├── expected.tags │ │ │ └── input.cbl │ │ ├── README │ │ ├── TEST-PRINTER.d/ │ │ │ ├── expected.tags │ │ │ └── input.cbl │ │ ├── TEST-PRINTER2.d/ │ │ │ ├── expected.tags │ │ │ └── input.cbl │ │ ├── TEST-PRINTER3.d/ │ │ │ ├── expected.tags │ │ │ └── input.cbl │ │ ├── TEST-SINGLE-QUOTES.d/ │ │ │ ├── expected.tags │ │ │ └── input.cbl │ │ ├── VIRTUAL-PRINTER.d/ │ │ │ ├── expected.tags │ │ │ └── input.cbl │ │ └── VIRTUAL-PRINTER2.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.cbl │ ├── parser-cobol-to-review2.r/ │ │ ├── FETCHTBL.d/ │ │ │ ├── expected.tags │ │ │ └── input.cbl │ │ ├── INSERTTBL.d/ │ │ │ ├── expected.tags │ │ │ └── input.cbl │ │ ├── README │ │ └── sqlca.d/ │ │ ├── expected.tags │ │ └── input.cbl │ ├── parser-cobol.r/ │ │ ├── comments.d/ │ │ │ ├── expected.tags │ │ │ └── input.cbl │ │ ├── helloworld.d/ │ │ │ ├── expected.tags │ │ │ └── input.cbl │ │ ├── helloworld2.d/ │ │ │ ├── expected.tags │ │ │ └── input.cbl │ │ ├── issue-1324.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cbl │ │ ├── levels.d/ │ │ │ ├── expected.tags │ │ │ └── input.cbl │ │ ├── quoted-program-id.cbl.d/ │ │ │ ├── expected.tags │ │ │ └── input.cbl │ │ └── simple.cbl.d/ │ │ ├── expected.tags │ │ ├── features │ │ └── input.cbl │ ├── parser-cpreprocessor.r/ │ │ ├── asm-area.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.c │ │ │ ├── input-1.c │ │ │ ├── input-2.c │ │ │ ├── input-3.c │ │ │ ├── input-4.c │ │ │ ├── input-5.c │ │ │ ├── input-6.c │ │ │ ├── input-7.asm │ │ │ └── input.c │ │ ├── backslash-in-parameters.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.h │ │ ├── capture-params-in-macro-defs.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.h │ │ ├── disable-cpp-client--clinet-kind.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── disable-cpp-client--cpp-kind.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── disable-cpp-client.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── disable-cpp-cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.dts │ │ ├── if0-false-with-param.c.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── if0-true-with-param.c.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── macro-condition-role.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.h │ │ ├── macrodef.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.h │ │ ├── macroexpand.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.c │ │ │ ├── input-1.c │ │ │ └── input.c │ │ ├── macros-specified-with-param.c.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── simple-cpreprocessor.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── skip-newlines-in-literals.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.c │ │ │ ├── input-1.c │ │ │ └── input.c │ │ ├── unget-mbyte-string.d/ │ │ │ ├── README │ │ │ ├── input-0.lds │ │ │ ├── input-1.java │ │ │ ├── input-2.lds │ │ │ ├── input-3.java │ │ │ └── input.java │ │ └── unget-multi-bytes-string.d/ │ │ ├── README │ │ ├── input-0.lds │ │ ├── input-1.java │ │ ├── input-2.lds │ │ └── input.java │ ├── parser-csharp.r/ │ │ └── nullable-parameters.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.cs │ ├── parser-css.r/ │ │ ├── css-at-rules.d/ │ │ │ ├── expected.tags │ │ │ └── input.css │ │ ├── css-at-supports.d/ │ │ │ ├── expected.tags │ │ │ └── input.css │ │ ├── css-attribute-selectors.d/ │ │ │ ├── expected.tags │ │ │ └── input.css │ │ ├── css-comma-no-space.d/ │ │ │ ├── expected.tags │ │ │ └── input.css │ │ ├── css-namespace-selectors.d/ │ │ │ ├── expected.tags │ │ │ └── input.css │ │ ├── css-pseudo-classes.d/ │ │ │ ├── expected.tags │ │ │ └── input.css │ │ ├── css-simple.d/ │ │ │ ├── expected.tags │ │ │ └── input.css │ │ ├── css-singlequote-in-comment-issue2.d/ │ │ │ ├── expected.tags │ │ │ └── input.css │ │ ├── css-tag-types.d/ │ │ │ ├── expected.tags │ │ │ └── input.css │ │ └── css-trivial.d/ │ │ ├── expected.tags │ │ └── input.css │ ├── parser-cuda.r/ │ │ ├── cuda-sample.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cu │ │ └── param-with-default-value.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.cuh │ ├── parser-cxx.r/ │ │ ├── 1117-using-in-c.d/ │ │ │ └── input.c │ │ ├── README │ │ ├── alignas-in-struct.d/ │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── angle_bracket.cpp.d/ │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── attribute-alias.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── attribute-sections.cpp-no-ldscript.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── attribute-sections.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.c │ │ │ ├── input-1.c │ │ │ └── input.c │ │ ├── attribute.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── blocks-nesting-too-deep.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.cxx │ │ │ ├── input-1.cxx │ │ │ └── input.cxx │ │ ├── brackets.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── broken-input.d/ │ │ │ └── input.cc │ │ ├── bug-github-1111.cpp.d/ │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug-github-1671.cpp.d/ │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug-github-1675.cpp.d/ │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug-github-1781.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug-github-2263.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cc │ │ ├── bug-github-2538.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug-github-3019.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-1.cpp │ │ │ ├── input-2.cpp │ │ │ └── input.cpp │ │ ├── bug-github-3413.cpp.d/ │ │ │ ├── README │ │ │ └── input.hpp │ │ ├── bug-github-871.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug-github-pull-972.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug-issue-3166.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cxx │ │ ├── bug1020715.cpp.d/ │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug1093123.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug1187505.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug1252.cpp.d/ │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug1548443.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug1563476.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug1575055.cpp.d/ │ │ │ ├── README │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug1585745.cpp.d/ │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug1770479.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug1773926.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug1799340.cpp.d/ │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug1799343-1.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug1799343-2.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug1907083.cpp.d/ │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug1924919.cpp.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug639639.cpp.d/ │ │ │ ├── expected.tags │ │ │ └── input.h │ │ ├── bug639644.cpp.d/ │ │ │ ├── expected.tags │ │ │ └── input.h │ │ ├── bug665086.cpp.d/ │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug834.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug849591.cpp.d/ │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug852368.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── bug872494.cpp.d/ │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── c-header-as-cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.h │ │ ├── class-inheritance.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── class.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── complex-macros.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.cpp │ │ │ └── input.cpp │ │ ├── cpp-type-alias-with-using-keyword.d/ │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── cpp_destructor.cpp.d/ │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── cxx-keyword-alignas.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cxx │ │ ├── cxx-keywords-as-c-identifiers.b/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── gen-expected-tags.sh │ │ │ ├── gen-input.sh │ │ │ ├── input.h │ │ │ └── keywords.sh │ │ ├── cxx-shift-operators-in-template-parameters.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── cxx11-attributes.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── cxx11-broken-nested-attributes.cpp.d/ │ │ │ ├── expected.tags │ │ │ ├── input-0.cxx │ │ │ └── input.cxx │ │ ├── cxx11-constexpr-variable.d/ │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── cxx11-delete.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── cxx11-final.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── cxx11-lambdas.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── cxx11-noexcept.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── cxx11-override.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── cxx11-raw-strings.d/ │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── cxx11-user-defined-literals.d/ │ │ │ ├── expected.tags │ │ │ └── input.h │ │ ├── cxx11enum.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── cxx14-combined.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── cxx14-digit-separator.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── digraph-and-template-angle-confliction.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.hh │ │ ├── end-field-for-prototype-kind.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.h │ │ ├── enum-in-a-struct--with-q-extra.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cc │ │ ├── export-2.d/ │ │ │ ├── README.md │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.cpp │ │ │ └── validator │ │ ├── export-3.d/ │ │ │ ├── README.md │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.cpp │ │ │ └── validator │ │ ├── export-namespace-alias.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.cpp │ │ │ └── validator │ │ ├── export-using.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.cpp │ │ │ └── validator │ │ ├── extern.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── field-nth.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.h │ │ ├── foreach.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── func-name-in-parentheses.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.cpp │ │ │ └── input.c │ │ ├── function-return-type-via-macro.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── function-return-types.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── function_try_block.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cxx │ │ ├── functions.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── ignoring-macro-with-parameters.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.hxx │ │ ├── import-4.d/ │ │ │ ├── README.md │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.cpp │ │ │ ├── input-1.cpp │ │ │ ├── input-2.cpp │ │ │ ├── input-3.cpp │ │ │ ├── input-4.cpp │ │ │ ├── input-5.cpp │ │ │ ├── input-6.cpp │ │ │ └── input.cpp │ │ ├── import-5.d/ │ │ │ ├── README.md │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.cpp │ │ │ ├── input-1.cpp │ │ │ ├── input-2.cpp │ │ │ ├── input-3.cpp │ │ │ ├── input-4.cpp │ │ │ ├── input-5.cpp │ │ │ ├── input-6.cpp │ │ │ ├── input-7.cpp │ │ │ └── input.cpp │ │ ├── import-6.d/ │ │ │ ├── README.md │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.cpp │ │ │ ├── input-1.cpp │ │ │ ├── input-2.cpp │ │ │ └── input.cpp │ │ ├── initializer-list.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.cpp │ │ │ ├── input-1.cpp │ │ │ ├── input-2.cpp │ │ │ ├── input-3.cpp │ │ │ ├── input-4.cpp │ │ │ ├── input.h │ │ │ ├── validator │ │ │ ├── validator-0 │ │ │ ├── validator-1 │ │ │ ├── validator-2 │ │ │ ├── validator-3 │ │ │ └── validator-4 │ │ ├── inline-variables.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── instantiation.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.hpp │ │ │ └── validator │ │ ├── instantiation2.b/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.hpp │ │ │ └── validator │ │ ├── iostream.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── k-and-r.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── keyword-in-return-type.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cc │ │ ├── less-than-operator-between-anglebrackets.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── member-with-initial-value.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cc │ │ ├── modules-1.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.cpp │ │ │ ├── input-1.cpp │ │ │ ├── input-2.cpp │ │ │ ├── input-3.cpp │ │ │ ├── input-4.cpp │ │ │ ├── input-5.cpp │ │ │ ├── input-6.cpp │ │ │ ├── input-7.cpp │ │ │ ├── input-8.cpp │ │ │ ├── input-9.cpp │ │ │ ├── input.cpp │ │ │ ├── validator │ │ │ ├── validator-0 │ │ │ ├── validator-2 │ │ │ ├── validator-8 │ │ │ └── validator-9 │ │ ├── modules-8.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.cpp │ │ │ └── input.cpp │ │ ├── more-decltypes.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cxx │ │ ├── namespace-alias-in-function.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── namespace-and-preprocessor.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── namespace-and-scope.b/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── namespace.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── new-delete.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── operators.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── out-range-input-for-isspace.d/ │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── partition.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.cpp │ │ │ ├── input-1.cpp │ │ │ ├── input-2.cpp │ │ │ ├── input-3.cpp │ │ │ ├── input-4.cpp │ │ │ └── input.cpp │ │ ├── pointer-to-array.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── properties-consteval.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cc │ │ ├── properties-constexpr.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cc │ │ ├── properties-constinit.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cc │ │ ├── properties.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── prototype-starting-from-scope-op.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── rojas.h.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.h │ │ ├── scope-of-using-in-lambda-in-enum.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.cpp │ │ │ └── validator │ │ ├── signature.cpp.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── struct-keyword-not-for-defining-struct.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cc │ │ ├── template-member-forward-declaration.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── template-member-function-pointer-scope.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.cpp │ │ │ └── validator │ │ ├── template-nested-triangle-brackets.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.hpp │ │ │ ├── input-1.hpp │ │ │ ├── input-2.hpp │ │ │ ├── input-3.hpp │ │ │ ├── input.hpp │ │ │ └── validator-2 │ │ ├── template-parameters.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.h │ │ ├── template-prototype.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cc │ │ ├── template-specializations-including-op.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.cpp │ │ │ └── validator │ │ ├── template-specializations.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── templates-enable-if.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── templates-in-labmdas-1.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── templates-in-labmdas-2.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── templates.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── templates2.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── templates3.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── templates4.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── templates5.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── templates6.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.cpp │ │ │ ├── input.hpp │ │ │ └── validator │ │ ├── templates7.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.hpp │ │ │ └── validator │ │ ├── templates8.d/ │ │ │ ├── README │ │ │ └── input.cpp │ │ ├── typedef-of-function-ptr-with-macro.d/ │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── typedefs.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── unclosed-angle-bracket.d/ │ │ │ ├── README │ │ │ └── input.cxx │ │ ├── using-in-template.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── using.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── variable-declarations.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── variable-templates.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.cpp │ │ │ ├── input-1.cpp │ │ │ └── input.cpp │ │ ├── variables-in-control-statements.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ ├── variables-prototypes-2.cpp.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.cpp │ │ └── variables-prototypes.cpp.b/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.cpp │ ├── parser-d.r/ │ │ ├── d-accessmod.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.d │ │ ├── d-size_t-wchar_t-alias.d/ │ │ │ ├── expected.tags │ │ │ └── input.d │ │ ├── simple.d.d/ │ │ │ ├── expected.tags │ │ │ └── input.d │ │ └── templates.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.d │ ├── parser-dbus-inspect.r/ │ │ ├── node-as-root-with-dtd.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.xml │ │ ├── node-as-root-without-dtd.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.xml │ │ └── simple-dbus-inspect.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.xml │ ├── parser-dbus-service.r/ │ │ └── simple.d/ │ │ ├── README │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.service │ ├── parser-dtd.r/ │ │ ├── colons-in-name.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.dtd │ │ ├── condtion.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.dtd │ │ ├── elements.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.mod │ │ ├── fq.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.dtd │ │ ├── notation.d/ │ │ │ ├── expected.tags │ │ │ └── input.dtd │ │ ├── parameter-entities.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.dtd │ │ └── simple-dtd.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.dtd │ ├── parser-dts.r/ │ │ ├── dts-core-dump.d/ │ │ │ └── input.dts │ │ ├── dts-fq-core-dump.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ └── input.dts │ │ ├── dts-fq-without-scope-field.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.dts │ │ └── dts-simple.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.dts │ ├── parser-eiffel.r/ │ │ ├── aliases.e.d/ │ │ │ ├── expected.tags │ │ │ └── input.e │ │ ├── attributes.e.d/ │ │ │ ├── expected.tags │ │ │ └── input.e │ │ ├── class.e.d/ │ │ │ ├── expected.tags │ │ │ └── input.e │ │ ├── deprecated-syntax.e.d/ │ │ │ ├── README │ │ │ ├── expected.tags │ │ │ └── input.e │ │ ├── functions.e.d/ │ │ │ ├── expected.tags │ │ │ └── input.e │ │ ├── inherit-rename.e.d/ │ │ │ ├── expected.tags │ │ │ └── input.e │ │ ├── local-kind.e.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.e │ │ ├── note.e.d/ │ │ │ ├── expected.tags │ │ │ └── input.e │ │ ├── obsolete.e.d/ │ │ │ ├── expected.tags │ │ │ └── input.e │ │ ├── procedures.e.d/ │ │ │ ├── expected.tags │ │ │ └── input.e │ │ └── verbatim.e.d/ │ │ ├── expected.tags │ │ └── input.e │ ├── parser-elixir.r/ │ │ ├── elixir-callbacks.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ex │ │ ├── elixir-exceptions.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ex │ │ ├── elixir-functions.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ex │ │ ├── elixir-macros.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ex │ │ ├── elixir-modules.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ex │ │ ├── elixir-records.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ex │ │ ├── elixir-sign-operators.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ex │ │ ├── elixir-simple.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ex │ │ ├── elixir-tests.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ex │ │ ├── elixir-types.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ex │ │ └── elixir-word-operators.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.ex │ ├── parser-elm.r/ │ │ ├── elm-aliases.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.elm │ │ ├── elm-bad-lines.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-1.elm │ │ │ ├── input-2.elm │ │ │ ├── input-3.elm │ │ │ └── input.elm │ │ ├── elm-case-statements.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.elm │ │ ├── elm-comments.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.elm │ │ ├── elm-complex-types.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.elm │ │ ├── elm-constructor-signatures.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.elm │ │ ├── elm-expressions.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.elm │ │ ├── elm-functions.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.elm │ │ ├── elm-if-then-else.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.elm │ │ ├── elm-imports.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-1.elm │ │ │ └── input.elm │ │ ├── elm-just-comments.d/ │ │ │ ├── expected.tags │ │ │ └── input.elm │ │ ├── elm-let-in.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.elm │ │ ├── elm-modules.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-1.elm │ │ │ ├── input-2.elm │ │ │ ├── input-3.elm │ │ │ ├── input-4.elm │ │ │ ├── input-5.elm │ │ │ └── input.elm │ │ ├── elm-multiline-strings.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.elm │ │ ├── elm-namespaces.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.elm │ │ ├── elm-optlist-compatibility.d/ │ │ │ ├── README.md │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.elm │ │ ├── elm-parameter-capture.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.elm │ │ ├── elm-parameter-patterns.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.elm │ │ ├── elm-ports.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.elm │ │ ├── elm-single-expressions.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.elm │ │ ├── elm-type-annotations.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.elm │ │ └── elm-types.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-1.elm │ │ └── input.elm │ ├── parser-emacsLisp.r/ │ │ ├── definitions.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.el │ │ ├── misleading-names.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.el │ │ ├── newline.b/ │ │ │ ├── expected.tags │ │ │ └── input.el │ │ └── simple-emacsLisp.d/ │ │ ├── README │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.el │ ├── parser-erlang.r/ │ │ └── crash1.d/ │ │ └── input.erl │ ├── parser-flex.r/ │ │ ├── as-first-token.d/ │ │ │ ├── expected.tags │ │ │ └── input.as │ │ ├── classes.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.as │ │ ├── const.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.as │ │ ├── const2.d/ │ │ │ ├── expected.tags │ │ │ └── input.as │ │ ├── flex_comment.mxml.d/ │ │ │ ├── expected.tags │ │ │ └── input.mxml │ │ ├── flex_only_mxml.mxml.d/ │ │ │ ├── expected.tags │ │ │ └── input.mxml │ │ ├── flex_with_actionscript.mxml.d/ │ │ │ ├── expected.tags │ │ │ └── input.mxml │ │ ├── method-attributes.d/ │ │ │ ├── expected.tags │ │ │ └── input.as │ │ ├── packages.d/ │ │ │ ├── expected.tags │ │ │ └── input.as │ │ └── sampler.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.as │ ├── parser-forth.r/ │ │ └── simple-forth.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.fth │ ├── parser-fortran.r/ │ │ ├── array-spec.f90.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── array_spec.f90.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── auto.f.d/ │ │ │ ├── expected.tags │ │ │ └── input.f │ │ ├── bug565813.f90.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── bug620288.f.d/ │ │ │ ├── expected.tags │ │ │ └── input.f │ │ ├── bug629.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── bug670433.f90.d/ │ │ │ ├── README │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── bug726712.f90.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── bug726875.f90.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── bug734933.f90.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── bug858165.f90.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── bug877956.f90.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags-x │ │ │ └── input.f90 │ │ ├── byte.f.d/ │ │ │ ├── expected.tags │ │ │ └── input.f │ │ ├── char-selector.f90.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── common-json.f.d/ │ │ │ ├── expected.tags-json │ │ │ └── input.f │ │ ├── common-xref.f.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags-x │ │ │ └── input.f │ │ ├── common.f.d/ │ │ │ ├── expected.tags │ │ │ └── input.f │ │ ├── continuation.f90.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── debian_432872.f90.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── dollars-in-names.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.f │ │ │ └── validator │ │ ├── dopbl2.f.d/ │ │ │ ├── expected.tags │ │ │ └── input.f │ │ ├── fortran-abstract-implementation.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── fortran-abstract-interface.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── fortran-associate.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── fortran-bind-c.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── fortran-block.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── fortran-derived-type-params.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── fortran-enum.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── fortran-extends-qualifier.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── fortran-forall.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── fortran-interface.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── fortran-linkname.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.f │ │ ├── fortran-method.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── fortran-pointer.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── fortran-procedure-qualifiers.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── fortran-procedure.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── fortran-protected.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── fortran-signature.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── fortran-square-parens.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── fortran-submodule.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── implied_program.f.d/ │ │ │ ├── expected.tags │ │ │ └── input.f │ │ ├── initialization.f90.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── invalid_name.f90.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── lanus.for.d/ │ │ │ ├── expected.tags │ │ │ └── input.for │ │ ├── misc_types.f.d/ │ │ │ ├── expected.tags │ │ │ └── input.f │ │ ├── misc_types.f90.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── multi-input-fixed-then-free.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.f90 │ │ │ └── input.f │ │ ├── multi-input-free-then-fixed.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.f │ │ │ └── input.f90 │ │ ├── namelist.f.d/ │ │ │ ├── expected.tags │ │ │ └── input.f │ │ ├── numlib.f90.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── pure_elem.f95.d/ │ │ │ ├── README │ │ │ ├── expected.tags │ │ │ └── input.f95 │ │ ├── recursive.f95.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.f95 │ │ ├── reset-newline-state.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-1.f90 │ │ │ ├── input-2.f90 │ │ │ └── input.f90 │ │ ├── semicolon.f90.d/ │ │ │ ├── expected.tags │ │ │ └── input.f90 │ │ ├── stdcall.f.d/ │ │ │ ├── expected.tags │ │ │ └── input.f │ │ ├── structure.f.d/ │ │ │ ├── expected.tags │ │ │ └── input.f │ │ ├── union.f.d/ │ │ │ ├── expected.tags │ │ │ └── input.f │ │ └── value.f.d/ │ │ ├── expected.tags │ │ └── input.f │ ├── parser-function-parameters.r/ │ │ ├── perl-fp-test.d/ │ │ │ ├── expected.tags │ │ │ └── input.pl │ │ └── simple.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-0.pl │ │ └── input.pl │ ├── parser-fypp.r/ │ │ ├── cont.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.fy │ │ ├── emptyline.d/ │ │ │ ├── README │ │ │ ├── expected.tags │ │ │ └── input.fy │ │ ├── first-if-area.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.fy │ │ ├── if-cont.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.fy │ │ ├── if-with-no-endif.d/ │ │ │ ├── expected.tags │ │ │ └── input.fy │ │ ├── run-alt-guest.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.fy │ │ ├── run-guest.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.fy │ │ ├── segv.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ └── input.fy │ │ └── simple-fypp.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.fy │ ├── parser-gdscript.r/ │ │ ├── broken-input.d/ │ │ │ ├── README │ │ │ └── input.gd │ │ ├── class_name-extends-no-implicit-class.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.gd │ │ ├── class_name-extends.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.gd │ │ ├── inner-class.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.gd │ │ ├── modifiers.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.gd │ │ ├── no-implicit-class.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.gd │ │ ├── sample.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.gd │ │ └── signal.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-0.gd │ │ ├── input-1.gd │ │ └── input.gd │ ├── parser-gemspec.r/ │ │ └── simple-gemspec.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-0.gemspec │ │ ├── input-1.gemspec │ │ └── input.gemspec │ ├── parser-go.r/ │ │ ├── github-issue-2430.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.go │ │ │ └── validator │ │ ├── go-anonmember.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.go │ │ ├── go-crash-issue-2220.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.go │ │ │ └── validator │ │ ├── go-dont-solve-type-for-underscore-var.d/ │ │ │ ├── expected.tags │ │ │ ├── input.go │ │ │ └── validator │ │ ├── go-end-field-for-types.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.go │ │ │ └── validator │ │ ├── go-funcs.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.go │ │ │ └── validator │ │ ├── go-goroutines.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.go │ │ │ └── validator │ │ ├── go-helloworld.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.go │ │ │ └── validator │ │ ├── go-ignore-underscore-var.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.go │ │ │ └── validator │ │ ├── go-import.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.go │ │ │ ├── input-1.go │ │ │ ├── input-2.go │ │ │ ├── input-3.go │ │ │ ├── input-4.go │ │ │ ├── input-5.go │ │ │ ├── input-6.go │ │ │ ├── input-7.go │ │ │ └── input.go │ │ ├── go-incomplete-func.d/ │ │ │ └── input.go │ │ ├── go-incomplete-input.d/ │ │ │ ├── args.ctags │ │ │ └── input.go │ │ ├── go-interface.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.go │ │ │ └── src/ │ │ │ └── ext/ │ │ │ └── iface.go │ │ ├── go-op-less-than.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.go │ │ │ └── validator │ │ ├── go-scope.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.go │ │ ├── go-timeouts.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.go │ │ │ └── validator │ │ ├── go-torture.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.go │ │ │ └── validator │ │ ├── go-type-aliases.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.go │ │ ├── go-variadic-dots-broken.d/ │ │ │ ├── args.ctags │ │ │ └── input.go │ │ ├── go-variadic-dots.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.go │ │ │ └── validator │ │ └── go-vars.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.go │ ├── parser-gperf.r/ │ │ └── simple.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-0.gperf │ │ ├── input-1.perf │ │ └── input.perf │ ├── parser-haskell.r/ │ │ ├── literate-haskell1.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.lhs │ │ ├── literate-haskell2.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.lhs │ │ ├── multi-line-type-signature.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.hs │ │ └── simple-haskell.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.hs │ ├── parser-html.r/ │ │ ├── class-and-id.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.html │ │ │ └── minitrip │ │ ├── comment-in-js-2.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.html │ │ ├── comment-in-js.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.html │ │ ├── comment-starter-in-script.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.html │ │ ├── external-files.html.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.html │ │ │ └── minitrip │ │ ├── jsp-with-bom.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ └── input.html │ │ ├── jsp.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ └── input.html │ │ ├── script.html.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.html │ │ │ └── minitrip │ │ ├── simple.html.t/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.html │ │ ├── string-in-script.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.html │ │ └── whitespaces.html.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input.html │ │ └── minitrip │ ├── parser-iPythonCell.r/ │ │ ├── customizing.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── default-formats.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ └── double-sharps.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.py │ ├── parser-iniconf.r/ │ │ ├── ignore-utf8-bom.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ini │ │ └── toml-support-in-geany.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.toml │ ├── parser-inko.r/ │ │ ├── comments.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.inko │ │ ├── everything.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.inko │ │ ├── implementations.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.inko │ │ ├── let.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.inko │ │ ├── methods.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.inko │ │ ├── objects.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.inko │ │ ├── strings.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.inko │ │ └── traits.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.inko │ ├── parser-itcl.r/ │ │ ├── force-use.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.tcl │ │ ├── fq-with-namespace.b/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.tcl │ │ ├── itcl-1.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.tcl │ │ ├── itcl-2.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.tcl │ │ ├── itcl-3.d/ │ │ │ ├── expected.tags │ │ │ └── input.tcl │ │ ├── no-itcl-2.d/ │ │ │ ├── expected.tags │ │ │ └── input.tcl │ │ └── simple-itcl.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.tcl │ ├── parser-java.r/ │ │ ├── accented-latin1-identifiers.java.d/ │ │ │ ├── README │ │ │ ├── expected.tags │ │ │ └── input.java │ │ ├── anonymous-class.b/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.java │ │ ├── bug1447756.java.d/ │ │ │ ├── expected.tags │ │ │ └── input.java │ │ ├── bug1691412.java.d/ │ │ │ ├── expected.tags │ │ │ └── input.java │ │ ├── bug1777340.java.d/ │ │ │ ├── expected.tags │ │ │ └── input.java │ │ ├── bug1777344.java.b/ │ │ │ ├── expected.tags │ │ │ └── input.java │ │ ├── bug2049723.java.d/ │ │ │ ├── expected.tags │ │ │ └── input.java │ │ ├── bug2117073.java.d/ │ │ │ ├── expected.tags │ │ │ └── input.java │ │ ├── bug814263.java.d/ │ │ │ ├── expected.tags │ │ │ └── input.java │ │ ├── default-literals.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.java │ │ ├── enum.java.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.java │ │ ├── imported-role.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.java │ │ ├── infinite_loop.java.d/ │ │ │ ├── expected.tags │ │ │ └── input.java │ │ ├── java-catch-block.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.java │ │ └── java_enum.java.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.java │ ├── parser-javascript.r/ │ │ ├── 1795612.js.d/ │ │ │ ├── README │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── 1850914.js.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── 1878155.js.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── 1880687.js.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── 2023624.js.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── 3470609.js.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── babel-decorators.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── bug1950327.js.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── bug2777310.js.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── bug2888482.js.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── bug3036476.js.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── bug3571233.js.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── contextual.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── dont-append-eof-to-repr.d/ │ │ │ ├── README │ │ │ └── input.js │ │ ├── generators.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── github-issue-1389.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── github-issue-1933.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── github-issue-3641.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── github-issue-4005.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── github-issue-780.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── github-issue-900.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-arraylist.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-arrow-funcs.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.js │ │ │ ├── input.js │ │ │ └── validator │ │ ├── js-async1.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-async2.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-broken-strings.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-broken-template-backslash.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-broken-template-dollar.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-broken-template.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-class-related-unterminated.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-comma-at-end-of-object.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-commas-and-missing-semicolons.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-complex-return.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-computed-propname.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-const.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-crlf.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-default-export.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-destructural-binding-todo.b/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-1.js │ │ │ └── input.js │ │ ├── js-destructural-binding.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.js │ │ │ ├── input-1.js │ │ │ ├── input-2.js │ │ │ ├── input-3.js │ │ │ ├── input.js │ │ │ └── validator │ │ ├── js-do-while.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-empty-class-name.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-es6-class-private.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-es6-class.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-es6-mixin.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-export.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-extract-empty-property-in-json.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags-json │ │ │ ├── features │ │ │ └── input.js │ │ ├── js-extract-empty-property.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags-x │ │ │ └── input.js │ │ ├── js-fields.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-fq-tags.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-func-in-method.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-function-in-arglist.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-get-and-set.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-get-and-set2.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-getter-and-setter.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-implicit-semicolons.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-let.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-many-functions.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-methods.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-multiple-vars.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-naked-blocks.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-non-printable-in-signature.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-null-tag-for-broken-input0.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-null-tag-for-broken-input1.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-null-tag-for-broken-input2.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-null-tag-for-broken-input3.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-null-tag-for-broken-input4.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-object-value-shortcut.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-odd-method-names.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-parenthesis-rvalue.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-parse-function-block.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-qualified-name-after-new-op.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-rest-parameters.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.js │ │ │ └── validator │ │ ├── js-scope-resolution.b/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-scope.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-self-invoking-anon-func.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.ctags │ │ │ └── input.js │ │ ├── js-shebang-gjs.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nolang │ │ ├── js-shebang-node.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nolang │ │ ├── js-shebang-nodejs.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nolang │ │ ├── js-shebang-seed.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nolang │ │ ├── js-shebang.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-signature.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-skip-empty-property.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-static-block.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.js │ │ │ └── validator │ │ ├── js-string-continuation.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-sub-block-scope.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-template-strings.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-tricky-newlines.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-two-vars.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-unicode-escape-iconv.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ ├── input.js │ │ │ └── minitrip │ │ ├── js-unicode-escape-naked-surrogate.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.js │ │ │ └── minitrip │ │ ├── js-unicode-escape.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-unknown-construct-nesting.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-unterminated-leak.d/ │ │ │ └── input.js │ │ ├── js-unterminated-new.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── js-var-at-eof.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── jsFunc_tutorial.js.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── no_terminator.js.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── qualified-contextual.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── regexp.js.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── secondary_fcn_name.js.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── shift-op-jsx.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── input-0.js │ │ │ ├── input-1.js │ │ │ └── input.js │ │ ├── simple-jsx-no-guest.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.jsx │ │ │ └── input.jsx │ │ ├── simple-jsx.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.jsx │ │ │ └── input.jsx │ │ ├── simple.js.d/ │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── spread-operator.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.js │ │ ├── tagging-empty-name.d/ │ │ │ ├── README │ │ │ └── input.js │ │ └── ui5.controller.js.d/ │ │ ├── expected.tags │ │ └── input.js │ ├── parser-jni.r/ │ │ ├── broken.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ └── simple.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-0.cpp │ │ ├── input-1.cpp │ │ └── input.cpp │ ├── parser-json.r/ │ │ ├── dotted-names.d/ │ │ │ ├── expected.tags │ │ │ └── input.json │ │ ├── fq-tags.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.json │ │ ├── nulltags.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags-x │ │ │ └── input.json │ │ └── simple-json.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input.json │ │ └── validator │ ├── parser-julia.r/ │ │ ├── corner_cases.d/ │ │ │ ├── expected.tags │ │ │ └── input.jl │ │ ├── empty_line.d/ │ │ │ ├── expected.tags │ │ │ └── input.jl │ │ ├── function_scope.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.jl │ │ ├── import_module.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.jl │ │ ├── infinite_loop.d/ │ │ │ ├── expected.tags │ │ │ └── input.jl │ │ ├── julia_test.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.jl │ │ ├── parametric_constructor.d/ │ │ │ ├── expected.tags │ │ │ └── input.jl │ │ ├── scoped_macro.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.jl │ │ └── struct_attributes.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.jl │ ├── parser-kconfig.r/ │ │ ├── comment-starting-from-middle-of-lines.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.kconfig │ │ ├── macros.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.kconfig │ │ ├── simple-kconfig.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-1.kconfig │ │ │ ├── input-2.kconfig │ │ │ ├── input-3.kconfig │ │ │ ├── input-4.kconfig │ │ │ └── input.kconfig │ │ └── unbalance.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-0.kconfig │ │ ├── input-1.kconfig │ │ ├── input-2.kconfig │ │ ├── input-3.kconfig │ │ └── input.kconfig │ ├── parser-kotlin.r/ │ │ ├── kotlin-annotations.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.kt │ │ ├── kotlin-backticks.d/ │ │ │ ├── expected.tags │ │ │ └── input.kt │ │ ├── kotlin-comments.d/ │ │ │ ├── expected.tags │ │ │ └── input.kt │ │ ├── kotlin-destructuring.d/ │ │ │ ├── expected.tags │ │ │ └── input.kt │ │ ├── kotlin-extensions.d/ │ │ │ ├── expected.tags │ │ │ └── input.kt │ │ ├── kotlin-generics.d/ │ │ │ ├── expected.tags │ │ │ └── input.kt │ │ ├── kotlin-invalid-input.d/ │ │ │ ├── expected.tags │ │ │ └── input.kt │ │ ├── kotlin-rawstrings.d/ │ │ │ ├── expected.tags │ │ │ └── input.kt │ │ ├── kotlin-scope.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.kt │ │ ├── kotlin-strings.d/ │ │ │ ├── expected.tags │ │ │ └── input.kt │ │ └── kotlin-syntax.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.kt │ ├── parser-ldscript.r/ │ │ ├── anon-version.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.lds │ │ ├── cpp-out-of-band-chars.d/ │ │ │ ├── README │ │ │ ├── input-0.lds │ │ │ ├── input-1.lds │ │ │ └── input.lds │ │ ├── crash-when-deleting-token.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ └── input.lds │ │ ├── discard.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.lds │ │ ├── input-sections.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.lds │ │ ├── ld-hello.d/ │ │ │ ├── LICENSE │ │ │ ├── README │ │ │ ├── expected.tags │ │ │ └── input.ld │ │ ├── ld-symtab.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── features │ │ │ └── input.lds │ │ ├── lds-invalid-macro-call.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.lds.S │ │ ├── lds-macro-expansion.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.lds.S │ │ ├── multi-versions.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.lds │ │ ├── simple-ldscript.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.lds.S │ │ ├── sort.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.lds │ │ └── versions.d/ │ │ ├── README │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.lds │ ├── parser-lex.r/ │ │ └── simple-lex.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.l │ ├── parser-lisp.r/ │ │ ├── misleading-names.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.lisp │ │ ├── more-defsomething.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.lisp │ │ ├── newline-between-tokens.b/ │ │ │ ├── expected.tags │ │ │ └── input.l │ │ └── simple-lisp.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.l │ ├── parser-lua.r/ │ │ ├── lua-broken-nested-tables.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ └── input.lua │ │ ├── lua-double-equals.d/ │ │ │ ├── expected.tags │ │ │ └── input.lua │ │ ├── lua-equal-after-function.d/ │ │ │ ├── expected.tags │ │ │ └── input.lua │ │ ├── lua-function-in-nested-tables.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.lua │ │ ├── lua-function-in-string-literal.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.lua │ │ ├── lua-skip-curly-brackets.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.lua │ │ ├── lua-skip-whitespaces-in-name.d/ │ │ │ ├── expected.tags │ │ │ ├── input.lua │ │ │ └── minitrip │ │ └── simple.lua.d/ │ │ ├── expected.tags │ │ └── input.lua │ ├── parser-m4.r/ │ │ ├── disabling-autoconf.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.m4 │ │ ├── disabling-subparser.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.m4 │ │ ├── m4-autoconf-and-optlib.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.m4 │ │ ├── m4-comment.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.m4 │ │ ├── m4-multi-undef.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.m4 │ │ ├── m4-quotestring.b/ │ │ │ ├── DESC.rst │ │ │ ├── expected.tags │ │ │ └── input.m4 │ │ ├── m4-simple.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.m4 │ │ ├── m4-switch-lang-by-ac.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.m4 │ │ └── m4-switch-lang-by-m4.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.m4 │ ├── parser-make.r/ │ │ ├── bug2959889.mak.d/ │ │ │ ├── expected.tags │ │ │ └── input.mak │ │ ├── cpp-marcros.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.mak │ │ │ ├── input-1.mak │ │ │ ├── input-2.mak │ │ │ └── input.mak │ │ ├── in-define.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.mak │ │ ├── make.comment-in-rule.d/ │ │ │ ├── expected.tags │ │ │ └── input.mak │ │ ├── make.continuation.d/ │ │ │ ├── expected.tags │ │ │ └── input.mak │ │ ├── make.gnumake-not-special-targets.d/ │ │ │ ├── expected.tags │ │ │ └── input.mak │ │ ├── make.gnumake-pattern-rules.d/ │ │ │ ├── expected.tags │ │ │ └── input.mak │ │ ├── make.include.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.mk │ │ ├── make.multi-target.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.mak │ │ ├── make.parenthesis.d/ │ │ │ ├── expected.tags │ │ │ └── input.mk │ │ ├── make.target-with-parentheses.d/ │ │ │ ├── expected.tags │ │ │ └── input.mak │ │ ├── make.variable-on-cmdline.d/ │ │ │ ├── expected.tags │ │ │ └── input.mak │ │ ├── make.variable-set-if-undefined.d/ │ │ │ ├── expected.tags │ │ │ └── input.mak │ │ ├── override-directive.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.mak │ │ ├── same-line.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.mak │ │ ├── shell-assignment-op.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.mak │ │ └── simple.mak.t/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.mak │ ├── parser-man.r/ │ │ ├── double-quoted.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.1 │ │ └── simple.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.1 │ ├── parser-markdown.r/ │ │ ├── backquote.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.md │ │ ├── c-guest.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.md │ │ ├── code-block-under-items.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.md │ │ ├── empty-frontmatter.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── features │ │ │ └── input.md │ │ ├── footnotes.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.md │ │ ├── frontmatter.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.md │ │ │ ├── input.md │ │ │ └── languages │ │ ├── gaps-in-section-hierarchy.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.md │ │ ├── hashtags-utf8.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.md │ │ ├── packcc-parser-running-within-code-block-with-bom.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.md │ │ ├── packcc-parser-running-within-code-block.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.md │ │ ├── scope-field-markdown.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.md │ │ ├── section-prefixed-with-spaces.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.md │ │ ├── simple-markdown.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.md │ │ ├── xml-comment.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.md │ │ └── yaml-in-code-block.d/ │ │ ├── README │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.md │ ├── parser-matlab.r/ │ │ ├── matchfail.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.m │ │ ├── matlab_backtracking.m.d/ │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.m │ │ ├── matlab_setget.m.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.m │ │ └── matlab_test.m.d/ │ │ ├── expected.tags │ │ ├── features │ │ └── input.m │ ├── parser-meson.r/ │ │ ├── config-inline.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.meson │ │ │ └── input.meson │ │ ├── config.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.meson │ │ ├── escape-in-string.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.meson │ │ ├── modules.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.meson │ │ └── simple-meson.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-0.meson │ │ ├── input-1.meson │ │ ├── input-2.meson │ │ ├── input-3.meson │ │ ├── input-4.meson │ │ ├── input-5.meson │ │ ├── input-6.meson │ │ └── input.meson │ ├── parser-moose.r/ │ │ ├── no-use-only.d/ │ │ │ └── input.pm │ │ ├── parse-overrun.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pm │ │ ├── role.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pl │ │ ├── simple-moose.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.pl │ │ │ └── input.pl │ │ └── wrong-position.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.pl │ ├── parser-myrddin.r/ │ │ └── simple.d/ │ │ ├── expected.tags │ │ └── input.myr │ ├── parser-nftables.r/ │ │ ├── family-and-hook.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nft │ │ ├── nftables-all-in-one.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nft │ │ ├── nftables-counter.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nft │ │ ├── nftables-ct_helpers.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nft │ │ ├── nftables-define_sets_and_maps.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nft │ │ ├── nftables-flowtable.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nft │ │ ├── nftables-limits.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nft │ │ ├── nftables-named_ct_objects.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nft │ │ ├── nftables-quota.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nft │ │ ├── nftables-secmark.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nft │ │ └── nftables-synproxy.d/ │ │ ├── README │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.nft │ ├── parser-nsis.r/ │ │ ├── include.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nsi │ │ ├── langstr.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nsi │ │ ├── section_groups.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nsi │ │ ├── simple-nsis.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nsi │ │ └── various-sections.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.nsi │ ├── parser-objectivec.r/ │ │ ├── crash-in-parsing-protocol.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.h │ │ │ └── input.h │ │ ├── objc-extern-c.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.m │ │ │ └── input.h │ │ ├── objc-signature.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.m │ │ ├── objc.m.d/ │ │ │ ├── expected.tags │ │ │ └── input.m │ │ ├── objc_underscore.d/ │ │ │ ├── expected.tags │ │ │ └── input.mm │ │ ├── objectivec_implementation.m.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.m │ │ ├── objectivec_interface.h.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.h │ │ ├── objectivec_property.h.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.h │ │ └── objectivec_protocol.h.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.h │ ├── parser-ocaml.r/ │ │ ├── github-451-improved.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ml │ │ ├── ocamlAllKinds.ml.t/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ml │ │ ├── ocamlCommentInStringAllowed.ml.d/ │ │ │ ├── expected.tags │ │ │ └── input.ml │ │ ├── ocaml_empty.ml.d/ │ │ │ ├── expected.tags │ │ │ └── input.ml │ │ ├── ocaml_empty.ml_etags.d/ │ │ │ ├── expected.tags-e │ │ │ └── input.ml │ │ ├── ocaml_empty.ml_xref.d/ │ │ │ ├── expected.tags-x │ │ │ └── input.ml │ │ ├── ocaml_only_str.ml.d/ │ │ │ ├── expected.tags │ │ │ └── input.ml │ │ ├── ocaml_string_tests.ml.d/ │ │ │ ├── expected.tags │ │ │ └── input.ml │ │ └── ocaml_two_files.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-0.ml │ │ └── input.ml │ ├── parser-odin.r/ │ │ ├── odin-attributes.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.odin │ │ ├── odin-basic.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.odin │ │ ├── odin-comments.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.odin │ │ ├── odin-enums.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.odin │ │ ├── odin-foreign.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.odin │ │ ├── odin-imports.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.odin │ │ ├── odin-incomplete.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.odin │ │ ├── odin-procs.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.odin │ │ ├── odin-scope.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.odin │ │ ├── odin-structs.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.odin │ │ ├── odin-types.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.odin │ │ ├── odin-unions.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.odin │ │ ├── odin-vars-consts.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.odin │ │ └── odin-when.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.odin │ ├── parser-openapi.r/ │ │ ├── broken-input.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── features │ │ │ └── input.yml │ │ ├── crash-test.d/ │ │ │ ├── README │ │ │ └── input.yml │ │ ├── openapi.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.yaml │ │ └── swagger.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.yaml │ ├── parser-org.r/ │ │ └── simple-org.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.org │ ├── parser-pascal.r/ │ │ ├── bug612019.pas.t/ │ │ │ ├── expected.tags │ │ │ └── input.pas │ │ ├── comment-after-keyword.d/ │ │ │ ├── expected.tags │ │ │ └── input.pas │ │ ├── simple-pascal.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pas │ │ └── various-comments.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.pas │ ├── parser-perl.r/ │ │ ├── bug612621.pl.d/ │ │ │ ├── expected.tags │ │ │ └── input.pl │ │ ├── bug842077.pl.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pl │ │ ├── curly-bracket.d/ │ │ │ ├── expected.tags │ │ │ └── input.pl │ │ ├── format.pl.d/ │ │ │ ├── expected.tags │ │ │ └── input.pl │ │ ├── no-heredoc.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.pl │ │ │ └── input.pl │ │ ├── package.pm.d/ │ │ │ ├── expected.tags │ │ │ └── input.pm │ │ ├── perl-autoloader.d/ │ │ │ ├── expected.tags │ │ │ └── input.pm │ │ ├── perl-module.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pl │ │ ├── perl-pod-after-end-no-guest.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-1.pl │ │ │ └── input.pl │ │ ├── perl-pod-after-end.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-1.pl │ │ │ └── input.pl │ │ ├── perl-selfloader.d/ │ │ │ ├── expected.tags │ │ │ └── input.pm │ │ ├── perl-two-line-package.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pm │ │ ├── simple.pl.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pl │ │ └── skip-heredoc.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-0.pl │ │ └── input.pl │ ├── parser-php.r/ │ │ ├── anonymous_functions.php.d/ │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── bug681824.php.d/ │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── classes.php.d/ │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── combined.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── coverage.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── mode.php.d/ │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── nullable-return-type-decl.d/ │ │ │ ├── args.tags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-7-4-typed-props-with-use-trait.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-7-4-typed-props.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-anonymous-classes.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-anonymous_functions.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-bug681824.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-case_sensitivity.d/ │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-classes.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-echo-tag.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-full-qualified-tags-no-esc.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-full-qualified-tags.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-heredoc-cr.d/ │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-heredoc.d/ │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-marker.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.unknown-lang │ │ ├── php-mode.d/ │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-namespaces.d/ │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-namespaces2.d/ │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-php5_5_class_kw.d/ │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-return-type-declaration.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-semi-reserved-keywords.d/ │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-simple.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-strings.d/ │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-traits.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-use.d/ │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── php-whitespaces.d/ │ │ │ ├── expected.tags │ │ │ ├── input.php │ │ │ └── minitrip │ │ ├── run-as-guest-with-bom.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sh │ │ ├── run-as-guest.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sh │ │ ├── run-guest-nested.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── run-guest-with-bom.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── run-guest.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── simple.php.d/ │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── traits.php.d/ │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── whitespaces.php.d/ │ │ │ ├── expected.tags │ │ │ ├── input.php │ │ │ └── minitrip │ │ ├── wp-guest-crlf.b/ │ │ │ ├── .gitattributes │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── wp-guest-with-bom.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ ├── wp-guest.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.php │ │ └── xml.d/ │ │ ├── expected.tags │ │ └── input.php │ ├── parser-pod.r/ │ │ ├── broken-levels.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pod │ │ └── simple-pod.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.pod │ ├── parser-powershell.r/ │ │ ├── class-powershell.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ps1 │ │ ├── enum-powershell.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ps1 │ │ ├── filter-powershell.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ps1 │ │ ├── herestring.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.ps1 │ │ │ ├── input-1.ps1 │ │ │ ├── input-2.ps1 │ │ │ ├── input-3.ps1 │ │ │ ├── input-4.ps1 │ │ │ ├── input-5.ps1 │ │ │ ├── input-6.ps1 │ │ │ └── input.ps1 │ │ └── simple-powershell.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.ps1 │ ├── parser-prolog.r/ │ │ ├── code.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pl │ │ ├── dcg.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pl │ │ ├── module.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.pl │ │ │ └── validator │ │ ├── simple-flat-comment.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.pl │ │ │ └── validator │ │ ├── simple.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pl │ │ └── validator │ ├── parser-protobuf.r/ │ │ ├── package-name-including-dot.d/ │ │ │ ├── expected.tags │ │ │ └── input.proto │ │ ├── protobuf-group.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.proto │ │ ├── protobuf-oneof.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.proto │ │ ├── simple-protobuf.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.proto │ │ ├── syntax-proto3.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.proto │ │ └── version-2-3-files.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-0.proto │ │ └── input.proto │ ├── parser-puppetManifest.r/ │ │ ├── README.md │ │ ├── class-with-parameters.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── nested-blocks.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── node.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-aliastest.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-append.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.pp │ │ │ └── validator │ │ ├── puppet-argumentdefaults.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-arithmetic_expression.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-arraytrailingcomma.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-casestatement.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-classheirarchy.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-classincludes.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-classname.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-classpathtest.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-collection.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-collection_override.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-collection_within_virtual_definitions.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-componentmetaparams.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-componentrequire.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-deepclassheirarchy.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-defineoverrides.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-definitionname.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-emptyclass.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-emptyexec.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-emptyif.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-emptyifelse.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-falsevalues.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-filecreate.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-fqdefinition.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-fqparents.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-funccomma.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-hash.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-ifexpression.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-implicititeration.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-multilinecomments.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-multipleclass.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-multipleinstances.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-multisubs.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-namevartest.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-scopetest.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-selectorvalues.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-simpledefaults.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-simpleselector.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-singleary.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-singlequote.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-singleselector.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-subclass_name_duplication.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── puppet-tag.b/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ └── input.pp │ │ ├── puppet-tagged.b/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ └── input.pp │ │ ├── puppet-virtualresources.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── root-sep.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── typealias.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── unless.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pp │ │ ├── validator │ │ └── varname.d/ │ │ ├── expected.tags │ │ └── input.pp │ ├── parser-python.r/ │ │ ├── async.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── blanks.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── bug1764148.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.bug1764148 │ │ ├── bug1809024.py.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── bug1856363.py.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── bug1906062.py.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── bug1988026.py.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── bug1988027.py.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── bug1988130.py.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── bug2075402.py.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── bug3168705.py.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── bug699171.py.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── cython-external.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pyx │ │ ├── cython_sample.pyx.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pyx │ │ ├── cython_sample2.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.pyx │ │ ├── dotted-variable-leftovers.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── f-strings.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── matrix-multiplication-operator.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── multiline-arglist.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── multiline-class-def.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── multiline-def.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── nested-parenthesis.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── newlines-cr.b/ │ │ │ ├── README │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── newlines-crlf.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── pep604-bar-operator-for-union.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── py-skipped-string.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python-access.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python-anonymous-nestlevel_ctags-bug-356.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python-arguments.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python-comments.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python-decorators.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python-disable-member-kind.d/ │ │ │ ├── args.ctags │ │ │ └── input.py │ │ ├── python-dot-in-import.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python-dotted-variable.d/ │ │ │ ├── README │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python-end-field.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python-fullqualified-tags.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python-geany-bug-612.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python-import.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python-keyword-tabulation.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python-local-lambdas.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python-local-variables.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python-multivar-no-declaration.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python-multivar-statement-with-lambdas.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python-multivar-statement.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python-semicolon.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python2-arglists.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python3-arglists.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── python3-function-annotations.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── reserved-words.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── simple.py.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── simpleNamespace.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.py │ │ │ └── input.py │ │ ├── strings.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── tabindent.py.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── test.py.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── toplevel-funcall-with-keyword-args.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── triple-quotes-after-def.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── triple-quotes-in-class.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── triple-quotes-in-default-arg.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── triple-quotes-in-list.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── triple-quotes.d/ │ │ │ ├── expected.tags │ │ │ └── input.py │ │ ├── type-statements.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.py │ │ │ └── input.py │ │ ├── typehint.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.py │ │ │ └── validator │ │ ├── underscore-numeric-literals.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.py │ │ └── variable-annotations.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.py │ ├── parser-qemuhx.r/ │ │ ├── disable.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.hx │ │ ├── enable.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.hx │ │ ├── optscript-translation.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.hx │ │ └── rst.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.hx │ ├── parser-qtmoc.r/ │ │ └── simple-qt.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.h │ ├── parser-quarto.r/ │ │ ├── simple.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.qmd │ │ └── unexecuted-block.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.qmd │ ├── parser-r.r/ │ │ ├── r-avoid-duplication.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.r │ │ ├── r-broken-input.d/ │ │ │ ├── README │ │ │ ├── input-0.r │ │ │ ├── input-1.r │ │ │ ├── input-2.r │ │ │ └── input.r │ │ ├── r-dataframe.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.r │ │ ├── r-dots.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.r │ │ ├── r-extended.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.r │ │ ├── r-external-entities.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.r │ │ │ └── input.r │ │ ├── r-list-indexing.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.r │ │ ├── r-loop-counters.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.r │ │ ├── r-nested-vector.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.r │ │ ├── r-scope.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-2.r │ │ │ ├── input-3.r │ │ │ ├── input-4.r │ │ │ ├── input-5.r │ │ │ ├── input-6.r │ │ │ ├── input-7.r │ │ │ ├── input-8.r │ │ │ └── input.r │ │ ├── r-signature.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.r │ │ ├── r-simple.d/ │ │ │ ├── expected.tags │ │ │ └── input.r │ │ ├── r-upper-scope-assignement.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.r │ │ ├── r-uppercase-extension.d/ │ │ │ ├── expected.tags │ │ │ └── input.R │ │ └── r-vector.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.r │ ├── parser-r6class.r/ │ │ ├── infinite-loop.d/ │ │ │ ├── input-0.r │ │ │ └── input.r │ │ ├── r6-null-pointer-regression.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.r │ │ ├── r6prefix.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.r │ │ └── simple-r6class.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.r │ ├── parser-rake.r/ │ │ ├── anonymous.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rake │ │ ├── crash.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rake │ │ ├── simple-rake.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rake │ │ └── xtasks.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-0.rake │ │ ├── input-1.rake │ │ └── input.rake │ ├── parser-raku.r/ │ │ ├── raku-bunch1.d/ │ │ │ ├── expected.tags │ │ │ └── input.rakumod │ │ ├── raku-bunch2.d/ │ │ │ ├── expected.tags │ │ │ └── input.rakumod │ │ └── raku-package.d/ │ │ ├── expected.tags │ │ └── input.rakumod │ ├── parser-rdoc.r/ │ │ ├── run-as-guest.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.rb │ │ │ └── languages │ │ ├── simple-rdoc.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.rdoc │ │ │ └── languages │ │ └── too-deep-level.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input.rdoc │ │ └── languages │ ├── parser-relaxng.r/ │ │ ├── element.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.rng │ │ └── grammar.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.rng │ ├── parser-restructuredtext.r/ │ │ ├── citation.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rst │ │ ├── code-blocks.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.rst │ │ │ ├── input-1.rst │ │ │ ├── input-2.rst │ │ │ └── input.rst │ │ ├── iso8859-1-restructuredtext.d/ │ │ │ ├── expected.tags │ │ │ └── input.rst │ │ ├── markup-line-with-spaces.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rst │ │ ├── simple-restructuredtext.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rst │ │ ├── substdef.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rst │ │ ├── target-restructuredtext.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rst │ │ ├── title.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.rst │ │ │ ├── input-1.rst │ │ │ ├── input-2.rst │ │ │ └── input.rst │ │ └── utf8-restructuredtext.d/ │ │ ├── expected.tags │ │ └── input.rst │ ├── parser-rmarkdown.r/ │ │ ├── frontmatter.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.rmd │ │ │ └── languages │ │ └── simple-rmarkdown.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.rmd │ ├── parser-robot.r/ │ │ ├── dashes-in-identifiers.d/ │ │ │ ├── README │ │ │ ├── expected.tags │ │ │ └── input.robot │ │ ├── keyword-started-from-varref.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.robot │ │ ├── simple-robot-no-extra.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.robot │ │ └── simple-robot.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.robot │ ├── parser-rpmMacros.r/ │ │ ├── lua.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.macros │ │ └── simple.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-0.macros │ │ ├── input-1.macros │ │ ├── input-2.macros │ │ └── input.macros │ ├── parser-rpmspec.r/ │ │ ├── empty-line-in-macro.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.spec │ │ └── simple-rpmspec.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.spec │ ├── parser-rspec.r/ │ │ ├── broken-input.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ └── input.rb │ │ └── simple-rspec.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.rb │ ├── parser-ruby.r/ │ │ ├── bug1742588.rb.d/ │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-alias.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.rb │ │ │ └── input.rb │ │ ├── ruby-anonymouse-class.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-attr.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-block-assign.d/ │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-block-call.d/ │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-class-method-in-lt-lt-self.d/ │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-class-method-with-prefixing-self.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-curly-brackets.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.rb │ │ │ ├── input-1.rb │ │ │ ├── input-2.rb │ │ │ └── input.rb │ │ ├── ruby-define-method.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-doc.d/ │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-geany-sf-bug-302.d/ │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-geany-sf-bug-542.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-inheritance.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-kind-option.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-library.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-methods-for-visiblity.d/ │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-mixin-field.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-modules-indirect.b/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-modules.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-namespaced-class.d/ │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-scope-after-anonymous-class.d/ │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-sending-define-method.b/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-sf-bug-364.d/ │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-signature-field-complicated.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-signature-field.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── ruby-skip-data.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ ├── simple.rb.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rb │ │ └── validator │ ├── parser-rust.r/ │ │ ├── defs-in-macro-arguments.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rs │ │ ├── rust-const-fn.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.rs │ │ │ └── input.rs │ │ ├── rust-simple.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.rs │ │ ├── rust-test_input.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rs │ │ ├── rust-test_input2.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.rs │ │ ├── rust-visibility-spec.d/ │ │ │ ├── args.crags │ │ │ ├── expected.tags │ │ │ └── input.rs │ │ └── rust-vstringput-eof.d/ │ │ ├── README │ │ └── input.rs │ ├── parser-scdoc.r/ │ │ ├── end-with-subsection.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.scd │ │ └── simple-scdoc.d/ │ │ ├── README │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.scd │ ├── parser-scheme.r/ │ │ ├── scheme-simple-define.d/ │ │ │ ├── expected.tags │ │ │ └── input.scm │ │ ├── scheme-simple-setbang.d/ │ │ │ ├── expected.tags │ │ │ └── input.scm │ │ ├── scheme-srfi-30-comment.b/ │ │ │ ├── expected.tags │ │ │ └── input.scm │ │ └── scheme-string.b/ │ │ ├── expected.tags │ │ └── input.scm │ ├── parser-scss.r/ │ │ ├── function.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.scss │ │ ├── mixin.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.scss │ │ ├── placeholder.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.scss │ │ ├── selectors.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.scss │ │ ├── use.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.scss │ │ └── variable.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.scss │ ├── parser-selinux-interface.r/ │ │ └── simple.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.if │ ├── parser-selinux-type-enforcement.r/ │ │ ├── modules.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.te │ │ │ └── input.te │ │ └── simple.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.te │ ├── parser-sh.r/ │ │ ├── array-alike-function.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.bash │ │ ├── function-identifiers-bash.d/ │ │ │ ├── expected.tags │ │ │ └── input.bash │ │ ├── function-identifiers-no-function-keyword-bash.d/ │ │ │ ├── expected.tags │ │ │ └── input.bash │ │ ├── sh-alias.d/ │ │ │ ├── expected.tags │ │ │ ├── input-0.zsh │ │ │ └── input.sh │ │ ├── sh-comments.d/ │ │ │ ├── expected.tags │ │ │ └── input.sh │ │ ├── sh-heredoc-broken.d/ │ │ │ └── input.sh │ │ ├── sh-heredoc-broken2.d/ │ │ │ └── input.sh │ │ ├── sh-heredoc-checks.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sh │ │ ├── sh-heredoc-env-with-no-command.d/ │ │ │ └── input.sh │ │ ├── sh-heredoc-role.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sh │ │ ├── sh-heredoc-run-guest-parser-with-external-libs-and-bom.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ ├── input-0.sh │ │ │ └── input.sh │ │ ├── sh-heredoc-run-guest-parser-with-external-libs.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ ├── input-0.sh │ │ │ └── input.sh │ │ ├── sh-heredoc-run-guest-parser-with-packcc-with-bom.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.sh │ │ ├── sh-heredoc-run-guest-parser-with-packcc.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.sh │ │ ├── sh-heredoc-run-guest-parser.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sh │ │ ├── sh-heredoc.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sh │ │ ├── sh-herestring.d/ │ │ │ ├── expected.tags │ │ │ └── input.sh │ │ ├── sh-modeline-1-emacs-shell-script.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nolang │ │ ├── sh-modeline-2-emacs-shell-script.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nolang │ │ ├── sh-modeline-at-eof-emacs-shell-script.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.nolang │ │ ├── sh-quoted-func.d/ │ │ │ ├── expected.tags │ │ │ └── input.sh │ │ ├── sh-quotes.d/ │ │ │ ├── expected.tags │ │ │ └── input.sh │ │ ├── sh-source.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sh │ │ ├── sh-spaces-in-funcdef.d/ │ │ │ ├── expected.tags │ │ │ ├── input.sh │ │ │ └── minitrip │ │ ├── sh-statements.d/ │ │ │ ├── expected.tags │ │ │ └── input.sh │ │ ├── simple.ksh.d/ │ │ │ ├── expected.tags │ │ │ └── input.ksh │ │ ├── simple.sh.d/ │ │ │ ├── README │ │ │ ├── expected.tags │ │ │ └── input.sh │ │ └── zsh-traced-function.d/ │ │ ├── expected.tags │ │ └── input.zsh │ ├── parser-sinex.r/ │ │ ├── degraded_length.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.snx │ │ ├── degraded_missing_end.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.snx │ │ ├── degraded_missing_start.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.snx │ │ ├── ok_4_blocks.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.snx │ │ └── trailing_spaces.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.snx │ ├── parser-sql.r/ │ │ ├── 3184782.sql.d/ │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── bug1324663.sql.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── bug1428714.sql.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── bug1570779.sql.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── bug1938565.sql.d/ │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── bug1944150.sql.d/ │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── bug2961855.sql.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── bug629115.sql.d/ │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── bug722501.sql.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── bug823000.sql.d/ │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── comment-as-identifier.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── countall.sql.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── db-trig.sql.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.sql │ │ │ └── input.sql │ │ ├── funcions.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.sql │ │ │ └── input.sql │ │ ├── hex2dec.sql.d/ │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── is-as-funcname.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── labels.sql.r/ │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── partial.d/ │ │ │ └── input.sql │ │ ├── random.sql.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── readlob.sql.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── readlong.sql.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── refcurs.sql.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── sharp-comment.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── sql-create-database.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── sql-create-extension.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── sql-create-schema.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── sql-create-table-as.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── sql-create-table-extra-select.b/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── sql-create-table-if-not-exists.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── sql-create-table-select.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── sql-create-view-if-not-exists.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── sql-plsql-ccflags.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── sql-plsql-inquiry-directive.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-1.sql │ │ │ ├── input-2.sql │ │ │ └── input.sql │ │ ├── sql-plsql-selection-directive.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── sql_pgSQL_dollar_quote.d/ │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── sql_pgSQL_dollar_quote_complicated.d/ │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── sql_pgSQL_empty_decl.d/ │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── sql_pgSQL_guest.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── sql_pgSQL_with_function_x.d/ │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── sql_pgSQL_with_language_internal.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── sql_single_quote.sql.d/ │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── transaction.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ └── types.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-0.sql │ │ ├── input-1.sql │ │ └── input.sql │ ├── parser-svg.r/ │ │ ├── defs.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── features │ │ └── simple-svg.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── features │ ├── parser-systemdunit.r/ │ │ └── simple-systemdunit.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.service │ ├── parser-systemtap.r/ │ │ ├── functions.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.stp │ │ ├── macros.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.stpm │ │ ├── probes.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.stp │ │ └── vars.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.stp │ ├── parser-tcl.r/ │ │ ├── comments.tcl.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.tcl │ │ ├── dollar-in-regex.d/ │ │ │ ├── expected.tags │ │ │ └── input.tcl │ │ ├── duplication-tags-in-autofq.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.tcl │ │ ├── end-of-cmdline.d/ │ │ │ ├── expected.tags │ │ │ └── input.tcl │ │ ├── escaping.d/ │ │ │ ├── expected.tags │ │ │ ├── input-0.tcl │ │ │ └── input.tcl │ │ ├── namespace-disabled.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.tcl │ │ ├── namespace.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.tcl │ │ ├── nulltags.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags-x │ │ │ └── input.tcl │ │ ├── prefixed-proc.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.tcl │ │ ├── signature.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.tcl │ │ ├── simple.tcl.d/ │ │ │ ├── expected.tags │ │ │ └── input.tcl │ │ ├── tcl-issue-1368.d/ │ │ │ ├── expected.tags │ │ │ └── input.tcl │ │ └── tcl-issue-3638.d/ │ │ ├── args.ctags │ │ └── input.tcl │ ├── parser-tcloo.r/ │ │ ├── force-use.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.tcl │ │ ├── namespace-class.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.tcl │ │ ├── namespace-wildcard.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.tcl │ │ ├── no-class-in-create.d/ │ │ │ └── input.tcl │ │ ├── no-empty-line-between-classes.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.tcl │ │ └── simple-tcloo.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.tcl │ ├── parser-terraform.r/ │ │ ├── data.d/ │ │ │ ├── expected.tags │ │ │ └── input.tf │ │ ├── local.d/ │ │ │ ├── expected.tags │ │ │ └── input.tf │ │ ├── module.d/ │ │ │ ├── expected.tags │ │ │ └── input.tf │ │ ├── output.d/ │ │ │ ├── expected.tags │ │ │ └── input.tf │ │ ├── provider.d/ │ │ │ ├── expected.tags │ │ │ └── input.tf │ │ ├── resource.d/ │ │ │ ├── expected.tags │ │ │ └── input.tf │ │ ├── simple-terraform.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.tfvars │ │ │ └── input.tf │ │ └── variable.d/ │ │ ├── expected.tags │ │ └── input.tf │ ├── parser-tex.r/ │ │ ├── bibitem.d/ │ │ │ ├── expected.tags │ │ │ └── input.tex │ │ ├── bug2886870.tex.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.tex │ │ ├── cleveref-label.d/ │ │ │ ├── expected.tags │ │ │ └── input.tex │ │ ├── empty-arg.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.tex │ │ ├── intro.tex.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.tex │ │ ├── intro_orig.tex.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.tex │ │ ├── newcommand.d/ │ │ │ ├── expected.tags │ │ │ └── input.tex │ │ ├── newcounter.d/ │ │ │ ├── expected.tags │ │ │ └── input.tex │ │ ├── newenvironment.d/ │ │ │ ├── expected.tags │ │ │ └── input.tex │ │ ├── state-cleanup.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.tex │ │ │ └── input.tex │ │ ├── unicode-sections.d/ │ │ │ ├── expected.tags │ │ │ └── input.tex │ │ └── xinput.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-1.tex │ │ ├── input-2.tex │ │ ├── input-3.bib │ │ └── input.tex │ ├── parser-thrift.r/ │ │ ├── cpp_include.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.thrift │ │ ├── exception.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.thrift │ │ │ └── input.thrift │ │ ├── include.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.thrift │ │ └── simple-thrift.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.thrift │ ├── parser-toml.r/ │ │ ├── garbage-at-eof.b/ │ │ │ ├── README │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.toml │ │ ├── run-as-guest-with-bom.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.md │ │ ├── run-as-guest.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.md │ │ └── simple.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ ├── input-0.toml │ │ └── input.toml │ ├── parser-ttcn.r/ │ │ ├── ttcn-altstep.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ttcn │ │ ├── ttcn-comments.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.ttcn │ │ │ ├── input-1.ttcn │ │ │ └── input.ttcn │ │ ├── ttcn-component.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ttcn │ │ ├── ttcn-constants.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ttcn │ │ ├── ttcn-enum.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ttcn │ │ ├── ttcn-function.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ttcn │ │ ├── ttcn-group.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ttcn │ │ ├── ttcn-module.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ttcn │ │ ├── ttcn-numbers.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ttcn │ │ ├── ttcn-signature.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ttcn │ │ ├── ttcn-strings-with-quotes.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ttcn │ │ ├── ttcn-strings.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ttcn │ │ ├── ttcn-template-function.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ttcn │ │ ├── ttcn-template-restriction.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ttcn │ │ ├── ttcn-template-template.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ttcn │ │ ├── ttcn-template-type.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ttcn │ │ ├── ttcn-template-variables-and-constants.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ttcn │ │ ├── ttcn-template.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ttcn │ │ ├── ttcn-testcase.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ttcn │ │ ├── ttcn-timer.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ttcn │ │ ├── ttcn-types.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ttcn │ │ └── ttcn-variables.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.ttcn │ ├── parser-typescript.r/ │ │ ├── README │ │ ├── github-issue-4313.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ ├── skip-bang.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.ts │ │ │ ├── input-1.ts │ │ │ ├── input.ts │ │ │ └── validator │ │ ├── ts-class-fq-white.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ ├── ts-class-fq.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ ├── ts-class-member-init.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ ├── ts-class-member-with-props.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.ts │ │ │ └── validator │ │ ├── ts-class-white.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ ├── ts-class.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.ts │ │ │ └── input.ts │ │ ├── ts-const.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ ├── ts-decorators-white.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ ├── ts-decorators.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ ├── ts-enum-white.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ ├── ts-enum.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ ├── ts-function-variable-white.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ ├── ts-function-variable.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ ├── ts-function-white.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ ├── ts-function.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ ├── ts-generators.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.ts │ │ │ └── validator │ │ ├── ts-interface-white.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ ├── ts-interface.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ ├── ts-namespace-with-fq-name-white.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ ├── ts-namespace-with-fq-name.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ ├── ts-namespaces-white.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ ├── ts-namespaces.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ ├── ts-type-white.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.ts │ │ └── ts-type.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.ts │ ├── parser-typespec.r/ │ │ └── simple-typespec.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.tsp │ ├── parser-unknown.r/ │ │ ├── etags.d/ │ │ │ ├── expected.tags-e │ │ │ └── input.unknown │ │ ├── no-unknown-parser.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.unknown │ │ ├── unknown-parser-with-some-lines.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.unknown │ │ └── unknown-parser.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.unknown │ ├── parser-v.r/ │ │ ├── helloworld.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.v │ │ ├── torture.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-1.v │ │ │ └── input.v │ │ ├── v-const.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-1.v │ │ │ └── input.v │ │ ├── v-enum.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-1.v │ │ │ └── input.v │ │ ├── v-expr.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-1.v │ │ │ ├── input-2.v │ │ │ └── input.v │ │ ├── v-extern.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.v │ │ ├── v-fn.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-1.v │ │ │ ├── input-2.v │ │ │ ├── input-3.v │ │ │ ├── input-4.v │ │ │ ├── input-5.v │ │ │ ├── input-6.v │ │ │ └── input.v │ │ ├── v-import.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-1.v │ │ │ ├── input-2.v │ │ │ ├── input-3.v │ │ │ └── input.v │ │ ├── v-match.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-1.v │ │ │ ├── input-2.v │ │ │ ├── input-3.v │ │ │ ├── input-4.v │ │ │ └── input.v │ │ ├── v-misc.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.v │ │ ├── v-statements.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-1.v │ │ │ ├── input-2.v │ │ │ ├── input-3.v │ │ │ ├── input-4.v │ │ │ ├── input-5.v │ │ │ ├── input-6.v │ │ │ └── input.v │ │ ├── v-struct.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-1.v │ │ │ ├── input-2.v │ │ │ ├── input-3.v │ │ │ ├── input-4.v │ │ │ ├── input-5.v │ │ │ ├── input-6.v │ │ │ ├── input-7.v │ │ │ └── input.v │ │ └── v-type.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-1.v │ │ └── input.v │ ├── parser-varlink.r/ │ │ ├── varlink-enum.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.varlink │ │ └── varlink-type-method-error.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.varlink │ ├── parser-vera.r/ │ │ └── vera-interface.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.vr │ ├── parser-verilog.r/ │ │ ├── systemverilog-2d-array.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-assertion.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.sv │ │ │ └── validator │ │ ├── systemverilog-assignment.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.sv │ │ │ └── validator │ │ ├── systemverilog-basic.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-block.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-checker.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.sv │ │ │ └── validator │ │ ├── systemverilog-class.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-clocking.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-constraint.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-covergroup.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-directive.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.sv │ │ │ └── validator │ │ ├── systemverilog-github2635.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-github3457.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.sv │ │ │ └── validator │ │ ├── systemverilog-github3462.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-github3712.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-github4056.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-github4109.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-github646.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.sv │ │ │ └── validator │ │ ├── systemverilog-illegal.d/ │ │ │ ├── args.ctags │ │ │ ├── input-0-2724.sv │ │ │ ├── input-1-2738.sv │ │ │ └── input.sv │ │ ├── systemverilog-interface.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-module.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-net-var.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.sv │ │ │ └── validator │ │ ├── systemverilog-nocontext.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-nulltags.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags-x │ │ │ └── input.sv │ │ ├── systemverilog-package.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-parameter.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-procedural.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-program.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-prototype.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-qualifiers.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-string.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-struct.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-symtab.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-task-function.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-typed-parameter.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── systemverilog-typedef.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── validator │ │ ├── verilog-2001.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.v │ │ ├── verilog-basic.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.v │ │ ├── verilog-escaped-id.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.v │ │ ├── verilog-github624.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.v │ │ │ └── validator │ │ ├── verilog-instance.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.v │ │ ├── verilog-memleak.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input.v │ │ │ └── validator │ │ ├── verilog-module-ref.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.v │ │ ├── verilog-multiline-macro.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sv │ │ ├── verilog-nocontext.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.v │ │ ├── verilog-sf_bug108_1.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.v │ │ ├── verilog-sf_bug108_2.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.v │ │ ├── verilog-sf_bug174.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.v │ │ ├── verilog-sf_bug73_1.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.v │ │ ├── verilog-sf_bug73_2.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.v │ │ ├── verilog-sf_bug73_3.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.v │ │ ├── verilog-sf_bug98.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.v │ │ ├── verilog-sf_bug99.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.v │ │ └── verilog-sf_patch57.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.v │ ├── parser-vhdl.r/ │ │ ├── bug2374109.vhd.d/ │ │ │ ├── README │ │ │ ├── expected.tags │ │ │ └── input.vhd │ │ ├── vhdl-component.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.vhd │ │ │ ├── input-1.vhd │ │ │ └── input.vhd │ │ ├── vhdl-crash.d/ │ │ │ ├── README │ │ │ └── input.vhd │ │ ├── vhdl-local.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.vhd │ │ ├── vhdl-port.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.vhd │ │ │ ├── input-1.vhd │ │ │ └── input.vhd │ │ ├── vhdl-process.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.vhd │ │ │ └── input.vhd │ │ └── vhdl-type.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.vhd │ ├── parser-vim.r/ │ │ ├── 3214129.vim.d/ │ │ │ ├── expected.tags │ │ │ └── input.vim │ │ ├── 3548393.vim.d/ │ │ │ ├── expected.tags │ │ │ └── input.vim │ │ ├── bug3032253.vim.d/ │ │ │ ├── expected.tags │ │ │ └── input.vim │ │ ├── bug358.vim.d/ │ │ │ ├── expected.tags │ │ │ └── input.vim │ │ ├── bug359.vim.d/ │ │ │ ├── expected.tags │ │ │ └── input.vim │ │ ├── end-field.vim.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.vim │ │ ├── simple.vim.d/ │ │ │ ├── expected.tags │ │ │ └── input.vim │ │ ├── vim-class.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.vim │ │ │ ├── input-1.vim │ │ │ └── input.vim │ │ ├── vim-command-in-function.d/ │ │ │ ├── expected.tags │ │ │ └── input.vim │ │ ├── vim-command-not-command.d/ │ │ │ ├── README │ │ │ ├── expected.tags │ │ │ └── input.vim │ │ ├── vim-command.d/ │ │ │ ├── expected.tags │ │ │ └── input.vim │ │ ├── vim-const.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── input-0.vim │ │ │ └── input.vim │ │ ├── vim-heredoc.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.vim │ │ ├── vim-let-in-function.d/ │ │ │ ├── expected.tags │ │ │ └── input.vim │ │ ├── vim-map-special-args.d/ │ │ │ ├── expected.tags │ │ │ └── input.vim │ │ ├── vim-signature.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.vim │ │ ├── vim9-def-function.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.vim │ │ ├── vim9-export.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.vim │ │ ├── vim9-var.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.vim │ │ └── vimball.vim.d/ │ │ ├── expected.tags │ │ └── input.vba │ ├── parser-xml.r/ │ │ ├── doctype.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.xml │ │ ├── dos-eol.d/ │ │ │ ├── .gitattributes │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ ├── input-0.xml │ │ │ └── input.xml │ │ ├── ns-with-no-prefix.d/ │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.xml │ │ └── simple-xml.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.xml │ ├── parser-xslt.r/ │ │ └── xslt-simple.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.xsl │ ├── parser-yacc.r/ │ │ ├── bom.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.y │ │ ├── c-anon-ids.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.y │ │ ├── code-directive.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.y │ │ ├── nested.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.y │ │ ├── not-union.d/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.y │ │ └── token-and-cstr.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.y │ ├── parser-yaml.r/ │ │ └── yaml-anchor.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.yml │ ├── parser-zephir.r/ │ │ ├── zephir-return-hint.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.zep │ │ └── zephir-simple.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.zep │ ├── parser-zsh.r/ │ │ └── autoload.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.zsh │ ├── pcre2-single-line.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.foo │ ├── readtags.r/ │ │ └── backslash-at-the-end-of-pattern.d/ │ │ ├── expected.tags │ │ ├── input.c │ │ └── minitrip │ ├── regex-flag-anonymous.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.foo │ ├── regex-flag-long.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.dummy │ ├── regex-flag-postrun.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.c │ ├── regex-flag-scope.r/ │ │ ├── intervaltab-case-label.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── intervaltab-linux-cb.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.c │ │ ├── intervaltab-update-line.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.foox │ │ ├── regex-with-scope-autoFQTag.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.foo │ │ ├── regex-with-scope-nested.d/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.foo │ │ └── regex-with-scope.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.foo │ ├── regex-flag-simple.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.dummy │ ├── regex-multiline-flag-advnaceTo.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-0.bar │ │ ├── input-1.baz │ │ └── input.foo │ ├── regex-multiline-flag-dos.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.mlt │ ├── regex-multiline-flag-hat-and-doller.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.foobar │ ├── regex-multiline-flag-newline.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.foobar │ ├── regex-multiline-flag-scope.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.foo │ ├── regex-multiline-flag.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.java │ ├── review-needed.r/ │ │ ├── bug816636.sml.t/ │ │ │ ├── expected.tags │ │ │ └── input.sml │ │ ├── dosbatch_test.cmd.t/ │ │ │ ├── expected.tags │ │ │ ├── features │ │ │ └── input.cmd │ │ ├── flex_override.mxml.t/ │ │ │ ├── expected.tags │ │ │ └── input.mxml │ │ ├── ingres_procedures.sql.t/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.sql │ │ ├── jbrown.vr.t/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.vr │ │ ├── maze.erl.t/ │ │ │ ├── expected.tags │ │ │ └── input.erl │ │ ├── maze.hrl.t/ │ │ │ ├── expected.tags │ │ │ └── input.hrl │ │ ├── simple.asp.t/ │ │ │ ├── expected.tags │ │ │ └── input.asp │ │ ├── simple.fal.t/ │ │ │ ├── expected.tags │ │ │ └── input.fal │ │ ├── simple.pb.t/ │ │ │ ├── expected.tags │ │ │ └── input.pb │ │ ├── simple.sml.t/ │ │ │ ├── expected.tags │ │ │ └── input.sml │ │ ├── simple.vr.t/ │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.vr │ │ ├── test.vhd.t/ │ │ │ ├── README │ │ │ ├── args.ctags │ │ │ ├── expected.tags │ │ │ └── input.vhd │ │ └── too-large-for-reviewing-3526726.tex.t/ │ │ ├── expected.tags │ │ └── input.tex │ ├── roundtrip-escapes.d/ │ │ ├── expected.tags │ │ └── minitrip │ ├── simple-PythonEntryPoints.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.pythonentrypoints │ ├── simple-abaqus.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.inp │ ├── simple-abc.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.abc │ ├── simple-ctags.d/ │ │ ├── expected.tags │ │ ├── features │ │ └── input.ctags │ ├── simple-diff.d/ │ │ ├── expected.tags │ │ └── input.diff │ ├── simple-gdbinit.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.gdb │ ├── simple-glade.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.glade │ ├── simple-gomod.d/ │ │ ├── README │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.gomod │ ├── simple-haxe.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.hx │ ├── simple-javaproperties.d/ │ │ ├── expected.tags │ │ └── input.properties │ ├── simple-maven2.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.xml │ ├── simple-meson-options.d/ │ │ ├── README │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.meson_options │ ├── simple-passwd.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.passwd │ ├── simple-pkgconfig.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.pc │ ├── simple-plist.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.plist │ ├── simple-pythonLoggingConfig.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.conf │ ├── simple-s4class.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.r │ ├── simple-texBeamer.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.tex │ ├── simple-txt2tags.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.t2t │ ├── simple-windres.d/ │ │ ├── expected.tags │ │ └── input.rc │ ├── simple-xrc.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── features │ │ └── input.xrc │ ├── simple-xref.d/ │ │ ├── expected.tags-x │ │ └── input.c │ ├── simple-yumrepo.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ └── input.repo │ ├── unit-example-multi-inputs.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input-0.h │ │ ├── input-1.sh │ │ ├── input-2.c │ │ ├── input-3.c │ │ └── input.c │ ├── writer-ctags.r/ │ │ └── output-field-escaping.d/ │ │ ├── args.ctags │ │ ├── expected.tags │ │ ├── input.rst │ │ └── minitrip │ ├── writer-etags.r/ │ │ ├── cork-etags.d/ │ │ │ ├── expected.tags-e │ │ │ └── input.clj │ │ └── simple-etags.d/ │ │ ├── expected.tags-e │ │ └── input.c │ ├── writer-json.r/ │ │ └── fq-json.d/ │ │ ├── args.ctags │ │ ├── expected.tags-json │ │ └── input.py │ └── writer-xref.r/ │ ├── cork-xref.d/ │ │ ├── expected.tags-x │ │ └── input.clj │ ├── format-CfSt.d/ │ │ ├── args.ctags │ │ ├── expected.tags-x │ │ └── input.c │ ├── format-NlKkFnP.d/ │ │ ├── args.ctags │ │ ├── expected.tags-x │ │ ├── filter │ │ └── input.m │ ├── format-aim.d/ │ │ ├── args.ctags │ │ ├── expected.tags-x │ │ └── input.java │ ├── fq-xref.d/ │ │ ├── args.ctags │ │ ├── expected.tags-x │ │ └── input.py │ ├── ptag-xref.d/ │ │ ├── args.ctags │ │ ├── expected.tags-x │ │ └── input.c │ └── truncation.d/ │ ├── args.ctags │ ├── expected.tags-x │ └── input.c ├── appveyor.yml ├── autogen.sh ├── circle.yml ├── configure.ac ├── docs/ │ ├── Makefile │ ├── README.md │ ├── _ext/ │ │ ├── ctags_optlib_highlighter.py │ │ └── lexers.py │ ├── autotools.rst │ ├── building.rst │ ├── conf.py │ ├── contributions.rst │ ├── developers.rst │ ├── extending.rst │ ├── index.rst │ ├── interactive-mode.rst │ ├── internal.rst │ ├── man/ │ │ ├── ctags-client-tools.7.rst │ │ ├── ctags-faq.7.rst │ │ ├── ctags-incompatibilities.7.rst │ │ ├── ctags-json-output.5.rst │ │ ├── ctags-lang-asm.7.rst │ │ ├── ctags-lang-autoit.7.rst │ │ ├── ctags-lang-automake.7.rst │ │ ├── ctags-lang-c++.7.rst │ │ ├── ctags-lang-c.7.rst │ │ ├── ctags-lang-cuda.7.rst │ │ ├── ctags-lang-elm.7.rst │ │ ├── ctags-lang-emacslisp.7.rst │ │ ├── ctags-lang-fortran.7.rst │ │ ├── ctags-lang-gdscript.7.rst │ │ ├── ctags-lang-i18nrubygem.7.rst │ │ ├── ctags-lang-iPythonCell.7.rst │ │ ├── ctags-lang-inko.7.rst │ │ ├── ctags-lang-javascript.7.rst │ │ ├── ctags-lang-julia.7.rst │ │ ├── ctags-lang-kconfig.7.rst │ │ ├── ctags-lang-ldscript.7.rst │ │ ├── ctags-lang-lex.7.rst │ │ ├── ctags-lang-lisp.7.rst │ │ ├── ctags-lang-make.7.rst │ │ ├── ctags-lang-markdown.7.rst │ │ ├── ctags-lang-meson.7.rst │ │ ├── ctags-lang-odin.7.rst │ │ ├── ctags-lang-powershell.7.rst │ │ ├── ctags-lang-python.7.rst │ │ ├── ctags-lang-r.7.rst │ │ ├── ctags-lang-rmarkdown.7.rst │ │ ├── ctags-lang-scheme.7.rst │ │ ├── ctags-lang-scss.7.rst │ │ ├── ctags-lang-sql.7.rst │ │ ├── ctags-lang-systemtap.7.rst │ │ ├── ctags-lang-tcl.7.rst │ │ ├── ctags-lang-terraform.7.rst │ │ ├── ctags-lang-verilog.7.rst │ │ ├── ctags-lang-vim.7.rst │ │ ├── ctags-optlib.7.rst │ │ ├── ctags.1.rst │ │ ├── readtags.1.rst │ │ └── tags.5.rst │ ├── man-pages.rst │ ├── news/ │ │ ├── 6-0-0.rst │ │ ├── 6-1-0.rst │ │ ├── 6-2-0.rst │ │ └── HEAD.rst │ ├── news.rst │ ├── option-file.rst │ ├── optlib.rst │ ├── optscript.rst │ ├── osx.rst │ ├── other-projects.rst │ ├── output-format.rst │ ├── output-tags.rst │ ├── output-xref.rst │ ├── parser-asm.rst │ ├── parser-cmake.rst │ ├── parser-cxx.rst │ ├── parser-gdscript.rst │ ├── parser-html.rst │ ├── parser-in-c.rst │ ├── parser-puppetManifest.rst │ ├── parser-python.rst │ ├── parser-tcl.rst │ ├── parser-v.rst │ ├── parser-vim.rst │ ├── parser-xslt.rst │ ├── parsers.rst │ ├── releasing.rst │ ├── reporting.rst │ ├── running-multi-parsers.rst │ ├── testing-ctags.rst │ ├── testing-parser.rst │ ├── testing-readtags.rst │ ├── tracking.rst │ └── windows.rst ├── dsl/ │ ├── dsl.c │ ├── dsl.h │ ├── es.c │ ├── es.h │ ├── formatter.c │ ├── formatter.h │ ├── optscript.c │ ├── optscript.h │ ├── qualifier.c │ ├── qualifier.h │ ├── sorter.c │ └── sorter.h ├── extra-cmds/ │ ├── Makefile │ ├── acutest.h │ ├── optscript-repl.c │ ├── printtags.c │ ├── printtags.h │ ├── readtags-cmd.c │ ├── readtags-stub.c │ ├── readtags-stub.h │ └── utiltest.c ├── gnulib/ │ ├── .gitignore │ ├── Makefile.am │ ├── README.md │ ├── _Noreturn.h │ ├── alloca.in.h │ ├── arg-nonnull.h │ ├── attribute.h │ ├── btowc.c │ ├── c++defs.h │ ├── cdefs.h │ ├── ctype.in.h │ ├── dynarray.h │ ├── flexmember.h │ ├── fnmatch.c │ ├── fnmatch.in.h │ ├── fnmatch_loop.c │ ├── glthread/ │ │ ├── lock.c │ │ ├── lock.h │ │ └── threadlib.c │ ├── hard-locale.c │ ├── hard-locale.h │ ├── idx.h │ ├── intprops.h │ ├── inttypes.in.h │ ├── isblank.c │ ├── langinfo.in.h │ ├── lc-charset-dispatch.c │ ├── lc-charset-dispatch.h │ ├── libc-config.h │ ├── limits.in.h │ ├── localcharset.c │ ├── localcharset.h │ ├── locale.in.h │ ├── localeconv.c │ ├── malloc/ │ │ ├── dynarray-skeleton.c │ │ ├── dynarray.h │ │ ├── dynarray_at_failure.c │ │ ├── dynarray_emplace_enlarge.c │ │ ├── dynarray_finalize.c │ │ ├── dynarray_resize.c │ │ └── dynarray_resize_clear.c │ ├── mbrtowc-impl-utf8.h │ ├── mbrtowc-impl.h │ ├── mbrtowc.c │ ├── mbsinit.c │ ├── mbsrtowcs-impl.h │ ├── mbsrtowcs-state.c │ ├── mbsrtowcs.c │ ├── mbtowc-impl.h │ ├── mbtowc-lock.c │ ├── mbtowc-lock.h │ ├── mbtowc.c │ ├── memchr.c │ ├── memchr.valgrind │ ├── mempcpy.c │ ├── nl_langinfo-lock.c │ ├── nl_langinfo.c │ ├── regcomp.c │ ├── regex.c │ ├── regex.h │ ├── regex_internal.c │ ├── regex_internal.h │ ├── regexec.c │ ├── setlocale-lock.c │ ├── setlocale_null.c │ ├── setlocale_null.h │ ├── stdbool.in.h │ ├── stddef.in.h │ ├── stdint.in.h │ ├── stdlib.in.h │ ├── streq.h │ ├── string.in.h │ ├── strnlen.c │ ├── strnlen1.c │ ├── strnlen1.h │ ├── sys_types.in.h │ ├── unistd.c │ ├── unistd.in.h │ ├── verify.h │ ├── warn-on-use.h │ ├── wchar.in.h │ ├── wcrtomb.c │ ├── wctype-h.c │ ├── wctype.in.h │ ├── windows-initguard.h │ ├── windows-mutex.c │ ├── windows-mutex.h │ ├── windows-once.c │ ├── windows-once.h │ ├── windows-recmutex.c │ ├── windows-recmutex.h │ ├── windows-rwlock.c │ ├── windows-rwlock.h │ ├── wmemchr-impl.h │ ├── wmemchr.c │ └── wmempcpy.c ├── libreadtags/ │ ├── .circleci/ │ │ └── config.yml │ ├── .dir-locals.el │ ├── .editorconfig │ ├── .github/ │ │ └── workflows/ │ │ └── msys2.yml │ ├── .gitignore │ ├── .indent.pro │ ├── .uncrustify.cfg │ ├── CMakeLists.txt │ ├── Makefile.am │ ├── NEWS.md │ ├── README.md │ ├── autogen.sh │ ├── configure.ac │ ├── libreadtags-uninstalled.pc.in │ ├── libreadtags.pc.in │ ├── readtags.c │ ├── readtags.h │ ├── test_inline.c │ └── tests/ │ ├── Makefile.am │ ├── api-tagsOpen-ectags.tags │ ├── api-tagsOpen-incomplete-program-author-0.tags │ ├── api-tagsOpen-incomplete-program-author-1.tags │ ├── api-tagsOpen-incomplete-program-author-2.tags │ ├── api-tagsOpen-incomplete-program-author-3.tags │ ├── api-tagsOpen-incomplete-program-author-4.tags │ ├── api-tagsOpen-incomplete-program-author-5.tags │ ├── api-tagsOpen-wrong-format-nonum.tags │ ├── api-tagsOpen-wrong-format-num.tags │ ├── api-tagsOpen-wrong-sort-method-nonum.tags │ ├── api-tagsOpen-wrong-sort-method-num.tags │ ├── broken-line-field-in-middle.tags │ ├── broken-line-field-other-than-first.tags │ ├── broken-line-field.tags │ ├── duplicated-names--sorted-foldcase.tags │ ├── duplicated-names--sorted-no.tags │ ├── duplicated-names--sorted-yes.tags │ ├── duplicated-names.c │ ├── empty-no-newline.tags │ ├── empty.tags │ ├── null-deref.tags │ ├── ptag-sort-no.tags │ ├── ptag-sort-yes.tags │ ├── test-api-tagsClose.c │ ├── test-api-tagsFind.c │ ├── test-api-tagsFindPseudoTag.c │ ├── test-api-tagsFirst.c │ ├── test-api-tagsFirstPseudoTag.c │ ├── test-api-tagsOpen.c │ ├── test-api-tagsSetSortType.c │ ├── test-fields.h │ ├── test-fix-large-tags.c │ ├── test-fix-null-deref.c │ ├── test-fix-unescaping-input-fields-backslash.c │ ├── test-fix-unescaping-input-fields-exuberant.c │ ├── test-fix-unescaping-input-fields-no-filesep.c │ ├── test-fix-unescaping-input-fields-no-mode.c │ ├── test-fix-unescaping-input-fields.c │ ├── test-fix-unescaping.c │ ├── unescaping-input-fields-backslash.tags │ ├── unescaping-input-fields-exuberant.tags │ ├── unescaping-input-fields-no-filesep.tags │ ├── unescaping-input-fields-no-mode.tags │ ├── unescaping-input-fields.tags │ └── unescaping.tags ├── m4/ │ ├── 00gnulib.m4 │ ├── __inline.m4 │ ├── absolute-header.m4 │ ├── alloca.m4 │ ├── attributes.m4 │ ├── ax_check_compile_flag.m4 │ ├── btowc.m4 │ ├── builtin-expect.m4 │ ├── codeset.m4 │ ├── ctype_h.m4 │ ├── eealloc.m4 │ ├── extensions.m4 │ ├── extern-inline.m4 │ ├── flexmember.m4 │ ├── fnmatch.m4 │ ├── fnmatch_h.m4 │ ├── gnulib-cache.m4 │ ├── gnulib-common.m4 │ ├── gnulib-comp.m4 │ ├── gnulib-tool.m4 │ ├── include_next.m4 │ ├── inttypes.m4 │ ├── isblank.m4 │ ├── langinfo_h.m4 │ ├── limits-h.m4 │ ├── localcharset.m4 │ ├── locale-fr.m4 │ ├── locale-ja.m4 │ ├── locale-zh.m4 │ ├── locale_h.m4 │ ├── localeconv.m4 │ ├── lock.m4 │ ├── mbrtowc.m4 │ ├── mbsinit.m4 │ ├── mbsrtowcs.m4 │ ├── mbstate_t.m4 │ ├── mbtowc.m4 │ ├── memchr.m4 │ ├── mempcpy.m4 │ ├── mmap-anon.m4 │ ├── multiarch.m4 │ ├── nl_langinfo.m4 │ ├── off_t.m4 │ ├── pid_t.m4 │ ├── pthread_rwlock_rdlock.m4 │ ├── regex.m4 │ ├── setlocale_null.m4 │ ├── ssize_t.m4 │ ├── std-gnu11.m4 │ ├── stdbool.m4 │ ├── stddef_h.m4 │ ├── stdint.m4 │ ├── stdlib_h.m4 │ ├── string_h.m4 │ ├── strnlen.m4 │ ├── sys_types_h.m4 │ ├── threadlib.m4 │ ├── unistd_h.m4 │ ├── visibility.m4 │ ├── warn-on-use.m4 │ ├── wchar_h.m4 │ ├── wchar_t.m4 │ ├── wcrtomb.m4 │ ├── wctype_h.m4 │ ├── wint_t.m4 │ ├── wmemchr.m4 │ ├── wmempcpy.m4 │ └── zzgnulib.m4 ├── main/ │ ├── CommonPrelude.c │ ├── CommonPrelude.ps │ ├── Makefile │ ├── args.c │ ├── args_p.h │ ├── cmd.c │ ├── collector.c │ ├── collector.h │ ├── colprint.c │ ├── colprint_p.h │ ├── ctags.h │ ├── debug.c │ ├── debug.h │ ├── dependency.c │ ├── dependency.h │ ├── dependency_p.h │ ├── e_msoft.h │ ├── entry.c │ ├── entry.h │ ├── entry_p.h │ ├── entry_private.c │ ├── error.c │ ├── error_p.h │ ├── field.c │ ├── field.h │ ├── field_p.h │ ├── flags.c │ ├── flags_p.h │ ├── fmt.c │ ├── fmt_p.h │ ├── fname.c │ ├── fname.h │ ├── gcc-attr.h │ ├── general.h │ ├── gvars.h │ ├── htable.c │ ├── htable.h │ ├── inline.h │ ├── interactive_p.h │ ├── intern.c │ ├── intern.h │ ├── interval_tree_generic.h │ ├── keyword.c │ ├── keyword.h │ ├── keyword_p.h │ ├── kind.c │ ├── kind.h │ ├── kind_p.h │ ├── lregex-default.c │ ├── lregex-pcre2.c │ ├── lregex.c │ ├── lregex.h │ ├── lregex_p.h │ ├── lxpath.c │ ├── lxpath.h │ ├── lxpath_p.h │ ├── main.c │ ├── main_p.h │ ├── mbcs.c │ ├── mbcs.h │ ├── mbcs_p.h │ ├── mini-geany.c │ ├── mio.c │ ├── mio.h │ ├── nestlevel.c │ ├── nestlevel.h │ ├── numarray.c │ ├── numarray.h │ ├── objpool.c │ ├── objpool.h │ ├── options.c │ ├── options.h │ ├── options_p.h │ ├── param.c │ ├── param.h │ ├── param_p.h │ ├── parse.c │ ├── parse.h │ ├── parse_p.h │ ├── parsers_p.h │ ├── portable-dirent_p.h │ ├── portable-scandir.c │ ├── promise.c │ ├── promise.h │ ├── promise_p.h │ ├── ptag.c │ ├── ptag_p.h │ ├── ptrarray.c │ ├── ptrarray.h │ ├── rbtree.c │ ├── rbtree.h │ ├── rbtree_augmented.h │ ├── read.c │ ├── read.h │ ├── read_p.h │ ├── repoinfo.c │ ├── rexprcode.c │ ├── rexprcode_p.h │ ├── routines.c │ ├── routines.h │ ├── routines_p.h │ ├── script.c │ ├── script_p.h │ ├── seccomp.c │ ├── selectors.c │ ├── selectors.h │ ├── sort.c │ ├── sort_p.h │ ├── sort_r.h │ ├── stats.c │ ├── stats_p.h │ ├── strlist.c │ ├── strlist.h │ ├── subparser.h │ ├── subparser_p.h │ ├── tokeninfo.c │ ├── tokeninfo.h │ ├── trace.c │ ├── trace.h │ ├── trashbox.c │ ├── trashbox.h │ ├── trashbox_p.h │ ├── types.h │ ├── unwindi.c │ ├── unwindi.h │ ├── utf8_str.c │ ├── utf8_str.h │ ├── vstring.c │ ├── vstring.h │ ├── writer-ctags.c │ ├── writer-etags.c │ ├── writer-json.c │ ├── writer-xref.c │ ├── writer.c │ ├── writer_p.h │ ├── xtag.c │ ├── xtag.h │ └── xtag_p.h ├── makefiles/ │ ├── help.mak │ └── testing.mak ├── man/ │ ├── GNUmakefile.am │ ├── Makefile │ ├── README │ ├── ctags-client-tools.7.rst.in │ ├── ctags-faq.7.rst.in │ ├── ctags-incompatibilities.7.rst.in │ ├── ctags-json-output.5.rst.in │ ├── ctags-lang-asm.7.rst.in │ ├── ctags-lang-autoit.7.rst.in │ ├── ctags-lang-automake.7.rst.in │ ├── ctags-lang-c++.7.rst.in │ ├── ctags-lang-c.7.rst.in │ ├── ctags-lang-cuda.7.rst.in │ ├── ctags-lang-elm.7.rst.in │ ├── ctags-lang-emacslisp.7.rst.in │ ├── ctags-lang-fortran.7.rst.in │ ├── ctags-lang-gdscript.7.rst.in │ ├── ctags-lang-i18nrubygem.7.rst.in │ ├── ctags-lang-iPythonCell.7.rst.in │ ├── ctags-lang-inko.7.rst.in │ ├── ctags-lang-javascript.7.rst.in │ ├── ctags-lang-julia.7.rst.in │ ├── ctags-lang-kconfig.7.rst.in │ ├── ctags-lang-ldscript.7.rst.in │ ├── ctags-lang-lex.7.rst.in │ ├── ctags-lang-lisp.7.rst.in │ ├── ctags-lang-make.7.rst.in │ ├── ctags-lang-markdown.7.rst.in │ ├── ctags-lang-meson.7.rst.in │ ├── ctags-lang-odin.7.rst.in │ ├── ctags-lang-powershell.7.rst.in │ ├── ctags-lang-python.7.rst.in │ ├── ctags-lang-r.7.rst.in │ ├── ctags-lang-rmarkdown.7.rst.in │ ├── ctags-lang-scheme.7.rst.in │ ├── ctags-lang-scss.7.rst.in │ ├── ctags-lang-sql.7.rst.in │ ├── ctags-lang-systemtap.7.rst.in │ ├── ctags-lang-tcl.7.rst.in │ ├── ctags-lang-terraform.7.rst.in │ ├── ctags-lang-verilog.7.rst.in │ ├── ctags-lang-vim.7.rst.in │ ├── ctags-optlib.7.rst.in │ ├── ctags.1.rst.in │ ├── readtags.1.rst.in │ └── tags.5.rst.in ├── misc/ │ ├── addbom │ ├── badinput.c │ ├── budge │ ├── budge.ctags │ ├── ctags-optlib-mode.el │ ├── debuggen/ │ │ ├── README │ │ ├── libdebuggen.sh │ │ ├── rust.sh │ │ └── typescript.sh │ ├── enumstr.sh │ ├── gen-repoinfo │ ├── gencxxtypedumper.sh │ ├── git-tag-maybe.sh │ ├── hasbom │ ├── man-test.py │ ├── mg++ │ ├── mini-geany.expected │ ├── mk-interactive-request.sh │ ├── news.bash │ ├── optlib2c │ ├── packcc/ │ │ ├── .github/ │ │ │ └── workflows/ │ │ │ └── testing.yml │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── benchmark/ │ │ │ ├── benchmark.sh │ │ │ ├── grammars/ │ │ │ │ ├── calc.peg │ │ │ │ ├── json.peg │ │ │ │ └── kotlin.peg │ │ │ └── inputs/ │ │ │ ├── calc.txt │ │ │ ├── json.json │ │ │ └── kotlin.kt │ │ ├── build/ │ │ │ ├── clang/ │ │ │ │ └── Makefile │ │ │ ├── gcc/ │ │ │ │ └── Makefile │ │ │ ├── mingw-clang/ │ │ │ │ └── Makefile │ │ │ ├── mingw-gcc/ │ │ │ │ └── Makefile │ │ │ └── msvc/ │ │ │ ├── examples/ │ │ │ │ └── calc/ │ │ │ │ ├── calc.vcxproj │ │ │ │ ├── calc.vcxproj.filters │ │ │ │ └── calc.vcxproj.user │ │ │ ├── msvc.sln │ │ │ ├── packcc.vcxproj │ │ │ ├── packcc.vcxproj.filters │ │ │ └── packcc.vcxproj.user │ │ ├── examples/ │ │ │ ├── ast-tinyc/ │ │ │ │ ├── .gitignore │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── README.md │ │ │ │ ├── inputs/ │ │ │ │ │ ├── erroneous1.c │ │ │ │ │ ├── example1.c │ │ │ │ │ ├── example2.c │ │ │ │ │ ├── example3.c │ │ │ │ │ ├── example4.c │ │ │ │ │ └── example5.c │ │ │ │ ├── main.c │ │ │ │ ├── parser.peg │ │ │ │ ├── system.c │ │ │ │ ├── system.h │ │ │ │ ├── utility.c │ │ │ │ └── utility.h │ │ │ └── calc.peg │ │ └── src/ │ │ └── packcc.c │ ├── pull-libreadtags.sh │ ├── pull-packcc.sh │ ├── readtags.supp │ ├── review │ ├── roundtrip │ ├── src-check │ ├── tinst │ ├── tlib │ ├── txt2cstr │ ├── units │ ├── units.py │ ├── validators/ │ │ ├── g++-common.sh │ │ ├── gfortran-common.sh │ │ ├── tsc-common.sh │ │ ├── validator-KNOWN-INVALIDATION │ │ ├── validator-NONE │ │ ├── validator-c │ │ ├── validator-cxx03 │ │ ├── validator-cxx11 │ │ ├── validator-cxx17 │ │ ├── validator-cxx20+module │ │ ├── validator-fortran+dollar-ok │ │ ├── validator-gnat │ │ ├── validator-go │ │ ├── validator-jq │ │ ├── validator-node │ │ ├── validator-puppet │ │ ├── validator-python │ │ ├── validator-ruby │ │ ├── validator-svlint │ │ ├── validator-swipl │ │ ├── validator-tsc │ │ └── validator-tsc-es2015 │ └── visit-version-info.bash ├── mk_mingw.mak ├── mk_mvc.mak ├── old-docs/ │ ├── EXTENDING.html │ ├── FAQ │ ├── INSTALL │ ├── INSTALL.oth │ ├── MAINTAINERS │ ├── NEWS.exuberant │ ├── README.exuberant │ ├── index.html │ └── website/ │ ├── .cvsignore │ ├── FORMAT │ ├── countries.html │ ├── ctags.xcf │ ├── desire.html │ ├── faq.html │ ├── gpl.html │ ├── languages.html │ ├── lg18-wkndmech.html │ ├── quotes.html │ ├── tool_support.html │ ├── tools.html │ └── whatis.html ├── optlib/ │ ├── cmake.c │ ├── cmake.ctags │ ├── ctags-optlib.c │ ├── ctags-optlib.ctags │ ├── elixir.c │ ├── elixir.ctags │ ├── forth.c │ ├── forth.ctags │ ├── gdbinit.c │ ├── gdbinit.ctags │ ├── gomod.c │ ├── gomod.ctags │ ├── gperf.c │ ├── gperf.ctags │ ├── iPythonCell.c │ ├── iPythonCell.ctags │ ├── inko.c │ ├── inko.ctags │ ├── kconfig.c │ ├── kconfig.ctags │ ├── lex.c │ ├── lex.ctags │ ├── man.c │ ├── man.ctags │ ├── meson.c │ ├── meson.ctags │ ├── mesonOptions.c │ ├── mesonOptions.ctags │ ├── nftables.c │ ├── nftables.ctags │ ├── org.c │ ├── org.ctags │ ├── passwd.c │ ├── passwd.ctags │ ├── pkgConfig.c │ ├── pkgConfig.ctags │ ├── pod.c │ ├── pod.ctags │ ├── puppetManifest.c │ ├── puppetManifest.ctags │ ├── qemuhx.c │ ├── qemuhx.ctags │ ├── rdoc.c │ ├── rdoc.ctags │ ├── rpmMacros.c │ ├── rpmMacros.ctags │ ├── scdoc.c │ ├── scdoc.ctags │ ├── scss.c │ ├── scss.ctags │ ├── selinux-type-enforcement.c │ ├── selinux-type-enforcement.ctags │ ├── systemtap.c │ ├── systemtap.ctags │ ├── terraform.c │ ├── terraform.ctags │ ├── terraformvariables.c │ ├── terraformvariables.ctags │ ├── yacc.c │ └── yacc.ctags ├── parsers/ │ ├── Makefile │ ├── abaqus.c │ ├── abc.c │ ├── ada.c │ ├── ansibleplaybook.c │ ├── ant.c │ ├── asciidoc.c │ ├── asm.c │ ├── asp.c │ ├── autoconf.c │ ├── autoit.c │ ├── automake.c │ ├── awk.c │ ├── basic.c │ ├── bats.c │ ├── beta.c │ ├── biblatex.c │ ├── bibtex.c │ ├── c-based.c │ ├── cargo.c │ ├── clojure.c │ ├── cobol.c │ ├── cpreprocessor.c │ ├── css.c │ ├── cxx/ │ │ ├── Makefile │ │ ├── cxx.c │ │ ├── cxx_debug.c │ │ ├── cxx_debug.h │ │ ├── cxx_debug_type.c │ │ ├── cxx_jni.c │ │ ├── cxx_keyword.c │ │ ├── cxx_keyword.h │ │ ├── cxx_parser.c │ │ ├── cxx_parser.h │ │ ├── cxx_parser_block.c │ │ ├── cxx_parser_function.c │ │ ├── cxx_parser_internal.h │ │ ├── cxx_parser_lambda.c │ │ ├── cxx_parser_module.c │ │ ├── cxx_parser_namespace.c │ │ ├── cxx_parser_template.c │ │ ├── cxx_parser_tokenizer.c │ │ ├── cxx_parser_typedef.c │ │ ├── cxx_parser_using.c │ │ ├── cxx_parser_variable.c │ │ ├── cxx_qtmoc.c │ │ ├── cxx_scope.c │ │ ├── cxx_scope.h │ │ ├── cxx_side_chain.c │ │ ├── cxx_side_chain.h │ │ ├── cxx_subparser.c │ │ ├── cxx_subparser.h │ │ ├── cxx_subparser_internal.h │ │ ├── cxx_tag.c │ │ ├── cxx_tag.h │ │ ├── cxx_token.c │ │ ├── cxx_token.h │ │ ├── cxx_token_chain.c │ │ └── cxx_token_chain.h │ ├── d-rust.h │ ├── d-typescript.h │ ├── dbus-introspect.c │ ├── dbus-service.c │ ├── diff.c │ ├── dosbatch.c │ ├── dtd.c │ ├── dts.c │ ├── eiffel.c │ ├── erlang.c │ ├── falcon.c │ ├── flex.c │ ├── fortran.c │ ├── frontmatter.c │ ├── fypp.c │ ├── gdscript.c │ ├── gemspec.c │ ├── glade.c │ ├── go.c │ ├── haskell.c │ ├── haxe.c │ ├── html.c │ ├── i18nrubygem.c │ ├── iniconf.c │ ├── itcl.c │ ├── jprop.c │ ├── jscript.c │ ├── json.c │ ├── julia.c │ ├── ldscript.c │ ├── lisp.c │ ├── lua.c │ ├── m4.c │ ├── make.c │ ├── markdown.c │ ├── matlab.c │ ├── maven2.c │ ├── myrddin.c │ ├── nsis.c │ ├── objc.c │ ├── ocaml.c │ ├── odin.c │ ├── openapi.c │ ├── pascal.c │ ├── perl-function-parameters.c │ ├── perl-moose.c │ ├── perl.c │ ├── php.c │ ├── plist.c │ ├── powershell.c │ ├── prolog.c │ ├── protobuf.c │ ├── python-entry-points.c │ ├── python-logging-config.c │ ├── python.c │ ├── quarto.c │ ├── r-r6class.c │ ├── r-s4class.c │ ├── r.c │ ├── rake.c │ ├── raku.c │ ├── relaxng.c │ ├── rexx.c │ ├── rmarkdown.c │ ├── robot.c │ ├── rpmspec.c │ ├── rspec.c │ ├── rst.c │ ├── ruby.c │ ├── rust.c │ ├── scheme.c │ ├── selinux-interface.c │ ├── sh.c │ ├── sinex.c │ ├── slang.c │ ├── sml.c │ ├── sql.c │ ├── svg.c │ ├── systemdunit.c │ ├── tcl.c │ ├── tcloo.c │ ├── tex-beamer.c │ ├── tex.c │ ├── ttcn.c │ ├── txt2tags.c │ ├── typescript.c │ ├── typespec.c │ ├── v.c │ ├── vera.c │ ├── verilog.c │ ├── vhdl.c │ ├── vim.c │ ├── windres.c │ ├── x-autoconf.h │ ├── x-bibtex.h │ ├── x-cpreprocessor.h │ ├── x-frontmatter.h │ ├── x-html.h │ ├── x-iniconf.h │ ├── x-jscript.h │ ├── x-lisp.h │ ├── x-m4.h │ ├── x-make.h │ ├── x-markdown.h │ ├── x-perl.h │ ├── x-python.h │ ├── x-r.h │ ├── x-ruby.h │ ├── x-sh.h │ ├── x-systemdunit.h │ ├── x-tcl.h │ ├── x-tex.h │ ├── x-toml.h │ ├── x-xml.h │ ├── x-yaml.h │ ├── xml.c │ ├── xrc.c │ ├── xslt.c │ ├── yaml.c │ ├── yamlfrontmatter.c │ └── yumrepo.c ├── peg/ │ ├── .gitignore │ ├── elm.peg │ ├── elm_post.h │ ├── elm_pre.h │ ├── kotlin.peg │ ├── kotlin_post.h │ ├── kotlin_pre.h │ ├── peg_common.h │ ├── thrift.peg │ ├── thrift_post.h │ ├── thrift_pre.h │ ├── toml.peg │ ├── toml_post.h │ ├── toml_pre.h │ ├── varlink.peg │ ├── varlink_post.h │ └── varlink_pre.h ├── source.mak └── win32/ ├── GNUmakefile ├── Makefile ├── appveyor.bat ├── config_mingw.h ├── config_mvc.h ├── ctags.exe.manifest ├── ctags.rc ├── ctags_vs2013.sln ├── ctags_vs2013.vcxproj ├── ctags_vs2013.vcxproj.filters ├── ctags_vs2013.vcxproj.filters.in ├── ctags_vs2013.vcxproj.in ├── gen-repoinfo.bat ├── gnulib_h/ │ ├── fnmatch.h │ ├── langinfo.h │ ├── locale.h │ ├── string.h │ ├── unistd.h │ └── wchar.h ├── license/ │ ├── Copyright.libxml2 │ ├── LICENCE.pcre2 │ ├── LICENSE.janssen │ └── LICENSE.libyaml ├── mkstemp/ │ ├── COPYING.MinGW-w64-runtime.txt │ └── mkstemp.c ├── peg_rule.mak └── resource.h ================================================ FILE CONTENTS ================================================ ================================================ FILE: .ctags.d/exclusion.ctags ================================================ # Exclude directories that don't contain real code --exclude=Units --exclude=tinst-root --exclude=Tmain ================================================ FILE: .dir-locals.el ================================================ ;; Don't forget putting (add-hook 'hack-local-variables-hook (lambda () (editorconfig-apply))) to your .emacs. ((c-mode . ((c-file-style . "linux")))) ================================================ FILE: .editorconfig ================================================ root = true [*] end_of_line = lf insert_final_newline = true [*.{c,h,sh}] indent_size = 4 indent_style = tab trim_trailing_whitespace = true tab_width = 4 [misc/packcc/packcc.c] indent_size = 4 indent_style = space trim_trailing_whitespace = true tab_width = 4 [*.{ctags,ps}] indent_size = 4 indent_style = space trim_trailing_whitespace = true tab_width = 4 [{Makefile*,*.mak}] indent_size = 8 indent_style = tab trim_trailing_whitespace = true tab_width = 8 [*.rst*] indent_size = 4 indent_style = tab trim_trailing_whitespace = true tab_width = 4 [gnulib/*.{c,h}] tab_width = 8 [misc/optlib2c] trim_trailing_whitespace = true [win32/*.{bat,sln,vcxproj,vcxproj.filters}] end_of_line = crlf [win32/*.vcxproj*] insert_final_newline = false ================================================ FILE: .gdbinit ================================================ define pst call ps(st) end ================================================ FILE: .gitattributes ================================================ * text=auto /win32/*.bat text eol=crlf /win32/*.sln text eol=crlf /win32/*.vcxproj text eol=crlf /win32/*.vcxproj.filters text eol=crlf ================================================ FILE: .github/ISSUE_TEMPLATE.md ================================================ ( Thank you for contacting us. If you are reporting an issue with the parsing output, please fill the following template. As your custom CTags configuration can affect results, please always use `--options=NONE` as the first option when running `ctags`. Otherwise, delete the template and write your issue from scratch. Examples may help developers understanding your issue better. Use GitHub web interface and markdown notation. Using mail results broken text rendering that makes the developers go crazy. ) ***** The name of the parser: The command line you used to run ctags: ``` $ ctags --options=NONE ... ``` The content of input file: ```C /* THIS IS AN EXAMPLE */ int main(void) { ... ``` The tags output you are not satisfied with: ``` !_THIS_IS_AN_EXAMPLE mainVoid foo.c /^main(void)$/;" kind:function line:2 language:C typeref:typename:int signature:(void) roles:def ... ``` The tags output you expect: ``` !_THIS_IS_AN_EXAMPLE main foo.c /^main(void)$/;" kind:function line:2 language:C typeref:typename:int signature:(void) roles:def ... ``` The version of ctags: ``` $ ctags --version Universal Ctags 0.0.0(EXAMPLE), Copyright (C) 2015 Universal Ctags Team Universal Ctags is derived from Exuberant Ctags. Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert Compiled: May 11 1018, 23:16:36 URL: https://ctags.io/ Optional compiled features: +wildcards, +regex, +iconv, +option-directory, +xpath, +json, +interactive, +sandbox, +yaml ``` How do you get ctags binary: ( Building it locally, via GNU/Linux distribution, as BSD's package, win32 binary taken from Universal-ctags/ctags-win32 project, macosx binary taken from Universal-ctags/homebrew-universal-ctags project, etc. ) ================================================ FILE: .github/dependabot.yml ================================================ # To get started with Dependabot version updates, you'll need to specify which # package ecosystems to update and where the package manifests are located. # Please see the documentation for all configuration options: # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates version: 2 updates: - package-ecosystem: "github-actions" # See documentation for possible values directory: "/" # Location of package manifests schedule: interval: "weekly" ================================================ FILE: .github/workflows/building-with-nmake.yml ================================================ name: build with Vistual Studio / NMake on: push: branches: [ master ] pull_request: branches: [ master ] jobs: test: strategy: fail-fast: false matrix: version: [2022] arch: [x64, x86] runs-on: windows-${{ matrix.version }} defaults: run: shell: cmd /C {0} steps: - run: choco install -y file - uses: actions/checkout@v6 - name: setup nmake run: | if "${{ matrix.version }}" == "2019" ( set "XX= (x86)" ) else ( set "XX=" ) @echo on echo call "C:\Program Files%XX%\Microsoft Visual Studio\${{ matrix.version }}\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch }} > nmake-setup.cmd type nmake-setup.cmd - name: build libiconv run: | @echo on git clone --depth=1 https://github.com/koron/libiconv libiconv-source cd libiconv-source\msvc10 call "${{ github.workspace }}\nmake-setup.cmd" nmake NODEBUG=1 NOMSVCRT=1 - name: install libiconv run: | @echo on mkdir libiconv-installed\include mkdir libiconv-installed\lib copy libiconv-source\msvc10\iconv.h libiconv-installed\include copy libiconv-source\msvc10\iconv.lib libiconv-installed\lib copy libiconv-source\msvc10\iconv.dll . - name: build ctags with nmake run: | @echo on call nmake-setup.cmd nmake -f mk_mvc.mak WITH_ICONV=yes ICONV_DIR=libiconv-installed PDB=yes - run: dir - name: dumpbin ctags.exe run: | @echo on call nmake-setup.cmd dumpbin /dependents ctags.exe - run: file ctags.exe - run: ctags.exe --version ================================================ FILE: .github/workflows/building-with-pegof.yml ================================================ name: build ctags with pegof and run units target on Ubuntu on: push: branches: [ master ] pull_request: branches: [ master ] jobs: testing: strategy: matrix: os: [ubuntu-24.04] runs-on: ${{ matrix.os }} env: DEBIAN_FRONTEND: noninteractive steps: - run: sudo apt -y update - run: sudo apt -y install cmake g++ pkg-config automake libseccomp-dev libjansson-dev libyaml-dev libxml2-dev libpcre2-dev bash gdb python3-docutils # cmake and g++ are used to build pegof - uses: actions/checkout@v6 - uses: actions/checkout@v6 with: repository: dolik-rce/pegof submodules: recursive fetch-tags: true path: pegof - run: cmake -S pegof -B pegof/build.d - run: cmake --build pegof/build.d - run: pegof/build.d/pegof --version - run: ./autogen.sh - run: ./configure --enable-debugging --enable-iconv --with-pegof=$PWD/pegof/build.d/pegof - run: make -j2 - run: ./ctags --list-features | grep pegof - run: | echo "Targets: $(./ctags --list-languages=_packcc | while read LANG REST; do echo "$LANG"; done | tr '\n' ',')" - run: make units LANGUAGES="$(./ctags --list-languages=_packcc | while read LANG REST; do echo "$LANG"; done | tr '\n' ',')" - run: make dist # See EXTRA_DIST in Makefile.am. # Currently we add .pego files. ================================================ FILE: .github/workflows/code-coverage-on-ubuntu.yml ================================================ name: upload coverage report to codecov.io on: push: branches: [ master ] pull_request: branches: [ master ] jobs: coverage: runs-on: ubuntu-22.04 env: DEBIAN_FRONTEND: noninteractive CC: gcc steps: - uses: actions/checkout@v6 with: fetch-depth: 0 - run: sudo apt-get -y -o APT::Immediate-Configure=false update - run: sudo apt-get -y -o APT::Immediate-Configure=false install bash pkg-config automake gcc gdb lcov libseccomp-dev libjansson-dev libyaml-dev libxml2-dev libpcre2-dev - run: gcc --version - run: make --version - run: ./autogen.sh - run: mkdir -p build.d - run: cd build.d && ../configure --enable-debugging --enable-coverage-gcov - run: cd build.d && make -j2 - run: cd build.d && ./ctags --list-features - run: cd build.d && ./ctags --help - run: cd build.d && ./ctags --version - run: cd build.d && make check - run: cd build.d && make roundtrip - run: cd build.d && lcov -c -b . -d . -o coverage.info - uses: codecov/codecov-action@v5 with: files: build.d/coverage.info name: travis-ubuntu-latest token: ${{ secrets.CODECOV_TOKEN }} ================================================ FILE: .github/workflows/cross-compile-for--netbsd-on-ubuntu.yml ================================================ name: cross compile for NetBSD on Ubuntu on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: strategy: fail-fast: false matrix: netbsd-release-version: ['10.1', '10.0', '9.4', '9.3'] # https://ftp.netbsd.org/pub/NetBSD/ runs-on: ubuntu-latest env: CC: clang --target=amd64-unknown-netbsd --sysroot=${{ github.workspace }}/amd64-unknown-netbsd-sysroot CFLAGS: -I${{ github.workspace }}/amd64-unknown-netbsd-3rdroot/include -fPIC LDFLAGS: -L${{ github.workspace }}/amd64-unknown-netbsd-3rdroot/lib PKG_CONFIG_PATH: ${{ github.workspace }}/amd64-unknown-netbsd-3rdroot/lib/pkgconfig steps: - uses: actions/checkout@v6 - run: sudo apt-get -y update - run: sudo apt-get -y install clang cmake make automake autoconf pkg-config curl file - run: install -d amd64-unknown-netbsd-sysroot - run: install -d amd64-unknown-netbsd-3rdroot - name: install amd64-unknown-netbsd-sysroot run: | for item in base comp do FILENAME="$item.tar.xz" curl -LO "https://ftp.netbsd.org/pub/NetBSD/NetBSD-${{ matrix.netbsd-release-version }}/amd64/binary/sets/$FILENAME" tar vxf "$FILENAME" -C amd64-unknown-netbsd-sysroot done - name: build zlib run: | install -d src/zlib cd src/zlib curl -L -o src.tar.gz https://distfiles.macports.org/zlib/zlib-1.3.1.tar.xz tar vxf src.tar.gz --strip-components=1 sed -i 's|/share/pkgconfig|/lib/pkgconfig|' CMakeLists.txt cmake -S . -B build.d -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/amd64-unknown-netbsd-3rdroot -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTING=OFF cmake --build build.d cmake --install build.d - name: build libiconv run: | install -d src/libiconv cd src/libiconv curl -L -o src.tar.gz https://distfiles.macports.org/libiconv/libiconv-1.17.tar.gz tar vxf src.tar.gz --strip-components=1 ./configure --host=amd64-unknown-netbsd --prefix=${{ github.workspace }}/amd64-unknown-netbsd-3rdroot --enable-extra-encodings --enable-static --disable-shared make V=1 make install - name: build libxml2 run: | install -d src/libxml2 cd src/libxml2 curl -L -o src.tar.gz https://download.gnome.org/sources/libxml2/2.11/libxml2-2.11.6.tar.xz tar vxf src.tar.gz --strip-components=1 ./configure --host=amd64-unknown-netbsd --prefix=${{ github.workspace }}/amd64-unknown-netbsd-3rdroot --with-zlib --without-lzma --without-python --without-readline --without-coverage --enable-ipv6 --enable-static --disable-shared LIBS=-liconv make V=1 make install - name: build libyaml run: | install -d src/libyaml cd src/libyaml curl -L -o src.tar.gz https://github.com/yaml/libyaml/releases/download/0.2.5/yaml-0.2.5.tar.gz tar vxf src.tar.gz --strip-components=1 ./configure --host=amd64-unknown-netbsd --prefix=${{ github.workspace }}/amd64-unknown-netbsd-3rdroot make V=1 make install - name: build jansson run: | install -d src/jansson cd src/jansson curl -L -o src.tar.gz https://github.com/akheron/jansson/releases/download/v2.14/jansson-2.14.tar.gz tar vxf src.tar.gz --strip-components=1 cmake -S . -B build.d -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/amd64-unknown-netbsd-3rdroot -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTING=OFF -DJANSSON_BUILD_SHARED_LIBS=OFF -DJANSSON_BUILD_DOCS=OFF -DJANSSON_COVERAGE=OFF -DJANSSON_EXAMPLES=OFF -DJANSSON_WITHOUT_TESTS=ON cmake --build build.d cmake --install build.d - name: build libpcre2 run: | install -d src/libpcre2 cd src/libpcre2 curl -L -o src.tar.gz https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.tar.bz2 tar vxf src.tar.gz --strip-components=1 cmake -S . -B build.d -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/amd64-unknown-netbsd-3rdroot -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTING=OFF -DJANSSON_BUILD_SHARED_LIBS=OFF -DCMAKE_C_STANDARD=99 -DCMAKE_C_STANDARD_REQUIRED=ON -DPCRE2_BUILD_PCRE2_8=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_BUILD_PCRE2GREP=OFF -DPCRE2_BUILD_TESTS=OFF -DPCRE2_SUPPORT_VALGRIND=OFF -DPCRE2_SUPPORT_UNICODE=ON cmake --build build.d cmake --install build.d - run: ./autogen.sh - run: | ./configure --host=amd64-unknown-netbsd --prefix=${{ github.workspace }}/uctags-netbsd-amd64 --enable-static || { cat config.log exit 1 } - run: make V=1 - run: make install - run: readelf -h ctags - run: readelf -d ctags - run: file ctags | grep NetBSD ================================================ FILE: .github/workflows/cross-compile-for-android-on-macos.yml ================================================ name: cross compile for Android on macOS on: push: branches: [ master ] pull_request: branches: [ master ] jobs: cross-compile: strategy: fail-fast: false matrix: build-machine-os: [macos-15, macos-14, macos-26] runs-on: ${{ matrix.build-machine-os }} steps: - uses: actions/checkout@v6 - run: brew install make automake autoconf file - run: ./autogen.sh - name: Run ./configure ... run: | TOOLCHAIN_BASE_DIR=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/darwin-x86_64 TOOLCHAIN_BIN_DIR=$TOOLCHAIN_BASE_DIR/bin SYSROOT=$TOOLCHAIN_BASE_DIR/sysroot export CC=$TOOLCHAIN_BIN_DIR/armv7a-linux-androideabi24-clang export AR=$TOOLCHAIN_BIN_DIR/llvm-ar export RANLIB=$TOOLCHAIN_BIN_DIR/llvm-ranlib export CFLAGS="--sysroot $SYSROOT -Qunused-arguments -Os -fpic" export CPPFLAGS="--sysroot $SYSROOT -Qunused-arguments" export LDFLAGS="--sysroot $SYSROOT" ./configure \ --host=armv7a-linux-androideabi \ --disable-iconv \ --disable-xml \ --disable-json \ --disable-yaml \ --disable-pcre2 - run: make V=1 - run: file ctags | grep 'ELF 32-bit LSB pie executable, ARM, EABI5' ================================================ FILE: .github/workflows/cross-compile-for-android-on-ubuntu.yml ================================================ name: cross compile for Android on ubuntu on: push: branches: [ master ] pull_request: branches: [ master ] jobs: cross-compile: strategy: fail-fast: false matrix: build-machine-os: [ubuntu-24.04, ubuntu-22.04] runs-on: ${{ matrix.build-machine-os }} steps: - uses: actions/checkout@v6 - run: sudo apt-get -y -o APT::Immediate-Configure=false update - run: sudo apt-get -y -o APT::Immediate-Configure=false install gcc make automake autoconf file - run: ./autogen.sh - name: Run ./configure ... run: | TOOLCHAIN_BASE_DIR=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64 TOOLCHAIN_BIN_DIR=$TOOLCHAIN_BASE_DIR/bin SYSROOT=$TOOLCHAIN_BASE_DIR/sysroot export CC=$TOOLCHAIN_BIN_DIR/armv7a-linux-androideabi24-clang export AR=$TOOLCHAIN_BIN_DIR/llvm-ar export RANLIB=$TOOLCHAIN_BIN_DIR/llvm-ranlib export CFLAGS="--sysroot $SYSROOT -Qunused-arguments -Os -fpic" export CPPFLAGS="--sysroot $SYSROOT -Qunused-arguments" export LDFLAGS="--sysroot $SYSROOT" set -ex ./configure \ --host=armv7a-linux-androideabi \ --disable-iconv \ --disable-xml \ --disable-json \ --disable-yaml \ --disable-pcre2 - run: make V=1 # pie executable or shared object - run: file ctags | grep 'ELF 32-bit LSB .*, ARM, EABI5' ================================================ FILE: .github/workflows/cross-compile-for-freebsd-on-ubuntu.yml ================================================ name: cross compile for FreeBSD on Ubuntu on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: strategy: fail-fast: false matrix: freebsd-release-version: ['14.2', '14.1', '14.0', '13.4', '13.3', '13.2', '13.1', '13.0'] # https://archive.freebsd.org/old-releases/amd64/ runs-on: ubuntu-latest env: CC: clang --target=amd64-unknown-freebsd --sysroot=${{ github.workspace }}/amd64-unknown-freebsd-sysroot CFLAGS: -I${{ github.workspace }}/amd64-unknown-freebsd-3rdroot/include -fPIC LDFLAGS: -L${{ github.workspace }}/amd64-unknown-freebsd-3rdroot/lib PKG_CONFIG_PATH: ${{ github.workspace }}/amd64-unknown-freebsd-3rdroot/lib/pkgconfig steps: - uses: actions/checkout@v6 - run: sudo apt-get -y update - run: sudo apt-get -y install clang cmake make automake autoconf curl file - run: install -d amd64-unknown-freebsd-sysroot - run: install -d amd64-unknown-freebsd-3rdroot - run: curl -L -o amd64-unknown-freebsd-sysroot.txz https://archive.freebsd.org/old-releases/amd64/${{ matrix.freebsd-release-version }}-RELEASE/base.txz - run: tar vxf amd64-unknown-freebsd-sysroot.txz -C amd64-unknown-freebsd-sysroot - name: build zlib run: | install -d src/zlib cd src/zlib curl -L -o src.tar.gz https://distfiles.macports.org/zlib/zlib-1.3.1.tar.xz tar vxf src.tar.gz --strip-components=1 sed -i 's|/share/pkgconfig|/lib/pkgconfig|' CMakeLists.txt cmake -S . -B build.d -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/amd64-unknown-freebsd-3rdroot -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTING=OFF cmake --build build.d cmake --install build.d - name: build libiconv run: | install -d src/libiconv cd src/libiconv curl -L -o src.tar.gz https://distfiles.macports.org/libiconv/libiconv-1.17.tar.gz tar vxf src.tar.gz --strip-components=1 ./configure --host=amd64-unknown-freebsd --prefix=${{ github.workspace }}/amd64-unknown-freebsd-3rdroot --enable-extra-encodings --enable-static --disable-shared make V=1 make install - name: build libxml2 run: | install -d src/libxml2 cd src/libxml2 curl -L -o src.tar.gz https://download.gnome.org/sources/libxml2/2.11/libxml2-2.11.6.tar.xz tar vxf src.tar.gz --strip-components=1 ./configure --host=amd64-unknown-freebsd --prefix=${{ github.workspace }}/amd64-unknown-freebsd-3rdroot --with-zlib --without-lzma --without-python --without-readline --without-coverage --enable-ipv6 --enable-static --disable-shared LIBS=-liconv make V=1 make install - name: build libyaml run: | install -d src/libyaml cd src/libyaml curl -L -o src.tar.gz https://github.com/yaml/libyaml/releases/download/0.2.5/yaml-0.2.5.tar.gz tar vxf src.tar.gz --strip-components=1 ./configure --host=amd64-unknown-freebsd --prefix=${{ github.workspace }}/amd64-unknown-freebsd-3rdroot make V=1 make install - name: build jansson run: | install -d src/jansson cd src/jansson curl -L -o src.tar.gz https://github.com/akheron/jansson/releases/download/v2.14/jansson-2.14.tar.gz tar vxf src.tar.gz --strip-components=1 cmake -S . -B build.d -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/amd64-unknown-freebsd-3rdroot -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTING=OFF -DJANSSON_BUILD_SHARED_LIBS=OFF -DJANSSON_BUILD_DOCS=OFF -DJANSSON_COVERAGE=OFF -DJANSSON_EXAMPLES=OFF -DJANSSON_WITHOUT_TESTS=ON cmake --build build.d cmake --install build.d - name: build libpcre2 run: | install -d src/libpcre2 cd src/libpcre2 curl -L -o src.tar.gz https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.tar.bz2 tar vxf src.tar.gz --strip-components=1 cmake -S . -B build.d -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/amd64-unknown-freebsd-3rdroot -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTING=OFF -DJANSSON_BUILD_SHARED_LIBS=OFF -DCMAKE_C_STANDARD=99 -DCMAKE_C_STANDARD_REQUIRED=ON -DPCRE2_BUILD_PCRE2_8=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_BUILD_PCRE2GREP=OFF -DPCRE2_BUILD_TESTS=OFF -DPCRE2_SUPPORT_VALGRIND=OFF -DPCRE2_SUPPORT_UNICODE=ON cmake --build build.d cmake --install build.d - run: ./autogen.sh - run: | ./configure --host=amd64-unknown-freebsd --prefix=${{ github.workspace }}/uctags-freebsd-amd64 --enable-static || { cat config.log exit 1 } - run: make V=1 - run: make install - run: readelf -h ctags - run: readelf -d ctags - run: file ctags | grep FreeBSD ================================================ FILE: .github/workflows/cross-compile-for-openbsd-on-ubuntu.yml ================================================ name: cross compile for OpenBSD on Ubuntu on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: strategy: fail-fast: false matrix: openbsd-release-version: ['7.8', '7.7'] # https://cdn.openbsd.org/pub/OpenBSD/ runs-on: ubuntu-latest env: CC: clang --target=amd64-unknown-openbsd --sysroot=${{ github.workspace }}/amd64-unknown-openbsd-sysroot CFLAGS: -I${{ github.workspace }}/amd64-unknown-openbsd-3rdroot/include -fPIC LDFLAGS: -L${{ github.workspace }}/amd64-unknown-openbsd-3rdroot/lib PKG_CONFIG_PATH: ${{ github.workspace }}/amd64-unknown-openbsd-3rdroot/lib/pkgconfig steps: - uses: actions/checkout@v6 - run: sudo apt-get -y update - run: sudo apt-get -y install clang cmake make automake autoconf pkg-config curl file - run: install -d amd64-unknown-openbsd-sysroot - run: install -d amd64-unknown-openbsd-3rdroot - name: install amd64-unknown-openbsd-sysroot run: | major="$(printf '%s\n' ${{ matrix.openbsd-release-version }} | cut -d. -f1)" minor="$(printf '%s\n' ${{ matrix.openbsd-release-version }} | cut -d. -f2)" for item in base comp do FILENAME="$item$major$minor.tgz" curl -LO "https://cdn.openbsd.org/pub/OpenBSD/${{ matrix.openbsd-release-version }}/amd64/$FILENAME" tar vxf "$FILENAME" -C amd64-unknown-openbsd-sysroot done - name: build zlib run: | install -d src/zlib cd src/zlib curl -L -o src.tar.gz https://distfiles.macports.org/zlib/zlib-1.3.1.tar.xz tar vxf src.tar.gz --strip-components=1 sed -i 's|/share/pkgconfig|/lib/pkgconfig|' CMakeLists.txt cmake -S . -B build.d -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/amd64-unknown-openbsd-3rdroot -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTING=OFF cmake --build build.d cmake --install build.d - name: build libiconv run: | install -d src/libiconv cd src/libiconv curl -L -o src.tar.gz https://distfiles.macports.org/libiconv/libiconv-1.17.tar.gz tar vxf src.tar.gz --strip-components=1 ./configure --host=amd64-unknown-openbsd --prefix=${{ github.workspace }}/amd64-unknown-openbsd-3rdroot --enable-extra-encodings --enable-static --disable-shared make V=1 make install - name: build libxml2 run: | install -d src/libxml2 cd src/libxml2 curl -L -o src.tar.gz https://download.gnome.org/sources/libxml2/2.11/libxml2-2.11.6.tar.xz tar vxf src.tar.gz --strip-components=1 ./configure --host=amd64-unknown-openbsd --prefix=${{ github.workspace }}/amd64-unknown-openbsd-3rdroot --with-zlib --without-lzma --without-python --without-readline --without-coverage --enable-ipv6 --enable-static --disable-shared LIBS=-liconv make V=1 make install cd ${{ github.workspace }}/amd64-unknown-openbsd-3rdroot/lib/pkgconfig sed -i '/^Requires: /d' libxml-2.0.pc printf 'Requires: zlib\n' >> libxml-2.0.pc - name: build libyaml run: | install -d src/libyaml cd src/libyaml curl -L -o src.tar.gz https://github.com/yaml/libyaml/releases/download/0.2.5/yaml-0.2.5.tar.gz tar vxf src.tar.gz --strip-components=1 ./configure --host=amd64-unknown-openbsd --prefix=${{ github.workspace }}/amd64-unknown-openbsd-3rdroot make V=1 make install - name: build jansson run: | install -d src/jansson cd src/jansson curl -L -o src.tar.gz https://github.com/akheron/jansson/releases/download/v2.14/jansson-2.14.tar.gz tar vxf src.tar.gz --strip-components=1 cmake -S . -B build.d -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/amd64-unknown-openbsd-3rdroot -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTING=OFF -DJANSSON_BUILD_SHARED_LIBS=OFF -DJANSSON_BUILD_DOCS=OFF -DJANSSON_COVERAGE=OFF -DJANSSON_EXAMPLES=OFF -DJANSSON_WITHOUT_TESTS=ON cmake --build build.d cmake --install build.d - name: build libpcre2 run: | install -d src/libpcre2 cd src/libpcre2 curl -L -o src.tar.gz https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.tar.bz2 tar vxf src.tar.gz --strip-components=1 cmake -S . -B build.d -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/amd64-unknown-openbsd-3rdroot -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTING=OFF -DJANSSON_BUILD_SHARED_LIBS=OFF -DCMAKE_C_STANDARD=99 -DCMAKE_C_STANDARD_REQUIRED=ON -DPCRE2_BUILD_PCRE2_8=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_BUILD_PCRE2GREP=OFF -DPCRE2_BUILD_TESTS=OFF -DPCRE2_SUPPORT_VALGRIND=OFF -DPCRE2_SUPPORT_UNICODE=ON cmake --build build.d cmake --install build.d - run: rm ${{ github.workspace }}/amd64-unknown-openbsd-3rdroot/lib/lib*.so - run: ./autogen.sh - run: | ./configure --host=amd64-unknown-openbsd --prefix=${{ github.workspace }}/uctags-openbsd-amd64 || { cat config.log exit 1 } - run: cat config.log - run: make V=1 - run: make install - run: readelf -h ctags - run: readelf -d ctags - run: file ctags | grep OpenBSD ================================================ FILE: .github/workflows/cross-compile-for-windows-on-macos.yml ================================================ name: cross compile for Windows on macOS on: push: branches: [ master ] pull_request: branches: [ master ] jobs: cross-compile: strategy: fail-fast: false matrix: build-machine-os: [macos-15, macos-14, macos-26] target: [i686-w64-mingw32,x86_64-w64-mingw32] runs-on: ${{ matrix.build-machine-os }} steps: - uses: actions/checkout@v6 - run: brew install mingw-w64 make automake autoconf file - run: ./autogen.sh - name: Run ./configure ... run: | ./configure \ --host=${{ matrix.target }} \ --disable-iconv \ --disable-xml \ --disable-json \ --disable-yaml \ --disable-pcre2 \ CC=${{ matrix.target }}-gcc \ CFLAGS='-v' \ AR=${{ matrix.target }}-ar \ RANLIB=${{ matrix.target }}-ranlib \ WINDRES=${{ matrix.target }}-windres - run: make V=1 - run: file ctags.exe | grep PE32 ================================================ FILE: .github/workflows/cross-compile-for-windows-on-ubuntu.yml ================================================ name: cross compile for Windows on Ubuntu on: push: branches: [ master ] pull_request: branches: [ master ] jobs: cross-compile: strategy: fail-fast: false matrix: build-machine-os: [ubuntu-22.04, ubuntu-24.04] target: [i686-w64-mingw32,x86_64-w64-mingw32] runs-on: ${{ matrix.build-machine-os }} steps: - uses: actions/checkout@v6 - run: sudo apt-get -y -o APT::Immediate-Configure=false update - run: sudo apt-get -y -o APT::Immediate-Configure=false install mingw-w64 gcc make automake autoconf file - run: ./autogen.sh - name: Run ./configure ... run: | ./configure \ --host=${{ matrix.target }} \ --disable-iconv \ --disable-xml \ --disable-json \ --disable-yaml \ --disable-pcre2 \ CC=${{ matrix.target }}-gcc \ CFLAGS='-v' \ AR=${{ matrix.target }}-ar \ RANLIB=${{ matrix.target }}-ranlib \ WINDRES=${{ matrix.target }}-windres - run: make V=1 - run: file ctags.exe | grep PE32 ================================================ FILE: .github/workflows/run-citre-tests.yml ================================================ # Citre (https://github.com/universal-ctags/citre) is a readtags frontend for # Emacs. This workflow runs unit tests of Citre to make sure changes in # readtags doesn't break the behavior that Citre expects. # Ref: https://github.com/universal-ctags/citre/issues/58#issuecomment-846229409 name: run Citre tests on GNU/Linux on: push: branches: [ master ] pull_request: branches: [ master ] jobs: testing: runs-on: ubuntu-latest env: CC: gcc READTAGS: '${{ github.workspace }}/readtags' steps: - uses: actions/checkout@v6 - name: update package information run: sudo apt-get -y -o APT::Immediate-Configure=false update - name: install tools and libraries run: sudo apt-get -y -o APT::Immediate-Configure=false install pkg-config automake libjansson-dev libyaml-dev libseccomp-dev libxml2-dev - name: autogen.sh run: ./autogen.sh - name: report the version of cc run: $CC --version - name: report the version of make run: make --version - name: configure run: ./configure - name: make run: make - name: report features run: ./ctags --list-features - name: install Emacs run: sudo apt-get -y -o APT::Immediate-Configure=false install emacs - name: checkout Citre repo uses: actions/checkout@v6 with: repository: 'universal-ctags/citre' path: 'citre' - name: run Citre unit tests for tags backend working-directory: 'citre' run: make test-tags ================================================ FILE: .github/workflows/tagging.yml ================================================ name: Create a weekly tag on: schedule: - cron: '0 0 * * 0' jobs: tag: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 with: fetch-depth: 0 - run: misc/git-tag-maybe.sh ================================================ FILE: .github/workflows/testing-bsds.yml.bak ================================================ name: run units target on FreeBSD OpenBSD NetBSD on: push: branches: [ master ] pull_request: branches: [ master ] jobs: freebsd: runs-on: macos-12 strategy: fail-fast: false matrix: freebsd-version: [12,13] steps: - uses: actions/checkout@v3 - uses: actions/cache@v2 with: path: ~/.vagrant.d/boxes key: vagrant-generic-freebsd-${{ matrix.freebsd-version }} restore-keys: | vagrant-generic-freebsd-${{ matrix.freebsd-version }} # https://app.vagrantup.com/boxes/search?utf8=%E2%9C%93&sort=downloads&provider=&q=freebsd # https://github.com/leleliu008/github-actions-vagrant - uses: leleliu008/github-actions-vagrant@v2 with: mem: 2048 box: generic/freebsd${{ matrix.freebsd-version }} log: warn run: | run pkg install -y automake pkgconf gmake python3 run freebsd-version run cc --version run ./autogen.sh run ./configure --prefix=/usr run gmake run gmake install run file ctags run ctags --version run gmake check CI=gha+vagrant+freebsd run gmake roundtrip CI=gha+vagrant+freebsd openbsd: needs: freebsd runs-on: macos-12 steps: - uses: actions/checkout@v3 - uses: actions/cache@v2 with: path: ~/.vagrant.d/boxes key: vagrant-generic-openbsd-7 restore-keys: | vagrant-generic-openbsd-7 - uses: leleliu008/github-actions-vagrant@v2 with: mem: 2048 box: generic/openbsd7 log: warn run: | export AUTOCONF_VERSION=2.69 export AUTOMAKE_VERSION=1.16 export CFLAGS='-I/usr/local/include -L/usr/local/lib' if [ ! -f /usr/local/lib/libiconv.so ] ; then sudo ln -s /usr/local/lib/libiconv.so.* /usr/local/lib/libiconv.so fi run sudo pkg_add automake-1.16.3 gmake run cc --version run ./autogen.sh run ./configure --prefix=/usr run gmake run sudo gmake install run file /usr/bin/ctags run ctags --version # bugs to fix #run make check CI=gha+vagrant+openbsd run gmake roundtrip CI=gha+vagrant+openbsd netbsd: needs: openbsd runs-on: macos-12 steps: - uses: actions/checkout@v3 - uses: actions/cache@v2 with: path: ~/.vagrant.d/boxes key: vagrant-generic-netbsd-9 restore-keys: | vagrant-generic-netbsd-9 - uses: leleliu008/github-actions-vagrant@v2 with: mem: 2048 box: generic/netbsd9 log: warn run: | run sudo pkgin -y install mozilla-rootcerts automake autoconf pkg-config gmake run cc --version run ./autogen.sh run ./configure --prefix=/usr run gmake run sudo gmake install run file /usr/bin/ctags run ctags --version # bugs to fix #run make check CI=gha+vagrant+netbsd run gmake roundtrip CI=gha+vagrant+netbsd ================================================ FILE: .github/workflows/testing-on-alpine.yml ================================================ name: run units target on AlpineLinux on: push: branches: [ master ] pull_request: branches: [ master ] jobs: testing: strategy: fail-fast: false matrix: tag: ['3.23', '3.22', '3.21', '3.20', '3.19', '3.18', '3.17', '3.16'] runs-on: ubuntu-latest container: alpine:${{ matrix.tag }} steps: - run: apk add libc-dev gcc make automake autoconf pkgconf python3 file diffutils git pcre2-dev jansson-dev yaml-dev libxml2-dev # this is to fix https://github.com/actions/checkout/issues/760 - run: git config --global --add safe.directory /__w/ctags/ctags - uses: actions/checkout@v6 - run: cc --version - run: ./autogen.sh - run: ./configure --prefix=/usr - run: make - run: make install - run: file /usr/bin/ctags - run: ctags --version - run: make check V=1 - run: make roundtrip chroot_qemu: runs-on: ubuntu-latest strategy: fail-fast: false matrix: target-arch: [loongarch64, aarch64, ppc64le, riscv64, s390x] timeout-minutes: 45 steps: - uses: actions/checkout@v6 - run: | cat > run.sh <\033[0m \033[0;32m%b\n\033[0m" "\$*" eval "\$@" } run apk add libc-dev gcc make automake autoconf pkgconf python3 diffutils pcre2-dev jansson-dev yaml-dev libxml2-dev run ./autogen.sh run ./configure --enable-debugging run make run readelf -h ctags run readelf -d ctags run ./ctags --version run make check V=1 run make roundtrip run make tmain CI=1 CTAGS_DEP= READTAGS_DEP= OPTSCRIPT_DEP= run make units CI=1 CTAGS_DEP= EOF - run: curl -LO https://raw.githubusercontent.com/alpinelinux/alpine-chroot-install/master/alpine-chroot-install - run: chmod +x alpine-chroot-install - run: sudo ./alpine-chroot-install -d /alpine -a ${{ matrix.target-arch }} - run: /alpine/enter-chroot sh run.sh ================================================ FILE: .github/workflows/testing-on-cygwin.yml ================================================ name: run units target on Cygwin on: push: branches: [ master ] pull_request: branches: [ master ] jobs: testing: runs-on: windows-latest defaults: run: shell: C:\tools\cygwin\bin\bash.exe -l -i {0} steps: # https://www.cygwin.com/faq/faq.html#faq.setup.cli - run: Invoke-WebRequest -OutFile setup-x86_64.exe "http://cygwin.com/setup-x86_64.exe" shell: pwsh - run: .\setup-x86_64.exe --quiet-mode --no-desktop --no-shortcuts --no-startmenu --only-site --site http://mirrors.kernel.org/sourceware/cygwin/ --root C:\tools\cygwin --local-package-dir C:\tools\cygwin\packages --packages gcc-g++,make,automake,autoconf,pkg-config,dos2unix,libiconv-devel,libjansson-devel,libxml2-devel,libyaml-devel | Out-Default shell: pwsh - run: git config --global core.autocrlf input shell: bash - uses: actions/checkout@v6 - run: printf 'cd %s' "$(cygpath '${{ github.workspace }}')" >> ~/.bashrc - run: ./autogen.sh - run: ./configure --prefix=/usr - run: make V=1 - run: make install - run: file /usr/bin/ctags - run: /usr/bin/ctags --version - run: make check V=1 - run: make roundtrip ================================================ FILE: .github/workflows/testing-on-freebsd.yml ================================================ name: run units target on FreeBSD on: push: branches: [ master ] pull_request: branches: [ master ] jobs: testing: runs-on: ubuntu-latest strategy: fail-fast: false matrix: freebsd-version: ['15.0', '14.3', '14.2', '14.1', '14.0', '13.5', '13.4', '13.3', '13.2'] steps: - uses: actions/checkout@v6 - uses: cross-platform-actions/action@master with: operating_system: freebsd version: ${{ matrix.freebsd-version }} shell: bash run: | run() { printf "\033[0;35m==>\033[0m \033[0;32m%b\n\033[0m" "$*" eval "$@" } run sudo pkg install -y automake gmake pkgconf jansson libyaml libxml2 libiconv python3 run freebsd-version run cc --version run ./autogen.sh run ./configure --prefix=/usr run gmake run sudo gmake install run readelf -h ctags run readelf -d ctags run ctags --version run gmake check CI=gha+vagrant+freebsd run gmake roundtrip CI=gha+vagrant+freebsd ================================================ FILE: .github/workflows/testing-on-macos.yml ================================================ name: run units target on macOS on: push: branches: [ master ] pull_request: branches: [ master ] jobs: testing: strategy: matrix: os: [macos-15, macos-14, macos-26] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v6 # temporarily disabled, because it always fails these days. #- run: brew update # NOTE: DO NOT try to install libiconv and libxml2 package via brew, because macOS already provides them. # NOTE: DO NOT try to install python3 package via brew, it has already been included in macos-xx runner images # https://github.com/actions/runner-images/blob/main/images/macos/macos-26-arm64-Readme.md - if: matrix.os == 'macos-26' run: brew install --overwrite python@3.12 - run: brew install automake jansson libyaml pcre2 - run: pip3 install docutils --break-system-packages - run: cc --version - run: make --version - run: ./autogen.sh - run: ./configure --enable-debugging --enable-iconv - run: make -j2 - run: ./ctags --version - run: ./ctags --list-features - run: make check - run: make roundtrip - run: make tmain - run: make units ================================================ FILE: .github/workflows/testing-on-msys2.yml ================================================ name: run units target on MSYS2 on: push: branches: [ master ] pull_request: branches: [ master ] jobs: testing: runs-on: windows-latest strategy: fail-fast: false matrix: msystem: [MINGW32, MINGW64, CLANG64] defaults: run: shell: msys2 {0} steps: - uses: msys2/setup-msys2@v2 with: msystem: ${{ matrix.msystem }} update: true install: automake autoconf make dos2unix pkg-config pacboy: toolchain:p python-sphinx:p jansson:p libxml2:p libyaml:p pcre2:p - run: git config --global core.autocrlf input shell: bash - uses: actions/checkout@v6 - run: ./autogen.sh - run: ./configure --prefix=/usr - run: make V=1 - run: make install - run: file /usr/bin/ctags - run: ctags --version - run: make check V=1 # FAILED: "./readtags.exe" -t "/d/a/ctags2/ctags2/Units/parser-asciidoc.r/utf8-asciidoc.d/expected.tags" - "@Ѐ–𐀀" # The raw tag name was "@Ѐ–𐀀" #- run: make roundtrip - run: make tmain - run: make units ================================================ FILE: .github/workflows/testing-on-netbsd.yml ================================================ name: run units target on NetBSD on: push: branches: [ master ] pull_request: branches: [ master ] jobs: testing: runs-on: ubuntu-latest strategy: fail-fast: false matrix: netbsd-version: ['10.1', '10.0', '9.4', '9.3', '9.2'] steps: - uses: actions/checkout@v6 - uses: cross-platform-actions/action@v0.32.0 with: operating_system: netbsd version: ${{ matrix.netbsd-version }} shell: bash run: | run() { printf "\033[0;35m==>\033[0m \033[0;32m%b\n\033[0m" "$*" eval "$@" } # DO NOT try to install libxml2, because it has already been pre-installed run sudo pkgin -y install automake autoconf gmake pkg-config jansson libyaml libiconv run cc --version run ./autogen.sh run ./configure --prefix=/usr run gmake run sudo gmake install run readelf -h /usr/bin/ctags run readelf -d /usr/bin/ctags run ctags --version # bugs to fix #run make check CI=gha+vagrant+netbsd run gmake roundtrip CI=gha+vagrant+netbsd ================================================ FILE: .github/workflows/testing-on-openbsd.yml ================================================ name: run units target on OpenBSD on: push: branches: [ master ] pull_request: branches: [ master ] jobs: testing: runs-on: ubuntu-latest strategy: fail-fast: false matrix: openbsd-version: ['7.8', '7.7', '7.6', '7.5', '7.4', '7.3', '7.2'] steps: - uses: actions/checkout@v6 - uses: cross-platform-actions/action@master with: operating_system: openbsd version: ${{ matrix.openbsd-version }} shell: bash run: | run() { printf "\033[0;35m==>\033[0m \033[0;32m%b\n\033[0m" "$*" eval "$@" } export AUTOCONF_VERSION=2.69 export AUTOMAKE_VERSION=1.16 export CFLAGS='-I/usr/local/include' export LDFLAGS='-L/usr/local/lib' run sudo pkg_add autoconf%2.69 automake%1.16 gmake pkgconf jansson libyaml libxml libiconv run cc --version run ./autogen.sh run ./configure --prefix=/usr run gmake run sudo gmake install run readelf -h /usr/bin/ctags run readelf -d /usr/bin/ctags run ctags --version # bugs to fix #run make check CI=gha+vagrant+openbsd run gmake roundtrip CI=gha+vagrant+openbsd ================================================ FILE: .github/workflows/testing-on-ubi.yml ================================================ name: run units target on UBI on: push: branches: [ master ] pull_request: branches: [ master ] jobs: testing: strategy: fail-fast: false matrix: tag: ['8' ] runs-on: ubuntu-latest container: registry.access.redhat.com/ubi${{ matrix.tag }}:latest steps: - run: dnf install -y --enablerepo=ubi-${{ matrix.tag }}-appstream-rpms --enablerepo=ubi-${{ matrix.tag }}-baseos-rpms --enablerepo=ubi-${{ matrix.tag }}-codeready-builder-rpms git python3 gcc automake autoconf pkgconfig make libxml2-devel libyaml-devel pcre2-devel findutils diffutils sudo file # this is to fix https://github.com/actions/checkout/issues/760 - run: git config --global --add safe.directory /__w/ctags/ctags - uses: actions/checkout@v6 - run: cc --version - run: ./autogen.sh - run: ./configure --prefix=/usr - run: make - run: make install - run: file /usr/bin/ctags - run: ctags --version - run: make check V=1 - run: make roundtrip ================================================ FILE: .github/workflows/testing-on-ubuntu.yml ================================================ name: run units target on Ubuntu on: push: branches: [ master ] pull_request: branches: [ master ] jobs: testing: strategy: matrix: os: [ubuntu-24.04, ubuntu-22.04] compiler: [gcc, clang] runs-on: ${{ matrix.os }} env: DEBIAN_FRONTEND: noninteractive CC: ${{ matrix.compiler }} steps: - uses: actions/checkout@v6 with: fetch-depth: 0 - run: sudo apt-get -y -o APT::Immediate-Configure=false update - run: sudo apt-get -y -o APT::Immediate-Configure=false install pkg-config automake ${{ matrix.compiler }} gdb bash python3-docutils libseccomp-dev libjansson-dev libyaml-dev libxml2-dev libpcre2-dev # valgrind doesn't work well with an executable built with clang 14. # https://forum.manjaro.org/t/valgrind-fails-possibly-corrupted-debuginfo-file/118156 - if: matrix.compiler == 'clang' && matrix.os == 'ubuntu-22.04' run: | type clang > /dev/null && clang --version | head -1 | grep -q 14 \ || sudo apt-get -y -o APT::Immediate-Configure=false install valgrind - run: ${{ matrix.compiler }} --version - run: make --version - run: ./autogen.sh - run: mkdir -p build.d - run: cd build.d && ../configure --enable-debugging --enable-iconv - run: make -C build.d -j2 - run: cd build.d && ./ctags --list-features - run: cd build.d && ./ctags --help - run: cd build.d && ./ctags --version - run: make -C build.d check - run: make -C build.d roundtrip - run: make -C build.d dist ############################################################################# - run: mkdir -p dist-src - run: tar xf build.d/universal-ctags*tar.gz -C dist-src --strip-components=1 - run: mkdir -p build2.d - run: cd build2.d && ../dist-src/configure --enable-debugging - run: cd build2.d && make -j2 - run: cd build2.d && ./ctags --list-features - run: cd build2.d && ./ctags --help - run: cd build2.d && ./ctags --version # Our sandbox doesn't work with gcov. # Following cases target ctags without gcov. - run: cd build2.d && make tmain UNITS=sandbox,sandbox-crash,sandbox-default-req,sandbox-unknown-submode - run: cd build2.d && make clean ================================================ FILE: .github/workflows/testing-with-valgrind.yml ================================================ name: run units target under VALGRIND on: push: branches: [ master ] pull_request: branches: [ master ] jobs: testing: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - run: sudo apt-get update - run: sudo apt-get install valgrind pkg-config automake bash libjansson-dev libyaml-dev libseccomp-dev libxml2-dev libpcre2-dev gdb - run: cc --version - run: ./autogen.sh - run: ./configure --enable-debugging - run: make CFLAGS='-g -O0' - run: make units VG=1 ================================================ FILE: .gitignore ================================================ *-actual.txt *-diff.txt *.func-sort-c.html *.func.html *.gcda *.gcno *.gcov *.gcov.html *.o *.obj *.od *.pdf *.pyc *.swp *.c3workspace *.c3workspace.user *.tar.gz *.TMP *.tmp *~ /Makefile /packcc /packcc.exe /packcc.dSYM .cache .deps .dirstamp .DS_Store a.out aclocal.m4 autom4te.cache badinput commit-stamp compile compile_commands.json config.cache config.guess config.h config.h.in config.log config.status config.sub configure core.* ctags ctags-universal* ctags.exe ctags.ref ctags.ref.exe dctags dctags.exe depcomp gdb-backtrace.txt GNUmakefile.in install-sh last-aclocal.m4 libctags.a libutil.a Makefile.in mini-geany mini-geany.exe missing mkinstalldirs optscript perf.data* readtags readtags.exe repoinfo.h respmvc stamp-h1 STDERR.* syntax.vim tags tags.ref tags.test test.*.diff tg tinst-root utiltest win32/*.aps win32/*.opensdf win32/*.sdf win32/*.suo win32/*.user win32/[Dd]ebug/ win32/[Rr]elease/ _build man/ctags.1 man/ctags.1.html man/ctags.1.rst man/ctags-*.5 man/ctags-*.5.rst man/ctags-*.5.html man/ctags-*.7 man/ctags-*.7.rst man/ctags-*.7.html man/GNUmakefile man/readtags.1 man/readtags.1.rst man/readtags.1.html man/tags.5 man/tags.5.rst man/tags.5.html man/*.[157].in ManTest misc/mini-geany.actual Tmain/**/Makefile Tmain/**/Makefile.am Tmain/**/Makefile.in Units/**/Makefile Units/**/Makefile.am Units/**/Makefile.in Tmain/dist.m4 Units/dist.m4 VALGRIND.tmp.core.* gnulib/Makefile gnulib/alloca.h gnulib/ctype.h gnulib/inttypes.h gnulib/langinfo.h gnulib/libgnu.a gnulib/limits.h gnulib/locale.h gnulib/malloc/dynarray-skeleton.gl.h gnulib/malloc/dynarray.gl.h gnulib/stdlib.h gnulib/string.h gnulib/unistd.h gnulib/wchar.h gnulib/wctype.h gnulib/sys/types.h ================================================ FILE: .indent.pro ================================================ --blank-before-sizeof --blank-lines-after-procedures --brace-indent0 --braces-after-if-line --braces-on-struct-decl-line --break-after-boolean-operator --case-brace-indentation0 --case-indentation0 --comment-indentation0 --continuation-indentation4 --cuddle-do-while --declaration-comment-column0 --declaration-indentation0 --dont-break-function-decl-args --dont-break-procedure-type --dont-line-up-parentheses --honour-newlines --indent-level4 --line-length80 --paren-indentation4 --preprocessor-indentation1 --no-blank-lines-after-commas --space-after-cast --space-after-for --space-after-if --space-after-procedure-calls --space-after-while --space-special-semicolon --start-left-side-of-comments --struct-brace-indentation4 --tab-size4 ================================================ FILE: .readthedocs.yaml ================================================ # .readthedocs.yaml # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details # Required version: 2 # Set the version of Python and other tools you might need build: os: ubuntu-22.04 tools: python: "3.11" # Build documentation in the docs/ directory with Sphinx sphinx: configuration: docs/conf.py # We recommend specifying your dependencies to enable reproducible builds: # https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html # python: # install: # - requirements: docs/requirements.txt ================================================ FILE: .uncrustify.cfg ================================================ tok_split_gte=false utf8_byte=false utf8_force=false indent_cmt_with_tabs=false indent_align_string=false indent_braces=false indent_braces_no_func=false indent_braces_no_class=false indent_braces_no_struct=false indent_brace_parent=false indent_namespace=false indent_extern=false indent_class=false indent_class_colon=false indent_else_if=false indent_var_def_cont=false indent_func_call_param=false indent_func_def_param=false indent_func_proto_param=false indent_func_class_param=false indent_func_ctor_var_param=false indent_template_param=false indent_func_param_double=false indent_relative_single_line_comments=false indent_col1_comment=false indent_access_spec_body=false indent_paren_nl=false indent_comma_paren=false indent_bool_paren=false indent_first_bool_expr=false indent_square_nl=false indent_preserve_sql=false indent_align_assign=true sp_balance_nested_parens=false align_keep_tabs=false align_with_tabs=false align_on_tabstop=false align_number_left=false align_func_params=false align_same_func_call_params=false align_var_def_colon=false align_var_def_attribute=false align_var_def_inline=false align_right_cmt_mix=false align_on_operator=false align_mix_var_proto=false align_single_line_func=false align_single_line_brace=false align_nl_cont=false align_left_shift=true align_oc_decl_colon=false nl_collapse_empty_body=false nl_assign_leave_one_liners=false nl_class_leave_one_liners=false nl_enum_leave_one_liners=false nl_getset_leave_one_liners=false nl_func_leave_one_liners=false nl_if_leave_one_liners=false nl_multi_line_cond=false nl_multi_line_define=false nl_before_case=false nl_after_case=false nl_after_return=false nl_after_semicolon=false nl_after_brace_open=false nl_after_brace_open_cmt=false nl_after_vbrace_open=false nl_after_vbrace_open_empty=false nl_after_brace_close=false nl_after_vbrace_close=false nl_define_macro=false nl_squeeze_ifdef=false nl_ds_struct_enum_cmt=false nl_ds_struct_enum_close_brace=false nl_create_if_one_liner=false nl_create_for_one_liner=false nl_create_while_one_liner=false ls_for_split_full=false ls_func_split_full=false nl_after_multiline_comment=false eat_blanks_after_open_brace=false eat_blanks_before_close_brace=false mod_full_brace_if_chain=false mod_pawn_semicolon=false mod_full_paren_if_bool=false mod_remove_extra_semicolon=false mod_sort_import=false mod_sort_using=false mod_sort_include=false mod_move_case_break=false mod_remove_empty_return=false cmt_indent_multi=true cmt_c_group=false cmt_c_nl_start=false cmt_c_nl_end=false cmt_cpp_group=false cmt_cpp_nl_start=false cmt_cpp_nl_end=false cmt_cpp_to_c=false cmt_star_cont=false cmt_multi_check_last=true cmt_insert_before_preproc=false pp_indent_at_level=false pp_region_indent_code=false pp_if_indent_code=false pp_define_at_level=false input_tab_size=4 output_tab_size=4 indent_columns=4 indent_brace=0 indent_switch_case=4 nl_after_func_body=2 nl_after_func_body_one_liner=2 indent_with_tabs=1 sp_arith=add sp_assign=add sp_assign_default=add sp_enum_assign=add sp_bool=add sp_compare=add sp_inside_paren=remove sp_paren_paren=remove sp_before_ptr_star=force sp_between_ptr_star=remove sp_after_ptr_star=remove sp_after_ptr_star_func=remove sp_before_sparen=force sp_before_semi_for_empty=force sp_before_square=add sp_before_squares=add sp_after_cast=force sp_sizeof_paren=force sp_func_call_paren=force sp_return_paren=force sp_not=force nl_start_of_file=remove nl_end_of_file=remove nl_enum_brace=remove nl_struct_brace=remove nl_union_brace=remove nl_if_brace=add nl_brace_else=add nl_elseif_brace=add nl_else_brace=add nl_else_if=remove nl_for_brace=add nl_while_brace=add nl_do_brace=add nl_brace_while=remove nl_switch_brace=add nl_fdef_brace=force ================================================ FILE: COPYING ================================================ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ================================================ FILE: Makefile.am ================================================ ACLOCAL_AMFLAGS = -I m4 #AM_CPPFLAGS = -I$(top_builddir)/gnulib -I$(top_srcdir)/gnulib GNULIB_DIR = gnulib GNULIB_CPPFLAGS = -I$(top_builddir)/$(GNULIB_DIR) -I$(top_srcdir)/$(GNULIB_DIR) GNULIB_LIBS = $(GNULIB_DIR)/libgnu.a $(LIBPTHREAD) $(GNULIB_LIBS): $(MAKE) -C $(GNULIB_DIR) all SUBDIRS = $(GNULIB_DIR) . man include $(top_srcdir)/source.mak PACKCC_FILES = misc/packcc/.gitignore \ misc/packcc/README.md \ misc/packcc/LICENSE \ misc/packcc/src/packcc.c \ \ $(NULL) VALIDATOR_SH = \ misc/validators/g++-common.sh \ misc/validators/gfortran-common.sh \ misc/validators/tsc-common.sh \ misc/validators/validator-c \ misc/validators/validator-cxx03 \ misc/validators/validator-cxx11 \ misc/validators/validator-cxx17 \ misc/validators/validator-cxx20+module \ misc/validators/validator-fortran+dollar-ok \ misc/validators/validator-gnat \ misc/validators/validator-jq \ misc/validators/validator-KNOWN-INVALIDATION \ misc/validators/validator-node \ misc/validators/validator-NONE \ misc/validators/validator-puppet \ misc/validators/validator-python \ misc/validators/validator-ruby \ misc/validators/validator-svlint \ misc/validators/validator-swipl \ misc/validators/validator-tsc \ misc/validators/validator-tsc-es2015 \ \ $(NULL) DEBUGGENS = \ \ misc/debuggen/README misc/debuggen/libdebuggen.sh \ \ misc/debuggen/rust.sh \ misc/debuggen/typescript.sh \ \ $(NULL) EXTRA_DIST = README.md NEWS.rst autogen.sh \ misc/optlib2c \ misc/enumstr.sh \ misc/gencxxtypedumper.sh \ $(DEBUGGENS) \ .ctags.d/exclusion.ctags .dir-locals.el .editorconfig .gdbinit .gitignore \ .indent.pro .uncrustify.cfg \ misc/ctags-optlib-mode.el \ misc/mk-interactive-request.sh misc/roundtrip misc/tinst \ $(PACKCC_FILES) \ $(VALIDATOR_SH) \ $(WIN32_HEADS) $(WIN32_SRCS) mk_mingw.mak mk_mvc.mak \ win32/mkstemp/COPYING.MinGW-w64-runtime.txt \ win32/ctags.rc win32/ctags.exe.manifest win32/resource.h \ win32/ctags_vs2013.sln \ win32/ctags_vs2013.vcxproj win32/ctags_vs2013.vcxproj.filters \ win32/ctags_vs2013.vcxproj.in win32/ctags_vs2013.vcxproj.filters.in \ win32/GNUmakefile \ win32/gen-repoinfo.bat \ misc/txt2cstr \ $(PEG_INPUT) $(OPTLIB2C_INPUT) $(OPTLIB2C_PCRE2_INPUT) $(TXT2CSTR_INPUT) \ misc/universal-ctags.svg \ misc/review \ docs Tmain Units m4/gnulib-cache.m4 if HAVE_PEGOF # Keeping intermediate files for debugging pegof and u-ctags buildsys. EXTRA_DIST += $(PEGO_INTERMEDIATE) endif CLEANFILES = MOSTLYCLEANFILES = MAINTAINERCLEANFILES = autom4te.cache # for distcheck clean-local: @if test "$(top_srcdir)" != "$(top_builddir)"; then \ rm -rf $(OPTLIB2C_SRCS) $(OPTLIB2C_PCRE2_SRCS); \ rm -rf $(TXT2CSTR_SRCS); \ else \ $(MAKE) -C docs clean; \ fi maintainer-clean-local: rm -rf .deps misc/packcc/.dirstamp bin_PROGRAMS = ctags noinst_LIBRARIES = noinst_LIBRARIES += libctags.a noinst_LIBRARIES += libutil.a noinst_PROGRAMS = utiltest AM_LDFLAGS = $(EXTRA_LDFLAGS) # packcc always uses native compiler even when cross-compiling. # packcc cannot use the standard Automake rule. PACKCC_CPPFLAGS_FOR_BUILD = -fsigned-char if HAVE_STRNLEN_FOR_BUILD PACKCC_CPPFLAGS_FOR_BUILD += -DPCC_USE_SYSTEM_STRNLEN endif PACKCC = $(top_builddir)/packcc$(BUILD_EXEEXT) CLEANFILES += $(PACKCC) cc4b_verbose = $(cc4b_verbose_@AM_V@) cc4b_verbose_ = $(cc4b_verbose_@AM_DEFAULT_V@) cc4b_verbose_0 = @echo CC4BUILD " $@"; $(PACKCC): $(srcdir)/$(PACKCC_SRC) $(cc4b_verbose)$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(PACKCC_CPPFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $(srcdir)/$(PACKCC_SRC) if USE_READCMD bin_PROGRAMS+= readtags readtags_CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/main -I$(srcdir)/libreadtags if ENABLE_DEBUGGING readtags_CPPFLAGS+= $(DEBUG_CPPFLAGS) endif readtags_CFLAGS = $(EXTRA_CFLAGS) $(WARNING_CFLAGS) $(COVERAGE_CFLAGS) dist_readtags_SOURCES = $(READTAGS_SRCS) $(READTAGS_HEADS) readtags_CPPFLAGS += $(GNULIB_CPPFLAGS) readtags_CPPFLAGS += -I$(srcdir)/dsl readtags_CPPFLAGS += -DHAVE_CTAGS_INLINE_H readtags_LDADD = readtags_LDADD += $(GNULIB_LIBS) readtags_LDADD += libutil.a dist_readtags_SOURCES += $(READTAGS_DSL_SRCS) $(READTAGS_DSL_HEADS) endif if HAVE_PCRE2 PARSER_SRCS += $(PCRE2_SRCS) $(OPTLIB2C_PCRE2_SRCS) PARSER_HEADS += $(PCRE2_HEADS) endif if HAVE_LIBXML PARSER_SRCS += $(XML_SRCS) PARSER_HEADS += $(XML_HEADS) endif if HAVE_JANSSON LIB_SRCS += $(JANSSON_SRCS) LIB_HEADS += $(JANSSON_HEADS) endif if HAVE_LIBYAML PARSER_SRCS += $(YAML_SRCS) PARSER_HEADS += $(YAML_HEADS) endif PARSER_HEADS += $(PEG_EXTRA_HEADS) libutil_a_CPPFLAGS = -I$(srcdir) -I$(srcdir)/main libutil_a_CFLAGS = libutil_a_CFLAGS += $(EXTRA_CFLAGS) libutil_a_CFLAGS += $(WARNING_CFLAGS) libutil_a_CFLAGS += $(COVERAGE_CFLAGS) if ENABLE_DEBUGGING libutil_a_CPPFLAGS+= $(DEBUG_CPPFLAGS) endif dist_libutil_a_SOURCES = $(UTIL_HEADS) $(UTIL_SRCS) utiltest_CPPFLAGS = -I$(srcdir) -I$(srcdir)/main utiltest_CFLAGS = utiltest_CFLAGS += $(EXTRA_CFLAGS) utiltest_CFLAGS += $(WARNING_CFLAGS) utiltest_CFLAGS += $(COVERAGE_CFLAGS) if ENABLE_DEBUGGING utiltest_CPPFLAGS += $(DEBUG_CPPFLAGS) endif utiltest_LDADD = utiltest_LDADD += libutil.a dist_utiltest_SOURCES = $(UTILTEST_HEADS) $(UTILTEST_SRCS) libctags_a_CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/main -I$(srcdir)/dsl -I$(srcdir)/peg -DHAVE_PACKCC if ENABLE_DEBUGGING libctags_a_CPPFLAGS+= $(DEBUG_CPPFLAGS) endif if HAVE_STRNLEN libctags_a_CPPFLAGS += -DUSE_SYSTEM_STRNLEN endif if HAVE_PEGOF libctags_a_CPPFLAGS += -DHAVE_PEGOF endif libctags_a_CPPFLAGS+= $(GNULIB_CPPFLAGS) libctags_a_CPPFLAGS+= -DHAVE_REPOINFO_H libctags_a_CFLAGS = libctags_a_CFLAGS += $(EXTRA_CFLAGS) libctags_a_CFLAGS += $(WARNING_CFLAGS) libctags_a_CFLAGS += $(COVERAGE_CFLAGS) libctags_a_CFLAGS += $(CGCC_CFLAGS) libctags_a_CFLAGS += $(LIBXML_CFLAGS) libctags_a_CFLAGS += $(JANSSON_CFLAGS) libctags_a_CFLAGS += $(LIBYAML_CFLAGS) libctags_a_CFLAGS += $(SECCOMP_CFLAGS) libctags_a_CFLAGS += $(PCRE2_CFLAGS) nodist_libctags_a_SOURCES = $(REPOINFO_HEADS) $(PEG_SRCS) $(PEG_HEADS) BUILT_SOURCES = $(REPOINFO_HEADS) CLEANFILES += $(REPOINFO_HEADS) $(PEG_SRCS) $(PEG_HEADS) EXTRA_libctags_a_DEPENDENCIES = $(GNULIB_LIBS) $(REPOINFO_SRCS): $(REPOINFO_HEADS) repoinfo_verbose = $(repoinfo_verbose_@AM_V@) repoinfo_verbose_ = $(repoinfo_verbose_@AM_DEFAULT_V@) repoinfo_verbose_0 = @echo REPOINFO " $@"; if BUILD_IN_GIT_REPO GEN_REPOINFO = $(srcdir)/misc/gen-repoinfo $(REPOINFO_HEADS): FORCE $(repoinfo_verbose)$(GEN_REPOINFO) $@ FORCE: else $(REPOINFO_HEADS): $(repoinfo_verbose)echo > $@ endif SUFFIXES= if RUN_OPTLIB2C optlib2c_verbose = $(optlib2c_verbose_@AM_V@) optlib2c_verbose_ = $(optlib2c_verbose_@AM_DEFAULT_V@) optlib2c_verbose_0 = @echo OPTLIB2C " $@"; OPTLIB2C = $(srcdir)/misc/optlib2c OPTLIB2C_DIR = optlib SUFFIXES += .ctags .ctags.c: $(optlib2c_verbose)$(OPTLIB2C) $< > $@ $(OPTLIB2C_SRCS): $(OPTLIB2C) Makefile if HAVE_PCRE2 $(OPTLIB2C_PCRE2_SRCS): $(OPTLIB2C) Makefile endif endif if RUN_TXT2CSTR txt2cstr_verbose = $(txt2cstr_verbose_@AM_V@) txt2cstr_verbose_ = $(txt2cstr_verbose_@AM_DEFAULT_V@) txt2cstr_verbose_0 = @echo TXT2CSTR " $@"; TXT2CSTR = $(srcdir)/misc/txt2cstr TXT2CSTR_DIR = main SUFFIXES += .ps .ps.c: $(txt2cstr_verbose)$(TXT2CSTR) $< > $@ $(TXT2CSTR_SRCS): $(TXT2CSTR) Makefile endif packcc_verbose = $(packcc_verbose_@AM_V@) packcc_verbose_ = $(packcc_verbose_@AM_DEFAULT_V@) packcc_verbose_0 = @echo PACKCC " $@"; SUFFIXES += .peg if HAVE_PEGOF pegof_verbose = $(pegof_verbose_@AM_V@) pegof_verbose_ = $(pegof_verbose_@AM_DEFAULT_V@) pegof_verbose_0 = @echo PEGOF " $@"; SUFFIXES += .pego PEGOF_FLAGS = -O all .peg.pego: $(pegof_verbose)$(PEGOF) $(PEGOF_FLAGS) -o $(top_builddir)/peg/$(@F) -i "$<" .pego.c: $(packcc_verbose)$(PACKCC) -o $(top_builddir)/peg/$(*F) $(top_builddir)/peg/$( initially created a personal fork of Exuberant Ctags on GitHub. As interest and participation grew, it was decided to move development to a dedicated project as Universal Ctags. The goal of this project is to maintain a common/unified working space where people interested in making ctags better can work together. Some of the major features of Universal Ctags are: * more numbers of improved language support * new extended C/C++ language parser, etc. * fully extended optlib (a feature to define a new language parser from a command line) * interactive mode (experimental) ## The latest build and package ## If you want to try the latest Universal Ctags without building it yourself... ### Windows Daily builds are available at the [ctags-win32](https://github.com/universal-ctags/ctags-win32) project. Go to the [releases](https://github.com/universal-ctags/ctags-win32/releases) page to download zip packages. ### Unix-like Nightly builds are available at the [ctags-nightly-build](https://github.com/universal-ctags/ctags-nightly-build) project. Go to the [releases](https://github.com/universal-ctags/ctags-nightly-build/releases) page to download tarball archives. ### Mac Recent builds are available via the [`universal-ctags` Homebrew formula](https://formulae.brew.sh/formula/universal-ctags). ### Snap Go to [ctags-snap](https://github.com/universal-ctags/ctags-snap) and clone the `ctags-snap` repo. Then, follow instructions to build the snap package of Universal Ctags. Snapcraft will automatically fetch the source code from GitHub. ## How to build and install ## To build with Autotools (Autoconf and Automake) on GNU/Linux, OSX, or Windows 10 WSL, ``` $ git clone https://github.com/universal-ctags/ctags.git $ cd ctags $ ./autogen.sh $ ./configure # use --prefix=/where/you/want to override installation directory, defaults to /usr/local $ make $ make install # may require extra privileges depending on where to install ``` GNU make is assumed as the `make` command. See [`docs/autotools.rst`](https://github.com/universal-ctags/ctags/blob/master/docs/autotools.rst) for more information. To build on Windows, see [`docs/windows.rst`](https://github.com/universal-ctags/ctags/blob/master/docs/windows.rst) for more information. To build on OSX, see [`docs/osx.rst`](https://github.com/universal-ctags/ctags/blob/master/docs/osx.rst) for more information. ## Manual ## The primary documents of Universal Ctags are man pages. Users should first consult the [ctags(1)](https://docs.ctags.io/en/latest/man/ctags.1.html), and [other man pages](https://docs.ctags.io/en/latest/man-pages.html) if necessary. [Universal Ctags Hacking Guide](https://docs.ctags.io), which also includes the man pages, is primarily for developers and provides additional information to the man pages, including experimental features. See also `*/README.md` on this repository. ## Differences from exuberant-ctags ## You may be interested in how Universal Ctags is different from Exuberant Ctags. See [ctags-incompatibilities(7)](https://docs.ctags.io/en/latest/man/ctags-incompatibilities.7.html) and [Introduced changes](https://docs.ctags.io/en/latest/news.html) for details. The most significant incompatible changes: * Universal Ctags doesn't load `~/.ctags` and `./.ctags` at starting up time. Instead, it loads `~/.ctags.d/*.ctags` and `./.ctags.d/*.ctags`. * Universal Ctags is more strict about characters that can be used in kind letters and kind names than Exuberant-ctags. - The letter must be an alphabetical character (`[a-zA-EG-Z]`). `F` is reserved for `file` kind. - The first character of the name must be alphabetic, and the rest characters must be alphanumeric (`[a-zA-Z][a-zA-Z0-9]*`). The detailed background is explained in [#1737](https://github.com/universal-ctags/ctags/pull/1737). If you want to reuse your `.ctags` written for Exuberant-ctags, you must review kind letters and names defined with `--regex-=...` options. When updating the definitions, using `--kinddef-=...` option is appreciated. ## [CVE-2022-4515](https://access.redhat.com/security/cve/CVE-2022-4515) ## It is not affected to Universal Ctags. It was fixed in [e00c55d7a0204dc1d0ae316141323959e1e16162](https://github.com/universal-ctags/ctags/commit/e00c55d7a0204dc1d0ae316141323959e1e16162) in 2016. Thanks to the reporter. Pull-requests are welcome! ================================================ FILE: Tmain/abnormal-output-file-names.d/input.c ================================================ int x; ================================================ FILE: Tmain/abnormal-output-file-names.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 BUILDDIR=$2 . ../utils.sh exit_if_win32 "$CTAGS" rm -f $BUILDDIR/"'" rm -f $BUILDDIR/'"' rm -f $BUILDDIR/'$(ls)' rm -f $BUILDDIR/'a b' ${CTAGS} --quiet --options=NONE -o $BUILDDIR/"'" --extras=-pF input.c ${CTAGS} --quiet --options=NONE -o $BUILDDIR/'"' --extras=-pF input.c ${CTAGS} --quiet --options=NONE -o $BUILDDIR/'$(ls)' --extras=-pF input.c ${CTAGS} --quiet --options=NONE -o $BUILDDIR/'a b' --extras=-pF input.c echo '#' SINGLE QUOTE if [ -e $BUILDDIR/"'" ]; then cat $BUILDDIR/"'" fi echo '#' DOUBLE QUOTES if [ -e $BUILDDIR/'"' ]; then cat $BUILDDIR/'"' fi echo '#' PROCESS SUBSTITUTION if [ -e $BUILDDIR/'$(ls)' ]; then cat $BUILDDIR/'$(ls)' fi echo '#' SPACE if [ -e $BUILDDIR/'a b' ]; then cat $BUILDDIR/'a b' fi rm -f $BUILDDIR/"'" rm -f $BUILDDIR/'"' rm -f $BUILDDIR/'$(ls)' rm -f $BUILDDIR/'a b' ================================================ FILE: Tmain/abnormal-output-file-names.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/abnormal-output-file-names.d/stdout-expected.txt ================================================ # SINGLE QUOTE x input.c /^int x;$/;" v typeref:typename:int # DOUBLE QUOTES x input.c /^int x;$/;" v typeref:typename:int # PROCESS SUBSTITUTION x input.c /^int x;$/;" v typeref:typename:int # SPACE x input.c /^int x;$/;" v typeref:typename:int ================================================ FILE: Tmain/alias-for-unknown-language.d/exit-expected.txt ================================================ 1 ================================================ FILE: Tmain/alias-for-unknown-language.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --alias-nosuchlang=Z exit $? ================================================ FILE: Tmain/alias-for-unknown-language.d/stderr-expected.txt ================================================ ctags: Unknown language "nosuchlang" in "alias-nosuchlang" option ================================================ FILE: Tmain/alias-for-unknown-language.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/allow-null-tag.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/allow-null-tag.d/input.json ================================================ [{"":1}] ================================================ FILE: Tmain/allow-null-tag.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --_fatal-warnings -o - input.json exit $? ================================================ FILE: Tmain/allow-null-tag.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/allow-null-tag.d/stdout-expected.txt ================================================ 0 input.json /^[{"":1}]$/;" o ================================================ FILE: Tmain/avoid-null-tag-warning.d/input-0.sql ================================================ ALTER DATABASE :"datname" REFRESH COLLATION VERSION; ================================================ FILE: Tmain/avoid-null-tag-warning.d/input.asm ================================================ .proc ================================================ FILE: Tmain/avoid-null-tag-warning.d/input.sql ================================================ -- Taken from #2504 opened by @koenmeersman select substr(sess_evnt.event, 1, 18) event from v$session_event sess_evnt; ================================================ FILE: Tmain/avoid-null-tag-warning.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 . ../utils.sh CTAGS=$1 V= # V=valgrind echo '# no warning should be printed' 1>&2 $CTAGS --quiet --options=NONE -o - input.sql $CTAGS --quiet --options=NONE -o - input-0.sql $CTAGS --quiet --options=NONE -o - input.asm ================================================ FILE: Tmain/avoid-null-tag-warning.d/stderr-expected.txt ================================================ # no warning should be printed ================================================ FILE: Tmain/avoid-null-tag-warning.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/broken-extradef.d/run.sh ================================================ # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS="$1 --quiet --options=NONE" title() { echo echo "$@" { echo echo "$@" } 1>&2 } { title '# echo unknown lang' ${CTAGS} --_extradef-NOSUCHLANG ${CTAGS} --_extradef-NOSUCHLANG=extra,desc title '# no option value' ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY= title '# wrong char in a field name' ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY=: ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY=:abc ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY=:abc, ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY=:abc,description title '# empty extra name' ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY=, ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY=,abc ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY=,abc, ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY=,abc,description title '# empty description' ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY=abc ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY=abc, title '# no input file' ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY=abc,desc title '# inject a flag separator' ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY='extra,desc{foo}' --list-extras=IMAGINARY title '# inject a broken flag separator(1)' ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY='extra,desc{foo' --list-extras=IMAGINARY title '# inject a broken flag separator(2)' ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY='extra,desc{' --list-extras=IMAGINARY title '# use a { in description (1)' ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY='extra,desc\{' --list-extras=IMAGINARY title '# use a { in description (2)' ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY='extra,desc\{}' --list-extras=IMAGINARY title '# use a \ in description' ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY='extra,desc\\backslash' --list-extras=IMAGINARY title '# description started from {' ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY='extra,{' --list-extras=IMAGINARY title '# description started from \{' ${CTAGS} --langdef=IMAGINARY --_extradef-IMAGINARY='extra,\{' --list-extras=IMAGINARY } > /tmp/ctags-tmain-$$.stdout 2>/tmp/ctags-tmain-$$.stderr sed -e 's/\.exe//g' < /tmp/ctags-tmain-$$.stdout rm /tmp/ctags-tmain-$$.stdout sed -e 's/\.exe//g' < /tmp/ctags-tmain-$$.stderr 1>&2 rm /tmp/ctags-tmain-$$.stderr ================================================ FILE: Tmain/broken-extradef.d/stderr-expected.txt ================================================ # echo unknown lang ctags: Unknown language "NOSUCHLANG" in "_extradef-NOSUCHLANG" option ctags: Unknown language "NOSUCHLANG" in "_extradef-NOSUCHLANG" option # no option value ctags: no extra definition specified in "--_extradef-IMAGINARY" option ctags: no extra definition specified in "--_extradef-IMAGINARY" option # wrong char in a field name ctags: no extra description specified in "--_extradef-IMAGINARY" option ctags: no extra description specified in "--_extradef-IMAGINARY" option ctags: unacceptable char as part of extra name in "--_extradef-IMAGINARY" option: ':' ctags: unacceptable char as part of extra name in "--_extradef-IMAGINARY" option: ':' # empty extra name ctags: the extra name in "--_extradef-IMAGINARY" option is empty ctags: the extra name in "--_extradef-IMAGINARY" option is empty ctags: the extra name in "--_extradef-IMAGINARY" option is empty ctags: the extra name in "--_extradef-IMAGINARY" option is empty # empty description ctags: no extra description specified in "--_extradef-IMAGINARY" option ctags: extra description in "--_extradef-IMAGINARY" option is empty # no input file ctags: No files specified. Try "ctags --help". # inject a flag separator # inject a broken flag separator(1) ctags: Warning: long flags specifier opened with `{' is not closed `}': "{foo" # inject a broken flag separator(2) ctags: Warning: long flags specifier opened with `{' is not closed `}': "{" # use a { in description (1) # use a { in description (2) # use a \ in description # description started from { ctags: extra description in "--_extradef-IMAGINARY" option is empty # description started from \{ ================================================ FILE: Tmain/broken-extradef.d/stdout-expected.txt ================================================ # echo unknown lang # no option value # wrong char in a field name # empty extra name # empty description # no input file # inject a flag separator #LETTER NAME ENABLED LANGUAGE FIXED VER DESCRIPTION - extra no IMAGINARY no 0 desc # inject a broken flag separator(1) #LETTER NAME ENABLED LANGUAGE FIXED VER DESCRIPTION - extra no IMAGINARY no 0 desc # inject a broken flag separator(2) #LETTER NAME ENABLED LANGUAGE FIXED VER DESCRIPTION - extra no IMAGINARY no 0 desc # use a { in description (1) #LETTER NAME ENABLED LANGUAGE FIXED VER DESCRIPTION - extra no IMAGINARY no 0 desc{ # use a { in description (2) #LETTER NAME ENABLED LANGUAGE FIXED VER DESCRIPTION - extra no IMAGINARY no 0 desc{} # use a \ in description #LETTER NAME ENABLED LANGUAGE FIXED VER DESCRIPTION - extra no IMAGINARY no 0 desc\backslash # description started from { # description started from \{ #LETTER NAME ENABLED LANGUAGE FIXED VER DESCRIPTION - extra no IMAGINARY no 0 { ================================================ FILE: Tmain/broken-fielddef.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS="$1 --quiet --options=NONE" title() { echo echo "$@" { echo echo "$@" } 1>&2 } { title '# echo unknown lang' ${CTAGS} --_fielddef-NOSUCHLANG ${CTAGS} --_fielddef-NOSUCHLANG=field,desc title '# no option value' ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY= title '# wrong char in a field name' ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY=: ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY=:abc ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY=:abc, ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY=:abc,description title '# empty field name' ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY=, ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY=,abc ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY=,abc, ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY=,abc,description title '# empty description' ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY=abc ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY=abc, title '# no input file' ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY=abc,desc title '# inject a flag separator' ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY='field,desc{foo}' --list-fields=IMAGINARY title '# inject a broken flag separator(1)' ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY='field,desc{foo' --list-fields=IMAGINARY title '# inject a broken flag separator(2)' ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY='field,desc{' --list-fields=IMAGINARY title '# use a { in description (1)' ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY='field,desc\{' --list-fields=IMAGINARY title '# use a { in description (2)' ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY='field,desc\{}' --list-fields=IMAGINARY title '# use a \ in description' ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY='field,desc\\backslash' --list-fields=IMAGINARY title '# description started from {' ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY='field,{' --list-fields=IMAGINARY title '# description started from \{' ${CTAGS} --langdef=IMAGINARY --_fielddef-IMAGINARY='field,\{' --list-fields=IMAGINARY } > /tmp/ctags-tmain-$$.stdout 2>/tmp/ctags-tmain-$$.stderr sed -e 's/\.exe//g' < /tmp/ctags-tmain-$$.stdout rm /tmp/ctags-tmain-$$.stdout sed -e 's/\.exe//g' < /tmp/ctags-tmain-$$.stderr 1>&2 rm /tmp/ctags-tmain-$$.stderr ================================================ FILE: Tmain/broken-fielddef.d/stderr-expected.txt ================================================ # echo unknown lang ctags: Unknown language "NOSUCHLANG" in "_fielddef-NOSUCHLANG" option ctags: Unknown language "NOSUCHLANG" in "_fielddef-NOSUCHLANG" option # no option value ctags: no field definition specified in "--_fielddef-IMAGINARY" option ctags: no field definition specified in "--_fielddef-IMAGINARY" option # wrong char in a field name ctags: no field description specified in "--_fielddef-IMAGINARY" option ctags: no field description specified in "--_fielddef-IMAGINARY" option ctags: unacceptable char as part of field name in "--_fielddef-IMAGINARY" option: ':' ctags: unacceptable char as part of field name in "--_fielddef-IMAGINARY" option: ':' # empty field name ctags: the field name in "--_fielddef-IMAGINARY" option is empty ctags: the field name in "--_fielddef-IMAGINARY" option is empty ctags: the field name in "--_fielddef-IMAGINARY" option is empty ctags: the field name in "--_fielddef-IMAGINARY" option is empty # empty description ctags: no field description specified in "--_fielddef-IMAGINARY" option ctags: field description in "--_fielddef-IMAGINARY" option is empty # no input file ctags: No files specified. Try "ctags --help". # inject a flag separator # inject a broken flag separator(1) ctags: Warning: long flags specifier opened with `{' is not closed `}': "{foo" # inject a broken flag separator(2) ctags: Warning: long flags specifier opened with `{' is not closed `}': "{" # use a { in description (1) # use a { in description (2) # use a \ in description # description started from { ctags: field description in "--_fielddef-IMAGINARY" option is empty # description started from \{ ================================================ FILE: Tmain/broken-fielddef.d/stdout-expected.txt ================================================ # echo unknown lang # no option value # wrong char in a field name # empty field name # empty description # no input file # inject a flag separator #LETTER NAME ENABLED LANGUAGE JSTYPE FIXED OP VER DESCRIPTION - field no IMAGINARY s-- no -- 0 desc # inject a broken flag separator(1) #LETTER NAME ENABLED LANGUAGE JSTYPE FIXED OP VER DESCRIPTION - field no IMAGINARY s-- no -- 0 desc # inject a broken flag separator(2) #LETTER NAME ENABLED LANGUAGE JSTYPE FIXED OP VER DESCRIPTION - field no IMAGINARY s-- no -- 0 desc # use a { in description (1) #LETTER NAME ENABLED LANGUAGE JSTYPE FIXED OP VER DESCRIPTION - field no IMAGINARY s-- no -- 0 desc{ # use a { in description (2) #LETTER NAME ENABLED LANGUAGE JSTYPE FIXED OP VER DESCRIPTION - field no IMAGINARY s-- no -- 0 desc{} # use a \ in description #LETTER NAME ENABLED LANGUAGE JSTYPE FIXED OP VER DESCRIPTION - field no IMAGINARY s-- no -- 0 desc\backslash # description started from { # description started from \{ #LETTER NAME ENABLED LANGUAGE JSTYPE FIXED OP VER DESCRIPTION - field no IMAGINARY s-- no -- 0 { ================================================ FILE: Tmain/broken-json-output.d/exit-expected.tx ================================================ 0 ================================================ FILE: Tmain/broken-json-output.d/input.f ================================================ * integer function F(x) end function F program main ) ================================================ FILE: Tmain/broken-json-output.d/run.sh ================================================ # Copyright: 2021 Masatake YAMATO # License: GPL-2 . ../utils.sh CTAGS=$1 is_feature_available ${CTAGS} json ${CTAGS} --quiet --options=NONE --sort=no --output-format=json input.f ================================================ FILE: Tmain/broken-json-output.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/broken-json-output.d/stdout-expected.txt ================================================ {"_type": "tag", "name": "main", "path": "input.f", "pattern": "/^ program main$/", "kind": "program"} ================================================ FILE: Tmain/broken-langdef.d/input.c ================================================ int f(void) { return 0; } ================================================ FILE: Tmain/broken-langdef.d/run.sh ================================================ #!/bin/sh # Copyright: 2019 Masatake YAMATO # License: GPL-2 CTAGS=$1 run_ctags() { echo '#' "$1" 1>&2 ${CTAGS} --quiet --options=NONE --langdef="$1" --kinddef-"$1"=f,func,functions --_force-quit=0 -o - input.c } run_ctags "" run_ctags all run_ctags NONE for c in '!' '"' '$' '%' '&' "'" '(' ')' '*' ',' '-' '.' '/' ':' ';' '<' '=' '>' '?' '@' '[' '\' ']' '^' '`' '|' '~'; do run_ctags "C$c" done ================================================ FILE: Tmain/broken-langdef.d/stderr-expected.txt ================================================ # ctags: No language specified for "langdef" option # all ctags: "all" is reserved; don't use it as the name for defining a new language # NONE ctags: "NONE" is reserved; don't use it as the name for defining a new language # C! ctags: don't use `!' in a language name (C!) # C" ctags: don't use `"' in a language name (C") # C$ ctags: don't use `$' in a language name (C$) # C% ctags: don't use `%' in a language name (C%) # C& ctags: don't use `&' in a language name (C&) # C' ctags: don't use "'" in a language name (C') # C( ctags: don't use `(' in a language name (C() # C) ctags: don't use `)' in a language name (C)) # C* ctags: don't use `*' in a language name (C*) # C, ctags: don't use `,' in a language name (C,) # C- ctags: don't use `-' in a language name (C-) # C. ctags: don't use `.' in a language name (C.) # C/ ctags: don't use `/' in a language name (C/) # C: ctags: don't use `:' in a language name (C:) # C; ctags: don't use `;' in a language name (C;) # C< ctags: don't use `<' in a language name (C<) # C= ctags: don't use `=' in a language name (C=) # C> ctags: don't use `>' in a language name (C>) # C? ctags: don't use `?' in a language name (C?) # C@ ctags: don't use `@' in a language name (C@) # C[ ctags: don't use `[' in a language name (C[) # C\ ctags: don't use `\' in a language name (C\) # C] ctags: don't use `]' in a language name (C]) # C^ ctags: don't use `^' in a language name (C^) # C` ctags: don't use "`" in a language name (C`) # C| ctags: don't use `|' in a language name (C|) # C~ ctags: don't use `~' in a language name (C~) ================================================ FILE: Tmain/broken-langdef.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/broken-paramdef.d/run.sh ================================================ # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS="$1 --quiet --options=NONE" title() { echo echo "$@" { echo echo "$@" } 1>&2 } { title '# echo unknown lang' ${CTAGS} --_paramdef-NOSUCHLANG ${CTAGS} --_paramdef-NOSUCHLANG=param,desc title '# no option value' ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY= title '# wrong char in a field name' ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY=: ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY=:abc ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY=:abc, ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY=:abc,description title '# empty parameter name' ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY=, ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY=,abc ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY=,abc, ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY=,abc,description title '# empty description' ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY=abc ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY=abc, title '# no input file' ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY=abc,desc title '# inject a flag separator' ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY='param,desc{foo}' --list-params=IMAGINARY title '# inject a broken flag separator(1)' ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY='param,desc{foo' --list-params=IMAGINARY title '# inject a broken flag separator(2)' ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY='param,desc{' --list-params=IMAGINARY title '# use a { in description (1)' ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY='param,desc\{' --list-params=IMAGINARY title '# use a { in description (2)' ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY='param,desc\{}' --list-params=IMAGINARY title '# use a \ in description' ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY='param,desc\\backslash' --list-params=IMAGINARY title '# description started from {' ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY='param,{' --list-params=IMAGINARY title '# description started from \{' ${CTAGS} --langdef=IMAGINARY --_paramdef-IMAGINARY='param,\{' --list-params=IMAGINARY } > /tmp/ctags-tmain-$$.stdout 2>/tmp/ctags-tmain-$$.stderr sed -e 's/\.exe//g' < /tmp/ctags-tmain-$$.stdout rm /tmp/ctags-tmain-$$.stdout sed -e 's/\.exe//g' < /tmp/ctags-tmain-$$.stderr 1>&2 rm /tmp/ctags-tmain-$$.stderr ================================================ FILE: Tmain/broken-paramdef.d/stderr-expected.txt ================================================ # echo unknown lang ctags: Unknown language "NOSUCHLANG" in "_paramdef-NOSUCHLANG" option ctags: Unknown language "NOSUCHLANG" in "_paramdef-NOSUCHLANG" option # no option value ctags: no parameter definition specified in "--_paramdef-IMAGINARY" option ctags: no parameter definition specified in "--_paramdef-IMAGINARY" option # wrong char in a field name ctags: no parameter description specified in "--_paramdef-IMAGINARY" option ctags: no parameter description specified in "--_paramdef-IMAGINARY" option ctags: unacceptable char as part of parameter name in "--_paramdef-IMAGINARY" option: ':' ctags: unacceptable char as part of parameter name in "--_paramdef-IMAGINARY" option: ':' # empty parameter name ctags: the parameter name in "--_paramdef-IMAGINARY" option is empty ctags: the parameter name in "--_paramdef-IMAGINARY" option is empty ctags: the parameter name in "--_paramdef-IMAGINARY" option is empty ctags: the parameter name in "--_paramdef-IMAGINARY" option is empty # empty description ctags: no parameter description specified in "--_paramdef-IMAGINARY" option ctags: parameter description in "--_paramdef-IMAGINARY" option is empty # no input file ctags: No files specified. Try "ctags --help". # inject a flag separator # inject a broken flag separator(1) ctags: Warning: long flags specifier opened with `{' is not closed `}': "{foo" # inject a broken flag separator(2) ctags: Warning: long flags specifier opened with `{' is not closed `}': "{" # use a { in description (1) # use a { in description (2) # use a \ in description # description started from { ctags: parameter description in "--_paramdef-IMAGINARY" option is empty # description started from \{ ================================================ FILE: Tmain/broken-paramdef.d/stdout-expected.txt ================================================ # echo unknown lang # no option value # wrong char in a field name # empty parameter name # empty description # no input file # inject a flag separator #NAME DESCRIPTION param desc # inject a broken flag separator(1) #NAME DESCRIPTION param desc # inject a broken flag separator(2) #NAME DESCRIPTION param desc # use a { in description (1) #NAME DESCRIPTION param desc{ # use a { in description (2) #NAME DESCRIPTION param desc{} # use a \ in description #NAME DESCRIPTION param desc\backslash # description started from { # description started from \{ #NAME DESCRIPTION param { ================================================ FILE: Tmain/broken-regex-pattern.d/broken-pattern.ctags ================================================ # Though this pattern uses pcre2 extension, {pcre2} flag is not given. # This caused a crash. --mline-regex-Python=/[\n]if\s+__name__\s*==\s*("__main__"|'__main__')\s*:(?:\s*#[^\n]*)?\n//f/{mgroup=1}{_anonymous=main} ================================================ FILE: Tmain/broken-regex-pattern.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/broken-regex-pattern.d/input.py ================================================ if import pydoc if __name__ == "__main__": pydoc.cli() ================================================ FILE: Tmain/broken-regex-pattern.d/run.sh ================================================ # Copyright: 2025 Masatake YAMATO # License: GPL-2 CTAGS="$1 --quiet --options=NONE" $CTAGS --options=./broken-pattern.ctags -o - input.py > /dev/null ================================================ FILE: Tmain/broken-regex-pattern.d/stderr-expected.txt ================================================ ctags: Warning: regcomp: Invalid preceding regular expression ctags: Warning: pattern: [ ]if\s+__name__\s*==\s*("__main__"|'__main__')\s*:(?:\s*#[^ ]*)? ctags: Warning: language: Python[0] ctags: Warning: Failed in compiling the regex pattern with "default" regex engine ================================================ FILE: Tmain/broken-tagname-in-ectags-format.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/broken-tagname-in-ectags-format.d/input.cst ================================================ b ================================================ FILE: Tmain/broken-tagname-in-ectags-format.d/run.sh ================================================ #!/bin/sh # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 BUILD_SUBDIR=$2 stderr_tmp=${BUILD_SUBDIR}/stderr-actual.txt.tmp ${CTAGS} --options=NONE -o - --language-force=CTagsSelfTest --verbose --output-format=e-ctags input.cst \ 2> ${stderr_tmp} # externalSortTags invokes sort command, and it is logged to stderr. # Delete the line for the comparison. sed -e '/^system ("sort -u")$/d' < ${stderr_tmp} 1>&2 rm ${stderr_tmp} exit $? ================================================ FILE: Tmain/broken-tagname-in-ectags-format.d/stderr-expected.txt ================================================ ctags: Notice: No options will be read from files or environment Option: --output-format=e-ctags Reading command line arguments CTagsSelfTest requires a memory stream for input OPENING input.cst as CTagsSelfTest language file [new,required] Initialize parser: CTagsSelfTest ================================================ FILE: Tmain/broken-tagname-in-ectags-format.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/broken-tagname-quiet.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/broken-tagname-quiet.d/input.cst ================================================ b ================================================ FILE: Tmain/broken-tagname-quiet.d/run.sh ================================================ #!/bin/sh # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE -o - --language-force=CTagsSelfTest input.cst exit $? ================================================ FILE: Tmain/broken-tagname-quiet.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/broken-tagname-quiet.d/stdout-expected.txt ================================================ newline-in-scope input.cst /^b$/;" b broken tag:parent\nscope one\nof\rbroken\tname input.cst /^b$/;" b broken tag:\\Broken\tContext only\nnewline input.cst /^b$/;" b only\ttab input.cst /^b$/;" b tab-in-scope input.cst /^b$/;" b broken tag:parent\tscope ================================================ FILE: Tmain/broken-tagname.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/broken-tagname.d/input.cst ================================================ b ================================================ FILE: Tmain/broken-tagname.d/run.sh ================================================ #!/bin/sh # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 BUILD_SUBDIR=$2 stderr_tmp=${BUILD_SUBDIR}/stderr-actual.txt.tmp ${CTAGS} --options=NONE -o - --language-force=CTagsSelfTest --verbose input.cst \ 2> ${stderr_tmp} # externalSortTags invokes sort command, and it is logged to stderr. # Delete the line for the comparison. sed -e '/^system ("sort -u")$/d' < ${stderr_tmp} 1>&2 rm ${stderr_tmp} exit $? ================================================ FILE: Tmain/broken-tagname.d/stderr-expected.txt ================================================ ctags: Notice: No options will be read from files or environment Reading command line arguments CTagsSelfTest requires a memory stream for input OPENING input.cst as CTagsSelfTest language file [new,required] Initialize parser: CTagsSelfTest Unexpected character 0x0a included in a tagEntryInfo: one of broken name File: input.cst, Line: 1, Lang: CTagsSelfTest, Kind: b Escape the character Unexpected character 0x09 included in a tagEntryInfo: \Broken Context File: input.cst, Line: 1, Lang: CTagsSelfTest, Kind: b Escape the character Unexpected character 0x0a included in a tagEntryInfo: only newline File: input.cst, Line: 1, Lang: CTagsSelfTest, Kind: b Escape the character Unexpected character 0x09 included in a tagEntryInfo: only tab File: input.cst, Line: 1, Lang: CTagsSelfTest, Kind: b Escape the character Unexpected character 0x0a included in a tagEntryInfo: parent scope File: input.cst, Line: 1, Lang: CTagsSelfTest, Kind: b Escape the character Unexpected character 0x09 included in a tagEntryInfo: parent scope File: input.cst, Line: 1, Lang: CTagsSelfTest, Kind: b Escape the character sorting tag file ================================================ FILE: Tmain/broken-tagname.d/stdout-expected.txt ================================================ newline-in-scope input.cst /^b$/;" b broken tag:parent\nscope one\nof\rbroken\tname input.cst /^b$/;" b broken tag:\\Broken\tContext only\nnewline input.cst /^b$/;" b only\ttab input.cst /^b$/;" b tab-in-scope input.cst /^b$/;" b broken tag:parent\tscope ================================================ FILE: Tmain/broken-version.d/exit-expected.txt ================================================ 1 ================================================ FILE: Tmain/broken-version.d/run.sh ================================================ #!/bin/sh # Copyright: 2025 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh is_feature_available "$CTAGS" debug ${CTAGS} --quiet --options=NONE --langdef=BROKEN'{version=0.1}' --_force-quit=1 exit $? ================================================ FILE: Tmain/broken-version.d/stderr-expected.txt ================================================ ctags: Warning: versionCurrent (0) must be either equal to or greater than versionAge (1): BROKEN ================================================ FILE: Tmain/c-anon-counter.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/c-anon-counter.d/input1.c ================================================ enum { A, B, } x; struct { int C, D; } y; union { int E, F; } z; ================================================ FILE: Tmain/c-anon-counter.d/input2.c ================================================ enum { G, H, } a; struct { int I, J; } b; union { int K, L; } c; ================================================ FILE: Tmain/c-anon-counter.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 BUILDDIR=$2 ${CTAGS} --quiet --options=NONE -o - input1.c input2.c > $BUILDDIR/12.tmp ${CTAGS} --quiet --options=NONE -o - input2.c input1.c > $BUILDDIR/21.tmp diff $BUILDDIR/12.tmp $BUILDDIR/21.tmp s=$? if [ "$s" = 0 ]; then rm -f $BUILDDIR/12.tmp rm -f $BUILDDIR/21.tmp fi exit $s ================================================ FILE: Tmain/c-anon-counter.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/c-anon-counter.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/c-large-enum.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/c-large-enum.d/run.sh ================================================ # Copyright: 2023 Masatake YAMATO # License: GPL-2 input=/tmp/c-large-enum.d-input.c CTAGS="$1 --quiet --options=NONE" i=0 { echo "enum E {" while [ $i -lt 32770 ]; do printf "X%x," $i i=$(($i + 1)) done echo "};" } > $input ${CTAGS} --sort=no -n --fields= --fields=+"{nth}" -x --_xformat='%{name} %{nth}' "$input" | tail -10 r=$? rm -f "$input" exit $r ================================================ FILE: Tmain/c-large-enum.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/c-large-enum.d/stdout-expected.txt ================================================ X7ff8 32760 X7ff9 32761 X7ffa 32762 X7ffb 32763 X7ffc 32764 X7ffd 32765 X7ffe 32766 X7fff 32767 X8000 32767 X8001 32767 ================================================ FILE: Tmain/case-insensitive-pattern.d/INPUT.MK ================================================ ================================================ FILE: Tmain/case-insensitive-pattern.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh exit_if_no_case_insensitive_filenames "${CTAGS}" ${CTAGS} --quiet --options=NONE --print-language INPUT.MK ================================================ FILE: Tmain/case-insensitive-pattern.d/stdout-expected.txt ================================================ INPUT.MK: Make ================================================ FILE: Tmain/clear-aliases.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/clear-aliases.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 echo '# clear' && ${CTAGS} --quiet --options=NONE --alias-C= --with-list-header=no --list-aliases=C && echo '# add' && ${CTAGS} --quiet --options=NONE --alias-Tcl=+abc --with-list-header=no --list-aliases=Tcl && echo '# reset' && ${CTAGS} --quiet --options=NONE --alias-Tcl=+abc --alias-Tcl=default --with-list-header=no --list-aliases=Tcl echo '# all clear' && ${CTAGS} --quiet --options=NONE --alias-all= --with-list-header=no --list-aliases && echo '# all reset' && ${CTAGS} --quiet --options=NONE --alias-Tcl=+abc --alias-all=default --with-list-header=no --list-aliases=Tcl exit $? ================================================ FILE: Tmain/clear-aliases.d/stdout-expected.txt ================================================ # clear # add expect tclsh abc # reset expect tclsh # all clear # all reset expect tclsh ================================================ FILE: Tmain/client-vista-vim-fields-expectation.d/README.md ================================================ If your change breaks this test case, notify the change to https://github.com/liuchengxu/vista.vim. ================================================ FILE: Tmain/client-vista-vim-fields-expectation.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/client-vista-vim-fields-expectation.d/run.sh ================================================ # Copyright: 2021 # License: GPL-2 CTAGS=$1 . ../utils.sh is_feature_available "${CTAGS}" json $CTAGS --quiet --options=NONE --format=2 --excmd=pattern --fields=+nksSaf --extras=+F --sort=no --append=no --extras= --language-force=vim --vim-kinds=acfvmn --output-format=json --fields=-PF -f- test.vim exit $? ================================================ FILE: Tmain/client-vista-vim-fields-expectation.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/client-vista-vim-fields-expectation.d/stdout-expected.txt ================================================ {"_type": "tag", "name": "s:cur_dir", "line": 1, "kind": "variable"} {"_type": "tag", "name": "vista#FindItemsUnderDirectory", "line": 3, "kind": "function", "signature": "(dir)"} ================================================ FILE: Tmain/client-vista-vim-fields-expectation.d/test.vim ================================================ let s:cur_dir = fnamemodify(resolve(expand(':p')), ':h') function! vista#FindItemsUnderDirectory(dir) abort return map(split(globpath(a:dir, '*'), '\n'), 'fnamemodify(v:val, '':t:r'')') endfunction ================================================ FILE: Tmain/combination-of-fields-Zs.d/input.c ================================================ struct s { int i; }; ================================================ FILE: Tmain/combination-of-fields-Zs.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS=$1 echo '# Z only' $CTAGS --quiet --options=NONE --fields=Z -o - input.c 2>&1 \ | sed -e 's/\.exe//g' \ | sort # The last sort is needed because the order of lines from stdout and # that from stderr is not stable. ================================================ FILE: Tmain/combination-of-fields-Zs.d/stdout-expected.txt ================================================ # Z only ctags: Warning: enable the s field to make the Z/scope field printable ctags: Warning: though Z/scope field is enabled, s field is not enabled i input.c /^ int i;$/;" scope:struct:s s input.c /^struct s {$/ ================================================ FILE: Tmain/combination-of-fields-zkK.d/input.c ================================================ struct s { int i; }; ================================================ FILE: Tmain/combination-of-fields-zkK.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS=$1 echo '# z only' $CTAGS --quiet --options=NONE --fields=z -o - input.c 2>&1 \ | sed -e 's/\.exe//g' \ | sort # The last sort is needed because the order of lines from stdout and # that from stderr is not stable. ================================================ FILE: Tmain/combination-of-fields-zkK.d/stdout-expected.txt ================================================ # z only ctags: Warning: enable the K field to make the z/kind field printable ctags: Warning: though z/kind field is enabled, neither k nor K field is not enabled i input.c /^ int i;$/;" kind:member s input.c /^struct s {$/;" kind:struct ================================================ FILE: Tmain/common-prelude.d/aindex.expected ================================================ (0) false (1) true 0 (2) true 1 (3) true 2 (4) false (-) false (0a) true 0 (1a) true 1 ================================================ FILE: Tmain/common-prelude.d/aindex.ps ================================================ (0) == [1 2 3] 0 _aindex pstack clear (1) == [1 2 3] 1 _aindex pstack clear (2) == [1 2 3] 2 _aindex pstack clear (3) == [1 2 3] 3 _aindex pstack clear (4) == [1 2 3] 4 _aindex pstack clear (-) == [] /a _aindex pstack clear (0a) == [/a] /a _aindex pstack clear (1a) == [/b /a /b] /a _aindex pstack clear ================================================ FILE: Tmain/common-prelude.d/amember.expected ================================================ [/a /b /c] true true true false [1 true (abc)] true false true false true false ================================================ FILE: Tmain/common-prelude.d/amember.ps ================================================ [/a /b /c] == [/a /b /c] /a _amember == [/a /b /c] /b _amember == [/a /b /c] /c _amember == [/a /b /c] /d _amember == [1 true (abc)] == [1 true (abc)] 1 _amember == [1 true (abc)] 2 _amember == [1 true (abc)] true _amember == [1 true (abc)] false _amember == [1 true (abc)] (abc) _amember == [1 true (abc)] (efg) _amember == ================================================ FILE: Tmain/common-prelude.d/buildstring.expected ================================================ (abcdefghijklm) ================================================ FILE: Tmain/common-prelude.d/buildstring.ps ================================================ [ ?a ?b ?c (d) 0 get (efg) ?h ?i ?j (klm) _buildstring pstack clear ================================================ FILE: Tmain/common-prelude.d/chop.expected ================================================ (abcx) (abc) (abc ) (abc) (abcx) (abcx) ================================================ FILE: Tmain/common-prelude.d/chop.ps ================================================ (abcx) == (abcx) _chop pstack clear (abc ) == (abc ) _chop_space pstack clear (abcx) == (abcx) _chop_space pstack clear ================================================ FILE: Tmain/common-prelude.d/dedup.expected ================================================ (===) 32 (===) 41 32 (===) 32 41 (===) 32 (===) 41 (===) /a 32 (===) [] 32 ================================================ FILE: Tmain/common-prelude.d/dedup.ps ================================================ /result { (===) pstack clear } def 32 32 _dedup_spaces result 32 41 _dedup_spaces result 41 32 _dedup_spaces result 32 _dedup_spaces result 41 _dedup_spaces result 32 /a _dedup_spaces result 32 [] _dedup_spaces result ================================================ FILE: Tmain/common-prelude.d/dedup_spaces.expected ================================================ 32 97 32 98 32 97 ================================================ FILE: Tmain/common-prelude.d/dedup_spaces.ps ================================================ ?a ?\_ ( ) 0 get _dedup_spaces pstack clear ?a ?\_ ?b ( ) 0 get _dedup_spaces pstack clear ================================================ FILE: Tmain/common-prelude.d/ndup.expected ================================================ (abc) (efg) (efg) (xyz) (xyz) (xyz) (xyz) ================================================ FILE: Tmain/common-prelude.d/ndup.ps ================================================ (abc) 0 _ndup pstack clear (efg) 1 _ndup pstack clear (xyz) 3 _ndup pstack clear ================================================ FILE: Tmain/common-prelude.d/normalize_spaces.expected ================================================ (0abc, d, efg, hij) (1abc, d, efg, hij) ================================================ FILE: Tmain/common-prelude.d/normalize_spaces.ps ================================================ /x (0abc,\t\t\n \nd,\f\f\v\f\v\r\r\r\n efg, hij) def x _normalize_spaces! x pstack clear (1abc,\t\t\n \nd,\f\f\v\f\v\r\r\r\n efg, hij) dup _normalize_spaces! pstack clear ================================================ FILE: Tmain/common-prelude.d/putlast.expected ================================================ (abcdefgh) ================================================ FILE: Tmain/common-prelude.d/putlast.ps ================================================ /a (abc) def a ?d _putlast! a (efg) _putlast! a ?h _putlast! a == ================================================ FILE: Tmain/common-prelude.d/run.sh ================================================ #!/bin/sh # Copyright: 2021 Masatake YAMATO # License: GPL-2 CTAGS=$1 BUILDDIR=$2 OPTSCRIPT=$4 . ../utils.sh if ! [ -x "${OPTSCRIPT}" ]; then skip "no optscript" fi rm -f ${BUILDDIR}/*.{in,out}.tmp for t in $(ls *.ps); do i=${BUILDDIR}/${t}.in.tmp o=${BUILDDIR}/${t}.out.tmp e=$(basename $t .ps).expected printf "%s" "${t}..." { ${CTAGS} --quiet --options=NONE --_dump-prelude echo cat $t } > $i ${OPTSCRIPT} $i > $o 2>&1 s=$? echo "$s" if [ $s != 0 ]; then continue fi if diff -ruN --strip-trailing-cr $e $o; then rm $i rm $o fi done ================================================ FILE: Tmain/common-prelude.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/common-prelude.d/stdout-expected.txt ================================================ aindex.ps...0 amember.ps...0 buildstring.ps...0 chop.ps...0 dedup.ps...0 dedup_spaces.ps...0 ndup.ps...0 normalize_spaces.ps...0 putlast.ps...0 tr.ps...0 ================================================ FILE: Tmain/common-prelude.d/tr.expected ================================================ (a-b-c) (x-y-z) ================================================ FILE: Tmain/common-prelude.d/tr.ps ================================================ /x (a\nb\n\c) def x (\n-) _tr! x == (x\ny\nz) dup (\n-) _tr! == ================================================ FILE: Tmain/cxx-how-kinds-defs-are-shared-or-copyed.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 printf "[C] enabling in C: " ${CTAGS} --quiet --options=NONE \ --kinds-C=+f --list-kinds=C | grep ^f printf "[C] disabling in C: " ${CTAGS} --quiet --options=NONE \ --kinds-C=-f --list-kinds=C | grep ^f printf "[C++] enabling in C: " ${CTAGS} --quiet --options=NONE \ --kinds-C=+f --list-kinds=C++ | grep ^f printf "[C++] disabling in C: " ${CTAGS} --quiet --options=NONE \ --kinds-C=-f --list-kinds=C++ | grep ^f printf "[C] enabling in C++: " ${CTAGS} --quiet --options=NONE \ --kinds-C++=+f --list-kinds=C | grep ^f printf "[C] disabling in C++: " ${CTAGS} --quiet --options=NONE \ --kinds-C++=-f --list-kinds=C | grep ^f printf "[C++] enabling in C++: " ${CTAGS} --quiet --options=NONE \ --kinds-C++=+f --list-kinds=C++ | grep ^f printf "[C++] disabling in C++: " ${CTAGS} --quiet --options=NONE \ --kinds-C++=-f --list-kinds=C++ | grep ^f ================================================ FILE: Tmain/cxx-how-kinds-defs-are-shared-or-copyed.d/stdout-expected.txt ================================================ [C] enabling in C: f function definitions [C] disabling in C: f function definitions [off] [C++] enabling in C: f function definitions [C++] disabling in C: f function definitions [off] [C] enabling in C++: f function definitions [C] disabling in C++: f function definitions [off] [C++] enabling in C++: f function definitions [C++] disabling in C++: f function definitions [off] ================================================ FILE: Tmain/disable-fixed-field.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/disable-fixed-field.d/input.c ================================================ ================================================ FILE: Tmain/disable-fixed-field.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --fields=-N -o - input.c ${CTAGS} --quiet --options=NONE --fields=-F -o - input.c ${CTAGS} --quiet --options=NONE --fields=-P -o - input.c ${CTAGS} --quiet --options=NONE --fields=-'{name}' -o - input.c ${CTAGS} --quiet --options=NONE --fields=-'{input}' -o - input.c ${CTAGS} --quiet --options=NONE --fields=-'{pattern}' -o - input.c ================================================ FILE: Tmain/disable-fixed-field.d/stderr-expected.txt ================================================ ctags: Warning: Cannot disable fixed field: 'N'{name} in ctags output mode ctags: Warning: Cannot disable fixed field: 'F'{input} in ctags output mode ctags: Warning: Cannot disable fixed field: 'P'{pattern} in ctags output mode ctags: Warning: Cannot disable fixed field: 'N'{name} in ctags output mode ctags: Warning: Cannot disable fixed field: 'F'{input} in ctags output mode ctags: Warning: Cannot disable fixed field: 'P'{pattern} in ctags output mode ================================================ FILE: Tmain/disable-fixed-field.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/disable-languages.d/input-matlab.m ================================================ # -*- matlab -*- ================================================ FILE: Tmain/disable-languages.d/input-objc.m ================================================ #error -*- objc -*- ================================================ FILE: Tmain/disable-languages.d/input.m ================================================ ================================================ FILE: Tmain/disable-languages.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 echo '# FILE NAME ONLY' # extension `m' matches both matlab and objc. # matlab wins by the alphabetical order of parser names ${CTAGS} --quiet --options=NONE -G --print-language input.m # extension `m' matches only objc because matlab is disabled. ${CTAGS} --quiet --options=NONE -G --languages=-MatLab --print-language input.m # extension `m' matches only matlab because objc is disabled. ${CTAGS} --quiet --options=NONE -G --languages=-ObjectiveC --print-language input.m # extension `m' matches no parser because the both objc and matlab # are disabled. ${CTAGS} --quiet --options=NONE -G --languages=-ObjectiveC,-MatLab --print-language input.m ${CTAGS} --quiet --options=NONE -G --languages=-MatLab,-ObjectiveC --print-language input.m echo '# EMACS MODE: MATLAB' # extension `m' matches both matlab and objc. # matlab wins by emacs modeline written in the input file. ${CTAGS} --quiet --options=NONE -G --print-language input-matlab.m # extension `m' matches only objc. That's all. ${CTAGS} --quiet --options=NONE -G --languages=-MatLab --print-language input-matlab.m # extension `m' matches only matlab. That's all. ${CTAGS} --quiet --options=NONE -G --languages=-ObjectiveC --print-language input-matlab.m # extension `m' matches no parser because the both objc and matlab # are disabled. That's all. ctags has no chance to read the file contents. ${CTAGS} --quiet --options=NONE -G --languages=-ObjectiveC,-MatLab --print-language input-matlab.m ${CTAGS} --quiet --options=NONE -G --languages=-MatLab,-ObjectiveC --print-language input-matlab.m echo '# EMACS MODE: OBJC' # extension `m' matches both matlab and objc. # objc wins by emacs modeline written in the input file. ${CTAGS} --quiet --options=NONE -G --print-language input-objc.m # extension `m' matches only objc. That's all. ${CTAGS} --quiet --options=NONE -G --languages=-MatLab --print-language input-objc.m # extension `m' matches only matlab. That's all. ${CTAGS} --quiet --options=NONE -G --languages=-ObjectiveC --print-language input-objc.m # extension `m' matches no parser because the both objc and matlab # are disabled. That's all. ctags has no chance to read the file contents. ${CTAGS} --quiet --options=NONE -G --languages=-ObjectiveC,-MatLab --print-language input-objc.m ${CTAGS} --quiet --options=NONE -G --languages=-MatLab,-ObjectiveC --print-language input-objc.m ================================================ FILE: Tmain/disable-languages.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/disable-languages.d/stdout-expected.txt ================================================ # FILE NAME ONLY input.m: MatLab input.m: ObjectiveC input.m: MatLab input.m: NONE input.m: NONE # EMACS MODE: MATLAB input-matlab.m: MatLab input-matlab.m: ObjectiveC input-matlab.m: MatLab input-matlab.m: NONE input-matlab.m: NONE # EMACS MODE: OBJC input-objc.m: ObjectiveC input-objc.m: ObjectiveC input-objc.m: MatLab input-objc.m: NONE input-objc.m: NONE ================================================ FILE: Tmain/dot-ctags-with-indentation.d/args.ctags ================================================ --_echo=A-begin --_echo=A-with-tab --_echo=A-with-spaces --_echo=B-begin ================================================ FILE: Tmain/dot-ctags-with-indentation.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/dot-ctags-with-indentation.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --options=NONE --options=./args.ctags --_force-quit=0 exit $? ================================================ FILE: Tmain/dot-ctags-with-indentation.d/stderr-expected.txt ================================================ ctags: Notice: No options will be read from files or environment ctags: Notice: A-begin ctags: Notice: A-with-tab ctags: Notice: A-with-spaces ctags: Notice: B-begin ================================================ FILE: Tmain/dot-ctags-with-indentation.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/dynamic-kinds.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/dynamic-kinds.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE \ --langdef=X --kinddef-X='a,anchor,anchors' \ --kinddef-X='b,batch,batches' \ --list-kinds-full=X exit $? ================================================ FILE: Tmain/dynamic-kinds.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/dynamic-kinds.d/stdout-expected.txt ================================================ #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION a anchor yes no 0 NONE 0 anchors b batch yes no 0 NONE 0 batches ================================================ FILE: Tmain/e-ctags-output.d/input_file.cc ================================================ /* Could NOT be parsed well. The signature should be recorded well. */ int32 test(int32 a) { return 0; } /* Can be parsed */ int32 test2(void) { return 0; } /* A tab is included in signature. However, it should be recorded well after converting the tab to a whitespace. */ int32 test3(int32 a) { return 0; } /* A newline is included in signature. However, it should be recorded well after converting the newline to a whitespace. */ int32 test4(int32 a) { return 0; } ================================================ FILE: Tmain/e-ctags-output.d/input_scope.rst ================================================ =========== title =========== X tab Y =========== This one will not be recorded. topic in tab ---------------------- This one will not be recorded if --fileds=+s is given because a tab char is in the scope field. X space Y =========== This one will be recorded. topic in space ---------------------- This one will be recorded. ================================================ FILE: Tmain/e-ctags-output.d/input_space.rst ================================================ =================================== A spaces B =================================== Ths should be recorded in e-ctags output. ================================================ FILE: Tmain/e-ctags-output.d/input_tab.rst ================================================ =================================== A tabs B =================================== Ths should not be recorded in e-ctags output. ================================================ FILE: Tmain/e-ctags-output.d/run.sh ================================================ # Copyright: 2019 Masatake YAMATO # License: GPL-2 # The original bug is reported by @elecalion in #2014. CTAGS=$1 BUILDDIR=$2 . ../utils.sh tmp="input file.cc" run() { echo '#' echo '#' with $1 echo '#' cp input_file.cc $BUILDDIR/"${tmp}" if ! direq_maybe $BUILDDIR .; then for f in input_*.rst; do if ! [ -e $BUILDDIR/$f ]; then cp $f $BUILDDIR copied=yes fi done fi ( cd $BUILDDIR "${CTAGS}" --quiet --options=NONE ${1} --output-format=e-ctags \ --kinds-c++=+p --fields=+iaSs \ -o - \ "${tmp}" \ input_tab.rst input_space.rst rm -f "${tmp}" echo "# WITH SCOPE" "${CTAGS}" --quiet --options=NONE ${1} --output-format=e-ctags \ --fields=+s \ -o - \ input_scope.rst echo "# WITHOUT SCOPE" "${CTAGS}" --quiet --options=NONE ${1} --output-format=e-ctags \ --fields=-s \ -o - \ input_scope.rst if [ "$copied" = "yes" ]; then rm -f input_*.rst fi ) } run "--sort=yes" run "--sort=no" ================================================ FILE: Tmain/e-ctags-output.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/e-ctags-output.d/stdout-expected.txt ================================================ # # with --sort=yes # A spaces B input_space.rst /^A spaces B$/;" H test input file.cc /^int32 test(int32 a)$/;" f typeref:typename:int32 signature:(int32 a) test2 input file.cc /^int32 test2(void)$/;" f typeref:typename:int32 signature:(void) test3 input file.cc /^int32 test3(int32 a)$/;" f typeref:typename:int32 signature:(int32 a) test4 input file.cc /^int32 test4(int32$/;" f typeref:typename:int32 signature:(int32 a) # WITH SCOPE X space Y input_scope.rst /^X space Y$/;" c title:title title input_scope.rst /^title$/;" H topic in space input_scope.rst /^topic in space$/;" s chapter:X space Y # WITHOUT SCOPE X space Y input_scope.rst /^X space Y$/;" c title input_scope.rst /^title$/;" H topic in space input_scope.rst /^topic in space$/;" s topic in tab input_scope.rst /^topic in tab$/;" s # # with --sort=no # test input file.cc /^int32 test(int32 a)$/;" f typeref:typename:int32 signature:(int32 a) test2 input file.cc /^int32 test2(void)$/;" f typeref:typename:int32 signature:(void) test3 input file.cc /^int32 test3(int32 a)$/;" f typeref:typename:int32 signature:(int32 a) test4 input file.cc /^int32 test4(int32$/;" f typeref:typename:int32 signature:(int32 a) A spaces B input_space.rst /^A spaces B$/;" H # WITH SCOPE title input_scope.rst /^title$/;" H X space Y input_scope.rst /^X space Y$/;" c title:title topic in space input_scope.rst /^topic in space$/;" s chapter:X space Y # WITHOUT SCOPE title input_scope.rst /^title$/;" H topic in tab input_scope.rst /^topic in tab$/;" s X space Y input_scope.rst /^X space Y$/;" c topic in space input_scope.rst /^topic in space$/;" s ================================================ FILE: Tmain/early--version-opt-processing.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/early--version-opt-processing.d/run.sh ================================================ # Copyright: 2023 Masatake YAMATO # License: GPL-2 CTAGS=$1 BUILDDIR=$2 remove_ctags_d=y if [ -d $BUILDDIR/.ctags.d ]; then remove_ctags_d=n fi defc_ctags=tmain_defc.ctags mkdir -p $BUILDDIR/.ctags.d echo "--langdef=C" > $BUILDDIR/.ctags.d/"$defc_ctags" (cd $BUILDDIR; "${CTAGS}" --version;) > /dev/null status=$? rm $BUILDDIR/.ctags.d/"$defc_ctags" if [ "$remove_ctags_d" = y ]; then rmdir $BUILDDIR/.ctags.d fi exit "$status" ================================================ FILE: Tmain/early--version-opt-processing.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/early--version-opt-processing.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/emacs-modeline-downcased-mode.d/exti-expected.txt ================================================ 0 ================================================ FILE: Tmain/emacs-modeline-downcased-mode.d/functions ================================================ # -*-Shell-script-*- # # This is found in /etc/init.d/functions of Fedora23. # # This test case is special as as case for modeline # testing: # # 1. No whitespace between modename and -*-, and # 2. Capitalized # ================================================ FILE: Tmain/emacs-modeline-downcased-mode.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 $CTAGS --options=NONE --quiet -G --print-language ./functions ================================================ FILE: Tmain/emacs-modeline-downcased-mode.d/stderr-expected.txt ================================================ ctags: Notice: No options will be read from files or environment ================================================ FILE: Tmain/emacs-modeline-downcased-mode.d/stdout-expected.txt ================================================ ./functions: Sh ================================================ FILE: Tmain/emacs-modeline-non-alnum-in-head.d/input ================================================ /* -*- mode: C++; eval: (auto-fill-mode 1); -*- */ ================================================ FILE: Tmain/emacs-modeline-non-alnum-in-head.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 $CTAGS --quiet --options=NONE -G --print-language input ================================================ FILE: Tmain/emacs-modeline-non-alnum-in-head.d/stdout-expected.txt ================================================ input: C++ ================================================ FILE: Tmain/emacs-modeline-non-alnum-in-head2.d/input ================================================ /* -*- C++ -*- */ ================================================ FILE: Tmain/emacs-modeline-non-alnum-in-head2.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 $CTAGS --quiet --options=NONE -G --print-language input ================================================ FILE: Tmain/emacs-modeline-non-alnum-in-head2.d/stdout-expected.txt ================================================ input: C++ ================================================ FILE: Tmain/emacs-modeline-non-alnum-in-tail.d/input ================================================ /* Local Variables: */ /* mode: c++ */ /* comment-column: 0 */ /* End: */ ================================================ FILE: Tmain/emacs-modeline-non-alnum-in-tail.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 $CTAGS --quiet --options=NONE -G --print-language input ================================================ FILE: Tmain/emacs-modeline-non-alnum-in-tail.d/stdout-expected.txt ================================================ input: C++ ================================================ FILE: Tmain/emacs-modeline-uppercased-marker.d/exti-expected.txt ================================================ 0 ================================================ FILE: Tmain/emacs-modeline-uppercased-marker.d/macros ================================================ # -*- Mode: rpm-spec; indent-tabs-mode: nil -*- */ # SPDX-License-Identifier: LGPL-2.1+ # # This file is part of systemd. # RPM macros for packages installing systemd unit files ================================================ FILE: Tmain/emacs-modeline-uppercased-marker.d/run.sh ================================================ # Copyright: 2019 Masatake YAMATO # License: GPL-2 CTAGS=$1 $CTAGS --options=NONE --quiet -G --print-language ./macros ================================================ FILE: Tmain/emacs-modeline-uppercased-marker.d/stderr-expected.txt ================================================ ctags: Notice: No options will be read from files or environment ================================================ FILE: Tmain/emacs-modeline-uppercased-marker.d/stdout-expected.txt ================================================ ./macros: RpmSpec ================================================ FILE: Tmain/emacs-modline-shell-script-zsh.d/input-firstline0.unknown ================================================ # -*- mode: sh; eval: (sh-set-shell "zsh") -*- ================================================ FILE: Tmain/emacs-modline-shell-script-zsh.d/input-firstline1.unknown ================================================ # -*- mode: shell-script; sh-set-shell: zsh -*- # Emacs doesn't understand this notation but I found one in # https://github.com/neumachen/dotfiles/blob/3e2b04249f852dbdf7dee1e33e518de61031eb04/private_dot_config/exact_zsh/dot_zprofile ================================================ FILE: Tmain/emacs-modline-shell-script-zsh.d/input-firstline2.unknown ================================================ # -*- mode: sh; eval: (sh-set-shell "bash") -*- ================================================ FILE: Tmain/emacs-modline-shell-script-zsh.d/input-firstline3.unknown ================================================ # -*- mode: shell-script; sh-set-shell: bash -*- # Emacs doesn't understand this notation but I found one in # https://github.com/neumachen/dotfiles/blob/3e2b04249f852dbdf7dee1e33e518de61031eb04/private_dot_config/exact_zsh/dot_zprofile ================================================ FILE: Tmain/emacs-modline-shell-script-zsh.d/input-firstline4.unknown ================================================ # -*- mode: sh -*- ================================================ FILE: Tmain/emacs-modline-shell-script-zsh.d/input-firstline5.unknown ================================================ # -*- mode: shell-script -*- # Emacs doesn't understand this notation but I found one in # https://github.com/neumachen/dotfiles/blob/3e2b04249f852dbdf7dee1e33e518de61031eb04/private_dot_config/exact_zsh/dot_zprofile ================================================ FILE: Tmain/emacs-modline-shell-script-zsh.d/input-lastlist0.unknown ================================================ # Local Variables: # mode: sh # eval: (sh-set-shell "zsh") # End: ================================================ FILE: Tmain/emacs-modline-shell-script-zsh.d/input-lastlist1.unknown ================================================ # Local Variables: # mode: sh # eval: (sh-set-shell "bash") # End: ================================================ FILE: Tmain/emacs-modline-shell-script-zsh.d/input-lastlist2.unknown ================================================ # Local Variables: # mode: sh # End: ================================================ FILE: Tmain/emacs-modline-shell-script-zsh.d/run.sh ================================================ # Copyright: 2022 Masatake YAMATO # License: GPL-2 CTAGS=$1 for f in input-firstline0.unknown \ input-firstline1.unknown \ input-firstline2.unknown \ input-firstline3.unknown \ input-firstline4.unknown \ input-firstline5.unknown \ input-lastlist0.unknown \ input-lastlist1.unknown \ input-lastlist2.unknown \ ; do $CTAGS --quiet --options=NONE -G --print-language $f done ================================================ FILE: Tmain/emacs-modline-shell-script-zsh.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/emacs-modline-shell-script-zsh.d/stdout-expected.txt ================================================ input-firstline0.unknown: Zsh input-firstline1.unknown: Zsh input-firstline2.unknown: Sh input-firstline3.unknown: Sh input-firstline4.unknown: Sh input-firstline5.unknown: Sh input-lastlist0.unknown: Zsh input-lastlist1.unknown: Sh input-lastlist2.unknown: Sh ================================================ FILE: Tmain/enable-kind-postfix-with-wildcard.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE '--kinds-all=*' --list-kinds | grep '\[off\]' ================================================ FILE: Tmain/enable-kind-postfix-with-wildcard.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/enable-kind-postfix-with-wildcard.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/enable-kind-postfix.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --kinds-c=+l-f --list-kinds=C | grep '^[fl]' ================================================ FILE: Tmain/enable-kind-postfix.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/enable-kind-postfix.d/stdout-expected.txt ================================================ f function definitions [off] l local variables ================================================ FILE: Tmain/enable-kind-prefix-with-wildcard.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --kinds-all='*' --list-kinds | grep '\[off\]' ================================================ FILE: Tmain/enable-kind-prefix-with-wildcard.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/enable-kind-prefix-with-wildcard.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/enable-kind-prefix.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --kinds-c=+l-f --list-kinds=C | grep '^[fl]' ================================================ FILE: Tmain/enable-kind-prefix.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/enable-kind-prefix.d/stdout-expected.txt ================================================ f function definitions [off] l local variables ================================================ FILE: Tmain/enable-non-existing-kind.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --kinds-C=+Z --_force-quit ================================================ FILE: Tmain/enable-non-existing-kind.d/stderr-expected.txt ================================================ ctags: Warning: Unsupported kind: 'Z' for --kinds-C option ================================================ FILE: Tmain/epoch-field.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS=$1 O0=/tmp/ctags-tstamp-$$.c O1=/tmp/ctags-tstamp-$$.h O2=/tmp/ctags-tstamp-$$.m cat > $O0 < $O1 < $O2 < EOF is_json_avaiable() { $1 --quiet --options=NONE --with-list-header=no --list-features | grep -q "json" } run() { local o=$1 local t=$2 shift 2 local s echo $t TZ=UTC+00:00 touch -t '200402291621.42' $o && $CTAGS "$@" --kinds-C= --extras=f --fields=T -o - $o \ | sed -e 's/.*\(epoch:.*\)/tags:\1/' && $CTAGS "$@" --kinds-C= --extras=f --fields=T -o - -x --_xformat="xref:epoch:%T" $o && { if is_json_avaiable $CTAGS; then $CTAGS "$@" --kinds-C= --extras=f --fields=T -o - --output-format=json $o \ | sed -e 's/.*"epoch": \([0-9]*\).*/json:epoch:\1/' else echo "json:epoch:1078071702" fi } s=$? rm $o return $s } run $O0 ".c file" --quiet --options=NONE && run $O1 ".h file" --quiet --options=NONE && run $O2 ".m file" --quiet --options=NONE -G exit $? ================================================ FILE: Tmain/epoch-field.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/epoch-field.d/stdout-expected.txt ================================================ .c file tags:epoch:1078071702 xref:epoch:1078071702 json:epoch:1078071702 .h file tags:epoch:1078071702 xref:epoch:1078071702 json:epoch:1078071702 .m file tags:epoch:1078071702 xref:epoch:1078071702 json:epoch:1078071702 ================================================ FILE: Tmain/errors-about-parser-specific-extras.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS="$1" O="--quiet --options=NONE --with-list-header=no" echo '#lang' 1>&2 ${CTAGS} ${O} --extras-NOSUCHLANG=-'{whitespaceSwapped}' --list-extras ${CTAGS} ${O} --extras-NOSUCHLANG=-'{whitespaceSwapped}' --list-extras= ${CTAGS} ${O} --extras-Robot=-'{whitespaceSwapped}' --list-extras=NOSUCHLANG echo '#extras' 1>&2 ${CTAGS} ${O} --extras-Robot=-'{NOSUCHEXTRA}' --list-extras ${CTAGS} ${O} --extras-Robot=-'{NOSUCHEXTRA}' --list-extras= ${CTAGS} ${O} --extras-Robot=-'{NOSUCHEXTRA}' --list-extras=NOSUCHLANG echo '#null' 1>&2 ${CTAGS} ${O} --extras-= --list-extras # not an error, just set all extras to false. ${CTAGS} ${O} --extras-Robot= --list-extras ${CTAGS} ${O} --extras-Robot=-'{whitespaceSwapped}' --list-extras= echo '#null null' 1>&2 # About --extras-Robot=, not an error, just set all extras to false. ${CTAGS} ${O} --extras-Robot= --list-extras= ${CTAGS} ${O} --extras-= --list-extras= ================================================ FILE: Tmain/errors-about-parser-specific-extras.d/stderr-expected.txt ================================================ #lang ctags: Warning: Unknown language: NOSUCHLANG (ignoring "--extras-NOSUCHLANG") ctags: Warning: Unknown language: NOSUCHLANG (ignoring "--extras-NOSUCHLANG") ctags: Unknown language "NOSUCHLANG" in "list-extras" option #extras ctags: no such extra: 'NOSUCHEXTRA' ctags: no such extra: 'NOSUCHEXTRA' ctags: no such extra: 'NOSUCHEXTRA' #null ctags: No language given in "extras-" option #null null ctags: No language given in "extras-" option ================================================ FILE: Tmain/errors-if-tags-exits-as-directory.d/exit-expected.txt ================================================ 1 ================================================ FILE: Tmain/errors-if-tags-exits-as-directory.d/run.sh ================================================ # Copyright: 2024 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE $0 ================================================ FILE: Tmain/errors-if-tags-exits-as-directory.d/stderr-expected.txt ================================================ ctags: "tags" already exists as a directory; I cannot write tag entries there. Remove the directory or specify a file name with -o option. ================================================ FILE: Tmain/errors-if-tags-exits-as-directory.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/errors-in-options-roles.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS=$1 status () { echo "status: $1" } 1>&2 title() { echo echo '#' for x in "$@"; do echo '#' $x done echo '#' } 1>&2 run() { title "$@" ${CTAGS} --quiet --options=NONE "$@" --_force-quit=42 status $? } run '--roles-all=something' run '--roles-all.*=something' run '--roles-all.?=' run '--roles-NoSuchLang=' run '--roles-NoSuchLang.*=' run '--roles-NoSuchLang=+{role}' run '--roles-NoSuchLang=-{role}' run '--roles-C={role}' run '--roles-C=+{role}' run '--roles-C=-{role}' run '--roles-C.*={role}' run '--roles-C.*=+{role}' run '--roles-C.*=-{role}' run '--roles-C.{header=' run '--roles-C.{file}=' run '--roles-C.{noSuchKind}=' run '--roles-C.{header}x=' run '--roles-C.F=' # run '--roles-C.X=' title "unknown kind letter x" ${CTAGS} --quiet --options=NONE --langdef=MyLang --roles-MyLang.X= --_force-quit=42 status $? run '--roles-C.fx=' run '--roles-C.?=' run '--roles-C.h={system' run '--roles-C.h=+{system' run '--roles-C.h=-{system' run '--roles-C.h={system}{local' run '--roles-C.h=+{system}{local' run '--roles-C.h=-{system}{local' run '--roles-C.h={system{local}' run '--roles-C.h=+{system{local}' run '--roles-C.h=-{system{local}' run '--roles-C.{header}={system' run '--roles-C.{header}=+{system' run '--roles-C.{header}=-{system' run '--roles-C.{header}={system}{local' run '--roles-C.{header}=+{system}{local' run '--roles-C.{header}=-{system}{local' run '--roles-C.{header}={system{local}' run '--roles-C.{header}=+{system{local}' run '--roles-C.{header}=-{system{local}' run '--roles-C.h={noSuchRole}' run '--roles-C.h=+{noSuchRole}' run '--roles-C.h=-{noSuchRole}' run '--roles-C.h={system}{noSuchRole}' run '--roles-C.h={noSuchRole}' run '--roles-C.h=+{system}{noSuchRole}' run '--roles-C.h=-{system}{noSuchRole}' run '--roles-C.h=+{system}-{noSuchRole}' run '--roles-C.h=-{system}+{noSuchRole}' run '--roles-C.{header}={noSuchRole}' run '--roles-C.{header}=+{noSuchRole}' run '--roles-C.{header}=-{noSuchRole}' run '--roles-C.{header}={system}{noSuchRole}' run '--roles-C.{header}={noSuchRole}' run '--roles-C.{header}=+{system}{noSuchRole}' run '--roles-C.{header}=-{system}{noSuchRole}' run '--roles-C.{header}=+{system}-{noSuchRole}' run '--roles-C.{header}=-{system}+{noSuchRole}' run '--roles-C.h=x{system}' run '--roles-C.h=+x{system}' run '--roles-C.h=-x{system}' run '--roles-C.h=x+{system}' run '--roles-C.h=+x+{system}' run '--roles-C.h=-x+{system}' run '--roles-C.h=x-{system}' run '--roles-C.h=+x-{system}' run '--roles-C.h=-x+-system}' run '--roles-C.{header}=x{system}' run '--roles-C.{header}=+x{system}' run '--roles-C.{header}=-x{system}' run '--roles-C.{header}=x+{system}' run '--roles-C.{header}=+x+{system}' run '--roles-C.{header}=-x+{system}' run '--roles-C.{header}=x-{system}' run '--roles-C.{header}=+x-{system}' run '--roles-C.{header}=-x+-system}' ================================================ FILE: Tmain/errors-in-options-roles.d/stderr-expected.txt ================================================ # # --roles-all=something # ctags: only '*' or '' (empty string) is acceptable as an argument for --roles-all: something status: 1 # # --roles-all.*=something # ctags: only '*' or '' (empty string) is acceptable as an argument for --roles-all.*: something status: 1 # # --roles-all.?= # ctags: only '*' or '' (empty string) is acceptable as a kind spec for --roles-all: --roles-all.? status: 1 # # --roles-NoSuchLang= # ctags: Warning: unknown language "NoSuchLang" in --roles-NoSuchLang option status: 42 # # --roles-NoSuchLang.*= # ctags: Warning: unknown language "NoSuchLang" in --roles-NoSuchLang.* option status: 42 # # --roles-NoSuchLang=+{role} # ctags: Warning: unknown language "NoSuchLang" in --roles-NoSuchLang option status: 42 # # --roles-NoSuchLang=-{role} # ctags: Warning: unknown language "NoSuchLang" in --roles-NoSuchLang option status: 42 # # --roles-C={role} # ctags: only '*' or '' (empty string) is acceptable as an argument for --roles-C: {role} status: 1 # # --roles-C=+{role} # ctags: only '*' or '' (empty string) is acceptable as an argument for --roles-C: +{role} status: 1 # # --roles-C=-{role} # ctags: only '*' or '' (empty string) is acceptable as an argument for --roles-C: -{role} status: 1 # # --roles-C.*={role} # ctags: only '*' or '' (empty string) is acceptable as an argument for --roles-C.*: {role} status: 1 # # --roles-C.*=+{role} # ctags: only '*' or '' (empty string) is acceptable as an argument for --roles-C.*: +{role} status: 1 # # --roles-C.*=-{role} # ctags: only '*' or '' (empty string) is acceptable as an argument for --roles-C.*: -{role} status: 1 # # --roles-C.{header= # ctags: no '}' representing the end of kind name in --roles-C.{header option: {header status: 1 # # --roles-C.{file}= # ctags: Warning: don't enable/disable a role in F/file kind; it has no role: --roles-C.{file} status: 42 # # --roles-C.{noSuchKind}= # ctags: Warning: no such kind name as specified in --roles-C.{noSuchKind} option status: 42 # # --roles-C.{header}x= # ctags: garbage after the kind specification {header} in --roles-C.{header}x option status: 1 # # --roles-C.F= # ctags: Warning: don't enable/disable a role in F/file kind; it has no role: --roles-C.F status: 42 # # unknown kind letter x # ctags: Warning: no such kind letter as specified in --roles-MyLang.X option status: 42 # # --roles-C.fx= # ctags: garbage after the kind specification 'f' in --roles-C.fx option status: 1 # # --roles-C.?= # ctags: '?', unexpected character in --roles-C.? status: 1 # # --roles-C.h={system # ctags: no '}' representing the end of role name in --roles-C.h option: system status: 1 # # --roles-C.h=+{system # ctags: no '}' representing the end of role name in --roles-C.h option: system status: 1 # # --roles-C.h=-{system # ctags: no '}' representing the end of role name in --roles-C.h option: system status: 1 # # --roles-C.h={system}{local # ctags: no '}' representing the end of role name in --roles-C.h option: local status: 1 # # --roles-C.h=+{system}{local # ctags: no '}' representing the end of role name in --roles-C.h option: local status: 1 # # --roles-C.h=-{system}{local # ctags: no '}' representing the end of role name in --roles-C.h option: local status: 1 # # --roles-C.h={system{local} # ctags: Warning: no such role: "system{local" in kind 'h' in language "C" status: 42 # # --roles-C.h=+{system{local} # ctags: Warning: no such role: "system{local" in kind 'h' in language "C" status: 42 # # --roles-C.h=-{system{local} # ctags: Warning: no such role: "system{local" in kind 'h' in language "C" status: 42 # # --roles-C.{header}={system # ctags: no '}' representing the end of role name in --roles-C.{header} option: system status: 1 # # --roles-C.{header}=+{system # ctags: no '}' representing the end of role name in --roles-C.{header} option: system status: 1 # # --roles-C.{header}=-{system # ctags: no '}' representing the end of role name in --roles-C.{header} option: system status: 1 # # --roles-C.{header}={system}{local # ctags: no '}' representing the end of role name in --roles-C.{header} option: local status: 1 # # --roles-C.{header}=+{system}{local # ctags: no '}' representing the end of role name in --roles-C.{header} option: local status: 1 # # --roles-C.{header}=-{system}{local # ctags: no '}' representing the end of role name in --roles-C.{header} option: local status: 1 # # --roles-C.{header}={system{local} # ctags: Warning: no such role: "system{local" in kind 'h' in language "C" status: 42 # # --roles-C.{header}=+{system{local} # ctags: Warning: no such role: "system{local" in kind 'h' in language "C" status: 42 # # --roles-C.{header}=-{system{local} # ctags: Warning: no such role: "system{local" in kind 'h' in language "C" status: 42 # # --roles-C.h={noSuchRole} # ctags: Warning: no such role: "noSuchRole" in kind 'h' in language "C" status: 42 # # --roles-C.h=+{noSuchRole} # ctags: Warning: no such role: "noSuchRole" in kind 'h' in language "C" status: 42 # # --roles-C.h=-{noSuchRole} # ctags: Warning: no such role: "noSuchRole" in kind 'h' in language "C" status: 42 # # --roles-C.h={system}{noSuchRole} # ctags: Warning: no such role: "noSuchRole" in kind 'h' in language "C" status: 42 # # --roles-C.h={noSuchRole} # ctags: Warning: no such role: "noSuchRole" in kind 'h' in language "C" status: 42 # # --roles-C.h=+{system}{noSuchRole} # ctags: Warning: no such role: "noSuchRole" in kind 'h' in language "C" status: 42 # # --roles-C.h=-{system}{noSuchRole} # ctags: Warning: no such role: "noSuchRole" in kind 'h' in language "C" status: 42 # # --roles-C.h=+{system}-{noSuchRole} # ctags: Warning: no such role: "noSuchRole" in kind 'h' in language "C" status: 42 # # --roles-C.h=-{system}+{noSuchRole} # ctags: Warning: no such role: "noSuchRole" in kind 'h' in language "C" status: 42 # # --roles-C.{header}={noSuchRole} # ctags: Warning: no such role: "noSuchRole" in kind 'h' in language "C" status: 42 # # --roles-C.{header}=+{noSuchRole} # ctags: Warning: no such role: "noSuchRole" in kind 'h' in language "C" status: 42 # # --roles-C.{header}=-{noSuchRole} # ctags: Warning: no such role: "noSuchRole" in kind 'h' in language "C" status: 42 # # --roles-C.{header}={system}{noSuchRole} # ctags: Warning: no such role: "noSuchRole" in kind 'h' in language "C" status: 42 # # --roles-C.{header}={noSuchRole} # ctags: Warning: no such role: "noSuchRole" in kind 'h' in language "C" status: 42 # # --roles-C.{header}=+{system}{noSuchRole} # ctags: Warning: no such role: "noSuchRole" in kind 'h' in language "C" status: 42 # # --roles-C.{header}=-{system}{noSuchRole} # ctags: Warning: no such role: "noSuchRole" in kind 'h' in language "C" status: 42 # # --roles-C.{header}=+{system}-{noSuchRole} # ctags: Warning: no such role: "noSuchRole" in kind 'h' in language "C" status: 42 # # --roles-C.{header}=-{system}+{noSuchRole} # ctags: Warning: no such role: "noSuchRole" in kind 'h' in language "C" status: 42 # # --roles-C.h=x{system} # ctags: unexpected character x in --roles-C.h=x{system} option status: 1 # # --roles-C.h=+x{system} # ctags: unexpected character x in --roles-C.h=+x{system} option status: 1 # # --roles-C.h=-x{system} # ctags: unexpected character x in --roles-C.h=-x{system} option status: 1 # # --roles-C.h=x+{system} # ctags: unexpected character x in --roles-C.h=x+{system} option status: 1 # # --roles-C.h=+x+{system} # ctags: unexpected character x in --roles-C.h=+x+{system} option status: 1 # # --roles-C.h=-x+{system} # ctags: unexpected character x in --roles-C.h=-x+{system} option status: 1 # # --roles-C.h=x-{system} # ctags: unexpected character x in --roles-C.h=x-{system} option status: 1 # # --roles-C.h=+x-{system} # ctags: unexpected character x in --roles-C.h=+x-{system} option status: 1 # # --roles-C.h=-x+-system} # ctags: unexpected character x in --roles-C.h=-x+-system} option status: 1 # # --roles-C.{header}=x{system} # ctags: unexpected character x in --roles-C.{header}=x{system} option status: 1 # # --roles-C.{header}=+x{system} # ctags: unexpected character x in --roles-C.{header}=+x{system} option status: 1 # # --roles-C.{header}=-x{system} # ctags: unexpected character x in --roles-C.{header}=-x{system} option status: 1 # # --roles-C.{header}=x+{system} # ctags: unexpected character x in --roles-C.{header}=x+{system} option status: 1 # # --roles-C.{header}=+x+{system} # ctags: unexpected character x in --roles-C.{header}=+x+{system} option status: 1 # # --roles-C.{header}=-x+{system} # ctags: unexpected character x in --roles-C.{header}=-x+{system} option status: 1 # # --roles-C.{header}=x-{system} # ctags: unexpected character x in --roles-C.{header}=x-{system} option status: 1 # # --roles-C.{header}=+x-{system} # ctags: unexpected character x in --roles-C.{header}=+x-{system} option status: 1 # # --roles-C.{header}=-x+-system} # ctags: unexpected character x in --roles-C.{header}=-x+-system} option status: 1 ================================================ FILE: Tmain/errors-in-options-roles.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/excmd-combine-backward.d/input.cpp ================================================ static int bar(void) { const int foo = 0; return foo; } int main(void) { int foo; foo = bar(); return foo; } ================================================ FILE: Tmain/excmd-combine-backward.d/run.sh ================================================ #!/bin/sh # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS=$1 $CTAGS --quiet --options=NONE -o - -B --excmd=combine input.cpp ================================================ FILE: Tmain/excmd-combine-backward.d/stdout-expected.txt ================================================ bar input.cpp 2;?^bar(void)$?;" f typeref:typename:int file: main input.cpp 10;?^main(void)$?;" f typeref:typename:int ================================================ FILE: Tmain/excmd-combine.d/input.cpp ================================================ static int bar(void) { const int foo = 0; return foo; } int main(void) { int foo; foo = bar(); return foo; } ================================================ FILE: Tmain/excmd-combine.d/run.sh ================================================ #!/bin/sh # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS=$1 $CTAGS --quiet --options=NONE -o - --excmd=combine input.cpp ================================================ FILE: Tmain/excmd-combine.d/stdout-expected.txt ================================================ bar input.cpp 2;/^bar(void)$/;" f typeref:typename:int file: main input.cpp 10;/^main(void)$/;" f typeref:typename:int ================================================ FILE: Tmain/extension-vs-pattern.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/extension-vs-pattern.d/input.xxx ================================================ ================================================ FILE: Tmain/extension-vs-pattern.d/run.sh ================================================ #!/bin/sh # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE \ --print-language \ --langdef=AAA --map-AAA='(input.xxx)' \ --langdef=BBB --map-BBB=.xxx \ input.xxx && ${CTAGS} --quiet --options=NONE \ --print-language \ --langdef=AAA --map-AAA=.xxx \ --langdef=BBB --map-BBB='(input.xxx)' \ input.xxx exit $? ================================================ FILE: Tmain/extension-vs-pattern.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/extension-vs-pattern.d/stdout-expected.txt ================================================ input.xxx: AAA input.xxx: BBB ================================================ FILE: Tmain/extras-field-for-pseudo-tags.d/input.c ================================================ int main (void) { return 0; } ================================================ FILE: Tmain/extras-field-for-pseudo-tags.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 run_ctags() { echo '# option: ' "$@" ${CTAGS} --quiet --options=NONE \ --fields=E --extras=p \ --pseudo-tags=-TAG_PROGRAM_VERSION \ --pseudo-tags=-TAG_PROC_CWD \ --pseudo-tags=-TAG_PARSER_VERSION \ --pseudo-tags=-TAG_OUTPUT_VERSION \ $@ \ -o - input.c } run_ctags --format=1 run_ctags --format=2 ================================================ FILE: Tmain/extras-field-for-pseudo-tags.d/stdout-expected.txt ================================================ # option: --format=1 !_TAG_EXTRA_DESCRIPTION pseudo /Include pseudo tags/ !_TAG_FIELD_DESCRIPTION extras /Extra tag type information/ !_TAG_FIELD_DESCRIPTION input /input file/ !_TAG_FIELD_DESCRIPTION name /tag name/ !_TAG_FIELD_DESCRIPTION pattern /pattern/ !_TAG_FILE_FORMAT 1 /original ctags format/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C h,header /included header files/ !_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/ !_TAG_KIND_DESCRIPTION!C s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C u,union /union names/ !_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_ROLE_DESCRIPTION!C!function foreigncall /called in foreign languages/ !_TAG_ROLE_DESCRIPTION!C!function foreigndecl /declared in foreign languages/ !_TAG_ROLE_DESCRIPTION!C!header local /local header/ !_TAG_ROLE_DESCRIPTION!C!header system /system header/ !_TAG_ROLE_DESCRIPTION!C!macro undef /undefined/ !_TAG_ROLE_DESCRIPTION!C!struct foreigndecl /declared in foreign languages/ main input.c /^int main (void) { return 0; }$/ # option: --format=2 !_TAG_EXTRA_DESCRIPTION pseudo /Include pseudo tags/;" extras:pseudo !_TAG_FIELD_DESCRIPTION extras /Extra tag type information/;" extras:pseudo !_TAG_FIELD_DESCRIPTION input /input file/;" extras:pseudo !_TAG_FIELD_DESCRIPTION name /tag name/;" extras:pseudo !_TAG_FIELD_DESCRIPTION pattern /pattern/;" extras:pseudo !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/;" extras:pseudo !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/;" extras:pseudo !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/;" extras:pseudo !_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/;" extras:pseudo !_TAG_KIND_DESCRIPTION!C f,function /function definitions/;" extras:pseudo !_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/;" extras:pseudo !_TAG_KIND_DESCRIPTION!C h,header /included header files/;" extras:pseudo !_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/;" extras:pseudo !_TAG_KIND_DESCRIPTION!C s,struct /structure names/;" extras:pseudo !_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/;" extras:pseudo !_TAG_KIND_DESCRIPTION!C u,union /union names/;" extras:pseudo !_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/;" extras:pseudo !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/;" extras:pseudo !_TAG_OUTPUT_FILESEP slash /slash or backslash/;" extras:pseudo !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/;" extras:pseudo !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/;" extras:pseudo !_TAG_PROGRAM_AUTHOR Universal Ctags Team //;" extras:pseudo !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/;" extras:pseudo !_TAG_PROGRAM_URL https://ctags.io/ /official site/;" extras:pseudo !_TAG_ROLE_DESCRIPTION!C!function foreigncall /called in foreign languages/;" extras:pseudo !_TAG_ROLE_DESCRIPTION!C!function foreigndecl /declared in foreign languages/;" extras:pseudo !_TAG_ROLE_DESCRIPTION!C!header local /local header/;" extras:pseudo !_TAG_ROLE_DESCRIPTION!C!header system /system header/;" extras:pseudo !_TAG_ROLE_DESCRIPTION!C!macro undef /undefined/;" extras:pseudo !_TAG_ROLE_DESCRIPTION!C!struct foreigndecl /declared in foreign languages/;" extras:pseudo main input.c /^int main (void) { return 0; }$/ ================================================ FILE: Tmain/extras-field.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/extras-field.d/input.cpp ================================================ #define Z namespace X { extern class Y { int m; } v; } #undef Z ================================================ FILE: Tmain/extras-field.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --kinds-C++=+x --fields=+Ere-T --extras=+qrf -o - input.cpp \ | sed -e 's|[^ ]*\(input.cpp\)|\1|' ================================================ FILE: Tmain/extras-field.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/extras-field.d/stdout-expected.txt ================================================ X input.cpp /^namespace X {$/;" n file: roles:def extras:fileScope end:6 X::Y input.cpp /^ extern class Y {$/;" c namespace:X file: roles:def extras:fileScope,qualified end:5 X::Y::m input.cpp /^ int m;$/;" m class:X::Y typeref:typename:int file: roles:def extras:fileScope,qualified end:4 X::v input.cpp /^ } v;$/;" x namespace:X typeref:class:X::Y roles:def extras:qualified end:5 Y input.cpp /^ extern class Y {$/;" c namespace:X file: roles:def extras:fileScope end:5 Z input.cpp /^#define Z$/;" d file: roles:def extras:fileScope end:1 Z input.cpp /^#undef Z$/;" d file: roles:undef extras:fileScope,reference input.cpp input.cpp 1;" F roles:def extras:inputFile end:7 m input.cpp /^ int m;$/;" m class:X::Y typeref:typename:int file: roles:def extras:fileScope end:4 v input.cpp /^ } v;$/;" x namespace:X typeref:class:X::Y roles:def end:5 ================================================ FILE: Tmain/extras-long.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 no_yaml() { grep -v I18nRubyGem } echo '# resetting' ${CTAGS} --quiet --options=NONE --with-list-header=no \ --extras='{subparser}' --list-extras | no_yaml echo '# enabling 1' ${CTAGS} --quiet --options=NONE --with-list-header=no \ --extras=+'{pseudo}' --list-extras | no_yaml echo '# disabling 1' ${CTAGS} --quiet --options=NONE --with-list-header=no \ --extras=-'{fileScope}' --list-extras | no_yaml echo '# combination' ${CTAGS} --quiet --options=NONE --with-list-header=no \ --extras=-'{fileScope}+{inputFile}{reference}' --list-extras | no_yaml echo '# combination with letters' ${CTAGS} --quiet --options=NONE --with-list-header=no \ --extras=-'{fileScope}+p{inputFile}q{reference}-f' --list-extras | no_yaml ================================================ FILE: Tmain/extras-long.d/stdout-expected.txt ================================================ # resetting - anonymous no NONE no 0 Include tags for non-named objects like lambda F fileScope no NONE no 0 Include tags of file scope f inputFile no NONE no 0 Include an entry for the base file name of every input file g guest no NONE no 0 Include tags generated by guest parsers p pseudo no NONE no 0 Include pseudo tags q qualified no NONE no 0 Include an extra class-qualified tag entry for each tag r reference no NONE no 0 Include reference tags s subparser yes NONE no 0 Include tags generated by subparsers z nulltag no NONE no 1 Include tags with empty strings as their names - canonicalizedName yes Automake no 1 Include canonicalized object name like libctags_a - linkName no Fortran no 1 Linking name used in foreign languages - implicitClass no GDScript no 0 Include tag for the implicitly defined unnamed class - doubleSharps no IPythonCell no 0 Include cells starting from ## - configPrefixed yes Kconfig no 0 prepend CONFIG_ to config names - CppDef no Make no 1 Include FOO in -DFOO as as a name of CPreProcessor macro - implicitImportName yes Odin no 0 implicitly defined import name like "filepath" in "core:path/filepath" - guessedFromFileName yes PkgConfig no 0 the guessed package name of the .pc file - arityAppended yes Prolog no 0 Include predicates with their arities - funcmap yes QemuHX no 0 Include mapping SQMP to C function name - whitespaceSwapped yes Robot no 0 Include tags swapping whitespace and underscore chars # enabling 1 - anonymous yes NONE no 0 Include tags for non-named objects like lambda F fileScope yes NONE no 0 Include tags of file scope f inputFile no NONE no 0 Include an entry for the base file name of every input file g guest no NONE no 0 Include tags generated by guest parsers p pseudo yes NONE no 0 Include pseudo tags q qualified no NONE no 0 Include an extra class-qualified tag entry for each tag r reference no NONE no 0 Include reference tags s subparser yes NONE no 0 Include tags generated by subparsers z nulltag no NONE no 1 Include tags with empty strings as their names - canonicalizedName yes Automake no 1 Include canonicalized object name like libctags_a - linkName no Fortran no 1 Linking name used in foreign languages - implicitClass no GDScript no 0 Include tag for the implicitly defined unnamed class - doubleSharps no IPythonCell no 0 Include cells starting from ## - configPrefixed yes Kconfig no 0 prepend CONFIG_ to config names - CppDef no Make no 1 Include FOO in -DFOO as as a name of CPreProcessor macro - implicitImportName yes Odin no 0 implicitly defined import name like "filepath" in "core:path/filepath" - guessedFromFileName yes PkgConfig no 0 the guessed package name of the .pc file - arityAppended yes Prolog no 0 Include predicates with their arities - funcmap yes QemuHX no 0 Include mapping SQMP to C function name - whitespaceSwapped yes Robot no 0 Include tags swapping whitespace and underscore chars # disabling 1 - anonymous yes NONE no 0 Include tags for non-named objects like lambda F fileScope no NONE no 0 Include tags of file scope f inputFile no NONE no 0 Include an entry for the base file name of every input file g guest no NONE no 0 Include tags generated by guest parsers p pseudo yes NONE no 0 Include pseudo tags q qualified no NONE no 0 Include an extra class-qualified tag entry for each tag r reference no NONE no 0 Include reference tags s subparser yes NONE no 0 Include tags generated by subparsers z nulltag no NONE no 1 Include tags with empty strings as their names - canonicalizedName yes Automake no 1 Include canonicalized object name like libctags_a - linkName no Fortran no 1 Linking name used in foreign languages - implicitClass no GDScript no 0 Include tag for the implicitly defined unnamed class - doubleSharps no IPythonCell no 0 Include cells starting from ## - configPrefixed yes Kconfig no 0 prepend CONFIG_ to config names - CppDef no Make no 1 Include FOO in -DFOO as as a name of CPreProcessor macro - implicitImportName yes Odin no 0 implicitly defined import name like "filepath" in "core:path/filepath" - guessedFromFileName yes PkgConfig no 0 the guessed package name of the .pc file - arityAppended yes Prolog no 0 Include predicates with their arities - funcmap yes QemuHX no 0 Include mapping SQMP to C function name - whitespaceSwapped yes Robot no 0 Include tags swapping whitespace and underscore chars # combination - anonymous yes NONE no 0 Include tags for non-named objects like lambda F fileScope no NONE no 0 Include tags of file scope f inputFile yes NONE no 0 Include an entry for the base file name of every input file g guest no NONE no 0 Include tags generated by guest parsers p pseudo yes NONE no 0 Include pseudo tags q qualified no NONE no 0 Include an extra class-qualified tag entry for each tag r reference yes NONE no 0 Include reference tags s subparser yes NONE no 0 Include tags generated by subparsers z nulltag no NONE no 1 Include tags with empty strings as their names - canonicalizedName yes Automake no 1 Include canonicalized object name like libctags_a - linkName no Fortran no 1 Linking name used in foreign languages - implicitClass no GDScript no 0 Include tag for the implicitly defined unnamed class - doubleSharps no IPythonCell no 0 Include cells starting from ## - configPrefixed yes Kconfig no 0 prepend CONFIG_ to config names - CppDef no Make no 1 Include FOO in -DFOO as as a name of CPreProcessor macro - implicitImportName yes Odin no 0 implicitly defined import name like "filepath" in "core:path/filepath" - guessedFromFileName yes PkgConfig no 0 the guessed package name of the .pc file - arityAppended yes Prolog no 0 Include predicates with their arities - funcmap yes QemuHX no 0 Include mapping SQMP to C function name - whitespaceSwapped yes Robot no 0 Include tags swapping whitespace and underscore chars # combination with letters - anonymous yes NONE no 0 Include tags for non-named objects like lambda F fileScope no NONE no 0 Include tags of file scope f inputFile no NONE no 0 Include an entry for the base file name of every input file g guest no NONE no 0 Include tags generated by guest parsers p pseudo yes NONE no 0 Include pseudo tags q qualified yes NONE no 0 Include an extra class-qualified tag entry for each tag r reference yes NONE no 0 Include reference tags s subparser yes NONE no 0 Include tags generated by subparsers z nulltag no NONE no 1 Include tags with empty strings as their names - canonicalizedName yes Automake no 1 Include canonicalized object name like libctags_a - linkName no Fortran no 1 Linking name used in foreign languages - implicitClass no GDScript no 0 Include tag for the implicitly defined unnamed class - doubleSharps no IPythonCell no 0 Include cells starting from ## - configPrefixed yes Kconfig no 0 prepend CONFIG_ to config names - CppDef no Make no 1 Include FOO in -DFOO as as a name of CPreProcessor macro - implicitImportName yes Odin no 0 implicitly defined import name like "filepath" in "core:path/filepath" - guessedFromFileName yes PkgConfig no 0 the guessed package name of the .pc file - arityAppended yes Prolog no 0 Include predicates with their arities - funcmap yes QemuHX no 0 Include mapping SQMP to C function name - whitespaceSwapped yes Robot no 0 Include tags swapping whitespace and underscore chars ================================================ FILE: Tmain/filter-option-write-to-file.d/input.c ================================================ int main(void) { return 0; } ================================================ FILE: Tmain/filter-option-write-to-file.d/run.sh ================================================ #!/bin/sh # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 O=/tmp/ctags-tmain-$$.txt echo ./input.c | $CTAGS --quiet --options=NONE --filter -o $O rm -f ${O} ================================================ FILE: Tmain/filter-option-write-to-file.d/stderr-expected.txt ================================================ ctags: Warning: filter mode ignores output tag file name ================================================ FILE: Tmain/filter-option-write-to-file.d/stdout-expected.txt ================================================ main ./input.c /^int main(void) { return 0; }$/;" f typeref:typename:int ================================================ FILE: Tmain/filter-option.d/input.c ================================================ int main(void) { return 0; } ================================================ FILE: Tmain/filter-option.d/run.sh ================================================ #!/bin/sh # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 echo ./input.c | $CTAGS --quiet --options=NONE --filter echo ./input.c | $CTAGS --quiet --options=NONE --filter --output-format=xref ================================================ FILE: Tmain/filter-option.d/stdout-expected.txt ================================================ main ./input.c /^int main(void) { return 0; }$/;" f typeref:typename:int main function 1 ./input.c int main(void) { return 0; } ================================================ FILE: Tmain/fixed-field-handling-in-json-format.d/input.c ================================================ void main(void) {} ================================================ FILE: Tmain/fixed-field-handling-in-json-format.d/run.sh ================================================ # Copyright: 2021 Masatake YAMATO # License: GPL-2 . ../utils.sh CTAGS="$1" is_feature_available "${CTAGS}" json CTAGS="${CTAGS} --quiet --options=NONE" echo '# --output-format=json --fields=+n-P' ${CTAGS} --output-format=json --fields=+n-P -o - input.c echo '# --fields=+n-P --output-format=json' ${CTAGS} --fields=+n-P --output-format=json -o - input.c ================================================ FILE: Tmain/fixed-field-handling-in-json-format.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/fixed-field-handling-in-json-format.d/stdout-expected.txt ================================================ # --output-format=json --fields=+n-P {"_type": "tag", "name": "main", "path": "input.c", "line": 1, "typeref": "typename:void", "kind": "function"} # --fields=+n-P --output-format=json {"_type": "tag", "name": "main", "path": "input.c", "line": 1, "typeref": "typename:void", "kind": "function"} ================================================ FILE: Tmain/fixed-field-handling.d/input.c ================================================ void main(void) {} ================================================ FILE: Tmain/fixed-field-handling.d/run.sh ================================================ # Copyright: 2019 Masatake YAMATO # License: GPL-2 . ../utils.sh CTAGS="$1" is_feature_available "${CTAGS}" json CTAGS="${CTAGS} --quiet --options=NONE" echo '# writer=default' ${CTAGS} --machinable --list-fields | grep '^[NFP]' list_fields() { local f=$1 shift echo "# writer=$f $o" ${CTAGS} --output-format=$f --machinable $@ --list-fields | grep '^[NFP]' } for f in u-ctags e-ctags etags xref json; do list_fields $f done for f in xref json; do for o in N F P; do list_fields $f --fields=-$o done done for o in N F P; do O="--fields=-$o" echo "# writer=json $O" ${CTAGS} --output-format=json $O input.c O="--fields=$o" echo "# writer=json $O" ${CTAGS} --output-format=json $O input.c done O="--fields=" echo "# writer=json $O" ${CTAGS} --output-format=json $O input.c ================================================ FILE: Tmain/fixed-field-handling.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/fixed-field-handling.d/stdout-expected.txt ================================================ # writer=default N name yes NONE s-- yes rw 0 tag name F input yes NONE s-- yes r- 0 input file P pattern yes NONE s-b yes -- 0 pattern # writer=u-ctags N name yes NONE s-- yes rw 0 tag name F input yes NONE s-- yes r- 0 input file P pattern yes NONE s-b yes -- 0 pattern # writer=e-ctags N name yes NONE s-- yes rw 0 tag name F input yes NONE s-- yes r- 0 input file P pattern yes NONE s-b yes -- 0 pattern # writer=etags F input yes NONE s-- no r- 0 input file N name yes NONE s-- no rw 0 tag name P pattern yes NONE s-b no -- 0 pattern # writer=xref F input yes NONE s-- no r- 0 input file N name yes NONE s-- no rw 0 tag name P pattern yes NONE s-b no -- 0 pattern # writer=json F input yes NONE s-- no r- 0 input file N name yes NONE s-- no rw 0 tag name P pattern yes NONE s-b no -- 0 pattern # writer=xref N F input yes NONE s-- no r- 0 input file N name no NONE s-- no rw 0 tag name P pattern yes NONE s-b no -- 0 pattern # writer=xref F F input no NONE s-- no r- 0 input file N name yes NONE s-- no rw 0 tag name P pattern yes NONE s-b no -- 0 pattern # writer=xref P F input yes NONE s-- no r- 0 input file N name yes NONE s-- no rw 0 tag name P pattern no NONE s-b no -- 0 pattern # writer=json N F input yes NONE s-- no r- 0 input file N name no NONE s-- no rw 0 tag name P pattern yes NONE s-b no -- 0 pattern # writer=json F F input no NONE s-- no r- 0 input file N name yes NONE s-- no rw 0 tag name P pattern yes NONE s-b no -- 0 pattern # writer=json P F input yes NONE s-- no r- 0 input file N name yes NONE s-- no rw 0 tag name P pattern no NONE s-b no -- 0 pattern # writer=json --fields=-N {"_type": "tag", "path": "input.c", "pattern": "/^void main(void) {}$/", "typeref": "typename:void", "kind": "function"} # writer=json --fields=N {"_type": "tag", "name": "main"} # writer=json --fields=-F {"_type": "tag", "name": "main", "pattern": "/^void main(void) {}$/", "typeref": "typename:void", "kind": "function"} # writer=json --fields=F {"_type": "tag", "path": "input.c"} # writer=json --fields=-P {"_type": "tag", "name": "main", "path": "input.c", "typeref": "typename:void", "kind": "function"} # writer=json --fields=P {"_type": "tag", "pattern": "/^void main(void) {}$/"} # writer=json --fields= ================================================ FILE: Tmain/flags-fielddef-datatype.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/flags-fielddef-datatype.d/run.sh ================================================ # Copyright: 2023 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --langdef=FIELDTEST \ --_fielddef-FIELDTEST=strfield,"a field having string value"'{datatype=str}' \ --_fielddef-FIELDTEST=boolfield,"a field having boolean value"'{datatype=bool}' \ --_fielddef-FIELDTEST=intfield,"a field having integer value"'{datatype=int}' \ --_fielddef-FIELDTEST=strboolfield,"a field having string value or false"'{datatype=str+bool}' \ --_fielddef-FIELDTEST=deffield,"a field that type is not specified" \ --list-fields=FIELDTEST && \ ! ${CTAGS} --quiet --options=NONE --langdef=FIELDTEST \ --_fielddef-FIELDTEST=fooA,"unexpected data type"'{datatype=bar}' && ! ${CTAGS} --quiet --options=NONE --langdef=FIELDTEST \ --_fielddef-FIELDTEST=fooB,"unexpected data type"'{datatype=int+baz}' && ! ${CTAGS} --quiet --options=NONE --langdef=FIELDTEST \ --_fielddef-FIELDTEST=fooC,"unexpected data type"'{datatype=}' && ! ${CTAGS} --quiet --options=NONE --langdef=FIELDTEST \ --_fielddef-FIELDTEST=fooD,"unexpected data type"'{datatype=+baz}' && ! ${CTAGS} --quiet --options=NONE --langdef=FIELDTEST \ --_fielddef-FIELDTEST=fooE,"unexpected data type"'{datatype=bool+str}' ================================================ FILE: Tmain/flags-fielddef-datatype.d/stderr-expected.txt ================================================ ctags: unknown datatype for field "fooA": "bar" ctags: unknown datatype for field "fooB": "int+baz" ctags: no datatype given for field: "fooC" ctags: unknown datatype for field "fooD": "+baz" ctags: unknown datatype for field "fooE": "bool+str" ================================================ FILE: Tmain/flags-fielddef-datatype.d/stdout-expected.txt ================================================ #LETTER NAME ENABLED LANGUAGE JSTYPE FIXED OP VER DESCRIPTION - boolfield no FIELDTEST --b no rw 0 a field having boolean value - deffield no FIELDTEST s-- no -- 0 a field that type is not specified - intfield no FIELDTEST -i- no rw 0 a field having integer value - strboolfield no FIELDTEST s-b no rw 0 a field having string value or false - strfield no FIELDTEST s-- no rw 0 a field having string value ================================================ FILE: Tmain/force-initializing-option.d/README ================================================ This test case expects the exit status will be 0 if an erorr doesn't occur during initializing a parser. ================================================ FILE: Tmain/force-initializing-option.d/run.sh ================================================ #!/bin/sh # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --_fatal-warnings --_force-initializing --_force-quit=0 exit $? ================================================ FILE: Tmain/force-initializing-option.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/force-initializing-option.d/xit-expected.txt ================================================ 0 ================================================ FILE: Tmain/gcov-sandbox.d/exit-expected.txt ================================================ 1 ================================================ FILE: Tmain/gcov-sandbox.d/run.sh ================================================ #!/bin/sh # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh is_feature_available $CTAGS sandbox is_feature_available ${CTAGS} interactive is_feature_available ${CTAGS} gcov { echo '{"command":"generate-tags", "filename":"input.c", "size": 28}' echo 'int main(void) { return 0; }' } | $CTAGS --quiet --options=NONE --_interactive=sandbox exit $? ================================================ FILE: Tmain/gcov-sandbox.d/stderr-expected.txt ================================================ ctags: sandbox submode does not work if gcov is instrumented ================================================ FILE: Tmain/gcov-sandbox.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/generate-anon-ids.d/input0.c ================================================ struct { int x; } X; struct { int y; } Y; ================================================ FILE: Tmain/generate-anon-ids.d/input1.c ================================================ struct { int a; } A; struct { int b; } B; ================================================ FILE: Tmain/generate-anon-ids.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE -o - input0.c input1.c ================================================ FILE: Tmain/generate-anon-ids.d/stdout-expected.txt ================================================ A input1.c /^} A;$/;" v typeref:struct:__anon840121570108 B input1.c /^} B;$/;" v typeref:struct:__anon840121570208 X input0.c /^} X;$/;" v typeref:struct:__anon84011d160108 Y input0.c /^} Y;$/;" v typeref:struct:__anon84011d160208 __anon84011d160108 input0.c /^struct {$/;" s file: __anon84011d160208 input0.c /^struct {$/;" s file: __anon840121570108 input1.c /^struct {$/;" s file: __anon840121570208 input1.c /^struct {$/;" s file: a input1.c /^ int a;$/;" m struct:__anon840121570108 typeref:typename:int file: b input1.c /^ int b;$/;" m struct:__anon840121570208 typeref:typename:int file: x input0.c /^ int x;$/;" m struct:__anon84011d160108 typeref:typename:int file: y input0.c /^ int y;$/;" m struct:__anon84011d160208 typeref:typename:int file: ================================================ FILE: Tmain/getter-extras-field.d/input.unknown ================================================ e ================================================ FILE: Tmain/getter-extras-field.d/run.sh ================================================ # Copyright: 2021 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE -o - --options=x.ctags input.unknown ================================================ FILE: Tmain/getter-extras-field.d/stderr-expected.txt ================================================ true [/reference] true [/qualified /reference] true [/X.foo] true [/reference /X.foo] ================================================ FILE: Tmain/getter-extras-field.d/stdout-expected.txt ================================================ eCommon input.unknown /^e$/;" d extras:reference a.b.eCommon2 input.unknown /^e$/;" d extras:qualified,reference eLangspec input.unknown /^e$/;" d extras:foo eLangspec+Common input.unknown /^e$/;" d extras:reference,foo ================================================ FILE: Tmain/getter-extras-field.d/x.ctags ================================================ --sort=no --fields=+{extras} --langdef=X --map-X=.unknown --_tabledef-X=main --kinddef-X=d,def,definitions --_extradef-X=foo,... --extras-X=+{foo} --_extradef-X=bar,... --extras-X=-{bar} --_prelude-X={{ /maketag0 { /def 1 /start _matchloc _tag _commit } def /maketag { maketag0 pop } def /pc {pstack clear} def }} --_mtable-regex-X=main/(e)//{{ (eCommon) maketag0 dup /reference _markextra :extras pc (a.b.eCommon2) maketag0 dup dup /reference _markextra /qualified _markextra :extras pc (eLangspec) maketag0 dup /X.foo _markextra :extras pc (eLangspec+Common) maketag0 dup dup /X.foo _markextra /reference _markextra :extras pc }} ================================================ FILE: Tmain/input-encoding-option.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/input-encoding-option.d/input.java ================================================ class Foo { // FooNX public Foo() { // RXgN^ } } ================================================ FILE: Tmain/input-encoding-option.d/input.js ================================================ var a = 1; // ѿ ================================================ FILE: Tmain/input-encoding-option.d/run.sh ================================================ #!/bin/sh # Copyright: 2015 Yasuhiro MATSUMOTO # License: GPL-2 CTAGS=$1 BUILDDIR=$2 . ../utils.sh if ${CTAGS} --quiet --options=NONE --list-features | grep -q iconv; then check_encoding shift_jis check_encoding euc-jp check_encoding utf-8 if ${CTAGS} --quiet --options=NONE \ --pseudo-tags=-TAG_PROC_CWD \ --pseudo-tags=-TAG_PROGRAM_VERSION \ --pseudo-tags=-TAG_KIND_DESCRIPTION \ --pseudo-tags=-TAG_EXTRA_DESCRIPTION \ --pseudo-tags=-TAG_FIELD_DESCRIPTION \ --pseudo-tags=-TAG_ROLE_DESCRIPTION \ --pseudo-tags=-TAG_PARSER_VERSION \ --pseudo-tags=-TAG_OUTPUT_VERSION \ --input-encoding=utf-8 --input-encoding-java=shift_jis --input-encoding-javascript=euc-jp \ -o ${BUILDDIR}/tags \ input.js input.java ; then remove_commit_id ${BUILDDIR}/tags fi exit $? else skip "iconv feature is not available" fi ================================================ FILE: Tmain/input-encoding-option.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/input-encoding-option.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/input-encoding-option.d/tags-expected.txt ================================================ !_TAG_FILE_ENCODING UTF-8 // !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ Foo input.java /^ public Foo() { \/\/ コンストラクタ$/;" m class:Foo Foo input.java /^class Foo { \/\/ Fooクラス$/;" c a input.js /^var a = 1; \/\/ 変数初期化$/;" v ================================================ FILE: Tmain/interactive-mode.d/run.sh ================================================ # Copyright: 2016 Aman Gupta # License: GPL-2 CTAGS=$1 . ../utils.sh is_feature_available ${CTAGS} interactive # It seems that the output format is slightly different between libjansson versions s() { sed -e s/':"'/': "'/g | jdropver } trim_errno() { # The value errno depends on the platform. sed -e s/' "errno": [0-9]*,'// } CTAGS="$CTAGS --options=NONE" echo identification message on startup echo ======================================= ${CTAGS} --_interactive < /dev/null |s echo echo error on invalid command echo ======================================= echo '{"command":"foobar"}' | ${CTAGS} --_interactive |s echo echo error on missing arguments echo ======================================= echo '{"command":"generate-tags"}' | ${CTAGS} --_interactive |s echo echo error on invalid file echo ======================================= echo '{"command":"generate-tags", "filename":"test.foo"}' | ${CTAGS} --_interactive |s |trim_errno echo echo generate tags from file echo ======================================= echo '{"command":"generate-tags", "filename":"test.rb"}' | ${CTAGS} --_interactive |s echo echo process multiple commands echo ======================================= ( echo '{"command":"generate-tags", "filename":"test.rb"}' echo '{"command":"generate-tags", "filename":"test.c"}' ) | ${CTAGS} --_interactive |s echo echo generate tags from data echo ======================================= size=$(filesize test.rb) ( echo '{"command":"generate-tags", "filename":"foobar.rb", "size":'$size'}' cat test.rb ) | ${CTAGS} --_interactive |s ================================================ FILE: Tmain/interactive-mode.d/stdout-expected.txt ================================================ identification message on startup ======================================= {"_type": "program", "name": "Universal Ctags"} error on invalid command ======================================= {"_type": "program", "name": "Universal Ctags"} {"_type": "error", "message": "unknown command name", "fatal": true} error on missing arguments ======================================= {"_type": "program", "name": "Universal Ctags"} {"_type": "error", "message": "invalid generate-tags request", "fatal": true} error on invalid file ======================================= {"_type": "program", "name": "Universal Ctags"} {"_type": "error", "message": "cannot open input file \"test.foo\"", "warning": true, "perror": "No such file or directory"} {"_type": "completed", "command": "generate-tags"} generate tags from file ======================================= {"_type": "program", "name": "Universal Ctags"} {"_type": "tag", "name": "Test", "path": "test.rb", "pattern": "/^class Test$/", "kind": "class"} {"_type": "tag", "name": "foobar", "path": "test.rb", "pattern": "/^ def foobar$/", "kind": "method", "scope": "Test", "scopeKind": "class"} {"_type": "tag", "name": "baz", "path": "test.rb", "pattern": "/^ def baz(a=1)$/", "kind": "method", "scope": "Test", "scopeKind": "class"} {"_type": "completed", "command": "generate-tags"} process multiple commands ======================================= {"_type": "program", "name": "Universal Ctags"} {"_type": "tag", "name": "Test", "path": "test.rb", "pattern": "/^class Test$/", "kind": "class"} {"_type": "tag", "name": "foobar", "path": "test.rb", "pattern": "/^ def foobar$/", "kind": "method", "scope": "Test", "scopeKind": "class"} {"_type": "tag", "name": "baz", "path": "test.rb", "pattern": "/^ def baz(a=1)$/", "kind": "method", "scope": "Test", "scopeKind": "class"} {"_type": "completed", "command": "generate-tags"} {"_type": "tag", "name": "say_hello", "path": "test.c", "pattern": "/^void say_hello() {$/", "typeref": "typename:void", "kind": "function"} {"_type": "tag", "name": "main", "path": "test.c", "pattern": "/^int main(int argc, char **argv) {$/", "typeref": "typename:int", "kind": "function"} {"_type": "completed", "command": "generate-tags"} generate tags from data ======================================= {"_type": "program", "name": "Universal Ctags"} {"_type": "tag", "name": "Test", "path": "foobar.rb", "pattern": "/^class Test$/", "kind": "class"} {"_type": "tag", "name": "foobar", "path": "foobar.rb", "pattern": "/^ def foobar$/", "kind": "method", "scope": "Test", "scopeKind": "class"} {"_type": "tag", "name": "baz", "path": "foobar.rb", "pattern": "/^ def baz(a=1)$/", "kind": "method", "scope": "Test", "scopeKind": "class"} {"_type": "completed", "command": "generate-tags"} ================================================ FILE: Tmain/interactive-mode.d/test.c ================================================ #include void say_hello() { printf("hello world\n"); } int main(int argc, char **argv) { say_hello(); } ================================================ FILE: Tmain/interactive-mode.d/test.rb ================================================ class Test def foobar end def baz(a=1) end end ================================================ FILE: Tmain/interactive-notice-output.d/input.cst ================================================ n ================================================ FILE: Tmain/interactive-notice-output.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh # It seems that the output format is slightly different between libjansson versions s() { sed -e s/':"'/': "'/g | jdropver } if is_feature_available ${CTAGS} json; then echo '{"command":"generate-tags", "filename":"input.cst"}' | $CTAGS --options=NONE --pseudo-tags=-TAG_PROGRAM_VERSION \ --map-CTagsSelfTest=.cst --_interactive |s echo '{"command":"generate-tags", "filename":"input.cst"}' | $CTAGS --quiet --options=NONE --pseudo-tags=-TAG_PROGRAM_VERSION \ --map-CTagsSelfTest=.cst --_interactive |s fi ================================================ FILE: Tmain/interactive-notice-output.d/stderr-expected.txt ================================================ ctags: Notice: No options will be read from files or environment ================================================ FILE: Tmain/interactive-notice-output.d/stdout-expected.txt ================================================ {"_type": "program", "name": "Universal Ctags"} {"_type": "error", "message": "notice output for testing: triggerNotice", "notice": true} {"_type": "completed", "command": "generate-tags"} {"_type": "program", "name": "Universal Ctags"} {"_type": "completed", "command": "generate-tags"} ================================================ FILE: Tmain/interactive-option-write-to-file.d/run.sh ================================================ #!/bin/sh # Copyright: 2017 Masatake YAMATO # Copyright: 2016 Aman Gupta # License: GPL-2 CTAGS=$1 . ../utils.sh is_feature_available ${CTAGS} interactive # It seems that the output format is slightly different between libjansson versions s() { sed -e s/':"'/': "'/g | jdropver } O=/tmp/ctags-tmain-$$.txt echo '{"command":"generate-tags", "filename":"test.rb"}' | ${CTAGS} --quiet --options=NONE --_interactive -o ${O} |s rm -f ${O} ================================================ FILE: Tmain/interactive-option-write-to-file.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/interactive-option-write-to-file.d/stdout-expected.txt ================================================ {"_type": "program", "name": "Universal Ctags"} {"_type": "tag", "name": "Test", "path": "test.rb", "pattern": "/^class Test$/", "kind": "class"} {"_type": "tag", "name": "foobar", "path": "test.rb", "pattern": "/^ def foobar$/", "kind": "method", "scope": "Test", "scopeKind": "class"} {"_type": "tag", "name": "baz", "path": "test.rb", "pattern": "/^ def baz(a=1)$/", "kind": "method", "scope": "Test", "scopeKind": "class"} {"_type": "completed", "command": "generate-tags"} ================================================ FILE: Tmain/interactive-option-write-to-file.d/test.rb ================================================ class Test def foobar end def baz(a=1) end end ================================================ FILE: Tmain/interactive-resource-management.d/input.c ================================================ int main(void) { } ================================================ FILE: Tmain/interactive-resource-management.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 BUILDDIR=$2 . ../utils.sh if is_feature_available ${CTAGS} json; then exit_status_for_input_c $CTAGS NONE --output-format=json -o - --sort=no exit_status_for_input_c $CTAGS $BUILDDIR/tags.json --output-format=json -o $BUILDDIR/tags.json --sort=no exit_status_for_input_c $CTAGS $BUILDDIR/tags.json --output-format=json -o $BUILDDIR/tags.json exit_status_for_input_c $CTAGS NONE --output-format=json -o - fi ================================================ FILE: Tmain/interactive-resource-management.d/stdout-expected.txt ================================================ --output-format=json -o - --sort=no => ok --output-format=json -o tags.json --sort=no => ok --output-format=json -o tags.json => ok --output-format=json -o - => ok ================================================ FILE: Tmain/invalid-encoding-option.d/exit-expected.txt ================================================ 1 ================================================ FILE: Tmain/invalid-encoding-option.d/input.java ================================================ class Foo { // FooNX public Foo() { // RXgN^ } } ================================================ FILE: Tmain/invalid-encoding-option.d/input.js ================================================ var a = 1; // ѿ ================================================ FILE: Tmain/invalid-encoding-option.d/run.sh ================================================ #!/bin/sh # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh if ${CTAGS} --quiet --options=NONE --list-features | grep -q iconv; then check_encoding euc-jp ${CTAGS} --quiet --options=NONE --input-encoding-java=invalid --input-encoding-javascript=euc-jp -o - input.js input.java exit $? else skip "iconv feature is not available" fi ================================================ FILE: Tmain/invalid-encoding-option.d/stderr-expected.txt ================================================ ctags: failed opening encoding from 'invalid' to 'UTF-8' ================================================ FILE: Tmain/invalid-encoding-option.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/json-output-backslash-in-input-field.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/json-output-backslash-in-input-field.d/input.php ================================================ /* EMPTY */ ================================================ FILE: Tmain/json-output-backslash-in-input-field.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh is_feature_available ${CTAGS} json O="--quiet --options=NONE " ${CTAGS} $O \ --extras=+p --pseudo-tags=TAG_KIND_SEPARATOR \ -o - \ --output-format=json input.php \ | grep '"nn"' | grep -v JSON_OUTPUT_VERSION ================================================ FILE: Tmain/json-output-backslash-in-input-field.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/json-output-backslash-in-input-field.d/stdout-expected.txt ================================================ {"_type": "ptag", "name": "TAG_KIND_SEPARATOR", "parserName": "PHP", "path": "\\", "pattern": "nn"} ================================================ FILE: Tmain/json-output-for-broken-input.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/json-output-for-broken-input.d/input.cs ================================================ aá:{0} ================================================ FILE: Tmain/json-output-for-broken-input.d/run.sh ================================================ # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh if is_feature_available "${CTAGS}" json; then ${CTAGS} --quiet --options=NONE --output-format=json -o - ./input.cs fi ================================================ FILE: Tmain/json-output-for-broken-input.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/json-output-for-broken-input.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/json-output-format.d/input.1 ================================================ .SH " N A M E " ================================================ FILE: Tmain/json-output-format.d/input.c ================================================ #include static int foo (void) { return 1; } int main(void) { return foo(); } ================================================ FILE: Tmain/json-output-format.d/input.go ================================================ package main func main() { } ================================================ FILE: Tmain/json-output-format.d/input.py ================================================ class Foo: def doIt(): pass ================================================ FILE: Tmain/json-output-format.d/run.sh ================================================ # Copyright: 2016 Aman Gupta # License: GPL-2 CTAGS=$1 . ../utils.sh if is_feature_available "${CTAGS}" json; then { run_with_format json --languages=+man --fields=-T run_with_format json --languages=+man --fields="*"-T run_with_format json --languages=+man --fields="*"-T --extras='*' } | cat \ | grep -v TAG_PROGRAM_VERSION \ | grep -v TAG_OUTPUT_VERSION \ | grep -v TAG_OUTPUT_FILESEP \ | grep -v TAG_PROC_CWD fi ================================================ FILE: Tmain/json-output-format.d/stdout-expected.txt ================================================ # json --languages=+man --fields=-T {"_type": "tag", "name": "Foo", "path": "input.py", "pattern": "/^class Foo:$/", "kind": "class"} {"_type": "tag", "name": "N\tA\tM\tE", "path": "input.1", "pattern": "/^.SH \"\tN\tA\tM\tE\t\"$/", "kind": "section"} {"_type": "tag", "name": "doIt", "path": "input.py", "pattern": "/^ def doIt():$/", "kind": "member", "scope": "Foo", "scopeKind": "class"} {"_type": "tag", "name": "foo", "path": "input.c", "pattern": "/^static int foo (void)$/", "file": true, "typeref": "typename:int", "kind": "function"} {"_type": "tag", "name": "main", "path": "input.c", "pattern": "/^main(void)$/", "typeref": "typename:int", "kind": "function"} {"_type": "tag", "name": "main", "path": "input.go", "pattern": "/^func main() {$/", "kind": "func", "scope": "main", "scopeKind": "package"} {"_type": "tag", "name": "main", "path": "input.go", "pattern": "/^package main$/", "kind": "package"} # json --languages=+man --fields=*-T {"_type": "tag", "name": "Foo", "path": "input.py", "pattern": "/^class Foo:$/", "language": "Python", "line": 1, "kind": "class", "inherits": false, "access": "public", "roles": "def", "end": 3} {"_type": "tag", "name": "N\tA\tM\tE", "path": "input.1", "pattern": "/^.SH \"\tN\tA\tM\tE\t\"$/", "language": "Man", "line": 1, "kind": "section", "roles": "def", "end": 1} {"_type": "tag", "name": "doIt", "path": "input.py", "pattern": "/^ def doIt():$/", "language": "Python", "line": 2, "kind": "member", "access": "public", "signature": "()", "scope": "Foo", "scopeKind": "class", "roles": "def", "end": 3} {"_type": "tag", "name": "foo", "path": "input.c", "pattern": "/^static int foo (void)$/", "file": true, "language": "C", "line": 3, "typeref": "typename:int", "kind": "function", "signature": "(void)", "roles": "def", "extras": "fileScope", "end": 6} {"_type": "tag", "name": "main", "path": "input.c", "pattern": "/^main(void)$/", "language": "C", "line": 9, "typeref": "typename:int", "kind": "function", "signature": "(void)", "roles": "def", "end": 12} {"_type": "tag", "name": "main", "path": "input.go", "pattern": "/^func main() {$/", "language": "Go", "line": 3, "kind": "func", "signature": "()", "scope": "main", "scopeKind": "package", "roles": "def", "end": 4} {"_type": "tag", "name": "main", "path": "input.go", "pattern": "/^package main$/", "language": "Go", "line": 1, "kind": "package", "roles": "def"} # json --languages=+man --fields=*-T --extras=* {"_type": "ptag", "name": "JSON_OUTPUT_VERSION", "path": "1.0", "pattern": "in development"} {"_type": "ptag", "name": "TAG_EXTRA_DESCRIPTION", "path": "anonymous", "pattern": "Include tags for non-named objects like lambda"} {"_type": "ptag", "name": "TAG_EXTRA_DESCRIPTION", "path": "fileScope", "pattern": "Include tags of file scope"} {"_type": "ptag", "name": "TAG_EXTRA_DESCRIPTION", "path": "guest", "pattern": "Include tags generated by guest parsers"} {"_type": "ptag", "name": "TAG_EXTRA_DESCRIPTION", "path": "inputFile", "pattern": "Include an entry for the base file name of every input file"} {"_type": "ptag", "name": "TAG_EXTRA_DESCRIPTION", "path": "nulltag", "pattern": "Include tags with empty strings as their names"} {"_type": "ptag", "name": "TAG_EXTRA_DESCRIPTION", "path": "pseudo", "pattern": "Include pseudo tags"} {"_type": "ptag", "name": "TAG_EXTRA_DESCRIPTION", "path": "qualified", "pattern": "Include an extra class-qualified tag entry for each tag"} {"_type": "ptag", "name": "TAG_EXTRA_DESCRIPTION", "path": "reference", "pattern": "Include reference tags"} {"_type": "ptag", "name": "TAG_EXTRA_DESCRIPTION", "path": "subparser", "pattern": "Include tags generated by subparsers"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "parserName": "Go", "path": "package", "pattern": "the real package specified by the package name"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "parserName": "Go", "path": "packageName", "pattern": "the name for referring the package"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "parserName": "Python", "path": "nameref", "pattern": "the original name for the tag"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "path": "access", "pattern": "Access (or export) of class members"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "path": "compact", "pattern": "compact input line (used only in xref output)"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "path": "end", "pattern": "end lines of various items"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "path": "extras", "pattern": "Extra tag type information"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "path": "file", "pattern": "File-restricted scoping"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "path": "implementation", "pattern": "Implementation information"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "path": "inherits", "pattern": "Inheritance information"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "path": "input", "pattern": "input file"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "path": "kind", "pattern": "[tags output] prepend \"kind:\" to k/ (or K/) field output, [xref and json output] kind in long-name form"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "path": "language", "pattern": "Language of input file containing tag"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "path": "line", "pattern": "Line number of tag definition"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "path": "name", "pattern": "tag name"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "path": "nth", "pattern": "the order in the parent scope"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "path": "pattern", "pattern": "pattern"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "path": "roles", "pattern": "Roles"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "path": "scope", "pattern": "[tags output] prepend \"scope:\" key to s/scope field output, [xref and json output] the same as s/ field"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "path": "scopeKind", "pattern": "[tags output] no effect, [xref and json output] kind of scope in long-name form"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "path": "signature", "pattern": "Signature of routine (e.g. prototype or parameter list)"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "path": "typeref", "pattern": "Type and name of a variable or typedef"} {"_type": "ptag", "name": "TAG_FIELD_DESCRIPTION", "path": "xpath", "pattern": "xpath for the tag"} {"_type": "ptag", "name": "TAG_FILE_SORTED", "path": "1", "pattern": "0=unsorted, 1=sorted, 2=foldcase"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "C", "path": "d,macro", "pattern": "macro definitions"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "C", "path": "e,enumerator", "pattern": "enumerators (values inside an enumeration)"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "C", "path": "f,function", "pattern": "function definitions"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "C", "path": "g,enum", "pattern": "enumeration names"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "C", "path": "h,header", "pattern": "included header files"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "C", "path": "m,member", "pattern": "struct, and union members"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "C", "path": "s,struct", "pattern": "structure names"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "C", "path": "t,typedef", "pattern": "typedefs"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "C", "path": "u,union", "pattern": "union names"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "C", "path": "v,variable", "pattern": "variable definitions"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Go", "path": "M,anonMember", "pattern": "struct anonymous members"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Go", "path": "P,packageName", "pattern": "name for specifying imported package"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Go", "path": "Y,unknown", "pattern": "unknown"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Go", "path": "a,talias", "pattern": "type aliases"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Go", "path": "c,const", "pattern": "constants"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Go", "path": "f,func", "pattern": "functions"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Go", "path": "i,interface", "pattern": "interfaces"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Go", "path": "m,member", "pattern": "struct members"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Go", "path": "n,methodSpec", "pattern": "interface method specification"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Go", "path": "p,package", "pattern": "packages"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Go", "path": "s,struct", "pattern": "structs"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Go", "path": "t,type", "pattern": "types"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Go", "path": "v,var", "pattern": "variables"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Man", "path": "S,subsection", "pattern": "sub sections"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Man", "path": "s,section", "pattern": "sections"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Man", "path": "t,title", "pattern": "titles"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Python", "path": "I,namespace", "pattern": "name referring a module defined in other file"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Python", "path": "Y,unknown", "pattern": "name referring a class/variable/function/module defined in other module"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Python", "path": "c,class", "pattern": "classes"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Python", "path": "f,function", "pattern": "functions"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Python", "path": "i,module", "pattern": "modules"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Python", "path": "m,member", "pattern": "class members"} {"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Python", "path": "v,variable", "pattern": "variables"} {"_type": "ptag", "name": "TAG_OUTPUT_EXCMD", "path": "mixed", "pattern": "number, pattern, mixed, or combineV2"} {"_type": "ptag", "name": "TAG_PARSER_VERSION", "parserName": "C", "path": "2.2", "pattern": "current.age"} {"_type": "ptag", "name": "TAG_PARSER_VERSION", "parserName": "Go", "path": "1.1", "pattern": "current.age"} {"_type": "ptag", "name": "TAG_PARSER_VERSION", "parserName": "Man", "path": "0.0", "pattern": "current.age"} {"_type": "ptag", "name": "TAG_PARSER_VERSION", "parserName": "Python", "path": "1.1", "pattern": "current.age"} {"_type": "ptag", "name": "TAG_PATTERN_LENGTH_LIMIT", "path": "96", "pattern": "0 for no limit"} {"_type": "ptag", "name": "TAG_PROGRAM_AUTHOR", "path": "Universal Ctags Team", "pattern": ""} {"_type": "ptag", "name": "TAG_PROGRAM_NAME", "path": "Universal Ctags", "pattern": "Derived from Exuberant Ctags"} {"_type": "ptag", "name": "TAG_PROGRAM_URL", "path": "https://ctags.io/", "pattern": "official site"} {"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "C", "kindName": "function", "path": "foreigncall", "pattern": "called in foreign languages"} {"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "C", "kindName": "function", "path": "foreigndecl", "pattern": "declared in foreign languages"} {"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "C", "kindName": "header", "path": "local", "pattern": "local header"} {"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "C", "kindName": "header", "path": "system", "pattern": "system header"} {"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "C", "kindName": "macro", "path": "undef", "pattern": "undefined"} {"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "C", "kindName": "struct", "path": "foreigndecl", "pattern": "declared in foreign languages"} {"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "Go", "kindName": "package", "path": "imported", "pattern": "imported package"} {"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "Go", "kindName": "unknown", "path": "receiverType", "pattern": "receiver type"} {"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "Python", "kindName": "function", "path": "entryPoint", "pattern": "specified as an entry point"} {"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "Python", "kindName": "module", "path": "entryPoint", "pattern": "specified as a module of an entry point"} {"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "Python", "kindName": "module", "path": "imported", "pattern": "imported modules"} {"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "Python", "kindName": "module", "path": "indirectlyImported", "pattern": "module imported in alternative name"} {"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "Python", "kindName": "module", "path": "namespace", "pattern": "namespace from where classes/variables/functions are imported"} {"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "Python", "kindName": "unknown", "path": "imported", "pattern": "imported from the other module"} {"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "Python", "kindName": "unknown", "path": "indirectlyImported", "pattern": "classes/variables/functions/modules imported in alternative name"} {"_type": "tag", "name": "Foo", "path": "input.py", "pattern": "/^class Foo:$/", "language": "Python", "line": 1, "kind": "class", "inherits": false, "access": "public", "roles": "def", "end": 3} {"_type": "tag", "name": "Foo.doIt", "path": "input.py", "pattern": "/^ def doIt():$/", "language": "Python", "line": 2, "kind": "member", "access": "public", "signature": "()", "scope": "Foo", "scopeKind": "class", "roles": "def", "extras": "qualified", "end": 3} {"_type": "tag", "name": "N\tA\tM\tE", "path": "input.1", "pattern": "/^.SH \"\tN\tA\tM\tE\t\"$/", "language": "Man", "line": 1, "kind": "section", "roles": "def", "end": 1} {"_type": "tag", "name": "doIt", "path": "input.py", "pattern": "/^ def doIt():$/", "language": "Python", "line": 2, "kind": "member", "access": "public", "signature": "()", "scope": "Foo", "scopeKind": "class", "roles": "def", "end": 3} {"_type": "tag", "name": "foo", "path": "input.c", "pattern": "/^static int foo (void)$/", "file": true, "language": "C", "line": 3, "typeref": "typename:int", "kind": "function", "signature": "(void)", "roles": "def", "extras": "fileScope", "end": 6} {"_type": "tag", "name": "input.1", "path": "input.1", "pattern": false, "language": "Man", "line": 1, "kind": "file", "roles": "def", "extras": "inputFile", "end": 1} {"_type": "tag", "name": "input.c", "path": "input.c", "pattern": false, "language": "C", "line": 1, "kind": "file", "roles": "def", "extras": "inputFile", "end": 12} {"_type": "tag", "name": "input.go", "path": "input.go", "pattern": false, "language": "Go", "line": 1, "kind": "file", "roles": "def", "extras": "inputFile", "end": 4} {"_type": "tag", "name": "input.py", "path": "input.py", "pattern": false, "language": "Python", "line": 1, "kind": "file", "roles": "def", "extras": "inputFile", "end": 3} {"_type": "tag", "name": "main", "path": "input.c", "pattern": "/^main(void)$/", "language": "C", "line": 9, "typeref": "typename:int", "kind": "function", "signature": "(void)", "roles": "def", "end": 12} {"_type": "tag", "name": "main", "path": "input.go", "pattern": "/^func main() {$/", "language": "Go", "line": 3, "kind": "func", "signature": "()", "scope": "main", "scopeKind": "package", "roles": "def", "end": 4} {"_type": "tag", "name": "main", "path": "input.go", "pattern": "/^package main$/", "language": "Go", "line": 1, "kind": "package", "roles": "def"} {"_type": "tag", "name": "main.main", "path": "input.go", "pattern": "/^func main() {$/", "language": "Go", "line": 3, "kind": "func", "signature": "()", "scope": "main", "scopeKind": "package", "roles": "def", "extras": "qualified", "end": 4} {"_type": "tag", "name": "stdio.h", "path": "input.c", "pattern": "/^#include /", "language": "C", "line": 1, "kind": "header", "roles": "system", "extras": "reference"} ================================================ FILE: Tmain/json-output-much-parser-fields.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/json-output-much-parser-fields.d/input.h ================================================ @protocol V (V(V(V(V(V(V /* Takne from #2053 submitted by @chrismwendt */ ================================================ FILE: Tmain/json-output-much-parser-fields.d/run.sh ================================================ # Copyright: 2019 Masatake YAMATO # License: GPL-2 # # This is crash test. # The input is broken so the we have no expectation for output. # CTAGS=$1 . ../utils.sh is_feature_available ${CTAGS} json $CTAGS --options=NONE --output-format=json input.h ================================================ FILE: Tmain/json-output-ptag-in-list-extras.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh is_feature_available ${CTAGS} json O=/tmp/ctags-tmain-$$ echo '#' json regular file "${CTAGS}" --quiet --options=NONE --output-format=json -o $O --list-extras | grep pseudo echo '#' json - "${CTAGS}" --quiet --options=NONE --output-format=json -o - --list-extras | grep pseudo echo '#' json NOTHING "${CTAGS}" --quiet --options=NONE --output-format=json --list-extras | grep pseudo rm -f $O ================================================ FILE: Tmain/json-output-ptag-in-list-extras.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/json-output-ptag-in-list-extras.d/stdout-expected.txt ================================================ # json regular file p pseudo yes NONE no 0 Include pseudo tags # json - p pseudo no NONE no 0 Include pseudo tags # json NOTHING p pseudo no NONE no 0 Include pseudo tags ================================================ FILE: Tmain/json-output-to-file.d/input.c ================================================ #include static int foo (void) { return 1; } int main(void) { return foo(); } ================================================ FILE: Tmain/json-output-to-file.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh O=/tmp/ctags-tmain-$$.json is_feature_available "${CTAGS}" json $CTAGS --quiet --options=NONE --extras=-p --output-format=json -f ${O} input.c > /dev/null && cat ${O} s=$? rm -f ${O} exit $s ================================================ FILE: Tmain/json-output-to-file.d/stdout-expected.txt ================================================ {"_type": "tag", "name": "foo", "path": "input.c", "pattern": "/^static int foo (void)$/", "file": true, "typeref": "typename:int", "kind": "function"} {"_type": "tag", "name": "main", "path": "input.c", "pattern": "/^main(void)$/", "typeref": "typename:int", "kind": "function"} ================================================ FILE: Tmain/json-output-typed-fields.d/input.c ================================================ static int local; int global; ================================================ FILE: Tmain/json-output-typed-fields.d/input.ctst ================================================ f ================================================ FILE: Tmain/json-output-typed-fields.d/input.rst ================================================ ============================================== TITLE ============================================== section ------- ================================================ FILE: Tmain/json-output-typed-fields.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh if is_feature_available "${CTAGS}" json; then ${CTAGS} --quiet --options=NONE -o - \ --output-format=json \ --language-force=CTagsSelfTest input.ctst ${CTAGS} --quiet --options=NONE -o - \ --output-format=json \ --fields-RestructuredText=+'{overline}' input.rst ${CTAGS} --quiet --options=NONE -o - \ --output-format=json \ input.c fi ================================================ FILE: Tmain/json-output-typed-fields.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/json-output-typed-fields.d/stdout-expected.txt ================================================ {"_type": "tag", "name": "atag", "path": "input.ctst", "pattern": "/^f$/", "kind": "fieldMaker"} {"_type": "tag", "name": "btag", "path": "input.ctst", "pattern": "/^f$/", "kind": "fieldMaker", "bField": true} {"_type": "tag", "name": "ctag", "path": "input.ctst", "pattern": "/^f$/", "kind": "fieldMaker", "bField": true} {"_type": "tag", "name": "dtag", "path": "input.ctst", "pattern": "/^f$/", "kind": "fieldMaker", "sbField": "val"} {"_type": "tag", "name": "etag", "path": "input.ctst", "pattern": "/^f$/", "kind": "fieldMaker", "sbField": false} {"_type": "tag", "name": "ftag", "path": "input.ctst", "pattern": "/^f$/", "kind": "fieldMaker", "sField": "val"} {"_type": "tag", "name": "gtag", "path": "input.ctst", "pattern": "/^f$/", "kind": "fieldMaker", "sField": ""} {"_type": "tag", "name": "htag", "path": "input.ctst", "pattern": "/^f$/", "kind": "fieldMaker", "iField": 23} {"_type": "tag", "name": "itag", "path": "input.ctst", "pattern": "/^f$/", "kind": "fieldMaker", "iField": -3} {"_type": "tag", "name": "jtag", "path": "input.ctst", "pattern": "/^f$/", "kind": "fieldMaker", "iField": 1} {"_type": "tag", "name": "ktag", "path": "input.ctst", "pattern": "/^f$/", "kind": "fieldMaker", "iField": 0} {"_type": "tag", "name": "TITLE", "path": "input.rst", "pattern": "/^TITLE$/", "kind": "title", "overline": true} {"_type": "tag", "name": "section", "path": "input.rst", "pattern": "/^section$/", "kind": "subtitle", "scope": "TITLE", "scopeKind": "title"} {"_type": "tag", "name": "global", "path": "input.c", "pattern": "/^int global;$/", "typeref": "typename:int", "kind": "variable"} {"_type": "tag", "name": "local", "path": "input.c", "pattern": "/^static int local;$/", "file": true, "typeref": "typename:int", "kind": "variable"} ================================================ FILE: Tmain/json-parser-limit-recursion.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/json-parser-limit-recursion.d/input512-one.json ================================================ [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ {"depth_pre": 511}, [ {"depth": 512} ], {"depth_post": 511} ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ================================================ FILE: Tmain/json-parser-limit-recursion.d/input512-two.json ================================================ [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ {"depth_pre": 511}, {"two_pre": 511}, [ {"depth": 512}, {"two": 512} ], {"depth_post": 511}, {"two_post": 511}, ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ================================================ FILE: Tmain/json-parser-limit-recursion.d/input513-one.json ================================================ [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [ {"depth_pre": 512}, [ {"depth": 513} ], {"depth_post": 512} ] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ================================================ FILE: Tmain/json-parser-limit-recursion.d/input513-two.json ================================================ [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [ {"depth_pre": 512}, {"two_pre": 512}, [ {"depth": 513}, {"two": 513} ], {"depth_post": 512}, {"two_post": 512}, ] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ================================================ FILE: Tmain/json-parser-limit-recursion.d/run.sh ================================================ # Copyright: 2019 Masatake YAMATO # License: GPL-2 CTAGS=$1 O="--options=NONE --sort=no -o - --kinds-JSON=-ao" echo '# depth: 512, items: 1' && echo '# depth: 512, items: 1' 1>&2 && ${CTAGS} --quiet $O input512-one.json && echo '# depth: 512, items: 2' && echo '# depth: 512, items: 2' 1>&2 && ${CTAGS} --quiet $O input512-two.json && echo '# depth: 513, items: 1' && echo '# depth: 513, items: 1' 1>&2 && ${CTAGS} --quiet $O input513-one.json && echo '# depth: 513, items: 2' && echo '# depth: 513, items: 2' 1>&2 && ${CTAGS} --quiet $O input513-two.json && echo '# depth: 513, items: 1, NO QUIET' && echo '# depth: 513, items: 1, NO QUIET' 1>&2 && ${CTAGS} $O input513-one.json && echo '# depth: 513, items: 2, NO QUIET' && echo '# depth: 513, items: 2, NO QUIET' 1>&2 && ${CTAGS} $O input513-two.json ================================================ FILE: Tmain/json-parser-limit-recursion.d/stderr-expected.txt ================================================ # depth: 512, items: 1 # depth: 512, items: 2 # depth: 513, items: 1 # depth: 513, items: 2 # depth: 513, items: 1, NO QUIET ctags: Notice: No options will be read from files or environment ctags: Notice: Terminate parsing: too deep brackets recursion in input513-one.json at 5 # depth: 513, items: 2, NO QUIET ctags: Notice: No options will be read from files or environment ctags: Notice: Terminate parsing: too deep brackets recursion in input513-two.json at 6 ================================================ FILE: Tmain/json-parser-limit-recursion.d/stdout-expected.txt ================================================ # depth: 512, items: 1 depth_pre input512-one.json /^{"depth_pre": 511},$/;" n object:0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 depth input512-one.json /^{"depth": 512}$/;" n object:0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0 depth_post input512-one.json /^{"depth_post": 511}$/;" n object:0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2 # depth: 512, items: 2 depth_pre input512-two.json /^{"depth_pre": 511},$/;" n object:0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 two_pre input512-two.json /^{"two_pre": 511},$/;" n object:0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1 depth input512-two.json /^{"depth": 512},$/;" n object:0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0 two input512-two.json /^{"two": 512}$/;" n object:0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.1 depth_post input512-two.json /^{"depth_post": 511},$/;" n object:0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.3 two_post input512-two.json /^{"two_post": 511},$/;" n object:0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.4 # depth: 513, items: 1 depth_pre input513-one.json /^{"depth_pre": 512},$/;" n object:0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 # depth: 513, items: 2 depth_pre input513-two.json /^{"depth_pre": 512},$/;" n object:0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 two_pre input513-two.json /^{"two_pre": 512},$/;" n object:0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1 # depth: 513, items: 1, NO QUIET depth_pre input513-one.json /^{"depth_pre": 512},$/;" n object:0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 # depth: 513, items: 2, NO QUIET depth_pre input513-two.json /^{"depth_pre": 512},$/;" n object:0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 two_pre input513-two.json /^{"two_pre": 512},$/;" n object:0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1 ================================================ FILE: Tmain/kind-abnormal-spec.d/input.x ================================================ @ L ================================================ FILE: Tmain/kind-abnormal-spec.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 O="--quiet --options=NONE" echo '# list kinds' ${CTAGS} ${O} --languages=+CTagsSelfTest --list-kinds=CTagsSelfTest | tr '\0' '_' | grep -v seccomp echo echo '# list kinds-full' ${CTAGS} ${O} --languages=+CTagsSelfTest --list-kinds-full=CTagsSelfTest | tr '\0' '_' | grep -v seccomp echo echo '# +K' ${CTAGS} ${O} --languages=+CTagsSelfTest --language-force=CTagsSelfTest --fields=+K -o - input.x echo echo '# +k' ${CTAGS} ${O} --languages=+CTagsSelfTest --language-force=CTagsSelfTest --fields=+k -o - input.x echo echo '# +zk' ${CTAGS} ${O} --languages=+CTagsSelfTest --language-force=CTagsSelfTest --fields=+zk -o - input.x echo echo '# +Zk' ${CTAGS} ${O} --languages=+CTagsSelfTest --language-force=CTagsSelfTest --fields=+Zk -o - input.x echo ================================================ FILE: Tmain/kind-abnormal-spec.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/kind-abnormal-spec.d/stdout-expected.txt ================================================ # list kinds b name with unwanted characters _ kind with no letter L kind with no long name N emit a normal tag B beginning of an area for a guest E end of an area for a guest Q stop the parsing d a kind disabled by default [off] e a kind enabled by default r emit a tag with multi roles R emit a tag with multi roles(disabled by default) [off] f tag for testing field: n trigger notice output z emit a tag having an empty string Z don't emit a tag having an empty string # list kinds-full #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION no letter yes no 0 NONE 0 kind with no letter B ThisShouldNotBePrintedKindNameMustBeGiven yes no 0 NONE 0 beginning of an area for a guest E ThisShouldNotBePrintedKindNameMustBeGiven yes no 0 NONE 0 end of an area for a guest L ThisShouldNotBePrintedKindNameMustBeGiven yes no 0 NONE 0 kind with no long name N nothingSpecial yes no 0 NONE 0 emit a normal tag Q quit yes no 0 NONE 0 stop the parsing R rolesDisabled no yes 2 NONE 0 emit a tag with multi roles(disabled by default) Z dontEmitNullTag yes no 0 NONE 0 don't emit a tag having an empty string b broken tag yes no 1 NONE 0 name with unwanted characters d disabled no no 2 NONE 0 a kind disabled by default e enabled yes no 2 NONE 0 a kind enabled by default f fieldMaker yes no 0 NONE 0 tag for testing field: n triggerNotice yes no 0 NONE 0 trigger notice output r roles yes yes 4 NONE 0 emit a tag with multi roles z emitNullTag yes no 0 NONE 0 emit a tag having an empty string # +K abnormal kindDefinition testing (no letter) input.x /^@$/;" no letter abnormal kindDefinition testing (no long name) input.x /^L$/;" L # +k abnormal kindDefinition testing (no letter) input.x /^@$/;" no letter abnormal kindDefinition testing (no long name) input.x /^L$/;" L # +zk abnormal kindDefinition testing (no letter) input.x /^@$/;" kind:no letter abnormal kindDefinition testing (no long name) input.x /^L$/;" kind:L # +Zk abnormal kindDefinition testing (no letter) input.x /^@$/;" no letter abnormal kindDefinition testing (no long name) input.x /^L$/;" L ================================================ FILE: Tmain/kind-and-role-defaults.d/input.cst ================================================ d d d e e e ================================================ FILE: Tmain/kind-and-role-defaults.d/run.sh ================================================ #!/bin/sh # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 B0="--quiet --options=NONE" B1="-o - --fields=+E --language-force=CTagsSelfTest input.cst" OPT= OPT= echo "# $OPT" ${CTAGS} $B0 $OPT $B1 echo OPT="--kinds-CTagsSelfTest=-e" echo "# $OPT" ${CTAGS} $B0 $OPT $B1 echo OPT="--kinds-CTagsSelfTest=-e+d" echo "# $OPT" ${CTAGS} $B0 $OPT $B1 echo OPT="--kinds-CTagsSelfTest=+d" echo "# $OPT" ${CTAGS} $B0 $OPT $B1 echo OPT="--extras=+r --fields=+r" echo "# $OPT" ${CTAGS} $B0 $OPT $B1 echo OPT="--extras=+r --fields=+r --kinds-CTagsSelfTest=-e" echo "# $OPT" ${CTAGS} $B0 $OPT $B1 echo OPT="--extras=+r --fields=+r --kinds-CTagsSelfTest=-e+d" echo "# $OPT" ${CTAGS} $B0 $OPT $B1 echo OPT="--extras=+r --fields=+r --kinds-CTagsSelfTest=+d" echo "# $OPT" ${CTAGS} $B0 $OPT $B1 echo exit $? ================================================ FILE: Tmain/kind-and-role-defaults.d/stdout-expected.txt ================================================ # enabled-kind-no-role input.cst /^e$/;" e # --kinds-CTagsSelfTest=-e # --kinds-CTagsSelfTest=-e+d disable-kind-no-role input.cst /^d$/;" d # --kinds-CTagsSelfTest=+d disable-kind-no-role input.cst /^d$/;" d enabled-kind-no-role input.cst /^e$/;" e # --extras=+r --fields=+r enabled-kind-enabled-role input.cst /^e$/;" e roles:enabled extras:reference enabled-kind-no-role input.cst /^e$/;" e roles:def # --extras=+r --fields=+r --kinds-CTagsSelfTest=-e # --extras=+r --fields=+r --kinds-CTagsSelfTest=-e+d disable-kind-enabled-role input.cst /^d$/;" d roles:enabled extras:reference disable-kind-no-role input.cst /^d$/;" d roles:def # --extras=+r --fields=+r --kinds-CTagsSelfTest=+d disable-kind-enabled-role input.cst /^d$/;" d roles:enabled extras:reference disable-kind-no-role input.cst /^d$/;" d roles:def enabled-kind-enabled-role input.cst /^e$/;" e roles:enabled extras:reference enabled-kind-no-role input.cst /^e$/;" e roles:def ================================================ FILE: Tmain/kind-long-lregex.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 echo '# definition' ${CTAGS} --quiet --options=NONE --with-list-header=no \ --langdef=IdealLang --regex-IdealLang='/def (.*)/\1/d,definition,definitions/' \ --list-kinds-full=IdealLang echo '# disabling' ${CTAGS} --quiet --options=NONE --with-list-header=no \ --langdef=IdealLang --regex-IdealLang='/def (.*)/\1/d,definition,definitions/' \ --kinds-IdealLang='-{definition}' \ --list-kinds-full=IdealLang echo '# enabling again' ${CTAGS} --quiet --options=NONE --with-list-header=no \ --langdef=IdealLang --regex-IdealLang='/def (.*)/\1/d,definition,definitions/' \ --kinds-IdealLang='-{definition}' \ --kinds-IdealLang='+{definition}' \ --list-kinds-full=IdealLang ================================================ FILE: Tmain/kind-long-lregex.d/stdout-expected.txt ================================================ # definition d definition yes no 0 NONE 0 definitions # disabling d definition no no 0 NONE 0 definitions # enabling again d definition yes no 0 NONE 0 definitions ================================================ FILE: Tmain/kind-long.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --kinds-C=+'{label}' --list-kinds-full=C | grep label ${CTAGS} --quiet --options=NONE --kinds-C=-'{macro}' --list-kinds-full=C | grep macro ================================================ FILE: Tmain/kind-long.d/stdout-expected.txt ================================================ L label yes no 0 C 0 goto labels D macroparam no no 0 C 0 parameters inside macro definitions d macro no no 2 C 0 macro definitions ================================================ FILE: Tmain/kinddef.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS="$1 --quiet --options=NONE" title() { echo echo "$@" { echo echo "$@" } 1>&2 } { title '# NOSUCHLANG' ${CTAGS} --kinddef-NOSUCHLANG=l,name,description --list-kinds-full=NOSUCHLANG CTAGS="${CTAGS} --langdef=MYTEST" title '# define "a"' ${CTAGS} --kinddef-MYTEST=a,aa,aaa --list-kinds-full=MYTEST title '# no description 1' ${CTAGS} --kinddef-MYTEST=a,aa, --list-kinds-full=MYTEST title '# no description 2' ${CTAGS} --kinddef-MYTEST=a,aa --list-kinds-full=MYTEST title '# no name 1' ${CTAGS} --kinddef-MYTEST=a, --list-kinds-full=MYTEST title '# no name 2' ${CTAGS} --kinddef-MYTEST=a --list-kinds-full=MYTEST title '# an empty name 1' ${CTAGS} --kinddef-MYTEST=a,,x --list-kinds-full=MYTEST title '# an empty name 2' ${CTAGS} --kinddef-MYTEST=a,, --list-kinds-full=MYTEST title '# wrong letter in name 1' ${CTAGS} --kinddef-MYTEST="a,a x,d" --list-kinds-full=MYTEST title '# wrong letter in name 2' ${CTAGS} --kinddef-MYTEST="a,a x," --list-kinds-full=MYTEST title '# wrong letter in name 3' ${CTAGS} --kinddef-MYTEST="a,a x" --list-kinds-full=MYTEST title '# no letter 1' ${CTAGS} --kinddef-MYTEST=,n,d --list-kinds-full=MYTEST title '# no letter 2' ${CTAGS} --kinddef-MYTEST=,n, --list-kinds-full=MYTEST title '# no letter 3' ${CTAGS} --kinddef-MYTEST=,n --list-kinds-full=MYTEST title '# no letter 4' ${CTAGS} --kinddef-MYTEST=, --list-kinds-full=MYTEST title '# no letter 5' ${CTAGS} --kinddef-MYTEST= --list-kinds-full=MYTEST title '# wrong letter' ${CTAGS} --kinddef-MYTEST=^ --list-kinds-full=MYTEST title '# wrong letter (using number)' ${CTAGS} --kinddef-MYTEST=7 --list-kinds-full=MYTEST title '# reusing the letter for file kind' ${CTAGS} --kinddef-MYTEST=F --list-kinds-full=MYTEST title '# reusing the name for file kind' ${CTAGS} --kinddef-MYTEST=x,file,desc --list-kinds-full=MYTEST title '# inject a flag separator' ${CTAGS} --kinddef-MYTEST='x,kind,desc{foo}' --list-kinds-full=MYTEST title '# inject a broken flag separator(1)' ${CTAGS} --kinddef-MYTEST='x,kind,desc{foo' --list-kinds-full=MYTEST title '# inject a broken flag separator(2)' ${CTAGS} --kinddef-MYTEST='x,kind,desc{' --list-kinds-full=MYTEST title '# use a { in description (1)' ${CTAGS} --kinddef-MYTEST='x,kind,desc\{' --list-kinds-full=MYTEST title '# use a { in description (2)' ${CTAGS} --kinddef-MYTEST='x,kind,desc\{}' --list-kinds-full=MYTEST title '# use a number char as the initial letter' ${CTAGS} --kinddef-MYTEST='x,0kind,desc' --list-kinds-full=MYTEST title '# use a number char within the body' ${CTAGS} --kinddef-MYTEST='x,k0ind,desc' --list-kinds-full=MYTEST # title '# use a { and \t in description' # ${CTAGS} --kinddef-MYTEST='x,kind,desc\{}\t' --list-kinds-full=MYTEST title '# use a \ in description' ${CTAGS} --kinddef-MYTEST='x,kind,desc\\backslash' --list-kinds-full=MYTEST title '# description started from {' ${CTAGS} --kinddef-MYTEST='x,kind,{' --list-kinds-full=MYTEST title '# description started from \{' ${CTAGS} --kinddef-MYTEST='x,kind,\{' --list-kinds-full=MYTEST title '# _refonly flag' ${CTAGS} --kinddef-MYTEST='x,kind,desc' --list-kinds-full=MYTEST ${CTAGS} --kinddef-MYTEST='x,kind,desc' --_roledef-MYTEST.x=role,roleDesc --list-kinds-full=MYTEST ${CTAGS} --kinddef-MYTEST='x,kind,desc{_refonly}' --_roledef-MYTEST.'{kind}'=role,roleDesc --list-kinds-full=MYTEST } > /tmp/ctags-tmain-$$.stdout 2>/tmp/ctags-tmain-$$.stderr sed -e 's/\.exe//g' < /tmp/ctags-tmain-$$.stdout rm /tmp/ctags-tmain-$$.stdout sed -e 's/\.exe//g' < /tmp/ctags-tmain-$$.stderr 1>&2 rm /tmp/ctags-tmain-$$.stderr ================================================ FILE: Tmain/kinddef.d/stderr-expected.txt ================================================ # NOSUCHLANG ctags: Unknown language "NOSUCHLANG" in "kinddef-NOSUCHLANG" option # define "a" # no description 1 ctags: found an empty kind description in "--kinddef-MYTEST" option # no description 2 ctags: no kind description specified in "--kinddef-MYTEST" option # no name 1 ctags: no kind name specified in "--kinddef-MYTEST" option # no name 2 ctags: wrong kind definition in "--kinddef-MYTEST" option: no comma after letter # an empty name 1 ctags: the kind name in "--kinddef-MYTEST" option is empty # an empty name 2 ctags: the kind name in "--kinddef-MYTEST" option is empty # wrong letter in name 1 ctags: non-alphanumeric char is used as part of kind name: 'a x' in "--kinddef-MYTEST" option # wrong letter in name 2 ctags: non-alphanumeric char is used as part of kind name: 'a x' in "--kinddef-MYTEST" option # wrong letter in name 3 ctags: no kind description specified in "--kinddef-MYTEST" option # no letter 1 ctags: no kind letter specified in "--kinddef-MYTEST" option # no letter 2 ctags: no kind letter specified in "--kinddef-MYTEST" option # no letter 3 ctags: no kind letter specified in "--kinddef-MYTEST" option # no letter 4 ctags: no kind letter specified in "--kinddef-MYTEST" option # no letter 5 ctags: no kind definition specified in "--kinddef-MYTEST" option # wrong letter ctags: the kind letter given in "--kinddef-MYTEST" option is not an alphabet # wrong letter (using number) ctags: the kind letter given in "--kinddef-MYTEST" option is not an alphabet # reusing the letter for file kind ctags: the kind letter `F' in "--kinddef-MYTEST" option is reserved for "file" kind # reusing the name for file kind ctags: the kind name file in "--kinddef-MYTEST" option is reserved # inject a flag separator # inject a broken flag separator(1) ctags: Warning: long flags specifier opened with `{' is not closed `}': "{foo" # inject a broken flag separator(2) ctags: Warning: long flags specifier opened with `{' is not closed `}': "{" # use a { in description (1) # use a { in description (2) # use a number char as the initial letter ctags: a kind name doesn't start with an alphabetical character: '0kind' in "--kinddef-MYTEST" option # use a number char within the body # use a \ in description # description started from { ctags: found an empty kind description in "--kinddef-MYTEST" option # description started from \{ # _refonly flag ================================================ FILE: Tmain/kinddef.d/stdout-expected.txt ================================================ # NOSUCHLANG # define "a" #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION a aa yes no 0 NONE 0 aaa # no description 1 # no description 2 # no name 1 # no name 2 # an empty name 1 # an empty name 2 # wrong letter in name 1 # wrong letter in name 2 # wrong letter in name 3 # no letter 1 # no letter 2 # no letter 3 # no letter 4 # no letter 5 # wrong letter # wrong letter (using number) # reusing the letter for file kind # reusing the name for file kind # inject a flag separator #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION x kind yes no 0 NONE 0 desc # inject a broken flag separator(1) #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION x kind yes no 0 NONE 0 desc # inject a broken flag separator(2) #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION x kind yes no 0 NONE 0 desc # use a { in description (1) #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION x kind yes no 0 NONE 0 desc{ # use a { in description (2) #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION x kind yes no 0 NONE 0 desc{} # use a number char as the initial letter # use a number char within the body #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION x k0ind yes no 0 NONE 0 desc # use a \ in description #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION x kind yes no 0 NONE 0 desc\backslash # description started from { # description started from \{ #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION x kind yes no 0 NONE 0 { # _refonly flag #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION x kind yes no 0 NONE 0 desc #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION x kind yes no 1 NONE 0 desc #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION x kind yes yes 1 NONE 0 desc ================================================ FILE: Tmain/kinds-all-with-spec.d/exit-expected.txt ================================================ 1 ================================================ FILE: Tmain/kinds-all-with-spec.d/input.c ================================================ int main(void) {return 0;} ================================================ FILE: Tmain/kinds-all-with-spec.d/run.sh ================================================ #!/bin/sh # Copyright: 2019 Masatake YAMATO # License: GPL-2 CTAGS=$1 t () { echo '#' "--all-kinds=$1" 1>&2 $CTAGS --quiet --options=NONE -o - --all-kinds="$1" --fields=-T input.c echo '#' "--kinds-all=$1" 1>&2 $CTAGS --quiet --options=NONE -o - --kinds-all="$1" --fields=-T input.c } echo '#' 1>&2 echo '# unexpected flags after operators ([+-])' 1>&2 echo '#' 1>&2 t '*-a' t '*-{abc}' t '*+a' t '*+{abc}' t 'F-a' t 'F-{abc}' t 'F+a' t 'F+{abc}' t '{file}-a' t '{file}-{abc}' t '{file}+a' t '{file}+{abc}' t '+F-a' t '+F-{abc}' t '+F+a' t '+F+{abc}' t '+{file}-a' t '+{file}-{abc}' t '+{file}+a' t '+{file}+{abc}' echo '#' 1>&2 echo '# repeaed operators ([+-])' 1>&2 echo '#' 1>&2 t '*--{file}' t '*--F' t '*++{file}' t '*++F' t '*+-{file}' t '*+-F' t '*-+{file}' t '*-+F' t '{file}--F' t '{file}++F' t '{file}-+F' t '{file}+-F' t '{file}--{file}' t '{file}++{file}' t '{file}-+{file}' t '{file}+-{file}' t 'F--{file}' t 'F++{file}' t 'F-+{file}' t 'F+-{file}' t 'F--F' t 'F++F' t 'F-+F' t 'F+-F' echo '#' 1>&2 echo '# redundant * usage' 1>&2 echo '#' 1>&2 t '-*' t '+*' t 'F-*' t 'F+*' t '{file}-*' t '{file}+*' t '+F-*' t '-F+*' t '+{file}-*' t '-{file}+*' echo '#' 1>&2 echo '# Just print the parsed file name' 1>&2 echo '#' 1>&2 $CTAGS --quiet --options=NONE -o- --all-kinds=F --extras=+f --fields=-T input.c $CTAGS --quiet --options=NONE -o- --all-kinds=FF --extras=+f --fields=-T input.c $CTAGS --quiet --options=NONE -o- --all-kinds=-F+F --extras=+f --fields=-T input.c $CTAGS --quiet --options=NONE -o- --all-kinds='*' --all-kinds=F --extras=+f --fields=-T input.c $CTAGS --quiet --options=NONE -o- --kinds-all=F --extras=+f --fields=-T input.c $CTAGS --quiet --options=NONE -o- --kinds-all=FF --extras=+f --fields=-T input.c $CTAGS --quiet --options=NONE -o- --kinds-all=-F+F --extras=+f --fields=-T input.c $CTAGS --quiet --options=NONE -o- --kinds-all='*' --kinds-all=F --extras=+f --fields=-T input.c echo '#' 1>&2 echo '# The original test cases' 1>&2 echo '#' 1>&2 if ! $CTAGS --quiet --options=NONE --kinds-all=xyz --_force-quit=0; then $CTAGS --quiet --options=NONE --all-kinds=abc --_force-quit=0 else exit 0 fi ================================================ FILE: Tmain/kinds-all-with-spec.d/stderr-expected.txt ================================================ # # unexpected flags after operators ([+-]) # # --all-kinds=*-a ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds # --kinds-all=*-a ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all # --all-kinds=*-{abc} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds # --kinds-all=*-{abc} ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all # --all-kinds=*+a ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds # --kinds-all=*+a ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all # --all-kinds=*+{abc} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds # --kinds-all=*+{abc} ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all # --all-kinds=F-a ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds # --kinds-all=F-a ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all # --all-kinds=F-{abc} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds # --kinds-all=F-{abc} ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all # --all-kinds=F+a ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds # --kinds-all=F+a ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all # --all-kinds=F+{abc} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds # --kinds-all=F+{abc} ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all # --all-kinds={file}-a ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds # --kinds-all={file}-a ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all # --all-kinds={file}-{abc} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds # --kinds-all={file}-{abc} ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all # --all-kinds={file}+a ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds # --kinds-all={file}+a ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all # --all-kinds={file}+{abc} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds # --kinds-all={file}+{abc} ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all # --all-kinds=+F-a ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds # --kinds-all=+F-a ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all # --all-kinds=+F-{abc} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds # --kinds-all=+F-{abc} ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all # --all-kinds=+F+a ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds # --kinds-all=+F+a ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all # --all-kinds=+F+{abc} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds # --kinds-all=+F+{abc} ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all # --all-kinds=+{file}-a ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds # --kinds-all=+{file}-a ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all # --all-kinds=+{file}-{abc} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds # --kinds-all=+{file}-{abc} ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all # --all-kinds=+{file}+a ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds # --kinds-all=+{file}+a ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all # --all-kinds=+{file}+{abc} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds # --kinds-all=+{file}+{abc} ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all # # repeaed operators ([+-]) # # --all-kinds=*--{file} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all=*--{file} ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds=*--F ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all=*--F ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds=*++{file} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all=*++{file} ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds=*++F ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all=*++F ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds=*+-{file} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all=*+-{file} ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds=*+-F ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all=*+-F ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds=*-+{file} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all=*-+{file} ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds=*-+F ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all=*-+F ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds={file}--F ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all={file}--F ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds={file}++F ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all={file}++F ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds={file}-+F ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all={file}-+F ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds={file}+-F ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all={file}+-F ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds={file}--{file} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all={file}--{file} ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds={file}++{file} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all={file}++{file} ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds={file}-+{file} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all={file}-+{file} ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds={file}+-{file} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all={file}+-{file} ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds=F--{file} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all=F--{file} ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds=F++{file} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all=F++{file} ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds=F-+{file} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all=F-+{file} ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds=F+-{file} ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all=F+-{file} ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds=F--F ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all=F--F ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds=F++F ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all=F++F ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds=F-+F ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all=F-+F ctags: don't repeat + (nor -) in --kinds-all option # --all-kinds=F+-F ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't repeat + (nor -) in --all-kinds option # --kinds-all=F+-F ctags: don't repeat + (nor -) in --kinds-all option # # redundant * usage # # --all-kinds=-* ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't use '*' after + (nor -) in --all-kinds option # --kinds-all=-* ctags: don't use '*' after + (nor -) in --kinds-all option # --all-kinds=+* ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't use '*' after + (nor -) in --all-kinds option # --kinds-all=+* ctags: don't use '*' after + (nor -) in --kinds-all option # --all-kinds=F-* ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't use '*' after + (nor -) in --all-kinds option # --kinds-all=F-* ctags: don't use '*' after + (nor -) in --kinds-all option # --all-kinds=F+* ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't use '*' after + (nor -) in --all-kinds option # --kinds-all=F+* ctags: don't use '*' after + (nor -) in --kinds-all option # --all-kinds={file}-* ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't use '*' after + (nor -) in --all-kinds option # --kinds-all={file}-* ctags: don't use '*' after + (nor -) in --kinds-all option # --all-kinds={file}+* ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't use '*' after + (nor -) in --all-kinds option # --kinds-all={file}+* ctags: don't use '*' after + (nor -) in --kinds-all option # --all-kinds=+F-* ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't use '*' after + (nor -) in --all-kinds option # --kinds-all=+F-* ctags: don't use '*' after + (nor -) in --kinds-all option # --all-kinds=-F+* ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't use '*' after + (nor -) in --all-kinds option # --kinds-all=-F+* ctags: don't use '*' after + (nor -) in --kinds-all option # --all-kinds=+{file}-* ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't use '*' after + (nor -) in --all-kinds option # --kinds-all=+{file}-* ctags: don't use '*' after + (nor -) in --kinds-all option # --all-kinds=-{file}+* ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: don't use '*' after + (nor -) in --all-kinds option # --kinds-all=-{file}+* ctags: don't use '*' after + (nor -) in --kinds-all option # # Just print the parsed file name # ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead # # The original test cases # ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --kinds-all ctags: Warning: "--all-kinds" option is obsolete; use "--kinds-all" instead ctags: only '*', 'F', "{file}" or their combination is acceptable as kind letter for --all-kinds ================================================ FILE: Tmain/kinds-all-with-spec.d/stdout-expected.txt ================================================ input.c input.c 1;" F input.c input.c 1;" F input.c input.c 1;" F main input.c /^int main(void) {return 0;}$/;" f typeref:typename:int input.c input.c 1;" F input.c input.c 1;" F input.c input.c 1;" F input.c input.c 1;" F main input.c /^int main(void) {return 0;}$/;" f typeref:typename:int input.c input.c 1;" F ================================================ FILE: Tmain/lang-sequel.d/args.ctags ================================================ --langdef=UnknownX --map-UnknownX=.unknown --_sequel-UnknownX={{ (bye) == }} ================================================ FILE: Tmain/lang-sequel.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/lang-sequel.d/input.unknown ================================================ EMPTY ================================================ FILE: Tmain/lang-sequel.d/run.sh ================================================ #!/bin/sh # Copyright: 2021 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh ${CTAGS} --quiet --options=NONE --options=./args.ctags -o - input.unknown ================================================ FILE: Tmain/lang-sequel.d/stderr-expected.txt ================================================ (bye) ================================================ FILE: Tmain/lang-sequel.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/lang-with-no-pattern.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/lang-with-no-pattern.d/input.foo ================================================ ================================================ FILE: Tmain/lang-with-no-pattern.d/run.sh ================================================ # Copyright: 2021 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh is_feature_available ${CTAGS} debug ${CTAGS} --quiet --options=NONE --langdef=foo --map-foo=+.foo -o - input.foo ================================================ FILE: Tmain/lang-with-no-pattern.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/lang-with-no-pattern.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/langmap-option-including-patterns.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/langmap-option-including-patterns.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 : && echo 1. && ${CTAGS} --quiet --options=NONE --langdef=foo --langmap=foo:'(akefile)' --langmap=foo:'([Mm]akefile)(GNUmakefile)' --list-maps | grep 'akefile' && echo 2. && ${CTAGS} --quiet --options=NONE --langmap=Ruby:+'([Mm]akefile)(GNUmakefile).html' --list-maps | grep '\.rb' && echo 3. && ${CTAGS} --quiet --options=NONE --langmap=Ruby:+'([Mm]akefile)(GNUmakefile).html' --list-maps | grep 'akefile' && echo 4. && ${CTAGS} --quiet --options=NONE --langmap=Ruby:+'([Mm]akefile)(GNUmakefile).html' --list-maps | grep '\.html' && echo 5. && ${CTAGS} --quiet --options=NONE --langmap=Ruby:+'([Mm]akefile)(GNUmakefile).html' --langmap=default --list-maps | grep '\.html' exit $? ================================================ FILE: Tmain/langmap-option-including-patterns.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/langmap-option-including-patterns.d/stdout-expected.txt ================================================ 1. Automake Makefile.am GNUmakefile.am *.am Rake Rakefile *.rake foo [Mm]akefile GNUmakefile 2. Ruby [Mm]akefile GNUmakefile *.rb *.ruby *.html 3. Automake Makefile.am GNUmakefile.am *.am Rake Rakefile *.rake Ruby [Mm]akefile GNUmakefile *.rb *.ruby *.html 4. Ruby [Mm]akefile GNUmakefile *.rb *.ruby *.html 5. HTML *.htm *.html ================================================ FILE: Tmain/langmap-option.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/langmap-option.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 : && # Clear all mappings related to a language echo 1. && ${CTAGS} --quiet --options=NONE --langmap=Ruby: --list-maps | grep '^Ruby' && # Take over a mapping from the other language (resetting) echo 2. && ${CTAGS} --quiet --options=NONE --langdef=foo --langmap=foo:.rb --list-maps | grep '\.rb' && # Overwrite a mapping echo 3. && ${CTAGS} --quiet --options=NONE --langdef=foo --langmap=foo:.zzz --langmap=foo:.html --list-maps | grep '\.html' && exit $? ================================================ FILE: Tmain/langmap-option.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/langmap-option.d/stdout-expected.txt ================================================ 1. Ruby 2. foo *.rb 3. foo *.html ================================================ FILE: Tmain/language-filed-optscript.d/foo.ctags ================================================ --langdef=foo --map-foo=+.foo --kinddef-foo=v,var,variables --regex-foo=/def ([a-z])/\1/v/{{ . :language = }} ================================================ FILE: Tmain/language-filed-optscript.d/input.foo ================================================ def a ================================================ FILE: Tmain/language-filed-optscript.d/run.sh ================================================ # Copyright: 2025 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --options=foo.ctags -o - input.foo ================================================ FILE: Tmain/language-filed-optscript.d/stderr-expected.txt ================================================ foo ================================================ FILE: Tmain/language-filed-optscript.d/stdout-expected.txt ================================================ a input.foo /^def a$/;" v ================================================ FILE: Tmain/language-names.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/language-names.d/run.sh ================================================ # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS=$1 test 0 = $( ${CTAGS} --options=NONE --list-languages | grep -v "^[A-Z].*" | wc -l ) ================================================ FILE: Tmain/languages-and-language-force-options.d/exit-expected.txt ================================================ 1 ================================================ FILE: Tmain/languages-and-language-force-options.d/input.c ================================================ ================================================ FILE: Tmain/languages-and-language-force-options.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --language-force=C --languages=-C -o - input.c ================================================ FILE: Tmain/languages-and-language-force-options.d/stderr-expected.txt ================================================ ctags: C parser specified with --language-force is disabled ================================================ FILE: Tmain/line-regex-optscript.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/line-regex-optscript.d/hello.ctags ================================================ --langdef=hello --kinddef-hello=d,def,definitions --map-hello=+.hello --regex-hello=/^def +([-a-z]+):$/\1/d/{{ (world) /putlast { 1 index length exch put } def /tr { % str [int int] str' () 2 index { % str [int int] str' int dup 3 index 0 get % str [int int] str' int int int eq {% str [int int] str' int pop dup 2 index 1 get putlast } {% str [int int] str' int 1 index exch putlast } ifelse } forall % str [int int] str' exch pop 0 exch putinterval } def . :name dup (-_) tr . exch name: }} --regex-hello=/^end//{{ (hello) pstack clear }} ================================================ FILE: Tmain/line-regex-optscript.d/input.hello ================================================ def x-y-z: end ================================================ FILE: Tmain/line-regex-optscript.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --options=hello.ctags -o - input.hello | sort ================================================ FILE: Tmain/line-regex-optscript.d/stderr-expected.txt ================================================ (hello) (world) ================================================ FILE: Tmain/line-regex-optscript.d/stdout-expected.txt ================================================ x_y_z input.hello /^def x-y-z:$/;" d ================================================ FILE: Tmain/list-aliases.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS="$1" ${CTAGS} --quiet --options=NONE \ --list-aliases=sh ================================================ FILE: Tmain/list-aliases.d/stdout-expected.txt ================================================ #ALIAS sh bash ksh ash dash shell-script ================================================ FILE: Tmain/list-excludes.d/run.sh ================================================ # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --exclude='foo' --list-excludes ================================================ FILE: Tmain/list-excludes.d/stdout-expected.txt ================================================ #NAME *.a *.class *.dll *.exe *.gcda *.gcno *.lib *.o *.obj *.pyc *.pyo *.so *~ .*.swp .DS_Store .arch-ids .arch-inventory .bzr .bzrignore .cvsignore .deps .dvi .git .gitattributes .gitignore .hg .hgignore .svn BitKeeper CVS EIFGEN PENDING RCS RESYNC SCCS _darcs autom4te.cache foo {arch} ================================================ FILE: Tmain/list-extras.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/list-extras.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 no_yaml() { grep -v I18nRubyGem } ${CTAGS} --quiet --options=NONE --extras='*' --with-list-header --list-extras | no_yaml ${CTAGS} --quiet --options=NONE --extras='*' --with-list-header --machinable --list-extras | no_yaml ${CTAGS} --quiet --options=NONE --extras= --with-list-header --list-extras=NONE | no_yaml ================================================ FILE: Tmain/list-extras.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/list-extras.d/stdout-expected.txt ================================================ #LETTER NAME ENABLED LANGUAGE FIXED VER DESCRIPTION - anonymous yes NONE no 0 Include tags for non-named objects like lambda F fileScope yes NONE no 0 Include tags of file scope f inputFile yes NONE no 0 Include an entry for the base file name of every input file g guest yes NONE no 0 Include tags generated by guest parsers p pseudo yes NONE no 0 Include pseudo tags q qualified yes NONE no 0 Include an extra class-qualified tag entry for each tag r reference yes NONE no 0 Include reference tags s subparser yes NONE no 0 Include tags generated by subparsers z nulltag yes NONE no 1 Include tags with empty strings as their names - canonicalizedName yes Automake no 1 Include canonicalized object name like libctags_a - linkName no Fortran no 1 Linking name used in foreign languages - implicitClass no GDScript no 0 Include tag for the implicitly defined unnamed class - doubleSharps no IPythonCell no 0 Include cells starting from ## - configPrefixed yes Kconfig no 0 prepend CONFIG_ to config names - CppDef no Make no 1 Include FOO in -DFOO as as a name of CPreProcessor macro - implicitImportName yes Odin no 0 implicitly defined import name like "filepath" in "core:path/filepath" - guessedFromFileName yes PkgConfig no 0 the guessed package name of the .pc file - arityAppended yes Prolog no 0 Include predicates with their arities - funcmap yes QemuHX no 0 Include mapping SQMP to C function name - whitespaceSwapped yes Robot no 0 Include tags swapping whitespace and underscore chars #LETTER NAME ENABLED LANGUAGE FIXED VER DESCRIPTION - anonymous yes NONE no 0 Include tags for non-named objects like lambda F fileScope yes NONE no 0 Include tags of file scope f inputFile yes NONE no 0 Include an entry for the base file name of every input file g guest yes NONE no 0 Include tags generated by guest parsers p pseudo yes NONE no 0 Include pseudo tags q qualified yes NONE no 0 Include an extra class-qualified tag entry for each tag r reference yes NONE no 0 Include reference tags s subparser yes NONE no 0 Include tags generated by subparsers z nulltag yes NONE no 1 Include tags with empty strings as their names - canonicalizedName yes Automake no 1 Include canonicalized object name like libctags_a - linkName no Fortran no 1 Linking name used in foreign languages - implicitClass no GDScript no 0 Include tag for the implicitly defined unnamed class - doubleSharps no IPythonCell no 0 Include cells starting from ## - configPrefixed yes Kconfig no 0 prepend CONFIG_ to config names - CppDef no Make no 1 Include FOO in -DFOO as as a name of CPreProcessor macro - implicitImportName yes Odin no 0 implicitly defined import name like "filepath" in "core:path/filepath" - guessedFromFileName yes PkgConfig no 0 the guessed package name of the .pc file - arityAppended yes Prolog no 0 Include predicates with their arities - funcmap yes QemuHX no 0 Include mapping SQMP to C function name - whitespaceSwapped yes Robot no 0 Include tags swapping whitespace and underscore chars #LETTER NAME ENABLED LANGUAGE FIXED VER DESCRIPTION - anonymous no NONE no 0 Include tags for non-named objects like lambda F fileScope no NONE no 0 Include tags of file scope f inputFile no NONE no 0 Include an entry for the base file name of every input file g guest no NONE no 0 Include tags generated by guest parsers p pseudo no NONE no 0 Include pseudo tags q qualified no NONE no 0 Include an extra class-qualified tag entry for each tag r reference no NONE no 0 Include reference tags s subparser no NONE no 0 Include tags generated by subparsers z nulltag no NONE no 1 Include tags with empty strings as their names ================================================ FILE: Tmain/list-fields-fixed-field-handling.d/run.sh ================================================ # Copyright: 2019 Masatake YAMATO # License: GPL-2 . ../utils.sh CTAGS="$1" is_feature_available "${CTAGS}" json run() { echo '#' "$@" $CTAGS --quiet --options=NONE "$@" | grep -v -e ^- } run --output-format=u-ctags --fields=n --list-fields run --fields=n --output-format=u-ctags --list-fields run --output-format=json --fields=n --list-fields run --fields=n --output-format=json --list-fields ================================================ FILE: Tmain/list-fields-fixed-field-handling.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/list-fields-fixed-field-handling.d/stdout-expected.txt ================================================ # --output-format=u-ctags --fields=n --list-fields #LETTER NAME ENABLED LANGUAGE JSTYPE FIXED OP VER DESCRIPTION N name yes NONE s-- yes rw 0 tag name F input yes NONE s-- yes r- 0 input file P pattern yes NONE s-b yes -- 0 pattern C compact no NONE s-- no -- 0 compact input line (used only in xref output) E extras no NONE s-- no r- 0 Extra tag type information K NONE no NONE s-- no -- 0 Kind of tag in long-name form R NONE no NONE s-- no -- 0 Marker (R or D) representing whether tag is definition or reference S signature no NONE s-- no rw 0 Signature of routine (e.g. prototype or parameter list) T epoch no NONE -i- no -- 0 the last modified time of the input file (only for F/file kind tag) Z scope no NONE s-- no rw 0 [tags output] prepend "scope:" key to s/scope field output, [xref and json output] the same as s/ field a access no NONE s-- no rw 0 Access (or export) of class members e end no NONE -i- no rw 0 end lines of various items f file no NONE --b no -- 0 File-restricted scoping i inherits no NONE s-b no -w 0 Inheritance information k NONE no NONE s-- no -- 0 Kind of tag in one-letter form l language no NONE s-- no r- 0 Language of input file containing tag m implementation no NONE s-- no -- 0 Implementation information n line yes NONE -i- no rw 0 Line number of tag definition o nth no NONE -i- no -- 0 the order in the parent scope p scopeKind no NONE s-- no -- 0 [tags output] no effect, [xref and json output] kind of scope in long-name form r roles no NONE s-- no r- 0 Roles s NONE no NONE s-- no -- 0 [tags output] scope (kind:name) of tag definition, [xref and json output] name of scope t typeref no NONE s-- no rw 0 Type and name of a variable or typedef x xpath no NONE s-- no -- 0 xpath for the tag z kind no NONE s-- no r- 0 [tags output] prepend "kind:" to k/ (or K/) field output, [xref and json output] kind in long-name form # --fields=n --output-format=u-ctags --list-fields #LETTER NAME ENABLED LANGUAGE JSTYPE FIXED OP VER DESCRIPTION N name yes NONE s-- yes rw 0 tag name F input yes NONE s-- yes r- 0 input file P pattern yes NONE s-b yes -- 0 pattern C compact no NONE s-- no -- 0 compact input line (used only in xref output) E extras no NONE s-- no r- 0 Extra tag type information K NONE no NONE s-- no -- 0 Kind of tag in long-name form R NONE no NONE s-- no -- 0 Marker (R or D) representing whether tag is definition or reference S signature no NONE s-- no rw 0 Signature of routine (e.g. prototype or parameter list) T epoch no NONE -i- no -- 0 the last modified time of the input file (only for F/file kind tag) Z scope no NONE s-- no rw 0 [tags output] prepend "scope:" key to s/scope field output, [xref and json output] the same as s/ field a access no NONE s-- no rw 0 Access (or export) of class members e end no NONE -i- no rw 0 end lines of various items f file no NONE --b no -- 0 File-restricted scoping i inherits no NONE s-b no -w 0 Inheritance information k NONE no NONE s-- no -- 0 Kind of tag in one-letter form l language no NONE s-- no r- 0 Language of input file containing tag m implementation no NONE s-- no -- 0 Implementation information n line yes NONE -i- no rw 0 Line number of tag definition o nth no NONE -i- no -- 0 the order in the parent scope p scopeKind no NONE s-- no -- 0 [tags output] no effect, [xref and json output] kind of scope in long-name form r roles no NONE s-- no r- 0 Roles s NONE no NONE s-- no -- 0 [tags output] scope (kind:name) of tag definition, [xref and json output] name of scope t typeref no NONE s-- no rw 0 Type and name of a variable or typedef x xpath no NONE s-- no -- 0 xpath for the tag z kind no NONE s-- no r- 0 [tags output] prepend "kind:" to k/ (or K/) field output, [xref and json output] kind in long-name form # --output-format=json --fields=n --list-fields #LETTER NAME ENABLED LANGUAGE JSTYPE FIXED OP VER DESCRIPTION C compact no NONE s-- no -- 0 compact input line (used only in xref output) E extras no NONE s-- no r- 0 Extra tag type information F input no NONE s-- no r- 0 input file K NONE no NONE s-- no -- 0 Kind of tag in long-name form N name no NONE s-- no rw 0 tag name P pattern no NONE s-b no -- 0 pattern R NONE no NONE s-- no -- 0 Marker (R or D) representing whether tag is definition or reference S signature no NONE s-- no rw 0 Signature of routine (e.g. prototype or parameter list) T epoch no NONE -i- no -- 0 the last modified time of the input file (only for F/file kind tag) Z scope no NONE s-- no rw 0 [tags output] prepend "scope:" key to s/scope field output, [xref and json output] the same as s/ field a access no NONE s-- no rw 0 Access (or export) of class members e end no NONE -i- no rw 0 end lines of various items f file no NONE --b no -- 0 File-restricted scoping i inherits no NONE s-b no -w 0 Inheritance information k NONE no NONE s-- no -- 0 Kind of tag in one-letter form l language no NONE s-- no r- 0 Language of input file containing tag m implementation no NONE s-- no -- 0 Implementation information n line yes NONE -i- no rw 0 Line number of tag definition o nth no NONE -i- no -- 0 the order in the parent scope p scopeKind no NONE s-- no -- 0 [tags output] no effect, [xref and json output] kind of scope in long-name form r roles no NONE s-- no r- 0 Roles s NONE no NONE s-- no -- 0 [tags output] scope (kind:name) of tag definition, [xref and json output] name of scope t typeref no NONE s-- no rw 0 Type and name of a variable or typedef x xpath no NONE s-- no -- 0 xpath for the tag z kind no NONE s-- no r- 0 [tags output] prepend "kind:" to k/ (or K/) field output, [xref and json output] kind in long-name form # --fields=n --output-format=json --list-fields #LETTER NAME ENABLED LANGUAGE JSTYPE FIXED OP VER DESCRIPTION C compact no NONE s-- no -- 0 compact input line (used only in xref output) E extras no NONE s-- no r- 0 Extra tag type information F input no NONE s-- no r- 0 input file K NONE no NONE s-- no -- 0 Kind of tag in long-name form N name no NONE s-- no rw 0 tag name P pattern no NONE s-b no -- 0 pattern R NONE no NONE s-- no -- 0 Marker (R or D) representing whether tag is definition or reference S signature no NONE s-- no rw 0 Signature of routine (e.g. prototype or parameter list) T epoch no NONE -i- no -- 0 the last modified time of the input file (only for F/file kind tag) Z scope no NONE s-- no rw 0 [tags output] prepend "scope:" key to s/scope field output, [xref and json output] the same as s/ field a access no NONE s-- no rw 0 Access (or export) of class members e end no NONE -i- no rw 0 end lines of various items f file no NONE --b no -- 0 File-restricted scoping i inherits no NONE s-b no -w 0 Inheritance information k NONE no NONE s-- no -- 0 Kind of tag in one-letter form l language no NONE s-- no r- 0 Language of input file containing tag m implementation no NONE s-- no -- 0 Implementation information n line yes NONE -i- no rw 0 Line number of tag definition o nth no NONE -i- no -- 0 the order in the parent scope p scopeKind no NONE s-- no -- 0 [tags output] no effect, [xref and json output] kind of scope in long-name form r roles no NONE s-- no r- 0 Roles s NONE no NONE s-- no -- 0 [tags output] scope (kind:name) of tag definition, [xref and json output] name of scope t typeref no NONE s-- no rw 0 Type and name of a variable or typedef x xpath no NONE s-- no -- 0 xpath for the tag z kind no NONE s-- no r- 0 [tags output] prepend "kind:" to k/ (or K/) field output, [xref and json output] kind in long-name form ================================================ FILE: Tmain/list-fields-none.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/list-fields-none.d/run.sh ================================================ # Copyright: 2022 Masatake YAMATO # License: GPL-2 CTAGS=$1 $CTAGS --quiet --options=NONE --list-fields=NONE | grep -v xpath ================================================ FILE: Tmain/list-fields-none.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/list-fields-none.d/stdout-expected.txt ================================================ #LETTER NAME ENABLED LANGUAGE JSTYPE FIXED OP VER DESCRIPTION N name yes NONE s-- yes rw 0 tag name F input yes NONE s-- yes r- 0 input file P pattern yes NONE s-b yes -- 0 pattern C compact no NONE s-- no -- 0 compact input line (used only in xref output) E extras no NONE s-- no r- 0 Extra tag type information K NONE no NONE s-- no -- 0 Kind of tag in long-name form R NONE no NONE s-- no -- 0 Marker (R or D) representing whether tag is definition or reference S signature no NONE s-- no rw 0 Signature of routine (e.g. prototype or parameter list) T epoch yes NONE -i- no -- 0 the last modified time of the input file (only for F/file kind tag) Z scope no NONE s-- no rw 0 [tags output] prepend "scope:" key to s/scope field output, [xref and json output] the same as s/ field a access no NONE s-- no rw 0 Access (or export) of class members e end no NONE -i- no rw 0 end lines of various items f file yes NONE --b no -- 0 File-restricted scoping i inherits no NONE s-b no -w 0 Inheritance information k NONE yes NONE s-- no -- 0 Kind of tag in one-letter form l language no NONE s-- no r- 0 Language of input file containing tag m implementation no NONE s-- no -- 0 Implementation information n line no NONE -i- no rw 0 Line number of tag definition o nth no NONE -i- no -- 0 the order in the parent scope p scopeKind no NONE s-- no -- 0 [tags output] no effect, [xref and json output] kind of scope in long-name form r roles no NONE s-- no r- 0 Roles s NONE yes NONE s-- no -- 0 [tags output] scope (kind:name) of tag definition, [xref and json output] name of scope t typeref yes NONE s-- no rw 0 Type and name of a variable or typedef z kind no NONE s-- no r- 0 [tags output] prepend "kind:" to k/ (or K/) field output, [xref and json output] kind in long-name form ================================================ FILE: Tmain/list-fields-with-prefix.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ignore_xpath () { grep -v Maven2 | grep -v XML } $CTAGS --quiet --options=NONE --put-field-prefix --list-fields \ | grep UCTAGS \ | ignore_xpath ================================================ FILE: Tmain/list-fields-with-prefix.d/stdout-expected.txt ================================================ E UCTAGSextras no NONE s-- no r- 0 Extra tag type information T UCTAGSepoch yes NONE -i- no -- 0 the last modified time of the input file (only for F/file kind tag) Z UCTAGSscope no NONE s-- no rw 0 [tags output] prepend "scope:" key to s/scope field output, [xref and json output] the same as s/ field e UCTAGSend no NONE -i- no rw 0 end lines of various items o UCTAGSnth no NONE -i- no -- 0 the order in the parent scope p UCTAGSscopeKind no NONE s-- no -- 0 [tags output] no effect, [xref and json output] kind of scope in long-name form r UCTAGSroles no NONE s-- no r- 0 Roles x UCTAGSxpath no NONE s-- no -- 0 xpath for the tag - UCTAGSproperties yes Asm s-- no -- 0 properties (req, vararg for parameters) - UCTAGSproperties no AutoIt s-- no -- 0 properties (static, volatile, ...) - UCTAGSalias no C s-- no -- 1 the name of the alias target specified in __attribute__((alias(...))) - UCTAGSmacrodef no C s-- no -- 0 macro definition - UCTAGSproperties no C s-- no -- 0 properties (static, inline, mutable, export,...) - UCTAGSsection no C s-- no -- 1 the place where the object is placed - UCTAGSalias no C++ s-- no -- 1 the name of the alias target specified in __attribute__((alias(...))) - UCTAGScaptures no C++ s-- no -- 0 lambda capture list - UCTAGSmacrodef no C++ s-- no -- 0 macro definition - UCTAGSname yes C++ s-- no -- 0 aliased names - UCTAGSproperties no C++ s-- no -- 0 properties (static, inline, mutable, export,...) - UCTAGSsection no C++ s-- no -- 1 the place where the object is placed - UCTAGSspecialization no C++ s-- no -- 0 template specialization parameters - UCTAGStemplate no C++ s-- no -- 0 template parameters - UCTAGSmacrodef no CPreProcessor s-- no -- 0 macro definition - UCTAGSalias no CUDA s-- no -- 1 the name of the alias target specified in __attribute__((alias(...))) - UCTAGSmacrodef no CUDA s-- no -- 0 macro definition - UCTAGSproperties no CUDA s-- no -- 0 properties (static, inline, mutable, export,...) - UCTAGSsection no CUDA s-- no -- 1 the place where the object is placed - UCTAGSmoduleName yes Elm s-- no -- 0 actual name of renamed module - UCTAGSdefiner yes EmacsLisp s-- no -- 1 the name of the function or macro that defines the unknown/Y-kind object - UCTAGSannotations yes GDScript s-- no -- 0 annotations on functions and variables - UCTAGShowImported no Go s-- no -- 0 how the package is imported ("inline" for `.' or "init" for `_') - UCTAGSpackage yes Go s-- no -- 0 the real package specified by the package name - UCTAGSpackageName yes Go s-- no -- 0 the name for referring the package - UCTAGSreceiver no Go s-- no -- 1 the name of the receiver - UCTAGSimplements yes Inko s-- no rw 0 Trait being implemented - UCTAGSproperties no JavaScript s-- no -- 2 properties (static) - UCTAGSassignment yes LdScript s-- no -- 0 how a value is assigned to the symbol - UCTAGSdefiner yes Lisp s-- no -- 1 the name of the function or macro that defines the unknown/Y-kind object - UCTAGSsectionMarker no Markdown s-- no -- 0 character used for declaring section(#, ##, =, or -) - UCTAGSwrapping yes Moose s-- no -- 0 how a wrapper wrapping the method (around, after, or before) - UCTAGSlangid yes NSIS s-- no -- 0 language identifier specified in (License)LangString commands - UCTAGScategory yes ObjectiveC s-- no -- 0 category attached to the class - UCTAGSprotocols yes ObjectiveC s-- no -- 0 protocols that the class (or category) confirms to - UCTAGSimportName yes Odin s-- no -- 0 import name for the imported entity - UCTAGShome yes Passwd s-- no rw 0 home directory - UCTAGSshell yes Passwd s-- no rw 0 login shell - UCTAGSarity yes Prolog -i- no -- 0 the number of parameters - UCTAGSdecorators no Python s-- no -- 0 decorators on functions and classes - UCTAGSnameref yes Python s-- no -- 0 the original name for the tag - UCTAGSassignmentop no R s-- no -- 0 operator for assignment - UCTAGSconstructor yes R s-- no -- 0 function used for making value assigned to the nameattr tag - UCTAGSoverline no ReStructuredText --b no -- 0 whether using overline & underline for declaring section - UCTAGSsectionMarker no ReStructuredText s-- no -- 0 character used for declaring section - UCTAGSmixin yes Ruby s-- no -- 0 how the class or module is mixed in (mixin:HOW:MODULE) - UCTAGSmacro yes Rust s-- no -- 1 macro invocation containing the definition - UCTAGSmodule yes SCSS s-- no rw 1 the name of module behind the namespace - UCTAGSdefiner yes Scheme s-- no -- 1 the name of the function or macro that defines the unknown/Y-kind object - UCTAGSparameter no SystemVerilog --b no -- 0 parameter whose value can be overridden. - UCTAGStarget yes Thrift s-- no -- 0 the target language specified at "namespace" - UCTAGSthrows yes Thrift s-- no -- 0 throws list of function - UCTAGSproperties no TypeScript s-- no -- 1 properties (static) - UCTAGSarchitecture yes VHDL s-- no -- 0 architecture designing the entity - UCTAGSparameter no Verilog --b no -- 0 parameter whose value can be overridden. ================================================ FILE: Tmain/list-fields.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/list-fields.d/input.c ================================================ #include struct X { int i; }; struct Y { int j; struct X x; }; int main(void) { return 0; } ================================================ FILE: Tmain/list-fields.d/input.java ================================================ abstract public class Foo extends Bar { public int x; }; ================================================ FILE: Tmain/list-fields.d/input.sh ================================================ source x function y() { } ================================================ FILE: Tmain/list-fields.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 with_field() { local field=$1 local lang=$2 : && echo "#$field" && $CTAGS --quiet --options=NONE $3 --machinable --fields=$field -o - input.$lang } ignore_xpath () { grep -v Maven2 | grep -v XML } : && $CTAGS --quiet --options=NONE --machinable --with-list-header --list-fields \ | ignore_xpath && with_field "" java && with_field a java && with_field i java && with_field kz java && with_field Kz java && with_field k java && with_field K java && with_field l java && with_field m java && with_field n java && with_field s java && with_field sZ java && with_field f c && with_field S c && with_field t c && with_field r sh --extras=+r && with_field r sh "--extras=+r -x --_xformat=%R/%r" ================================================ FILE: Tmain/list-fields.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/list-fields.d/stdout-expected.txt ================================================ #LETTER NAME ENABLED LANGUAGE JSTYPE FIXED OP VER DESCRIPTION N name yes NONE s-- yes rw 0 tag name F input yes NONE s-- yes r- 0 input file P pattern yes NONE s-b yes -- 0 pattern C compact no NONE s-- no -- 0 compact input line (used only in xref output) E extras no NONE s-- no r- 0 Extra tag type information K NONE no NONE s-- no -- 0 Kind of tag in long-name form R NONE no NONE s-- no -- 0 Marker (R or D) representing whether tag is definition or reference S signature no NONE s-- no rw 0 Signature of routine (e.g. prototype or parameter list) T epoch yes NONE -i- no -- 0 the last modified time of the input file (only for F/file kind tag) Z scope no NONE s-- no rw 0 [tags output] prepend "scope:" key to s/scope field output, [xref and json output] the same as s/ field a access no NONE s-- no rw 0 Access (or export) of class members e end no NONE -i- no rw 0 end lines of various items f file yes NONE --b no -- 0 File-restricted scoping i inherits no NONE s-b no -w 0 Inheritance information k NONE yes NONE s-- no -- 0 Kind of tag in one-letter form l language no NONE s-- no r- 0 Language of input file containing tag m implementation no NONE s-- no -- 0 Implementation information n line no NONE -i- no rw 0 Line number of tag definition o nth no NONE -i- no -- 0 the order in the parent scope p scopeKind no NONE s-- no -- 0 [tags output] no effect, [xref and json output] kind of scope in long-name form r roles no NONE s-- no r- 0 Roles s NONE yes NONE s-- no -- 0 [tags output] scope (kind:name) of tag definition, [xref and json output] name of scope t typeref yes NONE s-- no rw 0 Type and name of a variable or typedef x xpath no NONE s-- no -- 0 xpath for the tag z kind no NONE s-- no r- 0 [tags output] prepend "kind:" to k/ (or K/) field output, [xref and json output] kind in long-name form - properties yes Asm s-- no -- 0 properties (req, vararg for parameters) - properties no AutoIt s-- no -- 0 properties (static, volatile, ...) - alias no C s-- no -- 1 the name of the alias target specified in __attribute__((alias(...))) - macrodef no C s-- no -- 0 macro definition - properties no C s-- no -- 0 properties (static, inline, mutable, export,...) - section no C s-- no -- 1 the place where the object is placed - alias no C++ s-- no -- 1 the name of the alias target specified in __attribute__((alias(...))) - captures no C++ s-- no -- 0 lambda capture list - macrodef no C++ s-- no -- 0 macro definition - name yes C++ s-- no -- 0 aliased names - properties no C++ s-- no -- 0 properties (static, inline, mutable, export,...) - section no C++ s-- no -- 1 the place where the object is placed - specialization no C++ s-- no -- 0 template specialization parameters - template no C++ s-- no -- 0 template parameters - macrodef no CPreProcessor s-- no -- 0 macro definition - alias no CUDA s-- no -- 1 the name of the alias target specified in __attribute__((alias(...))) - macrodef no CUDA s-- no -- 0 macro definition - properties no CUDA s-- no -- 0 properties (static, inline, mutable, export,...) - section no CUDA s-- no -- 1 the place where the object is placed - moduleName yes Elm s-- no -- 0 actual name of renamed module - definer yes EmacsLisp s-- no -- 1 the name of the function or macro that defines the unknown/Y-kind object - annotations yes GDScript s-- no -- 0 annotations on functions and variables - howImported no Go s-- no -- 0 how the package is imported ("inline" for `.' or "init" for `_') - package yes Go s-- no -- 0 the real package specified by the package name - packageName yes Go s-- no -- 0 the name for referring the package - receiver no Go s-- no -- 1 the name of the receiver - implements yes Inko s-- no rw 0 Trait being implemented - properties no JavaScript s-- no -- 2 properties (static) - assignment yes LdScript s-- no -- 0 how a value is assigned to the symbol - definer yes Lisp s-- no -- 1 the name of the function or macro that defines the unknown/Y-kind object - sectionMarker no Markdown s-- no -- 0 character used for declaring section(#, ##, =, or -) - wrapping yes Moose s-- no -- 0 how a wrapper wrapping the method (around, after, or before) - langid yes NSIS s-- no -- 0 language identifier specified in (License)LangString commands - category yes ObjectiveC s-- no -- 0 category attached to the class - protocols yes ObjectiveC s-- no -- 0 protocols that the class (or category) confirms to - importName yes Odin s-- no -- 0 import name for the imported entity - home yes Passwd s-- no rw 0 home directory - shell yes Passwd s-- no rw 0 login shell - arity yes Prolog -i- no -- 0 the number of parameters - decorators no Python s-- no -- 0 decorators on functions and classes - nameref yes Python s-- no -- 0 the original name for the tag - assignmentop no R s-- no -- 0 operator for assignment - constructor yes R s-- no -- 0 function used for making value assigned to the nameattr tag - overline no ReStructuredText --b no -- 0 whether using overline & underline for declaring section - sectionMarker no ReStructuredText s-- no -- 0 character used for declaring section - mixin yes Ruby s-- no -- 0 how the class or module is mixed in (mixin:HOW:MODULE) - macro yes Rust s-- no -- 1 macro invocation containing the definition - module yes SCSS s-- no rw 1 the name of module behind the namespace - definer yes Scheme s-- no -- 1 the name of the function or macro that defines the unknown/Y-kind object - parameter no SystemVerilog --b no -- 0 parameter whose value can be overridden. - target yes Thrift s-- no -- 0 the target language specified at "namespace" - throws yes Thrift s-- no -- 0 throws list of function - properties no TypeScript s-- no -- 1 properties (static) - architecture yes VHDL s-- no -- 0 architecture designing the entity - parameter no Verilog --b no -- 0 parameter whose value can be overridden. # Foo input.java /^abstract public class Foo extends Bar$/ x input.java /^ public int x;$/ #a Foo input.java /^abstract public class Foo extends Bar$/ x input.java /^ public int x;$/;" access:public #i Foo input.java /^abstract public class Foo extends Bar$/;" inherits:Bar x input.java /^ public int x;$/ #kz Foo input.java /^abstract public class Foo extends Bar$/;" kind:c x input.java /^ public int x;$/;" kind:f #Kz Foo input.java /^abstract public class Foo extends Bar$/;" kind:class x input.java /^ public int x;$/;" kind:field #k Foo input.java /^abstract public class Foo extends Bar$/;" c x input.java /^ public int x;$/;" f #K Foo input.java /^abstract public class Foo extends Bar$/;" class x input.java /^ public int x;$/;" field #l Foo input.java /^abstract public class Foo extends Bar$/;" language:Java x input.java /^ public int x;$/;" language:Java #m Foo input.java /^abstract public class Foo extends Bar$/;" implementation:abstract x input.java /^ public int x;$/ #n Foo input.java /^abstract public class Foo extends Bar$/;" line:1 x input.java /^ public int x;$/;" line:3 #s Foo input.java /^abstract public class Foo extends Bar$/ x input.java /^ public int x;$/;" class:Foo #sZ Foo input.java /^abstract public class Foo extends Bar$/ x input.java /^ public int x;$/;" scope:class:Foo #f X input.c /^struct X {$/;" file: Y input.c /^struct Y {$/;" file: i input.c /^ int i;$/;" file: j input.c /^ int j;$/;" file: main input.c /^int main(void)$/ x input.c /^ struct X x;$/;" file: #S X input.c /^struct X {$/ Y input.c /^struct Y {$/ i input.c /^ int i;$/ j input.c /^ int j;$/ main input.c /^int main(void)$/;" signature:(void) x input.c /^ struct X x;$/ #t X input.c /^struct X {$/ Y input.c /^struct Y {$/ i input.c /^ int i;$/;" typeref:typename:int j input.c /^ int j;$/;" typeref:typename:int main input.c /^int main(void)$/;" typeref:typename:int x input.c /^ struct X x;$/;" typeref:struct:X #r x input.sh /^source x$/;" roles:loaded y input.sh /^function y()$/;" roles:def #r D/def R/loaded ================================================ FILE: Tmain/list-kinds-full.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/list-kinds-full.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --machinable --with-list-header --list-kinds-full=C ${CTAGS} --quiet --options=NONE --machinable --with-list-header --list-kinds-full=C++ ================================================ FILE: Tmain/list-kinds-full.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/list-kinds-full.d/stdout-expected.txt ================================================ #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION D macroparam no no 0 C 0 parameters inside macro definitions L label no no 0 C 0 goto labels d macro yes no 2 C 0 macro definitions e enumerator yes no 0 C 0 enumerators (values inside an enumeration) f function yes no 2 C 0 function definitions g enum yes no 0 C 0 enumeration names h header yes yes 2 C 0 included header files l local no no 0 C 0 local variables m member yes no 0 C 0 struct, and union members p prototype no no 0 C 0 function prototypes s struct yes no 1 C 0 structure names t typedef yes no 0 C 0 typedefs u union yes no 0 C 0 union names v variable yes no 0 C 0 variable definitions x externvar no no 0 C 0 external and forward variable declarations z parameter no no 0 C 0 function parameters inside function or prototype definitions #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION A alias no no 0 NONE 0 namespace aliases D macroparam no no 0 C 0 parameters inside macro definitions L label no no 0 C 0 goto labels M module yes no 2 NONE 2 modules N name no no 0 NONE 0 names imported via using scope::symbol P partition yes no 1 NONE 2 partitions U using no no 0 NONE 0 using namespace statements Z tparam no no 0 NONE 0 template parameters c class yes no 0 NONE 0 classes d macro yes no 2 C 0 macro definitions e enumerator yes no 0 C 0 enumerators (values inside an enumeration) f function yes no 0 C 0 function definitions g enum yes no 0 C 0 enumeration names h header yes yes 4 C 0 included header files l local no no 0 C 0 local variables m member yes no 0 C 0 class, struct, and union members n namespace yes no 0 NONE 0 namespaces p prototype no no 0 C 0 function prototypes s struct yes no 0 C 0 structure names t typedef yes no 0 C 0 typedefs u union yes no 0 C 0 union names v variable yes no 0 C 0 variable definitions x externvar no no 0 C 0 external and forward variable declarations z parameter no no 0 C 0 function parameters inside function or prototype definitions ================================================ FILE: Tmain/list-language-fields.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 $CTAGS --quiet --options=NONE --machinable --with-list-header \ --list-fields=reStructuredText ================================================ FILE: Tmain/list-language-fields.d/stdout-expected.txt ================================================ #LETTER NAME ENABLED LANGUAGE JSTYPE FIXED OP VER DESCRIPTION - overline no ReStructuredText --b no -- 0 whether using overline & underline for declaring section - sectionMarker no ReStructuredText s-- no -- 0 character used for declaring section ================================================ FILE: Tmain/list-language-flags.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/list-language-flags.d/run.sh ================================================ #!/bin/sh # Copyright: 2025 Masatake YAMATO # License: GPL-2 CTAGS=$1 : && echo langdef-flags: && ${CTAGS} --quiet --options=NONE --_list-langdef-flags && echo fielddef-flags: && ${CTAGS} --quiet --options=NONE --_list-fielddef-flags && echo kinddef-flags: && ${CTAGS} --quiet --options=NONE --_list-kinddef-flags && echo roledef-flags: && ${CTAGS} --quiet --options=NONE --_list-roledef-flags && echo extradef-flags: && ${CTAGS} --quiet --options=NONE --_list-extradef-flags && : ================================================ FILE: Tmain/list-language-flags.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/list-language-flags.d/stdout-expected.txt ================================================ langdef-flags: #LETTER NAME DESCRIPTION - base=BASEPARSER utilize as a base parser - bidirectional utilize the base parser both 'dedicated' and 'shared' way - dedicated make the base parser dedicated to this subparser - shared share the base parser with the other subparsers - version=CURRENT.AGE set the version of the parser - _autoFQTag make full qualified tags automatically based on scope information - _foreignLanguage=LANG initialize another parser fielddef-flags: #LETTER NAME DESCRIPTION - datatype=TYPE acceptable datatype of the field (str|bool|int|str+bool) - version=VERSION in which version of the parser this field is added kinddef-flags: #LETTER NAME DESCRIPTION - version=VERSION in which version of the parser this kind is added - _refonly use this kind reference tags only roledef-flags: #LETTER NAME DESCRIPTION - version=VERSION in which version of the parser this role is added extradef-flags: #LETTER NAME DESCRIPTION - version=VERSION in which version of the parser this extra is added ================================================ FILE: Tmain/list-map-extensions.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 echo '## all|grep LdScript' $CTAGS --quiet --options=NONE --list-map-extensions=all | grep '^#\|LdScript' echo '## LdScript' $CTAGS --quiet --options=NONE --list-map-extensions=LdScript ================================================ FILE: Tmain/list-map-extensions.d/stdout-expected.txt ================================================ ## all|grep LdScript #LANGUAGE EXTENSION LdScript lds LdScript scr LdScript ld LdScript ldi ## LdScript #EXTENSION lds scr ld ldi ================================================ FILE: Tmain/list-map-patterns.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 echo '## all|grep LdScript' $CTAGS --quiet --options=NONE --list-map-patterns=all | grep '^#\|LdScript' echo '## LdScript' $CTAGS --quiet --options=NONE --list-map-patterns=LdScript ================================================ FILE: Tmain/list-map-patterns.d/stdout-expected.txt ================================================ ## all|grep LdScript #LANGUAGE PATTERN LdScript *.lds.S LdScript *.ld.S LdScript ld.script ## LdScript #PATTERN *.lds.S *.ld.S ld.script ================================================ FILE: Tmain/list-map-rexprs.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/list-map-rexprs.d/run.sh ================================================ # Copyright: 2025 Masatake YAMATO # License: GPL-2 CTAGS=$1 $CTAGS --quiet --options=NONE \ --langdef=Something \ --map-Something='%\%ESCAPING\%%' \ --map-Something=+'%ICASE%i' \ --map-Something=+'%TEMP%' \ --map-Something=-'%TEMP%' \ --map-Something=+'%TEMPi%i' \ --map-Something=-'%TEMPi%i' \ --list-map-rexprs=Something $CTAGS --quiet --options=NONE \ --langdef=Something \ --map-Something='%aExpr%' \ --map-Something=+'%\%ESCAPING\%%' \ --map-Something=+'%ICASE%i' \ --map-Something=+'%TEMP%' \ --map-Something=-'%TEMP%' \ --map-Something=+'%TEMPi%i' \ --map-Something=-'%TEMPi%i' \ --list-maps=Something $CTAGS --quiet --options=NONE \ --langdef=Something \ --kinddef-Something=t,type,types \ --fields=+'{language}' \ --regex-Something='/^([a-z]+)[ \t]+tdef;$/\1/t/' \ \ --map-Something='%something/.*\.c%' \ --map-Something=+'%something/.*\.cpp%i' \ --map-Something=+'%something/.*\.h%{icase}' \ \ -x --_xformat='%10N %{language}' \ -R something ================================================ FILE: Tmain/list-map-rexprs.d/something/input.CPP ================================================ float tdef; ================================================ FILE: Tmain/list-map-rexprs.d/something/input.c ================================================ int tdef; ================================================ FILE: Tmain/list-map-rexprs.d/something/input.h ================================================ double tdef; ================================================ FILE: Tmain/list-map-rexprs.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/list-map-rexprs.d/stdout-expected.txt ================================================ #EXPRESSION CASE %ESCAPING% sensitive ICASE insensitive Something %aExpr% %\%ESCAPING\%% %ICASE%i int Something float Something double Something ================================================ FILE: Tmain/list-mline-regex-flags.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh is_feature_available ${CTAGS} pcre2 ${CTAGS} --quiet --options=NONE --list-mline-regex-flags ================================================ FILE: Tmain/list-mline-regex-flags.d/stdout-expected.txt ================================================ #LETTER NAME DESCRIPTION b basic interpreted as a Posix basic regular expression. e extend interpreted as a Posix extended regular expression (default) i icase applied in a case-insensitive manner p pcre2 use pcre2 regex engine - fatal="MESSAGE" print the given MESSAGE and exit - mgroup=N a group in pattern determining the line number of tag - scope=intervaltab set scope for the tag with the interval table - warning="MESSAGE" print the given MESSAGE at WARNING level - _advanceTo=N[start|end] a group in pattern from where the next scan starts [0end] - _anonymous=PREFIX make an anonymous tag with PREFIX - _extra=EXTRA record the tag only when the (foreign) extra is enabled - _field=FIELD:VALUE record the matched string(VALUE) to the (foreign) language specific FIELD of the tag - _guest=PARSERSPEC,N0[start|end],N1[start|end] run guest parser on the area - _language=LANG make a foreign tag for LANG - _role=ROLE set the given ROLE to the roles field ================================================ FILE: Tmain/list-mtable-regex-flags.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh is_feature_available ${CTAGS} pcre2 ${CTAGS} --quiet --options=NONE --_list-mtable-regex-flags ================================================ FILE: Tmain/list-mtable-regex-flags.d/stdout-expected.txt ================================================ #LETTER NAME DESCRIPTION b basic interpreted as a Posix basic regular expression. e extend interpreted as a Posix extended regular expression (default) i icase applied in a case-insensitive manner p pcre2 use pcre2 regex engine - fatal="MESSAGE" print the given MESSAGE and exit - mgroup=N a group in pattern determining the line number of tag - placeholder don't put this tag to tags file. - scope=ACTION use scope stack: ACTION = ref|push|pop|clear|set|replace|intervaltab - tenter=TABLE[,CONT] enter to given regext table (with specifying continuation) - tjump=TABLE jump to another regext table(don't push the current table to state stack) - tleave leave from the current regext table - tquit stop the parsing with this parser - treset=TABLE clear the state stack and jump to given regex table - warning="MESSAGE" print the given MESSAGE at WARNING level - _advanceTo=N[start|end] a group in pattern from where the next scan starts [0end] - _anonymous=PREFIX make an anonymous tag with PREFIX - _extra=EXTRA record the tag only when the (foreign) extra is enabled - _field=FIELD:VALUE record the matched string(VALUE) to the (foreign) language specific FIELD of the tag - _guest=PARSERSPEC,N0[start|end],N1[start|end] run guest parser on the area - _language=LANG make a foreign tag for LANG - _role=ROLE set the given ROLE to the roles field ================================================ FILE: Tmain/list-output-formats.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/list-output-formats.d/run.sh ================================================ # Copyright: 2024 Masatake YAMATO # License: GPL-2 CTAGS=$1 $CTAGS --quiet --options=NONE --machinable --with-list-header \ --list-output-formats | grep -v '^json' ================================================ FILE: Tmain/list-output-formats.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/list-output-formats.d/stdout-expected.txt ================================================ #OFORMAT DEFAULT AVAILABLE NULLTAG e-ctags no yes no etags no yes no u-ctags yes yes no xref no yes yes ================================================ FILE: Tmain/list-params.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 C="${CTAGS} --quiet --options=NONE" echo '# ALL' ${C} --with-list-header=yes --list-params echo echo '# ALL MACHINABLE' ${C} --with-list-header=yes --machinable --list-params echo echo '# ALL MACHINABLE NOHEADER' ${C} --with-list-header=no --machinable --list-params echo echo '# CPP' ${C} --list-params=CPreProcessor echo echo '# CPP MACHINABLE' ${C} --with-list-header=yes --machinable --list-params=CPreProcessor echo echo '# CPP MACHINABLE NOHEADER' ${C} --with-list-header=no --machinable --list-params=CPreProcessor echo echo '# CPP MACHINABLE NOHEADER + PARAM DEFINE WITH CMDLINE' ${C} --_paramdef-CPreProcessor='pragma,handle program' --with-list-header=no --machinable --list-params=CPreProcessor echo ================================================ FILE: Tmain/list-params.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/list-params.d/stdout-expected.txt ================================================ # ALL #LANGUAGE NAME DESCRIPTION Asm commentCharsAtBOL line comment chraracters at the beginning of line ([;*@]) Asm commentCharsInMOL line comment chraracters in the beginning of line ([]) Asm extraLinesepChars extra characters used as a line separator ([]) Asm useCPreProcessor run CPreProcessor parser for extracting macro definitions ([true] or false) CPreProcessor _expand expand macros if their definitions are in the current C/C++/CUDA input file (true or [false]) CPreProcessor define define replacement for an identifier (name(params,...)=definition) CPreProcessor if0 examine code within "#if 0" branch (true or [false]) CPreProcessor ignore a token to be specially handled Fypp guest parser run after Fypp parser parses the original input ("NONE" or a parser name [Fortran]) ITcl forceUse enable the parser even when `itcl' namespace is not specified in the input (true or [false]) Prolog allowNestedComments allow nested comments like "/* /* */ */" ([true] or false) TclOO forceUse enable the parser even when `oo' namespace is not specified in the input (true or [false]) # ALL MACHINABLE #LANGUAGE NAME DESCRIPTION Asm commentCharsAtBOL line comment chraracters at the beginning of line ([;*@]) Asm commentCharsInMOL line comment chraracters in the beginning of line ([]) Asm extraLinesepChars extra characters used as a line separator ([]) Asm useCPreProcessor run CPreProcessor parser for extracting macro definitions ([true] or false) CPreProcessor _expand expand macros if their definitions are in the current C/C++/CUDA input file (true or [false]) CPreProcessor define define replacement for an identifier (name(params,...)=definition) CPreProcessor if0 examine code within "#if 0" branch (true or [false]) CPreProcessor ignore a token to be specially handled Fypp guest parser run after Fypp parser parses the original input ("NONE" or a parser name [Fortran]) ITcl forceUse enable the parser even when `itcl' namespace is not specified in the input (true or [false]) Prolog allowNestedComments allow nested comments like "/* /* */ */" ([true] or false) TclOO forceUse enable the parser even when `oo' namespace is not specified in the input (true or [false]) # ALL MACHINABLE NOHEADER Asm commentCharsAtBOL line comment chraracters at the beginning of line ([;*@]) Asm commentCharsInMOL line comment chraracters in the beginning of line ([]) Asm extraLinesepChars extra characters used as a line separator ([]) Asm useCPreProcessor run CPreProcessor parser for extracting macro definitions ([true] or false) CPreProcessor _expand expand macros if their definitions are in the current C/C++/CUDA input file (true or [false]) CPreProcessor define define replacement for an identifier (name(params,...)=definition) CPreProcessor if0 examine code within "#if 0" branch (true or [false]) CPreProcessor ignore a token to be specially handled Fypp guest parser run after Fypp parser parses the original input ("NONE" or a parser name [Fortran]) ITcl forceUse enable the parser even when `itcl' namespace is not specified in the input (true or [false]) Prolog allowNestedComments allow nested comments like "/* /* */ */" ([true] or false) TclOO forceUse enable the parser even when `oo' namespace is not specified in the input (true or [false]) # CPP #NAME DESCRIPTION _expand expand macros if their definitions are in the current C/C++/CUDA input file (true or [false]) define define replacement for an identifier (name(params,...)=definition) if0 examine code within "#if 0" branch (true or [false]) ignore a token to be specially handled # CPP MACHINABLE #NAME DESCRIPTION _expand expand macros if their definitions are in the current C/C++/CUDA input file (true or [false]) define define replacement for an identifier (name(params,...)=definition) if0 examine code within "#if 0" branch (true or [false]) ignore a token to be specially handled # CPP MACHINABLE NOHEADER _expand expand macros if their definitions are in the current C/C++/CUDA input file (true or [false]) define define replacement for an identifier (name(params,...)=definition) if0 examine code within "#if 0" branch (true or [false]) ignore a token to be specially handled # CPP MACHINABLE NOHEADER + PARAM DEFINE WITH CMDLINE _expand expand macros if their definitions are in the current C/C++/CUDA input file (true or [false]) define define replacement for an identifier (name(params,...)=definition) if0 examine code within "#if 0" branch (true or [false]) ignore a token to be specially handled pragma handle program ================================================ FILE: Tmain/list-pseudo-tags.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/list-pseudo-tags.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --list-pseudo-tags | grep -v ENCODING ================================================ FILE: Tmain/list-pseudo-tags.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/list-pseudo-tags.d/stdout-expected.txt ================================================ #NAME ENABLED VER DESCRIPTION JSON_OUTPUT_VERSION off 0 the version of json output stream format TAG_EXTRA_DESCRIPTION on 0 the names and descriptions of enabled extras TAG_FIELD_DESCRIPTION on 0 the names and descriptions of enabled fields TAG_FILE_FORMAT on 0 the version of tags file format TAG_FILE_SORTED on 0 how tags are sorted TAG_KIND_DESCRIPTION on 0 the letters, names and descriptions of enabled kinds in the language TAG_KIND_SEPARATOR off 0 the separators used in kinds TAG_OUTPUT_EXCMD on 0 the excmd: number, pattern, mixed, or combine TAG_OUTPUT_FILESEP on 0 the separator used in file name (slash or backslash) TAG_OUTPUT_MODE on 0 the output mode: u-ctags or e-ctags TAG_OUTPUT_VERSION on 0 the version of the output interface (current.age) TAG_PARSER_VERSION on 0 the version of the parser (current.age) TAG_PATTERN_LENGTH_LIMIT on 0 the limit of pattern length TAG_PROC_CWD on 0 the current working directory of the tags generator TAG_PROGRAM_AUTHOR on 0 the author of this ctags implementation TAG_PROGRAM_NAME on 0 the name of this ctags implementation TAG_PROGRAM_URL on 0 the official site URL of this ctags implementation TAG_PROGRAM_VERSION on 0 the version of this ctags implementation TAG_ROLE_DESCRIPTION on 0 the names and descriptions of enabled roles ================================================ FILE: Tmain/list-regex-flags.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh is_feature_available ${CTAGS} pcre2 ${CTAGS} --quiet --options=NONE --list-regex-flags ================================================ FILE: Tmain/list-regex-flags.d/stdout-expected.txt ================================================ #LETTER NAME DESCRIPTION b basic interpreted as a Posix basic regular expression. e extend interpreted as a Posix extended regular expression (default) i icase applied in a case-insensitive manner p pcre2 use pcre2 regex engine x exclusive skip testing the other patterns if a line is matched to this pattern - fatal="MESSAGE" print the given MESSAGE and exit - placeholder don't put this tag to tags file. - postrun run after parsing with built-in code, multline regex patterns, and multitable regex patterns - scope=ACTION use scope stack: ACTION = ref|push|pop|clear|set|replace|intervaltab - warning="MESSAGE" print the given MESSAGE at WARNING level - _anonymous=PREFIX make an anonymous tag with PREFIX - _extra=EXTRA record the tag only when the (foreign) extra is enabled - _field=FIELD:VALUE record the matched string(VALUE) to the (foreign) language specific FIELD of the tag - _guest=PARSERSPEC,N0[start|end],N1[start|end] run guest parser on the area - _language=LANG make a foreign tag for LANG - _role=ROLE set the given ROLE to the roles field ================================================ FILE: Tmain/list-roles-with-kind-names.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS="$1 --quiet --options=NONE" echo '{header}' ${CTAGS} --list-roles=all.'{header}' echo '{header}I' ${CTAGS} --list-roles=all.'{header}I' echo 'd{header}' ${CTAGS} --list-roles=all.'d{header}' ================================================ FILE: Tmain/list-roles-with-kind-names.d/stdout-expected.txt ================================================ {header} #LANGUAGE KIND(L/N) NAME ENABLED VER DESCRIPTION C h/header local on 0 local header C h/header system on 0 system header C++ h/header exported on 2 exported with "exported imported ..." C++ h/header imported on 2 imported with "imported ..." C++ h/header local on 0 local header C++ h/header system on 0 system header CPreProcessor h/header local on 0 local header CPreProcessor h/header system on 0 system header CUDA h/header local on 0 local header CUDA h/header system on 0 system header Vera h/header local on 0 local header Vera h/header system on 0 system header {header}I #LANGUAGE KIND(L/N) NAME ENABLED VER DESCRIPTION C h/header local on 0 local header C h/header system on 0 system header C++ h/header exported on 2 exported with "exported imported ..." C++ h/header imported on 2 imported with "imported ..." C++ h/header local on 0 local header C++ h/header system on 0 system header CPreProcessor h/header local on 0 local header CPreProcessor h/header system on 0 system header CUDA h/header local on 0 local header CUDA h/header system on 0 system header Flex I/import import on 0 imports M4 I/macrofile included on 0 included macro M4 I/macrofile sincluded on 0 silently included macro Make I/makefile included on 0 included Make I/makefile optional on 0 optionally included Vera h/header local on 0 local header Vera h/header system on 0 system header d{header} #LANGUAGE KIND(L/N) NAME ENABLED VER DESCRIPTION Automake d/directory data on 0 directory for DATA primary Automake d/directory library on 0 directory for LIBRARIES primary Automake d/directory ltlibrary on 0 directory for LTLIBRARIES primary Automake d/directory man on 0 directory for MANS primary Automake d/directory program on 0 directory for PROGRAMS primary Automake d/directory script on 0 directory for SCRIPTS primary C d/macro condition off 0 used in part of #if/#ifdef/#elif conditions C d/macro undef on 0 undefined C h/header local on 0 local header C h/header system on 0 system header C++ d/macro condition off 0 used in part of #if/#ifdef/#elif conditions C++ d/macro undef on 0 undefined C++ h/header exported on 2 exported with "exported imported ..." C++ h/header imported on 2 imported with "imported ..." C++ h/header local on 0 local header C++ h/header system on 0 system header CPreProcessor d/macro condition off 0 used in part of #if/#ifdef/#elif conditions CPreProcessor d/macro undef on 0 undefined CPreProcessor h/header local on 0 local header CPreProcessor h/header system on 0 system header CUDA d/macro condition off 0 used in part of #if/#ifdef/#elif conditions CUDA d/macro undef on 0 undefined CUDA h/header local on 0 local header CUDA h/header system on 0 system header M4 d/macro undef on 0 undefined Vera d/macro condition off 0 used in part of #if/#ifdef/#elif conditions Vera d/macro undef on 0 undefined Vera h/header local on 0 local header Vera h/header system on 0 system header ================================================ FILE: Tmain/list-roles.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/list-roles.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 title() { echo echo '#' for x in "$@"; do echo '#' $x done echo '#' } ignore_xml() { grep -v 'Glade\|Ant\|Maven2\|XSLT' } ignore_yaml() { grep -v 'Yaml' } # When introducing newly rewritten parser, we would like to provide # the both new parser and old parser for debugging and providing # migration period to users. In such case the prefix "Old" will be # used to the name of old parser. The old parser should be ignored # in this test case. ignore_old() { grep -v '^Old' } title '' ${CTAGS} --quiet --options=NONE --list-roles= | ignore_xml | ignore_old | ignore_yaml title 'all.*' ${CTAGS} --quiet --options=NONE --list-roles='all.*' | ignore_xml | ignore_old | ignore_yaml title 'C.*' ${CTAGS} --quiet --options=NONE --list-roles='C.*' title 'all.d' ${CTAGS} --quiet --options=NONE --list-roles='all.d' | ignore_xml | ignore_old | ignore_yaml title 'Sh.s' ${CTAGS} --quiet --options=NONE --list-roles='Sh.s' # --roles-all= title 'C.* with disabling all roles of all languages' ${CTAGS} --quiet --options=NONE --roles-all= --list-roles='C.*' # --roles-all.*= title 'C.* with disabling all roles of all kinds of all languages' ${CTAGS} --quiet --options=NONE --roles-all.'*'= --list-roles='C.*' # --roles-all.*='*' title 'C.* with enabling all roles of all kinds in all languages' \ 'after disabling system role of header kind of C language' ${CTAGS} --quiet --options=NONE --roles-C.h=-'{system}' \ --roles-all.'*'='*' --list-roles='C.*' #--roles-all='*' title 'C.* with enabling all roles in all languages' \ 'after disabling system role of header kind of C language' ${CTAGS} --quiet --options=NONE --roles-C.h=-'{system}' \ --roles-all='*' --list-roles='C.*' # --roles-= title 'C.* with disabling all roles in C language' ${CTAGS} --quiet --options=NONE --roles-C= --list-roles='C.*' title 'Sh.* with disabling all roles in C language' ${CTAGS} --quiet --options=NONE --roles-C= --list-roles='Sh.*' # --roles-.*= title 'C.* with disabling all roles of all kinds in C language' ${CTAGS} --quiet --options=NONE --roles-C.'*'= --list-roles='C.*' title 'Sh.* with disabling all roles of all kinds in C language' ${CTAGS} --quiet --options=NONE --roles-C.'*'= --list-roles='Sh.*' # --roles-='*' title 'C.* with enabling all roles in C language' \ 'after disabling all roles in all languages' ${CTAGS} --quiet --options=NONE --roles-all= --roles-C='*' --list-roles='C.*' title 'Sh.* with enabling all roles in C language' \ 'after disabling all roles in all languages' ${CTAGS} --quiet --options=NONE --roles-all= --roles-C='*' --list-roles='Sh.*' # --roles-.*='*' title 'C.* with enabling all roles of all kinds in C language' \ 'after disabling all roles in all languages' ${CTAGS} --quiet --options=NONE --roles-all= --roles-C.'*'='*' --list-roles='C.*' title 'Sh.* with enabling all roles of all kinds in C language' \ 'after disabling all roles in all languages' ${CTAGS} --quiet --options=NONE --roles-all= --roles-C.'*'='*' --list-roles='Sh.*' # --roles-.{kind}= title 'C.* with disabling all roles of {header} kind in C language' ${CTAGS} --quiet --options=NONE --roles-C.'{header}'= --list-roles='C.*' title 'Sh.* with disabling all roles of {header} kind in C language' ${CTAGS} --quiet --options=NONE --roles-C.'{header}'= --list-roles='Sh.*' # --roles-.k= title 'C.* with disabling all roles of h kind in C language' ${CTAGS} --quiet --options=NONE --roles-C.h= --list-roles='C.*' title 'Sh.* with disabling all roles of h kind in C language' ${CTAGS} --quiet --options=NONE --roles-C.h= --list-roles='Sh.*' # --roles-.{kind}=* title 'C.* with enabling all roles of {header} kind in C language' \ 'after disabling all roles in all languages' ${CTAGS} --quiet --options=NONE --roles-all= --roles-C.'{header}'='*' --list-roles='C.*' title 'Sh.* with enabling all roles of {header} kind in C language' \ 'after disabling all roles in all languages' ${CTAGS} --quiet --options=NONE --roles-all= --roles-C.'{header}'='*' --list-roles='Sh.*' # --roles-.k=* title 'C.* with enabling all roles of h kind in C language' \ 'after disabling all roles in all languages' ${CTAGS} --quiet --options=NONE --roles-all= --roles-C.'h'='*' --list-roles='C.*' title 'Sh.* with enabling all roles of h kind in C language' \ 'after disabling all roles in all languages' ${CTAGS} --quiet --options=NONE --roles-all= --roles-C.'h'='*' --list-roles='Sh.*' # --roles-.{kind}=[+|-]{role} # --roles-.k=[+|-]{role} title 'C.* with disabling system role of h kind' ${CTAGS} --quiet --options=NONE --roles-C.h='-{system}' --list-roles='C.*' title 'C.* with disabling system role of {header} kind' ${CTAGS} --quiet --options=NONE --roles-C.'{header}'='-{system}' --list-roles='C.*' title 'C.* with enabling system role of h kind after disabling the role' ${CTAGS} --quiet --options=NONE --roles-C.h='-{system}+{system}' --list-roles='C.*' title 'C.* with enabling system role of {header} kind after disabling the role' ${CTAGS} --quiet --options=NONE --roles-C.'{header}'='-{system}+{system}' --list-roles='C.*' title 'C.* with disabling system and local roles of h kind' ${CTAGS} --quiet --options=NONE --roles-C.h='-{system}{local}' --list-roles='C.*' title 'C.* with disabling system and local roles of {header} kind' ${CTAGS} --quiet --options=NONE --roles-C.'{header}'='-{system}{local}' --list-roles='C.*' title 'C.* with enabling system and local roles of h kind' \ 'after disabling all roles in all languages' ${CTAGS} --quiet --options=NONE --roles-all= --roles-C.h='+{system}{local}' --list-roles='C.*' title 'C.* with enabling system and local roles of {header} kind' \ 'after disabling all roles in all languages' ${CTAGS} --quiet --options=NONE --roles-all= --roles-C.'{header}'='+{system}{local}' --list-roles='C.*' title 'C.* with disabling local role of h kind and undef role of d kind' ${CTAGS} --quiet --options=NONE --roles-C.h='-{local}' --roles-C.d='-{undef}' --list-roles='C.*' # miscellaneous combinations title 'C.* with enabling all roles of header kinds after disabling all roles of the kind' ${CTAGS} --quiet --options=NONE --roles-C.'{header}'= --roles-C.'{header}'='*' --list-roles='C.*' title 'C.* with enabling all roles of header kinds after disabling all roles of the kinds of C language' ${CTAGS} --quiet --options=NONE --roles-C.'*'= --roles-C.'{header}'='*' --list-roles='C.*' title 'C.* with enabling all roles of header kinds after disabling all roles of the kinds of C language (short notation)' ${CTAGS} --quiet --options=NONE --roles-C= --roles-C.'{header}'='*' --list-roles='C.*' ================================================ FILE: Tmain/list-roles.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/list-roles.d/stdout-expected.txt ================================================ # # # #LANGUAGE KIND(L/N) NAME ENABLED VER DESCRIPTION Ada p/package subunit on 0 package name referenced in separate() AutoIt S/script local on 0 local include AutoIt S/script system on 0 system include Autoconf e/optenable cmdline on 0 specified in a configure command line Autoconf w/optwith cmdline on 0 specified in a configure command line Automake c/condition branched on 0 used for branching Automake d/directory data on 0 directory for DATA primary Automake d/directory library on 0 directory for LIBRARIES primary Automake d/directory ltlibrary on 0 directory for LTLIBRARIES primary Automake d/directory man on 0 directory for MANS primary Automake d/directory program on 0 directory for PROGRAMS primary Automake d/directory script on 0 directory for SCRIPTS primary Automake p/pseudodir data on 0 directory for DATA primary Automake p/pseudodir library on 0 directory for LIBRARIES primary Automake p/pseudodir ltlibrary on 0 directory for LTLIBRARIES primary Automake p/pseudodir man on 0 directory for MANS primary Automake p/pseudodir program on 0 directory for PROGRAMS primary Automake p/pseudodir script on 0 directory for SCRIPTS primary Basic f/function decl on 0 declared Bats S/script loaded on 0 script loaed with "load" command C d/macro condition off 0 used in part of #if/#ifdef/#elif conditions C d/macro undef on 0 undefined C f/function foreigncall on 2 called in foreign languages C f/function foreigndecl on 1 declared in foreign languages C h/header local on 0 local header C h/header system on 0 system header C s/struct foreigndecl on 1 declared in foreign languages C++ M/module imported on 2 imported with "imported ..." C++ M/module partOwner on 2 used for specifying a partition C++ P/partition imported on 2 imported with "imported ..." C++ d/macro condition off 0 used in part of #if/#ifdef/#elif conditions C++ d/macro undef on 0 undefined C++ h/header exported on 2 exported with "exported imported ..." C++ h/header imported on 2 imported with "imported ..." C++ h/header local on 0 local header C++ h/header system on 0 system header CPreProcessor d/macro condition off 0 used in part of #if/#ifdef/#elif conditions CPreProcessor d/macro undef on 0 undefined CPreProcessor h/header local on 0 local header CPreProcessor h/header system on 0 system header CUDA d/macro condition off 0 used in part of #if/#ifdef/#elif conditions CUDA d/macro undef on 0 undefined CUDA h/header local on 0 local header CUDA h/header system on 0 system header Cobol S/sourcefile copied on 0 copied in source file CobolFree S/sourcefile copied on 0 copied in source file CobolVariable S/sourcefile copied on 0 copied in source file DTD e/element attOwner on 0 attributes owner DTD p/parameterEntity condition on 0 conditions DTD p/parameterEntity elementName on 0 element names DTD p/parameterEntity partOfAttDef on 0 part of attribute definition Elm c/constructor exposed on 0 item exposed from a module Elm f/function exposed on 0 item exposed from a module Elm m/module imported on 0 module imported Elm t/type exposed on 0 item exposed from a module Flex I/import import on 0 imports GDScript c/class extended on 0 used as a base class for extending GemSpec g/gem develDep on 0 specifying development dependency GemSpec g/gem runtimeDep on 0 specifying runtime dependency Go Y/unknown receiverType on 0 receiver type Go p/package imported on 0 imported package HTML C/stylesheet extFile on 0 referenced as external files HTML J/script extFile on 0 referenced as external files HTML c/class attribute on 0 assigned as attributes Java p/package imported on 0 imported package JavaScript c/class chainElt off 0 (EXPERIMENTAL)used as an element in a name chain like a.b.c JavaScript f/function foreigndecl on 1 declared in foreign languages JavaScript v/variable chainElt off 0 (EXPERIMENTAL)used as an element in a name chain like a.b.c Julia Y/unknown imported on 0 loaded by "import" Julia Y/unknown used on 0 loaded by "using" Julia n/module imported on 0 loaded by "import" Julia n/module namespace on 0 only some symbols in it are imported Julia n/module used on 0 loaded by "using" Kconfig k/kconfig source on 0 kconfig file loaded with source directive LEX c/cond grouping on 1 conditions used for grouping of start or exclusive condition rules LdScript i/inputSection destination on 1 specified as the destination of code and data LdScript i/inputSection discarded on 0 discarded when linking LdScript i/inputSection mapped on 0 mapped to output section LdScript s/symbol aliased on 1 aliased with __attribute__((alias(...))) in C/C++ code LdScript s/symbol entrypoint on 0 entry points Lua Y/unknown referenced off 0 referenced somehow M4 I/macrofile included on 0 included macro M4 I/macrofile sincluded on 0 silently included macro M4 d/macro undef on 0 undefined Make I/makefile included on 0 included Make I/makefile optional on 0 optionally included Meson m/module imported on 0 imported NSIS i/script included on 0 included with !include Nftables R/ruleset included on 0 included ruleset Nftables f/family referenced off 0 referenced somehow Odin A/asmfile imported on 0 imported assembly file via foreign Odin C/collection referenced on 0 referenced in import statement Odin L/ccode imported on 0 imported ccode via foreign Odin p/package imported on 0 imported package Perl M/module unused on 0 specified in `no' built-in function Perl M/module used on 0 specified in `use' built-in function Perl h/heredoc endmarker on 0 end marker PkgConfig p/pkg conflicted on 0 conflicted PkgConfig p/pkg provided on 0 provided PkgConfig p/pkg required on 0 required Prolog m/module chainElt off 0 (EXPERIMENTAL)used as an element in a module-qualified atom like module:predicate Protobuf D/protodef imported on 0 imported Protobuf m/message extension on 0 extending the message Python Y/unknown imported on 0 imported from the other module Python Y/unknown indirectlyImported on 0 classes/variables/functions/modules imported in alternative name Python f/function entryPoint on 1 specified as an entry point Python i/module entryPoint on 1 specified as a module of an entry point Python i/module imported on 0 imported modules Python i/module indirectlyImported on 0 module imported in alternative name Python i/module namespace on 0 namespace from where classes/variables/functions are imported R l/library library on 0 library attached by library function R l/library require on 0 library attached by require function R s/source source on 0 source loaded by source fucntion RpmSpec m/macro undef on 0 undefined RpmSpec p/patch decl on 0 declared for applying later Ruby L/library loaded on 0 loaded by "load" method Ruby L/library required on 0 loaded by "require" method Ruby L/library requiredRel on 0 loaded by "require_relative" method SCSS M/module used on 1 used SELinuxTypeEnforcement t/type aliased on 0 aliased SQL k/type decl off 1 declaration (shell in PostgreSQL) Sh h/heredoc endmarker on 0 end marker Sh s/script loaded on 0 loaded SystemTap p/probe attached on 1 attached by code for probing SystemVerilog m/module decl on 0 declaring instances SystemdUnit u/unit After on 0 referred in After key SystemdUnit u/unit Before on 0 referred in Before key SystemdUnit u/unit RequiredBy on 0 referred in RequiredBy key SystemdUnit u/unit Requires on 0 referred in Requires key SystemdUnit u/unit WantedBy on 0 referred in WantedBy key SystemdUnit u/unit Wants on 0 referred in Wants key SystemdUnit u/unit foreignlang on 1 referenced in foreign languages TOML k/key chainElt off 0 (EXPERIMENTAL)used as an element in a key name chain like a.b.c Terraform v/variable assigned on 0 assigned in Variable Definitions (.tfvars) files Tex e/environment used off 0 environment usage introduced by \begin{MyEnv} Tex i/xinput bibliography on 0 bibliography (.bib) file Tex i/xinput included on 0 external input file specified with \include Tex i/xinput input on 0 external input file specified with \input Thrift T/thriftFile included on 0 included file V Y/unknown imported on 0 imported symbol V p/module foreignlang on 0 representing a foreign language (i.e., C, JS...) V p/module imported on 0 imported module VHDL e/entity desigend on 0 designed by an architecture Vera d/macro condition off 0 used in part of #if/#ifdef/#elif conditions Vera d/macro undef on 0 undefined Vera h/header local on 0 local header Vera h/header system on 0 system header Verilog m/module decl on 0 declaring instances Vim h/heredoc endmarker on 0 end marker Zsh f/function autoloaded on 0 function name passed to autoload built-in command Zsh h/heredoc endmarker on 0 end marker Zsh s/script autoloaded on 0 autoloaded Zsh s/script loaded on 0 loaded # # all.* # #LANGUAGE KIND(L/N) NAME ENABLED VER DESCRIPTION Ada p/package subunit on 0 package name referenced in separate() AutoIt S/script local on 0 local include AutoIt S/script system on 0 system include Autoconf e/optenable cmdline on 0 specified in a configure command line Autoconf w/optwith cmdline on 0 specified in a configure command line Automake c/condition branched on 0 used for branching Automake d/directory data on 0 directory for DATA primary Automake d/directory library on 0 directory for LIBRARIES primary Automake d/directory ltlibrary on 0 directory for LTLIBRARIES primary Automake d/directory man on 0 directory for MANS primary Automake d/directory program on 0 directory for PROGRAMS primary Automake d/directory script on 0 directory for SCRIPTS primary Automake p/pseudodir data on 0 directory for DATA primary Automake p/pseudodir library on 0 directory for LIBRARIES primary Automake p/pseudodir ltlibrary on 0 directory for LTLIBRARIES primary Automake p/pseudodir man on 0 directory for MANS primary Automake p/pseudodir program on 0 directory for PROGRAMS primary Automake p/pseudodir script on 0 directory for SCRIPTS primary Basic f/function decl on 0 declared Bats S/script loaded on 0 script loaed with "load" command C d/macro condition off 0 used in part of #if/#ifdef/#elif conditions C d/macro undef on 0 undefined C f/function foreigncall on 2 called in foreign languages C f/function foreigndecl on 1 declared in foreign languages C h/header local on 0 local header C h/header system on 0 system header C s/struct foreigndecl on 1 declared in foreign languages C++ M/module imported on 2 imported with "imported ..." C++ M/module partOwner on 2 used for specifying a partition C++ P/partition imported on 2 imported with "imported ..." C++ d/macro condition off 0 used in part of #if/#ifdef/#elif conditions C++ d/macro undef on 0 undefined C++ h/header exported on 2 exported with "exported imported ..." C++ h/header imported on 2 imported with "imported ..." C++ h/header local on 0 local header C++ h/header system on 0 system header CPreProcessor d/macro condition off 0 used in part of #if/#ifdef/#elif conditions CPreProcessor d/macro undef on 0 undefined CPreProcessor h/header local on 0 local header CPreProcessor h/header system on 0 system header CUDA d/macro condition off 0 used in part of #if/#ifdef/#elif conditions CUDA d/macro undef on 0 undefined CUDA h/header local on 0 local header CUDA h/header system on 0 system header Cobol S/sourcefile copied on 0 copied in source file CobolFree S/sourcefile copied on 0 copied in source file CobolVariable S/sourcefile copied on 0 copied in source file DTD e/element attOwner on 0 attributes owner DTD p/parameterEntity condition on 0 conditions DTD p/parameterEntity elementName on 0 element names DTD p/parameterEntity partOfAttDef on 0 part of attribute definition Elm c/constructor exposed on 0 item exposed from a module Elm f/function exposed on 0 item exposed from a module Elm m/module imported on 0 module imported Elm t/type exposed on 0 item exposed from a module Flex I/import import on 0 imports GDScript c/class extended on 0 used as a base class for extending GemSpec g/gem develDep on 0 specifying development dependency GemSpec g/gem runtimeDep on 0 specifying runtime dependency Go Y/unknown receiverType on 0 receiver type Go p/package imported on 0 imported package HTML C/stylesheet extFile on 0 referenced as external files HTML J/script extFile on 0 referenced as external files HTML c/class attribute on 0 assigned as attributes Java p/package imported on 0 imported package JavaScript c/class chainElt off 0 (EXPERIMENTAL)used as an element in a name chain like a.b.c JavaScript f/function foreigndecl on 1 declared in foreign languages JavaScript v/variable chainElt off 0 (EXPERIMENTAL)used as an element in a name chain like a.b.c Julia Y/unknown imported on 0 loaded by "import" Julia Y/unknown used on 0 loaded by "using" Julia n/module imported on 0 loaded by "import" Julia n/module namespace on 0 only some symbols in it are imported Julia n/module used on 0 loaded by "using" Kconfig k/kconfig source on 0 kconfig file loaded with source directive LEX c/cond grouping on 1 conditions used for grouping of start or exclusive condition rules LdScript i/inputSection destination on 1 specified as the destination of code and data LdScript i/inputSection discarded on 0 discarded when linking LdScript i/inputSection mapped on 0 mapped to output section LdScript s/symbol aliased on 1 aliased with __attribute__((alias(...))) in C/C++ code LdScript s/symbol entrypoint on 0 entry points Lua Y/unknown referenced off 0 referenced somehow M4 I/macrofile included on 0 included macro M4 I/macrofile sincluded on 0 silently included macro M4 d/macro undef on 0 undefined Make I/makefile included on 0 included Make I/makefile optional on 0 optionally included Meson m/module imported on 0 imported NSIS i/script included on 0 included with !include Nftables R/ruleset included on 0 included ruleset Nftables f/family referenced off 0 referenced somehow Odin A/asmfile imported on 0 imported assembly file via foreign Odin C/collection referenced on 0 referenced in import statement Odin L/ccode imported on 0 imported ccode via foreign Odin p/package imported on 0 imported package Perl M/module unused on 0 specified in `no' built-in function Perl M/module used on 0 specified in `use' built-in function Perl h/heredoc endmarker on 0 end marker PkgConfig p/pkg conflicted on 0 conflicted PkgConfig p/pkg provided on 0 provided PkgConfig p/pkg required on 0 required Prolog m/module chainElt off 0 (EXPERIMENTAL)used as an element in a module-qualified atom like module:predicate Protobuf D/protodef imported on 0 imported Protobuf m/message extension on 0 extending the message Python Y/unknown imported on 0 imported from the other module Python Y/unknown indirectlyImported on 0 classes/variables/functions/modules imported in alternative name Python f/function entryPoint on 1 specified as an entry point Python i/module entryPoint on 1 specified as a module of an entry point Python i/module imported on 0 imported modules Python i/module indirectlyImported on 0 module imported in alternative name Python i/module namespace on 0 namespace from where classes/variables/functions are imported R l/library library on 0 library attached by library function R l/library require on 0 library attached by require function R s/source source on 0 source loaded by source fucntion RpmSpec m/macro undef on 0 undefined RpmSpec p/patch decl on 0 declared for applying later Ruby L/library loaded on 0 loaded by "load" method Ruby L/library required on 0 loaded by "require" method Ruby L/library requiredRel on 0 loaded by "require_relative" method SCSS M/module used on 1 used SELinuxTypeEnforcement t/type aliased on 0 aliased SQL k/type decl off 1 declaration (shell in PostgreSQL) Sh h/heredoc endmarker on 0 end marker Sh s/script loaded on 0 loaded SystemTap p/probe attached on 1 attached by code for probing SystemVerilog m/module decl on 0 declaring instances SystemdUnit u/unit After on 0 referred in After key SystemdUnit u/unit Before on 0 referred in Before key SystemdUnit u/unit RequiredBy on 0 referred in RequiredBy key SystemdUnit u/unit Requires on 0 referred in Requires key SystemdUnit u/unit WantedBy on 0 referred in WantedBy key SystemdUnit u/unit Wants on 0 referred in Wants key SystemdUnit u/unit foreignlang on 1 referenced in foreign languages TOML k/key chainElt off 0 (EXPERIMENTAL)used as an element in a key name chain like a.b.c Terraform v/variable assigned on 0 assigned in Variable Definitions (.tfvars) files Tex e/environment used off 0 environment usage introduced by \begin{MyEnv} Tex i/xinput bibliography on 0 bibliography (.bib) file Tex i/xinput included on 0 external input file specified with \include Tex i/xinput input on 0 external input file specified with \input Thrift T/thriftFile included on 0 included file V Y/unknown imported on 0 imported symbol V p/module foreignlang on 0 representing a foreign language (i.e., C, JS...) V p/module imported on 0 imported module VHDL e/entity desigend on 0 designed by an architecture Vera d/macro condition off 0 used in part of #if/#ifdef/#elif conditions Vera d/macro undef on 0 undefined Vera h/header local on 0 local header Vera h/header system on 0 system header Verilog m/module decl on 0 declaring instances Vim h/heredoc endmarker on 0 end marker Zsh f/function autoloaded on 0 function name passed to autoload built-in command Zsh h/heredoc endmarker on 0 end marker Zsh s/script autoloaded on 0 autoloaded Zsh s/script loaded on 0 loaded # # C.* # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef on 0 undefined f/function foreigncall on 2 called in foreign languages f/function foreigndecl on 1 declared in foreign languages h/header local on 0 local header h/header system on 0 system header s/struct foreigndecl on 1 declared in foreign languages # # all.d # #LANGUAGE KIND(L/N) NAME ENABLED VER DESCRIPTION Automake d/directory data on 0 directory for DATA primary Automake d/directory library on 0 directory for LIBRARIES primary Automake d/directory ltlibrary on 0 directory for LTLIBRARIES primary Automake d/directory man on 0 directory for MANS primary Automake d/directory program on 0 directory for PROGRAMS primary Automake d/directory script on 0 directory for SCRIPTS primary C d/macro condition off 0 used in part of #if/#ifdef/#elif conditions C d/macro undef on 0 undefined C++ d/macro condition off 0 used in part of #if/#ifdef/#elif conditions C++ d/macro undef on 0 undefined CPreProcessor d/macro condition off 0 used in part of #if/#ifdef/#elif conditions CPreProcessor d/macro undef on 0 undefined CUDA d/macro condition off 0 used in part of #if/#ifdef/#elif conditions CUDA d/macro undef on 0 undefined M4 d/macro undef on 0 undefined Vera d/macro condition off 0 used in part of #if/#ifdef/#elif conditions Vera d/macro undef on 0 undefined # # Sh.s # #KIND(L/N) NAME ENABLED VER DESCRIPTION s/script loaded on 0 loaded # # C.* with disabling all roles of all languages # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef off 0 undefined f/function foreigncall off 2 called in foreign languages f/function foreigndecl off 1 declared in foreign languages h/header local off 0 local header h/header system off 0 system header s/struct foreigndecl off 1 declared in foreign languages # # C.* with disabling all roles of all kinds of all languages # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef off 0 undefined f/function foreigncall off 2 called in foreign languages f/function foreigndecl off 1 declared in foreign languages h/header local off 0 local header h/header system off 0 system header s/struct foreigndecl off 1 declared in foreign languages # # C.* with enabling all roles of all kinds in all languages # after disabling system role of header kind of C language # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition on 0 used in part of #if/#ifdef/#elif conditions d/macro undef on 0 undefined f/function foreigncall on 2 called in foreign languages f/function foreigndecl on 1 declared in foreign languages h/header local on 0 local header h/header system on 0 system header s/struct foreigndecl on 1 declared in foreign languages # # C.* with enabling all roles in all languages # after disabling system role of header kind of C language # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition on 0 used in part of #if/#ifdef/#elif conditions d/macro undef on 0 undefined f/function foreigncall on 2 called in foreign languages f/function foreigndecl on 1 declared in foreign languages h/header local on 0 local header h/header system on 0 system header s/struct foreigndecl on 1 declared in foreign languages # # C.* with disabling all roles in C language # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef off 0 undefined f/function foreigncall off 2 called in foreign languages f/function foreigndecl off 1 declared in foreign languages h/header local off 0 local header h/header system off 0 system header s/struct foreigndecl off 1 declared in foreign languages # # Sh.* with disabling all roles in C language # #KIND(L/N) NAME ENABLED VER DESCRIPTION h/heredoc endmarker on 0 end marker s/script loaded on 0 loaded # # C.* with disabling all roles of all kinds in C language # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef off 0 undefined f/function foreigncall off 2 called in foreign languages f/function foreigndecl off 1 declared in foreign languages h/header local off 0 local header h/header system off 0 system header s/struct foreigndecl off 1 declared in foreign languages # # Sh.* with disabling all roles of all kinds in C language # #KIND(L/N) NAME ENABLED VER DESCRIPTION h/heredoc endmarker on 0 end marker s/script loaded on 0 loaded # # C.* with enabling all roles in C language # after disabling all roles in all languages # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition on 0 used in part of #if/#ifdef/#elif conditions d/macro undef on 0 undefined f/function foreigncall on 2 called in foreign languages f/function foreigndecl on 1 declared in foreign languages h/header local on 0 local header h/header system on 0 system header s/struct foreigndecl on 1 declared in foreign languages # # Sh.* with enabling all roles in C language # after disabling all roles in all languages # #KIND(L/N) NAME ENABLED VER DESCRIPTION h/heredoc endmarker off 0 end marker s/script loaded off 0 loaded # # C.* with enabling all roles of all kinds in C language # after disabling all roles in all languages # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition on 0 used in part of #if/#ifdef/#elif conditions d/macro undef on 0 undefined f/function foreigncall on 2 called in foreign languages f/function foreigndecl on 1 declared in foreign languages h/header local on 0 local header h/header system on 0 system header s/struct foreigndecl on 1 declared in foreign languages # # Sh.* with enabling all roles of all kinds in C language # after disabling all roles in all languages # #KIND(L/N) NAME ENABLED VER DESCRIPTION h/heredoc endmarker off 0 end marker s/script loaded off 0 loaded # # C.* with disabling all roles of {header} kind in C language # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef on 0 undefined f/function foreigncall on 2 called in foreign languages f/function foreigndecl on 1 declared in foreign languages h/header local off 0 local header h/header system off 0 system header s/struct foreigndecl on 1 declared in foreign languages # # Sh.* with disabling all roles of {header} kind in C language # #KIND(L/N) NAME ENABLED VER DESCRIPTION h/heredoc endmarker on 0 end marker s/script loaded on 0 loaded # # C.* with disabling all roles of h kind in C language # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef on 0 undefined f/function foreigncall on 2 called in foreign languages f/function foreigndecl on 1 declared in foreign languages h/header local off 0 local header h/header system off 0 system header s/struct foreigndecl on 1 declared in foreign languages # # Sh.* with disabling all roles of h kind in C language # #KIND(L/N) NAME ENABLED VER DESCRIPTION h/heredoc endmarker on 0 end marker s/script loaded on 0 loaded # # C.* with enabling all roles of {header} kind in C language # after disabling all roles in all languages # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef off 0 undefined f/function foreigncall off 2 called in foreign languages f/function foreigndecl off 1 declared in foreign languages h/header local on 0 local header h/header system on 0 system header s/struct foreigndecl off 1 declared in foreign languages # # Sh.* with enabling all roles of {header} kind in C language # after disabling all roles in all languages # #KIND(L/N) NAME ENABLED VER DESCRIPTION h/heredoc endmarker off 0 end marker s/script loaded off 0 loaded # # C.* with enabling all roles of h kind in C language # after disabling all roles in all languages # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef off 0 undefined f/function foreigncall off 2 called in foreign languages f/function foreigndecl off 1 declared in foreign languages h/header local on 0 local header h/header system on 0 system header s/struct foreigndecl off 1 declared in foreign languages # # Sh.* with enabling all roles of h kind in C language # after disabling all roles in all languages # #KIND(L/N) NAME ENABLED VER DESCRIPTION h/heredoc endmarker off 0 end marker s/script loaded off 0 loaded # # C.* with disabling system role of h kind # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef on 0 undefined f/function foreigncall on 2 called in foreign languages f/function foreigndecl on 1 declared in foreign languages h/header local on 0 local header h/header system off 0 system header s/struct foreigndecl on 1 declared in foreign languages # # C.* with disabling system role of {header} kind # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef on 0 undefined f/function foreigncall on 2 called in foreign languages f/function foreigndecl on 1 declared in foreign languages h/header local on 0 local header h/header system off 0 system header s/struct foreigndecl on 1 declared in foreign languages # # C.* with enabling system role of h kind after disabling the role # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef on 0 undefined f/function foreigncall on 2 called in foreign languages f/function foreigndecl on 1 declared in foreign languages h/header local on 0 local header h/header system on 0 system header s/struct foreigndecl on 1 declared in foreign languages # # C.* with enabling system role of {header} kind after disabling the role # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef on 0 undefined f/function foreigncall on 2 called in foreign languages f/function foreigndecl on 1 declared in foreign languages h/header local on 0 local header h/header system on 0 system header s/struct foreigndecl on 1 declared in foreign languages # # C.* with disabling system and local roles of h kind # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef on 0 undefined f/function foreigncall on 2 called in foreign languages f/function foreigndecl on 1 declared in foreign languages h/header local off 0 local header h/header system off 0 system header s/struct foreigndecl on 1 declared in foreign languages # # C.* with disabling system and local roles of {header} kind # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef on 0 undefined f/function foreigncall on 2 called in foreign languages f/function foreigndecl on 1 declared in foreign languages h/header local off 0 local header h/header system off 0 system header s/struct foreigndecl on 1 declared in foreign languages # # C.* with enabling system and local roles of h kind # after disabling all roles in all languages # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef off 0 undefined f/function foreigncall off 2 called in foreign languages f/function foreigndecl off 1 declared in foreign languages h/header local on 0 local header h/header system on 0 system header s/struct foreigndecl off 1 declared in foreign languages # # C.* with enabling system and local roles of {header} kind # after disabling all roles in all languages # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef off 0 undefined f/function foreigncall off 2 called in foreign languages f/function foreigndecl off 1 declared in foreign languages h/header local on 0 local header h/header system on 0 system header s/struct foreigndecl off 1 declared in foreign languages # # C.* with disabling local role of h kind and undef role of d kind # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef off 0 undefined f/function foreigncall on 2 called in foreign languages f/function foreigndecl on 1 declared in foreign languages h/header local off 0 local header h/header system on 0 system header s/struct foreigndecl on 1 declared in foreign languages # # C.* with enabling all roles of header kinds after disabling all roles of the kind # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef on 0 undefined f/function foreigncall on 2 called in foreign languages f/function foreigndecl on 1 declared in foreign languages h/header local on 0 local header h/header system on 0 system header s/struct foreigndecl on 1 declared in foreign languages # # C.* with enabling all roles of header kinds after disabling all roles of the kinds of C language # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef off 0 undefined f/function foreigncall off 2 called in foreign languages f/function foreigndecl off 1 declared in foreign languages h/header local on 0 local header h/header system on 0 system header s/struct foreigndecl off 1 declared in foreign languages # # C.* with enabling all roles of header kinds after disabling all roles of the kinds of C language (short notation) # #KIND(L/N) NAME ENABLED VER DESCRIPTION d/macro condition off 0 used in part of #if/#ifdef/#elif conditions d/macro undef off 0 undefined f/function foreigncall off 2 called in foreign languages f/function foreigndecl off 1 declared in foreign languages h/header local on 0 local header h/header system on 0 system header s/struct foreigndecl off 1 declared in foreign languages ================================================ FILE: Tmain/list-subparsers-all.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS="$1" . ../utils.sh is_feature_available $CTAGS xpath is_feature_available $CTAGS yaml ${CTAGS} --quiet --options=NONE \ --list-subparsers=all ================================================ FILE: Tmain/list-subparsers-all.d/stdout-expected.txt ================================================ #NAME BASEPARSER DIRECTIONS AnsiblePlaybook Yaml base <> sub {bidirectional} Ant XML base <> sub {bidirectional} Autoconf M4 base <> sub {bidirectional} Automake Make base <= sub {dedicated} Bats Sh base <= sub {dedicated} BibLaTeX BibTeX base <> sub {bidirectional} Cargo TOML base <= sub {dedicated} DBusIntrospect XML base <> sub {bidirectional} DBusService Iniconf base <= sub {dedicated} FunctionParameters Perl base <> sub {bidirectional} GemSpec Ruby base <= sub {dedicated} Glade XML base <> sub {bidirectional} I18nRubyGem Yaml base <> sub {bidirectional} IPythonCell Python base => sub {shared} ITcl Tcl base <> sub {bidirectional} JNI C base <> sub {bidirectional} JNI C++ base <> sub {bidirectional} Maven2 XML base <> sub {bidirectional} Moose Perl base <> sub {bidirectional} OpenAPI Yaml base <> sub {bidirectional} PlistXML XML base <> sub {bidirectional} PythonEntryPoints Iniconf base <= sub {dedicated} PythonLoggingConfig Iniconf base <> sub {bidirectional} QtMoc C++ base <> sub {bidirectional} Quarto Markdown base <= sub {dedicated} R6Class R base <> sub {bidirectional} RMarkdown Markdown base <= sub {dedicated} RSpec Ruby base => sub {shared} Rake Ruby base <= sub {dedicated} RelaxNG XML base <> sub {bidirectional} S4Class R base <> sub {bidirectional} SELinuxInterface M4 base <= sub {dedicated} SVG XML base <> sub {bidirectional} SystemdUnit Iniconf base <= sub {dedicated} TclOO Tcl base <> sub {bidirectional} TeXBeamer Tex base <> sub {bidirectional} XRC XML base <= sub {dedicated} XSLT XML base <> sub {bidirectional} YumRepo Iniconf base <= sub {dedicated} ================================================ FILE: Tmain/load-conf-files-under-cwd-no-dot.d/ctags.d/a.ctags ================================================ --_echo=hello ================================================ FILE: Tmain/load-conf-files-under-cwd-no-dot.d/ctags.d/b.ctags ================================================ --_echo=world ================================================ FILE: Tmain/load-conf-files-under-cwd-no-dot.d/ctags.d/c.ctags ================================================ --_force-quit=7 ================================================ FILE: Tmain/load-conf-files-under-cwd-no-dot.d/exit-expected.txt ================================================ 7 ================================================ FILE: Tmain/load-conf-files-under-cwd-no-dot.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh skip_if_user_has_dot_ctags_d ${CTAGS} ================================================ FILE: Tmain/load-conf-files-under-cwd-no-dot.d/stderr-expected.txt ================================================ ctags: Notice: hello ctags: Notice: world ================================================ FILE: Tmain/load-conf-files-under-cwd-no-dot.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/load-conf-files-under-cwd.d/.ctags.d/a.ctags ================================================ --_echo=hello ================================================ FILE: Tmain/load-conf-files-under-cwd.d/.ctags.d/b.ctags ================================================ --_echo=world ================================================ FILE: Tmain/load-conf-files-under-cwd.d/.ctags.d/c.ctags ================================================ --_force-quit=7 ================================================ FILE: Tmain/load-conf-files-under-cwd.d/exit-expected.txt ================================================ 7 ================================================ FILE: Tmain/load-conf-files-under-cwd.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh exit_if_win32 "$CTAGS" skip_if_user_has_dot_ctags_d ${CTAGS} ================================================ FILE: Tmain/load-conf-files-under-cwd.d/stderr-expected.txt ================================================ ctags: Notice: hello ctags: Notice: world ================================================ FILE: Tmain/load-conf-files-under-cwd.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/load-conf-files-under-default-xdg-config-home.d/exit-expected.txt ================================================ 7 ================================================ FILE: Tmain/load-conf-files-under-default-xdg-config-home.d/run.sh ================================================ # Copyright: 2019 itchyny # License: GPL-2 CTAGS=$1 . ../utils.sh # $HOME/.config/ctags/*.ctags are loaded export HOME=./myhome export XDG_CONFIG_HOME= ${CTAGS} ================================================ FILE: Tmain/load-conf-files-under-default-xdg-config-home.d/stderr-expected.txt ================================================ ctags: Notice: hello ctags: Notice: world ================================================ FILE: Tmain/load-conf-files-under-default-xdg-config-home.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/load-conf-files-under-home.d/exit-expected.txt ================================================ 7 ================================================ FILE: Tmain/load-conf-files-under-home.d/myhome/.ctags.d/a.ctags ================================================ --_echo=hello ================================================ FILE: Tmain/load-conf-files-under-home.d/myhome/.ctags.d/b.ctags ================================================ --_echo=world ================================================ FILE: Tmain/load-conf-files-under-home.d/myhome/.ctags.d/c.ctags ================================================ --_force-quit=7 ================================================ FILE: Tmain/load-conf-files-under-home.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh exit_if_win32 "$CTAGS" export HOME=./myhome ${CTAGS} ================================================ FILE: Tmain/load-conf-files-under-home.d/stderr-expected.txt ================================================ ctags: Notice: hello ctags: Notice: world ================================================ FILE: Tmain/load-conf-files-under-home.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/load-conf-files-under-xdg-config-home.d/exit-expected.txt ================================================ 7 ================================================ FILE: Tmain/load-conf-files-under-xdg-config-home.d/run.sh ================================================ # Copyright: 2019 itchyny # License: GPL-2 CTAGS=$1 . ../utils.sh # $XDG_CONFIG_HOME/ctags/*.ctags are loaded export XDG_CONFIG_HOME=./.config ${CTAGS} ================================================ FILE: Tmain/load-conf-files-under-xdg-config-home.d/stderr-expected.txt ================================================ ctags: Notice: hello ctags: Notice: world ================================================ FILE: Tmain/load-conf-files-under-xdg-config-home.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/load-dot-ctags-twice.d/dot.ctags ================================================ --_echo=hello ================================================ FILE: Tmain/load-dot-ctags-twice.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/load-dot-ctags-twice.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 # TODO: --quiet ${CTAGS} --options=NONE --options=./dot.ctags --options=./dot.ctags --_force-quit ================================================ FILE: Tmain/load-dot-ctags-twice.d/stderr-expected.txt ================================================ ctags: Notice: No options will be read from files or environment ctags: Notice: hello ================================================ FILE: Tmain/load-dot-ctags-twice.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/lregex-clear-patterns.d/input.c ================================================ DEFINE(x, 1); register(eax); ================================================ FILE: Tmain/lregex-clear-patterns.d/mylang.ctags ================================================ --langdef=MYLANG{base=C} --kinddef-MYLANG=d,def,definitions --kinddef-MYLANG=r,reg,registers --regex-MYLANG=/define\(([a-zA-Z]+)[ \t]*,/\1/d/{icase} --regex-MYLANG=/REGISTER\(([a-zA-Z]+)\)/\1/r/i ================================================ FILE: Tmain/lregex-clear-patterns.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 echo '#' Add a pattern ${CTAGS} --quiet --options=NONE \ --options=./mylang.ctags \ -o - \ input.c echo '#' Clear the pattern ${CTAGS} --quiet --options=NONE \ --options=./mylang.ctags \ --regex-MYLANG= \ -o - \ input.c ================================================ FILE: Tmain/lregex-clear-patterns.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/lregex-clear-patterns.d/stdout-expected.txt ================================================ # Add a pattern eax input.c /^register(eax);$/;" r x input.c /^DEFINE(x, 1);$/;" d # Clear the pattern ================================================ FILE: Tmain/lregex-kind-letter.d/run.sh ================================================ # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS="$1 --quiet --options=NONE" . ../utils.sh echo2 param: '|(.)|\1|^ => ignoring' ${CTAGS} --langdef=x --regex-x='|(.)|\1|^' --list-kinds-full=x # In this case, ctags ignores the substring after the last '|'. # It is evaluated as flags. echo2 param: '|(.)|\1|^| => warning' ${CTAGS} --langdef=x --regex-x='|(.)|\1|^|' --list-kinds-full=x # In this case, ctags warns specifying a wrong kind letter '^'. echo2 param: '|(.)|\1|, => ignoring' ${CTAGS} --langdef=x --regex-x='|(.)|\1|,' --list-kinds-full=x # In this case, ctags ignores the substring after the last '|'. # It is evaluated as flags. echo2 param: '|(.)|\1|,| => using the default letter and name' ${CTAGS} --langdef=x --regex-x='|(.)|\1|,|' --list-kinds-full=x # In this case, ctags recognizes a kind letter and name # are not given; 'r' and "regex" are used as default values. ================================================ FILE: Tmain/lregex-kind-letter.d/stderr-expected.txt ================================================ param: |(.)|\1|^ => ignoring param: |(.)|\1|^| => warning ctags: Kind letter must be an alphabetical character: "^" param: |(.)|\1|, => ignoring param: |(.)|\1|,| => using the default letter and name ================================================ FILE: Tmain/lregex-kind-letter.d/stdout-expected.txt ================================================ param: |(.)|\1|^ => ignoring #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION r regex yes no 0 NONE 0 regex param: |(.)|\1|^| => warning param: |(.)|\1|, => ignoring #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION r regex yes no 0 NONE 0 regex param: |(.)|\1|,| => using the default letter and name #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION r regex yes no 0 NONE 0 regex ================================================ FILE: Tmain/lregex-kind-name.d/run.sh ================================================ # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS="$1 --quiet --options=NONE" . ../utils.sh echo2 param: '|(.)|\1|x,name| => acceptable' ${CTAGS} --langdef=x --regex-x='|(.)|\1|x,name|' --list-kinds-full=x echo2 param: '|(.)|\1|x,name,documents| => acceptable' ${CTAGS} --langdef=x --regex-x='|(.)|\1|x,name,documents|' --list-kinds-full=x echo2 param: '|(.)|\1|x,name,0documents| => acceptable' ${CTAGS} --langdef=x --regex-x='|(.)|\1|x,name,0documents|' --list-kinds-full=x echo2 param: '|(.)|\1|x,name,doc uments| => acceptable' ${CTAGS} --langdef=x --regex-x='|(.)|\1|x,name,doc uments|' --list-kinds-full=x echo2 param: '|(.)|\1|x,name0| => acceptable' ${CTAGS} --langdef=x --regex-x='|(.)|\1|x,name0|' --list-kinds-full=x echo2 param: '|(.)|\1|x,name0,documents| => acceptable' ${CTAGS} --langdef=x --regex-x='|(.)|\1|x,name0,documents|' --list-kinds-full=x echo2 param: '|(.)|\1|x,name0,0documents| => acceptable' ${CTAGS} --langdef=x --regex-x='|(.)|\1|x,name0,0documents|' --list-kinds-full=x echo2 param: '|(.)|\1|x,name0,doc uments| => acceptable' ${CTAGS} --langdef=x --regex-x='|(.)|\1|x,name0,doc uments|' --list-kinds-full=x echo2 param: '|(.)|\1|x,0name| => unacceptable' ${CTAGS} --langdef=x --regex-x='|(.)|\1|x,0name|' --list-kinds-full=x echo2 param: '|(.)|\1|x,0name,documents| => unacceptable' ${CTAGS} --langdef=x --regex-x='|(.)|\1|x,0name,documents|' --list-kinds-full=x echo2 param: '|(.)|\1|x,0name,0documents| => unacceptable' ${CTAGS} --langdef=x --regex-x='|(.)|\1|x,0name,0documents|' --list-kinds-full=x echo2 param: '|(.)|\1|x,0name,doc uments| => unacceptable' ${CTAGS} --langdef=x --regex-x='|(.)|\1|x,0name,doc uments|' --list-kinds-full=x echo2 param: '|(.)|\1|x,na me| => unacceptable' ${CTAGS} --langdef=x --regex-x='|(.)|\1|x,na me|' --list-kinds-full=x echo2 param: '|(.)|\1|x,na me,documents| => unacceptable' ${CTAGS} --langdef=x --regex-x='|(.)|\1|x,na me,documents|' --list-kinds-full=x echo2 param: '|(.)|\1|x,na me,0documents| => unacceptable' ${CTAGS} --langdef=x --regex-x='|(.)|\1|x,na me,0documents|' --list-kinds-full=x echo2 param: '|(.)|\1|x,na me,doc uments| => unacceptable' ${CTAGS} --langdef=x --regex-x='|(.)|\1|x,na me,doc uments|' --list-kinds-full=x ================================================ FILE: Tmain/lregex-kind-name.d/stderr-expected.txt ================================================ param: |(.)|\1|x,name| => acceptable param: |(.)|\1|x,name,documents| => acceptable param: |(.)|\1|x,name,0documents| => acceptable param: |(.)|\1|x,name,doc uments| => acceptable param: |(.)|\1|x,name0| => acceptable param: |(.)|\1|x,name0,documents| => acceptable param: |(.)|\1|x,name0,0documents| => acceptable param: |(.)|\1|x,name0,doc uments| => acceptable param: |(.)|\1|x,0name| => unacceptable ctags: A kind name doesn't start with an alphabetical character: '0name' in "--regex-x" option param: |(.)|\1|x,0name,documents| => unacceptable ctags: A kind name doesn't start with an alphabetical character: '0name' in "--regex-x" option param: |(.)|\1|x,0name,0documents| => unacceptable ctags: A kind name doesn't start with an alphabetical character: '0name' in "--regex-x" option param: |(.)|\1|x,0name,doc uments| => unacceptable ctags: A kind name doesn't start with an alphabetical character: '0name' in "--regex-x" option param: |(.)|\1|x,na me| => unacceptable ctags: Non-alphanumeric char is used in kind name: 'na me' in "--regex-x" option param: |(.)|\1|x,na me,documents| => unacceptable ctags: Non-alphanumeric char is used in kind name: 'na me' in "--regex-x" option param: |(.)|\1|x,na me,0documents| => unacceptable ctags: Non-alphanumeric char is used in kind name: 'na me' in "--regex-x" option param: |(.)|\1|x,na me,doc uments| => unacceptable ctags: Non-alphanumeric char is used in kind name: 'na me' in "--regex-x" option ================================================ FILE: Tmain/lregex-kind-name.d/stdout-expected.txt ================================================ param: |(.)|\1|x,name| => acceptable #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION x name yes no 0 NONE 0 name param: |(.)|\1|x,name,documents| => acceptable #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION x name yes no 0 NONE 0 documents param: |(.)|\1|x,name,0documents| => acceptable #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION x name yes no 0 NONE 0 0documents param: |(.)|\1|x,name,doc uments| => acceptable #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION x name yes no 0 NONE 0 doc uments param: |(.)|\1|x,name0| => acceptable #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION x name0 yes no 0 NONE 0 name0 param: |(.)|\1|x,name0,documents| => acceptable #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION x name0 yes no 0 NONE 0 documents param: |(.)|\1|x,name0,0documents| => acceptable #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION x name0 yes no 0 NONE 0 0documents param: |(.)|\1|x,name0,doc uments| => acceptable #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION x name0 yes no 0 NONE 0 doc uments param: |(.)|\1|x,0name| => unacceptable param: |(.)|\1|x,0name,documents| => unacceptable param: |(.)|\1|x,0name,0documents| => unacceptable param: |(.)|\1|x,0name,doc uments| => unacceptable param: |(.)|\1|x,na me| => unacceptable param: |(.)|\1|x,na me,documents| => unacceptable param: |(.)|\1|x,na me,0documents| => unacceptable param: |(.)|\1|x,na me,doc uments| => unacceptable ================================================ FILE: Tmain/lregex-list-kinds-full.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/lregex-list-kinds-full.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE -o - \ --langdef=foo \ --regex-foo='/a/\0/a,xy,x y z/' --kinds-foo=-a --kinds-foo=+a \ --regex-foo=/b/\0/b/ --kinds-foo=-b \ --regex-foo=/c/\0/c/ \ --kinds-foo=-c \ --regex-foo=/d/\0/d/ \ --machinable \ --with-list-header \ --list-kinds-full=foo | sort ================================================ FILE: Tmain/lregex-list-kinds-full.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/lregex-list-kinds-full.d/stdout-expected.txt ================================================ #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION a xy yes no 0 NONE 0 x y z b regex no no 0 NONE 0 regex c regex no no 0 NONE 0 regex d regex yes no 0 NONE 0 regex ================================================ FILE: Tmain/lregex-list-kinds-uniquely.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE \ --langdef=X \ --regex-X='/./\0/l,label,labels/' \ --regex-X='/./\0/l,label,labels/' \ --list-kinds=X ================================================ FILE: Tmain/lregex-list-kinds-uniquely.d/stdout-expected.txt ================================================ l labels ================================================ FILE: Tmain/lregex-list-kinds.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/lregex-list-kinds.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE -o - \ --langdef=foo \ --regex-foo=/a/\0/a/ --kinds-foo=-a --kinds-foo=+a \ --regex-foo=/b/\0/b/ --kinds-foo=-b \ --regex-foo=/c/\0/c/ \ --kinds-foo=-c \ --regex-foo=/d/\0/d/ \ --list-kinds=foo | sort ================================================ FILE: Tmain/lregex-list-kinds.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/lregex-list-kinds.d/stdout-expected.txt ================================================ a regex b regex [off] c regex [off] d regex ================================================ FILE: Tmain/lregex-reject-reserved-kind.d/exit-expected.txt ================================================ 1 ================================================ FILE: Tmain/lregex-reject-reserved-kind.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE -o - --langdef=foo --regex-foo=/a/\0/F/ run.sh || ${CTAGS} --quiet --options=NONE -o - --langdef=foo --regex-foo=/a/\0/x,file/ run.sh ================================================ FILE: Tmain/lregex-reject-reserved-kind.d/stderr-expected.txt ================================================ ctags: Kind letter 'F' used in regex definition "a" of foo language is reserved in ctags main ctags: Kind name "file" used in regex definition "a" of foo language is reserved in ctags main ================================================ FILE: Tmain/lregex-reject-reserved-kind.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/lregex-scan-the-rest-of-input.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/lregex-scan-the-rest-of-input.d/input.cst ================================================ Q a b c d e f g restdef:x restdef:y restdef:z ================================================ FILE: Tmain/lregex-scan-the-rest-of-input.d/run.sh ================================================ #!/bin/sh # Copyright: 2023 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE -o - \ --kinddef-CTagsSelfTest=a,name,names \ --regex-CTagsSelfTest='/restdef:([a-z])/\1/a/' \ --language-force=CTagsSelfTest input.cst exit $? ================================================ FILE: Tmain/lregex-scan-the-rest-of-input.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/lregex-scan-the-rest-of-input.d/stdout-expected.txt ================================================ x input.cst /^restdef:x$/;" a y input.cst /^restdef:y$/;" a z input.cst /^restdef:z$/;" a ================================================ FILE: Tmain/lregex-unexpected-regex-kind.d/X.ctags ================================================ --langdef=X --kinddef-X=f,foo,foobars --_tabledef-X=main --_tabledef-X=sharp --_mtable-regex-X=main/^#///{tjump=sharp}{_advanceTo=0start} --_mtable-regex-X=sharp/^[^\n]+[\n]//{tjump=main} --mline-regex-X=/^#.*//{_guest=C,0start,0end} ================================================ FILE: Tmain/lregex-unexpected-regex-kind.d/Y-r-regex-with-kinddef.ctags ================================================ --langdef=Y3 --map-Y3=.yyy --kinddef-Y3=r,regex,captured by regex patterns --regex-Y3=/^block//r/{_anonymous=yyy} ================================================ FILE: Tmain/lregex-unexpected-regex-kind.d/Y-r-regex.ctags ================================================ --langdef=Y2 --map-Y2=.yyy --regex-Y2=/^block//r,regex/{_anonymous=yyy} ================================================ FILE: Tmain/lregex-unexpected-regex-kind.d/Y-r.ctags ================================================ --langdef=Y1 --map-Y1=.yyy --regex-Y1=/^block//r/{_anonymous=yyy} ================================================ FILE: Tmain/lregex-unexpected-regex-kind.d/Y-regex.ctags ================================================ --langdef=Y2 --map-Y2=.yyy --regex-Y2=/^block//,regex/{_anonymous=yyy} ================================================ FILE: Tmain/lregex-unexpected-regex-kind.d/Yempty1.ctags ================================================ --langdef=Ye0 --map-Ye0=.yyy --regex-Ye0=/^block//,/{_anonymous=yyy} ================================================ FILE: Tmain/lregex-unexpected-regex-kind.d/Yempty2.ctags ================================================ --langdef=Ye1 --map-Ye1=.yyy --regex-Ye1=/^block//,,/{_anonymous=yyy} ================================================ FILE: Tmain/lregex-unexpected-regex-kind.d/Ynokind.ctags ================================================ --langdef=Y0 --map-Y0=.yyy --regex-Y0=/^block///{_anonymous=yyy} ================================================ FILE: Tmain/lregex-unexpected-regex-kind.d/input.yyy ================================================ block end ================================================ FILE: Tmain/lregex-unexpected-regex-kind.d/run.sh ================================================ # Copyright: 2019 Masatake YAMATO # License: GPL-2 CTAGS="$1 --quiet --options=NONE" BUILDDIR=$2 $CTAGS --options=X.ctags --list-kinds=X echo "# no kind is specified" 1>&2 $CTAGS --options=Ynokind.ctags -o $BUILDDIR/tags input.yyy echo "# no kind (empty,) is specified" 1>&2 $CTAGS --options=Yempty1.ctags -o $BUILDDIR/tags input.yyy echo "# no kind (empty,,) is specified" 1>&2 $CTAGS --options=Yempty2.ctags -o $BUILDDIR/tags input.yyy echo "# (r/) kind is specified inline" 1>&2 $CTAGS --options=Y-r.ctags -o $BUILDDIR/tags input.yyy echo "# (/regex) kind is specified inline" 1>&2 $CTAGS --options=Y-regex.ctags -o $BUILDDIR/tags input.yyy echo "# (r/regex) kind is specified inline" 1>&2 $CTAGS --options=Y-r-regex.ctags -o $BUILDDIR/tags input.yyy echo "# (r/regex) kind defined with --kinddef- option" 1>&2 $CTAGS --options=Y-r-regex-with-kinddef.ctags -o $BUILDDIR/tags input.yyy ================================================ FILE: Tmain/lregex-unexpected-regex-kind.d/stderr-expected.txt ================================================ # no kind is specified ctags: Warning: use "_anonymous" regex flag only with an explicitly defined kind ctags: Warning: ^block: regexp missing name pattern ctags: Warning: input.yyy:1: null expansion of name pattern "" # no kind (empty,) is specified ctags: Warning: use "_anonymous" regex flag only with an explicitly defined kind ctags: Warning: ^block: regexp missing name pattern ctags: Warning: input.yyy:1: null expansion of name pattern "" # no kind (empty,,) is specified ctags: Warning: use "_anonymous" regex flag only with an explicitly defined kind ctags: Warning: ^block: regexp missing name pattern ctags: Warning: input.yyy:1: null expansion of name pattern "" # (r/) kind is specified inline # (/regex) kind is specified inline # (r/regex) kind is specified inline # (r/regex) kind defined with --kinddef- option ================================================ FILE: Tmain/lregex-unexpected-regex-kind.d/stdout-expected.txt ================================================ f foobars ================================================ FILE: Tmain/map-for-unknown-language.d/exit-expected.txt ================================================ 1 ================================================ FILE: Tmain/map-for-unknown-language.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --map-nosuchlang=.Z exit $? ================================================ FILE: Tmain/map-for-unknown-language.d/stderr-expected.txt ================================================ ctags: Unknown language "nosuchlang" in "map-nosuchlang" option ================================================ FILE: Tmain/map-for-unknown-language.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/map-lang-option.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/map-lang-option.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 : && ${CTAGS} --quiet --options=NONE \ --langdef=foo \ --map-foo=.qqq \ --map-foo='.rb' \ --map-foo=+'([Mm]akefile)' \ --map-foo=+'(GNUmakefile)' \ --map-foo=+.html \ --map-foo=+.ppp \ --map-foo=+'(RUN.TTT)' \ --list-maps | grep '\.qqq\|\.ppp\|\.rb\|\.html\|akefile\|RUN.TTT' exit $? ================================================ FILE: Tmain/map-lang-option.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/map-lang-option.d/stdout-expected.txt ================================================ Automake Makefile.am GNUmakefile.am *.am HTML *.htm *.html Make [Mm]akefile GNUmakefile *.mak *.mk Rake Rakefile *.rake Ruby *.rb *.ruby foo [Mm]akefile GNUmakefile RUN.TTT *.rb *.html *.ppp ================================================ FILE: Tmain/map-removing.d/ada.m ================================================ -*- Ada -*- ================================================ FILE: Tmain/map-removing.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/map-removing.d/matlab.m ================================================ -*- matlab -*- ================================================ FILE: Tmain/map-removing.d/objc.m ================================================ -*- objc -*- ================================================ FILE: Tmain/map-removing.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh if ! ( echo 'MatLab *.m' | grep -E '\*\.m\>.*$' > /dev/null); then skip "'grep -E' needed in this case doesn't work expectedly" fi echo default map including '*.m' echo ======================================= ${CTAGS} --quiet --options=NONE \ --list-maps | grep -E '\*\.m\>.*$' echo echo '[--map-]' removing from '*.m' from 'ObjectiveC' echo ======================================= ${CTAGS} --quiet --options=NONE \ --map-ObjectiveC=-.m --list-maps | grep -E '\*\.m\>.*$' echo echo '[--map-]' adding '*.m' to 'Ada' echo ======================================= ${CTAGS} --quiet --options=NONE \ --map-Ada=+.m --list-maps | grep -E '\*\.m\>.*$' echo echo '[--map-]' removing from '*.m' from 'ObjectiveC', and adding '*.m' to 'Ada' echo ======================================= ${CTAGS} --quiet --options=NONE \ --map-ObjectiveC=-.m --map-Ada=+.m --list-maps | grep -E '\*\.m\>.*$' echo echo '[--map-]' guessing parser with adding '*.m' to 'Ada' echo ======================================= ${CTAGS} --quiet --options=NONE \ --print-language \ --map-Ada=+.m \ ada.m matlab.m objc.m echo echo '[--map- --guess-language-eagerly]' guessing parser with adding '*.m' to 'Ada' echo ======================================= ${CTAGS} --quiet --options=NONE \ --print-language \ --map-Ada=+.m \ --guess-language-eagerly \ ada.m matlab.m objc.m echo X=xxxyyyzzz echo 'Removing multi extension entries' ${CTAGS} --quiet --options=NONE \ --map-Pascal=.$X \ --map-Fortran=.$X \ --langmap=C:.$X \ --list-maps | grep $X echo 'Removing multi pattern entries' ${CTAGS} --quiet --options=NONE \ --map-Pascal='('$X')' \ --map-Fortran='('$X')' \ --langmap=C:'('$X')' \ --list-maps | grep $X ================================================ FILE: Tmain/map-removing.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/map-removing.d/stdout-expected.txt ================================================ default map including *.m ======================================= MatLab *.m ObjectiveC *.mm *.m *.h [--map-] removing from *.m from ObjectiveC ======================================= MatLab *.m [--map-] adding *.m to Ada ======================================= Ada *.adb *.ads *.Ada *.ada *.m MatLab *.m ObjectiveC *.mm *.m *.h [--map-] removing from *.m from ObjectiveC, and adding *.m to Ada ======================================= Ada *.adb *.ads *.Ada *.ada *.m MatLab *.m [--map-] guessing parser with adding *.m to Ada ======================================= ada.m: Ada matlab.m: Ada objc.m: Ada [--map- --guess-language-eagerly] guessing parser with adding *.m to Ada ======================================= ada.m: Ada matlab.m: MatLab objc.m: ObjectiveC Removing multi extension entries C *.xxxyyyzzz Removing multi pattern entries C xxxyyyzzz ================================================ FILE: Tmain/map-rexpr.d/macros.d/macros.vim ================================================ %vimfiles_root %{_datadir}/vim/vimfiles ================================================ FILE: Tmain/map-rexpr.d/run.sh ================================================ # Copyright: 2025 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh echo "# < macros.d/macros.vm" ${CTAGS} --quiet --options=NONE --print-language macros.d/macros.vim ${CTAGS} --quiet --options=NONE -o - macros.d/macros.vim echo "# cd macros.d; < macros.vim" ( cd macros.d; ${CTAGS} --quiet --options=NONE --print-language macros.vim; ${CTAGS} --quiet --options=NONE -o - macros.vim ) ================================================ FILE: Tmain/map-rexpr.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/map-rexpr.d/stdout-expected.txt ================================================ # < macros.d/macros.vm macros.d/macros.vim: RpmMacros vimfiles_root macros.d/macros.vim /^%vimfiles_root %{_datadir}\/vim\/vimfiles$/;" m # cd macros.d; < macros.vim macros.vim: Vim ================================================ FILE: Tmain/maxdepth.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 echo '# DEPTH=1' ${CTAGS} --quiet --options=NONE --maxdepth=1 -R -o - ./src echo '# DEPTH=2' ${CTAGS} --quiet --options=NONE --maxdepth=2 -R -o - ./src exit $? ================================================ FILE: Tmain/maxdepth.d/src/a.c ================================================ int a (void) { return 0; } ================================================ FILE: Tmain/maxdepth.d/src/subdir/b.c ================================================ int b(void) { return 0; } ================================================ FILE: Tmain/maxdepth.d/stdout-expected.txt ================================================ # DEPTH=1 a ./src/a.c /^int a (void)$/;" f typeref:typename:int # DEPTH=2 a ./src/a.c /^int a (void)$/;" f typeref:typename:int b ./src/subdir/b.c /^int b(void)$/;" f typeref:typename:int ================================================ FILE: Tmain/mline-no-advance.d/args.ctags ================================================ --mline-regex-FOO=/(.)/\1/{_advanceTo=1start} ================================================ FILE: Tmain/mline-no-advance.d/input.foo ================================================ a ================================================ FILE: Tmain/mline-no-advance.d/run.sh ================================================ # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --options=NONE \ --langdef=FOO \ --map-FOO=+.foo \ --options=./args.ctags \ -o - \ ./input.foo ================================================ FILE: Tmain/mline-no-advance.d/stderr-expected.txt ================================================ ctags: Notice: No options will be read from files or environment ctags: Warning: FOO: no {mgroup=N} flag given in --mline-regex-=/(.)/\1/{_advanceTo=1start}... (addTagRegexOption) ctags: Warning: a multi line regex pattern doesn't advance the input cursor: (.) ctags: Warning: Language: FOO, input file: ./input.foo, pos: 0 ================================================ FILE: Tmain/mtable-avoid-infinite-loop-at-the-eof.d/args.ctags ================================================ --langdef=FOO --map-FOO=+.foo --_tabledef-FOO=main --kinddef-FOO=e,eof,the end of file --_mtable-regex-FOO=main//eof/e/ ================================================ FILE: Tmain/mtable-avoid-infinite-loop-at-the-eof.d/input.foo ================================================ ================================================ FILE: Tmain/mtable-avoid-infinite-loop-at-the-eof.d/input2.foo ================================================ a ================================================ FILE: Tmain/mtable-avoid-infinite-loop-at-the-eof.d/run.sh ================================================ # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --options=NONE --options=./args.ctags --sort=no -o - ./input.foo ./input2.foo ================================================ FILE: Tmain/mtable-avoid-infinite-loop-at-the-eof.d/stderr-expected.txt ================================================ ctags: Notice: No options will be read from files or environment ctags: Warning: Forcefully advance the input pos because ctags: Warning: following conditions for entering infinite loop are satisfied: ctags: Warning: + matching the pattern succeeds, ctags: Warning: + the next table is not given, and ctags: Warning: + the input file pos doesn't advance. ctags: Warning: Language: FOO, input file: ./input.foo, pos: 0 ctags: Warning: Forcefully advance the input pos because ctags: Warning: following conditions for entering infinite loop are satisfied: ctags: Warning: + matching the pattern succeeds, ctags: Warning: + the next table is not given, and ctags: Warning: + the input file pos doesn't advance. ctags: Warning: Language: FOO, input file: ./input2.foo, pos: 0 ctags: Warning: Forcefully advance the input pos because ctags: Warning: following conditions for entering infinite loop are satisfied: ctags: Warning: + matching the pattern succeeds, ctags: Warning: + the next table is not given, and ctags: Warning: + the input file pos doesn't advance. ctags: Warning: Language: FOO, input file: ./input2.foo, pos: 1 ================================================ FILE: Tmain/mtable-avoid-infinite-loop-at-the-eof.d/stdout-expected.txt ================================================ eof ./input.foo /^/;" e eof ./input2.foo /^a/;" e eof ./input2.foo /^a/;" e ================================================ FILE: Tmain/mtable-mutual-entering.d/args.ctags ================================================ --langdef=FOO --map-FOO=+.foo --_tabledef-FOO=A --_tabledef-FOO=B --_mtable-regex-FOO=A/define (.)/\1/ --_mtable-regex-FOO=A/([a-z]*)///{tenter=B} --_mtable-regex-FOO=B/([a-z]*)///{tenter=A} --langdef=BAR --map-BAR=+.bar --_tabledef-BAR=C --_tabledef-BAR=D --_mtable-regex-BAR=C/([a-z]*)///{tenter=D} --_mtable-regex-BAR=D/([a-z]*)///{tenter=C} --langdef=BAZ --map-BAZ=+.baz --_tabledef-BAZ=E --_tabledef-BAZ=F --_mtable-regex-BAZ=E/([0-9])///{tenter=F} --_mtable-regex-BAZ=F/([0-9])///{tenter=E} ================================================ FILE: Tmain/mtable-mutual-entering.d/input0.foo ================================================ ================================================ FILE: Tmain/mtable-mutual-entering.d/input1.foo ================================================ define x ================================================ FILE: Tmain/mtable-mutual-entering.d/input2.bar ================================================ ================================================ FILE: Tmain/mtable-mutual-entering.d/input3.baz ================================================ 0123456789012345678901234567890123456789012345678901234567890123456789 ================================================ FILE: Tmain/mtable-mutual-entering.d/run.sh ================================================ # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --options=NONE --options=./args.ctags -o - \ ./input0.foo ./input1.foo \ ./input2.bar \ ./input3.baz ================================================ FILE: Tmain/mtable-mutual-entering.d/stderr-expected.txt ================================================ ctags: Notice: No options will be read from files or environment ctags: Warning: mtable: the tenter/tleave stack overflows at 0 in ./input0.foo ctags: Warning: DUMP FROM THE TOP: ctags: Warning: 64 A ctags: Warning: 63 B ctags: Warning: 62 A ctags: Warning: 61 B ctags: Warning: 60 A ctags: Warning: 59 B ctags: Warning: 58 A ctags: Warning: 57 B ctags: Warning: 56 A ctags: Warning: 55 B ctags: Warning: 54 A ctags: Warning: 53 B ctags: Warning: 52 A ctags: Warning: 51 B ctags: Warning: 50 A ctags: Warning: 49 B ctags: Warning: 48 A ctags: Warning: 47 B ctags: Warning: 46 A ctags: Warning: 45 B ctags: Warning: 44 A ctags: Warning: 43 B ctags: Warning: 42 A ctags: Warning: 41 B ctags: Warning: 40 A ctags: Warning: 39 B ctags: Warning: 38 A ctags: Warning: 37 B ctags: Warning: 36 A ctags: Warning: 35 B ctags: Warning: 34 A ctags: Warning: 33 B ctags: Warning: 32 A ctags: Warning: 31 B ctags: Warning: 30 A ctags: Warning: 29 B ctags: Warning: 28 A ctags: Warning: 27 B ctags: Warning: 26 A ctags: Warning: 25 B ctags: Warning: 24 A ctags: Warning: 23 B ctags: Warning: 22 A ctags: Warning: 21 B ctags: Warning: 20 A ctags: Warning: 19 B ctags: Warning: 18 A ctags: Warning: 17 B ctags: Warning: 16 A ctags: Warning: 15 B ctags: Warning: 14 A ctags: Warning: 13 B ctags: Warning: 12 A ctags: Warning: 11 B ctags: Warning: 10 A ctags: Warning: 9 B ctags: Warning: 8 A ctags: Warning: 7 B ctags: Warning: 6 A ctags: Warning: 5 B ctags: Warning: 4 A ctags: Warning: 3 B ctags: Warning: 2 A ctags: Warning: 1 B ctags: Warning: 0 A ctags: Warning: mtable: the tenter/tleave stack overflows at 8 in ./input1.foo ctags: Warning: DUMP FROM THE TOP: ctags: Warning: 64 A ctags: Warning: 63 B ctags: Warning: 62 A ctags: Warning: 61 B ctags: Warning: 60 A ctags: Warning: 59 B ctags: Warning: 58 A ctags: Warning: 57 B ctags: Warning: 56 A ctags: Warning: 55 B ctags: Warning: 54 A ctags: Warning: 53 B ctags: Warning: 52 A ctags: Warning: 51 B ctags: Warning: 50 A ctags: Warning: 49 B ctags: Warning: 48 A ctags: Warning: 47 B ctags: Warning: 46 A ctags: Warning: 45 B ctags: Warning: 44 A ctags: Warning: 43 B ctags: Warning: 42 A ctags: Warning: 41 B ctags: Warning: 40 A ctags: Warning: 39 B ctags: Warning: 38 A ctags: Warning: 37 B ctags: Warning: 36 A ctags: Warning: 35 B ctags: Warning: 34 A ctags: Warning: 33 B ctags: Warning: 32 A ctags: Warning: 31 B ctags: Warning: 30 A ctags: Warning: 29 B ctags: Warning: 28 A ctags: Warning: 27 B ctags: Warning: 26 A ctags: Warning: 25 B ctags: Warning: 24 A ctags: Warning: 23 B ctags: Warning: 22 A ctags: Warning: 21 B ctags: Warning: 20 A ctags: Warning: 19 B ctags: Warning: 18 A ctags: Warning: 17 B ctags: Warning: 16 A ctags: Warning: 15 B ctags: Warning: 14 A ctags: Warning: 13 B ctags: Warning: 12 A ctags: Warning: 11 B ctags: Warning: 10 A ctags: Warning: 9 B ctags: Warning: 8 A ctags: Warning: 7 B ctags: Warning: 6 A ctags: Warning: 5 B ctags: Warning: 4 A ctags: Warning: 3 B ctags: Warning: 2 A ctags: Warning: 1 B ctags: Warning: 0 A ctags: Warning: mtable: the tenter/tleave stack overflows at 0 in ./input2.bar ctags: Warning: DUMP FROM THE TOP: ctags: Warning: 64 C ctags: Warning: 63 D ctags: Warning: 62 C ctags: Warning: 61 D ctags: Warning: 60 C ctags: Warning: 59 D ctags: Warning: 58 C ctags: Warning: 57 D ctags: Warning: 56 C ctags: Warning: 55 D ctags: Warning: 54 C ctags: Warning: 53 D ctags: Warning: 52 C ctags: Warning: 51 D ctags: Warning: 50 C ctags: Warning: 49 D ctags: Warning: 48 C ctags: Warning: 47 D ctags: Warning: 46 C ctags: Warning: 45 D ctags: Warning: 44 C ctags: Warning: 43 D ctags: Warning: 42 C ctags: Warning: 41 D ctags: Warning: 40 C ctags: Warning: 39 D ctags: Warning: 38 C ctags: Warning: 37 D ctags: Warning: 36 C ctags: Warning: 35 D ctags: Warning: 34 C ctags: Warning: 33 D ctags: Warning: 32 C ctags: Warning: 31 D ctags: Warning: 30 C ctags: Warning: 29 D ctags: Warning: 28 C ctags: Warning: 27 D ctags: Warning: 26 C ctags: Warning: 25 D ctags: Warning: 24 C ctags: Warning: 23 D ctags: Warning: 22 C ctags: Warning: 21 D ctags: Warning: 20 C ctags: Warning: 19 D ctags: Warning: 18 C ctags: Warning: 17 D ctags: Warning: 16 C ctags: Warning: 15 D ctags: Warning: 14 C ctags: Warning: 13 D ctags: Warning: 12 C ctags: Warning: 11 D ctags: Warning: 10 C ctags: Warning: 9 D ctags: Warning: 8 C ctags: Warning: 7 D ctags: Warning: 6 C ctags: Warning: 5 D ctags: Warning: 4 C ctags: Warning: 3 D ctags: Warning: 2 C ctags: Warning: 1 D ctags: Warning: 0 C ctags: Warning: mtable: the tenter/tleave stack overflows at 65 in ./input3.baz ctags: Warning: DUMP FROM THE TOP: ctags: Warning: 64 E ctags: Warning: 63 F ctags: Warning: 62 E ctags: Warning: 61 F ctags: Warning: 60 E ctags: Warning: 59 F ctags: Warning: 58 E ctags: Warning: 57 F ctags: Warning: 56 E ctags: Warning: 55 F ctags: Warning: 54 E ctags: Warning: 53 F ctags: Warning: 52 E ctags: Warning: 51 F ctags: Warning: 50 E ctags: Warning: 49 F ctags: Warning: 48 E ctags: Warning: 47 F ctags: Warning: 46 E ctags: Warning: 45 F ctags: Warning: 44 E ctags: Warning: 43 F ctags: Warning: 42 E ctags: Warning: 41 F ctags: Warning: 40 E ctags: Warning: 39 F ctags: Warning: 38 E ctags: Warning: 37 F ctags: Warning: 36 E ctags: Warning: 35 F ctags: Warning: 34 E ctags: Warning: 33 F ctags: Warning: 32 E ctags: Warning: 31 F ctags: Warning: 30 E ctags: Warning: 29 F ctags: Warning: 28 E ctags: Warning: 27 F ctags: Warning: 26 E ctags: Warning: 25 F ctags: Warning: 24 E ctags: Warning: 23 F ctags: Warning: 22 E ctags: Warning: 21 F ctags: Warning: 20 E ctags: Warning: 19 F ctags: Warning: 18 E ctags: Warning: 17 F ctags: Warning: 16 E ctags: Warning: 15 F ctags: Warning: 14 E ctags: Warning: 13 F ctags: Warning: 12 E ctags: Warning: 11 F ctags: Warning: 10 E ctags: Warning: 9 F ctags: Warning: 8 E ctags: Warning: 7 F ctags: Warning: 6 E ctags: Warning: 5 F ctags: Warning: 4 E ctags: Warning: 3 F ctags: Warning: 2 E ctags: Warning: 1 F ctags: Warning: 0 E ================================================ FILE: Tmain/mtable-mutual-entering.d/stdout-expected.txt ================================================ x ./input1.foo /^define x$/;" r ================================================ FILE: Tmain/mtable-pinning.d/args.ctags ================================================ --langdef=FOO --map-FOO=+.foo --_tabledef-FOO=A --_tabledef-FOO=B --_mtable-regex-FOO=A/x//{tjump=B}{_advanceTo=0start} --_mtable-regex-FOO=B/x//{tjump=A}{_advanceTo=0start} --_mtable-regex-FOO=A/y//{tjump=A}{_advanceTo=0start} ================================================ FILE: Tmain/mtable-pinning.d/input0.foo ================================================ x ================================================ FILE: Tmain/mtable-pinning.d/input1.foo ================================================ y ================================================ FILE: Tmain/mtable-pinning.d/run.sh ================================================ # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --options=NONE --options=./args.ctags -o - \ ./input0.foo \ ./input1.foo ================================================ FILE: Tmain/mtable-pinning.d/stderr-expected.txt ================================================ ctags: Notice: No options will be read from files or environment ctags: Warning: mtable: the input cursor stays at 0 in ./input0.foo so long though the tables are switched ctags: Warning: mtable: the input cursor stays at 0 in ./input1.foo so long though the tables are switched ================================================ FILE: Tmain/mtable-stats.d/args.ctags ================================================ --langdef=FOO --map-FOO=+.foo --kinddef-FOO=n,namespace,namespaces --kinddef-FOO=c,class,classes --kinddef-FOO=v,variable,variables --_tabledef-FOO=main --_tabledef-FOO=block --_tabledef-FOO=blockEnd --_tabledef-FOO=skipWhitespace --_mtable-regex-FOO=skipWhitespace/[ \t\n]+// --_mtable-regex-FOO=main/namespace ([a-zA-Z]+) \{/\1/n/{tenter=block,blockEnd}{scope=push} --_mtable-extend-FOO=main+skipWhitespace --_mtable-regex-FOO=main/// --_mtable-regex-FOO=blockEnd/\};?//{scope=pop} --_mtable-extend-FOO=blockEnd+skipWhitespace --_mtable-regex-FOO=block/class ([a-zA-Z]+) \{/\1/c/{tenter=block,blockEnd}{scope=ref}{scope=push} --_mtable-regex-FOO=block/var ([a-zA-Z]+) ([a-zA-Z]+);/\2/v/{scope=ref} --_mtable-extend-FOO=block+skipWhitespace ================================================ FILE: Tmain/mtable-stats.d/input.foo ================================================ namespace A { class B { var bool C; }; } ================================================ FILE: Tmain/mtable-stats.d/run.sh ================================================ # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh stats=/tmp/ctags-Tmain-$$ ${CTAGS} --quiet --options=NONE --options=./args.ctags --totals=extra -o - ./input.foo 2> ${stats} sed -n -e '/^MTABLE REGEX.*/,$p' ${stats} 1>&2 rm ${stats} ================================================ FILE: Tmain/mtable-stats.d/stderr-expected.txt ================================================ MTABLE REGEX STATISTICS of FOO ============================================== main ----------------------- 1/1 ^namespace ([a-zA-Z]+) \\{ ref: 1 0/0 ^[ \t\n]+ ref: 4 0/0 ^ ref: 1 block ----------------------- 1/6 ^class ([a-zA-Z]+) \\{ ref: 1 1/5 ^var ([a-zA-Z]+) ([a-zA-Z]+); ref: 1 3/4 ^[ \t\n]+ ref: 4 blockEnd ----------------------- 2/6 ^\\};? ref: 1 2/4 ^[ \t\n]+ ref: 4 skipWhitespace ----------------------- 0/0 ^[ \t\n]+ ref: 4 ================================================ FILE: Tmain/mtable-stats.d/stdout-expected.txt ================================================ A ./input.foo /^namespace A {$/;" n B ./input.foo /^ class B {$/;" c namespace:A C ./input.foo /^ var bool C;$/;" v class:A.B ================================================ FILE: Tmain/multi-roles.d/input.x ================================================ r R ================================================ FILE: Tmain/multi-roles.d/run.sh ================================================ #!/bin/sh # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS=$1 echo '# rolesDisabled is kept disabled' $CTAGS --quiet --options=NONE --sort=no --language-force=CTagsSelfTest --extras=r --fields=Kr -o - input.x echo '# rolesDisabled is enabled' $CTAGS --quiet --options=NONE --sort=no --language-force=CTagsSelfTest --extras=r --fields=Kr --kinds-CTagsSelfTest=+R -o - input.x exit $? ================================================ FILE: Tmain/multi-roles.d/stdout-expected.txt ================================================ # rolesDisabled is kept disabled multiRolesTarget input.x /^r$/;" roles roles:a,b,d # rolesDisabled is enabled multiRolesTarget input.x /^r$/;" roles roles:a,b,d multiRolesDisabledTarget input.x /^R$/;" rolesDisabled roles:A multiRolesDisabledTarget input.x /^R$/;" rolesDisabled roles:B ================================================ FILE: Tmain/nameless-long-option.d/exit-expected.txt ================================================ 1 ================================================ FILE: Tmain/nameless-long-option.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --options=NONE -- exit $? ================================================ FILE: Tmain/nameless-long-option.d/stderr-expected.txt ================================================ ctags: Notice: No options will be read from files or environment ctags: Unknown option: -- ================================================ FILE: Tmain/nameless-long-option.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/nested-mio.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/nested-mio.d/input.cst ================================================ B N E ================================================ FILE: Tmain/nested-mio.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --options=NONE -o - --extras=+g --language-force=CTagsSelfTest input.cst exit $? ================================================ FILE: Tmain/nested-mio.d/stdout-expected.txt ================================================ NOTHING_SPECIAL input.cst /^N$/;" N ================================================ FILE: Tmain/nested-subparsers-multilines.d/event.ctags ================================================ --langdef=Event{base=C} --kinddef-Event=e,event,events --mline-regex-Event=/DEFINE_EVENT\(([^;]|[[:space:]])*[[:space:],]([a-zA-Z_][a-zA-Z0-9_]*)\);/\2/e/{mgroup=1} ================================================ FILE: Tmain/nested-subparsers-multilines.d/hook.ctags ================================================ --langdef=Hook{base=Event} --kinddef-Hook=h,hook,hooks --mline-regex-Hook=/DEFINE_HOOK\(([^;]|[[:space:]])*[[:space:],]([a-zA-Z_][a-zA-Z0-9_]*)\);/\2/h/{mgroup=1} ================================================ FILE: Tmain/nested-subparsers-multilines.d/input.c ================================================ DEFINE_EVENT(a, b); DEFINE_HOOK(h, i); int main(void) { } ================================================ FILE: Tmain/nested-subparsers-multilines.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS="$1" ${CTAGS} --quiet --options=NONE \ --options=./event.ctags \ --options=./hook.ctags \ --fields=+lK \ -o - input.c ================================================ FILE: Tmain/nested-subparsers-multilines.d/stdout-expected.txt ================================================ b input.c /^ b);$/;" event language:Event i input.c /^ i);$/;" hook language:Hook main input.c /^main(void)$/;" function language:C typeref:typename:int ================================================ FILE: Tmain/nested-subparsers.d/event.ctags ================================================ --langdef=Event{base=C} --kinddef-Event=e,event,events --regex-Event=/DEFINE_EVENT\((.*)\);/\1/e/ ================================================ FILE: Tmain/nested-subparsers.d/hook.ctags ================================================ --langdef=Hook{base=Event} --kinddef-Hook=h,hook,hooks --regex-Hook=/DEFINE_HOOK\((.*)\);/\1/h/' ================================================ FILE: Tmain/nested-subparsers.d/input.c ================================================ DEFINE_EVENT(a); DEFINE_EVENT(b); DEFINE_HOOK(h); DEFINE_HOOK(i); int main(void) { LOAD_PLUGIN(mylib.so, isearch); int u __attribute__((unused)); } ================================================ FILE: Tmain/nested-subparsers.d/plugin.ctags ================================================ --langdef=Plugin{base=C} --kinddef-Plugin=f,File,files --kinddef-Plugin=n,name,name --regex-Plugin=/LOAD_PLUGIN\((.*),[ \t]*(.*)\);/\1/f/ --regex-Plugin=/LOAD_PLUGIN\((.*),[ \t]*(.*)\);/\2/n/ ================================================ FILE: Tmain/nested-subparsers.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS="$1 --quiet --options=NONE --fields=+lK" list_kinds() { echo '#' echo '#' list kinds$2 $1 echo '#' ${CTAGS} -o - \ --options=./event.ctags \ --options=./hook.ctags \ --options=./plugin.ctags \ --list-kinds$2=$1 } list_kinds C list_kinds Event list_kinds Hook list_kinds Plugin list_kinds C -full list_kinds Event -full list_kinds Hook -full list_kinds Plugin -full echo C only ${CTAGS} -o - input.c echo echo C + EVENT ${CTAGS} -o - \ --options=./event.ctags \ input.c echo echo C + EVENT + HOOK ${CTAGS} -o - \ --options=./event.ctags \ --options=./hook.ctags \ input.c echo echo C + EVENT + HOOK + PLUGIN ${CTAGS} -o - \ --options=./event.ctags \ --options=./hook.ctags \ --options=./plugin.ctags \ input.c echo echo C + EVENT + HOOK + PLUGIN + UA ${CTAGS} -o - \ --options=./event.ctags \ --options=./hook.ctags \ --options=./plugin.ctags \ --options=./unused-attr.ctags \ input.c echo echo 'C(disabled)' + EVENT + HOOK + PLUGIN + UA ${CTAGS} -o - \ --options=./event.ctags \ --options=./hook.ctags \ --options=./plugin.ctags \ --options=./unused-attr.ctags \ --languages=-C \ input.c echo echo C + 'EVENT(disabled)' + HOOK + PLUGIN + UA ${CTAGS} -o - \ --options=./event.ctags \ --options=./hook.ctags \ --options=./plugin.ctags \ --options=./unused-attr.ctags \ --languages=-Event \ input.c echo echo C + 'EVENT' + 'HOOK(disabled)' + PLUGIN + UA ${CTAGS} -o - \ --options=./event.ctags \ --options=./hook.ctags \ --options=./plugin.ctags \ --options=./unused-attr.ctags \ --languages=-Hook \ input.c echo echo C + 'EVENT' + 'HOOK' + PLUGIN + 'UA(-v)' ${CTAGS} -o - \ --options=./event.ctags \ --options=./hook.ctags \ --options=./plugin.ctags \ --options=./unused-attr.ctags \ --kinds-UnusedAttr=-v \ input.c echo List subparsers of C '(' 'EVENT' + 'HOOK' + PLUGIN + 'UA' ')' ${CTAGS} \ --options=./event.ctags \ --options=./hook.ctags \ --options=./plugin.ctags \ --options=./unused-attr.ctags \ --list-subparsers=C echo List subparsers of C '(' 'EVENT' + 'HOOK' + PLUGIN + 'UA' ')' without the header ${CTAGS} --with-list-header=no \ --options=./event.ctags \ --options=./hook.ctags \ --options=./plugin.ctags \ --options=./unused-attr.ctags \ --list-subparsers=C echo List subparsers of C '(' 'EVENT' + 'HOOK' + PLUGIN + 'UA' ')' in machinable ${CTAGS} \ --options=./event.ctags \ --options=./hook.ctags \ --options=./plugin.ctags \ --options=./unused-attr.ctags \ --machinable \ --list-subparsers=C echo List subparsers of C '(' 'EVENT' + 'HOOK' + PLUGIN + 'UA' ')' in machinable without the header ${CTAGS} --with-list-header=no \ --options=./event.ctags \ --options=./hook.ctags \ --options=./plugin.ctags \ --options=./unused-attr.ctags \ --machinable \ --list-subparsers=C ================================================ FILE: Tmain/nested-subparsers.d/stdout-expected.txt ================================================ # # list kinds C # d macro definitions e enumerators (values inside an enumeration) f function definitions g enumeration names h included header files l local variables [off] m struct, and union members p function prototypes [off] s structure names t typedefs u union names v variable definitions x external and forward variable declarations [off] z function parameters inside function or prototype definitions [off] L goto labels [off] D parameters inside macro definitions [off] # # list kinds Event # e events # # list kinds Hook # h hooks # # list kinds Plugin # f files n name # # list kinds-full C # #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION D macroparam no no 0 C 0 parameters inside macro definitions L label no no 0 C 0 goto labels d macro yes no 2 C 0 macro definitions e enumerator yes no 0 C 0 enumerators (values inside an enumeration) f function yes no 2 C 0 function definitions g enum yes no 0 C 0 enumeration names h header yes yes 2 C 0 included header files l local no no 0 C 0 local variables m member yes no 0 C 0 struct, and union members p prototype no no 0 C 0 function prototypes s struct yes no 1 C 0 structure names t typedef yes no 0 C 0 typedefs u union yes no 0 C 0 union names v variable yes no 0 C 0 variable definitions x externvar no no 0 C 0 external and forward variable declarations z parameter no no 0 C 0 function parameters inside function or prototype definitions # # list kinds-full Event # #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION e event yes no 0 NONE 0 events # # list kinds-full Hook # #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION h hook yes no 0 NONE 0 hooks # # list kinds-full Plugin # #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION f File yes no 0 NONE 0 files n name yes no 0 NONE 0 name C only main input.c /^main(void)$/;" function language:C typeref:typename:int C + EVENT a input.c /^DEFINE_EVENT(a);$/;" event language:Event b input.c /^DEFINE_EVENT(b);$/;" event language:Event main input.c /^main(void)$/;" function language:C typeref:typename:int C + EVENT + HOOK a input.c /^DEFINE_EVENT(a);$/;" event language:Event b input.c /^DEFINE_EVENT(b);$/;" event language:Event h input.c /^DEFINE_HOOK(h);$/;" hook language:Hook i input.c /^DEFINE_HOOK(i);$/;" hook language:Hook main input.c /^main(void)$/;" function language:C typeref:typename:int C + EVENT + HOOK + PLUGIN a input.c /^DEFINE_EVENT(a);$/;" event language:Event b input.c /^DEFINE_EVENT(b);$/;" event language:Event h input.c /^DEFINE_HOOK(h);$/;" hook language:Hook i input.c /^DEFINE_HOOK(i);$/;" hook language:Hook isearch input.c /^ LOAD_PLUGIN(mylib.so, isearch);$/;" name language:Plugin main input.c /^main(void)$/;" function language:C typeref:typename:int mylib.so input.c /^ LOAD_PLUGIN(mylib.so, isearch);$/;" File language:Plugin C + EVENT + HOOK + PLUGIN + UA a input.c /^DEFINE_EVENT(a);$/;" event language:Event b input.c /^DEFINE_EVENT(b);$/;" event language:Event h input.c /^DEFINE_HOOK(h);$/;" hook language:Hook i input.c /^DEFINE_HOOK(i);$/;" hook language:Hook isearch input.c /^ LOAD_PLUGIN(mylib.so, isearch);$/;" name language:Plugin main input.c /^main(void)$/;" function language:C typeref:typename:int mylib.so input.c /^ LOAD_PLUGIN(mylib.so, isearch);$/;" File language:Plugin u input.c /^ int u __attribute__((unused));$/;" varaible language:UnusedAttr C(disabled) + EVENT + HOOK + PLUGIN + UA C + EVENT(disabled) + HOOK + PLUGIN + UA isearch input.c /^ LOAD_PLUGIN(mylib.so, isearch);$/;" name language:Plugin main input.c /^main(void)$/;" function language:C typeref:typename:int mylib.so input.c /^ LOAD_PLUGIN(mylib.so, isearch);$/;" File language:Plugin C + EVENT + HOOK(disabled) + PLUGIN + UA a input.c /^DEFINE_EVENT(a);$/;" event language:Event b input.c /^DEFINE_EVENT(b);$/;" event language:Event isearch input.c /^ LOAD_PLUGIN(mylib.so, isearch);$/;" name language:Plugin main input.c /^main(void)$/;" function language:C typeref:typename:int mylib.so input.c /^ LOAD_PLUGIN(mylib.so, isearch);$/;" File language:Plugin u input.c /^ int u __attribute__((unused));$/;" varaible language:UnusedAttr C + EVENT + HOOK + PLUGIN + UA(-v) a input.c /^DEFINE_EVENT(a);$/;" event language:Event b input.c /^DEFINE_EVENT(b);$/;" event language:Event h input.c /^DEFINE_HOOK(h);$/;" hook language:Hook i input.c /^DEFINE_HOOK(i);$/;" hook language:Hook isearch input.c /^ LOAD_PLUGIN(mylib.so, isearch);$/;" name language:Plugin main input.c /^main(void)$/;" function language:C typeref:typename:int mylib.so input.c /^ LOAD_PLUGIN(mylib.so, isearch);$/;" File language:Plugin List subparsers of C ( EVENT + HOOK + PLUGIN + UA ) #NAME BASEPARSER DIRECTIONS Event C base => sub {shared} JNI C base <> sub {bidirectional} Plugin C base => sub {shared} List subparsers of C ( EVENT + HOOK + PLUGIN + UA ) without the header Event C base => sub {shared} JNI C base <> sub {bidirectional} Plugin C base => sub {shared} List subparsers of C ( EVENT + HOOK + PLUGIN + UA ) in machinable #NAME BASEPARSER DIRECTIONS Event C base => sub {shared} JNI C base <> sub {bidirectional} Plugin C base => sub {shared} List subparsers of C ( EVENT + HOOK + PLUGIN + UA ) in machinable without the header Event C base => sub {shared} JNI C base <> sub {bidirectional} Plugin C base => sub {shared} ================================================ FILE: Tmain/nested-subparsers.d/unused-attr.ctags ================================================ --langdef=UnusedAttr{base=Event} --kinddef-UnusedAttr=v,varaible,unsed variable --regex-UnusedAttr=/([a-zA-Z][0-9a-zA-Z]*)[ \t]+__attribute__\(\(unused\)\);/\1/v/ ================================================ FILE: Tmain/no-empty-tag.d/input-0.mak ================================================ -include *.d ================================================ FILE: Tmain/no-empty-tag.d/run.sh ================================================ #!/bin/sh # Copyright: 2024 Masatake YAMATO # License: GPL-2 CTAGS=$1 $CTAGS --options=NONE -o - input-0.mak > /dev/null ================================================ FILE: Tmain/no-empty-tag.d/stderr-expected.txt ================================================ ctags: Notice: No options will be read from files or environment ================================================ FILE: Tmain/no-input-encoding-option.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/no-input-encoding-option.d/input.java ================================================ class Foo { // FooNX public Foo() { // RXgN^ } } ================================================ FILE: Tmain/no-input-encoding-option.d/input.js ================================================ var a = 1; // ѿ ================================================ FILE: Tmain/no-input-encoding-option.d/run.sh ================================================ #!/bin/sh # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 BUILDDIR=$2 . ../utils.sh if ${CTAGS} --quiet --options=NONE --list-features | grep -q iconv; then check_encoding utf-8 ${CTAGS} --quiet --options=NONE --output-encoding=utf-8 -o $BUILDDIR/tags input.js input.java exit $? else skip "iconv feature is not available" fi ================================================ FILE: Tmain/no-input-encoding-option.d/stderr-expected.txt ================================================ ctags: Warning: --input-encoding is not specified ================================================ FILE: Tmain/no-input-encoding-option.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/notice-about-broken-symlink.d/.gitignore ================================================ broken-symlink.c ================================================ FILE: Tmain/notice-about-broken-symlink.d/run.sh ================================================ # Copyright: 2025 Masatake YAMATO # License: GPL-2 . ../utils.sh CTAGS=$1 SF=broken-symlink.c # See https://www.msys2.org/docs/symlinks/ skip_if_running_on_msys cleanup() { rm -f "$SF" } trap cleanup EXIT cleanup if ! ln -s no-such-file.c "$SF"; then skip "failed to create a symbolic link" fi echo '# broken-symlink.c + no option' 1>&2 $CTAGS --options=NONE -o - broken-symlink.c echo '# broken-symlink.c + --quiet option' 1>&2 $CTAGS --quiet --options=NONE -o - broken-symlink.c echo '# no-such-file.c + no option' 1>&2 $CTAGS --options=NONE -o - no-such-file.c echo '# no-such-file.c + --quiet option' 1>&2 $CTAGS --quiet --options=NONE -o - no-such-file.c ================================================ FILE: Tmain/notice-about-broken-symlink.d/stderr-expected.txt ================================================ # broken-symlink.c + no option ctags: Notice: No options will be read from files or environment ctags: Notice: cannot open input file "broken-symlink.c" : No such file or directory # broken-symlink.c + --quiet option # no-such-file.c + no option ctags: Notice: No options will be read from files or environment ctags: Warning: cannot open input file "no-such-file.c" : No such file or directory # no-such-file.c + --quiet option ctags: Warning: cannot open input file "no-such-file.c" : No such file or directory ================================================ FILE: Tmain/null-description-in-pseudo-tag.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/null-description-in-pseudo-tag.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 $CTAGS --quiet --options=NONE -o - \ --langdef=XYZ --regex-XYZ='/aaaaaaaaaaaaaaaaaaaaa/\0/x/' \ --language-force=XYZ --pseudo-tags='TAG_KIND_DESCRIPTION' --extras=p \ run.sh ================================================ FILE: Tmain/null-description-in-pseudo-tag.d/stdout-expected.txt ================================================ !_TAG_KIND_DESCRIPTION!XYZ x,regex /regex/ ================================================ FILE: Tmain/nulltag-extra.d/input.cst ================================================ Z z ================================================ FILE: Tmain/nulltag-extra.d/run.sh ================================================ # Copyright: 2024 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh # The order of stdout and stderr lines is not stable. exit_if_win32 "$CTAGS" # is_feature_available $CTAGS json O="--options=NONE --language-force=CTagsSelfTest" for fmt in xref; do echo "# no extra ($fmt)" ${CTAGS} $O -o - --output-format="$fmt" input.cst 2>&1 echo "# drop '0' extra ($fmt)" ${CTAGS} $O -o - --output-format="$fmt" --extras=-z input.cst 2>&1 echo "# drop '{nulltag}' extra ($fmt)" ${CTAGS} $O -o - --output-format="$fmt" --extras=-'{nulltag}' input.cst 2>&1 echo '# with --extras=+0 ($fmt)' ${CTAGS} $O -o - --output-format="$fmt" --extras=+z input.cst 2>&1 echo "# with --extras=+{nulltag}' ($fmt)" ${CTAGS} $O -o - --output-format="$fmt" --extras=+'{nulltag}' input.cst 2>&1 done | sed -e 's/\.exe//' ================================================ FILE: Tmain/nulltag-extra.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/nulltag-extra.d/stdout-expected.txt ================================================ # no extra (xref) ctags: Notice: No options will be read from files or environment ctags: Notice: ignoring null tag in input.cst(line: 1, language: CTagsSelfTest) # drop '0' extra (xref) ctags: Notice: No options will be read from files or environment ctags: Notice: ignoring null tag in input.cst(line: 1, language: CTagsSelfTest) # drop '{nulltag}' extra (xref) ctags: Notice: No options will be read from files or environment ctags: Notice: ignoring null tag in input.cst(line: 1, language: CTagsSelfTest) # with --extras=+0 ($fmt) ctags: Notice: No options will be read from files or environment ctags: Notice: ignoring null tag in input.cst(line: 1, language: CTagsSelfTest) emitNullTag 2 input.cst z # with --extras=+{nulltag}' (xref) ctags: Notice: No options will be read from files or environment ctags: Notice: ignoring null tag in input.cst(line: 1, language: CTagsSelfTest) emitNullTag 2 input.cst z ================================================ FILE: Tmain/omit-long-patterns-etags.d/input.sh ================================================ func96() { } func95() { } func97() { } func96 func95 func97 ================================================ FILE: Tmain/omit-long-patterns-etags.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 # strlen ("func95()") => 8 ${CTAGS} --quiet --options=NONE --pattern-length-limit=`expr 96 + 8` -e -o - ./input.sh ================================================ FILE: Tmain/omit-long-patterns-etags.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/omit-long-patterns-etags.d/stdout-expected.txt ================================================ input.sh,351 func96()func961,0 func95()func955,110 func97(func979,219 ================================================ FILE: Tmain/omit-long-patterns.d/gen.sh ================================================ #!/bin/sh limit=96 calls= l=$limit for i in $(seq $l); do echo -n ' ' done echo "func$l()" echo "{" echo echo "}" calls="$calls func$l" l=$(expr $limit - 1) for i in $(seq $l); do echo -n ' ' done echo "func$l()" echo "{" echo echo "}" calls="$calls func$l" l=$(expr $limit + 1) for i in $(seq $l); do echo -n ' ' done echo "func$l()" echo "{" echo echo "}" calls="$calls func$l" echo for c in $calls; do echo $c done ================================================ FILE: Tmain/omit-long-patterns.d/input.sh ================================================ func96() { } func95() { } func97() { } func96 func95 func97 ================================================ FILE: Tmain/omit-long-patterns.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --options=NONE -o - ./input.sh ================================================ FILE: Tmain/omit-long-patterns.d/stdout-expected.txt ================================================ func95 ./input.sh /^ f/;" f func96 ./input.sh /^ /;" f func97 ./input.sh /^ /;" f ================================================ FILE: Tmain/option-dump-keywords.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} \ --quiet --options=NONE \ --_force-initializing --_dump-keywords --_force-quit \ | grep -i ObjectiveC | sort ================================================ FILE: Tmain/option-dump-keywords.d/stdout-expected.txt ================================================ @class ObjectiveC @defs ObjectiveC @dynamic ObjectiveC @encode ObjectiveC @end ObjectiveC @implementation ObjectiveC @interface ObjectiveC @optional ObjectiveC @package ObjectiveC @private ObjectiveC @property ObjectiveC @protected ObjectiveC @protocol ObjectiveC @public ObjectiveC @required ObjectiveC @selector ObjectiveC @synchronized ObjectiveC @synthesize ObjectiveC enum ObjectiveC extern ObjectiveC struct ObjectiveC typedef ObjectiveC ================================================ FILE: Tmain/option-dump-options.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} \ --quiet --options=NONE \ --_dump-options --_force-quit | grep -e '_dump-options' ================================================ FILE: Tmain/option-dump-options.d/stdout-expected.txt ================================================ _dump-options ================================================ FILE: Tmain/option-echo-and-force-quit.d/exit-expected.txt ================================================ 21 ================================================ FILE: Tmain/option-echo-and-force-quit.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 # --quiet cannot be used in this test case. ${CTAGS} --options=NONE --_echo=a --_echo=b --_force-quit=21 --_echo=b ================================================ FILE: Tmain/option-echo-and-force-quit.d/stderr-expected.txt ================================================ ctags: Notice: No options will be read from files or environment ctags: Notice: a ctags: Notice: b ================================================ FILE: Tmain/option-echo-and-force-quit.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/option-exclude-exception.d/input.d/bazel-x/x.c ================================================ int x = 1; ================================================ FILE: Tmain/option-exclude-exception.d/input.d/bazel-y/y.c ================================================ int y = 1; ================================================ FILE: Tmain/option-exclude-exception.d/input.d/bazel-z/z.c ================================================ int z = 1; ================================================ FILE: Tmain/option-exclude-exception.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS="$1" ${CTAGS} --quiet --options=NONE -o - -R --exclude='*/bazel-*' \ --exclude-exception='*/bazel-x/*' \ --exclude-exception='*/bazel-z/*' \ input.d ================================================ FILE: Tmain/option-exclude-exception.d/stdout-expected.txt ================================================ x input.d/bazel-x/x.c /^int x = 1;$/;" v typeref:typename:int z input.d/bazel-z/z.c /^int z = 1;$/;" v typeref:typename:int ================================================ FILE: Tmain/option-exclude-including-fsep.d/input.d/bazel-x/x.c ================================================ int x = 1; ================================================ FILE: Tmain/option-exclude-including-fsep.d/input.d/bazel-y/y.c ================================================ int y = 1; ================================================ FILE: Tmain/option-exclude-including-fsep.d/input.d/bazel-z/z.c ================================================ int z = 1; ================================================ FILE: Tmain/option-exclude-including-fsep.d/input.d/labze-a/a.c ================================================ int a = 3; ================================================ FILE: Tmain/option-exclude-including-fsep.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS="$1" ${CTAGS} --quiet --options=NONE -o - -R --exclude='*/bazel-*' \ input.d ================================================ FILE: Tmain/option-exclude-including-fsep.d/stdout-expected.txt ================================================ a input.d/labze-a/a.c /^int a = 3;$/;" v typeref:typename:int ================================================ FILE: Tmain/option-exclude-simple.d/input.d/a.h ================================================ #ifndef A #define A struct A { int a0, a1; }; #endif ================================================ FILE: Tmain/option-exclude-simple.d/input.d/bazel-x/x.c ================================================ int x = 1; ================================================ FILE: Tmain/option-exclude-simple.d/input.d/bazel-y/y.c ================================================ int y = 1; ================================================ FILE: Tmain/option-exclude-simple.d/input.d/bazel-z/z.c ================================================ int z = 1; ================================================ FILE: Tmain/option-exclude-simple.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS="$1" ${CTAGS} --quiet --options=NONE -o - -R --exclude='*.c' \ input.d ================================================ FILE: Tmain/option-exclude-simple.d/stdout-expected.txt ================================================ A input.d/a.h /^#define A$/;" d A input.d/a.h /^struct A {$/;" s a0 input.d/a.h /^ int a0, a1;$/;" m struct:A typeref:typename:int a1 input.d/a.h /^ int a0, a1;$/;" m struct:A typeref:typename:int ================================================ FILE: Tmain/option-extradef-in-mtable.d/input.mtextra ================================================ (def a) {def b} [def c] ================================================ FILE: Tmain/option-extradef-in-mtable.d/mtextra.ctags ================================================ --langdef=MTExtra --map-MTExtra=+.mtextra --kinddef-MTExtra=d,def,definitions # [] --_extradef-MTExtra=acceptSquareBracket,accept square bracket # {} --_extradef-MTExtra=acceptCurlyBracket,accept curly bracket --_tabledef-MTExtra=main --_tabledef-MTExtra=body --_mtable-regex-MTExtra=main/\(def +//{tenter=body} --_mtable-regex-MTExtra=main/\[def +//{tenter=body}{_extra=acceptSquareBracket} --_mtable-regex-MTExtra=main/\{def +//{tenter=body}{_extra=acceptCurlyBracket} --_mtable-regex-MTExtra=main/.// --_mtable-regex-MTExtra=body/([_a-z]+)\)/\1/d/{tleave} --_mtable-regex-MTExtra=body/([_a-z]+)\]/\1/d/{tleave}{_extra=acceptSquareBracket} --_mtable-regex-MTExtra=body/([_a-z]+)\}/\1/d/{tleave}{_extra=acceptCurlyBracket} --_mtable-regex-MTExtra=body/.// ================================================ FILE: Tmain/option-extradef-in-mtable.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS="$1" msgstr () { if [ $1 = '+' ]; then echo "enabled" else echo "disabled" fi } run_ctags () { printf '# []: %s, {}: %s\n' $(msgstr $1) $(msgstr $2) ${CTAGS} --quiet --options=NONE --options=mtextra.ctags \ --fields=+'{extras}' \ --extras-MTExtra=${1}'{acceptSquareBracket}' \ --extras-MTExtra=${2}'{acceptCurlyBracket}' \ -o - \ input.mtextra } run_ctags + + run_ctags - - run_ctags + - run_ctags - + ================================================ FILE: Tmain/option-extradef-in-mtable.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/option-extradef-in-mtable.d/stdout-expected.txt ================================================ # []: enabled, {}: enabled a input.mtextra /^(def a)$/;" d b input.mtextra /^{def b}$/;" d extras:acceptCurlyBracket c input.mtextra /^[def c]$/;" d extras:acceptSquareBracket # []: disabled, {}: disabled a input.mtextra /^(def a)$/;" d # []: enabled, {}: disabled a input.mtextra /^(def a)$/;" d c input.mtextra /^[def c]$/;" d extras:acceptSquareBracket # []: disabled, {}: enabled a input.mtextra /^(def a)$/;" d b input.mtextra /^{def b}$/;" d extras:acceptCurlyBracket ================================================ FILE: Tmain/option-extras-enabling-all.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/option-extras-enabling-all.d/run.sh ================================================ #!/bin/sh # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh column_for_enabled= if ! column_for_enabled=$(get_column_index $CTAGS --list-extras "ENABLED"); then exit $? fi $CTAGS --quiet --options=NONE --extras-all= \ --with-list-header=no --list-extras \ | filter_by_column_index $column_for_enabled | sort | uniq $CTAGS --quiet --options=NONE --extras-all='*' \ --with-list-header=no --list-extras \ | filter_by_column_index $column_for_enabled | sort | uniq ================================================ FILE: Tmain/option-extras-enabling-all.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/option-extras-enabling-all.d/stdout-expected.txt ================================================ no yes ================================================ FILE: Tmain/option-no-such-foreign-extra.d/run.sh ================================================ # Copyright: 2024 Masatake YAMATO # License: GPL-2 . ../utils.sh CTAGS=$1 V= # V=valgrind ${V} ${CTAGS} --quiet --options=NONE \ \ --langdef=NOSUCHLANG'{_foreignLanguage=Kconfig}' \ --_extradef-NOSUCHLANG='NOSUCHEXTRA,but this is not the part of Kconfig' \ --regex-NOSUCHLANG='/^\# (CONFIG_[^ ]+) is not set/\1/c/{_language=Kconfig}{_extra=NOSUCHEXTRA}{exclusive}' \ \ --_force-quit=0 ================================================ FILE: Tmain/option-no-such-foreign-extra.d/stderr-expected.txt ================================================ ctags: Warning: no such extra "NOSUCHEXTRA" in Kconfig ================================================ FILE: Tmain/option-no-such-foreign-field.d/run.sh ================================================ # Copyright: 2024 Masatake YAMATO # License: GPL-2 . ../utils.sh CTAGS=$1 V= # V=valgrind ${V} ${CTAGS} --quiet --options=NONE \ \ --langdef=NOSUCHLANG'{_foreignLanguage=Kconfig}' \ --_fielddef-NOSUCHLANG='NOSUCHFIELD,but this is not the part of Kconfig' \ --regex-NOSUCHLANG='/^\# (CONFIG_[^ ]+) is (not set)/\1/c/{_language=Kconfig}{_field=NOSUCHFIELD:\1}{exclusive}' \ \ --_force-quit=0 ================================================ FILE: Tmain/option-no-such-foreign-field.d/stderr-expected.txt ================================================ ctags: Warning: no such field "NOSUCHFIELD" in Kconfig ================================================ FILE: Tmain/option-options-directory.d/exit-expected.txt ================================================ 7 ================================================ FILE: Tmain/option-options-directory.d/optlib/a.ctags ================================================ --_echo=hello ================================================ FILE: Tmain/option-options-directory.d/optlib/b.ctags ================================================ --_echo=world ================================================ FILE: Tmain/option-options-directory.d/optlib/c.ctags ================================================ --_force-quit=7 ================================================ FILE: Tmain/option-options-directory.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh ${CTAGS} --options=NONE --options=./optlib ================================================ FILE: Tmain/option-options-directory.d/stderr-expected.txt ================================================ ctags: Notice: No options will be read from files or environment ctags: Notice: hello ctags: Notice: world ================================================ FILE: Tmain/option-options-maybe.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/option-options-maybe.d/input-maybe.c ================================================ int foo (void) { return 0; } ================================================ FILE: Tmain/option-options-maybe.d/input.c ================================================ int foo (void) { return 0; } ================================================ FILE: Tmain/option-options-maybe.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh d=$(pwd) ${CTAGS} --quiet --options=NONE --options=./NOSUCHFILE -o - input.c ${CTAGS} --quiet --options=NONE --options-maybe=./NOSUCHFILE -o - input-maybe.c ================================================ FILE: Tmain/option-options-maybe.d/stderr-expected.txt ================================================ ctags: cannot stat "./NOSUCHFILE" : No such file or directory ================================================ FILE: Tmain/option-options-maybe.d/stdout-expected.txt ================================================ foo input-maybe.c /^int foo (void)$/;" f typeref:typename:int ================================================ FILE: Tmain/option-pseudo-tags.d/input.c ================================================ /* EMPTY */ ================================================ FILE: Tmain/option-pseudo-tags.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS=$1 O="--quiet --options=NONE " echo '# single with no curly bracket' ${CTAGS} $O \ --extras=+p --pseudo-tags=TAG_PROGRAM_URL \ -o - \ input.c echo '# single with curly bracket' ${CTAGS} $O \ --extras=+p --pseudo-tags='{TAG_PROGRAM_URL}' \ -o - \ input.c echo '# single with + no curly bracket' ${CTAGS} $O \ --extras=+p --pseudo-tags= \ --pseudo-tags=+TAG_PROGRAM_URL \ -o - \ input.c echo '# single with + curly bracket' ${CTAGS} $O \ --extras=+p --pseudo-tags= \ --pseudo-tags=+'{TAG_PROGRAM_URL}' \ -o - \ input.c echo '# single with +- no curly bracket' ${CTAGS} $O \ --extras=+p --pseudo-tags= \ --pseudo-tags=+TAG_PROGRAM_VERSION \ --pseudo-tags=+TAG_PROGRAM_URL \ --pseudo-tags=-TAG_PROGRAM_VERSION \ -o - \ input.c echo '# single with +- curly bracket' ${CTAGS} $O \ --extras=+p --pseudo-tags= \ --pseudo-tags=+'{TAG_PROGRAM_VERSION}' \ --pseudo-tags=+'{TAG_PROGRAM_URL}' \ --pseudo-tags=-'{TAG_PROGRAM_VERSION}' \ -o - \ input.c echo '# multiple specifications with +- curly bracket' ${CTAGS} $O \ --extras=+p --pseudo-tags= \ --pseudo-tags='+{TAG_PROGRAM_VERSION}{TAG_FILE_SORTED}{TAG_PROGRAM_URL}-{TAG_PROGRAM_VERSION}' \ -o - \ input.c echo '# multiple specifications with -+- curly bracket' ${CTAGS} $O \ --extras=+p --pseudo-tags= \ --pseudo-tags='-{TAG_PROGRAM_VERSION}+{TAG_PROGRAM_VERSION}{TAG_FILE_FORMAT}{TAG_PROGRAM_URL}-{TAG_PROGRAM_VERSION}' \ -o - \ input.c ================================================ FILE: Tmain/option-pseudo-tags.d/stdout-expected.txt ================================================ # single with no curly bracket !_TAG_PROGRAM_URL https://ctags.io/ /official site/ # single with curly bracket !_TAG_PROGRAM_URL https://ctags.io/ /official site/ # single with + no curly bracket !_TAG_PROGRAM_URL https://ctags.io/ /official site/ # single with + curly bracket !_TAG_PROGRAM_URL https://ctags.io/ /official site/ # single with +- no curly bracket !_TAG_PROGRAM_URL https://ctags.io/ /official site/ # single with +- curly bracket !_TAG_PROGRAM_URL https://ctags.io/ /official site/ # multiple specifications with +- curly bracket !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ # multiple specifications with -+- curly bracket !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ ================================================ FILE: Tmain/option-totals-extra.d/input.unknown ================================================ N N N N N N N N N N ================================================ FILE: Tmain/option-totals-extra.d/run.sh ================================================ # Copyright: 2019 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --totals=extra --language-force=CTagsSelfTest -o - input.unknown 2>&1 \ | grep -v ^N \ | sed -ne '/^STATISTICS.*/,$p' ================================================ FILE: Tmain/option-totals-extra.d/stdout-expected.txt ================================================ STATISTICS of CTagsSelfTest ============================================== The number of handled chars: 10 ================================================ FILE: Tmain/option-use-slash-as-filename-separator.d/run.sh ================================================ # Copyright: 2019 Masatake YAMATO # License: GPL-2 CTAGS=$1 OPT=--use-slash-as-filename-separator . ../utils.sh exit_unless_win32 $CTAGS echo '#u-ctags output' $CTAGS --quiet --options=NONE -o - 'src\input.c' $CTAGS --quiet --options=NONE -o - $OPT 'src\input.c' $CTAGS --quiet --options=NONE -o - ${OPT}=no 'src\input.c' echo '#u-ctags ptag output' { $CTAGS --quiet --options=NONE --extras=p -o - 'src\input.c' $CTAGS --quiet --options=NONE --extras=p -o - $OPT 'src\input.c' $CTAGS --quiet --options=NONE --extras=p -o - ${OPT}=no 'src\input.c' } | grep TAG_OUTPUT_FILESEP echo '#e-ctags output' $CTAGS --quiet --options=NONE --output-format=e-ctags -o - 'src\input.c' $CTAGS --quiet --options=NONE --output-format=e-ctags -o - $OPT 'src\input.c' $CTAGS --quiet --options=NONE --output-format=e-ctags -o - ${OPT}=no 'src\input.c' echo '#e-ctags ptag output' { $CTAGS --quiet --options=NONE --extras=p --output-format=e-ctags -o - 'src\input.c' $CTAGS --quiet --options=NONE --extras=p --output-format=e-ctags -o - $OPT 'src\input.c' $CTAGS --quiet --options=NONE --extras=p --output-format=e-ctags -o - ${OPT}=no 'src\input.c' } | grep TAG_OUTPUT_FILESEP echo '#xref output' $CTAGS --quiet --options=NONE --output-format=xref -o - 'src\input.c' $CTAGS --quiet --options=NONE --output-format=xref -o - $OPT 'src\input.c' $CTAGS --quiet --options=NONE --output-format=xref -o - ${OPT}=no 'src\input.c' # TODO: json output ================================================ FILE: Tmain/option-use-slash-as-filename-separator.d/src/input.c ================================================ int n; ================================================ FILE: Tmain/option-use-slash-as-filename-separator.d/stdout-expected.txt ================================================ #u-ctags output n src/input.c /^int n;$/;" v typeref:typename:int n src/input.c /^int n;$/;" v typeref:typename:int n src\\input.c /^int n;$/;" v typeref:typename:int #u-ctags ptag output !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_FILESEP backslash /slash or backslash/ #e-ctags output n src\input.c /^int n;$/;" v typeref:typename:int n src/input.c /^int n;$/;" v typeref:typename:int n src\input.c /^int n;$/;" v typeref:typename:int #e-ctags ptag output !_TAG_OUTPUT_FILESEP backslash /slash or backslash/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_FILESEP backslash /slash or backslash/ #xref output n variable 1 src\\input.c int n; n variable 1 src/input.c int n; n variable 1 src\\input.c int n; ================================================ FILE: Tmain/optlib-dir-option.d/optlib/a.ctags ================================================ --_echo=hello ================================================ FILE: Tmain/optlib-dir-option.d/optlib/b.ctags ================================================ --_echo=world ================================================ FILE: Tmain/optlib-dir-option.d/optlib/c.ctags ================================================ --_force-quit=7 ================================================ FILE: Tmain/optlib-dir-option.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh d=$(pwd) echo '#' specifying files 1>&2 ( cd / ${CTAGS} --options=NONE --optlib-dir=$d/optlib --options=a.ctags --options=b.ctags --options=c.ctags ) echo '#' specifying a dir 1>&2 ( cd / ${CTAGS} --options=NONE --optlib-dir=$d --options=optlib ) echo '#' reset 1>&2 ( cd / ${CTAGS} --options=NONE --optlib-dir= --options=optlib ) ================================================ FILE: Tmain/optlib-dir-option.d/stderr-expected.txt ================================================ # specifying files ctags: Notice: No options will be read from files or environment ctags: Notice: hello ctags: Notice: world # specifying a dir ctags: Notice: No options will be read from files or environment ctags: Notice: hello ctags: Notice: world # reset ctags: Notice: No options will be read from files or environment ctags: cannot stat "optlib" : No such file or directory ================================================ FILE: Tmain/optlib-message-flag.d/args.ctags ================================================ --langdef=FOO --map-FOO=+.foo --kinddef-FOO=n,namespace,namespaces --kinddef-FOO=c,class,classes --kinddef-FOO=v,variable,variables --regex-FOO=/namespace ([a-zA-Z]+) /\1/N,anotherNamespace/{warning="found namespace '\1'"}{exclusive} --regex-FOO=/namespace ([a-zA-Z]+) /\1/x,bad/{fatal="should not get this"} --regex-FOO=/bad regex ([a-zA-Z-]+)/\1/x,bad/{fatal="bad='\1'"} --mline-regex-FOO=/namespace ([a-zA-Z]+) /\1/m,mlineNamespace/{mgroup=1}{warning="got namespace"} --mline-regex-FOO=/var ([a-zA-Z]+) ([a-zA-Z]+);/\2/V,mlineVariable/{warning="got variable '\2' of type \1"}{mgroup=2} --mline-regex-FOO=/bad multi-line ([a-zA-Z-]+)/\1/x,bad/{fatal="bad='\1'"}{mgroup=1} --_tabledef-FOO=main --_tabledef-FOO=block --_tabledef-FOO=blockEnd --_tabledef-FOO=skipWhitespace --_mtable-regex-FOO=skipWhitespace/[ \t\n]+// --_mtable-regex-FOO=main/namespace ([a-zA-Z]+) \{/\1/n/{tenter=block,blockEnd}{warning="found namespace"}{scope=push} --_mtable-extend-FOO=main+skipWhitespace --_mtable-regex-FOO=main/// --_mtable-regex-FOO=blockEnd/\};?//{scope=pop}{warning="end of block"} --_mtable-extend-FOO=blockEnd+skipWhitespace --_mtable-regex-FOO=blockEnd/bad multi-table ([a-zA-Z-]+)//{fatal="bad='\1'"} --_mtable-regex-FOO=blockEnd/bad [^\n]+\n// --_mtable-regex-FOO=block/class ([a-zA-Z]+) \{/\1/c/{tenter=block,blockEnd}{warning="got class"}{scope=ref}{scope=push} --_mtable-regex-FOO=block/var ([a-zA-Z]+) ([a-zA-Z]+);/\2/v/{scope=ref}{warning="got variable '\2' of type \1"} --_mtable-extend-FOO=block+skipWhitespace ================================================ FILE: Tmain/optlib-message-flag.d/input0.foo ================================================ namespace A { class B { var bool C; }; } ================================================ FILE: Tmain/optlib-message-flag.d/input1.foo ================================================ namespace X { class Y { var bool Z; }; } bad regex found-it bad multi-line found-mline bad multi-table found-mtable ================================================ FILE: Tmain/optlib-message-flag.d/input2.foo ================================================ namespace XX { class YY { var bool ZZ; }; } bad multi-line found-mline bad multi-table found-mtable ================================================ FILE: Tmain/optlib-message-flag.d/input3.foo ================================================ namespace XXX { class YYY { var bool ZZZ; }; } bad multi-table found-mtable ================================================ FILE: Tmain/optlib-message-flag.d/run.sh ================================================ # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh echo '#' warning messages 1>&2 ( ${CTAGS} --options=NONE --options=./args.ctags -o - ./input0.foo ) echo '#' fatal regex message 1>&2 ( ${CTAGS} --options=NONE --options=./args.ctags -o - ./input1.foo ) echo '#' fatal mline-regex message 1>&2 ( ${CTAGS} --options=NONE --options=./args.ctags -o - ./input2.foo ) echo '#' fatal mtable-regex message 1>&2 ( ${CTAGS} --options=NONE --options=./args.ctags -o - ./input3.foo ) ================================================ FILE: Tmain/optlib-message-flag.d/stderr-expected.txt ================================================ # warning messages ctags: Notice: No options will be read from files or environment ctags: Warning: Message from regex: found namespace 'A' (./input0.foo:1) ctags: Warning: Message from regex: got namespace (./input0.foo:1) ctags: Warning: Message from regex: got variable 'C' of type bool (./input0.foo:3) ctags: Warning: Message from mtable: found namespace (./input0.foo:1) ctags: Warning: Message from mtable: got class (./input0.foo:2) ctags: Warning: Message from mtable: got variable 'C' of type bool (./input0.foo:3) ctags: Warning: Message from mtable: end of block (./input0.foo:4) ctags: Warning: Message from mtable: end of block (./input0.foo:5) # fatal regex message ctags: Notice: No options will be read from files or environment ctags: Warning: Message from regex: found namespace 'X' (./input1.foo:1) ctags: Fatal: Message from regex: bad='found-it' (./input1.foo:7) # fatal mline-regex message ctags: Notice: No options will be read from files or environment ctags: Warning: Message from regex: found namespace 'XX' (./input2.foo:1) ctags: Warning: Message from regex: got namespace (./input2.foo:1) ctags: Warning: Message from regex: got variable 'ZZ' of type bool (./input2.foo:3) ctags: Fatal: Message from regex: bad='found-mline' (./input2.foo:7) # fatal mtable-regex message ctags: Notice: No options will be read from files or environment ctags: Warning: Message from regex: found namespace 'XXX' (./input3.foo:1) ctags: Warning: Message from regex: got namespace (./input3.foo:1) ctags: Warning: Message from regex: got variable 'ZZZ' of type bool (./input3.foo:3) ctags: Warning: Message from mtable: found namespace (./input3.foo:1) ctags: Warning: Message from mtable: got class (./input3.foo:2) ctags: Warning: Message from mtable: got variable 'ZZZ' of type bool (./input3.foo:3) ctags: Warning: Message from mtable: end of block (./input3.foo:4) ctags: Warning: Message from mtable: end of block (./input3.foo:5) ctags: Fatal: Message from mtable: bad='found-mtable' (./input3.foo:7) ================================================ FILE: Tmain/optlib-message-flag.d/stdout-expected.txt ================================================ A ./input0.foo /^namespace A {$/;" N A ./input0.foo /^namespace A {$/;" m A ./input0.foo /^namespace A {$/;" n B ./input0.foo /^ class B {$/;" c namespace:A C ./input0.foo /^ var bool C;$/;" V C ./input0.foo /^ var bool C;$/;" v class:A.B ================================================ FILE: Tmain/optscript-preludes-stack.d/args-c.ctags ================================================ --langdef=C10{base=C} --_prelude-C10={{ (prelude C10) == }} --_sequel-C10={{ (sequel C10) == }} --langdef=C11{base=C} --_prelude-C11={{ (prelude C11) == }} --_sequel-C11={{ (sequel C11) == }} --langdef=C20{base=C10} --_prelude-C20={{ (prelude C20) == }} --_sequel-C20={{ (sequel C20) == }} --langdef=C30{base=C20} --_prelude-C30={{ (prelude C30) == }} --_sequel-C30={{ (sequel C30) == }} ================================================ FILE: Tmain/optscript-preludes-stack.d/args-cpreprocessor.ctags ================================================ --langdef=CPreProcessor10{base=CPreProcessor} --_prelude-CPreProcessor10={{ (prelude CPreProcessor10) == }} --_sequel-CPreProcessor10={{ (sequel CPreProcessor10) == }} --langdef=CPreProcessor11{base=CPreProcessor} --_prelude-CPreProcessor11={{ (prelude CPreProcessor11) == }} --_sequel-CPreProcessor11={{ (sequel CPreProcessor11) == }} --langdef=CPreProcessor20{base=CPreProcessor10} --_prelude-CPreProcessor20={{ (prelude CPreProcessor20) == }} --_sequel-CPreProcessor20={{ (sequel CPreProcessor20) == }} --langdef=CPreProcessor30{base=CPreProcessor20} --_prelude-CPreProcessor30={{ (prelude CPreProcessor30) == }} --_sequel-CPreProcessor30={{ (sequel CPreProcessor30) == }} ================================================ FILE: Tmain/optscript-preludes-stack.d/args-dts.ctags ================================================ --langdef=DTS10{base=DTS} --_prelude-DTS10={{ (prelude DTS10) == }} --_sequel-DTS10={{ (sequel DTS10) == }} --langdef=DTS11{base=DTS} --_prelude-DTS11={{ (prelude DTS11) == }} --_sequel-DTS11={{ (sequel DTS11) == }} --langdef=DTS20{base=DTS10} --_prelude-DTS20={{ (prelude DTS20) == }} --_sequel-DTS20={{ (sequel DTS20) == }} --langdef=DTS30{base=DTS20} --_prelude-DTS30={{ (prelude DTS30) == }} --_sequel-DTS30={{ (sequel DTS30) == }} ================================================ FILE: Tmain/optscript-preludes-stack.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/optscript-preludes-stack.d/input.c ================================================ /* EMPTY */ ================================================ FILE: Tmain/optscript-preludes-stack.d/input.dts ================================================ ================================================ FILE: Tmain/optscript-preludes-stack.d/input.i ================================================ ================================================ FILE: Tmain/optscript-preludes-stack.d/run.sh ================================================ # Copyright: 2021 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh : && ${CTAGS} --quiet --options=NONE\ --_prelude-C='{{ (enter C) == }}' \ --_sequel-C='{{ (leave C) == }}' \ --options=./args-c.ctags -o - input.c && ${CTAGS} --quiet --options=NONE \ --_prelude-DTS='{{ (enter DTS) == }}' \ --_sequel-DTS='{{ (leave DTS) == }}' \ --options=./args-dts.ctags -o - input.dts && ${CTAGS} --quiet --options=NONE --map-CPreProcessor=+.i \ --_prelude-CPreProcessor='{{ (enter CPreProcessor) == }}' \ --_sequel-CPreProcessor='{{ (leave CPreProcessor) == }}' \ --options=./args-cpreprocessor.ctags -o - input.i # # BUGS: The following two don't work because in-use marker is not set to # the subparsers of the CPreprocessor parser. The CPreprocessor parser must # mark in-use on its sub parsers to call the inputStart and inputEnd methods # in the foreachSubparser loop. # # ${CTAGS} --quiet --options=NONE --options=./args-cpreprocessor.ctags -o - input.c # ${CTAGS} --quiet --options=NONE --options=./args-cpreprocessor.ctags -o - input.dts # ================================================ FILE: Tmain/optscript-preludes-stack.d/stderr-expected.txt ================================================ (enter C) (prelude C10) (prelude C20) (prelude C30) (prelude C11) (sequel C30) (sequel C20) (sequel C10) (sequel C11) (leave C) (enter DTS) (prelude DTS10) (prelude DTS20) (prelude DTS30) (prelude DTS11) (sequel DTS30) (sequel DTS20) (sequel DTS10) (sequel DTS11) (leave DTS) ctags: Warning: Because of an internal limitation, Making a sub parser based on the CPreProcessor parser is not allowed: CPreProcessor ctags: Warning: Because of an internal limitation, Making a sub parser based on the CPreProcessor parser is not allowed: CPreProcessor (enter CPreProcessor) (leave CPreProcessor) ================================================ FILE: Tmain/optscript-preludes-stack.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/optscript-scope.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/optscript-scope.d/input.unknown ================================================ * TITLE 0 + Subtitle 0.0 + Subtitle 0.1 - subsubtitle 0.1.0 - subsubtitle 0.1.1 + Subtitle 0.2 - subsubtitle 0.2.0 * TITLE 1 + Subtitle 1.0 - subsubtitle 1.0.0 - subsubtitle 1.0.1 ================================================ FILE: Tmain/optscript-scope.d/run.sh ================================================ # Copyright: 2024 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh ${CTAGS} --quiet --options=NONE \ --sort=no --fields=+n \ --options=./unknown.ctags \ --language-force=UnknownX \ -o - input.unknown ================================================ FILE: Tmain/optscript-scope.d/stderr-expected.txt ================================================ section-enter 0 scopetop: OK scopeNth0: OK section-leave 1 subsection-enter 1 scopeNth1: OK subsection-leave 2 subsection-enter 2 scopetop: OK scopeNth0: OK scopeNth1: OK subsection-leave 2 subsubsection-enter 2 subsubsection-leave 3 subsubsection-enter 3 subsubsection-leave 3 subsection-enter 3 scopetop: OK scopeNth0: OK scopeNth1: OK subsection-leave 2 subsubsection-enter 2 subsubsection-leave 3 section-enter 3 scopetop: OK scopeNth0: OK section-leave 1 subsection-enter 1 scopeNth1: OK subsection-leave 2 subsubsection-enter 2 subsubsection-leave 3 subsubsection-enter 3 subsubsection-leave 3 ================================================ FILE: Tmain/optscript-scope.d/stdout-expected.txt ================================================ TITLE 0 input.unknown /^* TITLE 0$/;" s line:1 Subtitle 0.0 input.unknown /^+ Subtitle 0.0$/;" t line:2 section:TITLE 0 Subtitle 0.1 input.unknown /^+ Subtitle 0.1$/;" t line:3 section:TITLE 0 subsubtitle 0.1.0 input.unknown /^- subsubtitle 0.1.0$/;" u line:4 subsection:TITLE 0.Subtitle 0.1 subsubtitle 0.1.1 input.unknown /^- subsubtitle 0.1.1$/;" u line:5 subsection:TITLE 0.Subtitle 0.1 Subtitle 0.2 input.unknown /^+ Subtitle 0.2$/;" t line:6 section:TITLE 0 subsubtitle 0.2.0 input.unknown /^- subsubtitle 0.2.0$/;" u line:7 subsection:TITLE 0.Subtitle 0.2 TITLE 1 input.unknown /^* TITLE 1$/;" s line:8 Subtitle 1.0 input.unknown /^+ Subtitle 1.0$/;" t line:9 section:TITLE 1 subsubtitle 1.0.0 input.unknown /^- subsubtitle 1.0.0$/;" u line:10 subsection:TITLE 1.Subtitle 1.0 subsubtitle 1.0.1 input.unknown /^- subsubtitle 1.0.1$/;" u line:11 subsection:TITLE 1.Subtitle 1.0 ================================================ FILE: Tmain/optscript-scope.d/unknown.ctags ================================================ --langdef=UnknownX --kinddef-UnknownX=s,section,sections --kinddef-UnknownX=t,subsection,subsections --kinddef-UnknownX=u,subsubsection,subsubsections --regex-UnknownX=/^\* (.*)$/\1/s/{{ /section-enter = _scopedepth = . _scopeset _scopetop { (scopetop: OK) = . eq { (scopeNth0: OK) = } { (scopeNth0: FAILED) = } ifelse } { (scopetop: FAILED) = } ifelse /section-leave = _scopedepth = }} --regex-UnknownX=/^\+ (.*)$/\1/t/{{ /subsection-enter = _scopedepth = _scopedepth 3 eq { _scopepop } if _scopedepth 2 eq { 0 _scopeNth _scopetop { (scopetop: OK) = eq { (scopeNth0: OK) = } { (scopeNth0: FAILED) = } ifelse } { (scopetop: FAILED) = } ifelse _scopepop } if . _scopepush 1 _scopeNth . :scope eq { (scopeNth1: OK) = } { (scopeNth1: FAILED) = } ifelse /subsection-leave = _scopedepth = }} --regex-UnknownX=/^\- (.*)$/\1/u/{{ /subsubsection-enter = _scopedepth = _scopedepth 3 eq { _scopepop } if . _scopepush /subsubsection-leave = _scopedepth = }} ================================================ FILE: Tmain/optscript.d/arithmetic.expected ================================================ 8 (3 5 add) 33 (99 3 idiv) 4 (99 5 mod) 30 (3 10 mul) -12 (8 20 sub) 3 (-3 neg) -3 (3 neg) 3 (-3 abs) 3 (3 abs) ================================================ FILE: Tmain/optscript.d/arithmetic.ps ================================================ (3 5 add) 3 5 add pstack clear (99 3 idiv) 99 3 idiv pstack clear (99 5 mod) 99 5 mod pstack clear (3 10 mul) 3 10 mul pstack clear (8 20 sub) 8 20 sub pstack clear (-3 neg) -3 neg pstack clear (3 neg) 3 neg pstack clear (-3 abs) -3 abs pstack clear (3 abs) 3 abs pstack clear ================================================ FILE: Tmain/optscript.d/array.expected ================================================ [null null null null null] [1 2 3] 3 2 1 /a [1 2 3] /a ================================================ FILE: Tmain/optscript.d/array.ps ================================================ 5 array pstack clear /a [ 1 2 3 ] aload pstack astore pstack clear ================================================ FILE: Tmain/optscript.d/arrayx.expected ================================================ unmatchedmark null ================================================ FILE: Tmain/optscript.d/arrayx.ps ================================================ clear { { ] } stopped { _errorname = stop } if } stopped pop _errorname = ================================================ FILE: Tmain/optscript.d/compound.expected ================================================ 3 (abc) 2 -dict:2- 3 [true false null] (abc) true true false [true false null] (---------------- get array ----------------) (a) (a ->) (b) (b ->) (c) (c ->) true 3 [(a) (b) (c)] (true ->) (---------------- get dict ----------------) (a) (a ->) (b) (b ->) (c) (c ->) true false -dict:3- (true ->) (---------------- get str ----------------) 97 (97 ->) 98 (98 ->) 99 (99 ->) true 3 (abc) (true ->) (---------------- forall array ----------------) 6 (6 -> ) (---------------- forall dict values ----------------) 6 (6 -> ) (---------------- forall dict keys ----------------) false (false ->) (---------------- forall string ----------------) 294 (294 ->) (---------------- put string ----------------) (abc) (\(abc\) ->) (abcd) (\(abcd\) ->) (abc e) (\(abc e\) ->) (---------------- put array ----------------) [/a /b /c] ([/a /b /c] ->) [/a /b /c /d] ([/a /b /c /d] ->) [/a /b /c null /e] ([/a /b /c null /e] ->) (---------------- put dict ----------------) 1 (1 ->) (---------------- putinterval string ----------------) (xyzdef) (\(xyzdef\) ->) (xyz123) (\(xyz123\) ->) (xyz1234) (\(xyz1234\) ->) (abcdex) (\(abcdex\) ->) (abcdefx) (\(abcdefx\) ->) (abcdxf) (\(abcdxf\) ->) (abcdxyz) (\(abcdxyz\) ->) (---------------- putinterval array ----------------) [/x /b /c] ([/x /b /c] ->) [/a /x /c] ([/a /x /c] ->) [/a /b /x] ([/a /b /x] ->) [/a /b /c /x] ([/a /b /c /x] ->) [/a /b /c /x /y] ([/a /b /c /x /y] ->) [/a /b /x /y] ([/a /b /x /y] ->) [/a /x /y] ([/a /x /y] ->) [/x /y /c] ([/x /y /c] ->) [/x /y /z] ([/x /y /z] ->) [/a /x /y /z] ([/a /x /y /z] ->) [/a /b /x /y /z] ([/a /b /x /y /z] ->) [/a /b /c /x /y /z] ([/a /b /c /x /y /z] ->) [/a /b /c /x /y /z /1] ([/a /b /c /x /y /z /1] ->) [/a /b /x /y /z /1] ([/a /b /x /y /z /1] ->) [/a /x /y /z /1] ([/a /x /y /z /1] ->) [/x /y /z /1] ([/x /y /z /1] ->) (---------------- _copyinterval string ----------------) () (\(\) ->) (1) (\(1\) ->) (a) (\(a\) ->) (1a) (\(1a\) ->) (ab) (\(ab\) ->) (bc) (\(bc\) ->) (cde) (\(cde\) ->) (e) (\(e\) ->) () (\(\) ->) (---------------- _copyinterval array ----------------) [] ([] ->) [1] ([1] ->) [/a] ([/a] ->) [1 /a] ([1 /a] ->) [/a /b] ([ /a /b ] ->) [/b /c] ([/b /c] ->) [/c /d /e] ([/c /d /e] ->) [/e] ([/e] ->) [] ([] ->) ================================================ FILE: Tmain/optscript.d/compound.ps ================================================ /pc { pstack clear } def (abc) dup length pc << /a 1 /b 2 >> dup length pc [ true false null ] dup length pc (abc) () copy pc << /a 1 /b 2 >> <<>> copy /a known pc << /a 1 /b 2 >> <<>> copy /b known pc << /a 1 /b 2 >> <<>> copy /c known pc [ true false null ] [] copy pc (---------------- get array ----------------) == (a ->) [ (a) (b) (c) ] 0 get pc (b ->) [ (a) (b) (c) ] 1 get pc (c ->) [ (a) (b) (c) ] 2 get pc (true ->) { [ (a) (b) (c) ] 3 get } stopped pc (---------------- get dict ----------------) == (a ->) << /a (a) true (b) 1 (c) >> /a get pc (b ->) << /a (a) true (b) 1 (c) >> true get pc (c ->) << /a (a) true (b) 1 (c) >> 1 get pc (true ->) { << /a (a) true (b) 1 (c) >> false get } stopped pc (---------------- get str ----------------) == (97 ->) (abc) 0 get pc (98 ->) (abc) 1 get pc (99 ->) (abc) 2 get pc (true ->) { (abc) 3 get } stopped pc (---------------- forall array ----------------) == (6 -> ) 0 [ 1 2 3 ] { add } forall pc (---------------- forall dict values ----------------) == (6 -> ) 0 << /a 1 /b 2 /c 3 >> { exch pop add } forall pc (---------------- forall dict keys ----------------) == (false ->) << /a 1 /b 2 >> { pop } forall { count 3 ne { stop } if dup /a eq { pop /b ne { stop } if } { /b eq { /a ne { stop } if } { stop } ifelse } ifelse } stopped pc (---------------- forall string ----------------) == (294 ->) 0 (abc) { add } forall pc (---------------- put string ----------------) == ((abc) ->) (xbc) dup 0 97 put pc ((abcd) ->) (abc) dup 3 100 put pc ((abc e) ->) (abc) dup 4 101 put pc (---------------- put array ----------------) == ([/a /b /c] ->) [ /a null /c ] dup 1 /b put pc ([/a /b /c /d] ->) [ /a /b /c ] dup 3 /d put pc ([/a /b /c null /e] ->) [ /a /b /c ] dup 4 /e put pc (---------------- put dict ----------------) == (1 ->) << /a 0 /b null /c 2 >> dup /b 1 put /b get pc (---------------- putinterval string ----------------) == ((xyzdef) ->) (abcdef) dup 0 (xyz) putinterval pc ((xyz123) ->) (abcdef) dup 0 (xyz123) putinterval pc ((xyz1234) ->) (abcdef) dup 0 (xyz1234) putinterval pc ((abcdex) ->) (abcdef) dup 5 (x) putinterval pc ((abcdefx) ->) (abcdef) dup 6 (x) putinterval pc ((abcdxf) ->) (abcdef) dup 4 (x) putinterval pc ((abcdxyz) ->) (abcdef) dup 4 (xyz) putinterval pc (---------------- putinterval array ----------------) == ([/x /b /c] ->) [ /a /b /c ] dup 0 [ /x ] putinterval pc ([/a /x /c] ->) [ /a /b /c ] dup 1 [ /x ] putinterval pc ([/a /b /x] ->) [ /a /b /c ] dup 2 [ /x ] putinterval pc ([/a /b /c /x] ->) [ /a /b /c ] dup 3 [ /x ] putinterval pc ([/a /b /c /x /y] ->) [ /a /b /c ] dup 3 [ /x /y ] putinterval pc ([/a /b /x /y] ->) [ /a /b /c ] dup 2 [ /x /y ] putinterval pc ([/a /x /y] ->) [ /a /b /c ] dup 1 [ /x /y ] putinterval pc ([/x /y /c] ->) [ /a /b /c ] dup 0 [ /x /y ] putinterval pc ([/x /y /z] ->) [ /a /b /c ] dup 0 [ /x /y /z ] putinterval pc ([/a /x /y /z] ->) [ /a /b /c ] dup 1 [ /x /y /z ] putinterval pc ([/a /b /x /y /z] ->) [ /a /b /c ] dup 2 [ /x /y /z ] putinterval pc ([/a /b /c /x /y /z] ->) [ /a /b /c ] dup 3 [ /x /y /z ] putinterval pc ([/a /b /c /x /y /z /1] ->) [ /a /b /c ] dup 3 [ /x /y /z /1 ] putinterval pc ([/a /b /x /y /z /1] ->) [ /a /b /c ] dup 2 [ /x /y /z /1 ] putinterval pc ([/a /x /y /z /1] ->) [ /a /b /c ] dup 1 [ /x /y /z /1 ] putinterval pc ([/x /y /z /1] ->) [ /a /b /c ] dup 0 [ /x /y /z /1 ] putinterval pc (---------------- _copyinterval string ----------------) == (() ->) (abcde) 0 0 () _copyinterval pc ((1) ->) (abcde) 0 0 (1) _copyinterval pc ((a) ->) (abcde) 0 1 () _copyinterval pc ((1a) ->) (abcde) 0 1 (1) _copyinterval pc ((ab) ->) (abcde) 0 2 () _copyinterval pc ((bc) ->) (abcde) 1 2 () _copyinterval pc ((cde) ->) (abcde) 2 3 () _copyinterval pc ((e) ->) (abcde) 4 1 () _copyinterval pc (() ->) (abcde) 5 0 () _copyinterval pc (---------------- _copyinterval array ----------------) == ([] ->) [ /a /b /c /d /e ] 0 0 [] _copyinterval pc ([1] ->) [ /a /b /c /d /e ] 0 0 [ 1 ] _copyinterval pc ([/a] ->) [ /a /b /c /d /e ] 0 1 [] _copyinterval pc ([1 /a] ->) [ /a /b /c /d /e ] 0 1 [ 1 ] _copyinterval pc ([ /a /b ] ->) [ /a /b /c /d /e ] 0 2 [] _copyinterval pc ([/b /c] ->) [ /a /b /c /d /e ] 1 2 [] _copyinterval pc ([/c /d /e] ->) [ /a /b /c /d /e ] 2 3 [] _copyinterval pc ([/e] ->) [ /a /b /c /d /e ] 4 1 [] _copyinterval pc ([] ->) [ /a /b /c /d /e ] 5 0 [] _copyinterval pc ================================================ FILE: Tmain/optscript.d/control.expected ================================================ 5 12 12 (string) (executed if block) (executed if block) (executed else block) 2 1 0 4 3 2 1 0 [(jump here as expected) true /undefined] [(jump here as expected) false null] 5 -1 -2 -3 -4 -5 1 3 5 7 9 exit in for: => passed exit in forall string: => passed exit in forall array: => passed exit in forall dict: => passed (---------------- countexecstack ----------------) 3 (---------------- execstack ----------------) [] (---------------- exception handling ----------------) (OK: this code just after loop should be executed) (OK: 'exit' should not be caught here.) (OK: 'stop' should be caught here.) ================================================ FILE: Tmain/optscript.d/control.ps ================================================ /pc { pstack clear } def { 3 2 add } exec pc /exectest { 10 2 add } def /exectest load exec pc 3 9 /add load exec pc (string) exec pc true { (executed if block) } if pc false { (executed if block) } if pc /trueaction { (executed if block) } def /falseaction { (executed else block) } def true { trueaction } { falseaction } ifelse pc false { trueaction } { falseaction } ifelse pc /counter 0 def 3 { counter counter 1 add /counter exch def } repeat pc /counter 0 def { counter counter 1 add /counter exch def counter 5 eq { exit } if } loop pc /underflow { 100 index } def { undefflow } stopped { [(jump here as expected) _newerror _errorname] } { (jump here unexpectedly) } ifelse pc /break { stop } def { break } stopped { [(jump here as expected) _newerror _errorname] } { (jump here unexpectedly) } ifelse pc { 3 2 { //add } exec } exec pc -1 -1 -5 { == } for 1 2 10 { == } for (exit in for:) = /counter 0 def 0 2 10 { counter 1 add /counter exch def 6 eq { exit } if } for counter 4 eq { (=> passed) = } { (=> failed) = } ifelse (exit in forall string:) = (abc) { dup ?b eq { exit } { pop } ifelse } forall ?b eq { (=> passed) = } if (exit in forall array:) = [?a ?b ?c] { dup ?b eq { exit } { pop } ifelse } forall ?b eq { (=> passed) = } if (exit in forall dict:) = << ?a /a ?b /b ?c /c >> { pop dup ?b eq { exit } { pop } ifelse } forall ?b eq { (=> passed) = } if (---------------- countexecstack ----------------) == true { countexecstack == } if (---------------- execstack ----------------) == countexecstack array execstack == (---------------- exception handling ----------------) == { { exit } loop (OK: this code just after loop should be executed) == } stopped { (FAIL: 'exit' should not be caught here.) == } { (OK: 'exit' should not be caught here.) == } ifelse { { stop } loop (SOMETHING WRONG: this code just after loop should not be executed) == } stopped { (OK: 'stop' should be caught here.) == } { (FAIL: 'stop' should not be caught by loop.) == } ifelse ================================================ FILE: Tmain/optscript.d/dict.expected ================================================ 3 true false true -dict:1- false 3 2 1 (a) false 2 3 2 (---- dictstack & cleardictstack ----) 3 4 2 (---- store ----) 1 -dict:1- null (---- store integers ----) 45 (---- using types other than name as key objects ----) (3) (true) (false) (abc) (xyz) (3) (true) (false) (abc) (xyz) ================================================ FILE: Tmain/optscript.d/dict.ps ================================================ 10 dict begin /three 3 def /three load == currentdict /three known == currentdict /four known == /three where pstack end /three where == clear << /a 1 /b 2 /c 3 >> begin a b c end pstack << /a (a) >> begin /a load == end << /a 1 >> dup /a undef /a known == clear (---- countdictstack ----) countdictstack == 5 dict begin countdictstack == end countdictstack == (---- dictstack & cleardictstack ----) == clear 5 dict begin [] dictstack length == clear 5 dict begin [] dictstack length == clear cleardictstack [] dictstack length == clear (---- store ----) == << /a 1 /b 2 /c 3 >> << /e 1 /f 2 /g 3 >> /a 0 store pop /a get == << /k null >> dup == /k get == (---- store integers ----) == 0 << 1 true 2 true 3 true 4 true 5 true 6 true 7 true 8 true 9 true >> {pop add} forall = (---- using types other than name as key objects ----) == /d 10 dict def d dup 3 (3) put 3 get == clear d dup true (true) put true get == clear d dup false (false) put false get == clear d dup (abc) (abc) put (abc) get == clear d dup /xyz (xyz) put (xyz) get == clear /d0 << 3 (3) true (true) false (false) (abc) (abc) /xyz (xyz) >> def d0 3 get == clear d0 true get == clear d0 false get == clear d0 (abc) get == clear d0 (xyz) get == clear ================================================ FILE: Tmain/optscript.d/dictx.expected ================================================ -dict:0- -dict:1- -dict:0- -dict:1- -dict:0- -dict:1- rangecheck null -dict:0- -dict:1- -dict:1- -dict:2- -dict:2- -dict:3- unmatchedmark rangecheck null ================================================ FILE: Tmain/optscript.d/dictx.ps ================================================ 0 dict == clear 0 dict dup /x 1 put == clear 1 dict == 1 dict dup /y 2 put == clear 2 dict == 2 dict dup /z 2 put == clear { { -1 dict } stopped { _errorname = stop } if } stopped pop _errorname = << >> == clear <<>> dup /x 0 put == clear << /x 0 >> == <> dup /y 1 put == clear << /x 0 /y 1 >> == << /x 0 /y 1 >> dup /z 2 put == clear { { >> } stopped { _errorname = stop } if } stopped pop { { << /a >> } stopped { _errorname = stop } if } stopped pop _errorname = ================================================ FILE: Tmain/optscript.d/error-undefined-if-if.expected ================================================ Error: /undefined in a Operand stack: top| |bottom Execution stack: top| a {a} --if-- {true {a} if} --if-- |bottom Dictionary stack: top| -dict:1- -dict:91- |bottom ================================================ FILE: Tmain/optscript.d/error-undefined-if-if.ps ================================================ true { true { a } if } if ================================================ FILE: Tmain/optscript.d/error-undefined-if.expected ================================================ Error: /undefined in a Operand stack: top| |bottom Execution stack: top| a {a} --if-- |bottom Dictionary stack: top| -dict:1- -dict:91- |bottom ================================================ FILE: Tmain/optscript.d/error-undefined-if.ps ================================================ true { a } if ================================================ FILE: Tmain/optscript.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/optscript.d/misc.expected ================================================ (--------------- bind ---------------) {--add-- {--add--}} ({--add-- {--add--}} ->) 1 {--[-- 1 1 --add-- --]--} ================================================ FILE: Tmain/optscript.d/misc.ps ================================================ (--------------- bind ---------------) == ({--add-- {--add--}} ->) { add { add } } bind pstack clear { 1 } bind exec pstack clear { [ 1 1 add ] } bind pstack ================================================ FILE: Tmain/optscript.d/pstack.expected ================================================ false true null -dict:1- [{/add} {add}] {/add} {add} {/a /b /c} [/a /b /c] [1 2 3] -mark- (abc) /a 1 ================================================ FILE: Tmain/optscript.d/pstack.ps ================================================ 1 /a (abc) mark [ 1 2 3 ] [ /a /b /c ] { /a /b /c } { add } { /add } [ { /add } { add } ] << /a { /add } >> null true false % This isn't printed well. % { [ abc ] [ /abc ] } pstack ================================================ FILE: Tmain/optscript.d/read-and-print.expected ================================================ (array) [/a /b] [/abc /efg] [/1 /b] [/a /2] [/123 /123] (dict) /b /b /efg /efg /2 /2 /123 /123 (cvn) //a //a /x (immediate) 1 (a\nb\tc\rd\fe) (abcd\n\f\r\v\t z) 0 [0] [-10] [0 -10] abc efg -dict:5- -dict:5- << 98 /ab 99 (efg) 100 -dict:4- 10 /=== 97 1 >> << 98 /ab 99 (efg) 100 << 101 2 102 /ef 103 (xyz) 104 << 105 3 106 /ij >> >> 10 /==== 97 1 >> [-dict:6-] [-dict:6-] [<< 98 /ab 99 (efg) 100 -dict:4- 10 /=== 122 [-dict:2-] 97 1 >> ] [<< 98 /ab 99 (efg) 100 << 101 2 102 /ef 103 (xyz) 104 << 105 3 106 /ij 107 [<< 88 1 89 [0 1 2] >> ] >> >> 10 /==== 122 [<< 66 [0 1 2] 65 1 >> ] 97 1 >> ] char after metachar [97] [10] ================================================ FILE: Tmain/optscript.d/read-and-print.ps ================================================ /pc { pstack clear } def /dpc { get pstack clear } def (array) pc [/a /b] pc [/abc /efg] pc [/1 /b] pc [/a /2] pc [/123 /123] pc (dict) pc << /a /b >> /a dpc <> /a dpc << /abc /efg >> /abc dpc <> /abc dpc << /1 /2 >> /1 dpc <> /1 dpc << /123 /123 >> /123 dpc <> /123 dpc (cvn) pc (/a) cvn pc % gsnd prints "//a /x" for the next code. (/a /x) cvn pc (immediate) pc /a 1 def //a pc (a\nb\tc\rd\fe) pc /str () def str 0 ?a put str 1 ?b put str 2 ?c put str 3 ?d put str 4 ?\n put str 5 ?\f put str 6 ?\r put str 7 ?\v put str 8 ?\t put str 9 ?\ put str 10 ?z put str == /-a { add } def -500 500 -a == [0] == [-10] == [0 -10] == /abc = (efg) = /inject { % target key val 2 index type /dicttype eq { 2 index 3 1 roll put } { 2 index 0 get % array key val dict 3 1 roll put } ifelse } def /debug= { 10 /= inject dup = 10 /== inject dup == 10 /=== inject dup === 10 /==== inject dup ==== pop } def % names cannot be used for keys because % the test output becomes unstable. % << 10 null 97 1 98 /ab 99 (efg) 100 << 101 2 102 /ef 103 (xyz) 104 << 105 3 106 /ij >> >> >> debug= [ << 10 null 97 1 98 /ab 99 (efg) 100 << 101 2 102 /ef 103 (xyz) 104 << 105 3 106 /ij 107 [ << 88 1 89 [ 0 1 2 ] >> ] >> >> 122 [ << 65 1 66 [ 0 1 2 ] >> ] >> ] debug= (char after metachar) = [?a] == [?\n] == ================================================ FILE: Tmain/optscript.d/relalogbits.expected ================================================ true (2 2 eq) false (2 0 eq) false (2 /a eq) false (2 true eq) false (2 false eq) false (2 << >> eq) false (2 [ ] eq) false (2 { } eq) false (2 \( \) eq) false (2 null eq) true (/a /a eq) false (/a /b eq) false (/a \(a\) eq) (----------------------- logical operators -----------------------) true (true true and => true ) false (false true and => false) false (true false and => false) false (false false and => false) true (true true or => true ) true (false true or => true ) true (true false or => true ) false (false false or => false) false (true true xor => false) true (false true xor => true ) true (true false xor => true ) false (false false xor => false) false (true not => false) true (false not => true ) (----------------------- comparison -----------------------) false (1 2 gt => false) false (1 1 gt => false) true (2 1 gt => true ) false (1 2 ge => false) true (1 1 ge => true ) true (2 1 ge => true ) true (1 2 lt => true ) false (1 1 lt => false) false (2 1 lt => false) true (1 2 le => true ) true (1 1 le => true ) false (2 1 le => false) false (\(a\) \(b\) gt => false) false (\(a\) \(a\) gt => false) true (\(b\) \(a\) gt => true ) false (\(a\) \(b\) ge => false) true (\(a\) \(a\) ge => true ) true (\(b\) \(a\) ge => true ) true (\(a\) \(b\) lt => true ) false (\(a\) \(a\) lt => false) false (\(b\) \(a\) lt => false) true (\(a\) \(b\) le => true ) true (\(a\) \(a\) le => true ) false (\(b\) \(a\) le => false) (----------------------- bit operators -----------------------) 0 (0 0 and => 0) 0 (0 1 and => 0) 1 (1 1 and => 1) 1 (3 1 and => 1) 0 (2 1 and => 0) 0 (0 0 or => 0) 1 (0 1 or => 1) 1 (1 1 or => 1) 3 (3 1 or => 3) 3 (2 1 or => 3) 0 (0 0 xor => 0) 1 (0 1 xor => 1) 0 (1 1 xor => 0) 2 (3 1 xor => 2) 3 (2 1 xor => 3) -1 (0 not => 0) -2 (1 not => -2) 1 (1 not not => 1) 56 (7 3 bitshift => 56) 17 (142 -3 bitshift => 17) ================================================ FILE: Tmain/optscript.d/relalogbits.ps ================================================ /pc { pstack clear } def (2 2 eq) 2 2 eq pc (2 0 eq) 2 0 eq pc (2 /a eq) 2 /a eq pc (2 true eq) 2 true eq pc (2 false eq) 2 false eq pc (2 << >> eq) 2 << >> eq pc (2 [ ] eq) 2 [ ] eq pc (2 { } eq) 2 { } eq pc (2 \( \) eq) 2 ( ) eq pc (2 null eq) 2 null eq pc (/a /a eq) /a /a eq pc (/a /b eq) /a /b eq pc (/a \(a\) eq) /a (a) eq pc (----------------------- logical operators -----------------------) == (true true and => true ) true true and pc (false true and => false) false true and pc (true false and => false) true false and pc (false false and => false) false false and pc (true true or => true ) true true or pc (false true or => true ) false true or pc (true false or => true ) true false or pc (false false or => false) false false or pc (true true xor => false) true true xor pc (false true xor => true ) false true xor pc (true false xor => true ) true false xor pc (false false xor => false) false false xor pc (true not => false) true not pc (false not => true ) false not pc (----------------------- comparison -----------------------) == (1 2 gt => false) 1 2 gt pc (1 1 gt => false) 1 1 gt pc (2 1 gt => true ) 2 1 gt pc (1 2 ge => false) 1 2 ge pc (1 1 ge => true ) 1 1 ge pc (2 1 ge => true ) 2 1 ge pc (1 2 lt => true ) 1 2 lt pc (1 1 lt => false) 1 1 lt pc (2 1 lt => false) 2 1 lt pc (1 2 le => true ) 1 2 le pc (1 1 le => true ) 1 1 le pc (2 1 le => false) 2 1 le pc ((a) (b) gt => false) (a) (b) gt pc ((a) (a) gt => false) (a) (a) gt pc ((b) (a) gt => true ) (b) (a) gt pc ((a) (b) ge => false) (a) (b) ge pc ((a) (a) ge => true ) (a) (a) ge pc ((b) (a) ge => true ) (b) (a) ge pc ((a) (b) lt => true ) (a) (b) lt pc ((a) (a) lt => false) (a) (a) lt pc ((b) (a) lt => false) (b) (a) lt pc ((a) (b) le => true ) (a) (b) le pc ((a) (a) le => true ) (a) (a) le pc ((b) (a) le => false) (b) (a) le pc (----------------------- bit operators -----------------------) == (0 0 and => 0) 0 0 and pc (0 1 and => 0) 0 1 and pc (1 1 and => 1) 1 1 and pc (3 1 and => 1) 3 1 and pc (2 1 and => 0) 2 1 and pc (0 0 or => 0) 0 0 or pc (0 1 or => 1) 0 1 or pc (1 1 or => 1) 1 1 or pc (3 1 or => 3) 3 1 or pc (2 1 or => 3) 2 1 or pc (0 0 xor => 0) 0 0 xor pc (0 1 xor => 1) 0 1 xor pc (1 1 xor => 0) 1 1 xor pc (3 1 xor => 2) 3 1 xor pc (2 1 xor => 3) 2 1 xor pc (0 not => 0) 0 not pc (1 not => -2) 1 not pc (1 not not => 1) 1 not not pc (7 3 bitshift => 56) 7 3 bitshift pc (142 -3 bitshift => 17) 142 -3 bitshift pc ================================================ FILE: Tmain/optscript.d/run.sh ================================================ #!/bin/sh # Copyright: 2020 Masatake YAMATO # License: GPL-2 BUILDDIR=$2 OPTSCRIPT=$4 . ../utils.sh if ! [ -x "${OPTSCRIPT}" ]; then skip "no optscript" fi _VALGRIND_EXIT=58 if type valgrind > /dev/null 2>&1; then V() { vlog=$1 shift valgrind --leak-check=full --error-exitcode=${_VALGRIND_EXIT} --log-file="${vlog}" "$@" } else V() { vlog=$1 shift touch $vlog "$@" } fi rm -f ${BUILDDIR}/*.tmp for i in $(ls *.ps); do printf "%s" "${i}..." o=${BUILDDIR}/$(basename $i .ps).out.tmp e=$(basename $i .ps).expected v=${BUILDDIR}/$(basename $i .ps).valgrind.tmp case $i in error-*.ps) V $v ${OPTSCRIPT} $i > $o 2>&1 ;; *) V $v ${OPTSCRIPT} $i > $o ;; esac s=$? printf "%s" "$s" if [ "$s" = "$_VALGRIND_EXIT" ]; then echo cat $v; exit $_VALGRIND_EXIT fi case $s-$i in *-error-*.ps|0-*) echo if diff -ruN --strip-trailing-cr $e $o; then rm $o rm $v fi ;; *) echo ERROR ;; esac done ================================================ FILE: Tmain/optscript.d/stack.expected ================================================ /b /a /a /a -mark- /a /a -mark- /z /y /z /y /x /z /z /y /x /z /y /x /x /z /y /x /z /y /x /p /r /q /r /q /p 3 3 /A /rangecheck ================================================ FILE: Tmain/optscript.d/stack.ps ================================================ /a /b pstack pop pstack mark exch pstack dup pstack clear /x /y /z 2 copy pstack pop pop 1 copy pstack pop 0 copy pstack 2 index pstack clear /x /y /z 0 index == /x /y /z 1 index == /x /y /z 2 index == clear /p /q /r 3 -1 roll pstack 3 1 roll pstack count == mark 4 1 roll counttomark == /A 5 1 roll cleartomark pstack { (a) (b) (c) -1 3 roll } stopped { _errorname == } { (RANGECHECK error is expected but got NONE) == } ifelse clear ================================================ FILE: Tmain/optscript.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/optscript.d/stdout-expected.txt ================================================ arithmetic.ps...0 array.ps...0 arrayx.ps...0 compound.ps...0 control.ps...0 dict.ps...0 dictx.ps...0 error-undefined-if-if.ps...1 error-undefined-if.ps...1 misc.ps...0 pstack.ps...0 read-and-print.ps...0 relalogbits.ps...0 stack.ps...0 string.ps...0 typeattrconv.ps...0 ================================================ FILE: Tmain/optscript.d/string.expected ================================================ (--------------- string ---------------) 32 32 32 (32 32 32 ->) (--------------- _strstr ---------------) true 0 (abcdefgab) (\(abcdefgab\) 0 true->) true 5 (abcdefgab) (\(abcdefgab\) 5 true ->) true 6 (abcdefg) (\(abcdefg\) 6 true ->) true 0 (abcdefg) (\(abcdefg\) 0 true ->) false (abcdefg) (\(abcdefg\) false ->) (--------------- _strrstr ---------------) true 7 (abcdefgab) (\(abcdefgab\) 7 true->) true 5 (abcdefgab) (\(abcdefgab\) 5 true ->) true 6 (abcdefg) (\(abcdefg\) 6 true ->) true 7 (abcdefg) (\(abcdefg\) 7 true ->) false (abcdefg) (\(abcdefg\) false ->) (--------------- _strchr/_strrchr ---------------) true 0 (aba) (\(aba\) 0 true ->) true 2 (aba) (\(aba\) 2 true ->) true 1 (aba) (\(aba\) 1 true ->) true 1 (aba) (\(aba\) 1 true ->) false (aba) (\(aba\) false ->) false (aba) (\(aba\) false ->) (--------------- _strpbrk ---------------) true 1 (a.b;c) (\(a.b;c\) 1 true ->) false (a.b;c) (\(a.b;c\) false ->) ================================================ FILE: Tmain/optscript.d/string.ps ================================================ (--------------- string ---------------) == (32 32 32 ->) 3 string { } forall pstack clear (--------------- _strstr ---------------) == ((abcdefgab) 0 true->) (abcdefgab) (ab) _strstr pstack clear ((abcdefgab) 5 true ->) (abcdefgab) (fg) _strstr pstack clear ((abcdefg) 6 true ->) (abcdefg) (g) _strstr pstack clear ((abcdefg) 0 true ->) (abcdefg) () _strstr pstack clear ((abcdefg) false ->) (abcdefg) (z) _strstr pstack clear (--------------- _strrstr ---------------) == ((abcdefgab) 7 true->) (abcdefgab) (ab) _strrstr pstack clear ((abcdefgab) 5 true ->) (abcdefgab) (fg) _strrstr pstack clear ((abcdefg) 6 true ->) (abcdefg) (g) _strrstr pstack clear ((abcdefg) 7 true ->) (abcdefg) () _strrstr pstack clear ((abcdefg) false ->) (abcdefg) (z) _strrstr pstack clear (--------------- _strchr/_strrchr ---------------) == /char { 0 get } def ((aba) 0 true ->) (aba) (a) char _strchr pstack clear ((aba) 2 true ->) (aba) (a) char _strrchr pstack clear ((aba) 1 true ->) (aba) (b) char _strchr pstack clear ((aba) 1 true ->) (aba) (b) char _strrchr pstack clear ((aba) false ->) (aba) (c) char _strchr pstack clear ((aba) false ->) (aba) (c) char _strrchr pstack clear (--------------- _strpbrk ---------------) == ((a.b;c) 1 true ->) (a.b;c) (;.) _strpbrk pstack clear ((a.b;c) false ->) (a.b;c) (,-) _strpbrk pstack clear ================================================ FILE: Tmain/optscript.d/typeattrconv.expected ================================================ true booleantype false booleantype null nulltype 2 integertype (abc) stringtype /name nametype --add-- operatortype -mark- marktype [1 2 3] arraytype -dict:1- dicttype {add} arraytype /xyz (abc) (efg) (true) (false) (99) (-309) (--nulltype--) (--arraytype--) (--dicttype--) (--arraytype--) 3 abc /abc true {} [] true ================================================ FILE: Tmain/optscript.d/typeattrconv.ps ================================================ /type1 { dup == type == clear } def true type1 false type1 null type1 2 type1 (abc) type1 /name type1 /add load type1 mark type1 [ 1 2 3 ] type1 << /a 1 >> type1 { add } type1 (xyz) cvn == (abc) 0 string cvs == /efg 0 string cvs == true 0 string cvs == false 0 string cvs == 99 0 string cvs == -309 0 string cvs == null 0 string cvs == [ ] 0 string cvs == << >> 0 string cvs == { } 0 string cvs == 1 cvx 2 cvx [ /add cvx ] cvx exec == { /abc dup cvx pstack eq == } exec { [ ] dup cvx pstack eq == } exec ================================================ FILE: Tmain/output-encoding-option.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/output-encoding-option.d/input.java ================================================ class Foo { // Fooクラス public Foo() { // コンストラクタ } } ================================================ FILE: Tmain/output-encoding-option.d/input.js ================================================ var a = 1; // ѿ ================================================ FILE: Tmain/output-encoding-option.d/run.sh ================================================ #!/bin/sh # Copyright: 2015 Yasuhiro MATSUMOTO # License: GPL-2 CTAGS=$1 BUILDDIR=$2 . ../utils.sh if ${CTAGS} --quiet --options=NONE --list-features | grep -q iconv; then check_encoding shift_jis check_encoding utf-8 check_encoding euc-jp if ${CTAGS} --quiet --options=NONE \ --pseudo-tags=-TAG_PROC_CWD \ --pseudo-tags=-TAG_PROGRAM_VERSION \ --pseudo-tags=-TAG_KIND_DESCRIPTION \ --pseudo-tags=-TAG_FIELD_DESCRIPTION \ --pseudo-tags=-TAG_EXTRA_DESCRIPTION \ --pseudo-tags=-TAG_ROLE_DESCRIPTION \ --pseudo-tags=-TAG_PARSER_VERSION \ --pseudo-tags=-TAG_OUTPUT_VERSION \ --output-encoding=shift_jis --input-encoding=utf-8 --input-encoding-javascript=euc-jp \ -o ${BUILDDIR}/tags \ input.js input.java ; then remove_commit_id ${BUILDDIR}/tags fi exit $? else skip "iconv feature is not available" fi ================================================ FILE: Tmain/output-encoding-option.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/output-encoding-option.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/output-encoding-option.d/tags-expected.txt ================================================ !_TAG_FILE_ENCODING shift_jis // !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ Foo input.java /^ public Foo() { \/\/ RXgN^$/;" m class:Foo Foo input.java /^class Foo { \/\/ FooNX$/;" c a input.js /^var a = 1; \/\/ ϐ$/;" v ================================================ FILE: Tmain/output-file-resource-management.d/input.c ================================================ int main(void) { } ================================================ FILE: Tmain/output-file-resource-management.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 BUILDDIR=$2 . ../utils.sh exit_status_for_input_c $CTAGS NONE -o - --sort=no exit_status_for_input_c $CTAGS $BUILDDIR/tags -o $BUILDDIR/tags --sort=no exit_status_for_input_c $CTAGS $BUILDDIR/tags -o $BUILDDIR/tags exit_status_for_input_c $CTAGS NONE -o - exit_status_for_input_c $CTAGS NONE -e -o - --sort=no exit_status_for_input_c $CTAGS $BUILDDIR/TAGS -e -o $BUILDDIR/TAGS --sort=no exit_status_for_input_c $CTAGS $BUILDDIR/TAGS -e -o $BUILDDIR/TAGS exit_status_for_input_c $CTAGS NONE -e -o - exit_status_for_input_c $CTAGS NONE -x -o - --sort=no exit_status_for_input_c $CTAGS $BUILDDIR/tags-x -x -o $BUILDDIR/tags-x --sort=no exit_status_for_input_c $CTAGS $BUILDDIR/tags-x -x -o $BUILDDIR/tags-x exit_status_for_input_c $CTAGS NONE -x -o - ================================================ FILE: Tmain/output-file-resource-management.d/stdout-expected.txt ================================================ -o - --sort=no => ok -o tags --sort=no => ok -o tags => ok -o - => ok -e -o - --sort=no => ok -e -o TAGS --sort=no => ok -e -o TAGS => ok -e -o - => ok -x -o - --sort=no => ok -x -o tags-x --sort=no => ok -x -o tags-x => ok -x -o - => ok ================================================ FILE: Tmain/output-format-option.d/input.c ================================================ int main(void) { return 0; } ================================================ FILE: Tmain/output-format-option.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh run_with_format u-ctags run_with_format etags run_with_format xref ================================================ FILE: Tmain/output-format-option.d/stdout-expected.txt ================================================ # u-ctags main input.c /^main(void)$/;" f typeref:typename:int # etags input.c,20 main(void)main2,4 # xref main function 2 input.c main(void) ================================================ FILE: Tmain/output-input-field-with-no-escape.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 . ../utils.sh CTAGS=$1 if ! ( echo '#define foo' > 'a\b.c' ) 2> /dev/null; then skip "unsuitable platform to run this test" fi echo '# u-ctags' ${CTAGS} --options=NONE --pseudo-tags=TAG_OUTPUT_MODE --extras=+p --output-format=u-ctags -o - 'a\b.c' echo '# e-ctags' ${CTAGS} --options=NONE --pseudo-tags=TAG_OUTPUT_MODE --extras=+p --output-format=e-ctags -o - 'a\b.c' rm 'a\b.c' ================================================ FILE: Tmain/output-input-field-with-no-escape.d/stdout-expected.txt ================================================ # u-ctags !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ foo a\\b.c /^#define foo$/;" d file: # e-ctags !_TAG_OUTPUT_MODE e-ctags /u-ctags or e-ctags/ foo a\b.c /^#define foo$/;" d file: ================================================ FILE: Tmain/parser-init-useCork.d/input.x ================================================ func A var B end ================================================ FILE: Tmain/parser-init-useCork.d/run.sh ================================================ # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --options=x.ctags -x --_xformat="%N %s %{end}" input.x exit $? ================================================ FILE: Tmain/parser-init-useCork.d/stdout-expected.txt ================================================ A 3 B A ================================================ FILE: Tmain/parser-init-useCork.d/x.ctags ================================================ --langdef=X --map-X=+.x --kinddef-X=f,func,functions --kinddef-X=v,var,variables # This triggers the parser initialization. --kinds-X=+{var} --regex-X=/^func +([A-Z])$/\1/f/{scope=push} --regex-X=/^end$///{scope=pop}{placeholder} --regex-X=/^[ \t]*var ([A-Z])$/\1/v/{scope=ref} ================================================ FILE: Tmain/parser-specific-extras-for-foreign-lang.d/input-0.x1 ================================================ D:def00 d:def01 v:var0 ================================================ FILE: Tmain/parser-specific-extras-for-foreign-lang.d/input-1.x1 ================================================ D:def10 d:def11 v:var1 ================================================ FILE: Tmain/parser-specific-extras-for-foreign-lang.d/run.sh ================================================ # Copyright: 2024 Masatake YAMATO # License: GPL-2 . ../utils.sh CTAGS=$1 V= # V=valgrind printf "# %s\n" --extras-X0=+'{iname}' ${V} ${CTAGS} --quiet --options=NONE --options=./x0.ctags --options=./x1.ctags \ --extras-X0=+'{iname}' --fields=+'{extras}{language}' -o - input-0.x1 printf "# %s\n" --extras-X0=-'{iname}' ${V} ${CTAGS} --quiet --options=NONE --options=./x0.ctags --options=./x1.ctags \ --extras-X0=-'{iname}' --fields=+'{extras}{language}' -o - input-1.x1 ================================================ FILE: Tmain/parser-specific-extras-for-foreign-lang.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/parser-specific-extras-for-foreign-lang.d/stdout-expected.txt ================================================ # --extras-X0=+{iname} __def01__ input-0.x1 /^d:def01$/;" d language:X0 extras:iname def00 input-0.x1 /^D:def00$/;" d language:X0 var0 input-0.x1 /^v:var0$/;" v language:X1 # --extras-X0=-{iname} def10 input-1.x1 /^D:def10$/;" d language:X0 var1 input-1.x1 /^v:var1$/;" v language:X1 ================================================ FILE: Tmain/parser-specific-extras-for-foreign-lang.d/x0.ctags ================================================ --langdef=X0 --kinddef-X0=d,def,definitions --_extradef-X0=iname,internal name like __x__ ================================================ FILE: Tmain/parser-specific-extras-for-foreign-lang.d/x1.ctags ================================================ --langdef=X1{_foreignLanguage=X0} --map-X1=+.x1 --kinddef-X1=v,var,variables --regex-X1=/D:([a-z0-9]+)$/\1/d/{_language=X0} --regex-X1=/d:([a-z0-9]+)$/__\1__/d/{_language=X0}{_extra=iname} --regex-X1=/v:([a-z0-9]+)$/\1/v/ ================================================ FILE: Tmain/parser-specific-extras.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 O="--quiet --options=NONE --with-list-header=no" ${CTAGS} --quiet --options=NONE --extras='*' --list-extras=Robot ${CTAGS} ${O} --extras-Robot=-'{whitespaceSwapped}' --list-extras=Robot ${CTAGS} ${O} --extras-Robot=-'{whitespaceSwapped}' --extras-Robot=+'{whitespaceSwapped}' --list-extras=Robot ${CTAGS} ${O} --extras-all=-'{whitespaceSwapped}' --list-extras=Robot ${CTAGS} ${O} --extras-all=-'{whitespaceSwapped}' --extras-all=+'{whitespaceSwapped}' --list-extras=Robot ${CTAGS} ${O} --extras-all=-'{whitespaceSwapped}' --extras-Robot=+'{whitespaceSwapped}' --list-extras=Robot ${CTAGS} ${O} --extras-Robot=-'{whitespaceSwapped}' --extras-all=+'{whitespaceSwapped}' --list-extras=Robot ================================================ FILE: Tmain/parser-specific-extras.d/stdout-expected.txt ================================================ #LETTER NAME ENABLED LANGUAGE FIXED VER DESCRIPTION - whitespaceSwapped yes Robot no 0 Include tags swapping whitespace and underscore chars - whitespaceSwapped no Robot no 0 Include tags swapping whitespace and underscore chars - whitespaceSwapped yes Robot no 0 Include tags swapping whitespace and underscore chars - whitespaceSwapped no Robot no 0 Include tags swapping whitespace and underscore chars - whitespaceSwapped yes Robot no 0 Include tags swapping whitespace and underscore chars - whitespaceSwapped yes Robot no 0 Include tags swapping whitespace and underscore chars - whitespaceSwapped yes Robot no 0 Include tags swapping whitespace and underscore chars ================================================ FILE: Tmain/parser-specific-fields-clearing-all.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS="$1" echo "# default" ${CTAGS} --quiet --options=NONE --with-list-header=no\ --list-fields=LdScript echo "# clear all" ${CTAGS} --quiet --options=NONE --with-list-header=no\ --fields-LdScript= --list-fields=LdScript ================================================ FILE: Tmain/parser-specific-fields-clearing-all.d/stdout-expected.txt ================================================ # default - assignment yes LdScript s-- no -- 0 how a value is assigned to the symbol # clear all - assignment no LdScript s-- no -- 0 how a value is assigned to the symbol ================================================ FILE: Tmain/parser-specific-fields-for-foreign-lang-in-json.d/input.unknownx ================================================ public func foo(n, m); protected func bar(n); private func baz(n,...); STR:strset@iamowner STR:setsetempty@ STR:notset Y:iamowner2=tagme2 Z:tagme-z@iamowner-z eset:a enoset:b ================================================ FILE: Tmain/parser-specific-fields-for-foreign-lang-in-json.d/knownz.ctags ================================================ --langdef=knownz --kinddef-knownz=m,mark,makers --_fielddef-knownz=owner,the owner of the markers{datatype=str} --_fielddef-knownz=len,the length of owner string{datatype=int} --fields-knownz=+{len} --_fielddef-knownz=lenplus,the length of owner string + 1{datatype=int} --fields-knownz=+{lenplus} --_fielddef-knownz=exported,whether the marker is exported or not{datatype=bool} --fields-knownz=+{exported} ================================================ FILE: Tmain/parser-specific-fields-for-foreign-lang-in-json.d/run.sh ================================================ # Copyright: 2025 Masatake YAMATO # License: GPL-2 . ../utils.sh CTAGS=$1 V= # V=valgrind is_feature_available "${CTAGS}" json echo "# output: json" ${V} ${CTAGS} --options=NONE --options=./knownz.ctags --sort=no --options=./unknownx.ctags \ --fields=+l \ --fields-unknownx=+'{protection}{signature}' \ --fields-knownz=+'{owner}' \ --output-format=json \ -o - input.unknownx ================================================ FILE: Tmain/parser-specific-fields-for-foreign-lang-in-json.d/stderr-expected.txt ================================================ ctags: Notice: No options will be read from files or environment ================================================ FILE: Tmain/parser-specific-fields-for-foreign-lang-in-json.d/stdout-expected.txt ================================================ # output: json {"_type": "tag", "name": "foo", "path": "input.unknownx", "pattern": "/^public func foo(n, m);$/", "language": "unknownx", "kind": "func", "protection": "public ", "signature": "(n, m)"} {"_type": "tag", "name": "bar", "path": "input.unknownx", "pattern": "/^protected func bar(n);$/", "language": "unknownx", "kind": "func", "protection": "protected ", "signature": "(n)"} {"_type": "tag", "name": "baz", "path": "input.unknownx", "pattern": "/^private func baz(n,...);$/", "language": "unknownx", "kind": "func", "protection": "private ", "signature": "(n,...)"} {"_type": "tag", "name": "strset", "path": "input.unknownx", "pattern": "/^STR:strset@iamowner$/", "language": "knownz", "kind": "mark", "owner": "iamowner"} {"_type": "tag", "name": "setsetempty", "path": "input.unknownx", "pattern": "/^STR:setsetempty@$/", "language": "knownz", "kind": "mark", "owner": ""} {"_type": "tag", "name": "notset", "path": "input.unknownx", "pattern": "/^STR:notset$/", "language": "knownz", "kind": "mark"} {"_type": "tag", "name": "tagme2", "path": "input.unknownx", "pattern": "/^Y:iamowner2=tagme2$/", "language": "knownz", "kind": "mark", "owner": "iamowner2"} {"_type": "tag", "name": "tagme-z", "path": "input.unknownx", "pattern": "/^Z:tagme-z@iamowner-z$/", "language": "knownz", "kind": "mark", "owner": "iamowner-z", "len": 10, "lenplus": 11} {"_type": "tag", "name": "a", "path": "input.unknownx", "pattern": "/^eset:a$/", "language": "knownz", "kind": "mark", "exported": true} {"_type": "tag", "name": "b", "path": "input.unknownx", "pattern": "/^enoset:b$/", "language": "knownz", "kind": "mark"} {"_type": "tag", "name": "9_exported", "path": "input.unknownx", "pattern": "/^enoset:b$/", "language": "knownz", "kind": "mark"} ================================================ FILE: Tmain/parser-specific-fields-for-foreign-lang-in-json.d/unknownx.ctags ================================================ --langdef=unknownx{_foreignLanguage=knownz} --kinddef-unknownx=f,func,functions --map-unknownx=+.unknownx --_fielddef-unknownx=protection,protections --_fielddef-unknownx=signature,signatures --_prelude-unknownx={{ /exported false def }} --regex-unknownx=/^((public|protected|private) +)?func ([^\(]+)\((.*)\)/\3/f/{_field=protection:\1}{_field=signature:(\4)} --regex-unknownx=/^STR:([a-z]+)@([a-z]+)/\1/m/{_language=knownz}{_field=owner:\2} --regex-unknownx=/^STR:([a-z]+)@$/\1/m/{_language=knownz}{_field=owner:} --regex-unknownx=/^STR:([a-z]+)$/\1/m/{_language=knownz} --regex-unknownx=/^Y:([a-z0-9]+)=([a-z0-9]+)/\2/m/{_field=owner:\1}{_language=knownz} --regex-unknownx=/^Z:([-a-z]+)@([-a-z]+)/\1/m/{_language=knownz}{{ . \2 knownz.owner: . :knownz.owner { . exch length knownz.len: } if . :knownz.len { 1 add . exch knownz.lenplus: } if }} --regex-unknownx=/^eset:([-a-z]+)/\1/m/{_language=knownz}{{ /exported . def . true knownz.exported: }} --regex-unknownx=/^enoset:([-a-z]+)/\1/m/{_language=knownz}{{ . false knownz.exported: exported :knownz.exported and { mark exported 0 string cvs (_exported) _buildstring /knownz /mark 1@ _foreigntag _commit pop } if }} ================================================ FILE: Tmain/parser-specific-fields-for-foreign-lang.d/input.unknownx ================================================ public func foo(n, m); protected func bar(n); private func baz(n,...); STR:strset@iamowner STR:setsetempty@ STR:notset Y:iamowner2=tagme2 Z:tagme-z@iamowner-z eset:a enoset:b stb:o stb:p- stb:q.something string x0:O x1:P ================================================ FILE: Tmain/parser-specific-fields-for-foreign-lang.d/knownz.ctags ================================================ --langdef=knownz --kinddef-knownz=m,mark,makers --_fielddef-knownz=owner,the owner of the markers{datatype=str} --_fielddef-knownz=len,the length of owner string{datatype=int} --fields-knownz=+{len} --_fielddef-knownz=lenplus,the length of owner string + 1{datatype=int} --fields-knownz=+{lenplus} --_fielddef-knownz=exported,whether the marker is exported or not{datatype=bool} --fields-knownz=+{exported} --_fielddef-knownz=stb,string or false{datatype=str+bool} --fields-knownz=+{stb} ================================================ FILE: Tmain/parser-specific-fields-for-foreign-lang.d/run.sh ================================================ # Copyright: 2024 Masatake YAMATO # License: GPL-2 . ../utils.sh CTAGS=$1 V= # V=valgrind echo "# output: tags" ${V} ${CTAGS} --options=NONE --options=./knownz.ctags --sort=no --options=./unknownx.ctags \ --fields=+l \ --fields-unknownx=+'{protection}{signature}' \ --fields-knownz=+'{owner}' \ -o - input.unknownx echo "# output: xref" ${V} ${CTAGS} --options=NONE --options=./knownz.ctags --sort=no --options=./unknownx.ctags \ --fields=+l \ --fields-unknownx=+'{protection}{signature}' \ --fields-knownz=+'{owner}' \ -x --_xformat="%N %l / owner:%{knownz.owner},len:%{knownz.len},lenplus:%{knownz.lenplus},exported:%{knownz.exported},stb:%{knownz.stb} / %{unknownx.protection}%{unknownx.signature}" \ -o - input.unknownx ================================================ FILE: Tmain/parser-specific-fields-for-foreign-lang.d/stderr-expected.txt ================================================ ctags: Notice: No options will be read from files or environment /not-set false (something string) # Setting a string to a bool field true true # Setting a string to a int field true 1 ctags: Notice: No options will be read from files or environment /not-set false (something string) # Setting a string to a bool field true true # Setting a string to a int field true 1 ================================================ FILE: Tmain/parser-specific-fields-for-foreign-lang.d/stdout-expected.txt ================================================ # output: tags foo input.unknownx /^public func foo(n, m);$/;" f language:unknownx protection:public signature:(n, m) bar input.unknownx /^protected func bar(n);$/;" f language:unknownx protection:protected signature:(n) baz input.unknownx /^private func baz(n,...);$/;" f language:unknownx protection:private signature:(n,...) strset input.unknownx /^STR:strset@iamowner$/;" m language:knownz owner:iamowner setsetempty input.unknownx /^STR:setsetempty@$/;" m language:knownz owner: notset input.unknownx /^STR:notset$/;" m language:knownz tagme2 input.unknownx /^Y:iamowner2=tagme2$/;" m language:knownz owner:iamowner2 tagme-z input.unknownx /^Z:tagme-z@iamowner-z$/;" m language:knownz owner:iamowner-z len:10 lenplus:11 a input.unknownx /^eset:a$/;" m language:knownz exported: b input.unknownx /^enoset:b$/;" m language:knownz 9_exported input.unknownx /^enoset:b$/;" m language:knownz o input.unknownx /^stb:o$/;" m language:knownz p input.unknownx /^stb:p-$/;" m language:knownz stb: q input.unknownx /^stb:q.something string$/;" m language:knownz stb:something string O input.unknownx /^x0:O$/;" m language:knownz exported: P input.unknownx /^x1:P$/;" m language:knownz len:1 # output: xref foo unknownx / owner:,len:,lenplus:,exported:-,stb: / public (n, m) bar unknownx / owner:,len:,lenplus:,exported:-,stb: / protected (n) baz unknownx / owner:,len:,lenplus:,exported:-,stb: / private (n,...) strset knownz / owner:iamowner,len:,lenplus:,exported:-,stb: / setsetempty knownz / owner:,len:,lenplus:,exported:-,stb: / notset knownz / owner:,len:,lenplus:,exported:-,stb: / tagme2 knownz / owner:iamowner2,len:,lenplus:,exported:-,stb: / tagme-z knownz / owner:iamowner-z,len:10,lenplus:11,exported:-,stb: / a knownz / owner:,len:,lenplus:,exported:exported,stb: / b knownz / owner:,len:,lenplus:,exported:-,stb: / 9_exported knownz / owner:,len:,lenplus:,exported:-,stb: / o knownz / owner:,len:,lenplus:,exported:-,stb: / p knownz / owner:,len:,lenplus:,exported:-,stb:- / q knownz / owner:,len:,lenplus:,exported:-,stb:something string / O knownz / owner:,len:,lenplus:,exported:exported,stb: / P knownz / owner:,len:1,lenplus:,exported:-,stb: / ================================================ FILE: Tmain/parser-specific-fields-for-foreign-lang.d/unknownx.ctags ================================================ --langdef=unknownx{_foreignLanguage=knownz} --kinddef-unknownx=f,func,functions --map-unknownx=+.unknownx --_fielddef-unknownx=protection,protections --_fielddef-unknownx=signature,signatures --_prelude-unknownx={{ /exported false def }} --regex-unknownx=/^((public|protected|private) +)?func ([^\(]+)\((.*)\)/\3/f/{_field=protection:\1}{_field=signature:(\4)} --regex-unknownx=/^STR:([a-z]+)@([a-z]+)/\1/m/{_language=knownz}{_field=owner:\2} --regex-unknownx=/^STR:([a-z]+)@$/\1/m/{_language=knownz}{_field=owner:} --regex-unknownx=/^STR:([a-z]+)$/\1/m/{_language=knownz} --regex-unknownx=/^Y:([a-z0-9]+)=([a-z0-9]+)/\2/m/{_field=owner:\1}{_language=knownz} --regex-unknownx=/^Z:([-a-z]+)@([-a-z]+)/\1/m/{_language=knownz}{{ . \2 knownz.owner: . :knownz.owner { . exch length knownz.len: } if . :knownz.len { 1 add . exch knownz.lenplus: } if }} --regex-unknownx=/^eset:([-a-z]+)/\1/m/{_language=knownz}{{ /exported . def . true knownz.exported: }} --regex-unknownx=/^enoset:([-a-z]+)/\1/m/{_language=knownz}{{ . false knownz.exported: exported :knownz.exported and { mark exported 0 string cvs (_exported) _buildstring /knownz /mark 1@ _foreigntag _commit pop } if }} --regex-unknownx=/^stb:([a-z])$/\1/m/{_language=knownz}{{ . :knownz.stb { == } { /not-set == } ifelse }} --regex-unknownx=/^stb:([a-z])-$/\1/m/{_language=knownz}{_field=stb:}{{ . :knownz.stb { == } { /not-set == } ifelse }} --regex-unknownx=/^stb:([a-z])\.(.*)$/\1/m/{_language=knownz}{_field=stb:\2}{{ . :knownz.stb { == } { /not-set == } ifelse }} --regex-unknownx=/^x0:([a-zA-Z])$/\1/m/{_language=knownz}{_field=exported:alpha}{{ (# Setting a string to a bool field) = . :knownz.exported pstack clear }} # Setting string to a int field --regex-unknownx=/^x1:([a-zA-Z])$/\1/m/{_language=knownz}{_field=len:alpha}{{ (# Setting a string to a int field) = . :knownz.len pstack clear }} ================================================ FILE: Tmain/parser-specific-fields-with-datatype.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/parser-specific-fields-with-datatype.d/input.testlang ================================================ str:s0 str:s1 str:s2 int:i0 int:i1 int:i2 int:i3 int:i4 bool:b0 bool:b1 bool:b2 strbool:sb0 strbool:sb1 strbool:sb2 ================================================ FILE: Tmain/parser-specific-fields-with-datatype.d/run.sh ================================================ # Copyright: 2025 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --options=testlang.ctags -o - \ --output-format=u-ctags \ input.testlang ================================================ FILE: Tmain/parser-specific-fields-with-datatype.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/parser-specific-fields-with-datatype.d/stdout-expected.txt ================================================ s0 input.testlang /^str:s0$/;" o str:string s1 input.testlang /^str:s1$/;" o str: s2 input.testlang /^str:s2$/;" o i0 input.testlang /^int:i0$/;" o int:10 i1 input.testlang /^int:i1$/;" o int:-1 i2 input.testlang /^int:i2$/;" o int:1 i3 input.testlang /^int:i3$/;" o int:0 i4 input.testlang /^int:i4$/;" o b0 input.testlang /^bool:b0$/;" o bool: b1 input.testlang /^bool:b1$/;" o bool: b2 input.testlang /^bool:b2$/;" o sb0 input.testlang /^strbool:sb0$/;" o strbool:abc sb1 input.testlang /^strbool:sb1$/;" o strbool: sb2 input.testlang /^strbool:sb2$/;" o ================================================ FILE: Tmain/parser-specific-fields-with-datatype.d/testlang.ctags ================================================ --sort=no --langdef=Testlang --map-Testlang=+.testlang --kinddef-Testlang=o,object,objects --_fielddef-Testlang=str,String{datatype=str} --fields-Testlang=+{str} --_fielddef-Testlang=int,Integer{datatype=int} --fields-Testlang=+{int} --_fielddef-Testlang=bool,Boolean{datatype=bool} --fields-Testlang=+{bool} --_fielddef-Testlang=strbool,String or Boolean{datatype=str+bool} --fields-Testlang=+{strbool} --regex-Testlang=/^str:(s0)/\1/o/{_field=str:string} --regex-Testlang=/^str:(s1)/\1/o/{_field=str:} --regex-Testlang=/^str:(s2)/\1/o/ --regex-Testlang=/^int:(i0)/\1/o/{_field=int:10} --regex-Testlang=/^int:(i1)/\1/o/{_field=int:-1} --regex-Testlang=/^int:(i2)/\1/o/{_field=int:abc} --regex-Testlang=/^int:(i3)/\1/o/{_field=int:} --regex-Testlang=/^int:(i4)/\1/o/ --regex-Testlang=/^bool:(b0)/\1/o/{_field=bool:abc} --regex-Testlang=/^bool:(b1)/\1/o/{_field=bool:} --regex-Testlang=/^bool:(b2)/\1/o/ --regex-Testlang=/^strbool:(sb0)/\1/o/{_field=strbool:abc} --regex-Testlang=/^strbool:(sb1)/\1/o/{_field=strbool:} --regex-Testlang=/^strbool:(sb2)/\1/o/ ================================================ FILE: Tmain/parser-specific-fields-with-scripts.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/parser-specific-fields-with-scripts.d/input.testlang ================================================ string => string string => integer string => bool string => strbool int => string int => integer int => bool int => strbool true => string true => integer true => bool true => strbool false => string false => integer false => bool false => strbool array => string array => integer array => bool array => strbool empty string => string empty string => integer empty string => bool empty string => strbool int => bool => strbool => true => bool, false => true ================================================ FILE: Tmain/parser-specific-fields-with-scripts.d/run.sh ================================================ # Copyright: 2025 Masatake YAMATO # License: GPL-2 CTAGS="$1" CMDLINE="$CTAGS --quiet --options=NONE --options=./testlang.ctags" . ../utils.sh is_feature_available "$1" json echo '### ctags' && ${CMDLINE} \ --param-Testlang.dp=true \ -o - input.testlang && echo '### xref' && ${CMDLINE} \ --_xformat="%-16N :: str:%{Testlang.str} int:%{Testlang.int} bool:%{Testlang.bool} strbool:%{Testlang.strbool}" \ -x input.testlang && echo '### json' && ${CMDLINE} \ --output-format=json -o - input.testlang && echo '### etags' && ${CMDLINE} \ --output-format=etags -o - input.testlang && : ================================================ FILE: Tmain/parser-specific-fields-with-scripts.d/stderr-expected.txt ================================================ string => string...OK stringtype/(str) string => integer...XERR typecheck string => bool...XERR typecheck string => strbool...OK stringtype/(str) int => string...XERR typecheck int => integer...OK integertype/17 int => bool...XERR typecheck int => strbool...XERR typecheck true => string...XERR typecheck true => integer...XERR typecheck true => bool...OK booleantype/true true => strbool...XERR typecheck false => string...XERR typecheck false => integer...XERR typecheck false => bool...OK /noval false => strbool...OK booleantype/false array => string...XERR typecheck array => integer...XERR typecheck array => bool...XERR typecheck array => strbool...XERR typecheck empty string => string...OK stringtype/() empty string => integer...XERR typecheck empty string => bool...XERR typecheck empty string => strbool...OK booleantype/false int =>...OK /noval bool =>...OK /noval strbool =>...OK /noval true => bool, false => true...XERR fieldreset ================================================ FILE: Tmain/parser-specific-fields-with-scripts.d/stdout-expected.txt ================================================ ### ctags string => string input.testlang /^string => string$/;" o str:str string => integer input.testlang /^string => integer$/;" o string => bool input.testlang /^string => bool$/;" o string => strbool input.testlang /^string => strbool$/;" o strbool:str int => string input.testlang /^int => string$/;" o int => integer input.testlang /^int => integer$/;" o int:17 int => bool input.testlang /^int => bool$/;" o int => strbool input.testlang /^int => strbool$/;" o true => string input.testlang /^true => string$/;" o true => integer input.testlang /^true => integer$/;" o true => bool input.testlang /^true => bool$/;" o bool: true => strbool input.testlang /^true => strbool$/;" o false => string input.testlang /^false => string$/;" o false => integer input.testlang /^false => integer$/;" o false => bool input.testlang /^false => bool$/;" o false => strbool input.testlang /^false => strbool$/;" o strbool: array => string input.testlang /^array => string$/;" o array => integer input.testlang /^array => integer$/;" o array => bool input.testlang /^array => bool$/;" o array => strbool input.testlang /^array => strbool$/;" o empty string => string input.testlang /^empty string => string$/;" o str: empty string => integer input.testlang /^empty string => integer$/;" o empty string => bool input.testlang /^empty string => bool$/;" o empty string => strbool input.testlang /^empty string => strbool$/;" o strbool: int => input.testlang /^int =>$/;" o bool => input.testlang /^bool =>$/;" o strbool => input.testlang /^strbool =>$/;" o true => bool, false => true input.testlang /^true => bool, false => true$/;" o bool: ### xref string => string :: str:str int: bool:- strbool: string => integer :: str: int: bool:- strbool: string => bool :: str: int: bool:- strbool: string => strbool :: str: int: bool:- strbool:str int => string :: str: int: bool:- strbool: int => integer :: str: int:17 bool:- strbool: int => bool :: str: int: bool:- strbool: int => strbool :: str: int: bool:- strbool: true => string :: str: int: bool:- strbool: true => integer :: str: int: bool:- strbool: true => bool :: str: int: bool:bool strbool: true => strbool :: str: int: bool:- strbool: false => string :: str: int: bool:- strbool: false => integer :: str: int: bool:- strbool: false => bool :: str: int: bool:- strbool: false => strbool :: str: int: bool:- strbool:- array => string :: str: int: bool:- strbool: array => integer :: str: int: bool:- strbool: array => bool :: str: int: bool:- strbool: array => strbool :: str: int: bool:- strbool: empty string => string :: str: int: bool:- strbool: empty string => integer :: str: int: bool:- strbool: empty string => bool :: str: int: bool:- strbool: empty string => strbool :: str: int: bool:- strbool:- int => :: str: int: bool:- strbool: bool => :: str: int: bool:- strbool: strbool => :: str: int: bool:- strbool: true => bool, false => true :: str: int: bool:bool strbool: ### json {"_type": "tag", "name": "string => string", "path": "input.testlang", "pattern": "/^string => string$/", "kind": "object", "str": "str"} {"_type": "tag", "name": "string => integer", "path": "input.testlang", "pattern": "/^string => integer$/", "kind": "object"} {"_type": "tag", "name": "string => bool", "path": "input.testlang", "pattern": "/^string => bool$/", "kind": "object"} {"_type": "tag", "name": "string => strbool", "path": "input.testlang", "pattern": "/^string => strbool$/", "kind": "object", "strbool": "str"} {"_type": "tag", "name": "int => string", "path": "input.testlang", "pattern": "/^int => string$/", "kind": "object"} {"_type": "tag", "name": "int => integer", "path": "input.testlang", "pattern": "/^int => integer$/", "kind": "object", "int": 17} {"_type": "tag", "name": "int => bool", "path": "input.testlang", "pattern": "/^int => bool$/", "kind": "object"} {"_type": "tag", "name": "int => strbool", "path": "input.testlang", "pattern": "/^int => strbool$/", "kind": "object"} {"_type": "tag", "name": "true => string", "path": "input.testlang", "pattern": "/^true => string$/", "kind": "object"} {"_type": "tag", "name": "true => integer", "path": "input.testlang", "pattern": "/^true => integer$/", "kind": "object"} {"_type": "tag", "name": "true => bool", "path": "input.testlang", "pattern": "/^true => bool$/", "kind": "object", "bool": true} {"_type": "tag", "name": "true => strbool", "path": "input.testlang", "pattern": "/^true => strbool$/", "kind": "object"} {"_type": "tag", "name": "false => string", "path": "input.testlang", "pattern": "/^false => string$/", "kind": "object"} {"_type": "tag", "name": "false => integer", "path": "input.testlang", "pattern": "/^false => integer$/", "kind": "object"} {"_type": "tag", "name": "false => bool", "path": "input.testlang", "pattern": "/^false => bool$/", "kind": "object"} {"_type": "tag", "name": "false => strbool", "path": "input.testlang", "pattern": "/^false => strbool$/", "kind": "object", "strbool": false} {"_type": "tag", "name": "array => string", "path": "input.testlang", "pattern": "/^array => string$/", "kind": "object"} {"_type": "tag", "name": "array => integer", "path": "input.testlang", "pattern": "/^array => integer$/", "kind": "object"} {"_type": "tag", "name": "array => bool", "path": "input.testlang", "pattern": "/^array => bool$/", "kind": "object"} {"_type": "tag", "name": "array => strbool", "path": "input.testlang", "pattern": "/^array => strbool$/", "kind": "object"} {"_type": "tag", "name": "empty string => string", "path": "input.testlang", "pattern": "/^empty string => string$/", "kind": "object", "str": ""} {"_type": "tag", "name": "empty string => integer", "path": "input.testlang", "pattern": "/^empty string => integer$/", "kind": "object"} {"_type": "tag", "name": "empty string => bool", "path": "input.testlang", "pattern": "/^empty string => bool$/", "kind": "object"} {"_type": "tag", "name": "empty string => strbool", "path": "input.testlang", "pattern": "/^empty string => strbool$/", "kind": "object", "strbool": false} {"_type": "tag", "name": "int =>", "path": "input.testlang", "pattern": "/^int =>$/", "kind": "object"} {"_type": "tag", "name": "bool =>", "path": "input.testlang", "pattern": "/^bool =>$/", "kind": "object"} {"_type": "tag", "name": "strbool =>", "path": "input.testlang", "pattern": "/^strbool =>$/", "kind": "object"} {"_type": "tag", "name": "true => bool, false => true", "path": "input.testlang", "pattern": "/^true => bool, false => true$/", "kind": "object", "bool": true} ### etags input.testlang,1095 string => stringstring => string1,0 string => integerstring => integer2,17 string => boolstring => bool3,35 string => strboolstring => strbool4,50 int => stringint => string5,68 int => integerint => integer6,82 int => boolint => bool7,97 int => strboolint => strbool8,109 true => stringtrue => string9,124 true => integertrue => integer10,139 true => booltrue => bool11,155 true => strbooltrue => strbool12,168 false => stringfalse => string13,184 false => integerfalse => integer14,200 false => boolfalse => bool15,217 false => strboolfalse => strbool16,231 array => stringarray => string17,248 array => integerarray => integer18,264 array => boolarray => bool19,281 array => strboolarray => strbool20,295 empty string => stringempty string => string22,313 empty string => integerempty string => integer23,336 empty string => boolempty string => bool24,360 empty string => strboolempty string => strbool25,381 int =>int =>27,406 bool =>bool =>28,413 strbool =>strbool =>29,421 true => bool, false => truetrue => bool, false => true31,433 ================================================ FILE: Tmain/parser-specific-fields-with-scripts.d/testlang.ctags ================================================ --sort=no --langdef=Testlang --map-Testlang=+.testlang --_paramdef-Testlang=dp,enable debug printing --kinddef-Testlang=o,object,objects --_fielddef-Testlang=str,String{datatype=str} --fields-Testlang=+{str} --_fielddef-Testlang=int,Integer{datatype=int} --fields-Testlang=+{int} --_fielddef-Testlang=bool,Boolean{datatype=bool} --fields-Testlang=+{bool} --_fielddef-Testlang=strbool,String or Boolean{datatype=str+bool} --fields-Testlang=+{strbool} --_prelude-Testlang={{ /dp _param { pop /q {=} def /qq {==} def /qa {=+} def /qqa {==+} def } { /q {pop} def /qq {pop} def /qa {pop} def /qqa {pop} def } ifelse /T { mark \1 (...) _buildstring qa } def /pval { dup type qqa (/) qa qq } def /Tstr { T . exch { Testlang.str: } stopped { clear (XERR ) qa _errorname q } { (OK ) qa . :Testlang.str {pval} {/noval qq} ifelse} ifelse } def /Tint { T . exch { Testlang.int: } stopped { clear (XERR ) qa _errorname q } { (OK ) qa . :Testlang.int {pval} {/noval qq} ifelse } ifelse } def /Tbool { T . exch { Testlang.bool: } stopped { clear (XERR ) qa _errorname q } { (OK ) qa . :Testlang.bool {pval} {/noval qq} ifelse } ifelse } def /Tstrbool { T . exch { Testlang.strbool: } stopped { clear (XERR ) qa _errorname q } { (OK ) qa . :Testlang.strbool {pval} {/noval qq} ifelse } ifelse } def /verifygetter { stopped { clear (XERR ) qa _errorname q } { (OK ) qa {pval} {/noval qq} ifelse } ifelse } def }} --regex-Testlang=/^(string => string)$/\1/o/{{ (str) Tstr }} --regex-Testlang=/^(string => integer)$/\1/o/{{ (str) Tint }} --regex-Testlang=/^(string => bool)$/\1/o/{{ (str) Tbool }} --regex-Testlang=/^(string => strbool)$/\1/o/{{ (str) Tstrbool }} --regex-Testlang=/^(int => string)$/\1/o/{{ 17 Tstr }} --regex-Testlang=/^(int => integer)$/\1/o/{{ 17 Tint }} --regex-Testlang=/^(int => bool)$/\1/o/{{ 17 Tbool }} --regex-Testlang=/^(int => strbool)$/\1/o/{{ 17 Tstrbool }} --regex-Testlang=/^(true => string)$/\1/o/{{ true Tstr }} --regex-Testlang=/^(true => integer)$/\1/o/{{ true Tint }} --regex-Testlang=/^(true => bool)$/\1/o/{{ true Tbool }} --regex-Testlang=/^(true => strbool)$/\1/o/{{ true Tstrbool }} --regex-Testlang=/^(false => string)$/\1/o/{{ false Tstr }} --regex-Testlang=/^(false => integer)$/\1/o/{{ false Tint }} --regex-Testlang=/^(false => bool)$/\1/o/{{ false Tbool }} --regex-Testlang=/^(false => strbool)$/\1/o/{{ false Tstrbool }} --regex-Testlang=/^(array => string)$/\1/o/{{ [ 1 2 3 ] Tstr }} --regex-Testlang=/^(array => integer)$/\1/o/{{ [ 1 2 3 ] Tint }} --regex-Testlang=/^(array => bool)$/\1/o/{{ [ 1 2 3 ] Tbool }} --regex-Testlang=/^(array => strbool)$/\1/o/{{ [ 1 2 3 ] Tstrbool }} --regex-Testlang=/^(empty string => string)$/\1/o/{{ () Tstr }} --regex-Testlang=/^(empty string => integer)$/\1/o/{{ () Tint }} --regex-Testlang=/^(empty string => bool)$/\1/o/{{ () Tbool }} --regex-Testlang=/^(empty string => strbool)$/\1/o/{{ () Tstrbool }} --regex-Testlang=/^(string =>)$/\1/o/{{ { T . :Testlang.str } verifygetter }} --regex-Testlang=/^(int =>)$/\1/o/{{ { T . :Testlang.int } verifygetter }} --regex-Testlang=/^(bool =>)$/\1/o/{{ { T . :Testlang.bool } verifygetter }} --regex-Testlang=/^(strbool =>)$/\1/o/{{ { T . :Testlang.strbool } verifygetter }} --regex-Testlang=/^(true => bool, false => true)$/\1/o/{{ T . true Testlang.bool: { . false Testlang.bool: } stopped { clear (XERR ) qa _errorname q } if }} ================================================ FILE: Tmain/parser-specific-fields.d/input.unknownx ================================================ public func foo(n, m); protected func bar(n); private func baz(n,...); ================================================ FILE: Tmain/parser-specific-fields.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 . ../utils.sh CTAGS=$1 V= # V=valgrind echo '#' disabling fields ${V} ${CTAGS} --options=NONE --options=./unknownx.ctags -o - input.unknownx echo '#' enabling signature only ${V} ${CTAGS} --options=NONE --options=./unknownx.ctags --fields-unknownx=+'{signature}' -o - input.unknownx echo '#' enabling protection only ${V} ${CTAGS} --options=NONE --options=./unknownx.ctags --fields-unknownx=+'{protection}' -o - input.unknownx echo '#' enabling both signature and protection ${V} ${CTAGS} --options=NONE --options=./unknownx.ctags --fields-unknownx=+'{protection}{signature}' -o - input.unknownx ================================================ FILE: Tmain/parser-specific-fields.d/stderr-expected.txt ================================================ ctags: Notice: No options will be read from files or environment ctags: Notice: No options will be read from files or environment ctags: Notice: No options will be read from files or environment ctags: Notice: No options will be read from files or environment ================================================ FILE: Tmain/parser-specific-fields.d/stdout-expected.txt ================================================ # disabling fields bar input.unknownx /^protected func bar(n);$/;" f baz input.unknownx /^private func baz(n,...);$/;" f foo input.unknownx /^public func foo(n, m);$/;" f # enabling signature only bar input.unknownx /^protected func bar(n);$/;" f signature:(n) baz input.unknownx /^private func baz(n,...);$/;" f signature:(n,...) foo input.unknownx /^public func foo(n, m);$/;" f signature:(n, m) # enabling protection only bar input.unknownx /^protected func bar(n);$/;" f protection:protected baz input.unknownx /^private func baz(n,...);$/;" f protection:private foo input.unknownx /^public func foo(n, m);$/;" f protection:public # enabling both signature and protection bar input.unknownx /^protected func bar(n);$/;" f protection:protected signature:(n) baz input.unknownx /^private func baz(n,...);$/;" f protection:private signature:(n,...) foo input.unknownx /^public func foo(n, m);$/;" f protection:public signature:(n, m) ================================================ FILE: Tmain/parser-specific-fields.d/unknownx.ctags ================================================ --langdef=unknownx --kinddef-unknownx=f,func,functions --map-unknownx=+.unknownx --_fielddef-unknownx=protection,protections --_fielddef-unknownx=signature,signatures --regex-unknownx=/^((public|protected|private) +)?func ([^\(]+)\((.*)\)/\3/f/{_field=protection:\1}{_field=signature:(\4)} ================================================ FILE: Tmain/pattern-length-limit.d/input-iso-8859-1.py ================================================ # this is made to pass the `(c & 0xC0) == 0x80` UTF-8 sub-byte check to make # sure we have a working hard limit in case of malicious input. a='' ================================================ FILE: Tmain/pattern-length-limit.d/input-utf8.py ================================================ a='éàçè' ================================================ FILE: Tmain/pattern-length-limit.d/input.java ================================================ import com.example.Bar; import java.util.logging.Logger; public class Foo extends Bar {static Logger a = Logger.getLogger(Foo.class.getName()); static Logger b = Logger.getLogger(Foo.class.getName());} ================================================ FILE: Tmain/pattern-length-limit.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE -o - \ --kinds-java=f ./input.java ${CTAGS} --quiet --options=NONE -o - \ --pattern-length-limit=10 \ --kinds-java=f ./input.java ${CTAGS} --quiet --options=NONE -o - \ --pattern-length-limit=0 \ --kinds-java=f ./input.java for etags in '' '-e'; do echo "--- multi-byte handling" $(test -n "$etags" && echo "(etags)") # as the 7th byte is an inner byte, cutting at 6 and 7 should yield the same result ${CTAGS} --quiet --options=NONE $etags -o - \ --pattern-length-limit=6 \ --kinds-python=v ./input-utf8.py ${CTAGS} --quiet --options=NONE $etags -o - \ --pattern-length-limit=7 \ --kinds-python=v ./input-utf8.py ${CTAGS} --quiet --options=NONE $etags -o - \ --pattern-length-limit=4 \ --kinds-python=v ./input-iso-8859-1.py done exit $? ================================================ FILE: Tmain/pattern-length-limit.d/stdout-expected.txt ================================================ a ./input.java /^public class Foo extends Bar {static Logger a = Logger.getLogger(Foo.class.getName()); static Lo/;" f b ./input.java /^public class Foo extends Bar {static Logger a = Logger.getLogger(Foo.class.getName()); static Lo/;" f a ./input.java /^public cla/;" f b ./input.java /^public cla/;" f a ./input.java /^public class Foo extends Bar {static Logger a = Logger.getLogger(Foo.class.getName()); static Logger b = Logger.getLogger(Foo.class.getName());}$/;" f b ./input.java /^public class Foo extends Bar {static Logger a = Logger.getLogger(Foo.class.getName()); static Logger b = Logger.getLogger(Foo.class.getName());}$/;" f --- multi-byte handling a ./input-utf8.py /^a='éà/;" v a ./input-utf8.py /^a='éà/;" v a ./input-iso-8859-1.py /^a='/;" v --- multi-byte handling (etags) input-utf8.py,14 a='éàa1,0 input-utf8.py,14 a='éàa1,0 input-iso-8859-1.py,16 a='a3,141 ================================================ FILE: Tmain/pretend-option.d/run.sh ================================================ # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS=$1 "${CTAGS}" --quiet --options=NONE --with-list-header=no --_pretend-Lisp=C --list-kinds=C ================================================ FILE: Tmain/pretend-option.d/stdout-expected.txt ================================================ Y unknown type of definitions f functions v variables m macros c constants t types C classes s structs M methods G generics p parameters ================================================ FILE: Tmain/ptag-dont-emit-to-stdout-by-default.d/input.c ================================================ int x; ================================================ FILE: Tmain/ptag-dont-emit-to-stdout-by-default.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --pseudo-tags='*' -o - input.c ================================================ FILE: Tmain/ptag-dont-emit-to-stdout-by-default.d/stdout-expected.txt ================================================ x input.c /^int x;$/;" v typeref:typename:int ================================================ FILE: Tmain/ptag-emits-even-when-rewinding.d/README ================================================ The original bug (#3932) was reproduced only when --disable-external-sort is set when building ctags. ================================================ FILE: Tmain/ptag-emits-even-when-rewinding.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/ptag-emits-even-when-rewinding.d/input.cpp ================================================ private ================================================ FILE: Tmain/ptag-emits-even-when-rewinding.d/run.sh ================================================ # Copyright: 2024 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh # exit_if_win32 $CTAGS O="--quiet --options=NONE --extras=+p" count_ptags=$(${CTAGS} $O -o - input.cpp | grep -F '!_TAG_KIND_DESCRIPTION!C++' | wc -l) count_list=$(${CTAGS} $O --with-list-header=no --list-kinds-full=C++ | grep '.[ \t]*[^ \t]*yes' | wc -l) if ! test "$count_ptags" -eq "$count_list"; then echo count_ptags: $count_ptags echo count_list: $count_list ${CTAGS} $O -o - input.cpp exit 1 fi exit 0 ================================================ FILE: Tmain/ptag-emits-even-when-rewinding.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/ptag-emits-even-when-rewinding.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/ptag-extra-desc.d/input.robot ================================================ # EMPTY ================================================ FILE: Tmain/ptag-extra-desc.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS=$1 O="--quiet --options=NONE " ${CTAGS} $O \ --extras=p --pseudo-tags=TAG_EXTRA_DESCRIPTION \ --extras=+g \ --extras-Robot='{whitespaceSwapped}' \ -o - \ input.robot ${CTAGS} $O \ --extras=p --pseudo-tags=TAG_EXTRA_DESCRIPTION \ --extras-Robot=-'{whitespaceSwapped}' \ -o - \ input.robot ================================================ FILE: Tmain/ptag-extra-desc.d/stdout-expected.txt ================================================ !_TAG_EXTRA_DESCRIPTION guest /Include tags generated by guest parsers/ !_TAG_EXTRA_DESCRIPTION pseudo /Include pseudo tags/ !_TAG_EXTRA_DESCRIPTION!Robot whitespaceSwapped /Include tags swapping whitespace and underscore chars/ !_TAG_EXTRA_DESCRIPTION pseudo /Include pseudo tags/ ================================================ FILE: Tmain/ptag-field-sec.d/input.c ================================================ /* EMPTY */ ================================================ FILE: Tmain/ptag-field-sec.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS=$1 O="--quiet --options=NONE " ${CTAGS} $O \ --extras=+p --pseudo-tags=TAG_FIELD_DESCRIPTION \ --fields=le \ --fields-C='{macrodef}' \ -o - \ input.c ================================================ FILE: Tmain/ptag-field-sec.d/stdout-expected.txt ================================================ !_TAG_FIELD_DESCRIPTION end /end lines of various items/ !_TAG_FIELD_DESCRIPTION input /input file/ !_TAG_FIELD_DESCRIPTION language /Language of input file containing tag/ !_TAG_FIELD_DESCRIPTION name /tag name/ !_TAG_FIELD_DESCRIPTION pattern /pattern/ !_TAG_FIELD_DESCRIPTION!C macrodef /macro definition/ ================================================ FILE: Tmain/ptag-in-optlib-parser.d/input.foo ================================================ # EMPTY ================================================ FILE: Tmain/ptag-in-optlib-parser.d/input.sh ================================================ ================================================ FILE: Tmain/ptag-in-optlib-parser.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh { echo '# BUILTIN' ${CTAGS} --quiet --options=NONE -o - --extras=p --pseudo-tags='*' \ --pseudo-tags=-TAG_PROC_CWD \ --fields='-{typeref}{file}' \ input.sh echo '# REGEX' ${CTAGS} --quiet --options=NONE -o - --extras=p --pseudo-tags='*' \ --pseudo-tags=-TAG_PROC_CWD \ --langdef=foo --langmap=foo:+.foo \ --_fielddef-foo='field,field example' \ --fields='-{typeref}{file}' \ --fields-foo='{field}' \ --_extradef-foo='extra,extra example' \ --extras-foo='{extra}' \ --regex-foo='/abc/\1/k,kind,kinds/' input.foo } | grep -v VERSION ================================================ FILE: Tmain/ptag-in-optlib-parser.d/stdout-expected.txt ================================================ # BUILTIN !_TAG_EXTRA_DESCRIPTION pseudo /Include pseudo tags/ !_TAG_FIELD_DESCRIPTION epoch /the last modified time of the input file (only for F\/file kind tag)/ !_TAG_FIELD_DESCRIPTION input /input file/ !_TAG_FIELD_DESCRIPTION name /tag name/ !_TAG_FIELD_DESCRIPTION pattern /pattern/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_KIND_DESCRIPTION!Sh a,alias /aliases/ !_TAG_KIND_DESCRIPTION!Sh f,function /functions/ !_TAG_KIND_DESCRIPTION!Sh h,heredoc /label for here document/ !_TAG_KIND_DESCRIPTION!Sh s,script /script files/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_ROLE_DESCRIPTION!Sh!heredoc endmarker /end marker/ !_TAG_ROLE_DESCRIPTION!Sh!script loaded /loaded/ # REGEX !_TAG_EXTRA_DESCRIPTION pseudo /Include pseudo tags/ !_TAG_EXTRA_DESCRIPTION!foo extra /extra example/ !_TAG_FIELD_DESCRIPTION epoch /the last modified time of the input file (only for F\/file kind tag)/ !_TAG_FIELD_DESCRIPTION input /input file/ !_TAG_FIELD_DESCRIPTION name /tag name/ !_TAG_FIELD_DESCRIPTION pattern /pattern/ !_TAG_FIELD_DESCRIPTION!foo field /field example/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_KIND_DESCRIPTION!foo k,kind /kinds/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ ================================================ FILE: Tmain/ptag-kind-desc.d/input.c ================================================ /* EMPTY */ ================================================ FILE: Tmain/ptag-kind-desc.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS=$1 O="--quiet --options=NONE " ${CTAGS} $O \ --extras=+p --pseudo-tags=TAG_KIND_DESCRIPTION \ --kinds-C=df \ -o - \ input.c ================================================ FILE: Tmain/ptag-kind-desc.d/stdout-expected.txt ================================================ !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C f,function /function definitions/ ================================================ FILE: Tmain/ptag-kind-sep.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/ptag-kind-sep.d/input.php ================================================ NOTHING HERE ================================================ FILE: Tmain/ptag-kind-sep.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE -o - \ --extras=p --kinds-all= \ --pseudo-tags=TAG_PROGRAM_NAME \ input.php ${CTAGS} --quiet --options=NONE -o - \ --extras=+p --kinds-all= \ --pseudo-tags=+TAG_KIND_SEPARATOR \ --pseudo-tags=-TAG_PROGRAM_VERSION \ --pseudo-tags=-TAG_PROC_CWD \ --pseudo-tags=-TAG_KIND_DESCRIPTION \ --pseudo-tags=-TAG_FIELD_DESCRIPTION \ --pseudo-tags=-TAG_EXTRA_DESCRIPTION \ --pseudo-tags=-TAG_ROLE_DESCRIPTION \ --pseudo-tags=-TAG_PARSER_VERSION \ --pseudo-tags=-TAG_OUTPUT_VERSION \ input.php ================================================ FILE: Tmain/ptag-kind-sep.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/ptag-kind-sep.d/stdout-expected.txt ================================================ !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_KIND_SEPARATOR!PHP :: /*a/ !_TAG_KIND_SEPARATOR!PHP :: /*c/ !_TAG_KIND_SEPARATOR!PHP :: /*d/ !_TAG_KIND_SEPARATOR!PHP :: /*f/ !_TAG_KIND_SEPARATOR!PHP :: /*i/ !_TAG_KIND_SEPARATOR!PHP :: /*l/ !_TAG_KIND_SEPARATOR!PHP :: /*n/ !_TAG_KIND_SEPARATOR!PHP :: /*t/ !_TAG_KIND_SEPARATOR!PHP :: /*v/ !_TAG_KIND_SEPARATOR!PHP \\ /na/ !_TAG_KIND_SEPARATOR!PHP \\ /nc/ !_TAG_KIND_SEPARATOR!PHP \\ /nd/ !_TAG_KIND_SEPARATOR!PHP \\ /nf/ !_TAG_KIND_SEPARATOR!PHP \\ /ni/ !_TAG_KIND_SEPARATOR!PHP \\ /nl/ !_TAG_KIND_SEPARATOR!PHP \\ /nn/ !_TAG_KIND_SEPARATOR!PHP \\ /nt/ !_TAG_KIND_SEPARATOR!PHP \\ /nv/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ ================================================ FILE: Tmain/ptag-output-excmd.d/input.c ================================================ /* EMPTY */ ================================================ FILE: Tmain/ptag-output-excmd.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh O="--quiet --options=NONE " for c in number pattern mixed combine; do ${CTAGS} $O \ --excmd=$c \ --extras=+p --pseudo-tags=TAG_OUTPUT_EXCMD \ -o - \ input.c done ================================================ FILE: Tmain/ptag-output-excmd.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/ptag-output-excmd.d/stdout-expected.txt ================================================ !_TAG_OUTPUT_EXCMD number /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_EXCMD pattern /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_EXCMD combineV2 /number, pattern, mixed, or combineV2/ ================================================ FILE: Tmain/ptag-proc-cwd-including-tab.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh # # This test case doesn't work well on Windows on CI/CD envornments we use. # We can make a directory having \t in their name. # cd built-in command with the name works well. # pwd prints the directory including \t as expected. # However, the input fields of TAG_PROC_CWD doesn't includ \t # character; it is replaced with a strange byte sequence "f0 09". # How to test: # # $ cd ctags # $ make # $ mkdir "$(printf 'a\tb')" # $ cd "$(printf 'a\tb')" # $ echo 'int x;' > input.c # $ ../ctags --extras=+p -o - input.c | grep _TAG_PROC_CWD # # Temporary we disable this test case. # exit_if_win32 $CTAGS O="--quiet --options=NONE " ( pid=$$ dir="$(printf 'ctags-%s\t%s-tmain' $pid $pid)" cd / if pwd=$(readlink /tmp); then cd "${pwd}" else cd /tmp fi pwd=$(pwd) mkdir "$dir" cd "$dir" touch input2.c ls ${CTAGS} $O \ --extras=+p --pseudo-tags=TAG_PROC_CWD \ -o - \ input2.c | sed -e "s/$pid//g" | sed -e "s|$pwd|/tmp|" | sed -e "s|[A-Z]:/.*/tmp|/tmp|" rm input2.c cd .. rmdir "$dir" ) ================================================ FILE: Tmain/ptag-proc-cwd-including-tab.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/ptag-proc-cwd-including-tab.d/stdout-expected.txt ================================================ input2.c !_TAG_PROC_CWD /tmp/ctags-\t-tmain/ // ================================================ FILE: Tmain/ptag-proc-cwd.d/input.c ================================================ /* EMPTY */ ================================================ FILE: Tmain/ptag-proc-cwd.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh # exit_if_win32 $CTAGS O="--quiet --options=NONE " ( cd /usr ${CTAGS} $O \ --extras=+p --pseudo-tags=TAG_PROC_CWD \ -o - \ /input.c 2>/dev/null | sed -e "s|[A-Z]:/.*/usr|/usr|" ) ================================================ FILE: Tmain/ptag-proc-cwd.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/ptag-proc-cwd.d/stdout-expected.txt ================================================ !_TAG_PROC_CWD /usr/ // ================================================ FILE: Tmain/ptag-role-desc.d/input.c ================================================ /* EMPTY */ ================================================ FILE: Tmain/ptag-role-desc.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS=$1 O="--quiet --options=NONE " ${CTAGS} $O \ --extras=+p --pseudo-tags=TAG_ROLE_DESCRIPTION \ --kinds-C=h \ -o - \ input.c ================================================ FILE: Tmain/ptag-role-desc.d/stdout-expected.txt ================================================ !_TAG_ROLE_DESCRIPTION!C!header local /local header/ !_TAG_ROLE_DESCRIPTION!C!header system /system header/ ================================================ FILE: Tmain/readtags-alias.d/input.c ================================================ /* ctags -o output.tags input.c */ struct point3d { int x, y ,z; }; ================================================ FILE: Tmain/readtags-alias.d/output.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /6d353f7f/ point3d input.c /^struct point3d {$/;" s file: x input.c /^ int x, y ,z;$/;" m struct:point3d typeref:typename:int file: y input.c /^ int x, y ,z;$/;" m struct:point3d typeref:typename:int file: z input.c /^ int x, y ,z;$/;" m struct:point3d typeref:typename:int file: ================================================ FILE: Tmain/readtags-alias.d/run.sh ================================================ #!/bin/sh # Copyright: 2020 Masatake YAMATO # License: GPL-2 READTAGS=$3 #V="valgrind --leak-check=full --track-origins=yes -v" V= . ../utils.sh skip_if_no_readtags "$READTAGS" echo '!_ -Q #t point3d' ${V} ${READTAGS} -t output.tags -Q '#t' point3d echo '!_ -Q true point3d' ${V} ${READTAGS} -t output.tags -Q 'true' point3d echo '!_ -Q #f point3d' ${V} ${READTAGS} -t output.tags -Q '#f' point3d echo '!_ -Q false point3d' ${V} ${READTAGS} -t output.tags -Q 'false' point3d echo '!_ -Q #t -l' ${V} ${READTAGS} -t output.tags -Q '#t' -l echo '!_ -Q true -l' ${V} ${READTAGS} -t output.tags -Q 'true' -l echo '!_ -Q #f -l' ${V} ${READTAGS} -t output.tags -Q '#f' -l echo '!_ -Q false -l' ${V} ${READTAGS} -t output.tags -Q 'false' -l echo '!_ -Q (null? nil) -l' ${V} ${READTAGS} -t output.tags -Q '(null? nil)' -l echo '!_ -Q (null? ()) -l' ${V} ${READTAGS} -t output.tags -Q '(null? ())' -l echo '!_ -Q (null? false) -l' ${V} ${READTAGS} -t output.tags -Q '(null? false)' -l ================================================ FILE: Tmain/readtags-alias.d/stdout-expected.txt ================================================ !_ -Q #t point3d point3d input.c /^struct point3d {$/ !_ -Q true point3d point3d input.c /^struct point3d {$/ !_ -Q #f point3d !_ -Q false point3d !_ -Q #t -l point3d input.c /^struct point3d {$/ x input.c /^ int x, y ,z;$/ y input.c /^ int x, y ,z;$/ z input.c /^ int x, y ,z;$/ !_ -Q true -l point3d input.c /^struct point3d {$/ x input.c /^ int x, y ,z;$/ y input.c /^ int x, y ,z;$/ z input.c /^ int x, y ,z;$/ !_ -Q #f -l !_ -Q false -l !_ -Q (null? nil) -l point3d input.c /^struct point3d {$/ x input.c /^ int x, y ,z;$/ y input.c /^ int x, y ,z;$/ z input.c /^ int x, y ,z;$/ !_ -Q (null? ()) -l point3d input.c /^struct point3d {$/ x input.c /^ int x, y ,z;$/ y input.c /^ int x, y ,z;$/ z input.c /^ int x, y ,z;$/ !_ -Q (null? false) -l ================================================ FILE: Tmain/readtags-broken-input.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/readtags-broken-input.d/run.sh ================================================ #!/bin/sh # Copyright: 2018 Masatake YAMATO # License: GPL-2 READTAGS=$3 #V="valgrind --leak-check=full --track-origins=yes -v" V= . ../utils.sh skip_if_no_readtags "$READTAGS" for i in 1 2 3 4 5 6; do ${V} ${READTAGS} -t ./target.tags - greet${i} > /dev/null || exit 1 done ${READTAGS} -t ./target.tags - greetA ${READTAGS} -t ./target.tags - greetB ================================================ FILE: Tmain/readtags-broken-input.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-broken-input.d/stdout-expected.txt ================================================ greetA input.java /^ public void greet (String word) {$/ greetB input.java ?^ public void greet (String word) {$? ================================================ FILE: Tmain/readtags-broken-input.d/target.tags ================================================ greet1 input.java /^ public void greet (String word) {$;" m line:9 method:input.hello.anonXXX greetA input.java /^ public void greet (String word) {$/;" m line:9 method:input.hello.anonXXX greet2 input.java k:v greet3 input.java greet4 input.java greet5 greetB input.java ?^ public void greet (String word) {$?;" m line:9 method:input.hello.anonXXX greet6 input.java ?^ public void greet (String word) {$;" m line:9 method:input.hello.anonXXX ================================================ FILE: Tmain/readtags-canonicalize-input-names.d/drive-letter0.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROC_CWD C:\tmp // !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 5.9.0 /e08db39a3/ a_fn xyz/a.c /^static void a_fn(void) {}$/;" f typeref:typename:void file: ================================================ FILE: Tmain/readtags-canonicalize-input-names.d/drive-letter1.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROC_CWD D:/tmp // !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 5.9.0 /e08db39a3/ a_fn xyz/a.c /^static void a_fn(void) {}$/;" f typeref:typename:void file: ================================================ FILE: Tmain/readtags-canonicalize-input-names.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/readtags-canonicalize-input-names.d/good-ptags.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROC_CWD /../../tmp // !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 5.9.0 /e08db39a3/ !_TAG_PROC_DUMMY /../../tmp // ================================================ FILE: Tmain/readtags-canonicalize-input-names.d/good0.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROC_CWD /tmp/abc/ // !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 5.9.0 /e08db39a3/ a_fn xyz/a.c /^static void a_fn(void) {}$/;" f typeref:typename:void file: b_fn b.c /^static void b_fn(void) {}$/;" f typeref:typename:void file: c_fn ./c.c /^static void c_fn(void) {}$/;" f typeref:typename:void file: d_fn ./../d.c /^static void d_fn(void) {}$/;" f typeref:typename:void file: e_fn ../e.c /^static void e_fn(void) {}$/;" f typeref:typename:void file: f_fn ../../f.c /^static void f_fn(void) {}$/;" f typeref:typename:void file: g_fn ../../../g.c /^static void g_fn(void) {}$/;" f typeref:typename:void file: h_fn ../../../../h.c /^static void h_fn(void) {}$/;" f typeref:typename:void file: i_fn .././../../../i.c /^static void i_fn(void) {}$/;" f typeref:typename:void file: j_fn .././../j.c /^static void j_fn(void) {}$/;" f typeref:typename:void file: k_fn .././.././././k.c /^static void k_fn(void) {}$/;" f typeref:typename:void file: l_fn ././././././l.c /^static void l_fn(void) {}$/;" f typeref:typename:void file: m_fn ./././../abc/./m.c /^static void m_fn(void) {}$/;" f typeref:typename:void file: n_fn ./././../abc/X/.././n.c /^static void n_fn(void) {}$/;" f typeref:typename:void file: o_fn .////.///////./////..//abc//X//..///.///o.c /^static void o_fn(void) {}$/;" f typeref:typename:void file: p_fn ./../xyz/p.c /^static void p_fn(void) {}$/;" f typeref:typename:void file: q_fn ./../xyz/../././xyz/q.c /^static void q_fn(void) {}$/;" f typeref:typename:void file: r_fn /r.c /^static void r_fn(void) {}$/;" f typeref:typename:void file: s_fn /../s.c /^static void s_fn(void) {}$/;" f typeref:typename:void file: t_fn /../././t.c /^static void t_fn(void) {}$/;" f typeref:typename:void file: u_fn /../././tmp/./u.c /^static void u_fn(void) {}$/;" f typeref:typename:void file: v_fn /../././tmp/./../tmp/abc/./v.c /^static void v_fn(void) {}$/;" f typeref:typename:void file: w_fn /../././tmp/./../tmp/../abc/./w.c /^static void w_fn(void) {}$/;" f typeref:typename:void file: ================================================ FILE: Tmain/readtags-canonicalize-input-names.d/good1.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROC_CWD /tmp/abc/../././abc/../abc // !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 5.9.0 /e08db39a3/ a_fn xyz/a.c /^static void a_fn(void) {}$/;" f typeref:typename:void file: b_fn b.c /^static void b_fn(void) {}$/;" f typeref:typename:void file: c_fn ./c.c /^static void c_fn(void) {}$/;" f typeref:typename:void file: d_fn ./../d.c /^static void d_fn(void) {}$/;" f typeref:typename:void file: e_fn ../e.c /^static void e_fn(void) {}$/;" f typeref:typename:void file: f_fn ../../f.c /^static void f_fn(void) {}$/;" f typeref:typename:void file: g_fn ../../../g.c /^static void g_fn(void) {}$/;" f typeref:typename:void file: h_fn ../../../../h.c /^static void h_fn(void) {}$/;" f typeref:typename:void file: i_fn .././../../../i.c /^static void i_fn(void) {}$/;" f typeref:typename:void file: j_fn .././../j.c /^static void j_fn(void) {}$/;" f typeref:typename:void file: k_fn .././.././././k.c /^static void k_fn(void) {}$/;" f typeref:typename:void file: l_fn ././././././l.c /^static void l_fn(void) {}$/;" f typeref:typename:void file: m_fn ./././../abc/./m.c /^static void m_fn(void) {}$/;" f typeref:typename:void file: n_fn ./././../abc/X/.././n.c /^static void n_fn(void) {}$/;" f typeref:typename:void file: o_fn .////.///////./////..//abc//X//..///.///o.c /^static void o_fn(void) {}$/;" f typeref:typename:void file: p_fn ./../xyz/p.c /^static void p_fn(void) {}$/;" f typeref:typename:void file: q_fn ./../xyz/../././xyz/q.c /^static void q_fn(void) {}$/;" f typeref:typename:void file: r_fn /r.c /^static void r_fn(void) {}$/;" f typeref:typename:void file: s_fn /../s.c /^static void s_fn(void) {}$/;" f typeref:typename:void file: t_fn /../././t.c /^static void t_fn(void) {}$/;" f typeref:typename:void file: u_fn /../././tmp/./u.c /^static void u_fn(void) {}$/;" f typeref:typename:void file: v_fn /../././tmp/./../tmp/abc/./v.c /^static void v_fn(void) {}$/;" f typeref:typename:void file: w_fn /../././tmp/./../tmp/../abc/./w.c /^static void w_fn(void) {}$/;" f typeref:typename:void file: ================================================ FILE: Tmain/readtags-canonicalize-input-names.d/good2.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROC_CWD /tmp/abc/../././abc/../abc/ // !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 5.9.0 /e08db39a3/ a_fn xyz/a.c /^static void a_fn(void) {}$/;" f typeref:typename:void file: b_fn b.c /^static void b_fn(void) {}$/;" f typeref:typename:void file: c_fn ./c.c /^static void c_fn(void) {}$/;" f typeref:typename:void file: d_fn ./../d.c /^static void d_fn(void) {}$/;" f typeref:typename:void file: e_fn ../e.c /^static void e_fn(void) {}$/;" f typeref:typename:void file: f_fn ../../f.c /^static void f_fn(void) {}$/;" f typeref:typename:void file: g_fn ../../../g.c /^static void g_fn(void) {}$/;" f typeref:typename:void file: h_fn ../../../../h.c /^static void h_fn(void) {}$/;" f typeref:typename:void file: i_fn .././../../../i.c /^static void i_fn(void) {}$/;" f typeref:typename:void file: j_fn .././../j.c /^static void j_fn(void) {}$/;" f typeref:typename:void file: k_fn .././.././././k.c /^static void k_fn(void) {}$/;" f typeref:typename:void file: l_fn ././././././l.c /^static void l_fn(void) {}$/;" f typeref:typename:void file: m_fn ./././../abc/./m.c /^static void m_fn(void) {}$/;" f typeref:typename:void file: n_fn ./././../abc/X/.././n.c /^static void n_fn(void) {}$/;" f typeref:typename:void file: o_fn .////.///////./////..//abc//X//..///.///o.c /^static void o_fn(void) {}$/;" f typeref:typename:void file: p_fn ./../xyz/p.c /^static void p_fn(void) {}$/;" f typeref:typename:void file: q_fn ./../xyz/../././xyz/q.c /^static void q_fn(void) {}$/;" f typeref:typename:void file: r_fn /r.c /^static void r_fn(void) {}$/;" f typeref:typename:void file: s_fn /../s.c /^static void s_fn(void) {}$/;" f typeref:typename:void file: t_fn /../././t.c /^static void t_fn(void) {}$/;" f typeref:typename:void file: u_fn /../././tmp/./u.c /^static void u_fn(void) {}$/;" f typeref:typename:void file: v_fn /../././tmp/./../tmp/abc/./v.c /^static void v_fn(void) {}$/;" f typeref:typename:void file: w_fn /../././tmp/./../tmp/../abc/./w.c /^static void w_fn(void) {}$/;" f typeref:typename:void file: ================================================ FILE: Tmain/readtags-canonicalize-input-names.d/run.sh ================================================ #!/bin/sh # Copyright: 2021 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" echo2() { echo "$@" echo "$@" 1>&2 } run_test() { echo2 "# $@" "${READTAGS}" -F '(list $name "\t" $input "\n")' $2 -t $1 $3 } run_test good0.tags -C -l && run_test good1.tags --canonicalize-input -l && run_test good2.tags -C -l && ! run_test drive-letter0.tags --canonicalize-input -l && ! run_test drive-letter1.tags -C -l && run_test good-ptags.tags -C -D && run_test good-ptags.tags -C --list-pseudo-tags && run_test good0.tags -A -l && run_test good1.tags --absolute-input -l && run_test good2.tags -A -l && ! run_test drive-letter0.tags --absolute-input -l && ! run_test drive-letter1.tags -A -l && run_test good-ptags.tags -A -D && run_test good-ptags.tags -A --list-pseudo-tags ================================================ FILE: Tmain/readtags-canonicalize-input-names.d/stderr-expected.txt ================================================ # good0.tags -C -l # good1.tags --canonicalize-input -l # good2.tags -C -l # drive-letter0.tags --canonicalize-input -l !_TAG_PROC_CWD must start with '/': C:\tmp # drive-letter1.tags -C -l !_TAG_PROC_CWD must start with '/': D:/tmp # good-ptags.tags -C -D # good-ptags.tags -C --list-pseudo-tags # good0.tags -A -l # good1.tags --absolute-input -l # good2.tags -A -l # drive-letter0.tags --absolute-input -l !_TAG_PROC_CWD must start with '/': C:\tmp # drive-letter1.tags -A -l !_TAG_PROC_CWD must start with '/': D:/tmp # good-ptags.tags -A -D # good-ptags.tags -A --list-pseudo-tags ================================================ FILE: Tmain/readtags-canonicalize-input-names.d/stdout-expected.txt ================================================ # good0.tags -C -l a_fn xyz/a.c b_fn b.c c_fn c.c d_fn /tmp/d.c e_fn /tmp/e.c f_fn /f.c g_fn /g.c h_fn /h.c i_fn /i.c j_fn /j.c k_fn /k.c l_fn l.c m_fn m.c n_fn n.c o_fn o.c p_fn /tmp/xyz/p.c q_fn /tmp/xyz/q.c r_fn /r.c s_fn /s.c t_fn /t.c u_fn /tmp/u.c v_fn /tmp/abc/v.c w_fn /abc/w.c # good1.tags --canonicalize-input -l a_fn xyz/a.c b_fn b.c c_fn c.c d_fn /tmp/d.c e_fn /tmp/e.c f_fn /f.c g_fn /g.c h_fn /h.c i_fn /i.c j_fn /j.c k_fn /k.c l_fn l.c m_fn m.c n_fn n.c o_fn o.c p_fn /tmp/xyz/p.c q_fn /tmp/xyz/q.c r_fn /r.c s_fn /s.c t_fn /t.c u_fn /tmp/u.c v_fn /tmp/abc/v.c w_fn /abc/w.c # good2.tags -C -l a_fn xyz/a.c b_fn b.c c_fn c.c d_fn /tmp/d.c e_fn /tmp/e.c f_fn /f.c g_fn /g.c h_fn /h.c i_fn /i.c j_fn /j.c k_fn /k.c l_fn l.c m_fn m.c n_fn n.c o_fn o.c p_fn /tmp/xyz/p.c q_fn /tmp/xyz/q.c r_fn /r.c s_fn /s.c t_fn /t.c u_fn /tmp/u.c v_fn /tmp/abc/v.c w_fn /abc/w.c # drive-letter0.tags --canonicalize-input -l # drive-letter1.tags -C -l # good-ptags.tags -C -D !_TAG_FILE_FORMAT 2 !_TAG_FILE_SORTED 1 !_TAG_OUTPUT_EXCMD mixed !_TAG_OUTPUT_FILESEP slash !_TAG_OUTPUT_MODE u-ctags !_TAG_PATTERN_LENGTH_LIMIT 96 !_TAG_PROC_CWD /tmp !_TAG_PROGRAM_AUTHOR Universal Ctags Team !_TAG_PROGRAM_NAME Universal Ctags !_TAG_PROGRAM_URL https://ctags.io/ !_TAG_PROGRAM_VERSION 5.9.0 !_TAG_PROC_DUMMY /../../tmp # good-ptags.tags -C --list-pseudo-tags !_TAG_FILE_FORMAT 2 !_TAG_FILE_SORTED 1 !_TAG_OUTPUT_EXCMD mixed !_TAG_OUTPUT_FILESEP slash !_TAG_OUTPUT_MODE u-ctags !_TAG_PATTERN_LENGTH_LIMIT 96 !_TAG_PROC_CWD /tmp !_TAG_PROGRAM_AUTHOR Universal Ctags Team !_TAG_PROGRAM_NAME Universal Ctags !_TAG_PROGRAM_URL https://ctags.io/ !_TAG_PROGRAM_VERSION 5.9.0 !_TAG_PROC_DUMMY /../../tmp # good0.tags -A -l a_fn /tmp/abc/xyz/a.c b_fn /tmp/abc/b.c c_fn /tmp/abc/c.c d_fn /tmp/d.c e_fn /tmp/e.c f_fn /f.c g_fn /g.c h_fn /h.c i_fn /i.c j_fn /j.c k_fn /k.c l_fn /tmp/abc/l.c m_fn /tmp/abc/m.c n_fn /tmp/abc/n.c o_fn /tmp/abc/o.c p_fn /tmp/xyz/p.c q_fn /tmp/xyz/q.c r_fn /r.c s_fn /s.c t_fn /t.c u_fn /tmp/u.c v_fn /tmp/abc/v.c w_fn /abc/w.c # good1.tags --absolute-input -l a_fn /tmp/abc/xyz/a.c b_fn /tmp/abc/b.c c_fn /tmp/abc/c.c d_fn /tmp/d.c e_fn /tmp/e.c f_fn /f.c g_fn /g.c h_fn /h.c i_fn /i.c j_fn /j.c k_fn /k.c l_fn /tmp/abc/l.c m_fn /tmp/abc/m.c n_fn /tmp/abc/n.c o_fn /tmp/abc/o.c p_fn /tmp/xyz/p.c q_fn /tmp/xyz/q.c r_fn /r.c s_fn /s.c t_fn /t.c u_fn /tmp/u.c v_fn /tmp/abc/v.c w_fn /abc/w.c # good2.tags -A -l a_fn /tmp/abc/xyz/a.c b_fn /tmp/abc/b.c c_fn /tmp/abc/c.c d_fn /tmp/d.c e_fn /tmp/e.c f_fn /f.c g_fn /g.c h_fn /h.c i_fn /i.c j_fn /j.c k_fn /k.c l_fn /tmp/abc/l.c m_fn /tmp/abc/m.c n_fn /tmp/abc/n.c o_fn /tmp/abc/o.c p_fn /tmp/xyz/p.c q_fn /tmp/xyz/q.c r_fn /r.c s_fn /s.c t_fn /t.c u_fn /tmp/u.c v_fn /tmp/abc/v.c w_fn /abc/w.c # drive-letter0.tags --absolute-input -l # drive-letter1.tags -A -l # good-ptags.tags -A -D !_TAG_FILE_FORMAT 2 !_TAG_FILE_SORTED 1 !_TAG_OUTPUT_EXCMD mixed !_TAG_OUTPUT_FILESEP slash !_TAG_OUTPUT_MODE u-ctags !_TAG_PATTERN_LENGTH_LIMIT 96 !_TAG_PROC_CWD /tmp !_TAG_PROGRAM_AUTHOR Universal Ctags Team !_TAG_PROGRAM_NAME Universal Ctags !_TAG_PROGRAM_URL https://ctags.io/ !_TAG_PROGRAM_VERSION 5.9.0 !_TAG_PROC_DUMMY /../../tmp # good-ptags.tags -A --list-pseudo-tags !_TAG_FILE_FORMAT 2 !_TAG_FILE_SORTED 1 !_TAG_OUTPUT_EXCMD mixed !_TAG_OUTPUT_FILESEP slash !_TAG_OUTPUT_MODE u-ctags !_TAG_PATTERN_LENGTH_LIMIT 96 !_TAG_PROC_CWD /tmp !_TAG_PROGRAM_AUTHOR Universal Ctags Team !_TAG_PROGRAM_NAME Universal Ctags !_TAG_PROGRAM_URL https://ctags.io/ !_TAG_PROGRAM_VERSION 5.9.0 !_TAG_PROC_DUMMY /../../tmp ================================================ FILE: Tmain/readtags-combine.d/backward.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /6e3f1aa1/ foo input.c 2;?^int foo (void)$?;" f typeref:typename:int ================================================ FILE: Tmain/readtags-combine.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/readtags-combine.d/forward.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /6e3f1aa1/ foo input.c 0;/^int foo (void)$/;" f typeref:typename:int ================================================ FILE: Tmain/readtags-combine.d/run.sh ================================================ #!/bin/sh # Copyright: 2019 CCI Europe. Author: Claus Moltke-Leth # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" ${V} ${READTAGS} -e -t forward.tags -l && ${V} ${READTAGS} -e -t backward.tags -l ================================================ FILE: Tmain/readtags-combine.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-combine.d/stdout-expected.txt ================================================ foo input.c 0;/^int foo (void)$/;" kind:f typeref:typename:int foo input.c 2;?^int foo (void)$?;" kind:f typeref:typename:int ================================================ FILE: Tmain/readtags-default-field-val.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/readtags-default-field-val.d/input.c ================================================ /* ctags -o output.tags --fields-C=+'{properties}' input.c */ static int a(void) { return 0; } inline int b(void) { return 0; } int c(void) { return 0; } ================================================ FILE: Tmain/readtags-default-field-val.d/output.tags ================================================ !_TAG_EXTRA_DESCRIPTION anonymous /Include tags for non-named objects like lambda/ !_TAG_EXTRA_DESCRIPTION fileScope /Include tags of file scope/ !_TAG_EXTRA_DESCRIPTION pseudo /Include pseudo tags/ !_TAG_EXTRA_DESCRIPTION subparser /Include tags generated by subparsers/ !_TAG_FIELD_DESCRIPTION epoch /the last modified time of the input file (only for F\/file kind tag)/ !_TAG_FIELD_DESCRIPTION file /File-restricted scoping/ !_TAG_FIELD_DESCRIPTION input /input file/ !_TAG_FIELD_DESCRIPTION name /tag name/ !_TAG_FIELD_DESCRIPTION pattern /pattern/ !_TAG_FIELD_DESCRIPTION typeref /Type and name of a variable or typedef/ !_TAG_FIELD_DESCRIPTION!C properties /properties (static, inline, mutable,...)/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C h,header /included header files/ !_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/ !_TAG_KIND_DESCRIPTION!C s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C u,union /union names/ !_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_VERSION 0.0 /current.age/ !_TAG_PARSER_VERSION!C 0.0 /current.age/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROC_CWD /home/yamato/var/ctags-github/Tmain/readtags-default-field-val.d/ // !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 6.0.0 // !_TAG_ROLE_DESCRIPTION!C!header local /local header/ !_TAG_ROLE_DESCRIPTION!C!header system /system header/ !_TAG_ROLE_DESCRIPTION!C!macro undef /undefined/ a input.c /^static int a(void)$/;" f typeref:typename:int file: properties:static b input.c /^inline int b(void)$/;" f typeref:typename:int properties:inline c input.c /^int c(void)$/;" f typeref:typename:int ================================================ FILE: Tmain/readtags-default-field-val.d/run.sh ================================================ #!/bin/sh # Copyright: 2024 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" # ?a # 97 # (format "%c" 96) # => ` "${READTAGS}" -t output.tags -S '(<> ($ "properties" "`") (& "properties" "`"))' -F '(list $name " " ($ "properties" "noprop") #t)' -l ================================================ FILE: Tmain/readtags-default-field-val.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-default-field-val.d/stdout-expected.txt ================================================ c noprop b inline a static ================================================ FILE: Tmain/readtags-error-conflicting-actions.d/exit-expected.txt ================================================ 1 ================================================ FILE: Tmain/readtags-error-conflicting-actions.d/input.tags ================================================ ================================================ FILE: Tmain/readtags-error-conflicting-actions.d/run.sh ================================================ #!/bin/sh # Copyright: 2024 Masatake YAMATO # License: GPL-2 BUILDDIR=$2 READTAGS=$3 #V="valgrind --leak-check=full --track-origins=yes -v" V= . ../utils.sh skip_if_no_readtags "$READTAGS" f=${BUILDDIR}/tmp-readtags-error-conflicting-actions-$$ rm -f "$f" { ${READTAGS} --tag-file input.tags -l - main } 2> "$f" s=$? sed 's|.*\(readtags[^:]*\):|readtags:|' < "$f" 1>&2 rm "$f" exit $s ================================================ FILE: Tmain/readtags-error-conflicting-actions.d/stderr-expected.txt ================================================ readtags: choose either an action: finding a tag or listing all ================================================ FILE: Tmain/readtags-error-conflicting-actions.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/readtags-error-in-sorter.d/exit-expected.txt ================================================ 1 ================================================ FILE: Tmain/readtags-error-in-sorter.d/input.c ================================================ /* ctags -o output.tags input.c */ void foo (void) { } void bar (void) { } void baz (void) { } ================================================ FILE: Tmain/readtags-error-in-sorter.d/output.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /02cf1a61/ bar input.c /^void bar (void)$/;" f language:C typeref:typename:void baz input.c /^void baz (void)$/;" f language:C typeref:typename:void foo input.c /^void foo (void)$/;" f language:C typeref:typename:void ================================================ FILE: Tmain/readtags-error-in-sorter.d/run.sh ================================================ #!/bin/sh # Copyright: 2020 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" ${READTAGS} -t output.tags -S '(<> "a" 1)' -l ================================================ FILE: Tmain/readtags-error-no-action.d/exit-expected.txt ================================================ 1 ================================================ FILE: Tmain/readtags-error-no-action.d/input.tags ================================================ ================================================ FILE: Tmain/readtags-error-no-action.d/run.sh ================================================ #!/bin/sh # Copyright: 2024 Masatake YAMATO # License: GPL-2 BUILDDIR=$2 READTAGS=$3 #V="valgrind --leak-check=full --track-origins=yes -v" V= . ../utils.sh skip_if_no_readtags "$READTAGS" f=${BUILDDIR}/tmp-readtags-error-no-action-$$ rm -f "$f" { ${READTAGS} -t input.tags } 2> "$f" s=$? sed 's|.*\(readtags[^:]*\):|readtags:|' < "$f" 1>&2 rm "$f" exit $s ================================================ FILE: Tmain/readtags-error-no-action.d/stderr-expected.txt ================================================ readtags: no action specified: specify one of NAME, -l or -D ================================================ FILE: Tmain/readtags-error-no-action.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/readtags-error-no-input.d/exit-expected.txt ================================================ 1 ================================================ FILE: Tmain/readtags-error-no-input.d/run.sh ================================================ #!/bin/sh # Copyright: 2024 Masatake YAMATO # License: GPL-2 BUILDDIR=$2 READTAGS=$3 #V="valgrind --leak-check=full --track-origins=yes -v" V= . ../utils.sh skip_if_no_readtags "$READTAGS" f=${BUILDDIR}/tmp-readtags-error-no-input-$$ rm -f "$f" { : && ${READTAGS} -t ./no-such-input.tags -l || ${READTAGS} -t ./no-such-input.tags -D || ${READTAGS} -t ./no-such-input.tags - main || ${READTAGS} -t ./no-such-input.tags main } 2> "$f" s=$? sed 's|.*\(readtags[^:]*\):|readtags:|' < "$f" 1>&2 rm "$f" exit $s ================================================ FILE: Tmain/readtags-error-no-input.d/stderr-expected.txt ================================================ readtags: cannot open tag file: No such file or directory: ./no-such-input.tags readtags: cannot open tag file: No such file or directory: ./no-such-input.tags readtags: cannot open tag file: No such file or directory: ./no-such-input.tags readtags: cannot open tag file: No such file or directory: ./no-such-input.tags ================================================ FILE: Tmain/readtags-error-no-input.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/readtags-escaping.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/readtags-escaping.d/output.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /8d952eba/ aa main/Makefile /^%:$/;" t \taa parsers/Makefile /^%:$/;" t !b!b main/Makefile /^%:$/;" t \x20c!c main/Makefile /^%:$/;" t \x21d!d main/Makefile /^%:$/;" t \\\aa parsers/cxx/Makefile /^%:$/;" t ================================================ FILE: Tmain/readtags-escaping.d/output2.tags ================================================ \x01level1 input.rst /^level1$/;" c level2 input.rst /^level2$/;" s scope:chapter:\x01level1 \x21level3\x03 input.rst /^!level3$/;" S scope:section:level2 \x21level1+ input.rst /^!level1+$/;" c level2+ input.rst /^level2+$/;" s scope:chapter:!level1+ \x02level3+\x04 input.rst /^level3+$/;" S scope:section:level2+ ================================================ FILE: Tmain/readtags-escaping.d/run.sh ================================================ #!/bin/sh # Copyright: 2020 Masatake YAMATO # License: GPL-2 READTAGS=$3 #V="valgrind --leak-check=full --track-origins=yes -v" V= . ../utils.sh skip_if_no_readtags "$READTAGS" : && echo '# -en -l' && ${V} ${READTAGS} -en -t ./output.tags -l && echo '# -enE -l' && ${V} ${READTAGS} -enE -t ./output.tags -l && echo '# -en --escape-output -l' && ${V} ${READTAGS} -en --escape-output -t ./output.tags -l && echo '# -en -D' && ${V} ${READTAGS} -en -t ./output.tags -D && echo '# -en -E -D' && ${V} ${READTAGS} -en -E -t ./output.tags -D && echo '# -en --escape-output -D' && ${V} ${READTAGS} -en --escape-output -t ./output.tags -D && echo '# -en -l (output2)' && ${V} ${READTAGS} -en -t ./output2.tags -l && echo '# -en --escape-output -l (output2)' && ${V} ${READTAGS} -en --escape-output -t ./output2.tags -l && : ================================================ FILE: Tmain/readtags-escaping.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-escaping.d/stdout-expected.txt ================================================ # -en -l aa main/Makefile /^%:$/;" kind:t aa parsers/Makefile /^%:$/;" kind:t !b!b main/Makefile /^%:$/;" kind:t c!c main/Makefile /^%:$/;" kind:t !d!d main/Makefile /^%:$/;" kind:t \a parsers/cxx/Makefile /^%:$/;" kind:t # -enE -l aa main/Makefile /^%:$/;" kind:t \taa parsers/Makefile /^%:$/;" kind:t \x21b!b main/Makefile /^%:$/;" kind:t \x20c!c main/Makefile /^%:$/;" kind:t \x21d!d main/Makefile /^%:$/;" kind:t \\\aa parsers/cxx/Makefile /^%:$/;" kind:t # -en --escape-output -l aa main/Makefile /^%:$/;" kind:t \taa parsers/Makefile /^%:$/;" kind:t \x21b!b main/Makefile /^%:$/;" kind:t \x20c!c main/Makefile /^%:$/;" kind:t \x21d!d main/Makefile /^%:$/;" kind:t \\\aa parsers/cxx/Makefile /^%:$/;" kind:t # -en -D !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /8d952eba/ # -en -E -D !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /8d952eba/ # -en --escape-output -D !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /8d952eba/ # -en -l (output2) level1 input.rst /^level1$/;" kind:c level2 input.rst /^level2$/;" kind:s scope:chapter:level1 !level3 input.rst /^!level3$/;" kind:S scope:section:level2 !level1+ input.rst /^!level1+$/;" kind:c level2+ input.rst /^level2+$/;" kind:s scope:chapter:!level1+ level3+ input.rst /^level3+$/;" kind:S scope:section:level2+ # -en --escape-output -l (output2) \x01level1 input.rst /^level1$/;" kind:c level2 input.rst /^level2$/;" kind:s scope:chapter:\x01level1 \x21level3\x03 input.rst /^!level3$/;" kind:S scope:section:level2 \x21level1+ input.rst /^!level1+$/;" kind:c level2+ input.rst /^level2+$/;" kind:s scope:chapter:!level1+ \x02level3+\x04 input.rst /^level3+$/;" kind:S scope:section:level2+ ================================================ FILE: Tmain/readtags-formatter-op-regex-extraction.d/exit-expected.txt ================================================ 1 ================================================ FILE: Tmain/readtags-formatter-op-regex-extraction.d/input.c ================================================ /* ../../ctags -o output.tags --fields=+Z'{nth}' --pseudo-tags= --pseudo-tags=+TAG_FILE_FORMAT --pseudo-tags=+TAG_FILE_SORTED input.c */ /* Taken from linux/include/uapi/linux/bpf.h */ enum bpf_prog_type { BPF_PROG_TYPE_UNSPEC, BPF_PROG_TYPE_SOCKET_FILTER, BPF_PROG_TYPE_KPROBE, BPF_PROG_TYPE_SCHED_CLS, BPF_PROG_TYPE_SCHED_ACT, BPF_PROG_TYPE_TRACEPOINT, BPF_PROG_TYPE_XDP, BPF_PROG_TYPE_PERF_EVENT, BPF_PROG_TYPE_CGROUP_SKB, BPF_PROG_TYPE_CGROUP_SOCK, BPF_PROG_TYPE_LWT_IN, BPF_PROG_TYPE_LWT_OUT, BPF_PROG_TYPE_LWT_XMIT, BPF_PROG_TYPE_SOCK_OPS, BPF_PROG_TYPE_SK_SKB, BPF_PROG_TYPE_CGROUP_DEVICE, BPF_PROG_TYPE_SK_MSG, BPF_PROG_TYPE_RAW_TRACEPOINT, BPF_PROG_TYPE_CGROUP_SOCK_ADDR, BPF_PROG_TYPE_LWT_SEG6LOCAL, BPF_PROG_TYPE_LIRC_MODE2, BPF_PROG_TYPE_SK_REUSEPORT, BPF_PROG_TYPE_FLOW_DISSECTOR, BPF_PROG_TYPE_CGROUP_SYSCTL, BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE, BPF_PROG_TYPE_CGROUP_SOCKOPT, BPF_PROG_TYPE_TRACING, BPF_PROG_TYPE_STRUCT_OPS, BPF_PROG_TYPE_EXT, BPF_PROG_TYPE_LSM, BPF_PROG_TYPE_SK_LOOKUP, BPF_PROG_TYPE_SYSCALL, /* a program that can execute syscalls */ }; ================================================ FILE: Tmain/readtags-formatter-op-regex-extraction.d/output.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ BPF_PROG_TYPE_CGROUP_DEVICE input.c /^ BPF_PROG_TYPE_CGROUP_DEVICE,$/;" e scope:enum:bpf_prog_type file: nth:15 BPF_PROG_TYPE_CGROUP_SKB input.c /^ BPF_PROG_TYPE_CGROUP_SKB,$/;" e scope:enum:bpf_prog_type file: nth:8 BPF_PROG_TYPE_CGROUP_SOCK input.c /^ BPF_PROG_TYPE_CGROUP_SOCK,$/;" e scope:enum:bpf_prog_type file: nth:9 BPF_PROG_TYPE_CGROUP_SOCKOPT input.c /^ BPF_PROG_TYPE_CGROUP_SOCKOPT,$/;" e scope:enum:bpf_prog_type file: nth:25 BPF_PROG_TYPE_CGROUP_SOCK_ADDR input.c /^ BPF_PROG_TYPE_CGROUP_SOCK_ADDR,$/;" e scope:enum:bpf_prog_type file: nth:18 BPF_PROG_TYPE_CGROUP_SYSCTL input.c /^ BPF_PROG_TYPE_CGROUP_SYSCTL,$/;" e scope:enum:bpf_prog_type file: nth:23 BPF_PROG_TYPE_EXT input.c /^ BPF_PROG_TYPE_EXT,$/;" e scope:enum:bpf_prog_type file: nth:28 BPF_PROG_TYPE_FLOW_DISSECTOR input.c /^ BPF_PROG_TYPE_FLOW_DISSECTOR,$/;" e scope:enum:bpf_prog_type file: nth:22 BPF_PROG_TYPE_KPROBE input.c /^ BPF_PROG_TYPE_KPROBE,$/;" e scope:enum:bpf_prog_type file: nth:2 BPF_PROG_TYPE_LIRC_MODE2 input.c /^ BPF_PROG_TYPE_LIRC_MODE2,$/;" e scope:enum:bpf_prog_type file: nth:20 BPF_PROG_TYPE_LSM input.c /^ BPF_PROG_TYPE_LSM,$/;" e scope:enum:bpf_prog_type file: nth:29 BPF_PROG_TYPE_LWT_IN input.c /^ BPF_PROG_TYPE_LWT_IN,$/;" e scope:enum:bpf_prog_type file: nth:10 BPF_PROG_TYPE_LWT_OUT input.c /^ BPF_PROG_TYPE_LWT_OUT,$/;" e scope:enum:bpf_prog_type file: nth:11 BPF_PROG_TYPE_LWT_SEG6LOCAL input.c /^ BPF_PROG_TYPE_LWT_SEG6LOCAL,$/;" e scope:enum:bpf_prog_type file: nth:19 BPF_PROG_TYPE_LWT_XMIT input.c /^ BPF_PROG_TYPE_LWT_XMIT,$/;" e scope:enum:bpf_prog_type file: nth:12 BPF_PROG_TYPE_PERF_EVENT input.c /^ BPF_PROG_TYPE_PERF_EVENT,$/;" e scope:enum:bpf_prog_type file: nth:7 BPF_PROG_TYPE_RAW_TRACEPOINT input.c /^ BPF_PROG_TYPE_RAW_TRACEPOINT,$/;" e scope:enum:bpf_prog_type file: nth:17 BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE input.c /^ BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE,$/;" e scope:enum:bpf_prog_type file: nth:24 BPF_PROG_TYPE_SCHED_ACT input.c /^ BPF_PROG_TYPE_SCHED_ACT,$/;" e scope:enum:bpf_prog_type file: nth:4 BPF_PROG_TYPE_SCHED_CLS input.c /^ BPF_PROG_TYPE_SCHED_CLS,$/;" e scope:enum:bpf_prog_type file: nth:3 BPF_PROG_TYPE_SK_LOOKUP input.c /^ BPF_PROG_TYPE_SK_LOOKUP,$/;" e scope:enum:bpf_prog_type file: nth:30 BPF_PROG_TYPE_SK_MSG input.c /^ BPF_PROG_TYPE_SK_MSG,$/;" e scope:enum:bpf_prog_type file: nth:16 BPF_PROG_TYPE_SK_REUSEPORT input.c /^ BPF_PROG_TYPE_SK_REUSEPORT,$/;" e scope:enum:bpf_prog_type file: nth:21 BPF_PROG_TYPE_SK_SKB input.c /^ BPF_PROG_TYPE_SK_SKB,$/;" e scope:enum:bpf_prog_type file: nth:14 BPF_PROG_TYPE_SOCKET_FILTER input.c /^ BPF_PROG_TYPE_SOCKET_FILTER,$/;" e scope:enum:bpf_prog_type file: nth:1 BPF_PROG_TYPE_SOCK_OPS input.c /^ BPF_PROG_TYPE_SOCK_OPS,$/;" e scope:enum:bpf_prog_type file: nth:13 BPF_PROG_TYPE_STRUCT_OPS input.c /^ BPF_PROG_TYPE_STRUCT_OPS,$/;" e scope:enum:bpf_prog_type file: nth:27 BPF_PROG_TYPE_SYSCALL input.c /^ BPF_PROG_TYPE_SYSCALL, \/* a program that can execute syscalls *\/$/;" e scope:enum:bpf_prog_type file: nth:31 BPF_PROG_TYPE_TRACEPOINT input.c /^ BPF_PROG_TYPE_TRACEPOINT,$/;" e scope:enum:bpf_prog_type file: nth:5 BPF_PROG_TYPE_TRACING input.c /^ BPF_PROG_TYPE_TRACING,$/;" e scope:enum:bpf_prog_type file: nth:26 BPF_PROG_TYPE_UNSPEC input.c /^ BPF_PROG_TYPE_UNSPEC,$/;" e scope:enum:bpf_prog_type file: nth:0 BPF_PROG_TYPE_XDP input.c /^ BPF_PROG_TYPE_XDP,$/;" e scope:enum:bpf_prog_type file: nth:6 bpf_prog_type input.c /^enum bpf_prog_type {$/;" g file: ================================================ FILE: Tmain/readtags-formatter-op-regex-extraction.d/run.sh ================================================ #!/bin/sh # Copyright: 2023 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" echo '#' /GROUP/ ${V} ${READTAGS} -t output.tags \ -Q '(eq? $scope "enum:bpf_prog_type")' \ -S '(<> $nth &nth)' \ -F '(list "[" $nth "] = \"" (downcase (#/BPF_PROG_TYPE_(.*)/ $name 1)) "\",\n")' \ -l echo '#' /group/i ${V} ${READTAGS} -t output.tags \ -Q '(eq? $scope "enum:bpf_prog_type")' \ -S '(<> $nth &nth)' \ -F '(list "[" $nth "] = \"" (#/bpf_prog_type_(.*)/i $name 1) "\",\n")' \ -l echo '#' /GROUP/ with a fallback value ${V} ${READTAGS} -t output.tags \ -Q '(eq? $scope "enum:bpf_prog_type")' \ -S '(<> $nth &nth)' \ -F '(list "[" $nth "] = \"S" (#/BPF_PROG_TYPE_S(.*)/ $name 1 "???") "\",\n")' \ -l echo '#' /GROUP/i with a fallback value ${V} ${READTAGS} -t output.tags \ -Q '(eq? $scope "enum:bpf_prog_type")' \ -S '(<> $nth &nth)' \ -F '(list "[" $nth "] = \"s" (downcase (#/bpf_prog_type_s(.*)/i $name 1 "???")) "\",\n")' \ -l echo '#' /GROUP = 0/ ${V} ${READTAGS} -t output.tags \ -Q '(eq? $scope "enum:bpf_prog_type")' \ -S '(<> $nth &nth)' \ -F '(list "[" $nth "] = \"" (downcase (#/BPF_PROG_TYPE_(.*)/ $name 0)) "\",\n")' \ -l echo '#' /GROUP = empty/ ${V} ${READTAGS} -t output.tags \ -Q '(eq? $scope "enum:bpf_prog_type")' \ -S '(<> $nth &nth)' \ -F '(list "[" $nth "] = \"" (downcase (#/BPF_PROG_TYPE_UNSPE(.*)()/ $name 2)) "\",\n")' \ -l echo '#' /GROUP = 100/ ${V} ${READTAGS} -t output.tags \ -Q '(eq? $scope "enum:bpf_prog_type")' \ -S '(<> $nth &nth)' \ -F '(list "[" $nth "] = \"" (downcase (#/BPF_PROG_TYPE_UNSPE(.*)/ $name 100)) "\",\n")' \ -l ================================================ FILE: Tmain/readtags-formatter-op-regex-extraction.d/stderr-expected.txt ================================================ GOT ERROR in FORMATTING: wrong-regex-group: (#/BPF_PROG_TYPE_(.*)/ $name 0) GOT ERROR in FORMATTING: wrong-regex-group: (#/BPF_PROG_TYPE_UNSPE(.*)/ $name 100) ================================================ FILE: Tmain/readtags-formatter-op-regex-extraction.d/stdout-expected.txt ================================================ # /GROUP/ [0] = "unspec", [1] = "socket_filter", [2] = "kprobe", [3] = "sched_cls", [4] = "sched_act", [5] = "tracepoint", [6] = "xdp", [7] = "perf_event", [8] = "cgroup_skb", [9] = "cgroup_sock", [10] = "lwt_in", [11] = "lwt_out", [12] = "lwt_xmit", [13] = "sock_ops", [14] = "sk_skb", [15] = "cgroup_device", [16] = "sk_msg", [17] = "raw_tracepoint", [18] = "cgroup_sock_addr", [19] = "lwt_seg6local", [20] = "lirc_mode2", [21] = "sk_reuseport", [22] = "flow_dissector", [23] = "cgroup_sysctl", [24] = "raw_tracepoint_writable", [25] = "cgroup_sockopt", [26] = "tracing", [27] = "struct_ops", [28] = "ext", [29] = "lsm", [30] = "sk_lookup", [31] = "syscall", # /group/i [0] = "UNSPEC", [1] = "SOCKET_FILTER", [2] = "KPROBE", [3] = "SCHED_CLS", [4] = "SCHED_ACT", [5] = "TRACEPOINT", [6] = "XDP", [7] = "PERF_EVENT", [8] = "CGROUP_SKB", [9] = "CGROUP_SOCK", [10] = "LWT_IN", [11] = "LWT_OUT", [12] = "LWT_XMIT", [13] = "SOCK_OPS", [14] = "SK_SKB", [15] = "CGROUP_DEVICE", [16] = "SK_MSG", [17] = "RAW_TRACEPOINT", [18] = "CGROUP_SOCK_ADDR", [19] = "LWT_SEG6LOCAL", [20] = "LIRC_MODE2", [21] = "SK_REUSEPORT", [22] = "FLOW_DISSECTOR", [23] = "CGROUP_SYSCTL", [24] = "RAW_TRACEPOINT_WRITABLE", [25] = "CGROUP_SOCKOPT", [26] = "TRACING", [27] = "STRUCT_OPS", [28] = "EXT", [29] = "LSM", [30] = "SK_LOOKUP", [31] = "SYSCALL", # /GROUP/ with a fallback value [0] = "S???", [1] = "SOCKET_FILTER", [2] = "S???", [3] = "SCHED_CLS", [4] = "SCHED_ACT", [5] = "S???", [6] = "S???", [7] = "S???", [8] = "S???", [9] = "S???", [10] = "S???", [11] = "S???", [12] = "S???", [13] = "SOCK_OPS", [14] = "SK_SKB", [15] = "S???", [16] = "SK_MSG", [17] = "S???", [18] = "S???", [19] = "S???", [20] = "S???", [21] = "SK_REUSEPORT", [22] = "S???", [23] = "S???", [24] = "S???", [25] = "S???", [26] = "S???", [27] = "STRUCT_OPS", [28] = "S???", [29] = "S???", [30] = "SK_LOOKUP", [31] = "SYSCALL", # /GROUP/i with a fallback value [0] = "s???", [1] = "socket_filter", [2] = "s???", [3] = "sched_cls", [4] = "sched_act", [5] = "s???", [6] = "s???", [7] = "s???", [8] = "s???", [9] = "s???", [10] = "s???", [11] = "s???", [12] = "s???", [13] = "sock_ops", [14] = "sk_skb", [15] = "s???", [16] = "sk_msg", [17] = "s???", [18] = "s???", [19] = "s???", [20] = "s???", [21] = "sk_reuseport", [22] = "s???", [23] = "s???", [24] = "s???", [25] = "s???", [26] = "s???", [27] = "struct_ops", [28] = "s???", [29] = "s???", [30] = "sk_lookup", [31] = "syscall", # /GROUP = 0/ # /GROUP = empty/ [0] = "", [1] = "", [2] = "", [3] = "", [4] = "", [5] = "", [6] = "", [7] = "", [8] = "", [9] = "", [10] = "", [11] = "", [12] = "", [13] = "", [14] = "", [15] = "", [16] = "", [17] = "", [18] = "", [19] = "", [20] = "", [21] = "", [22] = "", [23] = "", [24] = "", [25] = "", [26] = "", [27] = "", [28] = "", [29] = "", [30] = "", [31] = "", # /GROUP = 100/ ================================================ FILE: Tmain/readtags-formatter-op-tr.d/input.cpp ================================================ // ctags -o output.tags input.cpp int __foo(void) { return 0; } ================================================ FILE: Tmain/readtags-formatter-op-tr.d/output.tags ================================================ !_TAG_EXTRA_DESCRIPTION anonymous /Include tags for non-named objects like lambda/ !_TAG_EXTRA_DESCRIPTION fileScope /Include tags of file scope/ !_TAG_EXTRA_DESCRIPTION pseudo /Include pseudo tags/ !_TAG_EXTRA_DESCRIPTION subparser /Include tags generated by subparsers/ !_TAG_FIELD_DESCRIPTION epoch /the last modified time of the input file (only for F\/file kind tag)/ !_TAG_FIELD_DESCRIPTION file /File-restricted scoping/ !_TAG_FIELD_DESCRIPTION input /input file/ !_TAG_FIELD_DESCRIPTION name /tag name/ !_TAG_FIELD_DESCRIPTION pattern /pattern/ !_TAG_FIELD_DESCRIPTION typeref /Type and name of a variable or typedef/ !_TAG_FIELD_DESCRIPTION!C++ name /aliased names/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_KIND_DESCRIPTION!C++ c,class /classes/ !_TAG_KIND_DESCRIPTION!C++ d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C++ e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C++ f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C++ g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C++ h,header /included header files/ !_TAG_KIND_DESCRIPTION!C++ m,member /class, struct, and union members/ !_TAG_KIND_DESCRIPTION!C++ n,namespace /namespaces/ !_TAG_KIND_DESCRIPTION!C++ s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C++ t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C++ u,union /union names/ !_TAG_KIND_DESCRIPTION!C++ v,variable /variable definitions/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_VERSION 0.0 /current.age/ !_TAG_PARSER_VERSION!C++ 0.0 /current.age/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROC_CWD /home/yamato/var/ctags-github/Tmain/readtags-qualifier-op-tr.d/ // !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 6.0.0 // !_TAG_ROLE_DESCRIPTION!C++!header local /local header/ !_TAG_ROLE_DESCRIPTION!C++!header system /system header/ !_TAG_ROLE_DESCRIPTION!C++!macro undef /undefined/ __foo input.cpp /^int __foo(void) { return 0; }$/;" f typeref:typename:int ================================================ FILE: Tmain/readtags-formatter-op-tr.d/run.sh ================================================ #!/bin/sh # Copyright: 2024 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" ${V} ${READTAGS} -t output.tags -F '(list (tr $name "_$") #t)' -l ${V} ${READTAGS} -t output.tags -F '(list (tr $name "_$x") #t)' -l ${V} ${READTAGS} -t output.tags -F '(list (tr $name "_") #t)' -l ${V} ${READTAGS} -t output.tags -F '(list (tr $name "") #t)' -l ${V} ${READTAGS} -t output.tags -F '(list (tr $name 2) #t)' -l ================================================ FILE: Tmain/readtags-formatter-op-tr.d/stderr-expected.txt ================================================ GOT ERROR in FORMATTING: unexpected-string-length: tr GOT ERROR in FORMATTING: unexpected-string-length: tr GOT ERROR in FORMATTING: unexpected-string-length: tr GOT ERROR in FORMATTING: string-required: tr ================================================ FILE: Tmain/readtags-formatter-op-tr.d/stdout-expected.txt ================================================ $$foo ================================================ FILE: Tmain/readtags-formatter.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/readtags-formatter.d/input.c ================================================ /* ctags -o output.tags --fields=+St -n --pseudo-tags=-TAG_PROGRAM_VERSION input.c */ #define N 1 #define M 3 static int foo (int v) { return v + N; } static void bar(char **argv, int *r) { *r = M; } int main(int argc, char **argv) { int i; bar(argv, &i); return foo (argc) + i; } ================================================ FILE: Tmain/readtags-formatter.d/output.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_EXCMD number /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROC_CWD /home/jet/var/ctags-github/Tmain/readtags-formatter.d/ // !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ M input.c 4;" macro file: N input.c 3;" macro file: bar input.c 11;" function typeref:typename:void file: signature:(char ** argv,int * r) foo input.c 6;" function typeref:typename:int file: signature:(int v) main input.c 16;" function typeref:typename:int signature:(int argc,char ** argv) ================================================ FILE: Tmain/readtags-formatter.d/run.sh ================================================ #!/bin/sh # Copyright: 2020 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" echo '# FQ' && ${V} ${READTAGS} -t output.tags -Q '(eq? $kind "function")' --formatter '(list $name #t)' -l && echo '# F' && ${V} ${READTAGS} -t output.tags -F '(if (eq? $kind "function") (list $name #t) #f)' -l && echo '# F declarations' && ${V} ${READTAGS} -t output.tags -F \ '(if (eq? $kind "function") (list (if $file "static " #f) $typeref-name " " $name $signature ";" #t) #f)' -l ================================================ FILE: Tmain/readtags-formatter.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-formatter.d/stdout-expected.txt ================================================ # FQ bar foo main # F bar foo main # F declarations static void bar(char ** argv,int * r); static int foo(int v); int main(int argc,char ** argv); ================================================ FILE: Tmain/readtags-list-pseudo-tags.d/ptag-sort-no.tags ================================================ !_JSON_OUTPUT_VERSION 0.0 /in development/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /9b73623f/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C h,header /included header files/ !_TAG_KIND_DESCRIPTION!C l,local /local variables/ !_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/ !_TAG_KIND_DESCRIPTION!C p,prototype /function prototypes/ !_TAG_KIND_DESCRIPTION!C s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C u,union /union names/ !_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/ !_TAG_KIND_DESCRIPTION!C x,externvar /external and forward variable declarations/ !_TAG_KIND_DESCRIPTION!C z,parameter /function parameters inside function definitions/ !_TAG_KIND_DESCRIPTION!C L,label /goto labels/ !_TAG_KIND_DESCRIPTION!C D,macroparam /parameters inside macro definitions/ main input.c /^int main (void) { return 0; }$/;" f typeref:typename:int !_TAG_KIND_DESCRIPTION!EmacsLisp u,unknown /unknown type of definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp f,function /functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp v,variable /variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp c,const /constants/ !_TAG_KIND_DESCRIPTION!EmacsLisp m,macro /macros/ !_TAG_KIND_DESCRIPTION!EmacsLisp a,alias /aliases for functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp V,varalias /aliases for variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp s,subst /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp i,inline /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp e,error /errors/ !_TAG_KIND_DESCRIPTION!EmacsLisp M,minorMode /minor modes/ !_TAG_KIND_DESCRIPTION!EmacsLisp D,derivedMode /derived major mode/ !_TAG_KIND_DESCRIPTION!EmacsLisp C,custom /customizable variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp G,group /customization groups/ !_TAG_KIND_DESCRIPTION!EmacsLisp H,face /customizable faces/ !_TAG_KIND_DESCRIPTION!EmacsLisp T,theme /custom themes/ afunc input.el /^(defun afunc () nil)$/;" f ================================================ FILE: Tmain/readtags-list-pseudo-tags.d/ptag-sort-yes.tags ================================================ !_JSON_OUTPUT_VERSION 0.0 /in development/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_KIND_DESCRIPTION!C D,macroparam /parameters inside macro definitions/ !_TAG_KIND_DESCRIPTION!C L,label /goto labels/ !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C h,header /included header files/ !_TAG_KIND_DESCRIPTION!C l,local /local variables/ !_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/ !_TAG_KIND_DESCRIPTION!C p,prototype /function prototypes/ !_TAG_KIND_DESCRIPTION!C s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C u,union /union names/ !_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/ !_TAG_KIND_DESCRIPTION!C x,externvar /external and forward variable declarations/ !_TAG_KIND_DESCRIPTION!C z,parameter /function parameters inside function definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp C,custom /customizable variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp D,derivedMode /derived major mode/ !_TAG_KIND_DESCRIPTION!EmacsLisp G,group /customization groups/ !_TAG_KIND_DESCRIPTION!EmacsLisp H,face /customizable faces/ !_TAG_KIND_DESCRIPTION!EmacsLisp M,minorMode /minor modes/ !_TAG_KIND_DESCRIPTION!EmacsLisp T,theme /custom themes/ !_TAG_KIND_DESCRIPTION!EmacsLisp V,varalias /aliases for variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp a,alias /aliases for functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp c,const /constants/ !_TAG_KIND_DESCRIPTION!EmacsLisp e,error /errors/ !_TAG_KIND_DESCRIPTION!EmacsLisp f,function /functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp i,inline /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp m,macro /macros/ !_TAG_KIND_DESCRIPTION!EmacsLisp s,subst /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp u,unknown /unknown type of definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp v,variable /variables/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /9b73623f/ afunc input.el /^(defun afunc () nil)$/;" f main input.c /^int main (void) { return 0; }$/;" f typeref:typename:int ================================================ FILE: Tmain/readtags-list-pseudo-tags.d/run.sh ================================================ #!/bin/sh # Copyright: 2020 Masatake YAMATO # License: GPL-2 READTAGS=$3 #V="valgrind --leak-check=full --track-origins=yes -v" V= . ../utils.sh skip_if_no_readtags "$READTAGS" echo '# SORT=NO (-D)' ${V} ${READTAGS} -t ./ptag-sort-no.tags -D echo '# SORT=NO (-P)' ${V} ${READTAGS} -t ./ptag-sort-no.tags -P no-such-tags echo '# SORT=YES (-D)' ${V} ${READTAGS} -t ./ptag-sort-yes.tags -D echo '# SORT=YES (-P)' ${V} ${READTAGS} -t ./ptag-sort-yes.tags -P no-such-tags # Without the following environment variable, # Msys2 convert #/MA/i to #C:/msys64/MA/i. # See https://www.msys2.org/docs/filesystem-paths/ export MSYS2_ARG_CONV_EXCL='*' echo '# -D + FILTER (-D)' ${V} ${READTAGS} -t ./ptag-sort-yes.tags -Q '(#/MA/i $name)' -D echo '# -P -l + FILTER (-D)' ${V} ${READTAGS} -t ./ptag-sort-yes.tags -Q '(#/MA/i $name)' -P -l ================================================ FILE: Tmain/readtags-list-pseudo-tags.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-list-pseudo-tags.d/stdout-expected.txt ================================================ # SORT=NO (-D) !_JSON_OUTPUT_VERSION 0.0 /in development/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /9b73623f/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C h,header /included header files/ !_TAG_KIND_DESCRIPTION!C l,local /local variables/ !_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/ !_TAG_KIND_DESCRIPTION!C p,prototype /function prototypes/ !_TAG_KIND_DESCRIPTION!C s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C u,union /union names/ !_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/ !_TAG_KIND_DESCRIPTION!C x,externvar /external and forward variable declarations/ !_TAG_KIND_DESCRIPTION!C z,parameter /function parameters inside function definitions/ !_TAG_KIND_DESCRIPTION!C L,label /goto labels/ !_TAG_KIND_DESCRIPTION!C D,macroparam /parameters inside macro definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp u,unknown /unknown type of definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp f,function /functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp v,variable /variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp c,const /constants/ !_TAG_KIND_DESCRIPTION!EmacsLisp m,macro /macros/ !_TAG_KIND_DESCRIPTION!EmacsLisp a,alias /aliases for functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp V,varalias /aliases for variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp s,subst /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp i,inline /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp e,error /errors/ !_TAG_KIND_DESCRIPTION!EmacsLisp M,minorMode /minor modes/ !_TAG_KIND_DESCRIPTION!EmacsLisp D,derivedMode /derived major mode/ !_TAG_KIND_DESCRIPTION!EmacsLisp C,custom /customizable variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp G,group /customization groups/ !_TAG_KIND_DESCRIPTION!EmacsLisp H,face /customizable faces/ !_TAG_KIND_DESCRIPTION!EmacsLisp T,theme /custom themes/ # SORT=NO (-P) !_JSON_OUTPUT_VERSION 0.0 /in development/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /9b73623f/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C h,header /included header files/ !_TAG_KIND_DESCRIPTION!C l,local /local variables/ !_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/ !_TAG_KIND_DESCRIPTION!C p,prototype /function prototypes/ !_TAG_KIND_DESCRIPTION!C s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C u,union /union names/ !_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/ !_TAG_KIND_DESCRIPTION!C x,externvar /external and forward variable declarations/ !_TAG_KIND_DESCRIPTION!C z,parameter /function parameters inside function definitions/ !_TAG_KIND_DESCRIPTION!C L,label /goto labels/ !_TAG_KIND_DESCRIPTION!C D,macroparam /parameters inside macro definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp u,unknown /unknown type of definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp f,function /functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp v,variable /variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp c,const /constants/ !_TAG_KIND_DESCRIPTION!EmacsLisp m,macro /macros/ !_TAG_KIND_DESCRIPTION!EmacsLisp a,alias /aliases for functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp V,varalias /aliases for variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp s,subst /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp i,inline /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp e,error /errors/ !_TAG_KIND_DESCRIPTION!EmacsLisp M,minorMode /minor modes/ !_TAG_KIND_DESCRIPTION!EmacsLisp D,derivedMode /derived major mode/ !_TAG_KIND_DESCRIPTION!EmacsLisp C,custom /customizable variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp G,group /customization groups/ !_TAG_KIND_DESCRIPTION!EmacsLisp H,face /customizable faces/ !_TAG_KIND_DESCRIPTION!EmacsLisp T,theme /custom themes/ # SORT=YES (-D) !_JSON_OUTPUT_VERSION 0.0 /in development/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_KIND_DESCRIPTION!C D,macroparam /parameters inside macro definitions/ !_TAG_KIND_DESCRIPTION!C L,label /goto labels/ !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C h,header /included header files/ !_TAG_KIND_DESCRIPTION!C l,local /local variables/ !_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/ !_TAG_KIND_DESCRIPTION!C p,prototype /function prototypes/ !_TAG_KIND_DESCRIPTION!C s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C u,union /union names/ !_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/ !_TAG_KIND_DESCRIPTION!C x,externvar /external and forward variable declarations/ !_TAG_KIND_DESCRIPTION!C z,parameter /function parameters inside function definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp C,custom /customizable variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp D,derivedMode /derived major mode/ !_TAG_KIND_DESCRIPTION!EmacsLisp G,group /customization groups/ !_TAG_KIND_DESCRIPTION!EmacsLisp H,face /customizable faces/ !_TAG_KIND_DESCRIPTION!EmacsLisp M,minorMode /minor modes/ !_TAG_KIND_DESCRIPTION!EmacsLisp T,theme /custom themes/ !_TAG_KIND_DESCRIPTION!EmacsLisp V,varalias /aliases for variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp a,alias /aliases for functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp c,const /constants/ !_TAG_KIND_DESCRIPTION!EmacsLisp e,error /errors/ !_TAG_KIND_DESCRIPTION!EmacsLisp f,function /functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp i,inline /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp m,macro /macros/ !_TAG_KIND_DESCRIPTION!EmacsLisp s,subst /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp u,unknown /unknown type of definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp v,variable /variables/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /9b73623f/ # SORT=YES (-P) !_JSON_OUTPUT_VERSION 0.0 /in development/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_KIND_DESCRIPTION!C D,macroparam /parameters inside macro definitions/ !_TAG_KIND_DESCRIPTION!C L,label /goto labels/ !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C h,header /included header files/ !_TAG_KIND_DESCRIPTION!C l,local /local variables/ !_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/ !_TAG_KIND_DESCRIPTION!C p,prototype /function prototypes/ !_TAG_KIND_DESCRIPTION!C s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C u,union /union names/ !_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/ !_TAG_KIND_DESCRIPTION!C x,externvar /external and forward variable declarations/ !_TAG_KIND_DESCRIPTION!C z,parameter /function parameters inside function definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp C,custom /customizable variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp D,derivedMode /derived major mode/ !_TAG_KIND_DESCRIPTION!EmacsLisp G,group /customization groups/ !_TAG_KIND_DESCRIPTION!EmacsLisp H,face /customizable faces/ !_TAG_KIND_DESCRIPTION!EmacsLisp M,minorMode /minor modes/ !_TAG_KIND_DESCRIPTION!EmacsLisp T,theme /custom themes/ !_TAG_KIND_DESCRIPTION!EmacsLisp V,varalias /aliases for variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp a,alias /aliases for functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp c,const /constants/ !_TAG_KIND_DESCRIPTION!EmacsLisp e,error /errors/ !_TAG_KIND_DESCRIPTION!EmacsLisp f,function /functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp i,inline /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp m,macro /macros/ !_TAG_KIND_DESCRIPTION!EmacsLisp s,subst /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp u,unknown /unknown type of definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp v,variable /variables/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /9b73623f/ # -D + FILTER (-D) !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_KIND_DESCRIPTION!EmacsLisp C,custom /customizable variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp D,derivedMode /derived major mode/ !_TAG_KIND_DESCRIPTION!EmacsLisp G,group /customization groups/ !_TAG_KIND_DESCRIPTION!EmacsLisp H,face /customizable faces/ !_TAG_KIND_DESCRIPTION!EmacsLisp M,minorMode /minor modes/ !_TAG_KIND_DESCRIPTION!EmacsLisp T,theme /custom themes/ !_TAG_KIND_DESCRIPTION!EmacsLisp V,varalias /aliases for variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp a,alias /aliases for functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp c,const /constants/ !_TAG_KIND_DESCRIPTION!EmacsLisp e,error /errors/ !_TAG_KIND_DESCRIPTION!EmacsLisp f,function /functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp i,inline /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp m,macro /macros/ !_TAG_KIND_DESCRIPTION!EmacsLisp s,subst /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp u,unknown /unknown type of definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp v,variable /variables/ # -P -l + FILTER (-D) !_JSON_OUTPUT_VERSION 0.0 /in development/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_KIND_DESCRIPTION!C D,macroparam /parameters inside macro definitions/ !_TAG_KIND_DESCRIPTION!C L,label /goto labels/ !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C h,header /included header files/ !_TAG_KIND_DESCRIPTION!C l,local /local variables/ !_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/ !_TAG_KIND_DESCRIPTION!C p,prototype /function prototypes/ !_TAG_KIND_DESCRIPTION!C s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C u,union /union names/ !_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/ !_TAG_KIND_DESCRIPTION!C x,externvar /external and forward variable declarations/ !_TAG_KIND_DESCRIPTION!C z,parameter /function parameters inside function definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp C,custom /customizable variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp D,derivedMode /derived major mode/ !_TAG_KIND_DESCRIPTION!EmacsLisp G,group /customization groups/ !_TAG_KIND_DESCRIPTION!EmacsLisp H,face /customizable faces/ !_TAG_KIND_DESCRIPTION!EmacsLisp M,minorMode /minor modes/ !_TAG_KIND_DESCRIPTION!EmacsLisp T,theme /custom themes/ !_TAG_KIND_DESCRIPTION!EmacsLisp V,varalias /aliases for variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp a,alias /aliases for functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp c,const /constants/ !_TAG_KIND_DESCRIPTION!EmacsLisp e,error /errors/ !_TAG_KIND_DESCRIPTION!EmacsLisp f,function /functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp i,inline /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp m,macro /macros/ !_TAG_KIND_DESCRIPTION!EmacsLisp s,subst /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp u,unknown /unknown type of definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp v,variable /variables/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /9b73623f/ main input.c /^int main (void) { return 0; }$/ ================================================ FILE: Tmain/readtags-ptags-dls.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/readtags-ptags-dls.d/input.tags ================================================ !_TAG_EXTRA_DESCRIPTION anonymous /Include tags for non-named objects like lambda/ !_TAG_EXTRA_DESCRIPTION fileScope /Include tags of file scope/ !_TAG_EXTRA_DESCRIPTION pseudo /Include pseudo tags/ !_TAG_EXTRA_DESCRIPTION subparser /Include tags generated by subparsers/ !_TAG_FIELD_DESCRIPTION epoch /the last modified time of the input file (only for F\/file kind tag)/ !_TAG_FIELD_DESCRIPTION file /File-restricted scoping/ !_TAG_FIELD_DESCRIPTION input /input file/ !_TAG_FIELD_DESCRIPTION name /tag name/ !_TAG_FIELD_DESCRIPTION pattern /pattern/ !_TAG_FIELD_DESCRIPTION typeref /Type and name of a variable or typedef/ !_TAG_FIELD_DESCRIPTION!Asm properties /properties (req, vararg for parameters)/ !_TAG_FIELD_DESCRIPTION!C++ name /aliased names/ !_TAG_FIELD_DESCRIPTION!Go package /the real package specified by the package name/ !_TAG_FIELD_DESCRIPTION!Go packageName /the name for referring the package/ !_TAG_FIELD_DESCRIPTION!Python nameref /the original name for the tag/ !_TAG_FIELD_DESCRIPTION!R constructor /function used for making value assigned to the nameattr tag/ !_TAG_FIELD_DESCRIPTION!Ruby mixin /how the class or module is mixed in (mixin:HOW:MODULE)/ !_TAG_FIELD_DESCRIPTION!XML uri /uri associated with name prefix/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_KIND_DESCRIPTION!Asciidoc S,subsection /level 2 sections/ !_TAG_KIND_DESCRIPTION!Asciidoc T,l4subsection /level 4 sections/ !_TAG_KIND_DESCRIPTION!Asciidoc a,anchor /anchors/ !_TAG_KIND_DESCRIPTION!Asciidoc c,chapter /chapters/ !_TAG_KIND_DESCRIPTION!Asciidoc s,section /sections/ !_TAG_KIND_DESCRIPTION!Asciidoc t,subsubsection /level 3 sections/ !_TAG_KIND_DESCRIPTION!Asciidoc u,l5subsection /level 5 sections/ !_TAG_KIND_DESCRIPTION!Asm d,define /defines/ !_TAG_KIND_DESCRIPTION!Asm l,label /labels/ !_TAG_KIND_DESCRIPTION!Asm m,macro /macros/ !_TAG_KIND_DESCRIPTION!Asm t,type /types (structs and records)/ !_TAG_KIND_DESCRIPTION!Awk f,function /functions/ !_TAG_KIND_DESCRIPTION!Bats S,script /scripts/ !_TAG_KIND_DESCRIPTION!Bats t,test /test cases/ !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C h,header /included header files/ !_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/ !_TAG_KIND_DESCRIPTION!C s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C u,union /union names/ !_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/ !_TAG_KIND_DESCRIPTION!C++ M,module /modules/ !_TAG_KIND_DESCRIPTION!C++ P,partition /partitions/ !_TAG_KIND_DESCRIPTION!C++ c,class /classes/ !_TAG_KIND_DESCRIPTION!C++ d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C++ e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C++ f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C++ g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C++ h,header /included header files/ !_TAG_KIND_DESCRIPTION!C++ m,member /class, struct, and union members/ !_TAG_KIND_DESCRIPTION!C++ n,namespace /namespaces/ !_TAG_KIND_DESCRIPTION!C++ s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C++ t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C++ u,union /union names/ !_TAG_KIND_DESCRIPTION!C++ v,variable /variable definitions/ !_TAG_KIND_DESCRIPTION!CSS c,class /classes/ !_TAG_KIND_DESCRIPTION!CSS i,id /identities/ !_TAG_KIND_DESCRIPTION!CSS s,selector /selectors/ !_TAG_KIND_DESCRIPTION!DTD E,entity /entities/ !_TAG_KIND_DESCRIPTION!DTD a,attribute /attributes/ !_TAG_KIND_DESCRIPTION!DTD e,element /elements/ !_TAG_KIND_DESCRIPTION!DTD n,notation /notations/ !_TAG_KIND_DESCRIPTION!DTD p,parameterEntity /parameter entities/ !_TAG_KIND_DESCRIPTION!Diff d,deletedFile /deleted files/ !_TAG_KIND_DESCRIPTION!Diff h,hunk /hunks/ !_TAG_KIND_DESCRIPTION!Diff m,modifiedFile /modified files/ !_TAG_KIND_DESCRIPTION!Diff n,newFile /newly created files/ !_TAG_KIND_DESCRIPTION!DosBatch l,label /labels/ !_TAG_KIND_DESCRIPTION!DosBatch v,variable /variables/ !_TAG_KIND_DESCRIPTION!Go M,anonMember /struct anonymous members/ !_TAG_KIND_DESCRIPTION!Go P,packageName /name for specifying imported package/ !_TAG_KIND_DESCRIPTION!Go Y,unknown /unknown/ !_TAG_KIND_DESCRIPTION!Go a,talias /type aliases/ !_TAG_KIND_DESCRIPTION!Go c,const /constants/ !_TAG_KIND_DESCRIPTION!Go f,func /functions/ !_TAG_KIND_DESCRIPTION!Go i,interface /interfaces/ !_TAG_KIND_DESCRIPTION!Go m,member /struct members/ !_TAG_KIND_DESCRIPTION!Go n,methodSpec /interface method specification/ !_TAG_KIND_DESCRIPTION!Go p,package /packages/ !_TAG_KIND_DESCRIPTION!Go s,struct /structs/ !_TAG_KIND_DESCRIPTION!Go t,type /types/ !_TAG_KIND_DESCRIPTION!Go v,var /variables/ !_TAG_KIND_DESCRIPTION!HTML C,stylesheet /stylesheets/ !_TAG_KIND_DESCRIPTION!HTML I,id /identifiers/ !_TAG_KIND_DESCRIPTION!HTML J,script /scripts/ !_TAG_KIND_DESCRIPTION!HTML a,anchor /named anchors/ !_TAG_KIND_DESCRIPTION!HTML c,class /classes/ !_TAG_KIND_DESCRIPTION!HTML h,heading1 /H1 headings/ !_TAG_KIND_DESCRIPTION!HTML i,heading2 /H2 headings/ !_TAG_KIND_DESCRIPTION!HTML j,heading3 /H3 headings/ !_TAG_KIND_DESCRIPTION!HTML t,title /titles/ !_TAG_KIND_DESCRIPTION!Iniconf k,key /keys/ !_TAG_KIND_DESCRIPTION!Iniconf s,section /sections/ !_TAG_KIND_DESCRIPTION!JSON a,array /arrays/ !_TAG_KIND_DESCRIPTION!JSON b,boolean /booleans/ !_TAG_KIND_DESCRIPTION!JSON n,number /numbers/ !_TAG_KIND_DESCRIPTION!JSON o,object /objects/ !_TAG_KIND_DESCRIPTION!JSON s,string /strings/ !_TAG_KIND_DESCRIPTION!JSON z,null /nulls/ !_TAG_KIND_DESCRIPTION!Lua f,function /functions/ !_TAG_KIND_DESCRIPTION!Make I,makefile /makefiles/ !_TAG_KIND_DESCRIPTION!Make m,macro /macros/ !_TAG_KIND_DESCRIPTION!Make t,target /targets/ !_TAG_KIND_DESCRIPTION!Man S,subsection /sub sections/ !_TAG_KIND_DESCRIPTION!Man s,section /sections/ !_TAG_KIND_DESCRIPTION!Man t,title /titles/ !_TAG_KIND_DESCRIPTION!Markdown S,subsection /level 2 sections/ !_TAG_KIND_DESCRIPTION!Markdown T,l4subsection /level 4 sections/ !_TAG_KIND_DESCRIPTION!Markdown c,chapter /chapters/ !_TAG_KIND_DESCRIPTION!Markdown h,hashtag /hashtags/ !_TAG_KIND_DESCRIPTION!Markdown n,footnote /footnotes/ !_TAG_KIND_DESCRIPTION!Markdown s,section /sections/ !_TAG_KIND_DESCRIPTION!Markdown t,subsubsection /level 3 sections/ !_TAG_KIND_DESCRIPTION!Markdown u,l5subsection /level 5 sections/ !_TAG_KIND_DESCRIPTION!OpenAPI P,parameter /parameters/ !_TAG_KIND_DESCRIPTION!OpenAPI R,response /responses/ !_TAG_KIND_DESCRIPTION!OpenAPI T,tag /tags/ !_TAG_KIND_DESCRIPTION!OpenAPI d,schema /schemas/ !_TAG_KIND_DESCRIPTION!OpenAPI p,path /paths/ !_TAG_KIND_DESCRIPTION!OpenAPI s,server /servers (or hosts in swagger)/ !_TAG_KIND_DESCRIPTION!OpenAPI t,title /titles/ !_TAG_KIND_DESCRIPTION!Perl c,constant /constants/ !_TAG_KIND_DESCRIPTION!Perl f,format /formats/ !_TAG_KIND_DESCRIPTION!Perl l,label /labels/ !_TAG_KIND_DESCRIPTION!Perl p,package /packages/ !_TAG_KIND_DESCRIPTION!Perl s,subroutine /subroutines/ !_TAG_KIND_DESCRIPTION!Pod S,subsection /subsections/ !_TAG_KIND_DESCRIPTION!Pod c,chapter /chapters/ !_TAG_KIND_DESCRIPTION!Pod s,section /sections/ !_TAG_KIND_DESCRIPTION!Pod t,subsubsection /subsubsections/ !_TAG_KIND_DESCRIPTION!PowerShell c,class /classes/ !_TAG_KIND_DESCRIPTION!PowerShell e,enumlabel /enum labels/ !_TAG_KIND_DESCRIPTION!PowerShell f,function /functions/ !_TAG_KIND_DESCRIPTION!PowerShell g,enum /enum names/ !_TAG_KIND_DESCRIPTION!PowerShell i,filter /filter/ !_TAG_KIND_DESCRIPTION!PowerShell v,variable /variables/ !_TAG_KIND_DESCRIPTION!Protobuf D,protodef /.proto definition/ !_TAG_KIND_DESCRIPTION!Protobuf G,group /groups/ !_TAG_KIND_DESCRIPTION!Protobuf e,enumerator /enum constants/ !_TAG_KIND_DESCRIPTION!Protobuf f,field /fields/ !_TAG_KIND_DESCRIPTION!Protobuf g,enum /enum types/ !_TAG_KIND_DESCRIPTION!Protobuf m,message /messages/ !_TAG_KIND_DESCRIPTION!Protobuf o,oneof /oneof names/ !_TAG_KIND_DESCRIPTION!Protobuf p,package /packages/ !_TAG_KIND_DESCRIPTION!Protobuf r,rpc /RPC methods/ !_TAG_KIND_DESCRIPTION!Protobuf s,service /services/ !_TAG_KIND_DESCRIPTION!Python I,namespace /name referring a module defined in other file/ !_TAG_KIND_DESCRIPTION!Python Y,unknown /name referring a class\/variable\/function\/module defined in other module/ !_TAG_KIND_DESCRIPTION!Python c,class /classes/ !_TAG_KIND_DESCRIPTION!Python f,function /functions/ !_TAG_KIND_DESCRIPTION!Python i,module /modules/ !_TAG_KIND_DESCRIPTION!Python m,member /class members/ !_TAG_KIND_DESCRIPTION!Python v,variable /variables/ !_TAG_KIND_DESCRIPTION!R L,list /lists explicitly created with `list()'/ !_TAG_KIND_DESCRIPTION!R c,vector /vectors explicitly created with `c()'/ !_TAG_KIND_DESCRIPTION!R d,dataframe /data frame explicitly created with `data.frame()'/ !_TAG_KIND_DESCRIPTION!R f,function /functions/ !_TAG_KIND_DESCRIPTION!R g,globalVar /global variables having values other than function()/ !_TAG_KIND_DESCRIPTION!R l,library /libraries/ !_TAG_KIND_DESCRIPTION!R n,nameattr /names attribtes in vectors, lists, or dataframes/ !_TAG_KIND_DESCRIPTION!R s,source /sources/ !_TAG_KIND_DESCRIPTION!R v,functionVar /function variables having values other than function()/ !_TAG_KIND_DESCRIPTION!ReStructuredText C,citation /citations/ !_TAG_KIND_DESCRIPTION!ReStructuredText H,title /titles/ !_TAG_KIND_DESCRIPTION!ReStructuredText S,subsection /subsections/ !_TAG_KIND_DESCRIPTION!ReStructuredText T,target /targets/ !_TAG_KIND_DESCRIPTION!ReStructuredText c,chapter /chapters/ !_TAG_KIND_DESCRIPTION!ReStructuredText d,substdef /substitute definitions/ !_TAG_KIND_DESCRIPTION!ReStructuredText h,subtitle /sub titles/ !_TAG_KIND_DESCRIPTION!ReStructuredText s,section /sections/ !_TAG_KIND_DESCRIPTION!ReStructuredText t,subsubsection /subsubsections/ !_TAG_KIND_DESCRIPTION!RpmSpec g,global /global macros/ !_TAG_KIND_DESCRIPTION!RpmSpec m,macro /macros/ !_TAG_KIND_DESCRIPTION!RpmSpec p,package /packages/ !_TAG_KIND_DESCRIPTION!RpmSpec p,patch /patch files/ !_TAG_KIND_DESCRIPTION!RpmSpec t,tag /tags/ !_TAG_KIND_DESCRIPTION!Ruby A,accessor /accessors/ !_TAG_KIND_DESCRIPTION!Ruby C,constant /constants/ !_TAG_KIND_DESCRIPTION!Ruby L,library /libraries/ !_TAG_KIND_DESCRIPTION!Ruby S,singletonMethod /singleton methods/ !_TAG_KIND_DESCRIPTION!Ruby a,alias /aliases/ !_TAG_KIND_DESCRIPTION!Ruby c,class /classes/ !_TAG_KIND_DESCRIPTION!Ruby f,method /methods/ !_TAG_KIND_DESCRIPTION!Ruby m,module /modules/ !_TAG_KIND_DESCRIPTION!SVG d,def /ids in defs tags/ !_TAG_KIND_DESCRIPTION!Sh a,alias /aliases/ !_TAG_KIND_DESCRIPTION!Sh f,function /functions/ !_TAG_KIND_DESCRIPTION!Sh h,heredoc /label for here document/ !_TAG_KIND_DESCRIPTION!Sh s,script /script files/ !_TAG_KIND_DESCRIPTION!SystemdUnit u,unit /units/ !_TAG_KIND_DESCRIPTION!TOML K,qkey /qualified keys/ !_TAG_KIND_DESCRIPTION!TOML a,arraytable /array tables/ !_TAG_KIND_DESCRIPTION!TOML t,table /tables/ !_TAG_KIND_DESCRIPTION!XML i,id /id attributes/ !_TAG_KIND_DESCRIPTION!XML n,nsprefix /namespace prefixes/ !_TAG_KIND_DESCRIPTION!XML r,root /root elements/ !_TAG_KIND_DESCRIPTION!Yaml a,anchor /anchors/ !_TAG_KIND_DESCRIPTION!Zsh a,alias /aliases/ !_TAG_KIND_DESCRIPTION!Zsh f,function /functions/ !_TAG_KIND_DESCRIPTION!Zsh h,heredoc /label for here document/ !_TAG_KIND_DESCRIPTION!Zsh s,script /script files/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_VERSION 0.0 /current.age/ !_TAG_PARSER_VERSION!Asciidoc 0.0 /current.age/ !_TAG_PARSER_VERSION!Asm 1.0 /current.age/ !_TAG_PARSER_VERSION!Awk 0.0 /current.age/ !_TAG_PARSER_VERSION!Bats 0.0 /current.age/ !_TAG_PARSER_VERSION!C 1.1 /current.age/ !_TAG_PARSER_VERSION!C++ 1.1 /current.age/ !_TAG_PARSER_VERSION!CSS 0.0 /current.age/ !_TAG_PARSER_VERSION!DTD 0.0 /current.age/ !_TAG_PARSER_VERSION!Diff 0.0 /current.age/ !_TAG_PARSER_VERSION!DosBatch 0.0 /current.age/ !_TAG_PARSER_VERSION!Go 0.0 /current.age/ !_TAG_PARSER_VERSION!HTML 0.0 /current.age/ !_TAG_PARSER_VERSION!Iniconf 0.0 /current.age/ !_TAG_PARSER_VERSION!JSON 0.0 /current.age/ !_TAG_PARSER_VERSION!Lua 0.0 /current.age/ !_TAG_PARSER_VERSION!Make 1.1 /current.age/ !_TAG_PARSER_VERSION!Man 0.0 /current.age/ !_TAG_PARSER_VERSION!Markdown 1.1 /current.age/ !_TAG_PARSER_VERSION!OpenAPI 0.0 /current.age/ !_TAG_PARSER_VERSION!Perl 0.0 /current.age/ !_TAG_PARSER_VERSION!Pod 0.0 /current.age/ !_TAG_PARSER_VERSION!PowerShell 1.1 /current.age/ !_TAG_PARSER_VERSION!Protobuf 0.0 /current.age/ !_TAG_PARSER_VERSION!Python 0.0 /current.age/ !_TAG_PARSER_VERSION!R 0.0 /current.age/ !_TAG_PARSER_VERSION!ReStructuredText 0.0 /current.age/ !_TAG_PARSER_VERSION!RpmSpec 0.0 /current.age/ !_TAG_PARSER_VERSION!Ruby 0.0 /current.age/ !_TAG_PARSER_VERSION!SVG 0.0 /current.age/ !_TAG_PARSER_VERSION!Sh 0.0 /current.age/ !_TAG_PARSER_VERSION!SystemdUnit 0.0 /current.age/ !_TAG_PARSER_VERSION!TOML 0.0 /current.age/ !_TAG_PARSER_VERSION!XML 0.0 /current.age/ !_TAG_PARSER_VERSION!Yaml 0.0 /current.age/ !_TAG_PARSER_VERSION!Zsh 0.0 /current.age/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROC_CWD /home/yamato/var/ctags-github/ // !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 6.1.0 /d1ecc51b9/ !_TAG_ROLE_DESCRIPTION!Bats!script loaded /script loaed with "load" command/ !_TAG_ROLE_DESCRIPTION!C!function foreigndecl /declared in foreign languages/ !_TAG_ROLE_DESCRIPTION!C!header local /local header/ !_TAG_ROLE_DESCRIPTION!C!header system /system header/ !_TAG_ROLE_DESCRIPTION!C!macro undef /undefined/ !_TAG_ROLE_DESCRIPTION!C!struct foreigndecl /declared in foreign languages/ !_TAG_ROLE_DESCRIPTION!C++!header exported /exported with "exported imported ..."/ !_TAG_ROLE_DESCRIPTION!C++!header imported /imported with "imported ..."/ !_TAG_ROLE_DESCRIPTION!C++!header local /local header/ !_TAG_ROLE_DESCRIPTION!C++!header system /system header/ !_TAG_ROLE_DESCRIPTION!C++!macro undef /undefined/ !_TAG_ROLE_DESCRIPTION!C++!module imported /imported with "imported ..."/ !_TAG_ROLE_DESCRIPTION!C++!module partOwner /used for specifying a partition/ !_TAG_ROLE_DESCRIPTION!C++!partition imported /imported with "imported ..."/ !_TAG_ROLE_DESCRIPTION!DTD!element attOwner /attributes owner/ !_TAG_ROLE_DESCRIPTION!DTD!parameterEntity condition /conditions/ !_TAG_ROLE_DESCRIPTION!DTD!parameterEntity elementName /element names/ !_TAG_ROLE_DESCRIPTION!DTD!parameterEntity partOfAttDef /part of attribute definition/ !_TAG_ROLE_DESCRIPTION!Go!package imported /imported package/ !_TAG_ROLE_DESCRIPTION!Go!unknown receiverType /receiver type/ !_TAG_ROLE_DESCRIPTION!HTML!class attribute /assigned as attributes/ !_TAG_ROLE_DESCRIPTION!HTML!script extFile /referenced as external files/ !_TAG_ROLE_DESCRIPTION!HTML!stylesheet extFile /referenced as external files/ !_TAG_ROLE_DESCRIPTION!Make!makefile included /included/ !_TAG_ROLE_DESCRIPTION!Make!makefile optional /optionally included/ !_TAG_ROLE_DESCRIPTION!Protobuf!message extension /extending the message/ !_TAG_ROLE_DESCRIPTION!Protobuf!protodef imported /imported/ !_TAG_ROLE_DESCRIPTION!Python!module imported /imported modules/ !_TAG_ROLE_DESCRIPTION!Python!module indirectlyImported /module imported in alternative name/ !_TAG_ROLE_DESCRIPTION!Python!module namespace /namespace from where classes\/variables\/functions are imported/ !_TAG_ROLE_DESCRIPTION!Python!unknown imported /imported from the other module/ !_TAG_ROLE_DESCRIPTION!Python!unknown indirectlyImported /classes\/variables\/functions\/modules imported in alternative name/ !_TAG_ROLE_DESCRIPTION!R!library library /library attached by library function/ !_TAG_ROLE_DESCRIPTION!R!library require /library attached by require function/ !_TAG_ROLE_DESCRIPTION!R!source source /source loaded by source fucntion/ !_TAG_ROLE_DESCRIPTION!RpmSpec!macro undef /undefined/ !_TAG_ROLE_DESCRIPTION!RpmSpec!patch decl /declared for applying later/ !_TAG_ROLE_DESCRIPTION!Ruby!library loaded /loaded by "load" method/ !_TAG_ROLE_DESCRIPTION!Ruby!library required /loaded by "require" method/ !_TAG_ROLE_DESCRIPTION!Ruby!library requiredRel /loaded by "require_relative" method/ !_TAG_ROLE_DESCRIPTION!Sh!heredoc endmarker /end marker/ !_TAG_ROLE_DESCRIPTION!Sh!script loaded /loaded/ !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit After /referred in After key/ !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit Before /referred in Before key/ !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit RequiredBy /referred in RequiredBy key/ !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit Requires /referred in Requires key/ !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit WantedBy /referred in WantedBy key/ !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit Wants /referred in Wants key/ !_TAG_ROLE_DESCRIPTION!Yaml!anchor alias /alias/ !_TAG_ROLE_DESCRIPTION!Zsh!function autoloaded /function name passed to autoload built-in command/ !_TAG_ROLE_DESCRIPTION!Zsh!heredoc endmarker /end marker/ !_TAG_ROLE_DESCRIPTION!Zsh!script autoloaded /autoloaded/ !_TAG_ROLE_DESCRIPTION!Zsh!script loaded /loaded/ zr /home/yamato/var/podman/vendor/golang.org/x/net/http2/transport.go /^ zr *gzip.Reader \/\/ lazily-initialized gzip reader$/;" m struct:http2.gzipReader typeref:typename:*gzip.Reader ================================================ FILE: Tmain/readtags-ptags-dls.d/run.sh ================================================ #!/bin/sh # Copyright: 2024 Masatake YAMATO # License: GPL-2 READTAGS=$3 #V="valgrind --leak-check=full --track-origins=yes -v" V= . ../utils.sh skip_if_no_readtags "$READTAGS" echo '# FILTER' && ${V} ${READTAGS} -t input.tags -Q '(#/.*CWD.*/ $name)' -D && echo '# FORMATTER' && ${V} ${READTAGS} -t input.tags -Q '(#/.*CWD.*/ $name)' -F '(list $input #t)' -D && echo '# SORTING INPUT' && ${V} ${READTAGS} -t input.tags -S '( (<> $input &input) (<> $name &name))' -D && echo '# SORTING ! INPUT' && ${V} ${READTAGS} -t input.tags -S '(*- ( (<> $input &input) (<> $name &name)))' -D ================================================ FILE: Tmain/readtags-ptags-dls.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-ptags-dls.d/stdout-expected.txt ================================================ # FILTER !_TAG_PROC_CWD /home/yamato/var/ctags-github/ // # FORMATTER /home/yamato/var/ctags-github/ # SORTING INPUT !_TAG_PROC_CWD /home/yamato/var/ctags-github/ // !_TAG_OUTPUT_VERSION 0.0 /current.age/ !_TAG_PARSER_VERSION!Asciidoc 0.0 /current.age/ !_TAG_PARSER_VERSION!Awk 0.0 /current.age/ !_TAG_PARSER_VERSION!Bats 0.0 /current.age/ !_TAG_PARSER_VERSION!CSS 0.0 /current.age/ !_TAG_PARSER_VERSION!DTD 0.0 /current.age/ !_TAG_PARSER_VERSION!Diff 0.0 /current.age/ !_TAG_PARSER_VERSION!DosBatch 0.0 /current.age/ !_TAG_PARSER_VERSION!Go 0.0 /current.age/ !_TAG_PARSER_VERSION!HTML 0.0 /current.age/ !_TAG_PARSER_VERSION!Iniconf 0.0 /current.age/ !_TAG_PARSER_VERSION!JSON 0.0 /current.age/ !_TAG_PARSER_VERSION!Lua 0.0 /current.age/ !_TAG_PARSER_VERSION!Man 0.0 /current.age/ !_TAG_PARSER_VERSION!OpenAPI 0.0 /current.age/ !_TAG_PARSER_VERSION!Perl 0.0 /current.age/ !_TAG_PARSER_VERSION!Pod 0.0 /current.age/ !_TAG_PARSER_VERSION!Protobuf 0.0 /current.age/ !_TAG_PARSER_VERSION!Python 0.0 /current.age/ !_TAG_PARSER_VERSION!R 0.0 /current.age/ !_TAG_PARSER_VERSION!ReStructuredText 0.0 /current.age/ !_TAG_PARSER_VERSION!RpmSpec 0.0 /current.age/ !_TAG_PARSER_VERSION!Ruby 0.0 /current.age/ !_TAG_PARSER_VERSION!SVG 0.0 /current.age/ !_TAG_PARSER_VERSION!Sh 0.0 /current.age/ !_TAG_PARSER_VERSION!SystemdUnit 0.0 /current.age/ !_TAG_PARSER_VERSION!TOML 0.0 /current.age/ !_TAG_PARSER_VERSION!XML 0.0 /current.age/ !_TAG_PARSER_VERSION!Yaml 0.0 /current.age/ !_TAG_PARSER_VERSION!Zsh 0.0 /current.age/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_PARSER_VERSION!Asm 1.0 /current.age/ !_TAG_PARSER_VERSION!C 1.1 /current.age/ !_TAG_PARSER_VERSION!C++ 1.1 /current.age/ !_TAG_PARSER_VERSION!Make 1.1 /current.age/ !_TAG_PARSER_VERSION!Markdown 1.1 /current.age/ !_TAG_PARSER_VERSION!PowerShell 1.1 /current.age/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_PROGRAM_VERSION 6.1.0 /d1ecc51b9/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_KIND_DESCRIPTION!Ruby A,accessor /accessors/ !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit After /referred in After key/ !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit Before /referred in Before key/ !_TAG_KIND_DESCRIPTION!ReStructuredText C,citation /citations/ !_TAG_KIND_DESCRIPTION!Ruby C,constant /constants/ !_TAG_KIND_DESCRIPTION!HTML C,stylesheet /stylesheets/ !_TAG_KIND_DESCRIPTION!Protobuf D,protodef /.proto definition/ !_TAG_KIND_DESCRIPTION!DTD E,entity /entities/ !_TAG_KIND_DESCRIPTION!Protobuf G,group /groups/ !_TAG_KIND_DESCRIPTION!ReStructuredText H,title /titles/ !_TAG_KIND_DESCRIPTION!HTML I,id /identifiers/ !_TAG_KIND_DESCRIPTION!Make I,makefile /makefiles/ !_TAG_KIND_DESCRIPTION!Python I,namespace /name referring a module defined in other file/ !_TAG_KIND_DESCRIPTION!HTML J,script /scripts/ !_TAG_KIND_DESCRIPTION!TOML K,qkey /qualified keys/ !_TAG_KIND_DESCRIPTION!Ruby L,library /libraries/ !_TAG_KIND_DESCRIPTION!R L,list /lists explicitly created with `list()'/ !_TAG_KIND_DESCRIPTION!Go M,anonMember /struct anonymous members/ !_TAG_KIND_DESCRIPTION!C++ M,module /modules/ !_TAG_KIND_DESCRIPTION!Go P,packageName /name for specifying imported package/ !_TAG_KIND_DESCRIPTION!OpenAPI P,parameter /parameters/ !_TAG_KIND_DESCRIPTION!C++ P,partition /partitions/ !_TAG_KIND_DESCRIPTION!OpenAPI R,response /responses/ !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit RequiredBy /referred in RequiredBy key/ !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit Requires /referred in Requires key/ !_TAG_KIND_DESCRIPTION!Bats S,script /scripts/ !_TAG_KIND_DESCRIPTION!Ruby S,singletonMethod /singleton methods/ !_TAG_KIND_DESCRIPTION!Asciidoc S,subsection /level 2 sections/ !_TAG_KIND_DESCRIPTION!Man S,subsection /sub sections/ !_TAG_KIND_DESCRIPTION!Markdown S,subsection /level 2 sections/ !_TAG_KIND_DESCRIPTION!Pod S,subsection /subsections/ !_TAG_KIND_DESCRIPTION!ReStructuredText S,subsection /subsections/ !_TAG_KIND_DESCRIPTION!Asciidoc T,l4subsection /level 4 sections/ !_TAG_KIND_DESCRIPTION!Markdown T,l4subsection /level 4 sections/ !_TAG_KIND_DESCRIPTION!OpenAPI T,tag /tags/ !_TAG_KIND_DESCRIPTION!ReStructuredText T,target /targets/ !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit WantedBy /referred in WantedBy key/ !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit Wants /referred in Wants key/ !_TAG_KIND_DESCRIPTION!Go Y,unknown /unknown/ !_TAG_KIND_DESCRIPTION!Python Y,unknown /name referring a class\/variable\/function\/module defined in other module/ !_TAG_KIND_DESCRIPTION!Ruby a,alias /aliases/ !_TAG_KIND_DESCRIPTION!Sh a,alias /aliases/ !_TAG_KIND_DESCRIPTION!Zsh a,alias /aliases/ !_TAG_KIND_DESCRIPTION!Asciidoc a,anchor /anchors/ !_TAG_KIND_DESCRIPTION!HTML a,anchor /named anchors/ !_TAG_KIND_DESCRIPTION!Yaml a,anchor /anchors/ !_TAG_KIND_DESCRIPTION!JSON a,array /arrays/ !_TAG_KIND_DESCRIPTION!TOML a,arraytable /array tables/ !_TAG_KIND_DESCRIPTION!DTD a,attribute /attributes/ !_TAG_KIND_DESCRIPTION!Go a,talias /type aliases/ !_TAG_ROLE_DESCRIPTION!Yaml!anchor alias /alias/ !_TAG_EXTRA_DESCRIPTION anonymous /Include tags for non-named objects like lambda/ !_TAG_ROLE_DESCRIPTION!DTD!element attOwner /attributes owner/ !_TAG_ROLE_DESCRIPTION!HTML!class attribute /assigned as attributes/ !_TAG_ROLE_DESCRIPTION!Zsh!function autoloaded /function name passed to autoload built-in command/ !_TAG_ROLE_DESCRIPTION!Zsh!script autoloaded /autoloaded/ !_TAG_KIND_DESCRIPTION!JSON b,boolean /booleans/ !_TAG_KIND_DESCRIPTION!Asciidoc c,chapter /chapters/ !_TAG_KIND_DESCRIPTION!Markdown c,chapter /chapters/ !_TAG_KIND_DESCRIPTION!Pod c,chapter /chapters/ !_TAG_KIND_DESCRIPTION!ReStructuredText c,chapter /chapters/ !_TAG_KIND_DESCRIPTION!C++ c,class /classes/ !_TAG_KIND_DESCRIPTION!CSS c,class /classes/ !_TAG_KIND_DESCRIPTION!HTML c,class /classes/ !_TAG_KIND_DESCRIPTION!PowerShell c,class /classes/ !_TAG_KIND_DESCRIPTION!Python c,class /classes/ !_TAG_KIND_DESCRIPTION!Ruby c,class /classes/ !_TAG_KIND_DESCRIPTION!Go c,const /constants/ !_TAG_KIND_DESCRIPTION!Perl c,constant /constants/ !_TAG_KIND_DESCRIPTION!R c,vector /vectors explicitly created with `c()'/ !_TAG_ROLE_DESCRIPTION!DTD!parameterEntity condition /conditions/ !_TAG_FIELD_DESCRIPTION!R constructor /function used for making value assigned to the nameattr tag/ !_TAG_KIND_DESCRIPTION!R d,dataframe /data frame explicitly created with `data.frame()'/ !_TAG_KIND_DESCRIPTION!SVG d,def /ids in defs tags/ !_TAG_KIND_DESCRIPTION!Asm d,define /defines/ !_TAG_KIND_DESCRIPTION!Diff d,deletedFile /deleted files/ !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C++ d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!OpenAPI d,schema /schemas/ !_TAG_KIND_DESCRIPTION!ReStructuredText d,substdef /substitute definitions/ !_TAG_ROLE_DESCRIPTION!RpmSpec!patch decl /declared for applying later/ !_TAG_KIND_DESCRIPTION!DTD e,element /elements/ !_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C++ e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!Protobuf e,enumerator /enum constants/ !_TAG_KIND_DESCRIPTION!PowerShell e,enumlabel /enum labels/ !_TAG_ROLE_DESCRIPTION!DTD!parameterEntity elementName /element names/ !_TAG_ROLE_DESCRIPTION!Sh!heredoc endmarker /end marker/ !_TAG_ROLE_DESCRIPTION!Zsh!heredoc endmarker /end marker/ !_TAG_FIELD_DESCRIPTION epoch /the last modified time of the input file (only for F\/file kind tag)/ !_TAG_ROLE_DESCRIPTION!C++!header exported /exported with "exported imported ..."/ !_TAG_ROLE_DESCRIPTION!HTML!script extFile /referenced as external files/ !_TAG_ROLE_DESCRIPTION!HTML!stylesheet extFile /referenced as external files/ !_TAG_ROLE_DESCRIPTION!Protobuf!message extension /extending the message/ !_TAG_KIND_DESCRIPTION!Protobuf f,field /fields/ !_TAG_KIND_DESCRIPTION!Perl f,format /formats/ !_TAG_KIND_DESCRIPTION!Go f,func /functions/ !_TAG_KIND_DESCRIPTION!Awk f,function /functions/ !_TAG_KIND_DESCRIPTION!C f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C++ f,function /function definitions/ !_TAG_KIND_DESCRIPTION!Lua f,function /functions/ !_TAG_KIND_DESCRIPTION!PowerShell f,function /functions/ !_TAG_KIND_DESCRIPTION!Python f,function /functions/ !_TAG_KIND_DESCRIPTION!R f,function /functions/ !_TAG_KIND_DESCRIPTION!Sh f,function /functions/ !_TAG_KIND_DESCRIPTION!Zsh f,function /functions/ !_TAG_KIND_DESCRIPTION!Ruby f,method /methods/ !_TAG_FIELD_DESCRIPTION file /File-restricted scoping/ !_TAG_EXTRA_DESCRIPTION fileScope /Include tags of file scope/ !_TAG_ROLE_DESCRIPTION!C!function foreigndecl /declared in foreign languages/ !_TAG_ROLE_DESCRIPTION!C!struct foreigndecl /declared in foreign languages/ !_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C++ g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!PowerShell g,enum /enum names/ !_TAG_KIND_DESCRIPTION!Protobuf g,enum /enum types/ !_TAG_KIND_DESCRIPTION!RpmSpec g,global /global macros/ !_TAG_KIND_DESCRIPTION!R g,globalVar /global variables having values other than function()/ !_TAG_KIND_DESCRIPTION!Markdown h,hashtag /hashtags/ !_TAG_KIND_DESCRIPTION!C h,header /included header files/ !_TAG_KIND_DESCRIPTION!C++ h,header /included header files/ !_TAG_KIND_DESCRIPTION!HTML h,heading1 /H1 headings/ !_TAG_KIND_DESCRIPTION!Sh h,heredoc /label for here document/ !_TAG_KIND_DESCRIPTION!Zsh h,heredoc /label for here document/ !_TAG_KIND_DESCRIPTION!Diff h,hunk /hunks/ !_TAG_KIND_DESCRIPTION!ReStructuredText h,subtitle /sub titles/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_KIND_DESCRIPTION!PowerShell i,filter /filter/ !_TAG_KIND_DESCRIPTION!HTML i,heading2 /H2 headings/ !_TAG_KIND_DESCRIPTION!CSS i,id /identities/ !_TAG_KIND_DESCRIPTION!XML i,id /id attributes/ !_TAG_KIND_DESCRIPTION!Go i,interface /interfaces/ !_TAG_KIND_DESCRIPTION!Python i,module /modules/ !_TAG_ROLE_DESCRIPTION!C++!header imported /imported with "imported ..."/ !_TAG_ROLE_DESCRIPTION!C++!module imported /imported with "imported ..."/ !_TAG_ROLE_DESCRIPTION!C++!partition imported /imported with "imported ..."/ !_TAG_ROLE_DESCRIPTION!Go!package imported /imported package/ !_TAG_ROLE_DESCRIPTION!Protobuf!protodef imported /imported/ !_TAG_ROLE_DESCRIPTION!Python!module imported /imported modules/ !_TAG_ROLE_DESCRIPTION!Python!unknown imported /imported from the other module/ !_TAG_ROLE_DESCRIPTION!Make!makefile included /included/ !_TAG_ROLE_DESCRIPTION!Python!module indirectlyImported /module imported in alternative name/ !_TAG_ROLE_DESCRIPTION!Python!unknown indirectlyImported /classes\/variables\/functions\/modules imported in alternative name/ !_TAG_FIELD_DESCRIPTION input /input file/ !_TAG_KIND_DESCRIPTION!HTML j,heading3 /H3 headings/ !_TAG_KIND_DESCRIPTION!Iniconf k,key /keys/ !_TAG_KIND_DESCRIPTION!Asm l,label /labels/ !_TAG_KIND_DESCRIPTION!DosBatch l,label /labels/ !_TAG_KIND_DESCRIPTION!Perl l,label /labels/ !_TAG_KIND_DESCRIPTION!R l,library /libraries/ !_TAG_ROLE_DESCRIPTION!R!library library /library attached by library function/ !_TAG_ROLE_DESCRIPTION!Bats!script loaded /script loaed with "load" command/ !_TAG_ROLE_DESCRIPTION!Ruby!library loaded /loaded by "load" method/ !_TAG_ROLE_DESCRIPTION!Sh!script loaded /loaded/ !_TAG_ROLE_DESCRIPTION!Zsh!script loaded /loaded/ !_TAG_ROLE_DESCRIPTION!C!header local /local header/ !_TAG_ROLE_DESCRIPTION!C++!header local /local header/ !_TAG_KIND_DESCRIPTION!Asm m,macro /macros/ !_TAG_KIND_DESCRIPTION!Make m,macro /macros/ !_TAG_KIND_DESCRIPTION!RpmSpec m,macro /macros/ !_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/ !_TAG_KIND_DESCRIPTION!C++ m,member /class, struct, and union members/ !_TAG_KIND_DESCRIPTION!Go m,member /struct members/ !_TAG_KIND_DESCRIPTION!Python m,member /class members/ !_TAG_KIND_DESCRIPTION!Protobuf m,message /messages/ !_TAG_KIND_DESCRIPTION!Diff m,modifiedFile /modified files/ !_TAG_KIND_DESCRIPTION!Ruby m,module /modules/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_FIELD_DESCRIPTION!Ruby mixin /how the class or module is mixed in (mixin:HOW:MODULE)/ !_TAG_KIND_DESCRIPTION!Markdown n,footnote /footnotes/ !_TAG_KIND_DESCRIPTION!Go n,methodSpec /interface method specification/ !_TAG_KIND_DESCRIPTION!R n,nameattr /names attribtes in vectors, lists, or dataframes/ !_TAG_KIND_DESCRIPTION!C++ n,namespace /namespaces/ !_TAG_KIND_DESCRIPTION!Diff n,newFile /newly created files/ !_TAG_KIND_DESCRIPTION!DTD n,notation /notations/ !_TAG_KIND_DESCRIPTION!XML n,nsprefix /namespace prefixes/ !_TAG_KIND_DESCRIPTION!JSON n,number /numbers/ !_TAG_FIELD_DESCRIPTION name /tag name/ !_TAG_FIELD_DESCRIPTION!C++ name /aliased names/ !_TAG_FIELD_DESCRIPTION!Python nameref /the original name for the tag/ !_TAG_ROLE_DESCRIPTION!Python!module namespace /namespace from where classes\/variables\/functions are imported/ !_TAG_KIND_DESCRIPTION!JSON o,object /objects/ !_TAG_KIND_DESCRIPTION!Protobuf o,oneof /oneof names/ !_TAG_ROLE_DESCRIPTION!Make!makefile optional /optionally included/ !_TAG_KIND_DESCRIPTION!Go p,package /packages/ !_TAG_KIND_DESCRIPTION!Perl p,package /packages/ !_TAG_KIND_DESCRIPTION!Protobuf p,package /packages/ !_TAG_KIND_DESCRIPTION!RpmSpec p,package /packages/ !_TAG_KIND_DESCRIPTION!DTD p,parameterEntity /parameter entities/ !_TAG_KIND_DESCRIPTION!RpmSpec p,patch /patch files/ !_TAG_KIND_DESCRIPTION!OpenAPI p,path /paths/ !_TAG_FIELD_DESCRIPTION!Go package /the real package specified by the package name/ !_TAG_FIELD_DESCRIPTION!Go packageName /the name for referring the package/ !_TAG_ROLE_DESCRIPTION!DTD!parameterEntity partOfAttDef /part of attribute definition/ !_TAG_ROLE_DESCRIPTION!C++!module partOwner /used for specifying a partition/ !_TAG_FIELD_DESCRIPTION pattern /pattern/ !_TAG_FIELD_DESCRIPTION!Asm properties /properties (req, vararg for parameters)/ !_TAG_EXTRA_DESCRIPTION pseudo /Include pseudo tags/ !_TAG_KIND_DESCRIPTION!XML r,root /root elements/ !_TAG_KIND_DESCRIPTION!Protobuf r,rpc /RPC methods/ !_TAG_ROLE_DESCRIPTION!Go!unknown receiverType /receiver type/ !_TAG_ROLE_DESCRIPTION!R!library require /library attached by require function/ !_TAG_ROLE_DESCRIPTION!Ruby!library required /loaded by "require" method/ !_TAG_ROLE_DESCRIPTION!Ruby!library requiredRel /loaded by "require_relative" method/ !_TAG_KIND_DESCRIPTION!Sh s,script /script files/ !_TAG_KIND_DESCRIPTION!Zsh s,script /script files/ !_TAG_KIND_DESCRIPTION!Asciidoc s,section /sections/ !_TAG_KIND_DESCRIPTION!Iniconf s,section /sections/ !_TAG_KIND_DESCRIPTION!Man s,section /sections/ !_TAG_KIND_DESCRIPTION!Markdown s,section /sections/ !_TAG_KIND_DESCRIPTION!Pod s,section /sections/ !_TAG_KIND_DESCRIPTION!ReStructuredText s,section /sections/ !_TAG_KIND_DESCRIPTION!CSS s,selector /selectors/ !_TAG_KIND_DESCRIPTION!OpenAPI s,server /servers (or hosts in swagger)/ !_TAG_KIND_DESCRIPTION!Protobuf s,service /services/ !_TAG_KIND_DESCRIPTION!R s,source /sources/ !_TAG_KIND_DESCRIPTION!JSON s,string /strings/ !_TAG_KIND_DESCRIPTION!C s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C++ s,struct /structure names/ !_TAG_KIND_DESCRIPTION!Go s,struct /structs/ !_TAG_KIND_DESCRIPTION!Perl s,subroutine /subroutines/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_ROLE_DESCRIPTION!R!source source /source loaded by source fucntion/ !_TAG_EXTRA_DESCRIPTION subparser /Include tags generated by subparsers/ !_TAG_ROLE_DESCRIPTION!C!header system /system header/ !_TAG_ROLE_DESCRIPTION!C++!header system /system header/ !_TAG_KIND_DESCRIPTION!Asciidoc t,subsubsection /level 3 sections/ !_TAG_KIND_DESCRIPTION!Markdown t,subsubsection /level 3 sections/ !_TAG_KIND_DESCRIPTION!Pod t,subsubsection /subsubsections/ !_TAG_KIND_DESCRIPTION!ReStructuredText t,subsubsection /subsubsections/ !_TAG_KIND_DESCRIPTION!TOML t,table /tables/ !_TAG_KIND_DESCRIPTION!RpmSpec t,tag /tags/ !_TAG_KIND_DESCRIPTION!Make t,target /targets/ !_TAG_KIND_DESCRIPTION!Bats t,test /test cases/ !_TAG_KIND_DESCRIPTION!HTML t,title /titles/ !_TAG_KIND_DESCRIPTION!Man t,title /titles/ !_TAG_KIND_DESCRIPTION!OpenAPI t,title /titles/ !_TAG_KIND_DESCRIPTION!Asm t,type /types (structs and records)/ !_TAG_KIND_DESCRIPTION!Go t,type /types/ !_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C++ t,typedef /typedefs/ !_TAG_FIELD_DESCRIPTION typeref /Type and name of a variable or typedef/ !_TAG_KIND_DESCRIPTION!Asciidoc u,l5subsection /level 5 sections/ !_TAG_KIND_DESCRIPTION!Markdown u,l5subsection /level 5 sections/ !_TAG_KIND_DESCRIPTION!C u,union /union names/ !_TAG_KIND_DESCRIPTION!C++ u,union /union names/ !_TAG_KIND_DESCRIPTION!SystemdUnit u,unit /units/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_ROLE_DESCRIPTION!C!macro undef /undefined/ !_TAG_ROLE_DESCRIPTION!C++!macro undef /undefined/ !_TAG_ROLE_DESCRIPTION!RpmSpec!macro undef /undefined/ !_TAG_FIELD_DESCRIPTION!XML uri /uri associated with name prefix/ !_TAG_KIND_DESCRIPTION!R v,functionVar /function variables having values other than function()/ !_TAG_KIND_DESCRIPTION!Go v,var /variables/ !_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/ !_TAG_KIND_DESCRIPTION!C++ v,variable /variable definitions/ !_TAG_KIND_DESCRIPTION!DosBatch v,variable /variables/ !_TAG_KIND_DESCRIPTION!PowerShell v,variable /variables/ !_TAG_KIND_DESCRIPTION!Python v,variable /variables/ !_TAG_KIND_DESCRIPTION!JSON z,null /nulls/ # SORTING ! INPUT !_TAG_KIND_DESCRIPTION!JSON z,null /nulls/ !_TAG_KIND_DESCRIPTION!Python v,variable /variables/ !_TAG_KIND_DESCRIPTION!PowerShell v,variable /variables/ !_TAG_KIND_DESCRIPTION!DosBatch v,variable /variables/ !_TAG_KIND_DESCRIPTION!C++ v,variable /variable definitions/ !_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/ !_TAG_KIND_DESCRIPTION!Go v,var /variables/ !_TAG_KIND_DESCRIPTION!R v,functionVar /function variables having values other than function()/ !_TAG_FIELD_DESCRIPTION!XML uri /uri associated with name prefix/ !_TAG_ROLE_DESCRIPTION!RpmSpec!macro undef /undefined/ !_TAG_ROLE_DESCRIPTION!C++!macro undef /undefined/ !_TAG_ROLE_DESCRIPTION!C!macro undef /undefined/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_KIND_DESCRIPTION!SystemdUnit u,unit /units/ !_TAG_KIND_DESCRIPTION!C++ u,union /union names/ !_TAG_KIND_DESCRIPTION!C u,union /union names/ !_TAG_KIND_DESCRIPTION!Markdown u,l5subsection /level 5 sections/ !_TAG_KIND_DESCRIPTION!Asciidoc u,l5subsection /level 5 sections/ !_TAG_FIELD_DESCRIPTION typeref /Type and name of a variable or typedef/ !_TAG_KIND_DESCRIPTION!C++ t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!Go t,type /types/ !_TAG_KIND_DESCRIPTION!Asm t,type /types (structs and records)/ !_TAG_KIND_DESCRIPTION!OpenAPI t,title /titles/ !_TAG_KIND_DESCRIPTION!Man t,title /titles/ !_TAG_KIND_DESCRIPTION!HTML t,title /titles/ !_TAG_KIND_DESCRIPTION!Bats t,test /test cases/ !_TAG_KIND_DESCRIPTION!Make t,target /targets/ !_TAG_KIND_DESCRIPTION!RpmSpec t,tag /tags/ !_TAG_KIND_DESCRIPTION!TOML t,table /tables/ !_TAG_KIND_DESCRIPTION!ReStructuredText t,subsubsection /subsubsections/ !_TAG_KIND_DESCRIPTION!Pod t,subsubsection /subsubsections/ !_TAG_KIND_DESCRIPTION!Markdown t,subsubsection /level 3 sections/ !_TAG_KIND_DESCRIPTION!Asciidoc t,subsubsection /level 3 sections/ !_TAG_ROLE_DESCRIPTION!C++!header system /system header/ !_TAG_ROLE_DESCRIPTION!C!header system /system header/ !_TAG_EXTRA_DESCRIPTION subparser /Include tags generated by subparsers/ !_TAG_ROLE_DESCRIPTION!R!source source /source loaded by source fucntion/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_KIND_DESCRIPTION!Perl s,subroutine /subroutines/ !_TAG_KIND_DESCRIPTION!Go s,struct /structs/ !_TAG_KIND_DESCRIPTION!C++ s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C s,struct /structure names/ !_TAG_KIND_DESCRIPTION!JSON s,string /strings/ !_TAG_KIND_DESCRIPTION!R s,source /sources/ !_TAG_KIND_DESCRIPTION!Protobuf s,service /services/ !_TAG_KIND_DESCRIPTION!OpenAPI s,server /servers (or hosts in swagger)/ !_TAG_KIND_DESCRIPTION!CSS s,selector /selectors/ !_TAG_KIND_DESCRIPTION!ReStructuredText s,section /sections/ !_TAG_KIND_DESCRIPTION!Pod s,section /sections/ !_TAG_KIND_DESCRIPTION!Markdown s,section /sections/ !_TAG_KIND_DESCRIPTION!Man s,section /sections/ !_TAG_KIND_DESCRIPTION!Iniconf s,section /sections/ !_TAG_KIND_DESCRIPTION!Asciidoc s,section /sections/ !_TAG_KIND_DESCRIPTION!Zsh s,script /script files/ !_TAG_KIND_DESCRIPTION!Sh s,script /script files/ !_TAG_ROLE_DESCRIPTION!Ruby!library requiredRel /loaded by "require_relative" method/ !_TAG_ROLE_DESCRIPTION!Ruby!library required /loaded by "require" method/ !_TAG_ROLE_DESCRIPTION!R!library require /library attached by require function/ !_TAG_ROLE_DESCRIPTION!Go!unknown receiverType /receiver type/ !_TAG_KIND_DESCRIPTION!Protobuf r,rpc /RPC methods/ !_TAG_KIND_DESCRIPTION!XML r,root /root elements/ !_TAG_EXTRA_DESCRIPTION pseudo /Include pseudo tags/ !_TAG_FIELD_DESCRIPTION!Asm properties /properties (req, vararg for parameters)/ !_TAG_FIELD_DESCRIPTION pattern /pattern/ !_TAG_ROLE_DESCRIPTION!C++!module partOwner /used for specifying a partition/ !_TAG_ROLE_DESCRIPTION!DTD!parameterEntity partOfAttDef /part of attribute definition/ !_TAG_FIELD_DESCRIPTION!Go packageName /the name for referring the package/ !_TAG_FIELD_DESCRIPTION!Go package /the real package specified by the package name/ !_TAG_KIND_DESCRIPTION!OpenAPI p,path /paths/ !_TAG_KIND_DESCRIPTION!RpmSpec p,patch /patch files/ !_TAG_KIND_DESCRIPTION!DTD p,parameterEntity /parameter entities/ !_TAG_KIND_DESCRIPTION!RpmSpec p,package /packages/ !_TAG_KIND_DESCRIPTION!Protobuf p,package /packages/ !_TAG_KIND_DESCRIPTION!Perl p,package /packages/ !_TAG_KIND_DESCRIPTION!Go p,package /packages/ !_TAG_ROLE_DESCRIPTION!Make!makefile optional /optionally included/ !_TAG_KIND_DESCRIPTION!Protobuf o,oneof /oneof names/ !_TAG_KIND_DESCRIPTION!JSON o,object /objects/ !_TAG_ROLE_DESCRIPTION!Python!module namespace /namespace from where classes\/variables\/functions are imported/ !_TAG_FIELD_DESCRIPTION!Python nameref /the original name for the tag/ !_TAG_FIELD_DESCRIPTION!C++ name /aliased names/ !_TAG_FIELD_DESCRIPTION name /tag name/ !_TAG_KIND_DESCRIPTION!JSON n,number /numbers/ !_TAG_KIND_DESCRIPTION!XML n,nsprefix /namespace prefixes/ !_TAG_KIND_DESCRIPTION!DTD n,notation /notations/ !_TAG_KIND_DESCRIPTION!Diff n,newFile /newly created files/ !_TAG_KIND_DESCRIPTION!C++ n,namespace /namespaces/ !_TAG_KIND_DESCRIPTION!R n,nameattr /names attribtes in vectors, lists, or dataframes/ !_TAG_KIND_DESCRIPTION!Go n,methodSpec /interface method specification/ !_TAG_KIND_DESCRIPTION!Markdown n,footnote /footnotes/ !_TAG_FIELD_DESCRIPTION!Ruby mixin /how the class or module is mixed in (mixin:HOW:MODULE)/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_KIND_DESCRIPTION!Ruby m,module /modules/ !_TAG_KIND_DESCRIPTION!Diff m,modifiedFile /modified files/ !_TAG_KIND_DESCRIPTION!Protobuf m,message /messages/ !_TAG_KIND_DESCRIPTION!Python m,member /class members/ !_TAG_KIND_DESCRIPTION!Go m,member /struct members/ !_TAG_KIND_DESCRIPTION!C++ m,member /class, struct, and union members/ !_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/ !_TAG_KIND_DESCRIPTION!RpmSpec m,macro /macros/ !_TAG_KIND_DESCRIPTION!Make m,macro /macros/ !_TAG_KIND_DESCRIPTION!Asm m,macro /macros/ !_TAG_ROLE_DESCRIPTION!C++!header local /local header/ !_TAG_ROLE_DESCRIPTION!C!header local /local header/ !_TAG_ROLE_DESCRIPTION!Zsh!script loaded /loaded/ !_TAG_ROLE_DESCRIPTION!Sh!script loaded /loaded/ !_TAG_ROLE_DESCRIPTION!Ruby!library loaded /loaded by "load" method/ !_TAG_ROLE_DESCRIPTION!Bats!script loaded /script loaed with "load" command/ !_TAG_ROLE_DESCRIPTION!R!library library /library attached by library function/ !_TAG_KIND_DESCRIPTION!R l,library /libraries/ !_TAG_KIND_DESCRIPTION!Perl l,label /labels/ !_TAG_KIND_DESCRIPTION!DosBatch l,label /labels/ !_TAG_KIND_DESCRIPTION!Asm l,label /labels/ !_TAG_KIND_DESCRIPTION!Iniconf k,key /keys/ !_TAG_KIND_DESCRIPTION!HTML j,heading3 /H3 headings/ !_TAG_FIELD_DESCRIPTION input /input file/ !_TAG_ROLE_DESCRIPTION!Python!unknown indirectlyImported /classes\/variables\/functions\/modules imported in alternative name/ !_TAG_ROLE_DESCRIPTION!Python!module indirectlyImported /module imported in alternative name/ !_TAG_ROLE_DESCRIPTION!Make!makefile included /included/ !_TAG_ROLE_DESCRIPTION!Python!unknown imported /imported from the other module/ !_TAG_ROLE_DESCRIPTION!Python!module imported /imported modules/ !_TAG_ROLE_DESCRIPTION!Protobuf!protodef imported /imported/ !_TAG_ROLE_DESCRIPTION!Go!package imported /imported package/ !_TAG_ROLE_DESCRIPTION!C++!partition imported /imported with "imported ..."/ !_TAG_ROLE_DESCRIPTION!C++!module imported /imported with "imported ..."/ !_TAG_ROLE_DESCRIPTION!C++!header imported /imported with "imported ..."/ !_TAG_KIND_DESCRIPTION!Python i,module /modules/ !_TAG_KIND_DESCRIPTION!Go i,interface /interfaces/ !_TAG_KIND_DESCRIPTION!XML i,id /id attributes/ !_TAG_KIND_DESCRIPTION!CSS i,id /identities/ !_TAG_KIND_DESCRIPTION!HTML i,heading2 /H2 headings/ !_TAG_KIND_DESCRIPTION!PowerShell i,filter /filter/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_KIND_DESCRIPTION!ReStructuredText h,subtitle /sub titles/ !_TAG_KIND_DESCRIPTION!Diff h,hunk /hunks/ !_TAG_KIND_DESCRIPTION!Zsh h,heredoc /label for here document/ !_TAG_KIND_DESCRIPTION!Sh h,heredoc /label for here document/ !_TAG_KIND_DESCRIPTION!HTML h,heading1 /H1 headings/ !_TAG_KIND_DESCRIPTION!C++ h,header /included header files/ !_TAG_KIND_DESCRIPTION!C h,header /included header files/ !_TAG_KIND_DESCRIPTION!Markdown h,hashtag /hashtags/ !_TAG_KIND_DESCRIPTION!R g,globalVar /global variables having values other than function()/ !_TAG_KIND_DESCRIPTION!RpmSpec g,global /global macros/ !_TAG_KIND_DESCRIPTION!Protobuf g,enum /enum types/ !_TAG_KIND_DESCRIPTION!PowerShell g,enum /enum names/ !_TAG_KIND_DESCRIPTION!C++ g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/ !_TAG_ROLE_DESCRIPTION!C!struct foreigndecl /declared in foreign languages/ !_TAG_ROLE_DESCRIPTION!C!function foreigndecl /declared in foreign languages/ !_TAG_EXTRA_DESCRIPTION fileScope /Include tags of file scope/ !_TAG_FIELD_DESCRIPTION file /File-restricted scoping/ !_TAG_KIND_DESCRIPTION!Ruby f,method /methods/ !_TAG_KIND_DESCRIPTION!Zsh f,function /functions/ !_TAG_KIND_DESCRIPTION!Sh f,function /functions/ !_TAG_KIND_DESCRIPTION!R f,function /functions/ !_TAG_KIND_DESCRIPTION!Python f,function /functions/ !_TAG_KIND_DESCRIPTION!PowerShell f,function /functions/ !_TAG_KIND_DESCRIPTION!Lua f,function /functions/ !_TAG_KIND_DESCRIPTION!C++ f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C f,function /function definitions/ !_TAG_KIND_DESCRIPTION!Awk f,function /functions/ !_TAG_KIND_DESCRIPTION!Go f,func /functions/ !_TAG_KIND_DESCRIPTION!Perl f,format /formats/ !_TAG_KIND_DESCRIPTION!Protobuf f,field /fields/ !_TAG_ROLE_DESCRIPTION!Protobuf!message extension /extending the message/ !_TAG_ROLE_DESCRIPTION!HTML!stylesheet extFile /referenced as external files/ !_TAG_ROLE_DESCRIPTION!HTML!script extFile /referenced as external files/ !_TAG_ROLE_DESCRIPTION!C++!header exported /exported with "exported imported ..."/ !_TAG_FIELD_DESCRIPTION epoch /the last modified time of the input file (only for F\/file kind tag)/ !_TAG_ROLE_DESCRIPTION!Zsh!heredoc endmarker /end marker/ !_TAG_ROLE_DESCRIPTION!Sh!heredoc endmarker /end marker/ !_TAG_ROLE_DESCRIPTION!DTD!parameterEntity elementName /element names/ !_TAG_KIND_DESCRIPTION!PowerShell e,enumlabel /enum labels/ !_TAG_KIND_DESCRIPTION!Protobuf e,enumerator /enum constants/ !_TAG_KIND_DESCRIPTION!C++ e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!DTD e,element /elements/ !_TAG_ROLE_DESCRIPTION!RpmSpec!patch decl /declared for applying later/ !_TAG_KIND_DESCRIPTION!ReStructuredText d,substdef /substitute definitions/ !_TAG_KIND_DESCRIPTION!OpenAPI d,schema /schemas/ !_TAG_KIND_DESCRIPTION!C++ d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!Diff d,deletedFile /deleted files/ !_TAG_KIND_DESCRIPTION!Asm d,define /defines/ !_TAG_KIND_DESCRIPTION!SVG d,def /ids in defs tags/ !_TAG_KIND_DESCRIPTION!R d,dataframe /data frame explicitly created with `data.frame()'/ !_TAG_FIELD_DESCRIPTION!R constructor /function used for making value assigned to the nameattr tag/ !_TAG_ROLE_DESCRIPTION!DTD!parameterEntity condition /conditions/ !_TAG_KIND_DESCRIPTION!R c,vector /vectors explicitly created with `c()'/ !_TAG_KIND_DESCRIPTION!Perl c,constant /constants/ !_TAG_KIND_DESCRIPTION!Go c,const /constants/ !_TAG_KIND_DESCRIPTION!Ruby c,class /classes/ !_TAG_KIND_DESCRIPTION!Python c,class /classes/ !_TAG_KIND_DESCRIPTION!PowerShell c,class /classes/ !_TAG_KIND_DESCRIPTION!HTML c,class /classes/ !_TAG_KIND_DESCRIPTION!CSS c,class /classes/ !_TAG_KIND_DESCRIPTION!C++ c,class /classes/ !_TAG_KIND_DESCRIPTION!ReStructuredText c,chapter /chapters/ !_TAG_KIND_DESCRIPTION!Pod c,chapter /chapters/ !_TAG_KIND_DESCRIPTION!Markdown c,chapter /chapters/ !_TAG_KIND_DESCRIPTION!Asciidoc c,chapter /chapters/ !_TAG_KIND_DESCRIPTION!JSON b,boolean /booleans/ !_TAG_ROLE_DESCRIPTION!Zsh!script autoloaded /autoloaded/ !_TAG_ROLE_DESCRIPTION!Zsh!function autoloaded /function name passed to autoload built-in command/ !_TAG_ROLE_DESCRIPTION!HTML!class attribute /assigned as attributes/ !_TAG_ROLE_DESCRIPTION!DTD!element attOwner /attributes owner/ !_TAG_EXTRA_DESCRIPTION anonymous /Include tags for non-named objects like lambda/ !_TAG_ROLE_DESCRIPTION!Yaml!anchor alias /alias/ !_TAG_KIND_DESCRIPTION!Go a,talias /type aliases/ !_TAG_KIND_DESCRIPTION!DTD a,attribute /attributes/ !_TAG_KIND_DESCRIPTION!TOML a,arraytable /array tables/ !_TAG_KIND_DESCRIPTION!JSON a,array /arrays/ !_TAG_KIND_DESCRIPTION!Yaml a,anchor /anchors/ !_TAG_KIND_DESCRIPTION!HTML a,anchor /named anchors/ !_TAG_KIND_DESCRIPTION!Asciidoc a,anchor /anchors/ !_TAG_KIND_DESCRIPTION!Zsh a,alias /aliases/ !_TAG_KIND_DESCRIPTION!Sh a,alias /aliases/ !_TAG_KIND_DESCRIPTION!Ruby a,alias /aliases/ !_TAG_KIND_DESCRIPTION!Python Y,unknown /name referring a class\/variable\/function\/module defined in other module/ !_TAG_KIND_DESCRIPTION!Go Y,unknown /unknown/ !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit Wants /referred in Wants key/ !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit WantedBy /referred in WantedBy key/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_KIND_DESCRIPTION!ReStructuredText T,target /targets/ !_TAG_KIND_DESCRIPTION!OpenAPI T,tag /tags/ !_TAG_KIND_DESCRIPTION!Markdown T,l4subsection /level 4 sections/ !_TAG_KIND_DESCRIPTION!Asciidoc T,l4subsection /level 4 sections/ !_TAG_KIND_DESCRIPTION!ReStructuredText S,subsection /subsections/ !_TAG_KIND_DESCRIPTION!Pod S,subsection /subsections/ !_TAG_KIND_DESCRIPTION!Markdown S,subsection /level 2 sections/ !_TAG_KIND_DESCRIPTION!Man S,subsection /sub sections/ !_TAG_KIND_DESCRIPTION!Asciidoc S,subsection /level 2 sections/ !_TAG_KIND_DESCRIPTION!Ruby S,singletonMethod /singleton methods/ !_TAG_KIND_DESCRIPTION!Bats S,script /scripts/ !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit Requires /referred in Requires key/ !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit RequiredBy /referred in RequiredBy key/ !_TAG_KIND_DESCRIPTION!OpenAPI R,response /responses/ !_TAG_KIND_DESCRIPTION!C++ P,partition /partitions/ !_TAG_KIND_DESCRIPTION!OpenAPI P,parameter /parameters/ !_TAG_KIND_DESCRIPTION!Go P,packageName /name for specifying imported package/ !_TAG_KIND_DESCRIPTION!C++ M,module /modules/ !_TAG_KIND_DESCRIPTION!Go M,anonMember /struct anonymous members/ !_TAG_KIND_DESCRIPTION!R L,list /lists explicitly created with `list()'/ !_TAG_KIND_DESCRIPTION!Ruby L,library /libraries/ !_TAG_KIND_DESCRIPTION!TOML K,qkey /qualified keys/ !_TAG_KIND_DESCRIPTION!HTML J,script /scripts/ !_TAG_KIND_DESCRIPTION!Python I,namespace /name referring a module defined in other file/ !_TAG_KIND_DESCRIPTION!Make I,makefile /makefiles/ !_TAG_KIND_DESCRIPTION!HTML I,id /identifiers/ !_TAG_KIND_DESCRIPTION!ReStructuredText H,title /titles/ !_TAG_KIND_DESCRIPTION!Protobuf G,group /groups/ !_TAG_KIND_DESCRIPTION!DTD E,entity /entities/ !_TAG_KIND_DESCRIPTION!Protobuf D,protodef /.proto definition/ !_TAG_KIND_DESCRIPTION!HTML C,stylesheet /stylesheets/ !_TAG_KIND_DESCRIPTION!Ruby C,constant /constants/ !_TAG_KIND_DESCRIPTION!ReStructuredText C,citation /citations/ !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit Before /referred in Before key/ !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit After /referred in After key/ !_TAG_KIND_DESCRIPTION!Ruby A,accessor /accessors/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_VERSION 6.1.0 /d1ecc51b9/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_PARSER_VERSION!PowerShell 1.1 /current.age/ !_TAG_PARSER_VERSION!Markdown 1.1 /current.age/ !_TAG_PARSER_VERSION!Make 1.1 /current.age/ !_TAG_PARSER_VERSION!C++ 1.1 /current.age/ !_TAG_PARSER_VERSION!C 1.1 /current.age/ !_TAG_PARSER_VERSION!Asm 1.0 /current.age/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_PARSER_VERSION!Zsh 0.0 /current.age/ !_TAG_PARSER_VERSION!Yaml 0.0 /current.age/ !_TAG_PARSER_VERSION!XML 0.0 /current.age/ !_TAG_PARSER_VERSION!TOML 0.0 /current.age/ !_TAG_PARSER_VERSION!SystemdUnit 0.0 /current.age/ !_TAG_PARSER_VERSION!Sh 0.0 /current.age/ !_TAG_PARSER_VERSION!SVG 0.0 /current.age/ !_TAG_PARSER_VERSION!Ruby 0.0 /current.age/ !_TAG_PARSER_VERSION!RpmSpec 0.0 /current.age/ !_TAG_PARSER_VERSION!ReStructuredText 0.0 /current.age/ !_TAG_PARSER_VERSION!R 0.0 /current.age/ !_TAG_PARSER_VERSION!Python 0.0 /current.age/ !_TAG_PARSER_VERSION!Protobuf 0.0 /current.age/ !_TAG_PARSER_VERSION!Pod 0.0 /current.age/ !_TAG_PARSER_VERSION!Perl 0.0 /current.age/ !_TAG_PARSER_VERSION!OpenAPI 0.0 /current.age/ !_TAG_PARSER_VERSION!Man 0.0 /current.age/ !_TAG_PARSER_VERSION!Lua 0.0 /current.age/ !_TAG_PARSER_VERSION!JSON 0.0 /current.age/ !_TAG_PARSER_VERSION!Iniconf 0.0 /current.age/ !_TAG_PARSER_VERSION!HTML 0.0 /current.age/ !_TAG_PARSER_VERSION!Go 0.0 /current.age/ !_TAG_PARSER_VERSION!DosBatch 0.0 /current.age/ !_TAG_PARSER_VERSION!Diff 0.0 /current.age/ !_TAG_PARSER_VERSION!DTD 0.0 /current.age/ !_TAG_PARSER_VERSION!CSS 0.0 /current.age/ !_TAG_PARSER_VERSION!Bats 0.0 /current.age/ !_TAG_PARSER_VERSION!Awk 0.0 /current.age/ !_TAG_PARSER_VERSION!Asciidoc 0.0 /current.age/ !_TAG_OUTPUT_VERSION 0.0 /current.age/ !_TAG_PROC_CWD /home/yamato/var/ctags-github/ // ================================================ FILE: Tmain/readtags-ptags-escaping.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/readtags-ptags-escaping.d/pseudo-input-b_.tags ================================================ !_PTAG value\ /comment/;" regular_tag /path/to/file /^pattern$/;" kind: ================================================ FILE: Tmain/readtags-ptags-escaping.d/pseudo-input-bb.tags ================================================ !_PTAG value\\ /comment/;" regular_tag /path/to/file /^pattern$/;" kind: ================================================ FILE: Tmain/readtags-ptags-escaping.d/pseudo-input-bt.tags ================================================ !_PTAG value\t /comment/;" regular_tag /path/to/file /^pattern$/;" kind: ================================================ FILE: Tmain/readtags-ptags-escaping.d/pseudo-name-b_.tags ================================================ !_PTAG\ value /comment/;" regular_tag /path/to/file /^pattern$/;" kind: ================================================ FILE: Tmain/readtags-ptags-escaping.d/pseudo-name-bb.tags ================================================ !_PTAG\\ value /comment/;" regular_tag /path/to/file /^pattern$/;" kind: ================================================ FILE: Tmain/readtags-ptags-escaping.d/pseudo-name-bt.tags ================================================ !_PTAG\t value /comment/;" regular_tag /path/to/file /^pattern$/;" kind: ================================================ FILE: Tmain/readtags-ptags-escaping.d/regular-input-b_.tags ================================================ !_PTAG value /comment/;" regular_tag /path/to/file\ /^pattern$/;" kind: ================================================ FILE: Tmain/readtags-ptags-escaping.d/regular-input-bb.tags ================================================ !_PTAG value /comment/;" regular_tag /path/to/file\\ /^pattern$/;" kind: ================================================ FILE: Tmain/readtags-ptags-escaping.d/regular-input-bt.tags ================================================ !_PTAG value /comment/;" regular_tag /path/to/file\t /^pattern$/;" kind: ================================================ FILE: Tmain/readtags-ptags-escaping.d/regular-kind-b_.tags ================================================ !_PTAG value /comment/;" regular_tag /path/to/file /^pattern$/;" kind:\ ================================================ FILE: Tmain/readtags-ptags-escaping.d/regular-kind-bb.tags ================================================ !_PTAG value /comment/;" regular_tag /path/to/file /^pattern$/;" kind:\\ ================================================ FILE: Tmain/readtags-ptags-escaping.d/regular-name-b_.tags ================================================ !_PTAG value /comment/;" regular_tag\ /path/to/file /^pattern$/;" kind: ================================================ FILE: Tmain/readtags-ptags-escaping.d/regular-name-bb.tags ================================================ !_PTAG value /comment/;" regular_tag\\ /path/to/file /^pattern$/;" kind: ================================================ FILE: Tmain/readtags-ptags-escaping.d/regular-name-bt.tags ================================================ !_PTAG value /comment/;" regular_tag\t /path/to/file /^pattern$/;" kind: ================================================ FILE: Tmain/readtags-ptags-escaping.d/run.sh ================================================ #!/bin/sh # Copyright: 2022 Masatake YAMATO # License: GPL-2 READTAGS=$3 #V="valgrind --leak-check=full --track-origins=yes -v" V= . ../utils.sh skip_if_no_readtags "$READTAGS" # {regular|pseudo}-{field}-{char0{char1}*}.tags for t in INIT \ regular-name-b_.tags \ regular-name-bb.tags \ regular-name-bt.tags \ regular-input-b_.tags \ regular-input-bb.tags \ regular-input-bt.tags \ regular-kind-b_.tags \ regular-kind-bb.tags \ pseudo-name-b_.tags \ pseudo-name-bb.tags \ pseudo-name-bt.tags \ pseudo-input-b_.tags \ pseudo-input-bb.tags \ pseudo-input-bt.tags \ ; do case $t in INIT) ;; regular-*) echo "# $t" ${V} ${READTAGS} -Ee -t $t -l || exit 1 echo ;; pseudo-*) echo "# $t" ${V} ${READTAGS} -Ee -t $t -D || exit 1 echo ;; *) echo "INTERNAL BUG" exit 1 ;; esac done ================================================ FILE: Tmain/readtags-ptags-escaping.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-ptags-escaping.d/stdout-expected.txt ================================================ # regular-name-b_.tags regular_tag\\ /path/to/file /^pattern$/ # regular-name-bb.tags regular_tag\\ /path/to/file /^pattern$/ # regular-name-bt.tags regular_tag\t /path/to/file /^pattern$/ # regular-input-b_.tags regular_tag /path/to/file\ /^pattern$/ # regular-input-bb.tags regular_tag /path/to/file\\ /^pattern$/ # regular-input-bt.tags regular_tag /path/to/file\t /^pattern$/ # regular-kind-b_.tags regular_tag /path/to/file /^pattern$/;" kind:\\ # regular-kind-bb.tags regular_tag /path/to/file /^pattern$/;" kind:\\ # pseudo-name-b_.tags !_PTAG\\ value /comment/ # pseudo-name-bb.tags !_PTAG\\ value /comment/ # pseudo-name-bt.tags !_PTAG\t value /comment/ # pseudo-input-b_.tags !_PTAG value\ /comment/ # pseudo-input-bb.tags !_PTAG value\\ /comment/ # pseudo-input-bt.tags !_PTAG value\t /comment/ ================================================ FILE: Tmain/readtags-ptags-escaping2.d/example-_-_.tags ================================================ !_TAG_PROC_CWD /home/a\tb // ================================================ FILE: Tmain/readtags-ptags-escaping2.d/example-_-b.tags ================================================ !_TAG_OUTPUT_FILESEP backslash /slash or backslash/ !_TAG_PROC_CWD /home/a\tb // ================================================ FILE: Tmain/readtags-ptags-escaping2.d/example-_-s.tags ================================================ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_PROC_CWD /home/a\tb // ================================================ FILE: Tmain/readtags-ptags-escaping2.d/example-e-_.tags ================================================ !_TAG_OUTPUT_MODE e-ctags /u-ctags or e-ctags/ !_TAG_PROC_CWD /home/a\tb // ================================================ FILE: Tmain/readtags-ptags-escaping2.d/example-e-b.tags ================================================ !_TAG_OUTPUT_MODE e-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_FILESEP backslash /slash or backslash/ !_TAG_PROC_CWD /home/a\tb // ================================================ FILE: Tmain/readtags-ptags-escaping2.d/example-e-s.tags ================================================ !_TAG_OUTPUT_MODE e-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_PROC_CWD /home/a\tb // ================================================ FILE: Tmain/readtags-ptags-escaping2.d/example-u-_.tags ================================================ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PROC_CWD /home/a\tb // ================================================ FILE: Tmain/readtags-ptags-escaping2.d/example-u-b.tags ================================================ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_FILESEP backslash /slash or backslash/ !_TAG_PROC_CWD /home/a\tb // ================================================ FILE: Tmain/readtags-ptags-escaping2.d/example-u-s.tags ================================================ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_PROC_CWD /home/a\tb // ================================================ FILE: Tmain/readtags-ptags-escaping2.d/run.sh ================================================ #!/bin/sh # Copyright: 2022 Masatake YAMATO # License: GPL-2 READTAGS=$3 #V="valgrind --leak-check=full --track-origins=yes -v" V= . ../utils.sh skip_if_no_readtags "$READTAGS" for m in e u _; do for s in s b _; do echo readtags -e -t example-$m-$s.tags -E -D: ${V} ${READTAGS} -e -t example-$m-$s.tags -E -D echo readtags -e -t example-$m-$s.tags -D: ${V} ${READTAGS} -e -t example-$m-$s.tags -D echo done done ================================================ FILE: Tmain/readtags-ptags-escaping2.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-ptags-escaping2.d/stdout-expected.txt ================================================ readtags -e -t example-e-s.tags -E -D: !_TAG_OUTPUT_MODE e-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_PROC_CWD /home/a\tb // readtags -e -t example-e-s.tags -D: !_TAG_OUTPUT_MODE e-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_PROC_CWD /home/a\tb // readtags -e -t example-e-b.tags -E -D: !_TAG_OUTPUT_MODE e-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_FILESEP backslash /slash or backslash/ !_TAG_PROC_CWD /home/a\tb // readtags -e -t example-e-b.tags -D: !_TAG_OUTPUT_MODE e-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_FILESEP backslash /slash or backslash/ !_TAG_PROC_CWD /home/a\tb // readtags -e -t example-e-_.tags -E -D: !_TAG_OUTPUT_MODE e-ctags /u-ctags or e-ctags/ !_TAG_PROC_CWD /home/a\tb // readtags -e -t example-e-_.tags -D: !_TAG_OUTPUT_MODE e-ctags /u-ctags or e-ctags/ !_TAG_PROC_CWD /home/a\tb // readtags -e -t example-u-s.tags -E -D: !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_PROC_CWD /home/a\tb // readtags -e -t example-u-s.tags -D: !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_PROC_CWD /home/a b // readtags -e -t example-u-b.tags -E -D: !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_FILESEP backslash /slash or backslash/ !_TAG_PROC_CWD /home/a\tb // readtags -e -t example-u-b.tags -D: !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_FILESEP backslash /slash or backslash/ !_TAG_PROC_CWD /home/a\tb // readtags -e -t example-u-_.tags -E -D: !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PROC_CWD /home/a\tb // readtags -e -t example-u-_.tags -D: !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PROC_CWD /home/a\tb // readtags -e -t example-_-s.tags -E -D: !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_PROC_CWD /home/a\tb // readtags -e -t example-_-s.tags -D: !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_PROC_CWD /home/a\tb // readtags -e -t example-_-b.tags -E -D: !_TAG_OUTPUT_FILESEP backslash /slash or backslash/ !_TAG_PROC_CWD /home/a\tb // readtags -e -t example-_-b.tags -D: !_TAG_OUTPUT_FILESEP backslash /slash or backslash/ !_TAG_PROC_CWD /home/a\tb // readtags -e -t example-_-_.tags -E -D: !_TAG_PROC_CWD /home/a\tb // readtags -e -t example-_-_.tags -D: !_TAG_PROC_CWD /home/a\tb // ================================================ FILE: Tmain/readtags-qualifier-begin.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/readtags-qualifier-begin.d/output.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/;" extras:pseudo !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/;" extras:pseudo !_TAG_OUTPUT_FILESEP slash /slash or backslash/;" extras:pseudo !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/;" extras:pseudo !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/;" extras:pseudo !_TAG_PROGRAM_AUTHOR Universal Ctags Team //;" extras:pseudo !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/;" extras:pseudo !_TAG_PROGRAM_URL https://ctags.io/ /official site/;" extras:pseudo !_TAG_PROGRAM_VERSION 0.0.0 /8957c2ce/;" extras:pseudo abc sample.c /^int abc;$/;" kind:variable line:2 language:C typeref:typename:int roles:def end:2 efg sample.c /^int efg;$/;" kind:variable line:3 language:C typeref:typename:int roles:def end:3 ================================================ FILE: Tmain/readtags-qualifier-begin.d/run.sh ================================================ #!/bin/sh # Copyright: 2020 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" run_readtags() { local fexpr=$1 local action=$2 echo ';;' "$fexpr" && echo ';;' "$fexpr" 1>&2 && ${V} ${READTAGS} -e -t output.tags -Q "$fexpr" "$action" } run_readtags '(begin #f (print $name) (print $line) #t)' -l && run_readtags '(begin #t (print $name) (print $line) #f)' -l && run_readtags '(begin #t (print $name) (print $line) (eq? $name "efg"))' -l && run_readtags '(begin #t (and (eq? $name "abc") (print $name) (print $line)) (eq? $name "efg"))' -l && run_readtags '(begin0 #t (print $name) (print $line) #f)' -l && run_readtags '(begin0 #f (print $name) (print $line) #t)' -l && run_readtags '(begin0 (eq? $name "abc") (print $name) (print $line) #t)' -l run_readtags '(begin0 (eq? $name "abc") (and (eq? $name "efg") (print $name) (print $line)) #t)' -l ================================================ FILE: Tmain/readtags-qualifier-begin.d/sample.c ================================================ /* ./ctags --fields='*' -o output.tags sample.c */ int abc; int efg; ================================================ FILE: Tmain/readtags-qualifier-begin.d/stderr-expected.txt ================================================ ;; (begin #f (print $name) (print $line) #t) "abc" 2 "efg" 3 ;; (begin #t (print $name) (print $line) #f) "abc" 2 "efg" 3 ;; (begin #t (print $name) (print $line) (eq? $name "efg")) "abc" 2 "efg" 3 ;; (begin #t (and (eq? $name "abc") (print $name) (print $line)) (eq? $name "efg")) "abc" 2 ;; (begin0 #t (print $name) (print $line) #f) "abc" 2 "efg" 3 ;; (begin0 #f (print $name) (print $line) #t) "abc" 2 "efg" 3 ;; (begin0 (eq? $name "abc") (print $name) (print $line) #t) "abc" 2 "efg" 3 ;; (begin0 (eq? $name "abc") (and (eq? $name "efg") (print $name) (print $line)) #t) "efg" 3 ================================================ FILE: Tmain/readtags-qualifier-begin.d/stdout-expected.txt ================================================ ;; (begin #f (print $name) (print $line) #t) abc sample.c /^int abc;$/;" kind:variable language:C typeref:typename:int roles:def end:2 efg sample.c /^int efg;$/;" kind:variable language:C typeref:typename:int roles:def end:3 ;; (begin #t (print $name) (print $line) #f) ;; (begin #t (print $name) (print $line) (eq? $name "efg")) efg sample.c /^int efg;$/;" kind:variable language:C typeref:typename:int roles:def end:3 ;; (begin #t (and (eq? $name "abc") (print $name) (print $line)) (eq? $name "efg")) efg sample.c /^int efg;$/;" kind:variable language:C typeref:typename:int roles:def end:3 ;; (begin0 #t (print $name) (print $line) #f) abc sample.c /^int abc;$/;" kind:variable language:C typeref:typename:int roles:def end:2 efg sample.c /^int efg;$/;" kind:variable language:C typeref:typename:int roles:def end:3 ;; (begin0 #f (print $name) (print $line) #t) ;; (begin0 (eq? $name "abc") (print $name) (print $line) #t) abc sample.c /^int abc;$/;" kind:variable language:C typeref:typename:int roles:def end:2 ;; (begin0 (eq? $name "abc") (and (eq? $name "efg") (print $name) (print $line)) #t) abc sample.c /^int abc;$/;" kind:variable language:C typeref:typename:int roles:def end:2 ================================================ FILE: Tmain/readtags-qualifier-broken-exp.d/exit-expected.txt ================================================ 1 ================================================ FILE: Tmain/readtags-qualifier-broken-exp.d/input.c ================================================ /* u-ctags input.c */ int main(void) { return 0; } ================================================ FILE: Tmain/readtags-qualifier-broken-exp.d/output.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ !_TAG_PROGRAM_NAME Exuberant Ctags // !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ !_TAG_PROGRAM_VERSION 5.8 // main input.c /^main(void)$/;" f ================================================ FILE: Tmain/readtags-qualifier-broken-exp.d/run.sh ================================================ #!/bin/sh # Copyright: 2020 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" ${V} ${READTAGS} -e -t output.tags -Q '(' -l ================================================ FILE: Tmain/readtags-qualifier-broken-exp.d/stderr-expected.txt ================================================ Failed to read the expression for filter: ( Reason: READ-ERROR ================================================ FILE: Tmain/readtags-qualifier-end-field.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/readtags-qualifier-end-field.d/output.tags ================================================ A input.py /^class A(object):$/;" c line:1 end:18 f input.py /^ def f(self):$/;" m line:3 class:A end:9 A.f input.py /^ def f(self):$/;" m line:3 class:A end:9 g input.py /^ def g(x):$/;" f line:4 function:A.f file: end:6 y input.py /^ y = 1$/;" v line:10 class:A h input.py /^ def h(self):$/;" m line:12 class:A end:15 A.h input.py /^ def h(self):$/;" m line:12 class:A end:15 i input.py /^ def i(self):$/;" m line:16 class:A end:18 A.i input.py /^ def i(self):$/;" m line:16 class:A end:18 input.py input.py 18;" F line:18 ================================================ FILE: Tmain/readtags-qualifier-end-field.d/run.sh ================================================ #!/bin/sh # Copyright: 2016 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" echo ';; (and $end (> $end 14) (< $end 18))' && ${V} ${READTAGS} -e -t output.tags -Q '(and $end (> $end 14) (< $end 18))' -l && : ================================================ FILE: Tmain/readtags-qualifier-end-field.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-qualifier-end-field.d/stdout-expected.txt ================================================ ;; (and $end (> $end 14) (< $end 18)) h input.py /^ def h(self):$/;" kind:m class:A end:15 A.h input.py /^ def h(self):$/;" kind:m class:A end:15 ================================================ FILE: Tmain/readtags-qualifier-exp-with-garbage.d/exit-expected.txt ================================================ 1 ================================================ FILE: Tmain/readtags-qualifier-exp-with-garbage.d/input.c ================================================ /* ctags -o output.tags input.c */ void foo (void) { } void bar (void) { } void baz (void) { } ================================================ FILE: Tmain/readtags-qualifier-exp-with-garbage.d/output.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /02cf1a61/ bar input.c /^void bar (void)$/;" f language:C typeref:typename:void baz input.c /^void baz (void)$/;" f language:C typeref:typename:void foo input.c /^void foo (void)$/;" f language:C typeref:typename:void ================================================ FILE: Tmain/readtags-qualifier-exp-with-garbage.d/run.sh ================================================ #!/bin/sh # Copyright: 2026 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" s=0 ${READTAGS} -t output.tags -S '(<> 2 1)x' -l > /dev/null s=`expr $s + $?` ${READTAGS} -t output.tags -S '(<> 2 1) ' -l > /dev/null s=`expr $s + $?` ${READTAGS} -t output.tags -S '(<> 2 1) ; comment' -l > /dev/null s=`expr $s + $?` exit $s ================================================ FILE: Tmain/readtags-qualifier-exp-with-garbage.d/stderr-expected.txt ================================================ Garbage at the end of the sorter expression: x ================================================ FILE: Tmain/readtags-qualifier-nth-field.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/readtags-qualifier-nth-field.d/input.c ================================================ /* ctags --options=NONE --sort=yes--kinds-C=+z --fields=+o --pseudo-tags=-TAG_PROGRAM_VERSION output.tags */ int z(int y, int x) { return 0; } ================================================ FILE: Tmain/readtags-qualifier-nth-field.d/output.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROC_CWD /home/jet/var/ctags-github/Tmain/readtags-qualifier-nth-field.d/ // !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ x input.c /^int z(int y, int x)$/;" z function:z typeref:typename:int file: nth:1 y input.c /^int z(int y, int x)$/;" z function:z typeref:typename:int file: nth:0 z input.c /^int z(int y, int x)$/;" f typeref:typename:int ================================================ FILE: Tmain/readtags-qualifier-nth-field.d/run.sh ================================================ #!/bin/sh # Copyright: 2016 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" ${V} ${READTAGS} -e -t output.tags \ -Q '(eq? $kind "z")' \ -S '(<> $nth &nth)' \ -F '(list $name ":" $nth #t)' \ -l ================================================ FILE: Tmain/readtags-qualifier-nth-field.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-qualifier-nth-field.d/stdout-expected.txt ================================================ y:0 x:1 ================================================ FILE: Tmain/readtags-qualifier-op-downcase-upcase.d/input.cpp ================================================ // ctags -o output.tags --fields=+i input.cpp class A { protected: int f (void) { return 1; } }; class B { protected: int g (void) { return 1; } }; class C: A, B { public: int h (void) { return f () + g (); } }; ================================================ FILE: Tmain/readtags-qualifier-op-downcase-upcase.d/output.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /e87283aa/ A input.cpp /^class A {$/;" c file: B input.cpp /^class B {$/;" c file: C input.cpp /^class C: A, B {$/;" c file: inherits:A,B f input.cpp /^ int f (void) {$/;" f class:A typeref:typename:int file: g input.cpp /^ int g (void) {$/;" f class:B typeref:typename:int file: h input.cpp /^ int h (void) {$/;" f class:C typeref:typename:int file: ================================================ FILE: Tmain/readtags-qualifier-op-downcase-upcase.d/run.sh ================================================ #!/bin/sh # Copyright: 2020 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" echo '# (eq? "c" (downcase $name))' ${V} ${READTAGS} -t output.tags -Q '(eq? "c" (downcase $name))' -l echo '# (and $inherits (#/(^|,)a(,|$)/ (downcase $inherits)))' ${V} ${READTAGS} -t output.tags -Q '(and $inherits (#/(^|,)a(,|$)/ (downcase $inherits)))' -l echo '# (and $inherits (#/(^|,)b(,|$)/ (downcase $inherits)))' ${V} ${READTAGS} -t output.tags -Q '(and $inherits (#/(^|,)b(,|$)/ (downcase $inherits)))' -l echo '# (and $inherits (#/(^|,)d(,|$)/ (downcase $inherits)))' ${V} ${READTAGS} -t output.tags -Q '(and $inherits (#/(^|,)d(,|$)/ (downcase $inherits)))' -l echo '# (eq? "F" (upcase $name))' ${V} ${READTAGS} -t output.tags -Q '(eq? "F" (upcase $name))' -l echo '# (eq? "G" (upcase $name))' ${V} ${READTAGS} -t output.tags -Q '(eq? "G" (upcase $name))' -l echo '# (eq? "J" (upcase $name))' ${V} ${READTAGS} -t output.tags -Q '(eq? "J" (upcase $name))' -l ================================================ FILE: Tmain/readtags-qualifier-op-downcase-upcase.d/stdout-expected.txt ================================================ # (eq? "c" (downcase $name)) C input.cpp /^class C: A, B {$/ # (and $inherits (#/(^|,)a(,|$)/ (downcase $inherits))) C input.cpp /^class C: A, B {$/ # (and $inherits (#/(^|,)b(,|$)/ (downcase $inherits))) C input.cpp /^class C: A, B {$/ # (and $inherits (#/(^|,)d(,|$)/ (downcase $inherits))) # (eq? "F" (upcase $name)) f input.cpp /^ int f (void) {$/ # (eq? "G" (upcase $name)) g input.cpp /^ int g (void) {$/ # (eq? "J" (upcase $name)) ================================================ FILE: Tmain/readtags-qualifier-op-length.d/input.el ================================================ ;; ctags -o output.tags input.el (defun hi-zzz ()) (defun hi-aaa-some-long-thing ()) (defun hi-bbb-1 ()) (defun hi-y ()) (defun bye ()) (defun bye-long-long-long-long-lone ()) ================================================ FILE: Tmain/readtags-qualifier-op-length.d/output.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /58efa7d1/ bye input.el /^(defun bye ())$/;" f bye-long-long-long-long-lone input.el /^(defun bye-long-long-long-long-lone ())$/;" f hi-aaa-some-long-thing input.el /^(defun hi-aaa-some-long-thing ())$/;" f hi-bbb-1 input.el /^(defun hi-bbb-1 ())$/;" f hi-y input.el /^(defun hi-y ())$/;" f hi-zzz input.el /^(defun hi-zzz ())$/;" f ================================================ FILE: Tmain/readtags-qualifier-op-length.d/run.sh ================================================ #!/bin/sh # Copyright: 2020 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" echo '# (<> $name &name)' ${V} ${READTAGS} -t output.tags -S '(<> $name &name)' -p hi echo '# ( (<> (length $name) (length &name)) (<> $name &name))' ${V} ${READTAGS} -t output.tags -S '( (<> (length $name) (length &name)) (<> $name &name))' -p hi ================================================ FILE: Tmain/readtags-qualifier-op-length.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-qualifier-op-length.d/stdout-expected.txt ================================================ # (<> $name &name) hi-aaa-some-long-thing input.el /^(defun hi-aaa-some-long-thing ())$/ hi-bbb-1 input.el /^(defun hi-bbb-1 ())$/ hi-y input.el /^(defun hi-y ())$/ hi-zzz input.el /^(defun hi-zzz ())$/ # ( (<> (length $name) (length &name)) (<> $name &name)) hi-y input.el /^(defun hi-y ())$/ hi-zzz input.el /^(defun hi-zzz ())$/ hi-bbb-1 input.el /^(defun hi-bbb-1 ())$/ hi-aaa-some-long-thing input.el /^(defun hi-aaa-some-long-thing ())$/ ================================================ FILE: Tmain/readtags-qualifier-op-list.d/input.c ================================================ /* ctags --options=NONE --kinds-c='*' -o output.tags input.c */ extern int f (void); int g (int c) { return c; } int x; struct s { int i, j, k; }; ================================================ FILE: Tmain/readtags-qualifier-op-list.d/output.tags ================================================ !_TAG_EXTRA_DESCRIPTION anonymous /Include tags for non-named objects like lambda/ !_TAG_EXTRA_DESCRIPTION fileScope /Include tags of file scope/ !_TAG_EXTRA_DESCRIPTION pseudo /Include pseudo tags/ !_TAG_EXTRA_DESCRIPTION subparser /Include tags generated by subparsers/ !_TAG_FIELD_DESCRIPTION epoch /the last modified time of the input file (only for F\/file kind tag)/ !_TAG_FIELD_DESCRIPTION file /File-restricted scoping/ !_TAG_FIELD_DESCRIPTION input /input file/ !_TAG_FIELD_DESCRIPTION name /tag name/ !_TAG_FIELD_DESCRIPTION pattern /pattern/ !_TAG_FIELD_DESCRIPTION typeref /Type and name of a variable or typedef/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_KIND_DESCRIPTION!C D,macroparam /parameters inside macro definitions/ !_TAG_KIND_DESCRIPTION!C L,label /goto labels/ !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C h,header /included header files/ !_TAG_KIND_DESCRIPTION!C l,local /local variables/ !_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/ !_TAG_KIND_DESCRIPTION!C p,prototype /function prototypes/ !_TAG_KIND_DESCRIPTION!C s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C u,union /union names/ !_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/ !_TAG_KIND_DESCRIPTION!C x,externvar /external and forward variable declarations/ !_TAG_KIND_DESCRIPTION!C z,parameter /function parameters inside function or prototype definitions/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_VERSION 1.1 /current.age/ !_TAG_PARSER_VERSION!C 1.1 /current.age/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROC_CWD /home/yamato/var/ctags-github/Tmain/readtags-qualifier-op-list.d/ // !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 6.2.1 // !_TAG_ROLE_DESCRIPTION!C!function foreigndecl /declared in foreign languages/ !_TAG_ROLE_DESCRIPTION!C!header local /local header/ !_TAG_ROLE_DESCRIPTION!C!header system /system header/ !_TAG_ROLE_DESCRIPTION!C!macro undef /undefined/ !_TAG_ROLE_DESCRIPTION!C!struct foreigndecl /declared in foreign languages/ c input.c /^int g (int c)$/;" z function:g typeref:typename:int file: f input.c /^extern int f (void);$/;" p typeref:typename:int file: g input.c /^int g (int c)$/;" f typeref:typename:int i input.c /^ int i, j, k;$/;" m struct:s typeref:typename:int file: j input.c /^ int i, j, k;$/;" m struct:s typeref:typename:int file: k input.c /^ int i, j, k;$/;" m struct:s typeref:typename:int file: s input.c /^struct s {$/;" s file: x input.c /^int x;$/;" v typeref:typename:int ================================================ FILE: Tmain/readtags-qualifier-op-list.d/run.sh ================================================ #!/bin/sh # Copyright: 2026 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" qexpr='(not (member $kind (list "m" "z" "p" "f" "s")))' echo "-Q '${qexpr}'" ${V} ${READTAGS} -et output.tags \ -Q "$qexpr" \ -l echo $? qexpr='(member $kind (list "z" "p"))' echo "-Q '${qexpr}'" ${V} ${READTAGS} -et output.tags \ -Q "$qexpr" \ -l echo $? sexpr='( (if (and (member $kind (list "s" "v")) (member &kind (list "s" "v"))) (<> $name &name) 0) (<> &name $name))' echo "-S $sexpr" ${V} ${READTAGS} -et output.tags \ -S "$sexpr" \ -l echo $? ================================================ FILE: Tmain/readtags-qualifier-op-list.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-qualifier-op-list.d/stdout-expected.txt ================================================ -Q '(not (member $kind (list "m" "z" "p" "f" "s")))' x input.c /^int x;$/;" kind:v typeref:typename:int 0 -Q '(member $kind (list "z" "p"))' c input.c /^int g (int c)$/;" kind:z file: function:g typeref:typename:int f input.c /^extern int f (void);$/;" kind:p file: typeref:typename:int 0 -S ( (if (and (member $kind (list "s" "v")) (member &kind (list "s" "v"))) (<> $name &name) 0) (<> &name $name)) s input.c /^struct s {$/;" kind:s file: x input.c /^int x;$/;" kind:v typeref:typename:int k input.c /^ int i, j, k;$/;" kind:m file: struct:s typeref:typename:int j input.c /^ int i, j, k;$/;" kind:m file: struct:s typeref:typename:int i input.c /^ int i, j, k;$/;" kind:m file: struct:s typeref:typename:int g input.c /^int g (int c)$/;" kind:f typeref:typename:int f input.c /^extern int f (void);$/;" kind:p file: typeref:typename:int c input.c /^int g (int c)$/;" kind:z file: function:g typeref:typename:int 0 ================================================ FILE: Tmain/readtags-qualifier-op-regexp-quote.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/readtags-qualifier-op-regexp-quote.d/input.x ================================================ [{.*+]}^$()|?\ abc ================================================ FILE: Tmain/readtags-qualifier-op-regexp-quote.d/output.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROC_CWD /home/jet/var/ctags-new/Tmain/readtags-qualifier-op-regexp-quote.d/ // !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ [{.*+]}^$()|?\\ input.x /^[{.*+]}^$()|?\\$/;" a abc input.x /^abc$/;" a ================================================ FILE: Tmain/readtags-qualifier-op-regexp-quote.d/run.sh ================================================ #!/bin/sh # Copyright: 2021 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" ${V} ${READTAGS} -e -t output.tags \ -Q '(if (prefix? $name "a") #f ((string->regexp (string-append (regexp-quote $name) ".?")) $name))' \ -l ${V} ${READTAGS} -e -t output.tags \ -Q '(if (prefix? $name "a") #f ((string->regexp (string-append (regexp-quote "[{.*+]}^$()|?\\") ".?")) $name))' \ -l ================================================ FILE: Tmain/readtags-qualifier-op-regexp-quote.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-qualifier-op-regexp-quote.d/stdout-expected.txt ================================================ [{.*+]}^$()|?\ input.x /^[{.*+]}^$()|?\\$/;" kind:a [{.*+]}^$()|?\ input.x /^[{.*+]}^$()|?\\$/;" kind:a ================================================ FILE: Tmain/readtags-qualifier-op-regexp-quote.d/x.ctags ================================================ # u-ctags --options=x.ctags -o output.tags input.x --langdef=X --map-X=.x --languages=X --kinddef-X=a,anything,something anythings --regex-X=/^(.*)$/\1/a/ --pseudo-tags=-TAG_PROGRAM_VERSION ================================================ FILE: Tmain/readtags-qualifier-op-string-append.d/input.c ================================================ struct abpcx { int p; }; struct abpcy { int p; }; struct abpcz { int p; }; ================================================ FILE: Tmain/readtags-qualifier-op-string-append.d/output.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROC_CWD /home/jet/var/ctags-new/Tmain/readtags-qualifier-op-string-append.d/ // !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ aapcz input.c /^struct aapcz {$/;" struct line:9 file: abpcx input.c /^struct abpcx {$/;" struct line:1 file: abpcy input.c /^struct abpcy {$/;" struct line:5 file: p input.c /^ int p;$/;" member line:10 scope:struct:aapcz typeref:typename:int file: p input.c /^ int p;$/;" member line:2 scope:struct:abpcx typeref:typename:int file: p input.c /^ int p;$/;" member line:6 scope:struct:abpcy typeref:typename:int file: ================================================ FILE: Tmain/readtags-qualifier-op-string-append.d/run.sh ================================================ #!/bin/sh # Copyright: 2021 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" r() { echo ';; ' "$1" ${V} ${READTAGS} -e -t output.tags -Q "$1" -l } r '(eq? $scope-name (string-append "ab" $name "cy"))' r '(eq? $scope-name (concat "ab" "p" "cy"))' r '(eq? $scope-name (concat (concat "a" "b") $name (concat "c" "y")))' r '(eq? $scope-name (concat (concat "a" "b" $name) (concat "c" "y")))' r '(eq? $scope-name (concat (concat (concat "a" "b" $name) (concat "c" "y"))))' r '((string->regexp (concat (concat (concat "a" "b" $name) (concat "c" "y")))) (or $scope-name ""))' r '((string->regexp (concat (concat (concat "a" "b" "p") (concat "c" "y")))) (or $scope-name ""))' r '((printX (string->regexp (concat (concat (concat "a" "b" "p") (concat "c" "y"))))) (or $scope-name ""))' ================================================ FILE: Tmain/readtags-qualifier-op-string-append.d/stderr-expected.txt ================================================ #/abpcy/ ================================================ FILE: Tmain/readtags-qualifier-op-string-append.d/stdout-expected.txt ================================================ ;; (eq? $scope-name (string-append "ab" $name "cy")) p input.c /^ int p;$/;" kind:member file: scope:struct:abpcy typeref:typename:int ;; (eq? $scope-name (concat "ab" "p" "cy")) p input.c /^ int p;$/;" kind:member file: scope:struct:abpcy typeref:typename:int ;; (eq? $scope-name (concat (concat "a" "b") $name (concat "c" "y"))) p input.c /^ int p;$/;" kind:member file: scope:struct:abpcy typeref:typename:int ;; (eq? $scope-name (concat (concat "a" "b" $name) (concat "c" "y"))) p input.c /^ int p;$/;" kind:member file: scope:struct:abpcy typeref:typename:int ;; (eq? $scope-name (concat (concat (concat "a" "b" $name) (concat "c" "y")))) p input.c /^ int p;$/;" kind:member file: scope:struct:abpcy typeref:typename:int ;; ((string->regexp (concat (concat (concat "a" "b" $name) (concat "c" "y")))) (or $scope-name "")) p input.c /^ int p;$/;" kind:member file: scope:struct:abpcy typeref:typename:int ;; ((string->regexp (concat (concat (concat "a" "b" "p") (concat "c" "y")))) (or $scope-name "")) p input.c /^ int p;$/;" kind:member file: scope:struct:abpcy typeref:typename:int ;; ((printX (string->regexp (concat (concat (concat "a" "b" "p") (concat "c" "y"))))) (or $scope-name "")) p input.c /^ int p;$/;" kind:member file: scope:struct:abpcy typeref:typename:int ================================================ FILE: Tmain/readtags-qualifier-regex.d/input.hxx ================================================ /* * u-ctags --fields=S --kinds-C++=+p -o output.tags input.hxx */ int f ( int, int, int); int f (char, int, int); int f (char, char, int); int f (char, int, char); int f (char, char, char); int f ( int, char, int); int f ( int, char, char); int f ( int, int, char); typedef char CHAR; typedef int INT; int g ( INT, INT, INT); int g (CHAR, INT, INT); int g (CHAR, CHAR, INT); int g (CHAR, INT, CHAR); int g (CHAR, CHAR, CHAR); int g ( INT, CHAR, INT); int g ( INT, CHAR, CHAR); int g ( INT, INT, CHAR); ================================================ FILE: Tmain/readtags-qualifier-regex.d/output.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /e9d9780d/ CHAR input.hxx /^typedef char CHAR;$/ INT input.hxx /^typedef int INT;$/ f input.hxx /^int f ( int, int, int);$/;" signature:(int,int,int) f input.hxx /^int f ( int, int, char);$/;" signature:(int,int,char) f input.hxx /^int f ( int, char, int);$/;" signature:(int,char,int) f input.hxx /^int f ( int, char, char);$/;" signature:(int,char,char) f input.hxx /^int f (char, int, int);$/;" signature:(char,int,int) f input.hxx /^int f (char, int, char);$/;" signature:(char,int,char) f input.hxx /^int f (char, char, int);$/;" signature:(char,char,int) f input.hxx /^int f (char, char, char);$/;" signature:(char,char,char) g input.hxx /^int g ( INT, INT, INT);$/;" signature:(INT,INT,INT) g input.hxx /^int g ( INT, INT, CHAR);$/;" signature:(INT,INT,CHAR) g input.hxx /^int g ( INT, CHAR, INT);$/;" signature:(INT,CHAR,INT) g input.hxx /^int g ( INT, CHAR, CHAR);$/;" signature:(INT,CHAR,CHAR) g input.hxx /^int g (CHAR, INT, INT);$/;" signature:(CHAR,INT,INT) g input.hxx /^int g (CHAR, INT, CHAR);$/;" signature:(CHAR,INT,CHAR) g input.hxx /^int g (CHAR, CHAR, INT);$/;" signature:(CHAR,CHAR,INT) g input.hxx /^int g (CHAR, CHAR, CHAR);$/;" signature:(CHAR,CHAR,CHAR) ================================================ FILE: Tmain/readtags-qualifier-regex.d/run.sh ================================================ #!/bin/sh # Copyright: 2020 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" echo '# case sensitive' ${V} ${READTAGS} -t output.tags -Q '(and $signature (#/char,.*,char|int,.*,int/ $signature))' -en -l echo '# case insensitive: the pattern is lower case' ${V} ${READTAGS} -t output.tags -Q '(and $signature (#/char,.*,char|int,.*,int/i $signature))' -en -l echo '# case insensitive: the pattern is upper case' ${V} ${READTAGS} -t output.tags -Q '(and $signature (#/CHAR,.*,CHAR|INT,.*,INT/i $signature))' -en -l echo '# case sensitive (string->regexp)' ${V} ${READTAGS} -t output.tags -Q '(or #f #f (or #f (and $signature ((string->regexp "char,.*,char|int,.*,int") $signature)) #f) #f)' -en -l echo '# case sensitive (string->regexp :case-fold #f)' ${V} ${READTAGS} -t output.tags -Q '(or #f #f (or #f (and $signature ((string->regexp "char,.*,char|int,.*,int" :case-fold #f) $signature)) #f) #f)' -en -l echo '# case sensitive (string->regexp :case-fold false)' ${V} ${READTAGS} -t output.tags -Q '(or #f #f (or #f (and $signature ((string->regexp "char,.*,char|int,.*,int" :case-fold false) $signature)) #f) #f)' -en -l echo '# case insensitive: the pattern is lower case (string->regexp :case-fold #t)' ${V} ${READTAGS} -t output.tags -Q '(or #f #f (or #f (and $signature ((string->regexp "char,.*,char|int,.*,int" :case-fold #t) $signature)) #f) #f)' -en -l echo '# case insensitive: the pattern is upper case (string->regexp :case-fold true)' ${V} ${READTAGS} -t output.tags -Q '(or #f #f (or #f (and $signature ((string->regexp "CHAR,.*,CHAR|INT,.*,INT" :case-fold true) $signature)) #f) #f)' -en -l echo '# RAISING AN ERROR' 1>&2 ${V} ${READTAGS} -t output.tags -Q '(or #f #f (or #f (and $signature (#/[/ $signature)) #f) #f)' -en -l echo '# RAISING AN ERROR (string->regexp)' 1>&2 ${V} ${READTAGS} -t output.tags -Q '(or #f #f (or #f (and $signature ((string->regexp "[") $signature)) #f) #f)' -en -l ================================================ FILE: Tmain/readtags-qualifier-regex.d/stderr-expected.txt ================================================ # RAISING AN ERROR Failed to read the expression for filter: (or #f #f (or #f (and $signature (#/[/ $signature)) #f) #f) Reason: WRONG-REGEX-SYNTAX # RAISING AN ERROR (string->regexp) COMPILE ERROR: WRONG-REGEX-SYNTAX: () MEMORY EXHAUSTED or SYNTAX ERROR Failed to compile the expression of filter: (or #f #f (or #f (and $signature ((string->regexp "[") $signature)) #f) #f) ================================================ FILE: Tmain/readtags-qualifier-regex.d/stdout-expected.txt ================================================ # case sensitive f input.hxx /^int f ( int, int, int);$/;" signature:(int,int,int) f input.hxx /^int f ( int, char, int);$/;" signature:(int,char,int) f input.hxx /^int f (char, int, char);$/;" signature:(char,int,char) f input.hxx /^int f (char, char, char);$/;" signature:(char,char,char) # case insensitive: the pattern is lower case f input.hxx /^int f ( int, int, int);$/;" signature:(int,int,int) f input.hxx /^int f ( int, char, int);$/;" signature:(int,char,int) f input.hxx /^int f (char, int, char);$/;" signature:(char,int,char) f input.hxx /^int f (char, char, char);$/;" signature:(char,char,char) g input.hxx /^int g ( INT, INT, INT);$/;" signature:(INT,INT,INT) g input.hxx /^int g ( INT, CHAR, INT);$/;" signature:(INT,CHAR,INT) g input.hxx /^int g (CHAR, INT, CHAR);$/;" signature:(CHAR,INT,CHAR) g input.hxx /^int g (CHAR, CHAR, CHAR);$/;" signature:(CHAR,CHAR,CHAR) # case insensitive: the pattern is upper case f input.hxx /^int f ( int, int, int);$/;" signature:(int,int,int) f input.hxx /^int f ( int, char, int);$/;" signature:(int,char,int) f input.hxx /^int f (char, int, char);$/;" signature:(char,int,char) f input.hxx /^int f (char, char, char);$/;" signature:(char,char,char) g input.hxx /^int g ( INT, INT, INT);$/;" signature:(INT,INT,INT) g input.hxx /^int g ( INT, CHAR, INT);$/;" signature:(INT,CHAR,INT) g input.hxx /^int g (CHAR, INT, CHAR);$/;" signature:(CHAR,INT,CHAR) g input.hxx /^int g (CHAR, CHAR, CHAR);$/;" signature:(CHAR,CHAR,CHAR) # case sensitive (string->regexp) f input.hxx /^int f ( int, int, int);$/;" signature:(int,int,int) f input.hxx /^int f ( int, char, int);$/;" signature:(int,char,int) f input.hxx /^int f (char, int, char);$/;" signature:(char,int,char) f input.hxx /^int f (char, char, char);$/;" signature:(char,char,char) # case sensitive (string->regexp :case-fold #f) f input.hxx /^int f ( int, int, int);$/;" signature:(int,int,int) f input.hxx /^int f ( int, char, int);$/;" signature:(int,char,int) f input.hxx /^int f (char, int, char);$/;" signature:(char,int,char) f input.hxx /^int f (char, char, char);$/;" signature:(char,char,char) # case sensitive (string->regexp :case-fold false) f input.hxx /^int f ( int, int, int);$/;" signature:(int,int,int) f input.hxx /^int f ( int, char, int);$/;" signature:(int,char,int) f input.hxx /^int f (char, int, char);$/;" signature:(char,int,char) f input.hxx /^int f (char, char, char);$/;" signature:(char,char,char) # case insensitive: the pattern is lower case (string->regexp :case-fold #t) f input.hxx /^int f ( int, int, int);$/;" signature:(int,int,int) f input.hxx /^int f ( int, char, int);$/;" signature:(int,char,int) f input.hxx /^int f (char, int, char);$/;" signature:(char,int,char) f input.hxx /^int f (char, char, char);$/;" signature:(char,char,char) g input.hxx /^int g ( INT, INT, INT);$/;" signature:(INT,INT,INT) g input.hxx /^int g ( INT, CHAR, INT);$/;" signature:(INT,CHAR,INT) g input.hxx /^int g (CHAR, INT, CHAR);$/;" signature:(CHAR,INT,CHAR) g input.hxx /^int g (CHAR, CHAR, CHAR);$/;" signature:(CHAR,CHAR,CHAR) # case insensitive: the pattern is upper case (string->regexp :case-fold true) f input.hxx /^int f ( int, int, int);$/;" signature:(int,int,int) f input.hxx /^int f ( int, char, int);$/;" signature:(int,char,int) f input.hxx /^int f (char, int, char);$/;" signature:(char,int,char) f input.hxx /^int f (char, char, char);$/;" signature:(char,char,char) g input.hxx /^int g ( INT, INT, INT);$/;" signature:(INT,INT,INT) g input.hxx /^int g ( INT, CHAR, INT);$/;" signature:(INT,CHAR,INT) g input.hxx /^int g (CHAR, INT, CHAR);$/;" signature:(CHAR,INT,CHAR) g input.hxx /^int g (CHAR, CHAR, CHAR);$/;" signature:(CHAR,CHAR,CHAR) ================================================ FILE: Tmain/readtags-qualifier-sf-cond.d/input.c ================================================ typedef struct abc { int def; int ghi; } jkl; jkl mno; jkl pqr(void) { return (jkl){.def = 1, .ghi = 2}; } ================================================ FILE: Tmain/readtags-qualifier-sf-cond.d/output.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROC_CWD /home/jet/var/ctags-github/Tmain/readtags-qualifier-sf-cond.d/ // !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ abc input.c /^typedef struct abc {$/;" s file: def input.c /^ int def;$/;" m struct:abc typeref:typename:int file: ghi input.c /^ int ghi;$/;" m struct:abc typeref:typename:int file: jkl input.c /^} jkl;$/;" t typeref:struct:abc file: mno input.c /^jkl mno;$/;" v typeref:typename:jkl pqr input.c /^jkl pqr(void)$/;" f typeref:typename:jkl ================================================ FILE: Tmain/readtags-qualifier-sf-cond.d/run.sh ================================================ #!/bin/sh # Copyright: 2021 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" ${V} ${READTAGS} -e -t output.tags \ -Q '(cond ((eq? $kind "m") (#/.h./ $name)) ((eq? $kind "t")) ((#/.n./ $name) #f) (#t))' \ -l ================================================ FILE: Tmain/readtags-qualifier-sf-cond.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-qualifier-sf-cond.d/stdout-expected.txt ================================================ abc input.c /^typedef struct abc {$/;" kind:s file: ghi input.c /^ int ghi;$/;" kind:m file: struct:abc typeref:typename:int jkl input.c /^} jkl;$/;" kind:t file: typeref:struct:abc pqr input.c /^jkl pqr(void)$/;" kind:f typeref:typename:jkl ================================================ FILE: Tmain/readtags-qualifier.d/base.c ================================================ /* * ctags --fields='*' --kinds-C='*' -o c.tags base.c */ int main(int argc, char ** argv) { int r = argc + 1; return r; } ================================================ FILE: Tmain/readtags-qualifier.d/base.py ================================================ # # ./ctags --fields='*' --extras='*' -o output.tags base.py # class Foo: def aq (): pass def aw (): pass def ae (): pass class A: pass class Bar (Foo): def bq (): pass def bw (): pass class B: pass class Baz (Foo): def bq (): pass def bw (): pass class C: pass ================================================ FILE: Tmain/readtags-qualifier.d/c.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/;" extras:pseudo !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/;" extras:pseudo !_TAG_OUTPUT_FILESEP slash /slash or backslash/;" extras:pseudo !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/;" extras:pseudo !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/;" extras:pseudo !_TAG_PROGRAM_AUTHOR Universal Ctags Team //;" extras:pseudo !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/;" extras:pseudo !_TAG_PROGRAM_URL https://ctags.io/ /official site/;" extras:pseudo !_TAG_PROGRAM_VERSION 0.0.0 /158beae9/;" extras:pseudo argc base.c /^main(int argc, char ** argv)$/;" kind:parameter line:5 language:C scope:function:main typeref:typename:int file: roles:def extras:fileScope argv base.c /^main(int argc, char ** argv)$/;" kind:parameter line:5 language:C scope:function:main typeref:typename:char ** file: roles:def extras:fileScope main base.c /^main(int argc, char ** argv)$/;" kind:function line:5 language:C typeref:typename:int signature:(int argc,char ** argv) roles:def end:9 r base.c /^ int r = argc + 1;$/;" kind:local line:7 language:C scope:function:main typeref:typename:int file: roles:def extras:fileScope end:7 ================================================ FILE: Tmain/readtags-qualifier.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/readtags-qualifier.d/output.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /bbd8fc2/ A base.py /^ class A:$/;" kind:class line:11 language:Python scope:class:Foo inherits: access:public B base.py /^ class B:$/;" kind:class line:18 language:Python scope:class:Bar inherits: access:public Bar base.py /^class Bar (Foo):$/;" kind:class line:13 language:Python inherits:Foo access:public Bar.bq base.py /^ def bq ():$/;" kind:member line:14 language:Python scope:class:Bar access:public signature:() Bar.bw base.py /^ def bw ():$/;" kind:member line:16 language:Python scope:class:Bar access:public signature:() Baz base.py /^class Baz (Foo): $/;" kind:class line:21 language:Python inherits:Foo access:public Baz.bq base.py /^ def bq ():$/;" kind:member line:22 language:Python scope:class:Baz access:public signature:() Baz.bw base.py /^ def bw ():$/;" kind:member line:24 language:Python scope:class:Baz access:public signature:() C base.py /^ class C:$/;" kind:class line:26 language:Python scope:class:Baz inherits: access:public Foo base.py /^class Foo:$/;" kind:class line:4 language:Python inherits: access:public Foo.ae base.py /^ def ae ():$/;" kind:member line:9 language:Python scope:class:Foo access:public signature:() Foo.aq base.py /^ def aq ():$/;" kind:member line:5 language:Python scope:class:Foo access:public signature:() Foo.aw base.py /^ def aw ():$/;" kind:member line:7 language:Python scope:class:Foo access:public signature:() ae base.py /^ def ae ():$/;" kind:member line:9 language:Python scope:class:Foo access:public signature:() aq base.py /^ def aq ():$/;" kind:member line:5 language:Python scope:class:Foo access:public signature:() aw base.py /^ def aw ():$/;" kind:member line:7 language:Python scope:class:Foo access:public signature:() base.py base.py 28;" kind:file line:28 language:Python bq base.py /^ def bq ():$/;" kind:member line:14 language:Python scope:class:Bar access:public signature:() bq base.py /^ def bq ():$/;" kind:member line:22 language:Python scope:class:Baz access:public signature:() bw base.py /^ def bw ():$/;" kind:member line:16 language:Python scope:class:Bar access:public signature:() bw base.py /^ def bw ():$/;" kind:member line:24 language:Python scope:class:Baz access:public signature:() ================================================ FILE: Tmain/readtags-qualifier.d/roles.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /bbd8fc2/ Bar base.py /^class Bar (Foo):$/;" kind:class line:13 language:Python inherits:Foo access:public Baz base.py /^class Baz (Foo): $/;" kind:class line:21 language:Python inherits:Foo access:public Foo base.py /^class Bar (Foo):$/;" kind:class line:13 language:Python roles:superClass Foo base.py /^class Baz (Foo): $/;" kind:class line:21 language:Python roles:superClass ================================================ FILE: Tmain/readtags-qualifier.d/run.sh ================================================ #!/bin/sh # Copyright: 2016 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" echo ';; (suffix? $name "q")' && ${V} ${READTAGS} -e -t output.tags -Q '(suffix? $name "q")' -l && echo ';; (and (eq? $kind "member") (eq? "Baz" $scope-name))' && ${V} ${READTAGS} -e -t output.tags -Q '(and (eq? $kind "member") (eq? "Baz" $scope-name))' -l && echo ';; (and (eq? $kind "member") (substr? $name "."))' && ${V} ${READTAGS} -e -t output.tags -Q '(and (eq? $kind "member") (substr? $name "."))' -l && echo ';; (and $inherits (#/(^|,)Foo(,|$)/ $inherits) (eq? $kind "class"))' && ${V} ${READTAGS} -e -t output.tags -Q '(and $inherits (#/(^|,)Foo(,|$)/ $inherits) (eq? $kind "class"))' -l && echo ';; (not ($ "signature"))' && ${V} ${READTAGS} -e -t output.tags -Q '(not ($ "signature"))' -l && echo ';; (< 1 2)' && ${V} ${READTAGS} -e -t output.tags -Q '(< 1 2)' -l && echo ';; (and $roles (#/(^|,)superClass(,|$)/ $roles))' && ${V} ${READTAGS} -e -n -t roles.tags -Q '(and $roles (#/(^|,)superClass(,|$)/ $roles))' -l && echo ';; (substr? (or ($ "roles") "") "super")' && ${V} ${READTAGS} -e -t roles.tags -Q '(substr? (or ($ "roles") "") "super")' -l && echo ';; (and (eq? $scope-kind "function") (eq? $kind "local"))' && ${V} ${READTAGS} -e -t c.tags -Q '(and (eq? $scope-kind "function") (eq? $kind "local"))' -l && : ================================================ FILE: Tmain/readtags-qualifier.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-qualifier.d/stdout-expected.txt ================================================ ;; (suffix? $name "q") Bar.bq base.py /^ def bq ():$/;" kind:member language:Python scope:class:Bar access:public signature:() Baz.bq base.py /^ def bq ():$/;" kind:member language:Python scope:class:Baz access:public signature:() Foo.aq base.py /^ def aq ():$/;" kind:member language:Python scope:class:Foo access:public signature:() aq base.py /^ def aq ():$/;" kind:member language:Python scope:class:Foo access:public signature:() bq base.py /^ def bq ():$/;" kind:member language:Python scope:class:Bar access:public signature:() bq base.py /^ def bq ():$/;" kind:member language:Python scope:class:Baz access:public signature:() ;; (and (eq? $kind "member") (eq? "Baz" $scope-name)) Baz.bq base.py /^ def bq ():$/;" kind:member language:Python scope:class:Baz access:public signature:() Baz.bw base.py /^ def bw ():$/;" kind:member language:Python scope:class:Baz access:public signature:() bq base.py /^ def bq ():$/;" kind:member language:Python scope:class:Baz access:public signature:() bw base.py /^ def bw ():$/;" kind:member language:Python scope:class:Baz access:public signature:() ;; (and (eq? $kind "member") (substr? $name ".")) Bar.bq base.py /^ def bq ():$/;" kind:member language:Python scope:class:Bar access:public signature:() Bar.bw base.py /^ def bw ():$/;" kind:member language:Python scope:class:Bar access:public signature:() Baz.bq base.py /^ def bq ():$/;" kind:member language:Python scope:class:Baz access:public signature:() Baz.bw base.py /^ def bw ():$/;" kind:member language:Python scope:class:Baz access:public signature:() Foo.ae base.py /^ def ae ():$/;" kind:member language:Python scope:class:Foo access:public signature:() Foo.aq base.py /^ def aq ():$/;" kind:member language:Python scope:class:Foo access:public signature:() Foo.aw base.py /^ def aw ():$/;" kind:member language:Python scope:class:Foo access:public signature:() ;; (and $inherits (#/(^|,)Foo(,|$)/ $inherits) (eq? $kind "class")) Bar base.py /^class Bar (Foo):$/;" kind:class language:Python inherits:Foo access:public Baz base.py /^class Baz (Foo): $/;" kind:class language:Python inherits:Foo access:public ;; (not ($ "signature")) A base.py /^ class A:$/;" kind:class language:Python scope:class:Foo inherits: access:public B base.py /^ class B:$/;" kind:class language:Python scope:class:Bar inherits: access:public Bar base.py /^class Bar (Foo):$/;" kind:class language:Python inherits:Foo access:public Baz base.py /^class Baz (Foo): $/;" kind:class language:Python inherits:Foo access:public C base.py /^ class C:$/;" kind:class language:Python scope:class:Baz inherits: access:public Foo base.py /^class Foo:$/;" kind:class language:Python inherits: access:public base.py base.py 28;" kind:file language:Python ;; (< 1 2) A base.py /^ class A:$/;" kind:class language:Python scope:class:Foo inherits: access:public B base.py /^ class B:$/;" kind:class language:Python scope:class:Bar inherits: access:public Bar base.py /^class Bar (Foo):$/;" kind:class language:Python inherits:Foo access:public Bar.bq base.py /^ def bq ():$/;" kind:member language:Python scope:class:Bar access:public signature:() Bar.bw base.py /^ def bw ():$/;" kind:member language:Python scope:class:Bar access:public signature:() Baz base.py /^class Baz (Foo): $/;" kind:class language:Python inherits:Foo access:public Baz.bq base.py /^ def bq ():$/;" kind:member language:Python scope:class:Baz access:public signature:() Baz.bw base.py /^ def bw ():$/;" kind:member language:Python scope:class:Baz access:public signature:() C base.py /^ class C:$/;" kind:class language:Python scope:class:Baz inherits: access:public Foo base.py /^class Foo:$/;" kind:class language:Python inherits: access:public Foo.ae base.py /^ def ae ():$/;" kind:member language:Python scope:class:Foo access:public signature:() Foo.aq base.py /^ def aq ():$/;" kind:member language:Python scope:class:Foo access:public signature:() Foo.aw base.py /^ def aw ():$/;" kind:member language:Python scope:class:Foo access:public signature:() ae base.py /^ def ae ():$/;" kind:member language:Python scope:class:Foo access:public signature:() aq base.py /^ def aq ():$/;" kind:member language:Python scope:class:Foo access:public signature:() aw base.py /^ def aw ():$/;" kind:member language:Python scope:class:Foo access:public signature:() base.py base.py 28;" kind:file language:Python bq base.py /^ def bq ():$/;" kind:member language:Python scope:class:Bar access:public signature:() bq base.py /^ def bq ():$/;" kind:member language:Python scope:class:Baz access:public signature:() bw base.py /^ def bw ():$/;" kind:member language:Python scope:class:Bar access:public signature:() bw base.py /^ def bw ():$/;" kind:member language:Python scope:class:Baz access:public signature:() ;; (and $roles (#/(^|,)superClass(,|$)/ $roles)) Foo base.py /^class Bar (Foo):$/;" kind:class line:13 language:Python roles:superClass Foo base.py /^class Baz (Foo): $/;" kind:class line:21 language:Python roles:superClass ;; (substr? (or ($ "roles") "") "super") Foo base.py /^class Bar (Foo):$/;" kind:class language:Python roles:superClass Foo base.py /^class Baz (Foo): $/;" kind:class language:Python roles:superClass ;; (and (eq? $scope-kind "function") (eq? $kind "local")) r base.c /^ int r = argc + 1;$/;" kind:local file: language:C scope:function:main typeref:typename:int roles:def extras:fileScope end:7 ================================================ FILE: Tmain/readtags-simple-listing.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/readtags-simple-listing.d/input.c ================================================ /* u-ctags --sort=yes --fields=* -o output.tags input.c */ int var; strcut st { int m0; int m2; }; char c; typedef strcut st tst; ================================================ FILE: Tmain/readtags-simple-listing.d/run.sh ================================================ #!/bin/sh # Copyright: 2020 Masatake YAMATO # License: GPL-2 READTAGS=$3 #V="valgrind --leak-check=full --track-origins=yes -v" V= . ../utils.sh skip_if_no_readtags "$READTAGS" echo '# no -e option' && ${V} ${READTAGS} -t ./sorted.tags -l && echo '# with -e option' && ${V} ${READTAGS} -e -t ./sorted.tags -l && echo '# with -e -n option' && ${V} ${READTAGS} -e -n -t ./sorted.tags -l ================================================ FILE: Tmain/readtags-simple-listing.d/sorted.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/;" extras:pseudo !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/;" extras:pseudo !_TAG_OUTPUT_FILESEP slash /slash or backslash/;" extras:pseudo !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/;" extras:pseudo !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/;" extras:pseudo !_TAG_PROGRAM_AUTHOR Universal Ctags Team //;" extras:pseudo !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/;" extras:pseudo !_TAG_PROGRAM_URL https://ctags.io/ /official site/;" extras:pseudo !_TAG_PROGRAM_VERSION 0.0.0 /5cbc78e4/;" extras:pseudo c input.c /^char c;$/;" kind:variable line:7 language:C typeref:typename:char roles:def end:7 m0 input.c /^ int m0;$/;" kind:variable line:4 language:C typeref:typename:int roles:def end:4 m2 input.c /^ int m2;$/;" kind:variable line:5 language:C typeref:typename:int roles:def end:5 tst input.c /^typedef strcut st tst;$/;" kind:typedef line:8 language:C typeref:typename:strcut st file: roles:def extras:fileScope var input.c /^int var;$/;" kind:variable line:65535 language:C typeref:typename:int roles:def end:4294967295 ================================================ FILE: Tmain/readtags-simple-listing.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-simple-listing.d/stdout-expected.txt ================================================ # no -e option c input.c /^char c;$/ m0 input.c /^ int m0;$/ m2 input.c /^ int m2;$/ tst input.c /^typedef strcut st tst;$/ var input.c /^int var;$/ # with -e option c input.c /^char c;$/;" kind:variable language:C typeref:typename:char roles:def end:7 m0 input.c /^ int m0;$/;" kind:variable language:C typeref:typename:int roles:def end:4 m2 input.c /^ int m2;$/;" kind:variable language:C typeref:typename:int roles:def end:5 tst input.c /^typedef strcut st tst;$/;" kind:typedef file: language:C typeref:typename:strcut st roles:def extras:fileScope var input.c /^int var;$/;" kind:variable language:C typeref:typename:int roles:def end:4294967295 # with -e -n option c input.c /^char c;$/;" kind:variable line:7 language:C typeref:typename:char roles:def end:7 m0 input.c /^ int m0;$/;" kind:variable line:4 language:C typeref:typename:int roles:def end:4 m2 input.c /^ int m2;$/;" kind:variable line:5 language:C typeref:typename:int roles:def end:5 tst input.c /^typedef strcut st tst;$/;" kind:typedef file: line:8 language:C typeref:typename:strcut st roles:def extras:fileScope var input.c /^int var;$/;" kind:variable line:65535 language:C typeref:typename:int roles:def end:4294967295 ================================================ FILE: Tmain/readtags-sorter-cmp_or-sform.d/README.md ================================================ How to generate output.tags:: ctags --kinds-C=+p -o output.tags input.d/foo.c input.d/bar.c input.d/decl.h This is taken from https://github.com/universal-ctags/ctags/issues/4015#issuecomment-2157023359 ================================================ FILE: Tmain/readtags-sorter-cmp_or-sform.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/readtags-sorter-cmp_or-sform.d/input.d/bar.c ================================================ void bar(void); void bar(void) {} ================================================ FILE: Tmain/readtags-sorter-cmp_or-sform.d/input.d/decl.h ================================================ void foo(void); ================================================ FILE: Tmain/readtags-sorter-cmp_or-sform.d/input.d/foo.c ================================================ void foo(void) {} ================================================ FILE: Tmain/readtags-sorter-cmp_or-sform.d/output.tags ================================================ !_TAG_EXTRA_DESCRIPTION anonymous /Include tags for non-named objects like lambda/ !_TAG_EXTRA_DESCRIPTION fileScope /Include tags of file scope/ !_TAG_EXTRA_DESCRIPTION pseudo /Include pseudo tags/ !_TAG_EXTRA_DESCRIPTION subparser /Include tags generated by subparsers/ !_TAG_FIELD_DESCRIPTION epoch /the last modified time of the input file (only for F\/file kind tag)/ !_TAG_FIELD_DESCRIPTION file /File-restricted scoping/ !_TAG_FIELD_DESCRIPTION input /input file/ !_TAG_FIELD_DESCRIPTION name /tag name/ !_TAG_FIELD_DESCRIPTION pattern /pattern/ !_TAG_FIELD_DESCRIPTION typeref /Type and name of a variable or typedef/ !_TAG_FIELD_DESCRIPTION!C++ name /aliased names/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C h,header /included header files/ !_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/ !_TAG_KIND_DESCRIPTION!C p,prototype /function prototypes/ !_TAG_KIND_DESCRIPTION!C s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C u,union /union names/ !_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/ !_TAG_KIND_DESCRIPTION!C++ c,class /classes/ !_TAG_KIND_DESCRIPTION!C++ d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C++ e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C++ f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C++ g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C++ h,header /included header files/ !_TAG_KIND_DESCRIPTION!C++ m,member /class, struct, and union members/ !_TAG_KIND_DESCRIPTION!C++ n,namespace /namespaces/ !_TAG_KIND_DESCRIPTION!C++ p,prototype /function prototypes/ !_TAG_KIND_DESCRIPTION!C++ s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C++ t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C++ u,union /union names/ !_TAG_KIND_DESCRIPTION!C++ v,variable /variable definitions/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_VERSION 0.0 /current.age/ !_TAG_PARSER_VERSION!C 0.0 /current.age/ !_TAG_PARSER_VERSION!C++ 0.0 /current.age/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROC_CWD /home/yamato/var/ctags-github/Tmain/readtags-sorter-if3-sform.d/ // !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 6.0.0 // !_TAG_ROLE_DESCRIPTION!C!header local /local header/ !_TAG_ROLE_DESCRIPTION!C!header system /system header/ !_TAG_ROLE_DESCRIPTION!C!macro undef /undefined/ !_TAG_ROLE_DESCRIPTION!C++!header local /local header/ !_TAG_ROLE_DESCRIPTION!C++!header system /system header/ !_TAG_ROLE_DESCRIPTION!C++!macro undef /undefined/ bar input.d/bar.c /^void bar(void) {}$/;" f typeref:typename:void bar input.d/bar.c /^void bar(void);$/;" p typeref:typename:void file: foo input.d/decl.h /^void foo(void);$/;" p typeref:typename:void foo input.d/foo.c /^void foo(void) {}$/;" f typeref:typename:void ================================================ FILE: Tmain/readtags-sorter-cmp_or-sform.d/run.sh ================================================ #!/bin/sh # Copyright: 2024 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" ERRLOG=/tmp/ctags-Tmain-$$ ${READTAGS} -et output.tags -S ' ( (<> $name &name) (and (eq? $kind "p") (eq? &kind "f") 1) (and (eq? $kind "f") (eq? &kind "p") -1))' -l ================================================ FILE: Tmain/readtags-sorter-cmp_or-sform.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-sorter-cmp_or-sform.d/stdout-expected.txt ================================================ bar input.d/bar.c /^void bar(void) {}$/;" kind:f typeref:typename:void bar input.d/bar.c /^void bar(void);$/;" kind:p file: typeref:typename:void foo input.d/foo.c /^void foo(void) {}$/;" kind:f typeref:typename:void foo input.d/decl.h /^void foo(void);$/;" kind:p typeref:typename:void ================================================ FILE: Tmain/readtags-sorter-if-sform-order.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/readtags-sorter-if-sform-order.d/output.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /717028d4/ mutex input.c /^ int mutex;$/;" m language:C struct:MUTEX_S typeref:typename:int file: ================================================ FILE: Tmain/readtags-sorter-if-sform-order.d/run.sh ================================================ #!/bin/sh # Copyright: 2020 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" ${READTAGS} -t output.tags -ne -Q '(if $extras (print $extras) #f)' -l ================================================ FILE: Tmain/readtags-sorter-if-sform-order.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-sorter-if-sform-order.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/readtags-sorter-if-sform.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/readtags-sorter-if-sform.d/input.c ================================================ enum MUTEX_E { mutex_a, mutex_b, mutex }; #define mutex mutex int mutex; struct MUTEX_S { int mutex; }; typedef mutex int; ================================================ FILE: Tmain/readtags-sorter-if-sform.d/output.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /717028d4/ MUTEX_E input.c /^enum MUTEX_E { mutex_a, mutex_b, mutex };$/;" g language:C file: MUTEX_S input.c /^struct MUTEX_S {$/;" s language:C file: mutex input.c /^ int mutex;$/;" m language:C struct:MUTEX_S typeref:typename:int file: mutex input.c /^#define mutex /;" d language:C file: mutex input.c /^enum MUTEX_E { mutex_a, mutex_b, mutex };$/;" e language:C enum:MUTEX_E file: mutex input.c /^int mutex;$/;" v language:C typeref:typename:int mutex input.c /^typedef mutex int;$/;" t language:C typeref:typename:int file: mutex_a input.c /^enum MUTEX_E { mutex_a, mutex_b, mutex };$/;" e language:C enum:MUTEX_E file: mutex_b input.c /^enum MUTEX_E { mutex_a, mutex_b, mutex };$/;" e language:C enum:MUTEX_E file: ================================================ FILE: Tmain/readtags-sorter-if-sform.d/run.sh ================================================ #!/bin/sh # Copyright: 2020 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" ${READTAGS} -t output.tags -ne -S '(if (eq? $kind &kind) 0 (+ (if (or (eq? $kind "t")) -4 (if (eq? $kind "v") -3 (if (eq? $kind "d") -2 (if (eq? $kind "e") -1 0)))) (if (or (eq? &kind "t")) 4 (if (eq? &kind "v") 3 (if (eq? &kind "d") 2 (if (eq? &kind "e") 1 0))))))' mutex ================================================ FILE: Tmain/readtags-sorter-if-sform.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-sorter-if-sform.d/stdout-expected.txt ================================================ mutex input.c /^typedef mutex int;$/;" kind:t file: language:C typeref:typename:int mutex input.c /^int mutex;$/;" kind:v language:C typeref:typename:int mutex input.c /^#define mutex /;" kind:d file: language:C mutex input.c /^enum MUTEX_E { mutex_a, mutex_b, mutex };$/;" kind:e file: language:C enum:MUTEX_E mutex input.c /^ int mutex;$/;" kind:m file: language:C struct:MUTEX_S typeref:typename:int ================================================ FILE: Tmain/readtags-sorter.d/.ctags.d/0.ctags ================================================ --fields=* -L .ctags.d/src.list -o output.tags ================================================ FILE: Tmain/readtags-sorter.d/.ctags.d/src.list ================================================ src/input-area.cpp src/input-volume.cpp src/input.h ================================================ FILE: Tmain/readtags-sorter.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/readtags-sorter.d/output.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/;" extras:pseudo !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/;" extras:pseudo !_TAG_OUTPUT_FILESEP slash /slash or backslash/;" extras:pseudo !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/;" extras:pseudo !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/;" extras:pseudo !_TAG_PROGRAM_AUTHOR Universal Ctags Team //;" extras:pseudo !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/;" extras:pseudo !_TAG_PROGRAM_URL https://ctags.io/ /official site/;" extras:pseudo !_TAG_PROGRAM_VERSION 0.0.0 /77f9ac3f/;" extras:pseudo INPUT_DATA_H src/input.h /^#define INPUT_DATA_H$/;" kind:macro line:2 language:C++ roles:def end:2 area src/input-area.cpp /^float area (fpoint2d &p)$/;" kind:function line:8 language:C++ typeref:typename:float signature:(fpoint2d & p) roles:def end:11 area src/input-area.cpp /^float area (ipoint2d &p)$/;" kind:function line:3 language:C++ typeref:typename:float signature:(ipoint2d & p) roles:def end:6 fpoint2d src/input.h /^struct fpoint2d {$/;" kind:struct line:12 language:C++ roles:def end:14 fpoint3d src/input.h /^struct fpoint3d {$/;" kind:struct line:16 language:C++ roles:def end:19 ipoint2d src/input.h /^struct ipoint2d {$/;" kind:struct line:4 language:C++ roles:def end:6 ipoint3d src/input.h /^struct ipoint3d {$/;" kind:struct line:8 language:C++ roles:def end:10 parent src/input.h /^ fpoint2d parent;$/;" kind:member line:17 language:C++ scope:struct:fpoint3d typeref:typename:fpoint2d access:public roles:def end:17 volume src/input-volume.cpp /^float volume (fpoint3d *p)$/;" kind:function line:8 language:C++ typeref:typename:float signature:(fpoint3d * p) roles:def end:11 volume src/input-volume.cpp /^float volume (ipoint3d *p)$/;" kind:function line:3 language:C++ typeref:typename:float signature:(ipoint3d * p) roles:def end:6 x src/input.h /^ float x, y;$/;" kind:member line:13 language:C++ scope:struct:fpoint2d typeref:typename:float access:public roles:def end:13 x src/input.h /^ int x, y, z;$/;" kind:member line:9 language:C++ scope:struct:ipoint3d typeref:typename:int access:public roles:def end:9 x src/input.h /^ int x, y;$/;" kind:member line:5 language:C++ scope:struct:ipoint2d typeref:typename:int access:public roles:def end:5 y src/input.h /^ float x, y;$/;" kind:member line:13 language:C++ scope:struct:fpoint2d typeref:typename:float access:public roles:def end:13 y src/input.h /^ int x, y, z;$/;" kind:member line:9 language:C++ scope:struct:ipoint3d typeref:typename:int access:public roles:def end:9 y src/input.h /^ int x, y;$/;" kind:member line:5 language:C++ scope:struct:ipoint2d typeref:typename:int access:public roles:def end:5 z src/input.h /^ float z;$/;" kind:member line:18 language:C++ scope:struct:fpoint3d typeref:typename:float access:public roles:def end:18 z src/input.h /^ int x, y, z;$/;" kind:member line:9 language:C++ scope:struct:ipoint3d typeref:typename:int access:public roles:def end:9 ================================================ FILE: Tmain/readtags-sorter.d/run.sh ================================================ #!/bin/sh # Copyright: 2020 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" echo '!_INPUT_ORDER' && ${READTAGS} -t output.tags -ne -S '( (<> $input &input) (<> $line &line) (<> $name &name))' -l && echo '!_INPUT_ORDER with flipping' && ${READTAGS} -t output.tags -ne -S '(*- ( (<> $input &input) (<> $line &line) (<> $name &name)))' -l && echo '!_COMPARING_CODE_SIZE' && ${READTAGS} -t output.tags -ne -S '( (*- (<> (- (or $end $line) $line) (- (or &end &line) &line))) (<> $input &input) (<> $line &line) (<> $name &name))' -l echo '!_INPUT_ORDER of structure members (linear search)' && ${READTAGS} -t output.tags -ne -Q '(eq? $kind "member")' -S '( (<> $input &input) (<> $line &line) (<> $name &name))' -l ================================================ FILE: Tmain/readtags-sorter.d/src/input-area.cpp ================================================ #include "input.h" float area (ipoint2d &p) { return (float)(p.x * p.y); } float area (fpoint2d &p) { return p.x * p.y; } ================================================ FILE: Tmain/readtags-sorter.d/src/input-volume.cpp ================================================ #include "input.h" float volume (ipoint3d *p) { return (float)(p->x * p->y * p->z); } float volume (fpoint3d *p) { return area (p->parent) * p->z; } ================================================ FILE: Tmain/readtags-sorter.d/src/input.h ================================================ #ifndef INPUT_DATA_H #define INPUT_DATA_H struct ipoint2d { int x, y; }; struct ipoint3d { int x, y, z; }; struct fpoint2d { float x, y; }; struct fpoint3d { fpoint2d parent; float z; }; float area (ipoint2d &p); float area (fpoint2d &p); float volume (ipoint3d *p); float volume (fpoint3d *p); #endif ================================================ FILE: Tmain/readtags-sorter.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-sorter.d/stdout-expected.txt ================================================ !_INPUT_ORDER area src/input-area.cpp /^float area (ipoint2d &p)$/;" kind:function line:3 language:C++ typeref:typename:float signature:(ipoint2d & p) roles:def end:6 area src/input-area.cpp /^float area (fpoint2d &p)$/;" kind:function line:8 language:C++ typeref:typename:float signature:(fpoint2d & p) roles:def end:11 volume src/input-volume.cpp /^float volume (ipoint3d *p)$/;" kind:function line:3 language:C++ typeref:typename:float signature:(ipoint3d * p) roles:def end:6 volume src/input-volume.cpp /^float volume (fpoint3d *p)$/;" kind:function line:8 language:C++ typeref:typename:float signature:(fpoint3d * p) roles:def end:11 INPUT_DATA_H src/input.h /^#define INPUT_DATA_H$/;" kind:macro line:2 language:C++ roles:def end:2 ipoint2d src/input.h /^struct ipoint2d {$/;" kind:struct line:4 language:C++ roles:def end:6 x src/input.h /^ int x, y;$/;" kind:member line:5 language:C++ scope:struct:ipoint2d typeref:typename:int access:public roles:def end:5 y src/input.h /^ int x, y;$/;" kind:member line:5 language:C++ scope:struct:ipoint2d typeref:typename:int access:public roles:def end:5 ipoint3d src/input.h /^struct ipoint3d {$/;" kind:struct line:8 language:C++ roles:def end:10 x src/input.h /^ int x, y, z;$/;" kind:member line:9 language:C++ scope:struct:ipoint3d typeref:typename:int access:public roles:def end:9 y src/input.h /^ int x, y, z;$/;" kind:member line:9 language:C++ scope:struct:ipoint3d typeref:typename:int access:public roles:def end:9 z src/input.h /^ int x, y, z;$/;" kind:member line:9 language:C++ scope:struct:ipoint3d typeref:typename:int access:public roles:def end:9 fpoint2d src/input.h /^struct fpoint2d {$/;" kind:struct line:12 language:C++ roles:def end:14 x src/input.h /^ float x, y;$/;" kind:member line:13 language:C++ scope:struct:fpoint2d typeref:typename:float access:public roles:def end:13 y src/input.h /^ float x, y;$/;" kind:member line:13 language:C++ scope:struct:fpoint2d typeref:typename:float access:public roles:def end:13 fpoint3d src/input.h /^struct fpoint3d {$/;" kind:struct line:16 language:C++ roles:def end:19 parent src/input.h /^ fpoint2d parent;$/;" kind:member line:17 language:C++ scope:struct:fpoint3d typeref:typename:fpoint2d access:public roles:def end:17 z src/input.h /^ float z;$/;" kind:member line:18 language:C++ scope:struct:fpoint3d typeref:typename:float access:public roles:def end:18 !_INPUT_ORDER with flipping z src/input.h /^ float z;$/;" kind:member line:18 language:C++ scope:struct:fpoint3d typeref:typename:float access:public roles:def end:18 parent src/input.h /^ fpoint2d parent;$/;" kind:member line:17 language:C++ scope:struct:fpoint3d typeref:typename:fpoint2d access:public roles:def end:17 fpoint3d src/input.h /^struct fpoint3d {$/;" kind:struct line:16 language:C++ roles:def end:19 y src/input.h /^ float x, y;$/;" kind:member line:13 language:C++ scope:struct:fpoint2d typeref:typename:float access:public roles:def end:13 x src/input.h /^ float x, y;$/;" kind:member line:13 language:C++ scope:struct:fpoint2d typeref:typename:float access:public roles:def end:13 fpoint2d src/input.h /^struct fpoint2d {$/;" kind:struct line:12 language:C++ roles:def end:14 z src/input.h /^ int x, y, z;$/;" kind:member line:9 language:C++ scope:struct:ipoint3d typeref:typename:int access:public roles:def end:9 y src/input.h /^ int x, y, z;$/;" kind:member line:9 language:C++ scope:struct:ipoint3d typeref:typename:int access:public roles:def end:9 x src/input.h /^ int x, y, z;$/;" kind:member line:9 language:C++ scope:struct:ipoint3d typeref:typename:int access:public roles:def end:9 ipoint3d src/input.h /^struct ipoint3d {$/;" kind:struct line:8 language:C++ roles:def end:10 y src/input.h /^ int x, y;$/;" kind:member line:5 language:C++ scope:struct:ipoint2d typeref:typename:int access:public roles:def end:5 x src/input.h /^ int x, y;$/;" kind:member line:5 language:C++ scope:struct:ipoint2d typeref:typename:int access:public roles:def end:5 ipoint2d src/input.h /^struct ipoint2d {$/;" kind:struct line:4 language:C++ roles:def end:6 INPUT_DATA_H src/input.h /^#define INPUT_DATA_H$/;" kind:macro line:2 language:C++ roles:def end:2 volume src/input-volume.cpp /^float volume (fpoint3d *p)$/;" kind:function line:8 language:C++ typeref:typename:float signature:(fpoint3d * p) roles:def end:11 volume src/input-volume.cpp /^float volume (ipoint3d *p)$/;" kind:function line:3 language:C++ typeref:typename:float signature:(ipoint3d * p) roles:def end:6 area src/input-area.cpp /^float area (fpoint2d &p)$/;" kind:function line:8 language:C++ typeref:typename:float signature:(fpoint2d & p) roles:def end:11 area src/input-area.cpp /^float area (ipoint2d &p)$/;" kind:function line:3 language:C++ typeref:typename:float signature:(ipoint2d & p) roles:def end:6 !_COMPARING_CODE_SIZE area src/input-area.cpp /^float area (ipoint2d &p)$/;" kind:function line:3 language:C++ typeref:typename:float signature:(ipoint2d & p) roles:def end:6 area src/input-area.cpp /^float area (fpoint2d &p)$/;" kind:function line:8 language:C++ typeref:typename:float signature:(fpoint2d & p) roles:def end:11 volume src/input-volume.cpp /^float volume (ipoint3d *p)$/;" kind:function line:3 language:C++ typeref:typename:float signature:(ipoint3d * p) roles:def end:6 volume src/input-volume.cpp /^float volume (fpoint3d *p)$/;" kind:function line:8 language:C++ typeref:typename:float signature:(fpoint3d * p) roles:def end:11 fpoint3d src/input.h /^struct fpoint3d {$/;" kind:struct line:16 language:C++ roles:def end:19 ipoint2d src/input.h /^struct ipoint2d {$/;" kind:struct line:4 language:C++ roles:def end:6 ipoint3d src/input.h /^struct ipoint3d {$/;" kind:struct line:8 language:C++ roles:def end:10 fpoint2d src/input.h /^struct fpoint2d {$/;" kind:struct line:12 language:C++ roles:def end:14 INPUT_DATA_H src/input.h /^#define INPUT_DATA_H$/;" kind:macro line:2 language:C++ roles:def end:2 x src/input.h /^ int x, y;$/;" kind:member line:5 language:C++ scope:struct:ipoint2d typeref:typename:int access:public roles:def end:5 y src/input.h /^ int x, y;$/;" kind:member line:5 language:C++ scope:struct:ipoint2d typeref:typename:int access:public roles:def end:5 x src/input.h /^ int x, y, z;$/;" kind:member line:9 language:C++ scope:struct:ipoint3d typeref:typename:int access:public roles:def end:9 y src/input.h /^ int x, y, z;$/;" kind:member line:9 language:C++ scope:struct:ipoint3d typeref:typename:int access:public roles:def end:9 z src/input.h /^ int x, y, z;$/;" kind:member line:9 language:C++ scope:struct:ipoint3d typeref:typename:int access:public roles:def end:9 x src/input.h /^ float x, y;$/;" kind:member line:13 language:C++ scope:struct:fpoint2d typeref:typename:float access:public roles:def end:13 y src/input.h /^ float x, y;$/;" kind:member line:13 language:C++ scope:struct:fpoint2d typeref:typename:float access:public roles:def end:13 parent src/input.h /^ fpoint2d parent;$/;" kind:member line:17 language:C++ scope:struct:fpoint3d typeref:typename:fpoint2d access:public roles:def end:17 z src/input.h /^ float z;$/;" kind:member line:18 language:C++ scope:struct:fpoint3d typeref:typename:float access:public roles:def end:18 !_INPUT_ORDER of structure members (linear search) x src/input.h /^ int x, y;$/;" kind:member line:5 language:C++ scope:struct:ipoint2d typeref:typename:int access:public roles:def end:5 y src/input.h /^ int x, y;$/;" kind:member line:5 language:C++ scope:struct:ipoint2d typeref:typename:int access:public roles:def end:5 x src/input.h /^ int x, y, z;$/;" kind:member line:9 language:C++ scope:struct:ipoint3d typeref:typename:int access:public roles:def end:9 y src/input.h /^ int x, y, z;$/;" kind:member line:9 language:C++ scope:struct:ipoint3d typeref:typename:int access:public roles:def end:9 z src/input.h /^ int x, y, z;$/;" kind:member line:9 language:C++ scope:struct:ipoint3d typeref:typename:int access:public roles:def end:9 x src/input.h /^ float x, y;$/;" kind:member line:13 language:C++ scope:struct:fpoint2d typeref:typename:float access:public roles:def end:13 y src/input.h /^ float x, y;$/;" kind:member line:13 language:C++ scope:struct:fpoint2d typeref:typename:float access:public roles:def end:13 parent src/input.h /^ fpoint2d parent;$/;" kind:member line:17 language:C++ scope:struct:fpoint3d typeref:typename:fpoint2d access:public roles:def end:17 z src/input.h /^ float z;$/;" kind:member line:18 language:C++ scope:struct:fpoint3d typeref:typename:float access:public roles:def end:18 ================================================ FILE: Tmain/readtags-stdin.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/readtags-stdin.d/output.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /bbd8fc2/ A base.py /^ class A:$/;" kind:class line:11 language:Python scope:class:Foo inherits: access:public B base.py /^ class B:$/;" kind:class line:18 language:Python scope:class:Bar inherits: access:public Bar base.py /^class Bar (Foo):$/;" kind:class line:13 language:Python inherits:Foo access:public Bar.bq base.py /^ def bq ():$/;" kind:member line:14 language:Python scope:class:Bar access:public signature:() Bar.bw base.py /^ def bw ():$/;" kind:member line:16 language:Python scope:class:Bar access:public signature:() Baz base.py /^class Baz (Foo): $/;" kind:class line:21 language:Python inherits:Foo access:public Baz.bq base.py /^ def bq ():$/;" kind:member line:22 language:Python scope:class:Baz access:public signature:() Baz.bw base.py /^ def bw ():$/;" kind:member line:24 language:Python scope:class:Baz access:public signature:() C base.py /^ class C:$/;" kind:class line:26 language:Python scope:class:Baz inherits: access:public Foo base.py /^class Foo:$/;" kind:class line:4 language:Python inherits: access:public Foo.ae base.py /^ def ae ():$/;" kind:member line:9 language:Python scope:class:Foo access:public signature:() Foo.aq base.py /^ def aq ():$/;" kind:member line:5 language:Python scope:class:Foo access:public signature:() Foo.aw base.py /^ def aw ():$/;" kind:member line:7 language:Python scope:class:Foo access:public signature:() ae base.py /^ def ae ():$/;" kind:member line:9 language:Python scope:class:Foo access:public signature:() aq base.py /^ def aq ():$/;" kind:member line:5 language:Python scope:class:Foo access:public signature:() aw base.py /^ def aw ():$/;" kind:member line:7 language:Python scope:class:Foo access:public signature:() base.py base.py 28;" kind:file line:28 language:Python bq base.py /^ def bq ():$/;" kind:member line:14 language:Python scope:class:Bar access:public signature:() bq base.py /^ def bq ():$/;" kind:member line:22 language:Python scope:class:Baz access:public signature:() bw base.py /^ def bw ():$/;" kind:member line:16 language:Python scope:class:Bar access:public signature:() bw base.py /^ def bw ():$/;" kind:member line:24 language:Python scope:class:Baz access:public signature:() ================================================ FILE: Tmain/readtags-stdin.d/run.sh ================================================ #!/bin/sh # Copyright: 2021 Masatake YAMATO # License: GPL-2 READTAGS=$3 . ../utils.sh #V="valgrind --leak-check=full -v" V= skip_if_no_readtags "$READTAGS" "${READTAGS}" -t output.tags -en -D -l \ | "${READTAGS}" -t - -en -Q '(eq? $signature "()")' -D -l \ | "${READTAGS}" -t - -en -Q '(and $line (< $line 10))' -D -l \ | "${READTAGS}" -t - -en -Q '(substr? $name ".a")' -D -l \ | "${READTAGS}" -t - -en -S '(<> $line &line)' -D -l ================================================ FILE: Tmain/readtags-stdin.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-stdin.d/stdout-expected.txt ================================================ Foo.aq base.py /^ def aq ():$/;" kind:member line:5 language:Python scope:class:Foo access:public signature:() Foo.aw base.py /^ def aw ():$/;" kind:member line:7 language:Python scope:class:Foo access:public signature:() Foo.ae base.py /^ def ae ():$/;" kind:member line:9 language:Python scope:class:Foo access:public signature:() ================================================ FILE: Tmain/readtags-with-list-pseudo-tags.d/ptag-sort-no.tags ================================================ !_JSON_OUTPUT_VERSION 0.0 /in development/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /9b73623f/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C h,header /included header files/ !_TAG_KIND_DESCRIPTION!C l,local /local variables/ !_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/ !_TAG_KIND_DESCRIPTION!C p,prototype /function prototypes/ !_TAG_KIND_DESCRIPTION!C s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C u,union /union names/ !_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/ !_TAG_KIND_DESCRIPTION!C x,externvar /external and forward variable declarations/ !_TAG_KIND_DESCRIPTION!C z,parameter /function parameters inside function definitions/ !_TAG_KIND_DESCRIPTION!C L,label /goto labels/ !_TAG_KIND_DESCRIPTION!C D,macroparam /parameters inside macro definitions/ main input.c /^int main (void) { return 0; }$/;" f typeref:typename:int !_TAG_KIND_DESCRIPTION!EmacsLisp u,unknown /unknown type of definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp f,function /functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp v,variable /variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp c,const /constants/ !_TAG_KIND_DESCRIPTION!EmacsLisp m,macro /macros/ !_TAG_KIND_DESCRIPTION!EmacsLisp a,alias /aliases for functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp V,varalias /aliases for variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp s,subst /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp i,inline /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp e,error /errors/ !_TAG_KIND_DESCRIPTION!EmacsLisp M,minorMode /minor modes/ !_TAG_KIND_DESCRIPTION!EmacsLisp D,derivedMode /derived major mode/ !_TAG_KIND_DESCRIPTION!EmacsLisp C,custom /customizable variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp G,group /customization groups/ !_TAG_KIND_DESCRIPTION!EmacsLisp H,face /customizable faces/ !_TAG_KIND_DESCRIPTION!EmacsLisp T,theme /custom themes/ afunc input.el /^(defun afunc () nil)$/;" f ================================================ FILE: Tmain/readtags-with-list-pseudo-tags.d/ptag-sort-yes.tags ================================================ !_JSON_OUTPUT_VERSION 0.0 /in development/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_KIND_DESCRIPTION!C D,macroparam /parameters inside macro definitions/ !_TAG_KIND_DESCRIPTION!C L,label /goto labels/ !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C h,header /included header files/ !_TAG_KIND_DESCRIPTION!C l,local /local variables/ !_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/ !_TAG_KIND_DESCRIPTION!C p,prototype /function prototypes/ !_TAG_KIND_DESCRIPTION!C s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C u,union /union names/ !_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/ !_TAG_KIND_DESCRIPTION!C x,externvar /external and forward variable declarations/ !_TAG_KIND_DESCRIPTION!C z,parameter /function parameters inside function definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp C,custom /customizable variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp D,derivedMode /derived major mode/ !_TAG_KIND_DESCRIPTION!EmacsLisp G,group /customization groups/ !_TAG_KIND_DESCRIPTION!EmacsLisp H,face /customizable faces/ !_TAG_KIND_DESCRIPTION!EmacsLisp M,minorMode /minor modes/ !_TAG_KIND_DESCRIPTION!EmacsLisp T,theme /custom themes/ !_TAG_KIND_DESCRIPTION!EmacsLisp V,varalias /aliases for variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp a,alias /aliases for functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp c,const /constants/ !_TAG_KIND_DESCRIPTION!EmacsLisp e,error /errors/ !_TAG_KIND_DESCRIPTION!EmacsLisp f,function /functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp i,inline /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp m,macro /macros/ !_TAG_KIND_DESCRIPTION!EmacsLisp s,subst /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp u,unknown /unknown type of definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp v,variable /variables/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /9b73623f/ afunc input.el /^(defun afunc () nil)$/;" f main input.c /^int main (void) { return 0; }$/;" f typeref:typename:int ================================================ FILE: Tmain/readtags-with-list-pseudo-tags.d/run.sh ================================================ #!/bin/sh # Copyright: 2023 Masatake YAMATO # License: GPL-2 READTAGS=$3 #V="valgrind --leak-check=full --track-origins=yes -v" V= . ../utils.sh skip_if_no_readtags "$READTAGS" echo '# ACTION=LIST' ${V} ${READTAGS} -t ./ptag-sort-no.tags -P -l echo '# ACTION=NAME' ${V} ${READTAGS} -t ./ptag-sort-yes.tags --with-pseudo-tags - main ================================================ FILE: Tmain/readtags-with-list-pseudo-tags.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/readtags-with-list-pseudo-tags.d/stdout-expected.txt ================================================ # ACTION=LIST !_JSON_OUTPUT_VERSION 0.0 /in development/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /9b73623f/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C h,header /included header files/ !_TAG_KIND_DESCRIPTION!C l,local /local variables/ !_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/ !_TAG_KIND_DESCRIPTION!C p,prototype /function prototypes/ !_TAG_KIND_DESCRIPTION!C s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C u,union /union names/ !_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/ !_TAG_KIND_DESCRIPTION!C x,externvar /external and forward variable declarations/ !_TAG_KIND_DESCRIPTION!C z,parameter /function parameters inside function definitions/ !_TAG_KIND_DESCRIPTION!C L,label /goto labels/ !_TAG_KIND_DESCRIPTION!C D,macroparam /parameters inside macro definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp u,unknown /unknown type of definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp f,function /functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp v,variable /variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp c,const /constants/ !_TAG_KIND_DESCRIPTION!EmacsLisp m,macro /macros/ !_TAG_KIND_DESCRIPTION!EmacsLisp a,alias /aliases for functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp V,varalias /aliases for variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp s,subst /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp i,inline /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp e,error /errors/ !_TAG_KIND_DESCRIPTION!EmacsLisp M,minorMode /minor modes/ !_TAG_KIND_DESCRIPTION!EmacsLisp D,derivedMode /derived major mode/ !_TAG_KIND_DESCRIPTION!EmacsLisp C,custom /customizable variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp G,group /customization groups/ !_TAG_KIND_DESCRIPTION!EmacsLisp H,face /customizable faces/ !_TAG_KIND_DESCRIPTION!EmacsLisp T,theme /custom themes/ main input.c /^int main (void) { return 0; }$/ !_TAG_KIND_DESCRIPTION!EmacsLisp u,unknown /unknown type of definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp f,function /functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp v,variable /variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp c,const /constants/ !_TAG_KIND_DESCRIPTION!EmacsLisp m,macro /macros/ !_TAG_KIND_DESCRIPTION!EmacsLisp a,alias /aliases for functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp V,varalias /aliases for variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp s,subst /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp i,inline /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp e,error /errors/ !_TAG_KIND_DESCRIPTION!EmacsLisp M,minorMode /minor modes/ !_TAG_KIND_DESCRIPTION!EmacsLisp D,derivedMode /derived major mode/ !_TAG_KIND_DESCRIPTION!EmacsLisp C,custom /customizable variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp G,group /customization groups/ !_TAG_KIND_DESCRIPTION!EmacsLisp H,face /customizable faces/ !_TAG_KIND_DESCRIPTION!EmacsLisp T,theme /custom themes/ afunc input.el /^(defun afunc () nil)$/ # ACTION=NAME !_JSON_OUTPUT_VERSION 0.0 /in development/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_KIND_DESCRIPTION!C D,macroparam /parameters inside macro definitions/ !_TAG_KIND_DESCRIPTION!C L,label /goto labels/ !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C f,function /function definitions/ !_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C h,header /included header files/ !_TAG_KIND_DESCRIPTION!C l,local /local variables/ !_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/ !_TAG_KIND_DESCRIPTION!C p,prototype /function prototypes/ !_TAG_KIND_DESCRIPTION!C s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/ !_TAG_KIND_DESCRIPTION!C u,union /union names/ !_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/ !_TAG_KIND_DESCRIPTION!C x,externvar /external and forward variable declarations/ !_TAG_KIND_DESCRIPTION!C z,parameter /function parameters inside function definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp C,custom /customizable variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp D,derivedMode /derived major mode/ !_TAG_KIND_DESCRIPTION!EmacsLisp G,group /customization groups/ !_TAG_KIND_DESCRIPTION!EmacsLisp H,face /customizable faces/ !_TAG_KIND_DESCRIPTION!EmacsLisp M,minorMode /minor modes/ !_TAG_KIND_DESCRIPTION!EmacsLisp T,theme /custom themes/ !_TAG_KIND_DESCRIPTION!EmacsLisp V,varalias /aliases for variables/ !_TAG_KIND_DESCRIPTION!EmacsLisp a,alias /aliases for functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp c,const /constants/ !_TAG_KIND_DESCRIPTION!EmacsLisp e,error /errors/ !_TAG_KIND_DESCRIPTION!EmacsLisp f,function /functions/ !_TAG_KIND_DESCRIPTION!EmacsLisp i,inline /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp m,macro /macros/ !_TAG_KIND_DESCRIPTION!EmacsLisp s,subst /inline function/ !_TAG_KIND_DESCRIPTION!EmacsLisp u,unknown /unknown type of definitions/ !_TAG_KIND_DESCRIPTION!EmacsLisp v,variable /variables/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /9b73623f/ main input.c /^int main (void) { return 0; }$/ ================================================ FILE: Tmain/regex-for-unknown-language.d/exit-expected.txt ================================================ 1 ================================================ FILE: Tmain/regex-for-unknown-language.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --regex-nosuchlang=/a/ exit $? ================================================ FILE: Tmain/regex-for-unknown-language.d/stderr-expected.txt ================================================ ctags: Unknown language "nosuchlang" in "regex-nosuchlang" option ================================================ FILE: Tmain/regex-for-unknown-language.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/regex-patterns-from-file.d/input.c ================================================ DEFINE(x,1); REGISTER(y); ================================================ FILE: Tmain/regex-patterns-from-file.d/list.regex ================================================ /DEFINE\(([a-z]),.*/\1/t/ /REGISTER\(([a-z])\)/\1/t/ ================================================ FILE: Tmain/regex-patterns-from-file.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE \ --langdef=TEST'{base=C}' \ --kinddef-TEST=t,test,tests \ --regex-TEST=@./list.regex \ -o - \ input.c ================================================ FILE: Tmain/regex-patterns-from-file.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/regex-patterns-from-file.d/stdout-expected.txt ================================================ x input.c /^DEFINE(x,1);$/;" t y input.c /^REGISTER(y);$/;" t ================================================ FILE: Tmain/reset-fields.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/reset-fields.d/input.h ================================================ struct point { double x, y }; ================================================ FILE: Tmain/reset-fields.d/run.sh ================================================ # Copyright: 2022 Masatake YAMATO # License: GPL-2 CTAGS=$1 run_ctags() { printf "# 1:%s 2:%s\n" "$1" "$2" ${CTAGS} --quiet --options=NONE \ $1 \ -n \ --fields=zKZStse --fields=+a \ -o - \ $2 \ input.h } run_ctags && run_ctags --output-format=u-ctags "" && run_ctags --output-format=etags "" && run_ctags --output-format=xref "" && run_ctags "" --output-format=u-ctags && run_ctags "" --output-format=etags && run_ctags "" --output-format=xref && : ================================================ FILE: Tmain/reset-fields.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/reset-fields.d/stdout-expected.txt ================================================ # 1: 2: point input.h 1;" kind:struct end:1 # 1:--output-format=u-ctags 2: point input.h 1;" kind:struct end:1 # 1:--output-format=etags 2: input.h,40 struct point { double x, y };point1,0 # 1:--output-format=xref 2: point struct 1 input.h struct point { double x, y }; # 1: 2:--output-format=u-ctags point input.h 1;" kind:struct end:1 # 1: 2:--output-format=etags input.h,40 struct point { double x, y };point1,0 # 1: 2:--output-format=xref point struct 1 input.h struct point { double x, y }; ================================================ FILE: Tmain/roledef.d/run.sh ================================================ # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS="$1 --quiet --options=NONE --langdef=IMAGINARY --kinddef-IMAGINARY=v,variable,variables" export MSYS2_ARG_CONV_EXCL=--_roledef-IMAGINARY title() { echo echo "$@" { echo echo "$@" } 1>&2 } { title '# echo unknown lang' ${CTAGS} --_roledef-NOSUCHLANG ${CTAGS} --_roledef-NOSUCHLANG.k=role,roles ${CTAGS} --_roledef-NOSUCHLANG.'{kind}'=role,roles title '# no kind spec' ${CTAGS} --_roledef-IMAGINARY ${CTAGS} --_roledef-IMAGINARY= ${CTAGS} --_roledef-IMAGINARY=role ${CTAGS} --_roledef-IMAGINARY=role,roles title '# echo unknown kind letter' ${CTAGS} --_roledef-IMAGINARY.x= --_force-quit ${CTAGS} --_roledef-IMAGINARY.x=role --_force-quit ${CTAGS} --_roledef-IMAGINARY.x=role, --_force-quit ${CTAGS} --_roledef-IMAGINARY.x=role,roles --_force-quit title '# echo unknown kind name' ${CTAGS} --_roledef-IMAGINARY.'{abc}'= --_force-quit ${CTAGS} --_roledef-IMAGINARY.'{abc}'=role --_force-quit ${CTAGS} --_roledef-IMAGINARY.'{abc}'=role, --_force-quit ${CTAGS} --_roledef-IMAGINARY.'{abc}'=role,roles --_force-quit title '# wrong char in a kind letter' ${CTAGS} --_roledef-IMAGINARY.'/'= ${CTAGS} --_roledef-IMAGINARY.'%'= ${CTAGS} --_roledef-IMAGINARY.'^'=role ${CTAGS} --_roledef-IMAGINARY.'#'=role,roles ${CTAGS} --_roledef-IMAGINARY.'F'=role,roles ${CTAGS} --_roledef-IMAGINARY.'{'=role,roles ${CTAGS} --_roledef-IMAGINARY.'{v'=role,roles title '# wrong kind name' ${CTAGS} --_roledef-IMAGINARY.'{file}'=role,roles ${CTAGS} --_roledef-IMAGINARY.'{}'=role,roles ${CTAGS} --_roledef-IMAGINARY.'{#}'=role,roles title '# empty role name' ${CTAGS} --_roledef-IMAGINARY.v= ${CTAGS} --_roledef-IMAGINARY.v=, ${CTAGS} --_roledef-IMAGINARY.v=,desc ${CTAGS} --_roledef-IMAGINARY.'{variable}'= ${CTAGS} --_roledef-IMAGINARY.'{variable}'=, ${CTAGS} --_roledef-IMAGINARY.'{variable}'=,desc title '# wrong char in role name' ${CTAGS} --_roledef-IMAGINARY.v=+role+, ${CTAGS} --_roledef-IMAGINARY.'{variable}'=+role+, title '# empty description' ${CTAGS} --_roledef-IMAGINARY.v=role ${CTAGS} --_roledef-IMAGINARY.v=role, ${CTAGS} --_roledef-IMAGINARY.'{variable}'=role ${CTAGS} --_roledef-IMAGINARY.'{variable}'=role, title '# role is acceptable but no input file' ${CTAGS} --_roledef-IMAGINARY.v=role,roles ${CTAGS} --_roledef-IMAGINARY.'{variable}'=role,roles title '# listing with --list-roles' ${CTAGS} --_roledef-IMAGINARY.v=role,roles --list-roles=IMAGINARY ${CTAGS} --_roledef-IMAGINARY.'{variable}'=role,roles \ --_roledef-IMAGINARY.v=foos,foods \ --list-roles=IMAGINARY title '# listing with --list-kinds-full' ${CTAGS} --_roledef-IMAGINARY.v=role,roles --list-kinds-full=IMAGINARY ${CTAGS} --_roledef-IMAGINARY.'{variable}'=role,roles \ --_roledef-IMAGINARY.v=foos,foods \ --list-kinds-full=IMAGINARY title '# inject a flag separator' ${CTAGS} --_roledef-IMAGINARY.v='role,roles{foo}' --list-roles=IMAGINARY ${CTAGS} --_roledef-IMAGINARY.'{variable}'='role,roles{foo}' --list-roles=IMAGINARY title '# inject a broken flag separator(1)' ${CTAGS} --_roledef-IMAGINARY.v='role,roles{foo' --list-roles=IMAGINARY ${CTAGS} --_roledef-IMAGINARY.'{variable}'='role,roles{foo' --list-roles=IMAGINARY title '# inject a broken flag separator(2)' ${CTAGS} --_roledef-IMAGINARY.v='role,roles{' --list-roles=IMAGINARY ${CTAGS} --_roledef-IMAGINARY.'{variable}'='role,roles{' --list-roles=IMAGINARY title '# use a { in description (1)' ${CTAGS} --_roledef-IMAGINARY.v='role,roles\{' --list-roles=IMAGINARY ${CTAGS} --_roledef-IMAGINARY.'{variable}'='role,roles\{' --list-roles=IMAGINARY title '# use a { in description (2)' ${CTAGS} --_roledef-IMAGINARY.v='role,roles\{}' --list-roles=IMAGINARY ${CTAGS} --_roledef-IMAGINARY.'{variable}'='role,roles\{}' --list-roles=IMAGINARY title '# use a \ in description' ${CTAGS} --_roledef-IMAGINARY.v='role,roles\\backslash' --list-roles=IMAGINARY ${CTAGS} --_roledef-IMAGINARY.'{variable}'='role,roles\\backslash' --list-roles=IMAGINARY title '# description started from {' ${CTAGS} --_roledef-IMAGINARY.v='role,{' --list-roles=IMAGINARY ${CTAGS} --_roledef-IMAGINARY.'{variable}'='role,{' --list-roles=IMAGINARY title '# description started from \{' ${CTAGS} --_roledef-IMAGINARY.v='role,\{' --list-roles=IMAGINARY ${CTAGS} --_roledef-IMAGINARY.'{variable}'='role,\{' --list-roles=IMAGINARY title '# too many roles' opts= for i in $(seq 0 64); do opts="$opts --_roledef-IMAGINARY.v=r$i,desc$i " done ${CTAGS} $opts } > /tmp/ctags-tmain-$$.stdout 2>/tmp/ctags-tmain-$$.stderr sed -e 's/\.exe//g' < /tmp/ctags-tmain-$$.stdout rm /tmp/ctags-tmain-$$.stdout sed -e 's/\.exe//g' < /tmp/ctags-tmain-$$.stderr 1>&2 rm /tmp/ctags-tmain-$$.stderr ================================================ FILE: Tmain/roledef.d/stderr-expected.txt ================================================ # echo unknown lang ctags: Unknown language "NOSUCHLANG" in "_roledef-NOSUCHLANG" option ctags: Unknown language "NOSUCHLANG" in "_roledef-NOSUCHLANG.k" option ctags: Unknown language "NOSUCHLANG" in "_roledef-NOSUCHLANG.{kind}" option # no kind spec ctags: no kind is specifined in "--_roledef-IMAGINARY=" ctags: no kind is specifined in "--_roledef-IMAGINARY=" ctags: no kind is specifined in "--_roledef-IMAGINARY=role" ctags: no kind is specifined in "--_roledef-IMAGINARY=role,roles" # echo unknown kind letter ctags: the kind for letter `x' specified in "--_roledef-IMAGINARY.x" option is not defined. ctags: the kind for letter `x' specified in "--_roledef-IMAGINARY.x" option is not defined. ctags: the kind for letter `x' specified in "--_roledef-IMAGINARY.x" option is not defined. ctags: the kind for letter `x' specified in "--_roledef-IMAGINARY.x" option is not defined. # echo unknown kind name ctags: the kind for name `abc' specified in "--_roledef-IMAGINARY.{abc}" option is not defined. ctags: the kind for name `abc' specified in "--_roledef-IMAGINARY.{abc}" option is not defined. ctags: the kind for name `abc' specified in "--_roledef-IMAGINARY.{abc}" option is not defined. ctags: the kind for name `abc' specified in "--_roledef-IMAGINARY.{abc}" option is not defined. # wrong char in a kind letter ctags: the kind letter given in "--_roledef-IMAGINARY./" option is not an alphabet or a number ctags: the kind letter given in "--_roledef-IMAGINARY.%" option is not an alphabet or a number ctags: the kind letter given in "--_roledef-IMAGINARY.^" option is not an alphabet or a number ctags: the kind letter given in "--_roledef-IMAGINARY.#" option is not an alphabet or a number ctags: the kind letter `F' in "--_roledef-IMAGINARY.F" option is reserved for "file" kind, and no role can be attached to it ctags: no '}' representing the end of kind name in --_roledef-IMAGINARY.{ option: { ctags: no '}' representing the end of kind name in --_roledef-IMAGINARY.{v option: {v # wrong kind name ctags: don't define a role for F/file kind; it has no role: --_roledef-IMAGINARY.{file} ctags: the kind for name `' specified in "--_roledef-IMAGINARY.{}" option is not defined. ctags: the kind for name `#' specified in "--_roledef-IMAGINARY.{#}" option is not defined. # empty role name ctags: no role description specified in "--_roledef-IMAGINARY.v" option ctags: the role name in "--_roledef-IMAGINARY.v" option is empty ctags: the role name in "--_roledef-IMAGINARY.v" option is empty ctags: no role description specified in "--_roledef-IMAGINARY.{variable}" option ctags: the role name in "--_roledef-IMAGINARY.{variable}" option is empty ctags: the role name in "--_roledef-IMAGINARY.{variable}" option is empty # wrong char in role name ctags: unacceptable char as part of role name in "--_roledef-IMAGINARY.v" option: '+' ctags: unacceptable char as part of role name in "--_roledef-IMAGINARY.{variable}" option: '+' # empty description ctags: no role description specified in "--_roledef-IMAGINARY.v" option ctags: found an empty role description in "--_roledef-IMAGINARY.v" option ctags: no role description specified in "--_roledef-IMAGINARY.{variable}" option ctags: found an empty role description in "--_roledef-IMAGINARY.{variable}" option # role is acceptable but no input file ctags: No files specified. Try "ctags --help". ctags: No files specified. Try "ctags --help". # listing with --list-roles # listing with --list-kinds-full # inject a flag separator # inject a broken flag separator(1) ctags: Warning: long flags specifier opened with `{' is not closed `}': "{foo" ctags: Warning: long flags specifier opened with `{' is not closed `}': "{foo" # inject a broken flag separator(2) ctags: Warning: long flags specifier opened with `{' is not closed `}': "{" ctags: Warning: long flags specifier opened with `{' is not closed `}': "{" # use a { in description (1) # use a { in description (2) # use a \ in description # description started from { ctags: found an empty role description in "--_roledef-IMAGINARY.v" option ctags: found an empty role description in "--_roledef-IMAGINARY.{variable}" option # description started from \{ # too many roles ctags: Too many role definition for kind "variable" of language "IMAGINARY" (> 63) ================================================ FILE: Tmain/roledef.d/stdout-expected.txt ================================================ # echo unknown lang # no kind spec # echo unknown kind letter # echo unknown kind name # wrong char in a kind letter # wrong kind name # empty role name # wrong char in role name # empty description # role is acceptable but no input file # listing with --list-roles #KIND(L/N) NAME ENABLED VER DESCRIPTION v/variable role on 0 roles #KIND(L/N) NAME ENABLED VER DESCRIPTION v/variable foos on 0 foods v/variable role on 0 roles # listing with --list-kinds-full #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION v variable yes no 1 NONE 0 variables #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION v variable yes no 2 NONE 0 variables # inject a flag separator #KIND(L/N) NAME ENABLED VER DESCRIPTION v/variable role on 0 roles #KIND(L/N) NAME ENABLED VER DESCRIPTION v/variable role on 0 roles # inject a broken flag separator(1) #KIND(L/N) NAME ENABLED VER DESCRIPTION v/variable role on 0 roles #KIND(L/N) NAME ENABLED VER DESCRIPTION v/variable role on 0 roles # inject a broken flag separator(2) #KIND(L/N) NAME ENABLED VER DESCRIPTION v/variable role on 0 roles #KIND(L/N) NAME ENABLED VER DESCRIPTION v/variable role on 0 roles # use a { in description (1) #KIND(L/N) NAME ENABLED VER DESCRIPTION v/variable role on 0 roles{ #KIND(L/N) NAME ENABLED VER DESCRIPTION v/variable role on 0 roles{ # use a { in description (2) #KIND(L/N) NAME ENABLED VER DESCRIPTION v/variable role on 0 roles{} #KIND(L/N) NAME ENABLED VER DESCRIPTION v/variable role on 0 roles{} # use a \ in description #KIND(L/N) NAME ENABLED VER DESCRIPTION v/variable role on 0 roles\backslash #KIND(L/N) NAME ENABLED VER DESCRIPTION v/variable role on 0 roles\backslash # description started from { # description started from \{ #KIND(L/N) NAME ENABLED VER DESCRIPTION v/variable role on 0 { #KIND(L/N) NAME ENABLED VER DESCRIPTION v/variable role on 0 { # too many roles ================================================ FILE: Tmain/roles-field-optscript.d/foo.ctags ================================================ --extras=+r --fields=+r --langdef=foo --map-foo=+.foo --kinddef-foo=v,var,variables --_roledef-foo.v=lval,left side value --_roledef-foo.v=inc,incremeted --_roledef-foo.v=dec,decremented --regex-foo=/([a-z]) *=/\1/v/{_role=lval}{{ \1 . :roles pstack clear }} --regex-foo=/([a-z])\+\+/\1/v/{_role=inc}{{ \1 . :roles pstack clear }} --regex-foo=/([a-z])\-\-/\1/v/{_role=dec}{{ \1 . :roles pstack clear }} --regex-foo=/def +([a-z])/\1/v/{{ \1 . :roles pstack clear }} ================================================ FILE: Tmain/roles-field-optscript.d/input.foo ================================================ def a a++ a-- a=3 ================================================ FILE: Tmain/roles-field-optscript.d/run.sh ================================================ # Copyright: 2021 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --options=foo.ctags -o - input.foo | grep -v '^a' ================================================ FILE: Tmain/roles-field-optscript.d/stderr-expected.txt ================================================ [/def] (a) [/inc] (a) [/dec] (a) [/lval] (a) ================================================ FILE: Tmain/roles-field-optscript.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/ruby-scope-loop-oom.d/README ================================================ This is initially a crash test. The crash (OOM killer) was reported in #3306 by @ivanbrennan. a.rb and b.rb were taken from the issue. ================================================ FILE: Tmain/ruby-scope-loop-oom.d/a.rb ================================================ RSpec.describe "A" do describe "a" do it "hangs" do { for: nil } { for: nil } end end end ================================================ FILE: Tmain/ruby-scope-loop-oom.d/b.rb ================================================ RSpec.describe "B" do end ================================================ FILE: Tmain/ruby-scope-loop-oom.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/ruby-scope-loop-oom.d/run.sh ================================================ #!/bin/sh # Copyright: 2022 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh if ! type timeout > /dev/null 2>&1; then skip "timeout command is not available" fi timeout 5s ${CTAGS} --quiet --options=NONE --fields=+e -o - a.rb b.rb exit $? ================================================ FILE: Tmain/ruby-scope-loop-oom.d/stdout-expected.txt ================================================ A a.rb /^RSpec.describe "A" do$/;" d end:12 B b.rb /^RSpec.describe "B" do$/;" d end:2 a a.rb /^ describe "a" do$/;" d describe:A end:11 hangs a.rb /^ it "hangs" do$/;" i describe:A.a end:10 ================================================ FILE: Tmain/run-as-etags.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/run-as-etags.d/run.sh ================================================ # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS=$1 BUILDDIR=$2 . ../utils.sh # on "Environment: compiler=msvc, ARCH=x64", we got following error: # # C:/projects/ctags/Tmain/run-as-etags.d/etags.exe: # error while loading shared libraries: # iconv.dll: cannot open shared object file: No such file or directory exit_if_win32 "$CTAGS" etags=$BUILDDIR/etags cp $1 $etags $etags --quiet --options=NONE --_force-quit r=$? rm $etags exit $r ================================================ FILE: Tmain/run-as-etags.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/sandbox-crash.d/exit-expected.txt ================================================ 159 ================================================ FILE: Tmain/sandbox-crash.d/run.sh ================================================ #!/bin/sh # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh is_feature_available $CTAGS debug is_feature_available $CTAGS sandbox is_feature_available ${CTAGS} interactive is_feature_available ${CTAGS} '!' gcov { echo '{"command":"generate-tags", "filename":"input.ctst", "size": 1}' echo 'P' } | $CTAGS --quiet --options=NONE --language-force=CTagsSelfTest --_interactive=sandbox > /tmp/ctags-Tmain-$$ r=$? jdropver < /tmp/ctags-Tmain-$$ rm /tmp/ctags-Tmain-$$ exit $r ================================================ FILE: Tmain/sandbox-crash.d/stdout-expected.txt ================================================ {"_type": "program", "name": "Universal Ctags"} ================================================ FILE: Tmain/sandbox-default-req.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/sandbox-default-req.d/input.c ================================================ int main(void) { return 0; } ================================================ FILE: Tmain/sandbox-default-req.d/run.sh ================================================ #!/bin/sh # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh is_feature_available $CTAGS sandbox is_feature_available ${CTAGS} interactive is_feature_available ${CTAGS} '!' gcov { echo '{"command":"generate-tags", "filename":"input.c", "size": -1}' echo '{"command":"generate-tags", "filename":"input.el", "size": 16}' echo '(defun foo () 0)' } | $CTAGS --quiet --options=NONE --_interactive=sandbox > /tmp/ctags-Tmain-$$ r=$? jdropver < /tmp/ctags-Tmain-$$ rm /tmp/ctags-Tmain-$$ exit $r ================================================ FILE: Tmain/sandbox-default-req.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/sandbox-default-req.d/stdout-expected.txt ================================================ {"_type": "program", "name": "Universal Ctags"} {"_type": "error", "message": "invalid request in sandbox submode: reading file contents from a file is limited", "fatal": true} {"_type": "tag", "name": "foo", "path": "input.el", "pattern": "/^(defun foo () 0)/", "kind": "function"} {"_type": "completed", "command": "generate-tags"} ================================================ FILE: Tmain/sandbox-no-eager-guessing.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/sandbox-no-eager-guessing.d/run.sh ================================================ #!/bin/sh # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh is_feature_available $CTAGS sandbox is_feature_available ${CTAGS} interactive is_feature_available ${CTAGS} '!' gcov { echo '{"command":"generate-tags", "filename":"input.unknown", "size": 44}' echo '/* -*- c -*- */ int main(void) { return 0; }' } | $CTAGS --quiet --options=NONE --_interactive=sandbox > /tmp/ctags-Tmain-$$ r=$? jdropver < /tmp/ctags-Tmain-$$ rm /tmp/ctags-Tmain-$$ exit $r ================================================ FILE: Tmain/sandbox-no-eager-guessing.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/sandbox-no-eager-guessing.d/stdout-expected.txt ================================================ {"_type": "program", "name": "Universal Ctags"} {"_type": "completed", "command": "generate-tags"} ================================================ FILE: Tmain/sandbox-unknown-submode.d/exit-expected.txt ================================================ 1 ================================================ FILE: Tmain/sandbox-unknown-submode.d/run.sh ================================================ #!/bin/sh # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh is_feature_available $CTAGS sandbox is_feature_available ${CTAGS} interactive is_feature_available ${CTAGS} '!' gcov { echo '{"command":"generate-tags", "filename":"input.c", "size": 28}' echo 'int main(void) { return 0; }' } | $CTAGS --quiet --options=NONE --_interactive=unknown exit $? ================================================ FILE: Tmain/sandbox-unknown-submode.d/stderr-expected.txt ================================================ ctags: Unknown option argument "unknown" for --_interactive option ================================================ FILE: Tmain/sandbox-unknown-submode.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/sandbox-with-eager-guessing.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/sandbox-with-eager-guessing.d/run.sh ================================================ #!/bin/sh # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh is_feature_available $CTAGS sandbox is_feature_available ${CTAGS} interactive is_feature_available ${CTAGS} '!' gcov { echo '{"command":"generate-tags", "filename":"input.unknown", "size": 44}' echo '/* -*- c -*- */ int main(void) { return 0; }' } | $CTAGS --quiet --options=NONE -G --_interactive=sandbox > /tmp/ctags-Tmain-$$ r=$? jdropver < /tmp/ctags-Tmain-$$ rm /tmp/ctags-Tmain-$$ exit $r ================================================ FILE: Tmain/sandbox-with-eager-guessing.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/sandbox-with-eager-guessing.d/stdout-expected.txt ================================================ {"_type": "program", "name": "Universal Ctags"} {"_type": "tag", "name": "main", "path": "input.unknown", "pattern": "/^\\/* -*- c -*- *\\/ int main(void) { return 0; }/", "typeref": "typename:int", "kind": "function"} {"_type": "completed", "command": "generate-tags"} ================================================ FILE: Tmain/sandbox.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/sandbox.d/run.sh ================================================ #!/bin/sh # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh is_feature_available $CTAGS sandbox is_feature_available ${CTAGS} interactive is_feature_available ${CTAGS} '!' gcov { echo '{"command":"generate-tags", "filename":"input.c", "size": 28}' echo 'int main(void) { return 0; }' } | $CTAGS --quiet --options=NONE --_interactive=sandbox > /tmp/ctags-Tmain-$$ r=$? jdropver < /tmp/ctags-Tmain-$$ rm /tmp/ctags-Tmain-$$ exit $r ================================================ FILE: Tmain/sandbox.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/sandbox.d/stdout-expected.txt ================================================ {"_type": "program", "name": "Universal Ctags"} {"_type": "tag", "name": "main", "path": "input.c", "pattern": "/^int main(void) { return 0; }/", "typeref": "typename:int", "kind": "function"} {"_type": "completed", "command": "generate-tags"} ================================================ FILE: Tmain/scopesep.d/input.tcl ================================================ namespace eval M { namespace eval N { proc p0 {s} { } } } proc p1 {s} { } ================================================ FILE: Tmain/scopesep.d/run.sh ================================================ # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS=$1 echo "# root sep and wildcard" ${CTAGS} --quiet --options=NONE \ -o - \ --sort=no \ --extras=+q \ --_scopesep-Tcl='/*:/' \ --_scopesep-Tcl='*/*:+' \ input.tcl echo "# override wildcard" ${CTAGS} --quiet --options=NONE \ -o - \ --sort=no \ --extras=+q \ --_scopesep-Tcl='/*:/' \ --_scopesep-Tcl='*/*:+' \ --_scopesep-Tcl='n/n:->' \ --_scopesep-Tcl='n/p:^' \ input.tcl echo "# override rootsep" ${CTAGS} --quiet --options=NONE \ -o - \ --sort=no \ --extras=+q \ --_scopesep-Tcl='/*:/' \ --_scopesep-Tcl='*/*:+' \ --_scopesep-Tcl='/n:@' \ --_scopesep-Tcl='/p:%' \ input.tcl echo "# no default" ${CTAGS} --quiet --options=NONE \ -o - \ --sort=no \ --extras=+q \ --_scopesep-Tcl='n/n:->' \ --_scopesep-Tcl='n/p:^' \ --_scopesep-Tcl='/n:@' \ --_scopesep-Tcl='/p:%' \ input.tcl ================================================ FILE: Tmain/scopesep.d/stdout-expected.txt ================================================ # root sep and wildcard M input.tcl /^namespace eval M {$/;" n /M input.tcl /^namespace eval M {$/;" n N input.tcl /^ namespace eval N {$/;" n namespace:/M /M+N input.tcl /^ namespace eval N {$/;" n namespace:/M p0 input.tcl /^ proc p0 {s} {$/;" p namespace:/M+N /M+N+p0 input.tcl /^ proc p0 {s} {$/;" p namespace:/M+N p1 input.tcl /^proc p1 {s} {$/;" p /p1 input.tcl /^proc p1 {s} {$/;" p # override wildcard M input.tcl /^namespace eval M {$/;" n /M input.tcl /^namespace eval M {$/;" n N input.tcl /^ namespace eval N {$/;" n namespace:/M /M->N input.tcl /^ namespace eval N {$/;" n namespace:/M p0 input.tcl /^ proc p0 {s} {$/;" p namespace:/M->N /M->N^p0 input.tcl /^ proc p0 {s} {$/;" p namespace:/M->N p1 input.tcl /^proc p1 {s} {$/;" p /p1 input.tcl /^proc p1 {s} {$/;" p # override rootsep M input.tcl /^namespace eval M {$/;" n @M input.tcl /^namespace eval M {$/;" n N input.tcl /^ namespace eval N {$/;" n namespace:@M @M+N input.tcl /^ namespace eval N {$/;" n namespace:@M p0 input.tcl /^ proc p0 {s} {$/;" p namespace:@M+N @M+N+p0 input.tcl /^ proc p0 {s} {$/;" p namespace:@M+N p1 input.tcl /^proc p1 {s} {$/;" p %p1 input.tcl /^proc p1 {s} {$/;" p # no default M input.tcl /^namespace eval M {$/;" n @M input.tcl /^namespace eval M {$/;" n N input.tcl /^ namespace eval N {$/;" n namespace:@M @M->N input.tcl /^ namespace eval N {$/;" n namespace:@M p0 input.tcl /^ proc p0 {s} {$/;" p namespace:@M->N @M->N^p0 input.tcl /^ proc p0 {s} {$/;" p namespace:@M->N p1 input.tcl /^proc p1 {s} {$/;" p %p1 input.tcl /^proc p1 {s} {$/;" p ================================================ FILE: Tmain/selector-dont-select-disabled-lang.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/selector-dont-select-disabled-lang.d/input.h ================================================ @interface Ctags @end struct s { int i; }; ================================================ FILE: Tmain/selector-dont-select-disabled-lang.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --languages=-ObjectiveC --print-language input.h ================================================ FILE: Tmain/selector-dont-select-disabled-lang.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/selector-dont-select-disabled-lang.d/stdout-expected.txt ================================================ input.h: C++ ================================================ FILE: Tmain/selector-select-C-for-dot-h.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/selector-select-C-for-dot-h.d/input.h ================================================ #define a(x) (1+(x))) ================================================ FILE: Tmain/selector-select-C-for-dot-h.d/run.sh ================================================ # Copyright: 2023 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh echo --map-C++=-.h --map-C=+.h && \ ${CTAGS} --quiet --options=NONE \ --map-C++=-.h --map-C=+.h \ --fields=+'{language}{signature}' \ --fields-C=+'{macrodef}' \ --kinds-C=d -o - input.h && echo --map-C=+.h && \ ${CTAGS} --quiet --options=NONE \ --map-C=+.h \ --fields=+'{language}{signature}' \ --fields-C=+'{macrodef}' \ --kinds-C=d -o - input.h && echo --map-C=-.h && \ ${CTAGS} --quiet --options=NONE \ --map-C++=-.h \ --fields=+'{language}{signature}' \ --fields-C=+'{macrodef}' \ --kinds-C=d -o - input.h && echo --map-ObjectiveC=-.h && \ ${CTAGS} --quiet --options=NONE \ --map-ObjectiveC=-.h \ --fields=+'{language}{signature}' \ --fields-C=+'{macrodef}' \ --kinds-C=d -o - input.h && echo --map-ObjectiveC=-.h --map-C=-.h && \ ${CTAGS} --quiet --options=NONE \ --map-ObjectiveC=-.h --map-C=-.h \ --fields=+'{language}{signature}' \ --fields-C=+'{macrodef}' \ --kinds-C=d -o - input.h && \ echo --map-ObjectiveC=-.h --map-C++=-.h && \ ${CTAGS} --quiet --options=NONE \ --map-ObjectiveC=-.h --map-C++=-.h \ --fields=+'{language}{signature}' \ --fields-C=+'{macrodef}' \ --kinds-C=d -o - input.h && echo --map-C++=-.h --map-C=+.h --languages=-ObjectiveC && \ ${CTAGS} --quiet --options=NONE \ --map-C++=-.h --map-C=+.h --languages=-ObjectiveC \ --fields=+'{language}{signature}' \ --fields-C=+'{macrodef}' \ --kinds-C=d -o - input.h && echo --map-C++=-.h --map-C=+.h --languages=-C++ && \ ${CTAGS} --quiet --options=NONE \ --map-C++=-.h --map-C=+.h --languages=-C++ \ --fields=+'{language}{signature}' \ --fields-C=+'{macrodef}' \ --kinds-C=d -o - input.h && echo --map-C++=-.h --map-C=+.h --languages=-C && \ ${CTAGS} --quiet --options=NONE \ --map-C++=-.h --map-C=+.h --languages=-C \ --fields=+'{language}{signature}' \ --fields-C=+'{macrodef}' \ --kinds-C=d -o - input.h && : ================================================ FILE: Tmain/selector-select-C-for-dot-h.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/selector-select-C-for-dot-h.d/stdout-expected.txt ================================================ --map-C++=-.h --map-C=+.h a input.h /^#define a(/;" d language:C signature:(x) macrodef:(1+(x))) --map-C=+.h a input.h /^#define a(/;" d language:C signature:(x) macrodef:(1+(x))) --map-C=-.h a input.h /^#define a(x) (1+(x)))$/;" M language:ObjectiveC --map-ObjectiveC=-.h a input.h /^#define a(/;" d language:C++ signature:(x) --map-ObjectiveC=-.h --map-C=-.h a input.h /^#define a(/;" d language:C++ signature:(x) --map-ObjectiveC=-.h --map-C++=-.h --map-C++=-.h --map-C=+.h --languages=-ObjectiveC a input.h /^#define a(/;" d language:C signature:(x) macrodef:(1+(x))) --map-C++=-.h --map-C=+.h --languages=-C++ a input.h /^#define a(/;" d language:C signature:(x) macrodef:(1+(x))) --map-C++=-.h --map-C=+.h --languages=-C a input.h /^#define a(x) (1+(x)))$/;" M language:ObjectiveC ================================================ FILE: Tmain/selector-select-perl6-for-dot-pm.d/input0.pm ================================================ # Taken from Units/parara-raku.r/raku-bunch1.d/input.pm my class JSONPrettyActions { method TOP($/) { make $/.values.[0].ast; }; method object($/) { make $.ast.hash.item; } method pairlist($/) { make $>>.ast.flat; } method pair($/) { make $.ast => $.ast; } method array($/) { make $.ast.item; } method arraylist($/) { make [$>>.ast]; } method string($/) { make $0.elems == 1 ?? ($0[0]. || $0[0].).ast !! join '', $0.list.map({ (. || .).ast }); } method value:sym($/) { make +$/.Str } method value:sym($/) { make $.ast } method value:sym($/) { make Bool::True } method value:sym($/) { make Bool::False } method value:sym($/) { make Any } method value:sym($/) { make $.ast } method value:sym($/) { make $.ast } method str($/) { make ~$/ } my %esc = '\\' => "\\", '/' => "/", 'b' => "\b", 'n' => "\n", 't' => "\t", 'f' => "\f", 'r' => "\r", '"' => "\""; method str_escape($/) { make $ ?? chr(:16($.join)) !! %esc.AT-KEY(~$/); } } my grammar JSONPrettyGrammar { token TOP { ^ \s* [ | ] \s* $ } rule object { '{' ~ '}' } rule pairlist { * % \, } rule pair { ':' } rule array { '[' ~ ']' } rule arraylist { * % [ \, ] } proto token value {*}; token value:sym { '-'? [ 0 | <[1..9]> <[0..9]>* ] [ \. <[0..9]>+ ]? [ <[eE]> [\+|\-]? <[0..9]>+ ]? } token value:sym { }; token value:sym { }; token value:sym { }; token value:sym { }; token value:sym { }; token value:sym { } token string { \" ~ \" ( | \\ )* } token str { <-["\\\t\n]>+ } token str_escape { <["\\/bfnrt]> | u **4 } } proto sub to-json($, :$indent = 0, :$first = 0) {*} multi sub to-json(Version:D $v, :$indent = 0, :$first = 0) { to-json(~$v, :$indent, :$first) } multi sub to-json(Real:D $d, :$indent = 0, :$first = 0) { (' ' x $first) ~ ~$d } multi sub to-json(Bool:D $d, :$indent = 0, :$first = 0) { (' ' x $first) ~ ($d ?? 'true' !! 'false') } multi sub to-json(Str:D $d, :$indent = 0, :$first = 0) { (' ' x $first) ~ '"' ~ $d.trans(['"', '\\', "\b", "\f", "\n", "\r", "\t"] => ['\"', '\\\\', '\b', '\f', '\n', '\r', '\t'])\ .subst(/<-[\c32..\c126]>/, { ord(~$_).fmt('\u%04x') }, :g) ~ '"' } multi sub to-json(Positional:D $d, :$indent = 0, :$first = 0) { (' ' x $first) ~ "\[" ~ ($d ?? $d.map({ "\n" ~ to-json($_, :indent($indent + 2), :first($indent + 2)) }).join(",") ~ "\n" ~ (' ' x $indent) !! ' ') ~ ']'; } multi sub to-json(Associative:D $d, :$indent = 0, :$first = 0) { (' ' x $first) ~ "\{" ~ ($d ?? $d.map({ "\n" ~ to-json(.key, :first($indent + 2)) ~ ' : ' ~ to-json(.value, :indent($indent + 2)) }).join(",") ~ "\n" ~ (' ' x $indent) !! ' ') ~ '}'; } multi sub to-json(Mu:U $, :$indent = 0, :$first = 0) { 'null' } multi sub to-json(Mu:D $s, :$indent = 0, :$first = 0) { die "Can't serialize an object of type " ~ $s.WHAT.perl } sub from-json($text) { my $a = JSONPrettyActions.new(); my $o = JSONPrettyGrammar.parse($text, :actions($a)); $o.ast; } ================================================ FILE: Tmain/selector-select-perl6-for-dot-pm.d/input1.pm ================================================ # Taken from Units/parser-raku/raku-bunch2.d/input.rakumod # Anything that can be subscribed to does this role. It provides the basic # supply management infrastructure, as well as various coercions that # turn Supply-like things into something else and convenience forms of calls # to SupplyOperations. my class SupplyOperations is repr('Uninstantiable') { ... } my class X::Supply::Combinator is Exception { has $.combinator; method message() { "Can only use $!combinator to combine defined Supply objects" } } my class Tap { has &.emit; has &.done; has &.quit; has &.closing; has $.supply; method close (Tap:D:) { $!supply.close(self) } } my role Supply { has $!tappers_lock = Lock.new; has @!tappers; has $!been_tapped; has @!paused; method tap(Supply:D: &emit = -> $ { }, :&done,:&quit={die $_},:&closing) { my $tap = Tap.new(:&emit, :&done, :&quit, :&closing, :supply(self)); $!tappers_lock.protect({ @!tappers.push($tap); if @!paused -> \todo { $tap.emit().($_) for todo; @!paused = (); } $!been_tapped = True; }); $tap } proto method close(|) { * } multi method close(Supply:D:) { self.close($_) for self.tappers } multi method close(Supply:D: Tap $t) { my $found; $!tappers_lock.protect({ @!tappers .= grep( { $_ === $t ?? !($found = True) !! True } ); }); if $t.closing -> &closing { closing(); } $found // False; } method tappers(Supply:D:) { # Shallow clone to provide safe snapshot. my @tappers; $!tappers_lock.protect({ @tappers = @!tappers }); @tappers } method emit(Supply:D: \msg) { if self.tappers -> \tappers { .emit().(msg) for tappers; } elsif !$!been_tapped { $!tappers_lock.protect({ @!paused.push: msg }); } Nil; } method more(Supply:D: \msg) { DEPRECATED('emit', |<2014.10 2015.09>); self.emit(msg); } method done(Supply:D:) { for self.tappers -> $t { my $l = $t.done(); $l() if $l; } Nil; } method quit(Supply:D: $ex) { for self.tappers -> $t { my $f = $t.quit(); $f($ex) if $f; } Nil; } method taps(Supply:D:) { +@!tappers } method live(Supply:D:) { True }; method Supply(Supply:) { self } method Channel(Supply:D:) { my $c = Channel.new(); self.tap( -> \val { $c.send(val) }, done => { $c.close }, quit => -> $ex { $c.quit($ex) }); $c } method Promise(Supply:D:) { my $l = Lock.new; my $p = Promise.new; my $v = $p.vow; my $t = self.tap( -> \val { $l.protect( { if $p.status == Planned { $v.keep(val); $t.close() } } ); }, done => { $v.break("No value received") }, quit => -> \ex { $l.protect( { if $p.status == Planned { $v.break(ex); $t.close() } } ); }, ); $p } method wait(Supply:D:) { my $l = Lock.new; my $p = Promise.new; my $t = self.tap( -> \val {}, done => { $l.protect( { if $p.status == Planned { $p.keep(True); $t.close() } } ); }, quit => -> \ex { $l.protect( { if $p.status == Planned { $p.break(ex); $t.close() } } ); }, ); $p.result } method list(Supply:D:) { # Use a Channel to handle any asynchrony. self.Channel.list; } method on-demand(Supply:U: |c) { SupplyOperations.on-demand(|c) } method from-list(Supply:U: |c) { SupplyOperations.from-list(|c) } method interval(Supply:U: |c) { SupplyOperations.interval(|c) } method flat(Supply:D: ) { SupplyOperations.flat(self) } method grep(Supply:D: Mu $test) { SupplyOperations.grep(self, $test) } method map(Supply:D: &mapper) { SupplyOperations.map(self, &mapper) } method schedule-on(Supply:D: Scheduler $scheduler) { SupplyOperations.schedule-on(self, $scheduler); } method start(Supply:D: &startee) { SupplyOperations.start(self, &startee) } method stable(Supply:D: $time, :$scheduler = $*SCHEDULER) { SupplyOperations.stable(self, $time, :$scheduler); } method delay(Supply:D: $time, :$scheduler = $*SCHEDULER) { DEPRECATED('delayed', '2015.02', '2015.09'); SupplyOperations.delayed(self, $time, :$scheduler); } method delayed(Supply:D: $time, :$scheduler = $*SCHEDULER) { SupplyOperations.delayed(self, $time, :$scheduler) } method migrate(Supply:D: ) { SupplyOperations.migrate(self) } multi method classify(Supply:D: &mapper ) { SupplyOperations.classify(self, &mapper); } multi method classify(Supply:D: %mapper ) { SupplyOperations.classify(self, { %mapper{$^a} }); } multi method classify(Supply:D: @mapper ) { SupplyOperations.classify(self, { @mapper[$^a] }); } proto method categorize (|) { * } multi method categorize(Supply:D: &mapper ) { SupplyOperations.classify(self, &mapper, :multi); } multi method categorize(Supply:D: %mapper ) { SupplyOperations.classify(self, { %mapper{$^a} }, :multi); } multi method categorize(Supply:D: @mapper ) { SupplyOperations.classify(self, { @mapper[$^a] }, :multi); } method act(Supply:D: &actor) { self.do(&actor).tap(|%_) # need "do" for serializing callbacks } method do(Supply:D $self: &side_effect) { on -> $res { $self => -> \val { side_effect(val); $res.emit(val) } } } method unique(Supply:D $self: :&as, :&with, :$expires) { on -> $res { $self => do { if $expires { if &with and &with !=== &[===] { my @seen; # really Mu, but doesn't work in settings my Mu $target; &as ?? -> \val { my $now := now; $target = &as(val); my $index = @seen.first-index({&with($target,$_[0])}); if $index.defined { if $now > @seen[$index][1] { # expired @seen[$index][1] = $now+$expires; $res.emit(val); } } else { @seen.push: [$target, $now+$expires]; $res.emit(val); } } !! -> \val { my $now := now; my $index = @seen.first-index({&with(val,$_[0])}); if $index.defined { if $now > @seen[$index][1] { # expired @seen[$index][1] = $now+$expires; $res.emit(val); } } else { @seen.push: [val, $now+$expires]; $res.emit(val); } }; } else { my $seen := nqp::hash(); my str $target; &as ?? -> \val { my $now := now; $target = nqp::unbox_s(&as(val).WHICH); if !nqp::existskey($seen,$target) || $now > nqp::atkey($seen,$target) { #expired $res.emit(val); nqp::bindkey($seen,$target,$now+$expires); } } !! -> \val { my $now := now; $target = nqp::unbox_s(val.WHICH); if !nqp::existskey($seen,$target) || $now > nqp::atkey($seen,$target) { #expired $res.emit(val); nqp::bindkey($seen,$target,$now+$expires); } }; } } else { # !$!expires if &with and &with !=== &[===] { my @seen; # really Mu, but doesn't work in settings my Mu $target; &as ?? -> \val { $target = &as(val); if @seen.first({ &with($target,$_) } ) =:= Nil { @seen.push($target); $res.emit(val); } } !! -> \val { if @seen.first({ &with(val,$_) } ) =:= Nil { @seen.push(val); $res.emit(val); } }; } else { my $seen := nqp::hash(); my str $target; &as ?? -> \val { $target = nqp::unbox_s(&as(val).WHICH); unless nqp::existskey($seen, $target) { nqp::bindkey($seen, $target, 1); $res.emit(val); } } !! -> \val { $target = nqp::unbox_s(val.WHICH); unless nqp::existskey($seen, $target) { nqp::bindkey($seen, $target, 1); $res.emit(val); } }; } } } } } method squish(Supply:D $self: :&as, :&with is copy) { &with //= &[===]; on -> $res { my @secret; $self => do { my Mu $last = @secret; my Mu $target; &as ?? -> \val { $target = &as(val); unless &with($target,$last) { $last = $target; $res.emit(val); } } !! -> \val { unless &with(val,$last) { $last = val; $res.emit(val); } }; } } } proto method rotor(|) {*} multi method rotor(Supply:D:) { DEPRECATED('.rotor( $elems => -$gap )',|<2015.04 2015.09>); self.rotor( (2 => -1) ); } multi method rotor(Supply:D $self: *@cycle, :$partial) { my @c := @cycle.infinite ?? @cycle !! @cycle xx *; on -> $res { $self => do { my Int $elems; my Int $gap; my int $to-skip; my int $skip; sub next-batch() { given @c.shift { when Pair { $elems = +.key; $gap = +.value; $to-skip = $gap > 0 ?? $gap !! 0; } default { $elems = +$_; $gap = 0; $to-skip = 0; } } } next-batch; my @batched; sub flush() { $res.emit( [@batched] ); @batched.splice( 0, +@batched + $gap ); $skip = $to-skip; } { emit => -> \val { @batched.push: val unless $skip && $skip--; if @batched.elems == $elems { flush; next-batch; } }, done => { flush if @batched and $partial; $res.done; } } } } } method batch(Supply:D $self: :$elems, :$seconds ) { return $self if (!$elems or $elems == 1) and !$seconds; # nothing to do on -> $res { $self => do { my @batched; my $last_time; sub flush { $res.emit([@batched]); @batched = (); } { emit => do { if $seconds { $last_time = time div $seconds; $elems # and $seconds ?? -> \val { my $this_time = time div $seconds; if $this_time != $last_time { flush if @batched; $last_time = $this_time; @batched.push: val; } else { @batched.push: val; flush if @batched.elems == $elems; } } !! -> \val { my $this_time = time div $seconds; if $this_time != $last_time { flush if @batched; $last_time = $this_time; } @batched.push: val; } } else { # just $elems -> \val { @batched.push: val; flush if @batched.elems == $elems; } } }, done => { flush if @batched; $res.done; } } } } } method lines(Supply:D $self: :$chomp = True ) { on -> $res { $self => do { my str $str; my int $chars; my int $left; my int $pos; my int $nextpos; my int $found; my int $cr; my int $crlf; { emit => -> \val { $str = $str ~ nqp::unbox_s(val); $chars = nqp::chars($str); $pos = 0; while ($left = $chars - $pos) > 0 { $nextpos = nqp::findcclass( nqp::const::CCLASS_NEWLINE, $str, $pos, $left ); # no trailing line delimiter, so go buffer last unless nqp::iscclass( nqp::const::CCLASS_NEWLINE, $str, $nextpos ); # potentially broken CRLF, so go buffer $cr = nqp::ordat($str, $nextpos) == 13; # CR last if $cr == 1 and $nextpos + 1 == $chars; $crlf = $cr && nqp::ordat($str, $nextpos + 1) == 10; # LF if $chomp { $res.emit( ($found = $nextpos - $pos) ?? nqp::box_s( nqp::substr($str, $pos, $found), Str) !! '' ); $pos = $nextpos + 1 + $crlf; } else { $found = $nextpos - $pos + 1 + $crlf; $res.emit( nqp::box_s( nqp::substr($str, $pos, $found), Str) ); $pos = $pos + $found; } } $str = $pos < $chars ?? nqp::substr($str,$pos) !! ''; }, done => { if $str { $chars = nqp::chars($str); $res.emit( $chomp && nqp::ordat($str, $chars - 1) == 13 # CR ?? nqp::box_s(nqp::substr($str,0,$chars - 1),Str) !! nqp::box_s($str, Str) ); } $res.done; } } } } } method words(Supply:D $self:) { on -> $res { $self => do { my str $str; my int $chars; my int $left; my int $pos; my int $nextpos; my int $found; my int $cr; my int $crlf; { emit => -> \val { $str = $str ~ nqp::unbox_s(val); $chars = nqp::chars($str); $pos = nqp::findnotcclass( nqp::const::CCLASS_WHITESPACE, $str, 0, $chars); while ($left = $chars - $pos) > 0 { $nextpos = nqp::findcclass( nqp::const::CCLASS_WHITESPACE, $str, $pos, $left ); last unless $left = $chars - $nextpos; # broken word $res.emit( nqp::box_s( nqp::substr( $str, $pos, $nextpos - $pos ), Str) ); $pos = nqp::findnotcclass( nqp::const::CCLASS_WHITESPACE,$str,$nextpos,$left); } $str = $pos < $chars ?? nqp::substr($str,$pos) !! ''; }, done => { $res.emit( nqp::box_s($str, Str) ) if $str; $res.done; } } } } } method elems(Supply:D $self: $seconds? ) { on -> $res { $self => do { my $elems = 0; my $last_time; my $last_elems; { emit => do { if $seconds { $last_time = time div $seconds; $last_elems = $elems; -> \val { $last_elems = ++$elems; my $this_time = time div $seconds; if $this_time != $last_time { $res.emit($elems); $last_time = $this_time; } } } else { -> \val { $res.emit(++$elems) } } }, done => { $res.emit($elems) if $seconds and $elems != $last_elems; $res.done; } } } } } method last(Supply:D $self: Int $number = 1) { # should be Natural on -> $res { $self => do { my @seen; { emit => $number == 1 ?? -> \val { @seen[0] = val } !! -> \val { @seen.shift if +@seen == $number; @seen.push: val; }, done => { $res.emit($_) for @seen; $res.done; } } } } } method min(Supply:D $self: &by = &infix:) { my &cmp = &by.arity == 2 ?? &by !! { by($^a) cmp by($^b) } on -> $res { $self => do { my $min; { emit => -> \val { if val.defined and !$min.defined || cmp(val,$min) < 0 { $res.emit( $min = val ); } }, done => { $res.done } } } } } method max(Supply:D $self: &by = &infix:) { my &cmp = &by.arity == 2 ?? &by !! { by($^a) cmp by($^b) } on -> $res { $self => do { my $max; { emit => -> \val { if val.defined and !$max.defined || cmp(val,$max) > 0 { $res.emit( $max = val ); } }, done => { $res.done } } } } } method minmax(Supply:D $self: &by = &infix:) { my &cmp = &by.arity == 2 ?? &by !! { by($^a) cmp by($^b) } on -> $res { $self => do { my $min; my $max; { emit => -> \val { if val.defined { if !$min.defined { $res.emit( Range.new($min = val, $max = val) ); } elsif cmp(val,$min) < 0 { $res.emit( Range.new( $min = val, $max ) ); } elsif cmp(val,$max) > 0 { $res.emit( Range.new( $min, $max = val ) ); } } }, done => { $res.done } } } } } method reduce(Supply:D $self: &with) { on -> $res { $self => do { my $notfirst; my $reduced; { emit => -> \val { $reduced = $notfirst ?? with($reduced,val) !! val; $res.emit($reduced); once $notfirst = True; }, done => { $res.done } } } } } method grab(Supply:D $self: &when_done) { on -> $res { $self => do { my @seen; { emit => -> \val { @seen.push: val }, done => { $res.emit($_) for when_done(@seen); $res.done; } } } } } method reverse(Supply:D:) { self.grab( {.reverse} ) } method sort(Supply:D: &by = &infix:) { self.grab( {.sort(&by)} ) } method merge(*@s) { @s.unshift(self) if self.DEFINITE; # add if instance method return Supply unless +@s; # nothing to be done X::Supply::Combinator.new( combinator => 'merge' ).throw if NOT_ALL_DEFINED_TYPE(@s,Supply); return @s[0] if +@s == 1; # nothing to be done my $dones = 0; on -> $res { @s => { emit => -> \val { $res.emit(val) }, done => { $res.done() if ++$dones == +@s } }, } } method zip(*@s, :&with is copy = &[,]) { @s.unshift(self) if self.DEFINITE; # add if instance method return Supply unless +@s; # nothing to be done X::Supply::Combinator.new( combinator => 'zip' ).throw if NOT_ALL_DEFINED_TYPE(@s,Supply); return @s[0] if +@s == 1; # nothing to be done my @values = ( [] xx +@s ); on -> $res { @s => -> $val, $index { @values[$index].push($val); if all(@values) { $res.emit( [[&with]] @values>>.shift ); } } } } method zip-latest(*@s, :&with is copy = &[,], :$initial ) { @s.unshift(self) if self.DEFINITE; # add if instance method return Supply unless +@s; # nothing to do. X::Supply::Combinator.new( combinator => 'zip-latest' ).throw if NOT_ALL_DEFINED_TYPE(@s,Supply); return @s[0] if +@s == 1; # nothing to do. my @values; my $uninitialised = +@s; # how many supplies have yet to emit until we # can start emitting, too? if $initial { @values = @$initial; $uninitialised = 0 max $uninitialised - @$initial; } my $dones = 0; on -> $res { @s => do { { emit => -> $val, $index { if $uninitialised > 0 && not @values.EXISTS-POS($index) { --$uninitialised; } @values[$index] = $val; unless $uninitialised { $res.emit( [[&with]] @values ); } }, done => { $res.done() if ++$dones == +@s } } } } } method for(Supply:U: |c) { DEPRECATED('from-list',|<2015.01 2015.09>); SupplyOperations.from-list(|c); } method on_demand(Supply:U: |c) { DEPRECATED('on-demand',|<2015.03 2015.09>); SupplyOperations.on-demand(|c); } method schedule_on(Supply:D: Scheduler $scheduler) { DEPRECATED('schedule-on',|<2015.03 2015.09>); SupplyOperations.schedule-on(self, $scheduler); } method uniq(Supply:D: |c) { DEPRECATED('unique', |<2014.11 2015.09>); self.unique(|c); } } # The on meta-combinator provides a mechanism for implementing thread-safe # combinators on Supplies. It subscribes to a bunch of sources, but will # only let one of the specified callbacks to handle their emit/done/quit run # at a time. A little bit actor-like. my class X::Supply::On::BadSetup is Exception { method message() { "on requires a callable that returns a list of pairs with Supply keys" } } my class X::Supply::On::NoEmit is Exception { method message() { "on requires that emit be specified for each supply" } } sub on(&setup) { my class OnSupply does Supply { has &!setup; has Bool $!live = False; submethod BUILD(:&!setup) { } method !add_source( $source, $lock, $index, :&done is copy, :&quit is copy, :&emit is copy, :&more # more deprecated, emit must be changeable ) { DEPRECATED('emit => {...}', |<2014.10 2015.09>) if &more; $!live ||= True if $source.live; &emit //= &more // X::Supply::On::NoEmit.new.throw; &done //= { self.done }; &quit //= -> $ex { self.quit($ex) }; my &tap_emit = &emit.arity == 2 ?? -> \val { $lock.protect({ emit(val,$index) }); CATCH { default { self.quit($_) } } } !! -> \val { $lock.protect({ emit(val) }); CATCH { default { self.quit($_) } } }; my &tap_done = &done.arity == 1 ?? { $lock.protect({ done($index) }); CATCH { default { self.quit($_) } } } !! { $lock.protect({ done() }); CATCH { default { self.quit($_) } } }; my &tap_quit = &quit.arity == 2 ?? -> $ex { $lock.protect({ quit($ex,$index) }); CATCH { default { self.quit($_) } } } !! -> $ex { $lock.protect({ quit($ex) }); CATCH { default { self.quit($_) } } }; $source.tap( &tap_emit, done => &tap_done, quit => &tap_quit ); } method live { $!live } method tap(|c) { my @to_close; my $sub = self.Supply::tap( |c, closing => {.close for @to_close}); my @tappers = &!setup(self); my $lock = Lock.new; sub add ($source, $what, $index?) { unless nqp::istype($source,Supply) { X::Supply::On::BadSetup.new.throw; } given $what { when EnumMap { @to_close.push(self!add_source($source, $lock, $index, |$what)); } when Callable { @to_close.push(self!add_source($source, $lock, $index, emit => $what)); } default { X::Supply::On::BadSetup.new.throw; } } } for @tappers -> $tap { unless nqp::istype($tap,Pair) { X::Supply::On::BadSetup.new.throw; } given $tap.key { when Positional { my $todo := $tap.value; for .list.kv -> $index, $supply { add( $supply, $todo, $index ); } } when Supply { add( $_, $tap.value ); } default { X::Supply::On::BadSetup.new.throw; } } } $sub } method emit(\msg) { for self.tappers { .emit().(msg) } Nil; } method done() { for self.tappers { if .done -> $l { $l() } } Nil; } method quit($ex) { for self.tappers { if .quit -> $t { $t($ex) } } Nil; } } OnSupply.new(:&setup) } ================================================ FILE: Tmain/selector-select-perl6-for-dot-pm.d/input2.pm ================================================ # Taken from Units/parser-raku/raku-package.d/input.rakumod use v6; package Foo { sub hello-world is export { say "hey there"; } } ================================================ FILE: Tmain/selector-select-perl6-for-dot-pm.d/input3.pm ================================================ # Taken from perl5/subs.pm package subs; use strict; use warnings; our $VERSION = '1.04'; =head1 NAME subs - Perl pragma to predeclare subroutine names =head1 SYNOPSIS use subs qw(frob); frob 3..10; =head1 DESCRIPTION This will predeclare all the subroutines whose names are in the list, allowing you to use them without parentheses (as list operators) even before they're declared. Unlike pragmas that affect the C<$^H> hints variable, the C and C declarations are not lexically scoped to the block they appear in: they affect the entire package in which they appear. It is not possible to rescind these declarations with C or C. See L and L. =cut sub import { my $callpack = caller; my $pack = shift; my @imports = @_; foreach my $sym (@imports) { no strict 'refs'; *{"${callpack}::$sym"} = \&{"${callpack}::$sym"}; } }; 1; ================================================ FILE: Tmain/selector-select-perl6-for-dot-pm.d/run.sh ================================================ # Copyright: 2023 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh echo "# --print-language" for i in input0.pm input1.pm input2.pm input3.pm; do ${CTAGS} --quiet --options=NONE --print-language $i done ================================================ FILE: Tmain/selector-select-perl6-for-dot-pm.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/selector-select-perl6-for-dot-pm.d/stdout-expected.txt ================================================ # --print-language input0.pm: Perl6 input1.pm: Perl6 input2.pm: Perl6 input3.pm: Perl ================================================ FILE: Tmain/selector-xml-root-elelement.d/input.xml ================================================ ================================================ FILE: Tmain/selector-xml-root-elelement.d/run.sh ================================================ # Copyright: 2019 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh is_feature_available ${CTAGS} xpath ${CTAGS} --quiet --options=NONE --print-language input.xml ================================================ FILE: Tmain/selector-xml-root-elelement.d/stdout-expected.txt ================================================ input.xml: DBusIntrospect ================================================ FILE: Tmain/sorted-list-languages.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/sorted-list-languages.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 BUILDDIR=$2 . ../utils.sh if ! sort --help | grep --quiet GNU; then skip "GNU sort is needed to run this test case" fi list_languages() { ${CTAGS} --quiet --options=NONE --list-languages } list_languages > $BUILDDIR/ll.tmp list_languages | sort --ignore-case > $BUILDDIR/sorted-ll.tmp diff -uN $BUILDDIR/ll.tmp $BUILDDIR/sorted-ll.tmp r=$? rm $BUILDDIR/ll.tmp $BUILDDIR/sorted-ll.tmp exit $r ================================================ FILE: Tmain/sorted-list-languages.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/sorted-list-languages.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/subparser-direction.d/input.cc ================================================ ABC(); int main(void) { } ================================================ FILE: Tmain/subparser-direction.d/input.mojom ================================================ ABC(); int main(void) { } ================================================ FILE: Tmain/subparser-direction.d/mojom-bidirectional.ctags ================================================ --langdef=mojom{base=C++}{bidirectional} --map-mojom=+.mojom --kinddef-mojom=f,function,functions --regex-mojom=/^[ ]+([a-zA-Z]+)\(/\1/f/ ================================================ FILE: Tmain/subparser-direction.d/mojom-dedicated.ctags ================================================ --langdef=mojom{base=C++}{dedicated} --kinddef-mojom=f,function,functions --map-mojom=+.mojom --regex-mojom=/^[ ]+([a-zA-Z]+)\(/\1/f/ ================================================ FILE: Tmain/subparser-direction.d/mojom-default.ctags ================================================ --langdef=mojom{base=C++} --map-mojom=+.mojom --kinddef-mojom=f,function,functions --regex-mojom=/^[ ]+([a-zA-Z]+)\(/\1/f/ ================================================ FILE: Tmain/subparser-direction.d/mojom-shared.ctags ================================================ --langdef=mojom{base=C++}{shared} --map-mojom=+.mojom --kinddef-mojom=f,function,functions --regex-mojom=/^[ ]+([a-zA-Z]+)\(/\1/f/ ================================================ FILE: Tmain/subparser-direction.d/run.sh ================================================ # Taken from #1409 submitted by @sgraham CTAGS="$1 --quiet --options=NONE --fields=+l" echo '#' "input: input.cc, optlib: shared" ${CTAGS} --options=./mojom-shared.ctags -o - input.cc echo '#' "input: input.mojom, optlib: shared" ${CTAGS} --options=./mojom-shared.ctags -o - input.mojom echo echo '#' "input: input.cc, optlib: dedicated" ${CTAGS} --options=./mojom-dedicated.ctags -o - input.cc echo '#' "input: input.mojom, optlib: dedicated" ${CTAGS} --options=./mojom-dedicated.ctags -o - input.mojom echo echo '#' "input: input.cc, optlib: bidirectional" ${CTAGS} --options=./mojom-bidirectional.ctags -o - input.cc echo '#' "input: input.mojom, optlib: bidirectional" ${CTAGS} --options=./mojom-bidirectional.ctags -o - input.mojom echo echo '#' "input: input.cc, optlib: " ${CTAGS} --options=./mojom-default.ctags -o - input.cc echo '#' "input: input.mojom, optlib: " ${CTAGS} --options=./mojom-default.ctags -o - input.mojom ================================================ FILE: Tmain/subparser-direction.d/stdout-expected.txt ================================================ # input: input.cc, optlib: shared ABC input.cc /^ ABC();$/;" f language:mojom main input.cc /^int main(void)$/;" f language:C++ typeref:typename:int # input: input.mojom, optlib: shared ABC input.mojom /^ ABC();$/;" f language:mojom # input: input.cc, optlib: dedicated main input.cc /^int main(void)$/;" f language:C++ typeref:typename:int # input: input.mojom, optlib: dedicated ABC input.mojom /^ ABC();$/;" f language:mojom main input.mojom /^int main(void)$/;" f language:C++ typeref:typename:int # input: input.cc, optlib: bidirectional ABC input.cc /^ ABC();$/;" f language:mojom main input.cc /^int main(void)$/;" f language:C++ typeref:typename:int # input: input.mojom, optlib: bidirectional ABC input.mojom /^ ABC();$/;" f language:mojom main input.mojom /^int main(void)$/;" f language:C++ typeref:typename:int # input: input.cc, optlib: ABC input.cc /^ ABC();$/;" f language:mojom main input.cc /^int main(void)$/;" f language:C++ typeref:typename:int # input: input.mojom, optlib: ABC input.mojom /^ ABC();$/;" f language:mojom ================================================ FILE: Tmain/tab-in-parser-specific-field.d/foo.ctags ================================================ --langdef=foo --map-foo=.foo --_fielddef-foo=fprop,property attached to a function --kinddef-foo=f,func,functions --fields-foo=+{fprop} --regex-foo=/^def +([^@]+)@prop(\([^\)]*\)):/\1/f/{_field=fprop:\2} ================================================ FILE: Tmain/tab-in-parser-specific-field.d/input.foo ================================================ def b@prop(arg0, arg1): pass # TAB char betwen arg0 and arg1 def a@prop(arg0, arg1): pass ================================================ FILE: Tmain/tab-in-parser-specific-field.d/run.sh ================================================ # Copyright: 2019 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh run() { echo '#' echo '#' with $1 echo '#' echo "# Universal-ctags output format" $CTAGS --options=NONE --options=./foo.ctags "$1" --output-format=u-ctags -o - input.foo echo "# Exuberant-ctags output format" echo "# 'a' has a tab char in fprop fields. So ctags drops it silent." $CTAGS --options=NONE --options=./foo.ctags "$1" --output-format=e-ctags -o - input.foo } run "--sort=yes" run "--sort=no" ================================================ FILE: Tmain/tab-in-parser-specific-field.d/stdout-expected.txt ================================================ # # with --sort=yes # # Universal-ctags output format a input.foo /^def a@prop(arg0, arg1):$/;" f fprop:(arg0,\targ1) b input.foo /^def b@prop(arg0, arg1):$/;" f fprop:(arg0, arg1) # Exuberant-ctags output format # 'a' has a tab char in fprop fields. So ctags drops it silent. b input.foo /^def b@prop(arg0, arg1):$/;" f fprop:(arg0, arg1) # # with --sort=no # # Universal-ctags output format b input.foo /^def b@prop(arg0, arg1):$/;" f fprop:(arg0, arg1) a input.foo /^def a@prop(arg0, arg1):$/;" f fprop:(arg0,\targ1) # Exuberant-ctags output format # 'a' has a tab char in fprop fields. So ctags drops it silent. b input.foo /^def b@prop(arg0, arg1):$/;" f fprop:(arg0, arg1) ================================================ FILE: Tmain/tag-relative-option-in-etags.d/indirect/src/input.c ================================================ int main (void) {return 0;} ================================================ FILE: Tmain/tag-relative-option-in-etags.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 BUILDDIR=$2 ARGS="--quiet --options=NONE" O=TAGS.TMP . ../utils.sh for x in no yes default; do touch $BUILDDIR/${x}-$O done if ! direq_maybe $BUILDDIR .; then cp -r indirect $BUILDDIR copied=yes fi ( cd $BUILDDIR/indirect ${CTAGS} ${ARGS} -e -o ../no-${O} --tag-relative=no src/input.c ${CTAGS} ${ARGS} -e -o ../yes-${O} --tag-relative=yes src/input.c ${CTAGS} ${ARGS} -e -o ../default-${O} src/input.c ) for x in no yes default; do echo '#' ${x} # convert path separators in the output sed -e 's|\\|/|g' $BUILDDIR/${x}-$O rm $BUILDDIR/${x}-$O done if [ "$copied" = "yes" ]; then chmod -R u+w $BUILDDIR/indirect rm -rf $BUILDDIR/indirect fi exit $? ================================================ FILE: Tmain/tag-relative-option-in-etags.d/stdout-expected.txt ================================================ # no src/input.c,37 int main (void) {return 0;}main1,0 # yes indirect/src/input.c,37 int main (void) {return 0;}main1,0 # default indirect/src/input.c,37 int main (void) {return 0;}main1,0 ================================================ FILE: Tmain/tag-relative-option-no-optarg.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/tag-relative-option-no-optarg.d/run.sh ================================================ # Copyright: 2019 Masatake YAMATO # License: GPL-2 CTAGS=$1 O="--quiet --options=NONE " ${CTAGS} $O --tag-relative --_force-quit=0 ================================================ FILE: Tmain/tag-relative-option.d/input.c ================================================ #define X 1 ================================================ FILE: Tmain/tag-relative-option.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 O="--quiet --options=NONE -o - -x " P=$(pwd) if type realpath > /dev/null 2>&1; then P=$(realpath "$P") cd "$P" fi . ../utils.sh if ! ${CTAGS} $O --help | grep -e --tag-relative | grep --quiet -e always; then echo "--tag-relative=always|never is not available on this platform" exit ${__SKIP__} fi { F=./input.c ${CTAGS} $O --_xformat="default: $F -> %F" $F ${CTAGS} $O --_xformat="never: $F -> %F" --tag-relative=never $F ${CTAGS} $O --_xformat="no: $F -> %F" --tag-relative=no $F ${CTAGS} $O --_xformat="yes: $F -> %F" --tag-relative=yes $F ${CTAGS} $O --_xformat="always: $F -> %F" --tag-relative=always $F F=input.c ${CTAGS} $O --_xformat="default: $F -> %F" $F ${CTAGS} $O --_xformat="never: $F -> %F" --tag-relative=never $F ${CTAGS} $O --_xformat="no: $F -> %F" --tag-relative=no $F ${CTAGS} $O --_xformat="yes: $F -> %F" --tag-relative=yes $F ${CTAGS} $O --_xformat="always: $F -> %F" --tag-relative=always $F F=${P}/input.c ${CTAGS} $O --_xformat="default: $F -> %F" $F ${CTAGS} $O --_xformat="never: $F -> %F" --tag-relative=never $F ${CTAGS} $O --_xformat="no: $F -> %F" --tag-relative=no $F ${CTAGS} $O --_xformat="yes: $F -> %F" --tag-relative=yes $F ${CTAGS} $O --_xformat="always: $F -> %F" --tag-relative=always $F } | { # Normalize Windows driver letter # # comment time: Sat Feb 6 13:11:44 UTC 2021 # comment author: leleliu008@gmail.com # # as far as I know, the most widely used unix-like POSIX-compatible environments on Windows are Cygwin and MSYS2. Actually, MSYS2 is a modified fork of Cygwin. They both provide a command-line tool called cygpath which can be used to convert Windows PATH to UNIX path. There exists other unix-like POSIX-compatible environments on Windows, git-for-windows as an example, but they all based on Cygwin or MSYS2. if command -v cygpath > /dev/null && command -v awk > /dev/null ; then awk '{if ($NF ~ /^[A-Z]:/) { "cygpath "$NF | getline newpath; sub($NF,newpath) } print}' else # \l is a GNU extension. But only Windows's path match [A-Z]: pattern, Cygwin and MSYS2 use GNU sed. sed 's|\([A-Z]\):|/\l\1|' fi } | { # Unescape sed -e 's|\\\\|\\|g' } | { # Convert to / sed -e 's|\\|/|g' } | { # Convert pwd test environment neutral sed -e "s|${P}|/abs|g" } ================================================ FILE: Tmain/tag-relative-option.d/stdout-expected.txt ================================================ default: ./input.c -> ./input.c never: ./input.c -> /abs/input.c no: ./input.c -> ./input.c yes: ./input.c -> input.c always: ./input.c -> input.c default: input.c -> input.c never: input.c -> /abs/input.c no: input.c -> input.c yes: input.c -> input.c always: input.c -> input.c default: /abs/input.c -> /abs/input.c never: /abs/input.c -> /abs/input.c no: /abs/input.c -> /abs/input.c yes: /abs/input.c -> /abs/input.c always: /abs/input.c -> input.c ================================================ FILE: Tmain/tags-output-typed-fields.d/input.c ================================================ static int local; int global; ================================================ FILE: Tmain/tags-output-typed-fields.d/input.ctst ================================================ f ================================================ FILE: Tmain/tags-output-typed-fields.d/input.rst ================================================ ============================================== TITLE ============================================== section ------- ================================================ FILE: Tmain/tags-output-typed-fields.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE -o - \ --output-format=u-ctags \ --language-force=CTagsSelfTest input.ctst ${CTAGS} --quiet --options=NONE -o - \ --output-format=u-ctags \ --fields-RestructuredText=+'{overline}' \ input.rst ${CTAGS} --quiet --options=NONE -o - \ --output-format=u-ctags \ input.c ================================================ FILE: Tmain/tags-output-typed-fields.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/tags-output-typed-fields.d/stdout-expected.txt ================================================ atag input.ctst /^f$/;" f btag input.ctst /^f$/;" f bField: ctag input.ctst /^f$/;" f bField: dtag input.ctst /^f$/;" f sbField:val etag input.ctst /^f$/;" f sbField: ftag input.ctst /^f$/;" f sField:val gtag input.ctst /^f$/;" f sField: htag input.ctst /^f$/;" f iField:23 itag input.ctst /^f$/;" f iField:-3 jtag input.ctst /^f$/;" f iField:1 ktag input.ctst /^f$/;" f iField:0 TITLE input.rst /^TITLE$/;" H overline: section input.rst /^section$/;" h title:TITLE global input.c /^int global;$/;" v typeref:typename:int local input.c /^static int local;$/;" v typeref:typename:int file: ================================================ FILE: Tmain/tmain-example.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/tmain-example.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 CTAGS=$1 BUILDDIR=$2 ${CTAGS} --quiet --options=NONE --list-kinds=Ruby && echo X > ${BUILDDIR}/tags ================================================ FILE: Tmain/tmain-example.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/tmain-example.d/stdout-expected.txt ================================================ c classes f methods m modules S singleton methods C constants A accessors a aliases L libraries ================================================ FILE: Tmain/tmain-example.d/tags-expected.txt ================================================ X ================================================ FILE: Tmain/tmain-skip-example.d/run.sh ================================================ # Copyright: 2015 Masatake YAMATO # License: GPL-2 . ../utils.sh if ${CTAGS} --quiet --options=NONE --list-features | grep -q afasdfasfasfsa; then echo else skip "example: no such feature" fi ================================================ FILE: Tmain/tmain-skip-example.d/stdout-expected.txt ================================================ THIS FILE WILL NOT BE USE. ================================================ FILE: Tmain/trace-option.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/trace-option.d/input.unknown ================================================ ================================================ FILE: Tmain/trace-option.d/run.sh ================================================ #!/bin/sh # Copyright: 2018 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh is_feature_available $CTAGS debug # For comparison the output and the expectation, sed removes signature parts from the output. $CTAGS --quiet --options=NONE --_trace=CTagsSelfTest --language-force=CTagsSelfTest ./input.unknown exit $? ================================================ FILE: Tmain/trace-option.d/stderr-expected.txt ================================================ [>> parseFile][at 0] Parsing file ./input.unknown [>> createCTSTTags][at 0] Parsing starts [<< createCTSTTags][at 0] [<< parseFile][at 0] ================================================ FILE: Tmain/two-inputs-requiring-scope-stack.d/a.dts ================================================ / { aa: c@0 { }; ab: c@1 { }; ac: c@2 { }; ad: c@3 { }; ae: c@4 { }; af: c@5 { }; ag: c@6 { }; ah: c@7 { }; ai: c@8 { }; aj: c@9 { }; ak: c@10 { }; al: c@11 { }; am: c@12 { }; an: c@13 { }; ao: c@14 { }; ap: c@15 { }; aq: c@16 { }; ar: c@17 { }; as: c@18 { }; at: c@19 { }; au: c@20 { }; av: c@21 { }; aw: c@22 { }; ax: c@23 { }; ay: c@24 { }; ba: c@25 { }; bb: c@26 { }; bc: c@27 { }; bd: c@28 { }; be: c@29 { }; bf: c@30 { }; bg: c@31 { }; bh: c@32 { }; bi: c@33 { }; bj: c@34 { }; bk: c@35 { }; bl: c@36 { }; bm: c@37 { }; bn: c@38 { }; bo: c@39 { }; bp: c@40 { }; bq: c@41 { }; br: c@42 { }; bs: c@43 { }; bt: c@44 { }; bu: c@45 { }; bv: c@46 { }; bw: c@47 { }; bx: c@48 { }; by: c@49 { }; ca: c@50 { }; cb: c@51 { }; cc: c@52 { }; cd: c@53 { }; ce: c@54 { }; cf: c@55 { }; cg: c@56 { }; ch: c@57 { }; ci: c@58 { }; cj: c@59 { }; ck: c@60 { }; cl: c@61 { }; cm: c@62 { }; cn: c@63 { }; co: c@64 { }; cp: c@65 { }; cq: c@66 { }; cr: c@67 { }; cs: c@68 { }; ct: c@69 { }; cu: c@70 { }; cv: c@71 { }; cw: c@72 { }; cx: c@73 { }; cy: c@74 { }; da: c@75 { }; db: c@76 { }; dc: c@77 { }; dd: c@78 { }; de: c@79 { }; df: c@80 { }; dg: c@81 { }; dh: c@82 { }; di: c@83 { }; dj: c@84 { }; dk: c@85 { }; dl: c@86 { }; dm: c@87 { }; dn: c@88 { }; do: c@89 { }; dp: c@90 { }; dq: c@91 { }; dr: c@92 { }; ds: c@93 { }; dt: c@94 { }; du: c@95 { }; dv: c@96 { }; dw: c@97 { }; dx: c@98 { }; dy: c@99 { }; ea: c@100 { }; eb: c@101 { }; ec: c@102 { }; ed: c@103 { }; ee: c@104 { }; ef: c@105 { }; eg: c@106 { }; eh: c@107 { }; ei: c@108 { }; ej: c@109 { }; ek: c@110 { }; el: c@111 { }; em: c@112 { }; en: c@113 { }; eo: c@114 { }; ep: c@115 { }; eq: c@116 { }; er: c@117 { }; es: c@118 { }; et: c@119 { }; eu: c@120 { }; ev: c@121 { }; ew: c@122 { }; ex: c@123 { }; ey: c@124 { }; fa: c@125 { }; fb: c@126 { }; fc: c@127 { }; fd: c@128 { }; fe: c@129 { }; ff: c@130 { }; fg: c@131 { }; fh: c@132 { }; fi: c@133 { }; fj: c@134 { }; fk: c@135 { }; fl: c@136 { }; fm: c@137 { }; fn: c@138 { }; fo: c@139 { }; fp: c@140 { }; fq: c@141 { }; fr: c@142 { }; fs: c@143 { }; ft: c@144 { }; fu: c@145 { }; fv: c@146 { }; fw: c@147 { }; fx: c@148 { }; fy: c@149 { }; ga: c@150 { }; gb: c@151 { }; gc: c@152 { }; gd: c@153 { }; ge: c@154 { }; gf: c@155 { }; gg: c@156 { }; gh: c@157 { }; gi: c@158 { }; gj: c@159 { }; gk: c@160 { }; gl: c@161 { }; gm: c@162 { }; gn: c@163 { }; go: c@164 { }; gp: c@165 { }; gq: c@166 { }; gr: c@167 { }; gs: c@168 { }; gt: c@169 { }; gu: c@170 { }; gv: c@171 { }; gw: c@172 { }; gx: c@173 { }; gy: c@174 { }; ha: c@175 { }; hb: c@176 { }; hc: c@177 { }; hd: c@178 { }; he: c@179 { }; hf: c@180 { }; hg: c@181 { }; hh: c@182 { }; hi: c@183 { }; hj: c@184 { }; hk: c@185 { }; hl: c@186 { }; hm: c@187 { }; hn: c@188 { }; ho: c@189 { }; hp: c@190 { }; hq: c@191 { }; hr: c@192 { }; hs: c@193 { }; ht: c@194 { }; hu: c@195 { }; hv: c@196 { }; hw: c@197 { }; hx: c@198 { }; hy: c@199 { }; ia: c@200 { }; ib: c@201 { }; ic: c@202 { }; id: c@203 { }; ie: c@204 { }; if: c@205 { }; ig: c@206 { }; ih: c@207 { }; ii: c@208 { }; ij: c@209 { }; ik: c@210 { }; il: c@211 { }; im: c@212 { }; in: c@213 { }; io: c@214 { }; ip: c@215 { }; iq: c@216 { }; ir: c@217 { }; is: c@218 { }; it: c@219 { }; iu: c@220 { }; iv: c@221 { }; iw: c@222 { }; ix: c@223 { }; iy: c@224 { }; ja: c@225 { }; jb: c@226 { }; jc: c@227 { }; jd: c@228 { }; je: c@229 { }; jf: c@230 { }; jg: c@231 { }; jh: c@232 { }; ji: c@233 { }; jj: c@234 { }; jk: c@235 { }; jl: c@236 { }; jm: c@237 { }; jn: c@238 { }; jo: c@239 { }; jp: c@240 { }; jq: c@241 { }; jr: c@242 { }; js: c@243 { }; jt: c@244 { }; ju: c@245 { }; jv: c@246 { }; jw: c@247 { }; jx: c@248 { }; jy: c@249 { }; ka: c@250 { }; kb: c@251 { }; kc: c@252 { }; kd: c@253 { }; ke: c@254 { }; kf: c@255 { }; kg: c@256 { }; kh: c@257 { }; ki: c@258 { }; kj: c@259 { }; kk: c@260 { }; kl: c@261 { }; km: c@262 { }; kn: c@263 { }; ko: c@264 { }; kp: c@265 { }; kq: c@266 { }; kr: c@267 { }; ks: c@268 { }; kt: c@269 { }; ku: c@270 { }; kv: c@271 { }; kw: c@272 { }; kx: c@273 { }; ky: c@274 { }; la: c@275 { }; lb: c@276 { }; lc: c@277 { }; ld: c@278 { }; le: c@279 { }; lf: c@280 { }; lg: c@281 { }; lh: c@282 { }; li: c@283 { }; lj: c@284 { }; lk: c@285 { }; ll: c@286 { }; lm: c@287 { }; ln: c@288 { }; lo: c@289 { }; lp: c@290 { }; lq: c@291 { }; lr: c@292 { }; ls: c@293 { }; lt: c@294 { }; lu: c@295 { }; lv: c@296 { }; lw: c@297 { }; lx: c@298 { }; ly: c@299 { }; ma: c@300 { }; mb: c@301 { }; mc: c@302 { }; md: c@303 { }; me: c@304 { }; mf: c@305 { }; mg: c@306 { }; mh: c@307 { }; mi: c@308 { }; mj: c@309 { }; mk: c@310 { }; ml: c@311 { }; mm: c@312 { }; mn: c@313 { }; mo: c@314 { }; mp: c@315 { }; mq: c@316 { }; mr: c@317 { }; ms: c@318 { }; mt: c@319 { }; mu: c@320 { }; mv: c@321 { }; mw: c@322 { }; mx: c@323 { }; my: c@324 { }; na: c@325 { }; nb: c@326 { }; nc: c@327 { }; nd: c@328 { }; ne: c@329 { }; nf: c@330 { }; ng: c@331 { }; nh: c@332 { }; ni: c@333 { }; nj: c@334 { }; nk: c@335 { }; nl: c@336 { }; nm: c@337 { }; nn: c@338 { }; no: c@339 { }; np: c@340 { }; nq: c@341 { }; nr: c@342 { }; ns: c@343 { }; nt: c@344 { }; nu: c@345 { }; nv: c@346 { }; nw: c@347 { }; nx: c@348 { }; ny: c@349 { }; oa: c@350 { }; ob: c@351 { }; oc: c@352 { }; od: c@353 { }; oe: c@354 { }; of: c@355 { }; og: c@356 { }; oh: c@357 { }; oi: c@358 { }; oj: c@359 { }; ok: c@360 { }; ol: c@361 { }; om: c@362 { }; on: c@363 { }; oo: c@364 { }; op: c@365 { }; oq: c@366 { }; or: c@367 { }; os: c@368 { }; ot: c@369 { }; ou: c@370 { }; ov: c@371 { }; ow: c@372 { }; ox: c@373 { }; oy: c@374 { }; pa: c@375 { }; pb: c@376 { }; pc: c@377 { }; pd: c@378 { }; pe: c@379 { }; pf: c@380 { }; pg: c@381 { }; ph: c@382 { }; pi: c@383 { }; pj: c@384 { }; pk: c@385 { }; pl: c@386 { }; pm: c@387 { }; pn: c@388 { }; po: c@389 { }; pp: c@390 { }; pq: c@391 { }; pr: c@392 { }; ps: c@393 { }; pt: c@394 { }; pu: c@395 { }; pv: c@396 { }; pw: c@397 { }; px: c@398 { }; py: c@399 { }; qa: c@400 { }; qb: c@401 { }; qc: c@402 { }; qd: c@403 { }; qe: c@404 { }; qf: c@405 { }; qg: c@406 { }; qh: c@407 { }; qi: c@408 { }; qj: c@409 { }; qk: c@410 { }; ql: c@411 { }; qm: c@412 { }; qn: c@413 { }; qo: c@414 { }; qp: c@415 { }; qq: c@416 { }; qr: c@417 { }; qs: c@418 { }; qt: c@419 { }; qu: c@420 { }; qv: c@421 { }; qw: c@422 { }; qx: c@423 { }; qy: c@424 { }; ra: c@425 { }; rb: c@426 { }; rc: c@427 { }; rd: c@428 { }; re: c@429 { }; rf: c@430 { }; rg: c@431 { }; rh: c@432 { }; ri: c@433 { }; rj: c@434 { }; rk: c@435 { }; rl: c@436 { }; rm: c@437 { }; rn: c@438 { }; ro: c@439 { }; rp: c@440 { }; rq: c@441 { }; rr: c@442 { }; rs: c@443 { }; rt: c@444 { }; ru: c@445 { }; rv: c@446 { }; rw: c@447 { }; rx: c@448 { }; ry: c@449 { }; sa: c@450 { }; sb: c@451 { }; sc: c@452 { }; sd: c@453 { }; se: c@454 { }; sf: c@455 { }; sg: c@456 { }; sh: c@457 { }; si: c@458 { }; sj: c@459 { }; sk: c@460 { }; sl: c@461 { }; sm: c@462 { }; sn: c@463 { }; so: c@464 { }; sp: c@465 { }; sq: c@466 { }; sr: c@467 { }; ss: c@468 { }; st: c@469 { }; su: c@470 { }; sv: c@471 { }; sw: c@472 { }; sx: c@473 { }; sy: c@474 { }; ta: c@475 { }; tb: c@476 { }; tc: c@477 { }; td: c@478 { }; te: c@479 { }; tf: c@480 { }; tg: c@481 { }; th: c@482 { }; ti: c@483 { }; tj: c@484 { }; tk: c@485 { }; tl: c@486 { }; tm: c@487 { }; tn: c@488 { }; to: c@489 { }; tp: c@490 { }; tq: c@491 { }; tr: c@492 { }; ts: c@493 { }; tt: c@494 { }; tu: c@495 { }; tv: c@496 { }; tw: c@497 { }; tx: c@498 { }; ty: c@499 { }; ua: c@500 { }; ub: c@501 { }; uc: c@502 { }; ud: c@503 { }; ue: c@504 { }; uf: c@505 { }; ug: c@506 { }; uh: c@507 { }; ui: c@508 { }; uj: c@509 { }; uk: c@510 { }; ul: c@511 { }; um: c@512 { }; un: c@513 { }; uo: c@514 { }; up: c@515 { }; uq: c@516 { }; ur: c@517 { }; us: c@518 { }; ut: c@519 { }; uu: c@520 { }; uv: c@521 { }; uw: c@522 { }; ux: c@523 { }; uy: c@524 { }; va: c@525 { }; vb: c@526 { }; vc: c@527 { }; vd: c@528 { }; ve: c@529 { }; vf: c@530 { }; vg: c@531 { }; vh: c@532 { }; vi: c@533 { }; vj: c@534 { }; vk: c@535 { }; vl: c@536 { }; vm: c@537 { }; vn: c@538 { }; vo: c@539 { }; vp: c@540 { }; vq: c@541 { }; vr: c@542 { }; vs: c@543 { }; vt: c@544 { }; vu: c@545 { }; vv: c@546 { }; vw: c@547 { }; vx: c@548 { }; vy: c@549 { }; wa: c@550 { }; wb: c@551 { }; wc: c@552 { }; wd: c@553 { }; we: c@554 { }; wf: c@555 { }; wg: c@556 { }; wh: c@557 { }; wi: c@558 { }; wj: c@559 { }; wk: c@560 { }; wl: c@561 { }; wm: c@562 { }; wn: c@563 { }; wo: c@564 { }; wp: c@565 { }; wq: c@566 { }; wr: c@567 { }; ws: c@568 { }; wt: c@569 { }; wu: c@570 { }; wv: c@571 { }; ww: c@572 { }; wx: c@573 { }; wy: c@574 { }; xa: c@575 { }; xb: c@576 { }; xc: c@577 { }; xd: c@578 { }; xe: c@579 { }; xf: c@580 { }; xg: c@581 { }; xh: c@582 { }; xi: c@583 { }; xj: c@584 { }; xk: c@585 { }; xl: c@586 { }; xm: c@587 { }; xn: c@588 { }; xo: c@589 { }; xp: c@590 { }; xq: c@591 { }; xr: c@592 { }; xs: c@593 { }; xt: c@594 { }; xu: c@595 { }; xv: c@596 { }; xw: c@597 { }; xx: c@598 { }; xy: c@599 { }; ya: c@600 { }; yb: c@601 { }; yc: c@602 { }; yd: c@603 { }; ye: c@604 { }; yf: c@605 { }; yg: c@606 { }; yh: c@607 { }; yi: c@608 { }; yj: c@609 { }; yk: c@610 { }; yl: c@611 { }; ym: c@612 { }; yn: c@613 { }; yo: c@614 { }; yp: c@615 { }; yq: c@616 { }; yr: c@617 { }; ys: c@618 { }; yt: c@619 { }; yu: c@620 { }; yv: c@621 { }; yw: c@622 { }; yx: c@623 { }; yy: c@624 { }; }; ================================================ FILE: Tmain/two-inputs-requiring-scope-stack.d/b.dts ================================================ / { b: b@0 { }; }; ================================================ FILE: Tmain/unreadable-input.d/input-1.c ================================================ int v1; ================================================ FILE: Tmain/unreadable-input.d/run.sh ================================================ #!/bin/sh # Copyright: 2020 Masatake YAMATO # License: GPL-2 CTAGS=$1 INPUT0=/tmp/u-ctags/input-0.c . ../utils.sh if ! type pidof > /dev/null 2>&1; then # pidof is needed to find auditd. skip "pidof command is not available" fi if ! pidof auditd > /dev/null 2>&1; then # sudo expects auditd is running. skip "auditd is not running" fi if [ $(id -u) = 0 ] && ! sudo -u '#1' $CTAGS --version > /dev/null; then skip "sudo needed in this test case doesn't work expectedly on this platform (execution)" fi mkdir -p ${INPUT0%/*} echo "int v0;" > ${INPUT0} chmod a-r ${INPUT0} if [ $(id -u) = 0 ] && sudo -u '#1' cat ${INPUT0} > /dev/null 2>&1; then rm ${INPUT0} skip "sudo needed in this test case doesn't work expectedly on this platform (file reading)" elif [ $(id -u) != 0 ] && cat ${INPUT0} > /dev/null 2>&1; then rm ${INPUT0} skip "chmod a-r doesn't work expectedly on this platform" fi { echo ${INPUT0} echo input-1.c } | { if [ $(id -u) = 0 ]; then # The root can read a file even we did "chmod a-r". sudo -u '#1' $CTAGS --quiet --options=NONE -L - -o - else $CTAGS --quiet --options=NONE -L - -o - fi } rm ${INPUT0} ================================================ FILE: Tmain/unreadable-input.d/stderr-expected.txt ================================================ ctags: Warning: cannot open "/tmp/u-ctags/input-0.c" : Permission denied ================================================ FILE: Tmain/unreadable-input.d/stdout-expected.txt ================================================ v1 input-1.c /^int v1;$/;" v typeref:typename:int ================================================ FILE: Tmain/utils.sh ================================================ __SKIP__=77 __INTERNAL_ERROR__=76 internal_error() { echo "$@" exit ${__INTERNAL_ERROR__} } skip() { echo "$@" exit ${__SKIP__} } remove_commit_id() { # Remove a commit id embedded in tags file sed -i -e '/!_TAG_PROGRAM_VERSION.*/s#/[^/]*/#//#' $1 } filesize() { wc -c < "$1" } is_feature_available() { local ctags=$1 local tmp=$2 local o="--quiet --options=NONE" local neg local feat if [ "${tmp}" = '!' ]; then neg=1 feat=$3 else feat=$2 fi if [ "${neg}" = 1 ]; then if ${ctags} $o --with-list-header=no --list-features | grep -q "$feat"; then skip "feature \"$feat\" is available in $ctags" fi else if ! ${ctags} $o --with-list-header=no --list-features | grep -q "$feat"; then skip "feature \"$feat\" is not available in $ctags" fi fi } skip_if_user_has_dot_ctags_d() { if [ -d ~/.ctags.d ]; then skip "this test case doesn't work well if you have ~/.ctags.d" fi } skip_if_no_readtags() { if [ -z "${1}" ]; then internal_error 'skip_if_no_readtags(): missing "$1"' fi if ! [ -x "${1}" ]; then skip "no readtags" fi } skip_if_running_on_msys() { if [ -n "$MSYSTEM" ]; then skip "this test case doesn't work well on MSYS2" fi } exit_if_win32() { is_feature_available $1 '!' win32 } exit_unless_win32() { is_feature_available $1 win32 } exit_if_no_case_insensitive_filenames() { is_feature_available $1 case-insensitive-filenames } run_with_format() { echo '#' $* local format=$1 shift ${CTAGS} --quiet --options=NONE --output-format=$format "$@" -o - input.* } exit_status_for_input_c() { local ctags=$1 shift local remove_file=$1 shift printf "%s => " "$(echo "$*" | sed -e 's#[^ ][^ ]*/\([^ ]*\)#\1#g')" ${ctags} --quiet --options=NONE "$@" input.c > /dev/null local result_local=$? if [ "$remove_file" != "none" ]; then rm -f "$remove_file" fi if [ "$result_local" = 0 ]; then echo "ok" else echo "failed" fi } get_column_index() { local index=0 local ctags=$1 local option=$2 local column=$3 for x in $($ctags --quiet --options=NONE --with-list-header "$option" | sed -ne 's/^#\(.*\)$/\1/p'); do if [ "$x" = "$column" ]; then echo $index return 0 fi index=$(expr $index + 1) done echo -1 return 1 } filter_by_column_index() { local index=$1 awk '{print $'$(expr $index + 1)'}' } echo2() { # use a external echo command here. # built-in echo suppresses \1. /bin/echo "$@" /bin/echo "$@" 1>&2 } direq_maybe () { [ "$(cd ${1} && pwd)" = "$(cd ${2} && pwd)" ] return $? } check_encoding() { if iconv -l 2> /dev/null | grep -qi "$1"; then return 0 fi skip "iconv doesn't know about the encoding: $1" } jdropver() { sed -e 's/, "version": "[0-9.]*"//' } ================================================ FILE: Tmain/version-option.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/version-option.d/run.sh ================================================ # Copyright: 2022 Masatake YAMATO # License: GPL-2 CTAGS="$1" $CTAGS --quiet --options=NONE --version=C ================================================ FILE: Tmain/version-option.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/version-option.d/stdout-expected.txt ================================================ parser/C: 2.2 ================================================ FILE: Tmain/versioning.d/broken-extra.ctags ================================================ --langdef=TEST{version=10.9} --_extradef-TEST=fullname,extended full name{version=-4} ================================================ FILE: Tmain/versioning.d/broken-field.ctags ================================================ --langdef=TEST{version=10.9} --_fielddef-TEST=param,parameters{version=-3} ================================================ FILE: Tmain/versioning.d/broken-kind.ctags ================================================ --langdef=TEST{version=10.9} --kinddef-TEST=d,def,definitions{version=-1} ================================================ FILE: Tmain/versioning.d/broken-role.ctags ================================================ --langdef=TEST{version=10.9} --kinddef-TEST=m,macro,macros{version=3} --_roledef-TEST.{macro}=expanded,expanded macros{version=-2} ================================================ FILE: Tmain/versioning.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/versioning.d/run.sh ================================================ #!/bin/sh # Copyright: 2022 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --langdef=TEST'{version=a.9}' --version=TEST ${CTAGS} --quiet --options=NONE --langdef=TEST'{version=10.b}' --version=TEST ${CTAGS} --quiet --options=NONE --langdef=TEST'{version=-1.9}' --version=TEST ${CTAGS} --quiet --options=NONE --langdef=TEST'{version=10.-3}' --version=TEST ${CTAGS} --quiet --options=NONE --options=./test.ctags --version=TEST ${CTAGS} --quiet --options=NONE --options=./test.ctags --list-kinds-full=TEST ${CTAGS} --quiet --options=NONE --options=./test.ctags --list-roles=TEST ${CTAGS} --quiet --options=NONE --options=./test.ctags --list-fields=TEST ${CTAGS} --quiet --options=NONE --options=./test.ctags --list-extras=TEST ${CTAGS} --quiet --options=NONE --options=./test.ctags --describe-language=TEST ${CTAGS} --quiet --options=NONE --options=./broken-kind.ctags --_force-quit=0 echo broken kind: $? 1>&2 ${CTAGS} --quiet --options=NONE --options=./broken-role.ctags --_force-quit=0 echo broken role: $? 1>&2 ${CTAGS} --quiet --options=NONE --options=./broken-field.ctags --_force-quit=0 echo broken field: $? 1>&2 ${CTAGS} --quiet --options=NONE --options=./broken-extra.ctags --_force-quit=0 echo broken extra: $? 1>&2 ${CTAGS} --quiet --options=NONE --options=./warning-kind.ctags --_force-quit=0 echo warning kind: $? 1>&2 ${CTAGS} --quiet --options=NONE --options=./warning-role.ctags --_force-quit=0 echo warning role: $? 1>&2 ${CTAGS} --quiet --options=NONE --options=./warning-field.ctags --_force-quit=0 echo warning field: $? 1>&2 ${CTAGS} --quiet --options=NONE --options=./warning-extra.ctags --_force-quit=0 echo warning extra: $? 1>&2 ================================================ FILE: Tmain/versioning.d/stderr-expected.txt ================================================ ctags: Failed to parse the version number (the current part) for language "TEST": a.9 ctags: Failed to parse the version number (the age part) for language "TEST": 10.b ctags: Failed to parse the version number (the current part) for language "TEST": -1.9 ctags: Failed to parse the version number (the age part) for language "TEST": 10.-3 ctags: Failed to parse the version number for kind "def": -1 broken kind: 1 ctags: Failed to parse the version number for role "expanded": -2 broken role: 1 ctags: Failed to parse the version number for field "param": -3 broken field: 1 ctags: Failed to parse the version number for extra "fullname": -4 broken extra: 1 ctags: Warning: the version number (11) of kind "d,def" of language "TEST" should be less than or equal to the current number (10) of the language warning kind: 0 ctags: Warning: the version number (11) of role "expanded" of language "TEST" should be less than or equal to the current number (10) of the language warning role: 0 ctags: Warning: the version number (11) of field "param" of language "TEST" should be less than or equal to the current number (10) of the language warning field: 0 ctags: Warning: the version number (11) of extra "fullname" of language "TEST" should be less than or equal to the current number (10) of the language warning extra: 0 ================================================ FILE: Tmain/versioning.d/stdout-expected.txt ================================================ parser/TEST: 10.9 #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION d def yes no 0 NONE 6 definitions m macro yes no 2 NONE 3 macros #KIND(L/N) NAME ENABLED VER DESCRIPTION m/macro expanded on 4 expanded macros m/macro redef on 5 redefinied macros #LETTER NAME ENABLED LANGUAGE JSTYPE FIXED OP VER DESCRIPTION - local no TEST s-- no -- 6 used in narrow scopes - param no TEST s-- no -- 4 parameters #LETTER NAME ENABLED LANGUAGE FIXED VER DESCRIPTION - fullname no TEST no 9 extended full name - shortname no TEST no 10 the named only narow scopes About TEST language ======================================================= enabled: yes version: 10.9 Mappings/rexprs ------------------------------------------------------- Mappings/patterns ------------------------------------------------------- MYTEST Mappings/extensions ------------------------------------------------------- *.mytest Aliases ------------------------------------------------------- #ALIAS my-test Kinds ------------------------------------------------------- #LETTER NAME ENABLED REFONLY NROLES MASTER VER DESCRIPTION d def yes no 0 NONE 6 definitions m macro yes no 2 NONE 3 macros Roles ------------------------------------------------------- #KIND(L/N) NAME ENABLED VER DESCRIPTION m/macro expanded on 4 expanded macros m/macro redef on 5 redefinied macros Fields ------------------------------------------------------- #LETTER NAME ENABLED LANGUAGE JSTYPE FIXED OP VER DESCRIPTION - local no TEST s-- no -- 6 used in narrow scopes - param no TEST s-- no -- 4 parameters Extras ------------------------------------------------------- #LETTER NAME ENABLED LANGUAGE FIXED VER DESCRIPTION - fullname no TEST no 9 extended full name - shortname no TEST no 10 the named only narow scopes Parameters ------------------------------------------------------- #NAME DESCRIPTION debug enable the debug features Sub parsers stacked on this parser ------------------------------------------------------- #NAME BASEPARSER DIRECTIONS EXAMINE TEST base => sub {shared} Implementation specific status ------------------------------------------------------- allow null tags: no ================================================ FILE: Tmain/versioning.d/test.ctags ================================================ --langdef=TEST{version=10.9} --map-TEST=+.mytest --map-TEST=+(MYTEST) --alias-TEST=+my-test --kinddef-TEST=d,def,definitions{version=6} --kinddef-TEST=m,macro,macros{version=3} --_roledef-TEST.{macro}=expanded,expanded macros{version=4} --_roledef-TEST.{macro}=redef,redefinied macros{version=5} --_fielddef-TEST=param,parameters{version=4} --_fielddef-TEST=local,used in narrow scopes{version=6} --_extradef-TEST=fullname,extended full name{version=9} --_extradef-TEST=shortname,the named only narow scopes{version=10} --_paramdef-TEST=debug,enable the debug features --langdef=EXAMINE{base=TEST}{shared} ================================================ FILE: Tmain/versioning.d/warning-extra.ctags ================================================ --langdef=TEST{version=10.9} --_extradef-TEST=fullname,extended full name{version=11} ================================================ FILE: Tmain/versioning.d/warning-field.ctags ================================================ --langdef=TEST{version=10.9} --_fielddef-TEST=param,parameters{version=11} ================================================ FILE: Tmain/versioning.d/warning-kind.ctags ================================================ --langdef=TEST{version=10.9} --kinddef-TEST=d,def,definitions{version=11} ================================================ FILE: Tmain/versioning.d/warning-role.ctags ================================================ --langdef=TEST{version=10.9} --kinddef-TEST=m,macro,macros{version=3} --_roledef-TEST.{macro}=expanded,expanded macros{version=11} ================================================ FILE: Tmain/w32-slash-in-exclude-option.d/input.d/capture_me/input.c ================================================ int capture_me_1(void) { return 0; } ================================================ FILE: Tmain/w32-slash-in-exclude-option.d/input.d/dont_capture_me/input.c ================================================ int dont_capture_me(void) { return 0; } ================================================ FILE: Tmain/w32-slash-in-exclude-option.d/input.d/input.c ================================================ int capture_me_0(void) { return 0; } ================================================ FILE: Tmain/w32-slash-in-exclude-option.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh exit_unless_win32 "$CTAGS" MSYS2_ARG_CONV_EXCL=dont_capture_me/input.c ${CTAGS} --quiet --options=NONE -R -o - \ --exclude='input.d/dont_capture_me/input.c' input.d ================================================ FILE: Tmain/w32-slash-in-exclude-option.d/stdout-expected.txt ================================================ capture_me_0 input.d/input.c /^int capture_me_0(void)$/;" f typeref:typename:int capture_me_1 input.d/capture_me/input.c /^int capture_me_1(void)$/;" f typeref:typename:int ================================================ FILE: Tmain/warn-garbage-on-ostack.d/exit-expected.txt ================================================ 0 ================================================ FILE: Tmain/warn-garbage-on-ostack.d/garbage.ctags ================================================ --langdef=Garbage --map-Garbage=.garbage --regex-Garbage=/a//{{ /garbage0 (garbage1) }} ================================================ FILE: Tmain/warn-garbage-on-ostack.d/input.garbage ================================================ a ================================================ FILE: Tmain/warn-garbage-on-ostack.d/input.kconfig ================================================ config BCH_CONST_M ================================================ FILE: Tmain/warn-garbage-on-ostack.d/run.sh ================================================ # Copyright: 2025 Masatake YAMATO # License: GPL-2 CTAGS=$1 $CTAGS --quiet --options=NONE --options=./garbage.ctags -o - input.garbage $CTAGS --quiet --options=NONE --map-Kconfig=+.kconfig -o - input.kconfig > /dev/null ================================================ FILE: Tmain/warn-garbage-on-ostack.d/stderr-expected.txt ================================================ ctags: Warning: [Garbage] 2 objects are left on the operand stack: input.garbage ================================================ FILE: Tmain/warn-garbage-on-ostack.d/stdout-expected.txt ================================================ ================================================ FILE: Tmain/warn-reusing-kind-letter.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE \ --langdef=X \ --regex-X='/./\0/a,anyobject/' \ --regex-X='/./\0/a,anyitem/' \ --langdef=Y \ --regex-Y='/./\0/b,any' \ --regex-Y='/./\0/b,any' \ --_force-quit=0 2>&1 | sed -e 's/.*ctags\(.exe\)\{0,1\}: //' ================================================ FILE: Tmain/warn-reusing-kind-letter.d/stdout-expected.txt ================================================ Warning: Don't reuse the kind letter `a' in a language X (old: "anyobject", new: "anyitem") ================================================ FILE: Tmain/wildcard-in-lang-of-fields-option.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE \ -o - --fields-all=+{signature}-{typeref} --list-fields | grep 'signature\|typeref' ================================================ FILE: Tmain/wildcard-in-lang-of-fields-option.d/stdout-expected.txt ================================================ S signature yes NONE s-- no rw 0 Signature of routine (e.g. prototype or parameter list) t typeref no NONE s-- no rw 0 Type and name of a variable or typedef ================================================ FILE: Tmain/wrong-parser-name-in-field.d/exit-expected.txt ================================================ 1 ================================================ FILE: Tmain/wrong-parser-name-in-field.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --fields-Cxx=+{end} --list-fields=Cxx exit $? ================================================ FILE: Tmain/wrong-parser-name-in-field.d/stderr-expected.txt ================================================ ctags: Warning: Unknown language: Cxx (ignoring "--fields-Cxx") ctags: Unknown language "Cxx" in "list-fields" option ================================================ FILE: Tmain/xref-output-common-fields.d/input.py ================================================ class Foo: def doIt(): pass ================================================ FILE: Tmain/xref-output-common-fields.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 ${CTAGS} --quiet --options=NONE --list-fields | while read K REST; do if ! [ "$K" = '-' ]; then echo "field: $K" ${CTAGS} --quiet --options=NONE -x --_xformat="output: %N %${K}" -o - input.py echo "status: $?" echo fi done ================================================ FILE: Tmain/xref-output-common-fields.d/stdout-expected.txt ================================================ field: #LETTER status: 1 field: N output: Foo Foo output: doIt doIt status: 0 field: F output: Foo input.py output: doIt input.py status: 0 field: P output: Foo /^class Foo:$/ output: doIt /^ def doIt():$/ status: 0 field: C output: Foo class Foo: output: doIt def doIt(): status: 0 field: E output: Foo output: doIt status: 0 field: K output: Foo class output: doIt member status: 0 field: R output: Foo D output: doIt D status: 0 field: S output: Foo - output: doIt () status: 0 field: T output: Foo 0 output: doIt 0 status: 0 field: Z output: Foo output: doIt Foo status: 0 field: a output: Foo public output: doIt public status: 0 field: e output: Foo 3 output: doIt 3 status: 0 field: f output: Foo - output: doIt - status: 0 field: i output: Foo output: doIt - status: 0 field: k output: Foo c output: doIt m status: 0 field: l output: Foo Python output: doIt Python status: 0 field: m output: Foo - output: doIt - status: 0 field: n output: Foo 1 output: doIt 2 status: 0 field: o output: Foo output: doIt status: 0 field: p output: Foo output: doIt class status: 0 field: r output: Foo def output: doIt def status: 0 field: s output: Foo output: doIt Foo status: 0 field: t output: Foo - output: doIt - status: 0 field: x output: Foo output: doIt status: 0 field: z output: Foo class output: doIt member status: 0 ================================================ FILE: Tmain/xref-output-formatting-parser-specific-field.d/input.rst ================================================ Top level ============== subsection -------------- ================================================ FILE: Tmain/xref-output-formatting-parser-specific-field.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 echo "#" echo "# JUST LONG NAME" echo "#" ${CTAGS} --quiet --options=NONE \ -x \ --_xformat="%10N %10{sectionMarker}" \ input.rst echo "#" echo "# LANG, LONG NAME" echo "#" ${CTAGS} --quiet --options=NONE \ -x \ --_xformat="%10N %10{reStructuredText.sectionMarker}" \ input.rst echo "#" echo "# WILDCARD, LONG NAME" echo "#" ${CTAGS} --quiet --options=NONE \ -x \ --_xformat="%10N %10{*.sectionMarker}" \ input.rst echo "#" echo "# WRONG LANGUAGE" echo "#" ${CTAGS} --quiet --options=NONE \ -x \ --_xformat="%10N %10{NOSUCHLANG.sectionMarker}" \ input.rst echo "#" echo "# WRONG FIELD" echo "#" ${CTAGS} --quiet --options=NONE \ -x \ --_xformat="%10N %10{NOSUCHFIELD}" \ input.rst echo "#" echo "# ENABLING COMMON FIELD BY SPECIFYING WILDCARD" echo "#" ${CTAGS} --quiet --options=NONE \ -x \ --_xformat="%10N %10{*.language}" \ input.rst echo "#" echo "# LIST: ENABLING COMMON FIELD BY SPECIFYING WILDCARD" echo "#" ${CTAGS} --quiet --options=NONE \ -x \ --_xformat="%10N %10{*.language}" \ --list-fields | grep -v NSIS | grep language exit $? ================================================ FILE: Tmain/xref-output-formatting-parser-specific-field.d/stderr-expected.txt ================================================ ctags: No such field name: sectionMarker ctags: No suitable parser for field name: NOSUCHLANG.sectionMarker ctags: No such field name: NOSUCHFIELD ================================================ FILE: Tmain/xref-output-formatting-parser-specific-field.d/stdout-expected.txt ================================================ # # JUST LONG NAME # # # LANG, LONG NAME # Top level = subsection - # # WILDCARD, LONG NAME # Top level = subsection - # # WRONG LANGUAGE # # # WRONG FIELD # # # ENABLING COMMON FIELD BY SPECIFYING WILDCARD # Top level ReStructuredText subsection ReStructuredText # # LIST: ENABLING COMMON FIELD BY SPECIFYING WILDCARD # l language yes NONE s-- no r- 0 Language of input file containing tag - target yes Thrift s-- no -- 0 the target language specified at "namespace" ================================================ FILE: Tmain/xref-output-ptag-in-list-extras.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 O=/tmp/ctags-tmain-$$ echo '#' tags regular file "${CTAGS}" --options=NONE --output-format=u-ctags -o $O --list-extras | grep pseudo echo '#' tags - "${CTAGS}" --options=NONE --output-format=u-ctags -o - --list-extras | grep pseudo echo '#' tags NOTHING "${CTAGS}" --options=NONE --output-format=u-ctags --list-extras | grep pseudo echo '#' xref regular file "${CTAGS}" --options=NONE --output-format=xref -o $O --list-extras | grep pseudo echo '#' xref - "${CTAGS}" --options=NONE --output-format=xref -o - --list-extras | grep pseudo echo '#' xref NOTHING "${CTAGS}" --options=NONE --output-format=xref --list-extras | grep pseudo rm -f $O ================================================ FILE: Tmain/xref-output-ptag-in-list-extras.d/stdout-expected.txt ================================================ # tags regular file p pseudo yes NONE no 0 Include pseudo tags # tags - p pseudo no NONE no 0 Include pseudo tags # tags NOTHING p pseudo yes NONE no 0 Include pseudo tags # xref regular file p pseudo no NONE no 0 Include pseudo tags # xref - p pseudo no NONE no 0 Include pseudo tags # xref NOTHING p pseudo no NONE no 0 Include pseudo tags ================================================ FILE: Tmain/xref-output-to-file.d/input.c ================================================ #include static int foo (void) { return 1; } int main(void) { return foo(); } ================================================ FILE: Tmain/xref-output-to-file.d/run.sh ================================================ # Copyright: 2017 Masatake YAMATO # License: GPL-2 CTAGS=$1 . ../utils.sh O=/tmp/ctags-tmain-$$.xref $CTAGS --quiet --options=NONE --output-format=xref -f ${O} input.c > /dev/null && cat ${O} s=$? rm -f ${O} exit $s ================================================ FILE: Tmain/xref-output-to-file.d/stdout-expected.txt ================================================ foo function 3 input.c static int foo (void) main function 9 input.c main(void) ================================================ FILE: Tmain/xref-output-typed-fields.d/input.c ================================================ static int local; int global; ================================================ FILE: Tmain/xref-output-typed-fields.d/input.ctst ================================================ f ================================================ FILE: Tmain/xref-output-typed-fields.d/input.rst ================================================ ============================================== TITLE ============================================== section ....... ================================================ FILE: Tmain/xref-output-typed-fields.d/run.sh ================================================ # Copyright: 2016 Masatake YAMATO # License: GPL-2 CTAGS=$1 echo '# input.ctst' ${CTAGS} --quiet --options=NONE -o - \ --output-format=xref --_xformat='%{name} -> b=%{CTagsSelfTest.bField},sb=%{CTagsSelfTest.sbField},s=%{CTagsSelfTest.sField},i=%{CTagsSelfTest.iField}' \ --language-force=CTagsSelfTest input.ctst echo '# input.rst' ${CTAGS} --quiet --options=NONE -o - \ --output-format=xref --_xformat='%{name} -> %{RestructuredText.overline}' \ input.rst echo '# input.c' ${CTAGS} --quiet --options=NONE -o - \ --output-format=xref --_xformat='%{name} -> %{file}' \ input.c ================================================ FILE: Tmain/xref-output-typed-fields.d/stderr-expected.txt ================================================ ================================================ FILE: Tmain/xref-output-typed-fields.d/stdout-expected.txt ================================================ # input.ctst atag -> b=-,sb=,s=,i= btag -> b=bField,sb=,s=,i= ctag -> b=bField,sb=,s=,i= dtag -> b=-,sb=val,s=,i= etag -> b=-,sb=-,s=,i= ftag -> b=-,sb=,s=val,i= gtag -> b=-,sb=,s=,i= htag -> b=-,sb=,s=,i=23 itag -> b=-,sb=,s=,i=-3 jtag -> b=-,sb=,s=,i=1 ktag -> b=-,sb=,s=,i=0 # input.rst TITLE -> overline section -> - # input.c global -> - local -> file ================================================ FILE: Units/afl-fuzz.r/github-issue-528-sml.d/expected.tags ================================================ ================================================ FILE: Units/afl-fuzz.r/github-issue-528-sml.d/input.sml ================================================ and ================================================ FILE: Units/afl-fuzz.r/github-issue-529-bas.d/input.bas ================================================ : : ================================================ FILE: Units/afl-fuzz.r/github-issue-530-css.d/input.css ================================================ 0[" ================================================ FILE: Units/afl-fuzz.r/github-issue-531-make.d/input.mk ================================================ define 0 ================================================ FILE: Units/afl-fuzz.r/github-issue-532-vim.d/input.vim ================================================ vn 0 ================================================ FILE: Units/afl-fuzz.r/github-issue-536-flex.d/input.as ================================================ 0' '={0:0 ================================================ FILE: Units/afl-fuzz.r/github-issue-537-beta.d/input.bet ================================================ --0 0:-- ================================================ FILE: Units/afl-fuzz.r/github-issue-538-sql.d/input.sql ================================================ cursor ' ================================================ FILE: Units/afl-fuzz.r/github-issue-539-js.d/input.js ================================================ let` ================================================ FILE: Units/afl-fuzz.r/github-issue-540-fortran.d/input.f ================================================ type;generic" ================================================ FILE: Units/afl-fuzz.r/github-issue-541-json.d/input.json ================================================ {"\ ================================================ FILE: Units/afl-fuzz.r/github-issue-542-vhdl.d/input.vhdl ================================================ constant" ================================================ FILE: Units/afl-fuzz.r/github-issue-543-eiffel.d/input.e ================================================ class feature d alias" ================================================ FILE: Units/afl-fuzz.r/github-issue-625-r.d/input.r ================================================ 0<- ================================================ FILE: Units/afl-fuzz.r/github-issue-627-perl.d/input.pl ================================================ use constant{,=> ================================================ FILE: Units/afl-fuzz.r/github-issue-628-vera.d/input.vr ================================================ typedef interface c e; ================================================ FILE: Units/csharp-review-needed.r/array_ref_and_out.cs.t/expected.tags ================================================ FillArray input.cs /^ static public void FillArray(out int[] myArray) $/;" m class:TestOut Main input.cs /^ static public void Main() $/;" m class:TestOut MyMethod input.cs /^public static void MyMethod(out int[] arr) $/;" m MyMethod input.cs /^public static void MyMethod(ref int[] arr) $/;" m TestOut input.cs /^class TestOut $/;" c ================================================ FILE: Units/csharp-review-needed.r/array_ref_and_out.cs.t/input.cs ================================================ // Programmer's Reference: Passing Array Using ref and out public static void MyMethod(out int[] arr) { arr = new int[10]; // definite assignment of arr } public static void MyMethod(ref int[] arr) { arr = new int[10]; // arr initialized to a different array } using System; class TestOut { static public void FillArray(out int[] myArray) { // Initialize the array: myArray = new int[5] {1, 2, 3, 4, 5}; } static public void Main() { int[] myArray; // Initialization is not required // Pass the array to the callee using out: FillArray(out myArray); // Display the array elements: Console.WriteLine("Array elements are:"); for (int i=0; i < myArray.Length; i++) Console.WriteLine(myArray[i]); } } ================================================ FILE: Units/csharp-review-needed.r/attributes.cs.t/expected.tags ================================================ Author input.cs /^ public Author(string name) { this.name = name; version = 1.0; }$/;" m class:Author Author input.cs /^public class Author : Attribute$/;" c MyDllimportClass input.cs /^[DllImport] public class MyDllimportClass {}$/;" c TraceMethod input.cs /^[Conditional("DEBUG"), Conditional("TEST1")] void TraceMethod() {}$/;" m name input.cs /^ string name;$/;" f class:Author file: version input.cs /^ public double version;$/;" f class:Author ================================================ FILE: Units/csharp-review-needed.r/attributes.cs.t/input.cs ================================================ [DllImport] public class MyDllimportClass {} [DllImport("user32.dll", SetLastError=false, ExactSpelling=false)] [DllImport("user32.dll", ExactSpelling=false, SetLastError=false)] [DllImport("user32.dll")] [Conditional("DEBUG"), Conditional("TEST1")] void TraceMethod() {} using System; [AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct)] public class Author : Attribute { public Author(string name) { this.name = name; version = 1.0; } public double version; string name; } [AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct, AllowMultiple=true)] // multiuse attribute public class Author : Attribute { } ================================================ FILE: Units/csharp-review-needed.r/bug1515910.cs.t/expected.tags ================================================ C input.cs /^public class C {$/;" c Enum1 input.cs /^enum Enum1 : byte {$/;" g MyGenericClass1 input.cs /^public class MyGenericClass1 { }$/;" c Value1 input.cs /^ Value1, Values$/;" e enum:Enum1 file: Values input.cs /^ Value1, Values$/;" e enum:Enum1 file: int1 input.cs /^ private int int1 = 123;$/;" f class:C file: str1 input.cs /^ private string str1 = @"abc\\";$/;" f class:C file: str2 input.cs /^ private string str2 = @"abc\\";$/;" f class:C file: str3 input.cs /^ private string str3 = "abc";$/;" f class:C file: ================================================ FILE: Units/csharp-review-needed.r/bug1515910.cs.t/input.cs ================================================ // Simple generic classes. public class MyGenericClass1 { } // Derived enums. enum Enum1 : byte { Value1, Values } // Verbatim strings. public class C { private string str1 = @"abc\"; private int int1 = 123; private string str2 = @"abc\"; private string str3 = "abc"; } ================================================ FILE: Units/csharp-review-needed.r/bug1611054.cs.t/expected.tags ================================================ C input.cs /^class C {$/;" c a input.cs /^ public String a() {$/;" m class:C b input.cs /^ public void b() {$/;" m class:C ================================================ FILE: Units/csharp-review-needed.r/bug1611054.cs.t/input.cs ================================================ class C { public String a() { return @"c:\"; } // this tag is missing in ctags 5.6 public void b() { } } ================================================ FILE: Units/csharp-review-needed.r/bug1800065.cs.t/expected.tags ================================================ C input.cs /^public class C {$/;" c title input.cs /^ private string title;$/;" f class:C file: window input.cs /^ private Gtk.Window window;$/;" f class:C file: ================================================ FILE: Units/csharp-review-needed.r/bug1800065.cs.t/input.cs ================================================ using Gtk; public class C { private Gtk.Window window; private string title; } ================================================ FILE: Units/csharp-review-needed.r/bug1830343.cs.t/expected.tags ================================================ ForEachTest input.cs /^class ForEachTest {$/;" c Main input.cs /^ static void Main(string[] args) {$/;" m class:ForEachTest file: ================================================ FILE: Units/csharp-review-needed.r/bug1830343.cs.t/input.cs ================================================ class ForEachTest { static void Main(string[] args) { int[] fibarray = new int[] { 0, 1, 2, 3, 5, 8, 13 }; foreach (int i in fibarray) { System.Console.WriteLine(i); } } } ================================================ FILE: Units/csharp-review-needed.r/bug1830344.cs.t/expected.tags ================================================ C input.cs /^public class C {$/;" c m input.cs /^ public void m() {$/;" m class:C ================================================ FILE: Units/csharp-review-needed.r/bug1830344.cs.t/input.cs ================================================ public class C { public void m() { bool flagCheck = true; if (flagCheck == true) { Console.WriteLine("true"); } else { Console.WriteLine("false"); } } } ================================================ FILE: Units/csharp-review-needed.r/bug2411878.cs.t/expected.tags ================================================ C input.cs /^public class C {$/;" c m_name input.cs /^ private System.String m_name;$/;" f class:C file: ================================================ FILE: Units/csharp-review-needed.r/bug2411878.cs.t/input.cs ================================================ public class C { private System.String m_name; } ================================================ FILE: Units/csharp-review-needed.r/events.cs.t/expected.tags ================================================ Add input.cs /^ public override int Add(object value) $/;" m class:MyCollections.ListWithChangedEvent Changed input.cs /^ public event ChangedEventHandler Changed;$/;" E class:MyCollections.ListWithChangedEvent Changed input.cs /^ public event EventHandler Changed;$/;" E class:MyCollections.ListWithChangedEvent ChangedEventHandler input.cs /^ public delegate void ChangedEventHandler(object sender, EventArgs e);$/;" m namespace:MyCollections Clear input.cs /^ public override void Clear() $/;" m class:MyCollections.ListWithChangedEvent Detach input.cs /^ public void Detach() $/;" m class:TestEvents.EventListener EventListener input.cs /^ public EventListener(ListWithChangedEvent list) $/;" m class:TestEvents.EventListener EventListener input.cs /^ class EventListener $/;" c namespace:TestEvents List input.cs /^ private ListWithChangedEvent List;$/;" f class:TestEvents.EventListener file: ListChanged input.cs /^ private void ListChanged(object sender, EventArgs e) $/;" m class:TestEvents.EventListener file: ListWithChangedEvent input.cs /^ public class ListWithChangedEvent: ArrayList $/;" c namespace:MyCollections Main input.cs /^ public static void Main() $/;" m class:TestEvents.Test MyCollections input.cs /^namespace MyCollections $/;" n OnChanged input.cs /^ protected virtual void OnChanged(EventArgs e) $/;" m class:MyCollections.ListWithChangedEvent Test input.cs /^ class Test $/;" c namespace:TestEvents TestEvents input.cs /^namespace TestEvents $/;" n ================================================ FILE: Units/csharp-review-needed.r/events.cs.t/input.cs ================================================ // events1.cs using System; namespace MyCollections { using System.Collections; // A delegate type for hooking up change notifications. public delegate void ChangedEventHandler(object sender, EventArgs e); // A class that works just like ArrayList, but sends event // notifications whenever the list changes. public class ListWithChangedEvent: ArrayList { // An event that clients can use to be notified whenever the // elements of the list change. public event ChangedEventHandler Changed; // Invoke the Changed event; called whenever list changes protected virtual void OnChanged(EventArgs e) { if (Changed != null) Changed(this, e); } // Override some of the methods that can change the list; // invoke event after each public override int Add(object value) { int i = base.Add(value); OnChanged(EventArgs.Empty); return i; } public override void Clear() { base.Clear(); OnChanged(EventArgs.Empty); } public override object this[int index] { set { base[index] = value; OnChanged(EventArgs.Empty); } } } } namespace TestEvents { using MyCollections; class EventListener { private ListWithChangedEvent List; public EventListener(ListWithChangedEvent list) { List = list; // Add "ListChanged" to the Changed event on "List". List.Changed += new ChangedEventHandler(ListChanged); } // This will be called whenever the list changes. private void ListChanged(object sender, EventArgs e) { Console.WriteLine("This is called when the event fires."); } public void Detach() { // Detach the event and delete the list List.Changed -= new ChangedEventHandler(ListChanged); List = null; } } class Test { // Test the ListWithChangedEvent class. public static void Main() { // Create a new list. ListWithChangedEvent list = new ListWithChangedEvent(); // Create a class that listens to the list's change event. EventListener listener = new EventListener(list); // Add and remove items from the list. list.Add("item 1"); list.Clear(); listener.Detach(); } } } // events2.cs using System; namespace MyCollections { using System.Collections; // A class that works just like ArrayList, but sends event // notifications whenever the list changes: public class ListWithChangedEvent: ArrayList { // An event that clients can use to be notified whenever the // elements of the list change: public event EventHandler Changed; // Invoke the Changed event; called whenever list changes: protected virtual void OnChanged(EventArgs e) { if (Changed != null) Changed(this,e); } // Override some of the methods that can change the list; // invoke event after each: public override int Add(object value) { int i = base.Add(value); OnChanged(EventArgs.Empty); return i; } public override void Clear() { base.Clear(); OnChanged(EventArgs.Empty); } public override object this[int index] { set { base[index] = value; OnChanged(EventArgs.Empty); } } } } namespace TestEvents { using MyCollections; class EventListener { private ListWithChangedEvent List; public EventListener(ListWithChangedEvent list) { List = list; // Add "ListChanged" to the Changed event on "List": List.Changed += new EventHandler(ListChanged); } // This will be called whenever the list changes: private void ListChanged(object sender, EventArgs e) { Console.WriteLine("This is called when the event fires."); } public void Detach() { // Detach the event and delete the list: List.Changed -= new EventHandler(ListChanged); List = null; } } class Test { // Test the ListWithChangedEvent class: public static void Main() { // Create a new list: ListWithChangedEvent list = new ListWithChangedEvent(); // Create a class that listens to the list's change event: EventListener listener = new EventListener(list); // Add and remove items from the list: list.Add("item 1"); list.Clear(); listener.Detach(); } } } ================================================ FILE: Units/csharp-review-needed.r/general.cs.t/expected.tags ================================================ C1 input.cs /^ class C1 \/\/ N1.C1$/;" c namespace:N1 C2 input.cs /^ class C2 \/\/ N1.C1.C2$/;" c class:N1.C1 C2 input.cs /^ class C2 \/\/ N1.N2.C2$/;" c namespace:N1.N2 IMyInterface input.cs /^ interface IMyInterface $/;" i namespace:MyNamespace1 Main input.cs /^ public static void Main(string[] args) $/;" m class:MyNamespace1.MyClass2 MyClass1 input.cs /^ class MyClass1 $/;" c namespace:MyNamespace1 MyClass2 input.cs /^ class MyClass2 $/;" c namespace:MyNamespace1 MyDelegate input.cs /^ delegate int MyDelegate();$/;" m namespace:MyNamespace1 MyEnum input.cs /^ enum MyEnum $/;" g namespace:MyNamespace1 MyNamespace1 input.cs /^namespace MyNamespace1 $/;" n MyNamespace2 input.cs /^ namespace MyNamespace2 $/;" n namespace:MyNamespace1 MyStruct input.cs /^ struct MyStruct $/;" s namespace:MyNamespace1 N1 input.cs /^namespace N1 \/\/ N1$/;" n N2 input.cs /^ namespace N2 \/\/ N1.N2$/;" n namespace:N1 ================================================ FILE: Units/csharp-review-needed.r/general.cs.t/input.cs ================================================ // General Structure of a C# Program // A skeleton of a C# program using System; namespace MyNamespace1 { class MyClass1 { } struct MyStruct { } interface IMyInterface { } delegate int MyDelegate(); enum MyEnum { } namespace MyNamespace2 { } class MyClass2 { public static void Main(string[] args) { } } } // Using Fully Qualified Names namespace N1 // N1 { class C1 // N1.C1 { class C2 // N1.C1.C2 { } } namespace N2 // N1.N2 { class C2 // N1.N2.C2 { } } } ================================================ FILE: Units/csharp-review-needed.r/indexer.cs.t/expected.tags ================================================ IndexerClass input.cs /^class IndexerClass $/;" c Main input.cs /^ public static void Main() $/;" m class:MainClass MainClass input.cs /^public class MainClass $/;" c myArray input.cs /^ private int [] myArray = new int[100]; $/;" f class:IndexerClass file: ================================================ FILE: Units/csharp-review-needed.r/indexer.cs.t/input.cs ================================================ // cs_keyword_indexers.cs using System; class IndexerClass { private int [] myArray = new int[100]; public int this [int index] // indexer declaration { get { // Check the index limits if (index < 0 || index >= 100) return 0; else return myArray[index]; } set { if (!(index < 0 || index >= 100)) myArray[index] = value; } } } public class MainClass { public static void Main() { IndexerClass b = new IndexerClass(); // call the indexer to initialize the elements #3 and #5: b[3] = 256; b[5] = 1024; for (int i=0; i<=10; i++) { Console.WriteLine("Element #{0} = {1}", i, b[i]); } } } ================================================ FILE: Units/csharp-review-needed.r/interface_indexers.cs.t/expected.tags ================================================ IMyInterface input.cs /^public interface IMyInterface $/;" i IndexerClass input.cs /^class IndexerClass : IMyInterface$/;" c Main input.cs /^ public static void Main() $/;" m class:MainClass MainClass input.cs /^public class MainClass $/;" c myArray input.cs /^ private int [] myArray = new int[100]; $/;" f class:IndexerClass file: ================================================ FILE: Units/csharp-review-needed.r/interface_indexers.cs.t/input.cs ================================================ // cs_interface_indexers.cs using System; // Indexer on an interface: public interface IMyInterface { // indexer declaration: int this[int index] { get; set; } } // Implementing the interface: class IndexerClass : IMyInterface { private int [] myArray = new int[100]; public int this [int index] // indexer declaration { get { // Check the index limits if (index < 0 || index >= 100) return 0; else return myArray[index]; } set { if (!(index < 0 || index >= 100)) myArray[index] = value; } } } public class MainClass { public static void Main() { IndexerClass b = new IndexerClass(); // call the indexer to initialize the elements #3 and #5: b[2] = 4; b[5] = 32; for (int i=0; i<=10; i++) { Console.WriteLine("Element #{0} = {1}", i, b[i]); } } } ================================================ FILE: Units/csharp-review-needed.r/interface_properties.cs.t/expected.tags ================================================ Counter input.cs /^ int Counter $/;" p interface:IEmployee Counter input.cs /^ public int Counter $/;" p class:Employee Employee input.cs /^ public Employee() $/;" m class:Employee Employee input.cs /^public class Employee: IEmployee $/;" c IEmployee input.cs /^interface IEmployee $/;" i Main input.cs /^ public static void Main() $/;" m class:MainClass MainClass input.cs /^public class MainClass $/;" c Name input.cs /^ public string Name $/;" p class:Employee Name input.cs /^ string Name $/;" p interface:IEmployee counter input.cs /^ private int counter;$/;" f class:Employee file: name input.cs /^ private string name;$/;" f class:Employee file: numberOfEmployees input.cs /^ public static int numberOfEmployees;$/;" f class:Employee ================================================ FILE: Units/csharp-review-needed.r/interface_properties.cs.t/input.cs ================================================ // cs_interface_properties.cs // Interface Properties using System; interface IEmployee { string Name { get; set; } int Counter { get; } } public class Employee: IEmployee { public static int numberOfEmployees; private int counter; private string name; // Read-write instance property: public string Name { get { return name; } set { name = value; } } // Read-only instance property: public int Counter { get { return counter; } } // Constructor: public Employee() { counter = ++counter + numberOfEmployees; } } public class MainClass { public static void Main() { Console.Write("Enter number of employees: "); string s = Console.ReadLine(); Employee.numberOfEmployees = int.Parse(s); Employee e1 = new Employee(); Console.Write("Enter the name of the new employee: "); e1.Name = Console.ReadLine(); Console.WriteLine("The employee information:"); Console.WriteLine("Employee number: {0}", e1.Counter); Console.WriteLine("Employee name: {0}", e1.Name); } } ================================================ FILE: Units/csharp-review-needed.r/internal.cs.t/expected.tags ================================================ BaseClass input.cs /^internal class BaseClass $/;" c IntM input.cs /^ public static int IntM = 0;$/;" f class:BaseClass ================================================ FILE: Units/csharp-review-needed.r/internal.cs.t/input.cs ================================================ // Assembly1.cs // compile with: /target:library internal class BaseClass { public static int IntM = 0; } ================================================ FILE: Units/csharp-review-needed.r/keyword_abstract.cs.t/expected.tags ================================================ GetX input.cs /^ public abstract int GetX \/\/ Abstract property$/;" p class:MyBaseC GetX input.cs /^ public override int GetX \/\/ overriding property$/;" p class:MyDerivedC GetY input.cs /^ public abstract int GetY \/\/ Abstract property$/;" p class:MyBaseC GetY input.cs /^ public override int GetY \/\/ overriding property$/;" p class:MyDerivedC Main input.cs /^ public static void Main() $/;" m class:MyDerivedC MyBaseC input.cs /^abstract class MyBaseC \/\/ Abstract class$/;" c MyDerivedC input.cs /^class MyDerivedC: MyBaseC$/;" c MyMethod input.cs /^ public abstract void MyMethod(); \/\/ Abstract method$/;" m class:MyBaseC MyMethod input.cs /^ public override void MyMethod() $/;" m class:MyDerivedC x input.cs /^ protected int x = 100; $/;" f class:MyBaseC y input.cs /^ protected int y = 150;$/;" f class:MyBaseC ================================================ FILE: Units/csharp-review-needed.r/keyword_abstract.cs.t/input.cs ================================================ // abstract_keyword.cs // Abstract Classes using System; abstract class MyBaseC // Abstract class { protected int x = 100; protected int y = 150; public abstract void MyMethod(); // Abstract method public abstract int GetX // Abstract property { get; } public abstract int GetY // Abstract property { get; } } class MyDerivedC: MyBaseC { public override void MyMethod() { x++; y++; } public override int GetX // overriding property { get { return x+10; } } public override int GetY // overriding property { get { return y+10; } } public static void Main() { MyDerivedC mC = new MyDerivedC(); mC.MyMethod(); Console.WriteLine("x = {0}, y = {1}", mC.GetX, mC.GetY); } } ================================================ FILE: Units/csharp-review-needed.r/keyword_catch_try.cs.t/expected.tags ================================================ Main input.cs /^ public static void Main() $/;" m class:MyClass MyClass input.cs /^class MyClass $/;" c MyFn input.cs /^ public void MyFn(string s) $/;" m class:MyClass ================================================ FILE: Units/csharp-review-needed.r/keyword_catch_try.cs.t/input.cs ================================================ // Ordering catch clauses using System; class MyClass { public static void Main() { MyClass x = new MyClass(); try { string s = null; x.MyFn(s); } // Most specific: catch (ArgumentNullException e) { Console.WriteLine("{0} First exception caught.", e); } // Least specific: catch (Exception e) { Console.WriteLine("{0} Second exception caught.", e); } } public void MyFn(string s) { if (s == null) throw new ArgumentNullException(); } } ================================================ FILE: Units/csharp-review-needed.r/keyword_class.cs.t/expected.tags ================================================ Kid input.cs /^ public Kid() $/;" m class:Kid Kid input.cs /^ public Kid(string name, int age) $/;" m class:Kid Kid input.cs /^public class Kid $/;" c Main input.cs /^ public static void Main() $/;" m class:MainClass MainClass input.cs /^public class MainClass $/;" c PrintKid input.cs /^ public void PrintKid() $/;" m class:Kid age input.cs /^ private int age;$/;" f class:Kid file: name input.cs /^ private string name;$/;" f class:Kid file: ================================================ FILE: Units/csharp-review-needed.r/keyword_class.cs.t/input.cs ================================================ // keyword_class.cs // class example using System; public class Kid { private int age; private string name; // Default constructor: public Kid() { name = "N/A"; } // Constructor: public Kid(string name, int age) { this.name = name; this.age = age; } // Printing method: public void PrintKid() { Console.WriteLine("{0}, {1} years old.", name, age); } } public class MainClass { public static void Main() { // Create objects // Objects must be created using the new operator: Kid kid1 = new Kid("Craig", 11); Kid kid2 = new Kid("Sally", 10); // Create an object using the default constructor: Kid kid3 = new Kid(); // Display results: Console.Write("Kid #1: "); kid1.PrintKid(); Console.Write("Kid #2: "); kid2.PrintKid(); Console.Write("Kid #3: "); kid3.PrintKid(); } } ================================================ FILE: Units/csharp-review-needed.r/keyword_const.cs.t/expected.tags ================================================ ConstTest input.cs /^public class ConstTest $/;" c Main input.cs /^ public static void Main() $/;" m class:ConstTest MyClass input.cs /^ public MyClass(int p1, int p2) $/;" m class:ConstTest.MyClass MyClass input.cs /^ class MyClass $/;" c class:ConstTest c1 input.cs /^ public const int c1 = 5;$/;" f class:ConstTest.MyClass c2 input.cs /^ public const int c2 = c1 + 5;$/;" f class:ConstTest.MyClass x input.cs /^ public int x;$/;" f class:ConstTest.MyClass y input.cs /^ public int y;$/;" f class:ConstTest.MyClass ================================================ FILE: Units/csharp-review-needed.r/keyword_const.cs.t/input.cs ================================================ // const_keyword.cs // Constants using System; public class ConstTest { class MyClass { public int x; public int y; public const int c1 = 5; public const int c2 = c1 + 5; public MyClass(int p1, int p2) { x = p1; y = p2; } } public static void Main() { MyClass mC = new MyClass(11, 22); Console.WriteLine("x = {0}, y = {1}", mC.x, mC.y); Console.WriteLine("c1 = {0}, c2 = {1}", MyClass.c1, MyClass.c2 ); } } ================================================ FILE: Units/csharp-review-needed.r/keyword_delegate.cs.t/expected.tags ================================================ DelegateFunction input.cs /^ public static void DelegateFunction(int i)$/;" m class:Program InstanceMethod input.cs /^ public void InstanceMethod() $/;" m class:MyClass Main input.cs /^ public static void Main()$/;" m class:Program Main input.cs /^ static public void Main() $/;" m class:MainClass MainClass input.cs /^public class MainClass $/;" c MyClass input.cs /^public class MyClass $/;" c MyDelegate input.cs /^delegate void MyDelegate();$/;" m MyDelegate input.cs /^delegate void MyDelegate(int i);$/;" m Program input.cs /^class Program$/;" c StaticMethod input.cs /^ static public void StaticMethod() $/;" m class:MyClass TakesADelegate input.cs /^ public static void TakesADelegate(MyDelegate SomeFunction)$/;" m class:Program ================================================ FILE: Units/csharp-review-needed.r/keyword_delegate.cs.t/input.cs ================================================ // keyword_delegate.cs // delegate declaration delegate void MyDelegate(int i); class Program { public static void Main() { TakesADelegate(new MyDelegate(DelegateFunction)); } public static void TakesADelegate(MyDelegate SomeFunction) { SomeFunction(21); } public static void DelegateFunction(int i) { System.Console.WriteLine("Called by delegate with number: {0}.", i); } } // // keyword_delegate2.cs // Calling both static and instance methods from delegates using System; // delegate declaration delegate void MyDelegate(); public class MyClass { public void InstanceMethod() { Console.WriteLine("A message from the instance method."); } static public void StaticMethod() { Console.WriteLine("A message from the static method."); } } public class MainClass { static public void Main() { MyClass p = new MyClass(); // Map the delegate to the instance method: MyDelegate d = new MyDelegate(p.InstanceMethod); d(); // Map to the static method: d = new MyDelegate(MyClass.StaticMethod); d(); } } ================================================ FILE: Units/csharp-review-needed.r/keyword_enum.cs.t/expected.tags ================================================ Days input.cs /^ enum Days {Sat=1, Sun, Mon, Tue, Wed, Thu, Fri};$/;" g class:EnumTest EnumTest input.cs /^public class EnumTest $/;" c Fri input.cs /^ enum Days {Sat=1, Sun, Mon, Tue, Wed, Thu, Fri};$/;" e enum:EnumTest.Days file: Main input.cs /^ public static void Main() $/;" m class:EnumTest Max input.cs /^ enum Range :long {Max = 2147483648L, Min = 255L};$/;" e enum:EnumTest.Range file: Min input.cs /^ enum Range :long {Max = 2147483648L, Min = 255L};$/;" e enum:EnumTest.Range file: Mon input.cs /^ enum Days {Sat=1, Sun, Mon, Tue, Wed, Thu, Fri};$/;" e enum:EnumTest.Days file: Range input.cs /^ enum Range :long {Max = 2147483648L, Min = 255L};$/;" g class:EnumTest Sat input.cs /^ enum Days {Sat=1, Sun, Mon, Tue, Wed, Thu, Fri};$/;" e enum:EnumTest.Days file: Sun input.cs /^ enum Days {Sat=1, Sun, Mon, Tue, Wed, Thu, Fri};$/;" e enum:EnumTest.Days file: Thu input.cs /^ enum Days {Sat=1, Sun, Mon, Tue, Wed, Thu, Fri};$/;" e enum:EnumTest.Days file: Tue input.cs /^ enum Days {Sat=1, Sun, Mon, Tue, Wed, Thu, Fri};$/;" e enum:EnumTest.Days file: Wed input.cs /^ enum Days {Sat=1, Sun, Mon, Tue, Wed, Thu, Fri};$/;" e enum:EnumTest.Days file: ================================================ FILE: Units/csharp-review-needed.r/keyword_enum.cs.t/input.cs ================================================ // C# Programmer's Reference: enum // keyword_enum.cs // enum initialization: using System; public class EnumTest { enum Days {Sat=1, Sun, Mon, Tue, Wed, Thu, Fri}; public static void Main() { int x = (int) Days.Sun; int y = (int) Days.Fri; Console.WriteLine("Sun = {0}", x); Console.WriteLine("Fri = {0}", y); } } // keyword_enum2.cs // Using long enumerators using System; public class EnumTest { enum Range :long {Max = 2147483648L, Min = 255L}; public static void Main() { long x = (long) Range.Max; long y = (long) Range.Min; Console.WriteLine("Max = {0}", x); Console.WriteLine("Min = {0}", y); } } ================================================ FILE: Units/csharp-review-needed.r/keyword_event.cs.t/expected.tags ================================================ Event1 input.cs /^ public event MyDelegate1 Event1 $/;" p class:PropertyEventsSample Event2 input.cs /^ public event MyDelegate1 Event2 $/;" p class:PropertyEventsSample Event3 input.cs /^ public event MyDelegate2 Event3 $/;" p class:PropertyEventsSample Event4 input.cs /^ public event MyDelegate3 Event4 $/;" p class:PropertyEventsSample Event5 input.cs /^ public event MyDelegate3 Event5 $/;" p class:PropertyEventsSample Event6 input.cs /^ public event MyDelegate4 Event6 $/;" p class:PropertyEventsSample ExplicitEventsSample input.cs /^public class ExplicitEventsSample: I1, I2 $/;" c FireAway input.cs /^ public void FireAway() $/;" m class:MyClass FireAway input.cs /^ void FireAway();$/;" m interface:I FireEvents input.cs /^ private void FireEvents() $/;" m class:ExplicitEventsSample file: I input.cs /^public interface I $/;" i I1 input.cs /^public interface I1 $/;" i I2 input.cs /^public interface I2 $/;" i I2.MyEvent input.cs /^ event MyDelegate2 I2.MyEvent \/\/ explicit implementation of I2.MyEvent$/;" p class:ExplicitEventsSample Main input.cs /^ public static void Main() $/;" m class:MyClass Main input.cs /^ static public void Main () $/;" m class:MainClass MainClass input.cs /^public class MainClass $/;" c MyClass input.cs /^public class MyClass $/;" c MyClass input.cs /^public class MyClass: I $/;" c MyDelegate input.cs /^public delegate void MyDelegate(); \/\/ delegate declaration$/;" m MyDelegate1 input.cs /^public delegate void MyDelegate1();$/;" m MyDelegate1 input.cs /^public delegate void MyDelegate1(int i);$/;" m MyDelegate2 input.cs /^public delegate int MyDelegate2(string s);$/;" m MyDelegate2 input.cs /^public delegate void MyDelegate2(string s);$/;" m MyDelegate3 input.cs /^public delegate void MyDelegate3(int i, object o);$/;" m MyDelegate4 input.cs /^public delegate void MyDelegate4();$/;" m MyEvent input.cs /^ event MyDelegate MyEvent;$/;" E interface:I MyEvent input.cs /^ event MyDelegate1 MyEvent;$/;" E interface:I1 MyEvent input.cs /^ event MyDelegate2 MyEvent;$/;" E interface:I2 MyEvent input.cs /^ public event MyDelegate MyEvent;$/;" E class:MyClass MyEvent input.cs /^ public event MyDelegate1 MyEvent; \/\/ normal implementation of I1.MyEvent.$/;" E class:ExplicitEventsSample MyEvent2Storage input.cs /^ private MyDelegate2 MyEvent2Storage; \/\/ underlying storage for I2.MyEvent.$/;" f class:ExplicitEventsSample file: PropertyEventsSample input.cs /^public class PropertyEventsSample $/;" c eventTable input.cs /^ private Hashtable eventTable = new Hashtable();$/;" f class:PropertyEventsSample file: f input.cs /^ static private void f() $/;" m class:MainClass file: ================================================ FILE: Units/csharp-review-needed.r/keyword_event.cs.t/input.cs ================================================ // event_keyword.cs using System; public delegate void MyDelegate(); // delegate declaration public interface I { event MyDelegate MyEvent; void FireAway(); } public class MyClass: I { public event MyDelegate MyEvent; public void FireAway() { if (MyEvent != null) MyEvent(); } } public class MainClass { static private void f() { Console.WriteLine("This is called when the event fires."); } static public void Main () { I i = new MyClass(); i.MyEvent += new MyDelegate(f); i.FireAway(); } } // event_keyword2.cs using System; using System.Collections; public delegate void MyDelegate1(int i); public delegate void MyDelegate2(string s); public delegate void MyDelegate3(int i, object o); public delegate void MyDelegate4(); public class PropertyEventsSample { private Hashtable eventTable = new Hashtable(); public event MyDelegate1 Event1 { add { eventTable["Event1"] = (MyDelegate1)eventTable["Event1"] + value; } remove { eventTable["Event1"] = (MyDelegate1)eventTable["Event1"] - value; } } public event MyDelegate1 Event2 { add { eventTable["Event2"] = (MyDelegate1)eventTable["Event2"] + value; } remove { eventTable["Event2"] = (MyDelegate1)eventTable["Event2"] - value; } } public event MyDelegate2 Event3 { add { eventTable["Event3"] = (MyDelegate2)eventTable["Event3"] + value; } remove { eventTable["Event3"] = (MyDelegate2)eventTable["Event3"] - value; } } public event MyDelegate3 Event4 { add { eventTable["Event4"] = (MyDelegate3)eventTable["Event4"] + value; } remove { eventTable["Event4"] = (MyDelegate3)eventTable["Event4"] - value; } } public event MyDelegate3 Event5 { add { eventTable["Event5"] = (MyDelegate3)eventTable["Event5"] + value; } remove { eventTable["Event5"] = (MyDelegate3)eventTable["Event5"] - value; } } public event MyDelegate4 Event6 { add { eventTable["Event6"] = (MyDelegate4)eventTable["Event6"] + value; } remove { eventTable["Event6"] = (MyDelegate4)eventTable["Event6"] - value; } } } public class MyClass { public static void Main() { } } // event_keyword3.cs using System; public delegate void MyDelegate1(); public interface I1 { event MyDelegate1 MyEvent; } public delegate int MyDelegate2(string s); public interface I2 { event MyDelegate2 MyEvent; } public class ExplicitEventsSample: I1, I2 { public event MyDelegate1 MyEvent; // normal implementation of I1.MyEvent. event MyDelegate2 I2.MyEvent // explicit implementation of I2.MyEvent { add { MyEvent2Storage += value; } remove { MyEvent2Storage -= value; } } private MyDelegate2 MyEvent2Storage; // underlying storage for I2.MyEvent. private void FireEvents() { if (MyEvent != null) MyEvent(); if (MyEvent2Storage != null) MyEvent2Storage("hello"); } } public class MyClass { public static void Main() { } } ================================================ FILE: Units/csharp-review-needed.r/keyword_explicit.cs.t/expected.tags ================================================ Digit input.cs /^ public Digit(byte value) $/;" m struct:Digit Digit input.cs /^struct Digit$/;" s Main input.cs /^ public static void Main() $/;" m class:Test Test input.cs /^class Test $/;" c operator Digit input.cs /^ public static explicit operator Digit(byte b) $/;" m struct:Digit value input.cs /^ byte value;$/;" f struct:Digit ================================================ FILE: Units/csharp-review-needed.r/keyword_explicit.cs.t/input.cs ================================================ // cs_keyword_explicit.cs using System; struct Digit { byte value; public Digit(byte value) { if (value<0 || value>9) throw new ArgumentException(); this.value = value; } // define explicit byte-to-Digit conversion operator: public static explicit operator Digit(byte b) { Console.WriteLine("conversion occurred"); return new Digit(b); } } class Test { public static void Main() { byte b = 3; Digit d = (Digit)b; // explicit conversion } } ================================================ FILE: Units/csharp-review-needed.r/keyword_extern.cs.t/expected.tags ================================================ Main input.cs /^ public static int Main() $/;" m class:MyClass MessageBox input.cs /^ public static extern int MessageBox(int h, string m, string c, int type);$/;" m class:MyClass file: MyClass input.cs /^class MyClass $/;" c ================================================ FILE: Units/csharp-review-needed.r/keyword_extern.cs.t/input.cs ================================================ using System; using System.Runtime.InteropServices; class MyClass { [DllImport("User32.dll")] public static extern int MessageBox(int h, string m, string c, int type); public static int Main() { string myString; Console.Write("Enter your message: "); myString = Console.ReadLine(); return MessageBox(0, myString, "My Message Box", 0); } } ================================================ FILE: Units/csharp-review-needed.r/keyword_implicit.cs.t/expected.tags ================================================ Digit input.cs /^ public Digit(byte value) $/;" m struct:Digit Digit input.cs /^struct Digit$/;" s Main input.cs /^ public static void Main() $/;" m class:Test Test input.cs /^class Test $/;" c operator byte input.cs /^ public static implicit operator byte(Digit d) $/;" m struct:Digit value input.cs /^ byte value;$/;" f struct:Digit ================================================ FILE: Units/csharp-review-needed.r/keyword_implicit.cs.t/input.cs ================================================ // cs_keyword_implicit.cs using System; struct Digit { byte value; public Digit(byte value) { if (value < 0 || value > 9) throw new ArgumentException(); this.value = value; } // define implicit Digit-to-byte conversion operator: public static implicit operator byte(Digit d) { Console.WriteLine( "conversion occurred" ); return d.value; } } class Test { public static void Main() { Digit d = new Digit(3); // implicit (no cast) conversion from Digit to byte byte b = d; } } ================================================ FILE: Units/csharp-review-needed.r/keyword_interface.cs.t/expected.tags ================================================ IPoint input.cs /^interface IPoint $/;" i Main input.cs /^ public static void Main() $/;" m class:MainClass MainClass input.cs /^class MainClass $/;" c MyPoint input.cs /^ public MyPoint(int x, int y) $/;" m class:MyPoint MyPoint input.cs /^class MyPoint : IPoint $/;" c PrintPoint input.cs /^ private static void PrintPoint(IPoint p) $/;" m class:MainClass file: myX input.cs /^ private int myX;$/;" f class:MyPoint file: myY input.cs /^ private int myY;$/;" f class:MyPoint file: x input.cs /^ int x $/;" p interface:IPoint x input.cs /^ public int x $/;" p class:MyPoint y input.cs /^ int y $/;" p interface:IPoint y input.cs /^ public int y $/;" p class:MyPoint ================================================ FILE: Units/csharp-review-needed.r/keyword_interface.cs.t/input.cs ================================================ // keyword_interface.cs // Interface implementation using System; interface IPoint { // Property signatures: int x { get; set; } int y { get; set; } } class MyPoint : IPoint { // Fields: private int myX; private int myY; // Constructor: public MyPoint(int x, int y) { myX = x; myY = y; } // Property implementation: public int x { get { return myX; } set { myX = value; } } public int y { get { return myY; } set { myY = value; } } } class MainClass { private static void PrintPoint(IPoint p) { Console.WriteLine("x={0}, y={1}", p.x, p.y); } public static void Main() { MyPoint p = new MyPoint(2,3); Console.Write("My Point: "); PrintPoint(p); } } ================================================ FILE: Units/csharp-review-needed.r/keyword_namespace.cs.t/expected.tags ================================================ AlternativeNestedNameSpaceClass input.cs /^ public class AlternativeNestedNameSpaceClass$/;" c namespace:SomeNameSpace.Nested Main input.cs /^ public static void Main() $/;" m class:SomeNameSpace.MyClass MyClass input.cs /^ public class MyClass $/;" c namespace:SomeNameSpace Nested input.cs /^ namespace Nested \/\/ a nested namespace$/;" n namespace:SomeNameSpace NestedNameSpaceClass input.cs /^ public class NestedNameSpaceClass $/;" c namespace:SomeNameSpace.Nested SayHello input.cs /^ public static void SayHello() $/;" m class:SomeNameSpace.Nested.NestedNameSpaceClass SomeNameSpace input.cs /^namespace SomeNameSpace$/;" n SomeNameSpace.Nested input.cs /^namespace SomeNameSpace.Nested$/;" n ================================================ FILE: Units/csharp-review-needed.r/keyword_namespace.cs.t/input.cs ================================================ // cs_namespace_keyword.cs using System; namespace SomeNameSpace { public class MyClass { public static void Main() { Nested.NestedNameSpaceClass.SayHello(); } } namespace Nested // a nested namespace { public class NestedNameSpaceClass { public static void SayHello() { Console.WriteLine("Hello"); } } } } // namespace can nest multiple levels at once. namespace SomeNameSpace.Nested { public class AlternativeNestedNameSpaceClass { } } ================================================ FILE: Units/csharp-review-needed.r/keyword_out.cs.t/expected.tags ================================================ Main input.cs /^ public static void Main() $/;" m class:MyClass MyClass input.cs /^public class MyClass $/;" c TestOut input.cs /^ public static int TestOut(out char i) $/;" m class:MyClass ================================================ FILE: Units/csharp-review-needed.r/keyword_out.cs.t/input.cs ================================================ // cs_out.cs using System; public class MyClass { public static int TestOut(out char i) { i = 'b'; return -1; } public static void Main() { char i; // variable need not be initialized Console.WriteLine(TestOut(out i)); Console.WriteLine(i); } } ================================================ FILE: Units/csharp-review-needed.r/keyword_override.cs.t/expected.tags ================================================ Area input.cs /^ public override double Area() $/;" m class:TestClass.Cube Area input.cs /^ public virtual double Area() $/;" m class:TestClass.Square Cube input.cs /^ public Cube(double x): base(x) $/;" m class:TestClass.Cube Cube input.cs /^ class Cube: Square $/;" c class:TestClass Main input.cs /^ public static void Main()$/;" m class:TestClass Square input.cs /^ public Square(double x) $/;" m class:TestClass.Square Square input.cs /^ public class Square $/;" c class:TestClass TestClass input.cs /^class TestClass $/;" c x input.cs /^ public double x;$/;" f class:TestClass.Square ================================================ FILE: Units/csharp-review-needed.r/keyword_override.cs.t/input.cs ================================================ // cs_override_keyword.cs // Calling overriden methods from the base class using System; class TestClass { public class Square { public double x; // Constructor: public Square(double x) { this.x = x; } public virtual double Area() { return x*x; } } class Cube: Square { // Constructor: public Cube(double x): base(x) { } // Calling the Area base method: public override double Area() { return (6*(base.Area())); } } public static void Main() { double x = 5.2; Square s = new Square(x); Square c = new Cube(x); Console.WriteLine("Area of Square = {0:F2}", s.Area()); Console.WriteLine("Area of Cube = {0:F2}", c.Area()); } } ================================================ FILE: Units/csharp-review-needed.r/keyword_params.cs.t/expected.tags ================================================ Main input.cs /^ public static void Main() $/;" m class:MyClass MyClass input.cs /^public class MyClass $/;" c UseParams input.cs /^ public static void UseParams(params int[] list) $/;" m class:MyClass UseParams2 input.cs /^ public static void UseParams2(params object[] list) $/;" m class:MyClass ================================================ FILE: Units/csharp-review-needed.r/keyword_params.cs.t/input.cs ================================================ // cs_params.cs using System; public class MyClass { public static void UseParams(params int[] list) { for ( int i = 0 ; i < list.Length ; i++ ) Console.WriteLine(list[i]); Console.WriteLine(); } public static void UseParams2(params object[] list) { for ( int i = 0 ; i < list.Length ; i++ ) Console.WriteLine((object)list[i]); Console.WriteLine(); } public static void Main() { UseParams(1, 2, 3); UseParams2(1, 'a', "test"); int[] myarray = new int[3] {10,11,12}; UseParams(myarray); } } ================================================ FILE: Units/csharp-review-needed.r/keyword_private.cs.t/expected.tags ================================================ AccessSalary input.cs /^ public double AccessSalary() {$/;" m class:Employee Employee input.cs /^class Employee $/;" c Main input.cs /^ public static void Main() $/;" m class:MainClass MainClass input.cs /^class MainClass $/;" c name input.cs /^ public string name = "xx";$/;" f class:Employee not_visible input.cs /^ private int not_visible = 3; \/\/ strangely, not in original example$/;" f class:Employee file: salary input.cs /^ double salary = 100.00; \/\/ private access by default$/;" f class:Employee file: ================================================ FILE: Units/csharp-review-needed.r/keyword_private.cs.t/input.cs ================================================ // private_keyword.cs using System; class Employee { public string name = "xx"; double salary = 100.00; // private access by default private int not_visible = 3; // strangely, not in original example public double AccessSalary() { return salary; } } class MainClass { public static void Main() { Employee e = new Employee(); // Accessing the public field: string n = e.name; // Accessing the private field: double s = e.AccessSalary(); } } ================================================ FILE: Units/csharp-review-needed.r/keyword_protected.cs.t/expected.tags ================================================ Main input.cs /^ public static void Main() $/;" m class:MyDerivedC MyClass input.cs /^class MyClass $/;" c MyDerivedC input.cs /^class MyDerivedC: MyClass $/;" c x input.cs /^ protected int x; $/;" f class:MyClass y input.cs /^ protected int y;$/;" f class:MyClass ================================================ FILE: Units/csharp-review-needed.r/keyword_protected.cs.t/input.cs ================================================ // protected_keyword.cs using System; class MyClass { protected int x; protected int y; } class MyDerivedC: MyClass { public static void Main() { MyDerivedC mC = new MyDerivedC(); // Direct access to protected members: mC.x = 10; mC.y = 15; Console.WriteLine("x = {0}, y = {1}", mC.x, mC.y); } } ================================================ FILE: Units/csharp-review-needed.r/keyword_public.cs.t/expected.tags ================================================ Main input.cs /^ public static void Main() $/;" m class:MyClass2 MyClass1 input.cs /^class MyClass1 $/;" c MyClass2 input.cs /^class MyClass2 $/;" c x input.cs /^ public int x; $/;" f class:MyClass1 y input.cs /^ public int y;$/;" f class:MyClass1 ================================================ FILE: Units/csharp-review-needed.r/keyword_public.cs.t/input.cs ================================================ // protected_public.cs // Public access using System; class MyClass1 { public int x; public int y; } class MyClass2 { public static void Main() { MyClass1 mC = new MyClass1(); // Direct access to public members: mC.x = 10; mC.y = 15; Console.WriteLine("x = {0}, y = {1}", mC.x, mC.y); } } ================================================ FILE: Units/csharp-review-needed.r/keyword_sealed.cs.t/expected.tags ================================================ Main input.cs /^ public static void Main() $/;" m class:MainClass MainClass input.cs /^class MainClass $/;" c MyClass input.cs /^sealed class MyClass $/;" c x input.cs /^ public int x; $/;" f class:MyClass y input.cs /^ public int y;$/;" f class:MyClass ================================================ FILE: Units/csharp-review-needed.r/keyword_sealed.cs.t/input.cs ================================================ // cs_sealed_keyword.cs // Sealed classes using System; sealed class MyClass { public int x; public int y; } class MainClass { public static void Main() { MyClass mC = new MyClass(); mC.x = 110; mC.y = 150; Console.WriteLine("x = {0}, y = {1}", mC.x, mC.y); } } ================================================ FILE: Units/csharp-review-needed.r/keyword_static.cs.t/expected.tags ================================================ AddEmployee input.cs /^ public static int AddEmployee() $/;" m class:Employee Employee input.cs /^ public Employee () $/;" m class:Employee Employee input.cs /^ public Employee (string name, string id) $/;" m class:Employee Employee input.cs /^public class Employee $/;" c Main input.cs /^ public static void Main() $/;" m class:MainClass MainClass input.cs /^class MainClass: Employee $/;" c employeeCounter input.cs /^ public static int employeeCounter;$/;" f class:Employee id input.cs /^ public string id;$/;" f class:Employee name input.cs /^ public string name;$/;" f class:Employee ================================================ FILE: Units/csharp-review-needed.r/keyword_static.cs.t/input.cs ================================================ // cs_static_keyword.cs // Static members using System; public class Employee { public string id; public string name; public Employee () { } public Employee (string name, string id) { this.name = name; this.id = id; } public static int employeeCounter; public static int AddEmployee() { return ++employeeCounter; } } class MainClass: Employee { public static void Main() { Console.Write("Enter the employee's name: "); string name = Console.ReadLine(); Console.Write("Enter the employee's ID: "); string id = Console.ReadLine(); // Create the employee object: Employee e = new Employee (name, id); Console.Write("Enter the current number of employees: "); string n = Console.ReadLine(); Employee.employeeCounter = Int32.Parse(n); Employee.AddEmployee(); // Display the new information: Console.WriteLine("Name: {0}", e.name); Console.WriteLine("ID: {0}", e.id); Console.WriteLine("New Number of Employees: {0}", Employee.employeeCounter); } } ================================================ FILE: Units/csharp-review-needed.r/keyword_struct.cs.t/expected.tags ================================================ Main input.cs /^ public static void Main() $/;" m class:MainClass MainClass input.cs /^class MainClass $/;" c Point input.cs /^ public Point(int p1, int p2) $/;" m struct:Point Point input.cs /^public struct Point $/;" s x input.cs /^ public int x, y;$/;" f struct:Point y input.cs /^ public int x, y;$/;" f struct:Point ================================================ FILE: Units/csharp-review-needed.r/keyword_struct.cs.t/input.cs ================================================ // keyword_struct.cs // struct declaration and initialization using System; public struct Point { public int x, y; public Point(int p1, int p2) { x = p1; y = p2; } } class MainClass { public static void Main() { // Initialize: Point myPoint = new Point(); Point yourPoint = new Point(10,10); // Display results: Console.Write("My Point: "); Console.WriteLine("x = {0}, y = {1}", myPoint.x, myPoint.y); Console.Write("Your Point: "); Console.WriteLine("x = {0}, y = {1}", yourPoint.x, yourPoint.y); } } ================================================ FILE: Units/csharp-review-needed.r/keyword_virtual.cs.t/expected.tags ================================================ Area input.cs /^ public override double Area()$/;" m class:TestClass.Sphere Area input.cs /^ public override double Area() $/;" m class:TestClass.Circle Area input.cs /^ public override double Area() $/;" m class:TestClass.Cylinder Area input.cs /^ public virtual double Area() $/;" m class:TestClass.Dimensions Circle input.cs /^ public Circle(double r): base(r, 0) $/;" m class:TestClass.Circle Circle input.cs /^ public class Circle: Dimensions $/;" c class:TestClass Cylinder input.cs /^ public Cylinder(double r, double h): base(r, h) $/;" m class:TestClass.Cylinder Cylinder input.cs /^ class Cylinder: Dimensions $/;" c class:TestClass Dimensions input.cs /^ public Dimensions (double x, double y) $/;" m class:TestClass.Dimensions Dimensions input.cs /^ public Dimensions() $/;" m class:TestClass.Dimensions Dimensions input.cs /^ public class Dimensions $/;" c class:TestClass Main input.cs /^ public static void Main() $/;" m class:TestClass Sphere input.cs /^ public Sphere(double r): base(r, 0) $/;" m class:TestClass.Sphere Sphere input.cs /^ class Sphere: Dimensions $/;" c class:TestClass TestClass input.cs /^class TestClass $/;" c pi input.cs /^ public const double pi = Math.PI;$/;" f class:TestClass.Dimensions x input.cs /^ protected double x, y;$/;" f class:TestClass.Dimensions y input.cs /^ protected double x, y;$/;" f class:TestClass.Dimensions ================================================ FILE: Units/csharp-review-needed.r/keyword_virtual.cs.t/input.cs ================================================ // cs_virtual_keyword.cs // Virtual and override using System; class TestClass { public class Dimensions { public const double pi = Math.PI; protected double x, y; public Dimensions() { } public Dimensions (double x, double y) { this.x = x; this.y = y; } public virtual double Area() { return x*y; } } public class Circle: Dimensions { public Circle(double r): base(r, 0) { } public override double Area() { return pi * x * x; } } class Sphere: Dimensions { public Sphere(double r): base(r, 0) { } public override double Area() { return 4 * pi * x * x; } } class Cylinder: Dimensions { public Cylinder(double r, double h): base(r, h) { } public override double Area() { return 2*pi*x*x + 2*pi*x*y; } } public static void Main() { double r = 3.0, h = 5.0; Dimensions c = new Circle(r); Dimensions s = new Sphere(r); Dimensions l = new Cylinder(r, h); // Display results: Console.WriteLine("Area of Circle = {0:F2}", c.Area()); Console.WriteLine("Area of Sphere = {0:F2}", s.Area()); Console.WriteLine("Area of Cylinder = {0:F2}", l.Area()); } } ================================================ FILE: Units/csharp-review-needed.r/keyword_volatile.cs.t/expected.tags ================================================ Main input.cs /^ public static void Main()$/;" m class:Test Test input.cs /^ Test(int _i)$/;" m class:Test file: Test input.cs /^class Test$/;" c i input.cs /^ public volatile int i;$/;" f class:Test ================================================ FILE: Units/csharp-review-needed.r/keyword_volatile.cs.t/input.cs ================================================ // csharp_volatile.cs class Test { public volatile int i; Test(int _i) { i = _i; } public static void Main() { } } ================================================ FILE: Units/csharp-review-needed.r/property.cs.t/expected.tags ================================================ Counter input.cs /^ public static int Counter $/;" p class:Employee Employee input.cs /^ public Employee() $/;" m class:Employee Employee input.cs /^public class Employee $/;" c Main input.cs /^ public static void Main() $/;" m class:MainClass MainClass input.cs /^public class MainClass$/;" c Name input.cs /^ public string Name $/;" p class:Employee counter input.cs /^ private static int counter;$/;" f class:Employee file: name input.cs /^ private string name;$/;" f class:Employee file: numberOfEmployees input.cs /^ public static int numberOfEmployees;$/;" f class:Employee ================================================ FILE: Units/csharp-review-needed.r/property.cs.t/input.cs ================================================ // property.cs // Properties using System; public class Employee { public static int numberOfEmployees; private static int counter; private string name; // A read-write instance property: public string Name { get { return name; } set { name = value; } } // A read-only static property: public static int Counter { get { return counter; } } // Constructor: public Employee() { // Calculate the employee's number: counter = ++counter + numberOfEmployees; } } public class MainClass { public static void Main() { Employee.numberOfEmployees = 100; Employee e1 = new Employee(); e1.Name = "Claude Vige"; Console.WriteLine("Employee number: {0}", Employee.Counter); Console.WriteLine("Employee name: {0}", e1.Name); } } ================================================ FILE: Units/extension-with-template-suffix.d/expected.tags ================================================ main input.c.in /^main (void)$/;" f typeref:typename:int ================================================ FILE: Units/extension-with-template-suffix.d/input.c.in ================================================ int main (void) { return 0; } ================================================ FILE: Units/extra-anonymous.d/args.ctags ================================================ --sort=no --extras=+{anonymous} --fields=+{extras} ================================================ FILE: Units/extra-anonymous.d/expected.tags ================================================ __anonf6b77c200108 input.c /^struct {$/;" s file: extras:fileScope,anonymous x input.c /^ int x;$/;" m struct:__anonf6b77c200108 typeref:typename:int file: extras:fileScope __anonf6b77c20020a input.c /^union {$/;" u file: extras:fileScope,anonymous x input.c /^ int x;$/;" m union:__anonf6b77c20020a typeref:typename:int file: extras:fileScope __anonf6b77c200303 input.c /^enum {$/;" g file: extras:fileScope,anonymous X input.c /^ X;$/;" e enum:__anonf6b77c200303 file: extras:fileScope Class2 input-0.js /^var Class2 = function() {$/;" c c2m1 input-0.js /^ this.c2m1 = function() {$/;" m class:Class2 anonymousFunctiond33a4a170300 input-0.js /^ c2m3(function() {$/;" f method:Class2.c2m1 extras:anonymous Class3 input-0.js /^var Class3 = function() {$/;" c c3m1 input-0.js /^ this.c3m1 = function() {$/;" m class:Class3 anonymousFunctiond33a4a170600 input-0.js /^ return function(n) {$/;" f method:Class3.c3m1 extras:anonymous f1 input-0.js /^function f1(y) {$/;" f anonymousFunctiond33a4a170700 input-0.js /^ return function(x) {$/;" f function:f1 extras:anonymous Mixin input-0.js /^function Mixin(superclass) {$/;" c AnonymousClassd33a4a170801 input-0.js /^ return class extends superclass {$/;" c class:Mixin extras:anonymous hello input-0.js /^ hello() {$/;" m class:Mixin.AnonymousClassd33a4a170801 AnonymousClassd33a4a170901 input-0.js /^class {$/;" c extras:anonymous method8 input-0.js /^ method8(n) { return n * n; }$/;" m class:AnonymousClassd33a4a170901 ================================================ FILE: Units/extra-anonymous.d/input-0.js ================================================ var Class2 = function() { this.c2m1 = function() { c2m3(function() { return { 'test': {} }; }); }; }; var Class3 = function() { this.c3m1 = function() { return function(n) { if (n == 42) { return 0; } else { return (n + 1) % 42; } }; }; } function f1(y) { return function(x) { return x*y; } } function Mixin(superclass) { return class extends superclass { hello() { return "hello from mixin"; } } } class { method8(n) { return n * n; } } ================================================ FILE: Units/extra-anonymous.d/input.c ================================================ struct { int x; }; union { int x; }; enum { X; }; ================================================ FILE: Units/extra-disabling-anonymous.d/args.ctags ================================================ --sort=no --extras=-{anonymous} --fields=+{extras} ================================================ FILE: Units/extra-disabling-anonymous.d/expected.tags ================================================ x input.c /^ int x;$/;" m struct:__anon335cadda0108 typeref:typename:int file: extras:fileScope x input.c /^ int x;$/;" m union:__anon335cadda020a typeref:typename:int file: extras:fileScope X input.c /^ X;$/;" e enum:__anon335cadda0303 file: extras:fileScope Class2 input-0.js /^var Class2 = function() {$/;" c c2m1 input-0.js /^ this.c2m1 = function() {$/;" m class:Class2 Class3 input-0.js /^var Class3 = function() {$/;" c c3m1 input-0.js /^ this.c3m1 = function() {$/;" m class:Class3 f1 input-0.js /^function f1(y) {$/;" f Mixin input-0.js /^function Mixin(superclass) {$/;" c hello input-0.js /^ hello() {$/;" m class:Mixin.AnonymousClass2503d9910801 method8 input-0.js /^ method8(n) { return n * n; }$/;" m class:AnonymousClass2503d9910901 ================================================ FILE: Units/extra-disabling-anonymous.d/input-0.js ================================================ var Class2 = function() { this.c2m1 = function() { c2m3(function() { return { 'test': {} }; }); }; }; var Class3 = function() { this.c3m1 = function() { return function(n) { if (n == 42) { return 0; } else { return (n + 1) % 42; } }; }; } function f1(y) { return function(x) { return x*y; } } function Mixin(superclass) { return class extends superclass { hello() { return "hello from mixin"; } } } class { method8(n) { return n * n; } } ================================================ FILE: Units/extra-disabling-anonymous.d/input.c ================================================ struct { int x; }; union { int x; }; enum { X; }; ================================================ FILE: Units/extra-file-scope-option.d/args.ctags ================================================ --extras=-F ================================================ FILE: Units/extra-file-scope-option.d/expected.tags ================================================ y input.c /^ void y(void) {}$/;" f typeref:typename:void ================================================ FILE: Units/extra-file-scope-option.d/input.c ================================================ static void x(void) {} void y(void) {} ================================================ FILE: Units/extra-total-lines.d/args.ctags ================================================ # `f' is optional # There was a bug that `.' was disabled when `f' was specified together. ## This test case lost the original aim when ## `.` extra field is replaced with `end:` field. --extras=+f --fields=+e --excmd=number ================================================ FILE: Units/extra-total-lines.d/expected.tags ================================================ input.c input.c 1;" F end:6 main input.c 2;" f typeref:typename:int end:5 ================================================ FILE: Units/extra-total-lines.d/foo.h ================================================ a b c d e f g h i j k l l m n o p q r s t u v w x y z ================================================ FILE: Units/extra-total-lines.d/input.c ================================================ # 1 "./foo.h" int main(void) { return 0; } /* comment */ ================================================ FILE: Units/flags-langdef-directions.r/bidirectional.d/args.ctags ================================================ --sort=no --fields=+{language} --langdef=Base --map-Base=.base --kinddef-Base=b,basefunc,functions in Base language --regex-Base=/(^[a-z0-9]+)\(/\1/b/ --langdef=Sub{base=Base}{bidirectional} --map-Sub=.sub --kinddef-Sub=s,subdef,definitions in Sub language --regex-Sub=/[ \t]*@def[ \t]+([a-z0-9]+).*;$/\1/d/ ================================================ FILE: Units/flags-langdef-directions.r/bidirectional.d/expected.tags ================================================ f input.base /^f() [$/;" b language:Base v input.base /^ @def v 1;$/;" d language:Sub f0 input-0.sub /^f0() [$/;" b language:Base v0 input-0.sub /^ @def v0 1;$/;" d language:Sub ================================================ FILE: Units/flags-langdef-directions.r/bidirectional.d/input-0.sub ================================================ f0() [ @def v0 1; ] ================================================ FILE: Units/flags-langdef-directions.r/bidirectional.d/input.base ================================================ f() [ @def v 1; ] ================================================ FILE: Units/flags-langdef-directions.r/dedicated.d/args.ctags ================================================ --sort=no --fields=+{language} --langdef=Base --map-Base=.base --kinddef-Base=b,basefunc,functions in Base language --regex-Base=/(^[a-z0-9]+)\(/\1/b/ --langdef=Sub{base=Base}{dedicated} --map-Sub=.sub --kinddef-Sub=s,subdef,definitions in Sub language --regex-Sub=/[ \t]*@def[ \t]+([a-z0-9]+).*;$/\1/d/ ================================================ FILE: Units/flags-langdef-directions.r/dedicated.d/expected.tags ================================================ f input.base /^f() [$/;" b language:Base f0 input-0.sub /^f0() [$/;" b language:Base v0 input-0.sub /^ @def v0 1;$/;" d language:Sub ================================================ FILE: Units/flags-langdef-directions.r/dedicated.d/input-0.sub ================================================ f0() [ @def v0 1; ] ================================================ FILE: Units/flags-langdef-directions.r/dedicated.d/input.base ================================================ f() [ @def v 1; ] ================================================ FILE: Units/flags-langdef-directions.r/default.d/args.ctags ================================================ --sort=no --fields=+{language} --langdef=Base --map-Base=.base --kinddef-Base=b,basefunc,functions in Base language --regex-Base=/(^[a-z0-9]+)\(/\1/b/ --langdef=Sub{base=Base} --map-Sub=.sub --kinddef-Sub=s,subdef,definitions in Sub language --regex-Sub=/[ \t]*@def[ \t]+([a-z0-9]+).*;$/\1/d/ ================================================ FILE: Units/flags-langdef-directions.r/default.d/expected.tags ================================================ f input.base /^f() [$/;" b language:Base v input.base /^ @def v 1;$/;" d language:Sub v0 input-0.sub /^ @def v0 1;$/;" d language:Sub ================================================ FILE: Units/flags-langdef-directions.r/default.d/input-0.sub ================================================ f0() [ @def v0 1; ] ================================================ FILE: Units/flags-langdef-directions.r/default.d/input.base ================================================ f() [ @def v 1; ] ================================================ FILE: Units/flags-langdef-directions.r/shared.d/args.ctags ================================================ --sort=no --fields=+{language} --langdef=Base --map-Base=.base --kinddef-Base=b,basefunc,functions in Base language --regex-Base=/(^[a-z0-9]+)\(/\1/b/ --langdef=Sub{base=Base}{shared} --map-Sub=.sub --kinddef-Sub=s,subdef,definitions in Sub language --regex-Sub=/[ \t]*@def[ \t]+([a-z0-9]+).*;$/\1/d/ ================================================ FILE: Units/flags-langdef-directions.r/shared.d/expected.tags ================================================ f input.base /^f() [$/;" b language:Base v input.base /^ @def v 1;$/;" d language:Sub v0 input-0.sub /^ @def v0 1;$/;" d language:Sub ================================================ FILE: Units/flags-langdef-directions.r/shared.d/input-0.sub ================================================ f0() [ @def v0 1; ] ================================================ FILE: Units/flags-langdef-directions.r/shared.d/input.base ================================================ f() [ @def v 1; ] ================================================ FILE: Units/foreign-tags.d/args.ctags ================================================ --sort=no --extras=+r --fields=+rlK --_roledef-C.f=documented,documented in a API document --langdef=DocC{_foreignLanguage=C} --map-DocC=.docc --regex-DocC=/^- +function: *([a-zA-Z_][a-zA-Z_0-9]+)\(/\1/f/{_language=C}{_role=documented} ================================================ FILE: Units/foreign-tags.d/expected.tags ================================================ compress input.docc /^- function: compress(const char *plain_text, enum algorithm alg) => char *$/;" function language:C roles:documented decompress input.docc /^- function: decompress(const char *compressed_byteseq) => char *$/;" function language:C roles:documented ================================================ FILE: Units/foreign-tags.d/input.docc ================================================ - function: compress(const char *plain_text, enum algorithm alg) => char * Compress a C string PLAING_TEXT with the algorithm specified with ALG. - function: decompress(const char *compressed_byteseq) => char * Decompress a byte sequence compressed by compress(). ================================================ FILE: Units/fuzz-hitting-assertions.r/README ================================================ With compiling ctags with -DDEBUG option, Assert macros are enabled. Current -DDEBUG is given by default. The fuzz target could make some assertions false for -DDEBUG ctags. This directory contains such unwanted inputs found by the target. They are minimized by SHRINK=1. Let's fix them! Don't forget rename .b directory to .d. ================================================ FILE: Units/fuzz-hitting-assertions.r/csharp-fha-0.d/expected.tags ================================================ ================================================ FILE: Units/fuzz-hitting-assertions.r/csharp-fha-0.d/input.cs ================================================ r PARAM = 1; ================================================ FILE: Units/fuzz-hitting-assertions.r/d-fha-0.d/README ================================================ Because the input is invalid as D lagnauge source code. For this input parser cannot build proper scope information. expected.tags in this directory is just placeholder. Nothing is expected for invalid input. ================================================ FILE: Units/fuzz-hitting-assertions.r/d-fha-0.d/expected.tags ================================================ T input.d /^template(){T;$/;" m file: ================================================ FILE: Units/fuzz-hitting-assertions.r/d-fha-0.d/input.d ================================================ template(){T; ================================================ FILE: Units/fuzz-hitting-assertions.r/eiffel-fha-0.d/expected.tags ================================================ ================================================ FILE: Units/fuzz-hitting-assertions.r/eiffel-fha-0.d/input.e ================================================ _ ================================================ FILE: Units/fuzz-hitting-assertions.r/java-fha-0.d/expected.tags ================================================ ================================================ FILE: Units/fuzz-hitting-assertions.r/java-fha-0.d/input.java ================================================ r PARAM = 1; ================================================ FILE: Units/fuzz-hitting-assertions.r/systemverilog-fha-0.d/expected.tags ================================================ ================================================ FILE: Units/fuzz-hitting-assertions.r/systemverilog-fha-0.d/input.sv ================================================ int ================================================ FILE: Units/fuzz-hitting-assertions.r/vera-fha-0.d/expected.tags ================================================ iA input.vr /^interface iA {/;" i ================================================ FILE: Units/fuzz-hitting-assertions.r/vera-fha-0.d/input.vr ================================================ interface iA { ================================================ FILE: Units/fuzz-hitting-assertions.r/verilog-fha-0.d/expected.tags ================================================ ================================================ FILE: Units/fuzz-hitting-assertions.r/verilog-fha-0.d/input.v ================================================ input ================================================ FILE: Units/guest-in-optlib-single-line.d/args.ctags ================================================ --sort=no --extras=+g --fields=+ln --langdef=single --map-single=.single --kinddef-single=d,def,definitions --regex-single=/^DEF:([a-zA-Z0-9]+)/\1/d --regex-single=/^BEGIN:([a-zA-Z0-9]+)$//{_guest=\1,0end,} --regex-single=/^BEGIN$//{_guest=,0end,} --regex-single=/^END:([a-zA-Z0-9]+)$//{_guest=\1,,0start} --regex-single=/^END$//{_guest=,,0start} --regex-single=/^BEGIN_FILE:([a-zA-Z0-9.]+)$//{_guest=*1,0end,} --regex-single=/^BEGIN_FILE$//{_guest=,0end,} --regex-single=/^END_FILE:([a-zA-Z0-9.]+)$//{_guest=*1,,0start} --regex-single=/^END_FILE$//{_guest=,,0start} --regex-single=/^BEGIN_C$//{_guest=C,0end,} --regex-single=/^END_C$//{_guest=C,,0start} --regex-single=/^(BEGIN:([a-zA-Z0-9]+)<).*(>END)$//{_guest=\2,1end,3start} --regex-single=/^BEGIN_FILE:([a-zA-Z0-9.]+)<(.*)>END_FILE$//{_guest=*1,2start,2end} --regex-single=/^(BEGIN_C<).*(>END_C)$//{_guest=C,1end,2start} ================================================ FILE: Units/guest-in-optlib-single-line.d/expected.tags ================================================ S0 input.single /^DEF:S0$/;" r line:1 language:single E0 input.single /^DEF:E0$/;" r line:7 language:single S1 input.single /^DEF:S1$/;" r line:10 language:single E1 input.single /^DEF:E1$/;" r line:16 language:single S2 input.single /^DEF:S2$/;" r line:18 language:single E2 input.single /^DEF:E2$/;" r line:24 language:single S3 input.single /^DEF:S3$/;" r line:26 language:single E3 input.single /^DEF:E3$/;" r line:32 language:single S4 input.single /^DEF:S4$/;" r line:34 language:single E4 input.single /^DEF:E4$/;" r line:43 language:single S5 input.single /^DEF:S5$/;" r line:45 language:single E5 input.single /^DEF:E5$/;" r line:47 language:single S6 input.single /^DEF:S6$/;" r line:49 language:single E6 input.single /^DEF:E6$/;" r line:51 language:single S7 input.single /^DEF:S7$/;" r line:53 language:single E7 input.single /^DEF:E7$/;" r line:55 language:single f0 input.single /^(defun f0 () (list))$/;" f line:4 language:Lisp f1 input.single /^(defun f1 () (list))$/;" f line:13 language:Lisp f2 input.single /^(defun f2 () (list))$/;" f line:21 language:Lisp f3 input.single /^(defun f3 () (list))$/;" f line:29 language:Lisp f4 input.single /^int f4 (void)$/;" f line:37 language:C typeref:typename:int f5 input.single /(defun f5 () (list))/;" f line:46 language:Lisp f6 input.single /(defun f6 () (list))/;" f line:50 language:Lisp f7 input.single /int f7 (void) { return 0; }/;" f line:54 language:C typeref:typename:int v0 input-0.single /(defvar v0 0/;" v line:1 language:Lisp g0 input-1.single /^(defun g0 () (list))$/;" f line:2 language:Lisp g1 input-1.single /^int g1 (void) { return 0; }$/;" f line:6 language:C typeref:typename:int g2 input-1.single /^function g2$/;" f line:10 language:Sh EOF input-1.single /^ cat > foo.rst <END ================================================ FILE: Units/guest-in-optlib-single-line.d/input-1.single ================================================ BEGIN:lisp (defun g0 () (list)) END BEGIN:C int g1 (void) { return 0; } END BEGIN:Sh function g2 { cat > foo.rst <END DEF:E5 DEF:S6 BEGIN_FILE:bar.cl<(defun f6 () (list))>END_FILE DEF:E6 DEF:S7 BEGIN_CEND_C DEF:E7 ================================================ FILE: Units/main-guessing.r/nolang-modeline-emacs-after-shbang.d/args.ctags ================================================ --guess-language-eagerly ================================================ FILE: Units/main-guessing.r/nolang-modeline-emacs-after-shbang.d/expected.tags ================================================ main input.nolang /^(define (main args) 1)$/;" f ================================================ FILE: Units/main-guessing.r/nolang-modeline-emacs-after-shbang.d/input.nolang ================================================ #!/bin/sh #| -*- scheme -*- |# :; exec gosh -- $0 "$@" (define (main args) 1) ================================================ FILE: Units/main-guessing.r/nolang-modeline-emacs-eof.d/args.ctags ================================================ --guess-language-eagerly ================================================ FILE: Units/main-guessing.r/nolang-modeline-emacs-eof.d/expected.tags ================================================ hello-world input.nolang /^(defun hello-world () (message "hello, world"))$/;" f ================================================ FILE: Units/main-guessing.r/nolang-modeline-emacs-eof.d/input.nolang ================================================ (defun hello-world () (message "hello, world")) ;; Local Variables: ;; mode: lisp ;; compile-command: "cc foo.c -Dfoo=bar -Dhack=whatever \ ;; -Dmumble=blaah" ;; End: ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ;; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ================================================ FILE: Units/main-guessing.r/nolang-modeline-emacs-firstline0.d/args.ctags ================================================ --guess-language-eagerly ================================================ FILE: Units/main-guessing.r/nolang-modeline-emacs-firstline0.d/expected.tags ================================================ hello-world input.nolang /^(defun hello-world () (message "hello, world"))$/;" f ================================================ FILE: Units/main-guessing.r/nolang-modeline-emacs-firstline0.d/input.nolang ================================================ ;; -*- mode: Lisp; fill-column: 75; comment-column: 50; -*- (defun hello-world () (message "hello, world")) ================================================ FILE: Units/main-guessing.r/nolang-modeline-emacs-firstline1.d/args.ctags ================================================ --guess-language-eagerly ================================================ FILE: Units/main-guessing.r/nolang-modeline-emacs-firstline1.d/expected.tags ================================================ hello input.nolang /^hello (void)$/;" f typeref:typename:int ================================================ FILE: Units/main-guessing.r/nolang-modeline-emacs-firstline1.d/input.nolang ================================================ /* -*- C -*- */ int hello (void) { return printf("hello, world\n"); } ================================================ FILE: Units/main-guessing.r/nolang-modeline-vim0-head.d/args.ctags ================================================ --guess-language-eagerly ================================================ FILE: Units/main-guessing.r/nolang-modeline-vim0-head.d/expected.tags ================================================ main input.nolang /^main(void)$/;" f typeref:typename:int ================================================ FILE: Units/main-guessing.r/nolang-modeline-vim0-head.d/input.nolang ================================================ /* ex:set filetype=c.qt: */ int main(void) { return 0; } ================================================ FILE: Units/main-guessing.r/nolang-modeline-vim0-tail.d/args.ctags ================================================ --guess-language-eagerly ================================================ FILE: Units/main-guessing.r/nolang-modeline-vim0-tail.d/expected.tags ================================================ main input.nolang /^main(void)$/;" f typeref:typename:int ================================================ FILE: Units/main-guessing.r/nolang-modeline-vim0-tail.d/input.nolang ================================================ int main(void) { return 0; } /* ex:set filetype=c.qt: */ ================================================ FILE: Units/main-guessing.r/nolang-modeline-vim1-head.d/args.ctags ================================================ --guess-language-eagerly ================================================ FILE: Units/main-guessing.r/nolang-modeline-vim1-head.d/expected.tags ================================================ main input.nolang /^main(void)$/;" f typeref:typename:int ================================================ FILE: Units/main-guessing.r/nolang-modeline-vim1-head.d/input.nolang ================================================ /* vim: se noet ft=c.qt: */ int main(void) { return 0; } ================================================ FILE: Units/main-guessing.r/nolang-modeline-vim1-tail.d/args.ctags ================================================ --guess-language-eagerly ================================================ FILE: Units/main-guessing.r/nolang-modeline-vim1-tail.d/expected.tags ================================================ main input.nolang /^main(void)$/;" f typeref:typename:int ================================================ FILE: Units/main-guessing.r/nolang-modeline-vim1-tail.d/input.nolang ================================================ int main(void) { return 0; } /* vim: se noet ft=c.qt: */ ================================================ FILE: Units/main-guessing.r/nolang-modeline-vim2-head.d/args.ctags ================================================ --fields=+l --guess-language-eagerly ================================================ FILE: Units/main-guessing.r/nolang-modeline-vim2-head.d/expected.tags ================================================ main input.nolang /^main(void)$/;" f language:C typeref:typename:int ================================================ FILE: Units/main-guessing.r/nolang-modeline-vim2-head.d/input.nolang ================================================ // vim: noet ft=first ft=c.qt int main(void) { return 0; } ================================================ FILE: Units/main-guessing.r/nolang-modeline-vim2-tail.d/args.ctags ================================================ --fields=+l --guess-language-eagerly ================================================ FILE: Units/main-guessing.r/nolang-modeline-vim2-tail.d/expected.tags ================================================ main input.nolang /^main(void)$/;" f language:C typeref:typename:int ================================================ FILE: Units/main-guessing.r/nolang-modeline-vim2-tail.d/input.nolang ================================================ int main(void) { return 0; } // vim: noet ft=first ft=c.qt ================================================ FILE: Units/main-guessing.r/nolang-modeline-zsh-autoload.d/args.ctags ================================================ -G --fields=+l ================================================ FILE: Units/main-guessing.r/nolang-modeline-zsh-autoload.d/expected.tags ================================================ _ctags input.nolang /^_ctags() {$/;" f language:Zsh ================================================ FILE: Units/main-guessing.r/nolang-modeline-zsh-autoload.d/input.nolang ================================================ #autoload _ctags() { return 0 } ================================================ FILE: Units/main-guessing.r/nolang-modeline-zsh-compdef.d/args.ctags ================================================ -G --fields=+l ================================================ FILE: Units/main-guessing.r/nolang-modeline-zsh-compdef.d/expected.tags ================================================ _ctags input.nolang /^_ctags() {$/;" f language:Zsh ================================================ FILE: Units/main-guessing.r/nolang-modeline-zsh-compdef.d/input.nolang ================================================ #compdef ctags _ctags() { return 0 } ================================================ FILE: Units/main-guessing.r/nolang-shebang-python3.d/args.ctags ================================================ --guess-language-eagerly ================================================ FILE: Units/main-guessing.r/nolang-shebang-python3.d/expected.tags ================================================ foo input.nolang /^def foo():$/;" f ================================================ FILE: Units/main-guessing.r/nolang-shebang-python3.d/input.nolang ================================================ #!/usr/bin/python3 def foo(): pass ================================================ FILE: Units/matlab-tg-corpus.d/expected.tags ================================================ backtrack input.m /^function [xn,fn,fcall] = backtrack(xc,d,fc,fnc,DDfnc,c,gamma,eps)$/;" f cDDfnc input.m /^ cDDfnc = gamma*cDDfnc;$/;" v cDDfnc input.m /^cDDfnc = c*DDfnc;$/;" v d input.m /^ d = gamma*d;$/;" v fcall input.m /^ fcall = fcall+1;$/;" v fcall input.m /^fcall = 1 ;$/;" v fn input.m /^ fn = feval(fnc,xn);$/;" v fn input.m /^fn = feval(fnc,xn);$/;" v func1 input.m /^function [x,y,z] = func1 $/;" f func2 input.m /^function x = func2 $/;" f func3 input.m /^function func3 $/;" f xn input.m /^ xn = xc;$/;" v xn input.m /^ xn = xc+d;$/;" v xn input.m /^xn = xc+d;$/;" v ================================================ FILE: Units/matlab-tg-corpus.d/features ================================================ regex ================================================ FILE: Units/matlab-tg-corpus.d/input.m ================================================ % http://www.math.washington.edu/~burke/crs/516/HTML/backtrack.html % Backtracking Linesearch function [xn,fn,fcall] = backtrack(xc,d,fc,fnc,DDfnc,c,gamma,eps) % %GENERAL DESCRIPTION % %This function performs the basic backtracking subroutine. %The subroutine requires the following input: % xc = the current point, % d = the direction of search, % fc = the current function value, % fnc = a string variable for the function name, % DDfnc = the directional derivative of fnc at xc in the % direction d, must have DDfnc < 0, % c = the slope modification parameter in (0,1), % gamma = the backstepping parameter in (0,1), % eps = the stopping criteria for norm(xn - xc), % that is, the main algorithm stops when % norm(xn - xc) <= eps. % %The routine returns % xn = the new point, % fn = the function value at the new point, % fnc = the number of calls to fnc. % %TERMINATION CRITERIA % %The backtracking is terminated if the step to the new point %xn is so small that it triggers termination in the main algorithm, %i.e. norm(xc - xn) <= eps. In this case we return xn = xc if %fn >= fc (we have not reduced the function value); otherwise, %we return xn. % %THE MATH % %The backtracking routing attempts to find a step size for %reducing the value of the function fnc given the current point xc %and a direction d. It does this by successively trying step sizes %of the form gamma^s for s = 0,1,2... to find the smallest %value of s for which the inequality % % fnc(xc+gamma^s*d)\le fnc(xc)+c*gamma^s*DD % % is satisfied. The new point to be returned is then given % by xn = xc+gamma^s*d. % %CHECK INPUT SPECIFICATIONS % if DDfnc >= 0, error('The backtracking subroutine has been sent a direction of nondesce nt. Program has been terminated.') end if c<= 0 | c>= 1, error('The slope modification parameter c in the backtracking subroutine is not in (0,1).') end if gamma<=0 | gamma >=1, error('The backtracking parameter gamma is not in (0,1).') end if eps <= 0, error('The termination criteria eps sent to the backtracking line search is not positive.') end % %CHECK DIMENSIONS % if size(xc)~=size(d) error('The vectors sent to backtrack are not of the same dimension.') end % % %EXECUTE THE LINE SEARCH % % xn = xc+d; cDDfnc = c*DDfnc; fn = feval(fnc,xn); fcall = 1 ; while fn > fc+cDDfnc, d = gamma*d; cDDfnc = gamma*cDDfnc; xn = xc+d; fn = feval(fnc,xn); fcall = fcall+1; %Check if the step to xn is too small. if norm(d) <= eps, disp('linesearch step too small') if fn >= fc, xn = xc; end break end end function [x,y,z] = func1 function x = func2 function func3 ================================================ FILE: Units/mtable-simple-with-continuation.d/args.ctags ================================================ --fields=+nKZe --langdef=X --langmap=X:.mtable --kinddef-X=c,class,classes --kinddef-X=n,namespace,namespaces --_tabledef-X=toplevel --_tabledef-X=class --_tabledef-X=classEnd --_tabledef-X=namespace --_tabledef-X=blockHead --_tabledef-X=block --_tabledef-X=blockEnd --_tabledef-X=separator --_mtable-regex-X=toplevel/class[ \t\n]//{tenter=class} --_mtable-regex-X=toplevel/namespace[ \t\n]//{tenter=namespace} --_mtable-regex-X=toplevel/[ \n\t]// --_mtable-regex-X=toplevel/.//{tenter=separator} --_mtable-regex-X=separator/[ \n\t]//{tleave} --_mtable-regex-X=separator/.// --_mtable-regex-X=class/([a-zA-Z0-9]+)/\1/c/{tenter=blockHead,classEnd}{scope=push} --_mtable-regex-X=class/.// --_mtable-regex-X=namespace/([a-zA-Z0-9]+)/\1/n/{tenter=blockHead,classEnd}{scope=push} --_mtable-regex-X=namespace/.// --_mtable-regex-X=blockHead/\{//{tenter=block,blockEnd} --_mtable-regex-X=blockHead/.// --_mtable-regex-X=block/\}//{tleave} --_mtable-extend-X=block+toplevel # --_mtable-regex-X=block/.// --_mtable-regex-X=classEnd///{tleave}{scope=pop} --_mtable-regex-X=blockEnd///{tleave} --kinds-X=-n ================================================ FILE: Units/mtable-simple-with-continuation.d/expected.tags ================================================ a input.mtable /^class a$/;" class line:1 end:4 c input.mtable /^class c$/;" class line:13 scope:namespace:e end:21 d input.mtable /^ class d {$/;" class line:17 scope:class:e.c end:19 ================================================ FILE: Units/mtable-simple-with-continuation.d/input.mtable ================================================ class a { . } dummyclass b { . } namespace e { class c { .. class d { } } } ================================================ FILE: Units/mtable-simple-with-table-extending.d/args.ctags ================================================ --fields=+nKZe --sort=no --langdef=X --langmap=X:.mtable --kinddef-X=v,var,variables --kinddef-X=f,fun,functions --_tabledef-X=main --_tabledef-X=comment_sharp_sa --_tabledef-X=comment_sharp_sharp --_tabledef-X=char --_tabledef-X=string --_tabledef-X=varlist --_tabledef-X=func --_tabledef-X=fbody --_tabledef-X=generic --_mtable-regex-X=generic/\/\*//{tenter=comment_sharp_sa} --_mtable-regex-X=generic/\/\///{tenter=comment_sharp_sharp} --_mtable-regex-X=generic/'//{tenter=char} --_mtable-regex-X=generic/"//{tenter=string} --_mtable-extend-X=main+generic --_mtable-regex-X=main/var//{tenter=varlist} --_mtable-regex-X=main/function//{tenter=func} --_mtable-regex-X=main/.// --_mtable-regex-X=comment_sharp_sa/\*\///{tleave} --_mtable-regex-X=comment_sharp_sa/.// --_mtable-regex-X=comment_sharp_sharp/\n//{tleave} --_mtable-regex-X=comment_sharp_sharp/.// --_mtable-regex-X=char/'//{tleave} --_mtable-regex-X=char/.// --_mtable-regex-X=string/"//{tleave} --_mtable-regex-X=string/.// --_mtable-extend-X=varlist+generic --_mtable-regex-X=varlist/([a-zA-Z]+)/\1/v/{scope=ref} --_mtable-regex-X=varlist/;//{tleave} --_mtable-regex-X=varlist/.// --_mtable-extend-X=func+generic --_mtable-regex-X=func/([a-zA-Z]+)/\1/f/{scope=push} --_mtable-regex-X=func/\{//{tjump=fbody} --_mtable-regex-X=func/.// --_mtable-extend-X=fbody+generic --_mtable-regex-X=fbody/\}//{tleave}{scope=pop} --_mtable-regex-X=fbody/var//{tenter=varlist} --_mtable-regex-X=fbody/function//{tenter=func} --_mtable-regex-X=fbody/.// ================================================ FILE: Units/mtable-simple-with-table-extending.d/expected.tags ================================================ foo input.mtable /^function foo$/;" fun line:1 end:17 a input.mtable /^ var a, b,$/;" var line:3 scope:fun:foo b input.mtable /^ var a, b,$/;" var line:3 scope:fun:foo c input.mtable /^c, e = "x";$/;" var line:16 scope:fun:foo e input.mtable /^c, e = "x";$/;" var line:16 scope:fun:foo bar input.mtable /^function bar$/;" fun line:19 end:27 y input.mtable /^ var y;$/;" var line:21 scope:fun:bar baz input.mtable /^ function baz$/;" fun line:22 scope:fun:bar end:25 z input.mtable /^ var z;$/;" var line:24 scope:fun:bar.baz ================================================ FILE: Units/mtable-simple-with-table-extending.d/input.mtable ================================================ function foo { var a, b, /* , */ // D, c, e = "x"; } function bar { var y; function baz { var z; } } ================================================ FILE: Units/mtable-simple.d/args.ctags ================================================ --fields=+nKZe --sort=no --langdef=X --langmap=X:.mtable --kinddef-X=v,var,variables --kinddef-X=f,fun,functions --_tabledef-X=main --_tabledef-X=comment_sharp_sa --_tabledef-X=comment_sharp_sharp --_tabledef-X=char --_tabledef-X=string --_tabledef-X=varlist --_tabledef-X=func --_tabledef-X=fbody --_mtable-regex-X=main/\/\*//{tenter=comment_sharp_sa} --_mtable-regex-X=main/\/\///{tenter=comment_sharp_sharp} --_mtable-regex-X=main/'//{tenter=char} --_mtable-regex-X=main/"//{tenter=string} --_mtable-regex-X=main/var//{tenter=varlist} --_mtable-regex-X=main/function//{tenter=func} --_mtable-regex-X=main/.// --_mtable-regex-X=comment_sharp_sa/\*\///{tleave} --_mtable-regex-X=comment_sharp_sa/.// --_mtable-regex-X=comment_sharp_sharp/\n//{tleave} --_mtable-regex-X=comment_sharp_sharp/.// --_mtable-regex-X=char/'//{tleave} --_mtable-regex-X=char/.// --_mtable-regex-X=string/"//{tleave} --_mtable-regex-X=string/.// --_mtable-regex-X=varlist/\/\*//{tenter=comment_sharp_sa} --_mtable-regex-X=varlist/\/\///{tenter=comment_sharp_sharp} --_mtable-regex-X=varlist/'//{tenter=char} --_mtable-regex-X=varlist/"//{tenter=string} --_mtable-regex-X=varlist/([a-zA-Z]+)/\1/v/{scope=ref} --_mtable-regex-X=varlist/;//{tleave} --_mtable-regex-X=varlist/.// --_mtable-regex-X=func/\/\*//{tenter=comment_sharp_sa} --_mtable-regex-X=func/\/\///{tenter=comment_sharp_sharp} --_mtable-regex-X=func/'//{tenter=char} --_mtable-regex-X=func/"//{tenter=string} --_mtable-regex-X=func/([a-zA-Z]+)/\1/f/{scope=push} --_mtable-regex-X=func/\{//{tjump=fbody} --_mtable-regex-X=func/.// --_mtable-regex-X=fbody/\/\*//{tenter=comment_sharp_sa} --_mtable-regex-X=fbody/\/\///{tenter=comment_sharp_sharp} --_mtable-regex-X=fbody/'//{tenter=char} --_mtable-regex-X=fbody/"//{tenter=string} --_mtable-regex-X=fbody/\}//{tleave}{scope=pop} --_mtable-regex-X=fbody/var//{tenter=varlist} --_mtable-regex-X=fbody/function//{tenter=func} --_mtable-regex-X=fbody/.// ================================================ FILE: Units/mtable-simple.d/expected.tags ================================================ foo input.mtable /^function foo$/;" fun line:1 end:17 a input.mtable /^ var a, b,$/;" var line:3 scope:fun:foo b input.mtable /^ var a, b,$/;" var line:3 scope:fun:foo c input.mtable /^c, e = "x";$/;" var line:16 scope:fun:foo e input.mtable /^c, e = "x";$/;" var line:16 scope:fun:foo bar input.mtable /^function bar$/;" fun line:19 end:27 y input.mtable /^ var y;$/;" var line:21 scope:fun:bar baz input.mtable /^ function baz$/;" fun line:22 scope:fun:bar end:25 z input.mtable /^ var z;$/;" var line:24 scope:fun:bar.baz ================================================ FILE: Units/mtable-simple.d/input.mtable ================================================ function foo { var a, b, /* , */ // D, c, e = "x"; } function bar { var y; function baz { var z; } } ================================================ FILE: Units/noext-tg-matlab.d/args.ctags ================================================ --guess-language-eagerly ================================================ FILE: Units/noext-tg-matlab.d/expected.tags ================================================ backtrack input.nolang /^function [xn,fn,fcall] = backtrack(xc,d,fc,fnc,DDfnc,c,gamma,eps)$/;" f cDDfnc input.nolang /^ cDDfnc = gamma*cDDfnc;$/;" v cDDfnc input.nolang /^cDDfnc = c*DDfnc;$/;" v d input.nolang /^ d = gamma*d;$/;" v fcall input.nolang /^ fcall = fcall+1;$/;" v fcall input.nolang /^fcall = 1 ;$/;" v fn input.nolang /^ fn = feval(fnc,xn);$/;" v fn input.nolang /^fn = feval(fnc,xn);$/;" v func1 input.nolang /^function [x,y,z] = func1 $/;" f func2 input.nolang /^function x = func2 $/;" f func3 input.nolang /^function func3 $/;" f xn input.nolang /^ xn = xc;$/;" v xn input.nolang /^ xn = xc+d;$/;" v xn input.nolang /^xn = xc+d;$/;" v ================================================ FILE: Units/noext-tg-matlab.d/features ================================================ regex ================================================ FILE: Units/noext-tg-matlab.d/input.nolang ================================================ % -*- matlab -*- % http://www.math.washington.edu/~burke/crs/516/HTML/backtrack.html % Backtracking Linesearch function [xn,fn,fcall] = backtrack(xc,d,fc,fnc,DDfnc,c,gamma,eps) % %GENERAL DESCRIPTION % %This function performs the basic backtracking subroutine. %The subroutine requires the following input: % xc = the current point, % d = the direction of search, % fc = the current function value, % fnc = a string variable for the function name, % DDfnc = the directional derivative of fnc at xc in the % direction d, must have DDfnc < 0, % c = the slope modification parameter in (0,1), % gamma = the backstepping parameter in (0,1), % eps = the stopping criteria for norm(xn - xc), % that is, the main algorithm stops when % norm(xn - xc) <= eps. % %The routine returns % xn = the new point, % fn = the function value at the new point, % fnc = the number of calls to fnc. % %TERMINATION CRITERIA % %The backtracking is terminated if the step to the new point %xn is so small that it triggers termination in the main algorithm, %i.e. norm(xc - xn) <= eps. In this case we return xn = xc if %fn >= fc (we have not reduced the function value); otherwise, %we return xn. % %THE MATH % %The backtracking routing attempts to find a step size for %reducing the value of the function fnc given the current point xc %and a direction d. It does this by successively trying step sizes %of the form gamma^s for s = 0,1,2... to find the smallest %value of s for which the inequality % % fnc(xc+gamma^s*d)\le fnc(xc)+c*gamma^s*DD % % is satisfied. The new point to be returned is then given % by xn = xc+gamma^s*d. % %CHECK INPUT SPECIFICATIONS % if DDfnc >= 0, error('The backtracking subroutine has been sent a direction of nondesce nt. Program has been terminated.') end if c<= 0 | c>= 1, error('The slope modification parameter c in the backtracking subroutine is not in (0,1).') end if gamma<=0 | gamma >=1, error('The backtracking parameter gamma is not in (0,1).') end if eps <= 0, error('The termination criteria eps sent to the backtracking line search is not positive.') end % %CHECK DIMENSIONS % if size(xc)~=size(d) error('The vectors sent to backtrack are not of the same dimension.') end % % %EXECUTE THE LINE SEARCH % % xn = xc+d; cDDfnc = c*DDfnc; fn = feval(fnc,xn); fcall = 1 ; while fn > fc+cDDfnc, d = gamma*d; cDDfnc = gamma*cDDfnc; xn = xc+d; fn = feval(fnc,xn); fcall = fcall+1; %Check if the step to xn is too small. if norm(d) <= eps, disp('linesearch step too small') if fn >= fc, xn = xc; end break end end function [x,y,z] = func1 function x = func2 function func3 ================================================ FILE: Units/noext-tg-objc.d/args.ctags ================================================ --guess-language-eagerly ================================================ FILE: Units/noext-tg-objc.d/expected.tags ================================================ FileTree input.nolang /^@implementation FileTree$/;" I FolderTree input.nolang /^@implementation FolderTree$/;" I MyClass input.nolang /^@implementation MyClass$/;" I addChild: input.nolang /^- (FolderTree*)addChild:(FileTree*)subTree$/;" m implementation:FolderTree createFileList:atPlace: input.nolang /^+ (void) createFileList: (NSString*)root atPlace:(FolderTree*)parentFolder$/;" c implementation:FolderTree createLayoutTree input.nolang /^- (LayoutTree*)createLayoutTree$/;" m implementation:FileTree createLayoutTree input.nolang /^- (LayoutTree*)createLayoutTree$/;" m implementation:FolderTree dealloc input.nolang /^- (void)dealloc$/;" m implementation:FileTree dealloc input.nolang /^- (void)dealloc$/;" m implementation:FolderTree getDiskSize input.nolang /^- (FileSize)getDiskSize$/;" m implementation:FileTree initWithName:andSize:atPlace: input.nolang /^- (id)initWithName:(NSString*)treeName$/;" m implementation:FileTree initWithName:atPlace: input.nolang /^- (id)initWithName:(NSString*)treeName$/;" m implementation:FileTree initWithName:atPlace: input.nolang /^- (id)initWithName:(NSString*)treeName$/;" m implementation:FolderTree main input.nolang /^int main(int argc, char** argv)$/;" f myClassMethod:with: input.nolang /^+ (void)myClassMethod:(int)arg1 with:(id)arg2;$/;" c implementation:MyClass myInstanceMethod:with: input.nolang /^- (void)myInstanceMethod:(int)arg1 with:(id)arg2;$/;" m implementation:MyClass populateChildList: input.nolang /^- (void) populateChildList:(NSString*)root$/;" m implementation:FolderTree ================================================ FILE: Units/noext-tg-objc.d/input.nolang ================================================ /* -*- objc -*- */ #if 0 // This is ABOUT of Units facility. // ABC /* ABC */ /* ABC */ /* ABC * */ #include #include "stdio.h" #include #include "a/stdio.h" #include "a_stdio.h" #endif int main(int argc, char** argv) { return __pid; } #endif @implementation MyClass + (void)myClassMethod:(int)arg1 with:(id)arg2; - (void)myInstanceMethod:(int)arg1 with:(id)arg2; @end @implementation FileTree - (FileSize)getDiskSize { return diskSize; } - (id)initWithName:(NSString*)treeName atPlace:(FolderTree*)parentFolder { self = [super init]; diskSize = 0; name = treeName; parent = parentFolder; [name retain]; representation = nil; return self; } - (id)initWithName:(NSString*)treeName andSize:(FileSize)size atPlace:(FolderTree*)parentFolder { self = [super init]; diskSize = size; name = treeName; parent = parentFolder; [name retain]; representation = nil; return self; } - (void)dealloc { [name release]; [representation release]; [super dealloc]; } - (LayoutTree*)createLayoutTree { return nil; } @end @implementation FolderTree - (id)initWithName:(NSString*)treeName atPlace:(FolderTree*)parentFolder { self = [super initWithName:treeName atPlace:parentFolder]; children = [[NSMutableArray alloc] init]; return self; } - (void)dealloc { [children release]; [super dealloc]; } + (void) createFileList: (NSString*)root atPlace:(FolderTree*)parentFolder { NSFileManager *localFileManager = [[NSFileManager alloc] init]; NSURL *rootUrl = [NSURL fileURLWithPath:root]; NSDirectoryEnumerator *dirEnumerator = [localFileManager enumeratorAtURL:rootUrl includingPropertiesForKeys:[NSArray arrayWithObjects: NSURLNameKey, NSURLIsDirectoryKey, nil] options:NSDirectoryEnumerationSkipsHiddenFiles errorHandler:nil]; for (NSURL *theURL in dirEnumerator) { [theURL getResourceValue:&fileName forKey:NSURLNameKey error:NULL]; // Ignore files under the _extras directory if ([isDirectory boolValue]==YES) { [folder populateChildList:root]; } else if ([isDirectory boolValue]==NO) { [parentFolder addChild:f]; } } } - (void) populateChildList:(NSString*)root { NSString *thisRoot = [[root stringByAppendingString:@"/"] stringByAppendingString:name]; [FolderTree createFileList:thisRoot atPlace:self]; for ( FileTree *f in children ) diskSize += [f getDiskSize]; } - (FolderTree*)addChild:(FileTree*)subTree { [children addObject:subTree]; return self; } - (LayoutTree*)createLayoutTree { return [[LayoutTree alloc] initWithFileList:children andTotalSize:diskSize]; } @end ================================================ FILE: Units/objc-tg-corpus.d/expected.tags ================================================ FileTree input.m /^@implementation FileTree$/;" I FolderTree input.m /^@implementation FolderTree$/;" I MyClass input.m /^@implementation MyClass$/;" I addChild: input.m /^- (FolderTree*)addChild:(FileTree*)subTree$/;" m implementation:FolderTree createFileList:atPlace: input.m /^+ (void) createFileList: (NSString*)root atPlace:(FolderTree*)parentFolder$/;" c implementation:FolderTree createLayoutTree input.m /^- (LayoutTree*)createLayoutTree$/;" m implementation:FileTree createLayoutTree input.m /^- (LayoutTree*)createLayoutTree$/;" m implementation:FolderTree dealloc input.m /^- (void)dealloc$/;" m implementation:FileTree dealloc input.m /^- (void)dealloc$/;" m implementation:FolderTree getDiskSize input.m /^- (FileSize)getDiskSize$/;" m implementation:FileTree initWithName:andSize:atPlace: input.m /^- (id)initWithName:(NSString*)treeName$/;" m implementation:FileTree initWithName:atPlace: input.m /^- (id)initWithName:(NSString*)treeName$/;" m implementation:FileTree initWithName:atPlace: input.m /^- (id)initWithName:(NSString*)treeName$/;" m implementation:FolderTree main input.m /^int main(int argc, char** argv)$/;" f myClassMethod:with: input.m /^+ (void)myClassMethod:(int)arg1 with:(id)arg2;$/;" c implementation:MyClass myInstanceMethod:with: input.m /^- (void)myInstanceMethod:(int)arg1 with:(id)arg2;$/;" m implementation:MyClass populateChildList: input.m /^- (void) populateChildList:(NSString*)root$/;" m implementation:FolderTree ================================================ FILE: Units/objc-tg-corpus.d/input.m ================================================ #if 0 // This is ABOUT of Units facility. // ABC /* ABC */ /* ABC */ /* ABC * */ #include #include "stdio.h" #include #include "a/stdio.h" #include "a_stdio.h" #endif int main(int argc, char** argv) { return __pid; } #endif @implementation MyClass + (void)myClassMethod:(int)arg1 with:(id)arg2; - (void)myInstanceMethod:(int)arg1 with:(id)arg2; @end @implementation FileTree - (FileSize)getDiskSize { return diskSize; } - (id)initWithName:(NSString*)treeName atPlace:(FolderTree*)parentFolder { self = [super init]; diskSize = 0; name = treeName; parent = parentFolder; [name retain]; representation = nil; return self; } - (id)initWithName:(NSString*)treeName andSize:(FileSize)size atPlace:(FolderTree*)parentFolder { self = [super init]; diskSize = size; name = treeName; parent = parentFolder; [name retain]; representation = nil; return self; } - (void)dealloc { [name release]; [representation release]; [super dealloc]; } - (LayoutTree*)createLayoutTree { return nil; } @end @implementation FolderTree - (id)initWithName:(NSString*)treeName atPlace:(FolderTree*)parentFolder { self = [super initWithName:treeName atPlace:parentFolder]; children = [[NSMutableArray alloc] init]; return self; } - (void)dealloc { [children release]; [super dealloc]; } + (void) createFileList: (NSString*)root atPlace:(FolderTree*)parentFolder { NSFileManager *localFileManager = [[NSFileManager alloc] init]; NSURL *rootUrl = [NSURL fileURLWithPath:root]; NSDirectoryEnumerator *dirEnumerator = [localFileManager enumeratorAtURL:rootUrl includingPropertiesForKeys:[NSArray arrayWithObjects: NSURLNameKey, NSURLIsDirectoryKey, nil] options:NSDirectoryEnumerationSkipsHiddenFiles errorHandler:nil]; for (NSURL *theURL in dirEnumerator) { [theURL getResourceValue:&fileName forKey:NSURLNameKey error:NULL]; // Ignore files under the _extras directory if ([isDirectory boolValue]==YES) { [folder populateChildList:root]; } else if ([isDirectory boolValue]==NO) { [parentFolder addChild:f]; } } } - (void) populateChildList:(NSString*)root { NSString *thisRoot = [[root stringByAppendingString:@"/"] stringByAppendingString:name]; [FolderTree createFileList:thisRoot atPlace:self]; for ( FileTree *f in children ) diskSize += [f getDiskSize]; } - (FolderTree*)addChild:(FileTree*)subTree { [children addObject:subTree]; return self; } - (LayoutTree*)createLayoutTree { return [[LayoutTree alloc] initWithFileList:children andTotalSize:diskSize]; } @end ================================================ FILE: Units/option-add-alias.d/args.ctags ================================================ --alias-python=+serpent --guess-language-eagerly ================================================ FILE: Units/option-add-alias.d/expected.tags ================================================ main input.nolang /^def main (args):$/;" f ================================================ FILE: Units/option-add-alias.d/input.nolang ================================================ #!/bin/serpent def main (args): print args ================================================ FILE: Units/option-disable-kind-in-both.d/args.ctags ================================================ --regex-c=/define (.*);/\1/f,function/ --kinds-c=-f ================================================ FILE: Units/option-disable-kind-in-both.d/expected.tags ================================================ ================================================ FILE: Units/option-disable-kind-in-both.d/input.c ================================================ int main(void) { define a; return a; } ================================================ FILE: Units/option-disable-kind-in-builtin.d/args.ctags ================================================ --regex-c=/define (.*);/\1/X,XDEFINE/ --kinds-c=-f ================================================ FILE: Units/option-disable-kind-in-builtin.d/expected.tags ================================================ a input.c /^ define a;$/;" X ================================================ FILE: Units/option-disable-kind-in-builtin.d/features ================================================ regex ================================================ FILE: Units/option-disable-kind-in-builtin.d/input.c ================================================ int main(void) { define a; return a; } ================================================ FILE: Units/option-disable-kind-in-regex.d/args.ctags ================================================ --regex-c=/define (.*);/\1/X,XDEFINE/ --kinds-c=-X ================================================ FILE: Units/option-disable-kind-in-regex.d/expected.tags ================================================ main input.c /^main(void)$/;" f typeref:typename:int ================================================ FILE: Units/option-disable-kind-in-regex.d/input.c ================================================ int main(void) { define a; return a; } ================================================ FILE: Units/option-extradef.d/args.ctags ================================================ --_extradef-Python=main,__main__ entry points --extras-Python=+{main} --regex-Python=/^if __name__ == '__main__':/__main__/f/{_extra=main} --fields=+E ================================================ FILE: Units/option-extradef.d/expected.tags ================================================ __main__ input.py /^if __name__ == '__main__':$/;" f extras:main ================================================ FILE: Units/option-extradef.d/input.py ================================================ # # # if __name__ == '__main__': do_something() ================================================ FILE: Units/option-file-tags-no.d/args.ctags ================================================ --file-tags=no --fields=+K ================================================ FILE: Units/option-file-tags-no.d/expected.tags ================================================ ================================================ FILE: Units/option-file-tags-no.d/input.mk ================================================ ================================================ FILE: Units/option-file-tags.d/args.ctags ================================================ --file-tags --fields=+K ================================================ FILE: Units/option-file-tags.d/expected.tags ================================================ input.mk input.mk 1;" file ================================================ FILE: Units/option-file-tags.d/input.mk ================================================ ================================================ FILE: Units/option-input-file.d/README ================================================ This test case is intended to be run under valgrind for capaturing memory leaks. ================================================ FILE: Units/option-input-file.d/args.ctags ================================================ SOMETHING STRING ================================================ FILE: Units/option-input-file.d/expected.tags ================================================ main input.c /^main(void)$/;" f typeref:typename:int ================================================ FILE: Units/option-input-file.d/input.c ================================================ int main(void) { } ================================================ FILE: Units/option-lang-compatibility.d/args.ctags ================================================ --langdef=foo --langmap=foo:+.foo --regex-foo=/^\/([a-z]) def$/\1/d,definition/ ================================================ FILE: Units/option-lang-compatibility.d/expected.tags ================================================ x input.foo /^\/x def$/;" d y input.foo /^\/y def$/;" d z input.foo /^\/z def$/;" d ================================================ FILE: Units/option-lang-compatibility.d/features ================================================ regex ================================================ FILE: Units/option-lang-compatibility.d/input.foo ================================================ /x def /y def /z def ================================================ FILE: Units/option-langmap-ext--ext.d/args.ctags ================================================ --langmap=c:.c.x ================================================ FILE: Units/option-langmap-ext--ext.d/expected.tags ================================================ main input.x /^main(void)$/;" f typeref:typename:int ================================================ FILE: Units/option-langmap-ext--ext.d/input.x ================================================ int main(void) { return 0; } ================================================ FILE: Units/option-langmap-ext--pat-ext.d/args.ctags ================================================ --langmap=c:.c(input.zzz).x ================================================ FILE: Units/option-langmap-ext--pat-ext.d/expected.tags ================================================ main input.zzz /^main(void)$/;" f typeref:typename:int ================================================ FILE: Units/option-langmap-ext--pat-ext.d/input.zzz ================================================ int main(void) { return 0; } ================================================ FILE: Units/option-langmap-ext-pat--ext.d/args.ctags ================================================ --langmap=c:.c(input.ZZZ).x ================================================ FILE: Units/option-langmap-ext-pat--ext.d/expected.tags ================================================ main input.x /^main(void)$/;" f typeref:typename:int ================================================ FILE: Units/option-langmap-ext-pat--ext.d/input.x ================================================ int main(void) { return 0; } ================================================ FILE: Units/option-langmap-pat--ext.d/args.ctags ================================================ --langmap=c:(input.YYY).x ================================================ FILE: Units/option-langmap-pat--ext.d/expected.tags ================================================ main input.x /^main(void)$/;" f typeref:typename:int ================================================ FILE: Units/option-langmap-pat--ext.d/input.x ================================================ int main(void) { return 0; } ================================================ FILE: Units/option-langmap-pat--pat-ext.d/args.ctags ================================================ --langmap=c:(input.yyy)(input.zzz).x ================================================ FILE: Units/option-langmap-pat--pat-ext.d/expected.tags ================================================ main input.zzz /^main(void)$/;" f typeref:typename:int ================================================ FILE: Units/option-langmap-pat--pat-ext.d/input.zzz ================================================ int main(void) { return 0; } ================================================ FILE: Units/option-regex-attaching-role.r/extending-existing-parser.d/args.ctags ================================================ # # This is an example of capturing reference tags by extending # already existing parser. # # Gauche is an implementation Scheme language. # It has a module system. # # Copyright: 2018 Masatake YAMATO # License: GPL-2 # --langdef=myGauche{base=Scheme} --kinddef-myGauche=m,module,modules --_roledef-myGauche.m=used,specified as argument for use --_roledef-myGauche.{module}=exported,specified as argument for export --_roledef-myGauche.{module}=selected,specified as argument for select --_tabledef-myGauche=main --_tabledef-myGauche=export # # MAIN TABLE # # Cut the corners. # In serious parser, You should define tables for select-module, define-module and use. --_mtable-regex-myGauche=main/\(define-module[ \t\n]+([-a-zA-Z0-9]+)/\1/m/{tenter=main}{scope=push} --_mtable-regex-myGauche=main/\(//{tenter=main}{scope=push}{placeholder} --_mtable-regex-myGauche=main/\)//{tleave}{scope=pop} --_mtable-regex-myGauche=main/[ \t\n]+// # Cut the corners. --_mtable-regex-myGauche=main/select-module[ \t\n]+([-a-zA-Z0-9]+)/\1/m/{_role=selected}{scope=set} --_mtable-regex-myGauche=main/use[ \t\n]+([-a-zA-Z0-9]+)/\1/m/{_role=used}{scope=ref} --_mtable-regex-myGauche=main/export[ \t\n]+//{tenter=export} # TODO: This fall-back pattern should be implementated in ctags main side as default behaviour. --_mtable-regex-myGauche=main/.// # # EXPORT TABLE # --_mtable-regex-myGauche=export/[ \t\n]+// # TODO: Why \0 is not allowed? --_mtable-regex-myGauche=export/([-a-zA-Z0-9]+)/\1/m/{_role=exported}{scope=ref} # Return to parent table with ungetc --_mtable-regex-myGauche=export/\)//{_advanceTo=0start}{tleave} --_mtable-regex-myGauche=export/.// --extras=+r --fields=+r --fields=+K{scope}{language} --sort=no ================================================ FILE: Units/option-regex-attaching-role.r/extending-existing-parser.d/expected.tags ================================================ foo input.scm /^(define-module foo$/;" unknown language:Scheme roles:def definer:DEFINE-MODULE foobar input.scm /^(define (foobar)$/;" function language:Scheme roles:def foo input.scm /^(define-module foo$/;" module language:myGauche roles:def bar input.scm /^ (use bar)$/;" module language:myGauche scope:module:foo roles:used baz0 input.scm /^ (export baz0 baz1))$/;" module language:myGauche scope:module:foo roles:exported baz1 input.scm /^ (export baz0 baz1))$/;" module language:myGauche scope:module:foo roles:exported foo input.scm /^(select-module foo)$/;" module language:myGauche roles:selected ================================================ FILE: Units/option-regex-attaching-role.r/extending-existing-parser.d/input.scm ================================================ (define-module foo (use bar) (export baz0 baz1)) (select-module foo) (define (foobar) 1) ================================================ FILE: Units/option-regex-attaching-role.r/standing-alone-line-parser.d/args.ctags ================================================ --langdef=FOO --map-FOO=.foo --kinddef-FOO=m,module,modules --kinddef-FOO=f,foofile,files written in FOO{_refonly} --kinddef-FOO=n,namespace,namespace --_fielddef-FOO=assocMod,module associated with the namespace --_roledef-FOO.m=used,refereed as an external module --_roledef-FOO.{module}=loaded,loaded into the current name space --_roledef-FOO.f=loaded,loaded into the current name space --regex-FOO=/^defmod +([A-Z]+)/\1/m/ --regex-FOO=/^use +([A-Z]+)/\1/m/{_role=used} --regex-FOO=/^load +([A-Z]+)/\1/m/{_role=loaded} --regex-FOO=/^load +"([^"]+)"/\1/f/{_role=loaded} --regex-FOO=/^load-and-use +([A-Z]+)/\1/m/{_role=loaded}{_role=used} --regex-FOO=/^use +([A-Z]+) +as +([a-z]+)/\2/n/{_field=assocMod:\1} --regex-FOO=/^load-and-use +([A-Z]+) +as +([a-z]+)/\2/n/{_field=assocMod:\1} --fields=+r --fields-FOO=+{assocMod} --extras=+r --sort=no ================================================ FILE: Units/option-regex-attaching-role.r/standing-alone-line-parser.d/expected.tags ================================================ A input.foo /^use A$/;" m roles:used B input.foo /^load B$/;" m roles:loaded C.foo input.foo /^load "C.foo"$/;" f roles:loaded D input.foo /^load-and-use D$/;" m roles:used,loaded E input.foo /^use E as e$/;" m roles:used e input.foo /^use E as e$/;" n roles:def assocMod:E F input.foo /^load-and-use F as f$/;" m roles:used,loaded f input.foo /^load-and-use F as f$/;" n roles:def assocMod:F MYMODULE input.foo /^defmod MYMODULE$/;" m roles:def ================================================ FILE: Units/option-regex-attaching-role.r/standing-alone-line-parser.d/input.foo ================================================ use A load B load "C.foo" load-and-use D use E as e load-and-use F as f defmod MYMODULE ================================================ FILE: Units/option-same-kind-in-regex-and-builtin.d/args.ctags ================================================ --regex-c=/define (.*);/\1/f,function/ --kinds-c=f ================================================ FILE: Units/option-same-kind-in-regex-and-builtin.d/expected.tags ================================================ a input.c /^ define a;$/;" f main input.c /^main(void)$/;" f typeref:typename:int ================================================ FILE: Units/option-same-kind-in-regex-and-builtin.d/features ================================================ regex ================================================ FILE: Units/option-same-kind-in-regex-and-builtin.d/input.c ================================================ unsigned int level = 42; int main(void) { define a; return a; } ================================================ FILE: Units/optlib-recursive.d/args.ctags ================================================ --options=lang ================================================ FILE: Units/optlib-recursive.d/expected.tags ================================================ Animal input.cof /^class Animal$/;" c Horse input.cof /^class Horse extends Animal$/;" c Snake input.cof /^class Snake extends Animal$/;" c constructor input.cof /^ constructor: (@name) ->$/;" f move input.cof /^ move: (meters) ->$/;" f move input.cof /^ move: ->$/;" f ================================================ FILE: Units/optlib-recursive.d/features ================================================ option-directory regex ================================================ FILE: Units/optlib-recursive.d/input.cof ================================================ # Taken from http://coffeescript.org/ class Animal constructor: (@name) -> move: (meters) -> alert @name + " moved #{meters}m." class Snake extends Animal move: -> alert "Slithering..." super 5 class Horse extends Animal move: -> alert "Galloping..." super 45 ================================================ FILE: Units/optlib-recursive.d/optlib/lang/a.ctags ================================================ # # Taken from https://github.com/fishman/dot_files/blob/master/ctags/.ctags # --langdef=Cof ================================================ FILE: Units/optlib-recursive.d/optlib/lang/b.ctags ================================================ # # Taken from https://github.com/fishman/dot_files/blob/master/ctags/.ctags # --langmap=Cof:.cof ================================================ FILE: Units/optlib-recursive.d/optlib/lang/c.ctags ================================================ # # Taken from https://github.com/fishman/dot_files/blob/master/ctags/.ctags # --regex-Cof=/^[ \t]*class ([a-zA-Z_$][0-9a-zA-Z_.$]*).*$/\1/c,class/ ================================================ FILE: Units/optlib-recursive.d/optlib/lang/d.ctags ================================================ # # Taken from https://github.com/fishman/dot_files/blob/master/ctags/.ctags # --regex-Cof=/^[ \t]*([a-zA-Z_$@][0-9a-zA-Z_$\.]*)[ \t]*[:=].*[=-]>.*$/\1/f,function/ ================================================ FILE: Units/optlib-recursive.d/optlib/lang/e.ctags ================================================ # # Taken from https://github.com/fishman/dot_files/blob/master/ctags/.ctags # --regex-Cof=/^[ \t]*([a-zA-Z_$@][0-9a-zA-Z_$\.]*)[ \t]*=[^->\n]*$/\1/v,variable/ ================================================ FILE: Units/optlib-simple.d/args.ctags ================================================ --options=coffee.ctags ================================================ FILE: Units/optlib-simple.d/expected.tags ================================================ Animal input.coffee /^class Animal$/;" c Horse input.coffee /^class Horse extends Animal$/;" c Snake input.coffee /^class Snake extends Animal$/;" c constructor input.coffee /^ constructor: (@name) ->$/;" f move input.coffee /^ move: (meters) ->$/;" f move input.coffee /^ move: ->$/;" f ================================================ FILE: Units/optlib-simple.d/features ================================================ regex ================================================ FILE: Units/optlib-simple.d/input.coffee ================================================ # Taken from http://coffeescript.org/ class Animal constructor: (@name) -> move: (meters) -> alert @name + " moved #{meters}m." class Snake extends Animal move: -> alert "Slithering..." super 5 class Horse extends Animal move: -> alert "Galloping..." super 45 ================================================ FILE: Units/optlib-simple.d/optlib/coffee.ctags ================================================ # # Taken from https://github.com/fishman/dot_files/blob/master/ctags/.ctags # --langdef=coffee --langmap=coffee:.coffee --regex-coffee=/^[ \t]*class ([a-zA-Z_$][0-9a-zA-Z_.$]*).*$/\1/c,class/ --regex-coffee=/^[ \t]*([a-zA-Z_$@][0-9a-zA-Z_$\.]*)[ \t]*[:=].*[=-]>.*$/\1/f,function/ --regex-coffee=/^[ \t]*([a-zA-Z_$@][0-9a-zA-Z_$\.]*)[ \t]*=[^->\n]*$/\1/v,variable/ ================================================ FILE: Units/optscript.r/op-access.d/args.ctags ================================================ --sort=no --langdef=X --map-X=.unknown --kinddef-X=v,var,variables --fields=+{access} --regex-X=/^(pub|priv) +var +([a-z]+)$/\2/v/{{ . \1 (pub) eq {(public)}{(private)} ifelse access: mark . :access { 0 string cvs (-) \2 _buildstring /var _tag _commit pop } { cleartomark } ifelse }} ================================================ FILE: Units/optscript.r/op-access.d/expected.tags ================================================ x input.unknown /^pub var x$/;" v access:public public-x input.unknown /^pub var x$/;" v y input.unknown /^priv var y$/;" v access:private private-y input.unknown /^priv var y$/;" v ================================================ FILE: Units/optscript.r/op-access.d/input.unknown ================================================ pub var x priv var y ================================================ FILE: Units/optscript.r/op-anongen.d/args.ctags ================================================ --sort=no --fields=+{extras}{language} --langdef=Foo{_foreignLanguage=C} --map-Foo=.foo --kinddef-Foo=a,app,applications --regex-Foo=/^c:(.)$//{{ \1 /C /struct _anongen /C /struct _foreigntag _commit /anonymous _markextra }} --regex-Foo=/^f:(.)$//{{ \1 /app _anongen /app _tag _commit /anonymous _markextra }} ================================================ FILE: Units/optscript.r/op-anongen.d/expected.tags ================================================ 15263c7700108 input.foo /^c:1$/;" s language:C extras:anonymous 25263c7700100 input.foo /^f:2$/;" a language:Foo extras:anonymous ================================================ FILE: Units/optscript.r/op-anongen.d/input.foo ================================================ c:1 f:2 ================================================ FILE: Units/optscript.r/op-end.d/args.ctags ================================================ --fields=+en --langdef=X --map-X=.unknown --kinddef-X=d,def,definitions --regex-X=/[ \t]*def ([a-z])/\1/d/{exclusive}{{ . _scopetop { scope: } if . _scopeset }} --regex-X=/[ \t]*(end)//{{ _scopetop { 1 _matchloc end: _scopepop } if }} ================================================ FILE: Units/optscript.r/op-end.d/expected.tags ================================================ a input.unknown /^def a$/;" d line:1 end:9 b input.unknown /^ def b$/;" d line:2 def:a end:4 c input.unknown /^ def c$/;" d line:5 def:a end:8 d input.unknown /^ def d$/;" d line:6 def:a.c end:7 ================================================ FILE: Units/optscript.r/op-end.d/input.unknown ================================================ def a def b ... end def c def d end end end end ================================================ FILE: Units/optscript.r/op-extras.d/args.ctags ================================================ --sort=no --fields=+{extras} --langdef=X --map-X=.unknown --_tabledef-X=main --kinddef-X=d,def,definitions --_extradef-X=foo,... --extras-X=+{foo} --_extradef-X=bar,... --extras-X=-{bar} --extras=+{subparser} --extras=-{reference} --_prelude-X={{ /maketag0 { /def 1 /start _matchloc _tag _commit } def /maketag { maketag0 pop } def }} --_mtable-regex-X=main/(a)//{{ /X.foo _extraenabled {\1} {(A)} ifelse maketag }} --_mtable-regex-X=main/(b)//{{ /X.bar _extraenabled {\1} {(B)} ifelse maketag }} --_mtable-regex-X=main/(c)//{{ /subparser _extraenabled {\1} {(C)} ifelse maketag }} --_mtable-regex-X=main/(d)//{{ /reference _extraenabled {\1} {(D)} ifelse maketag }} --_mtable-regex-X=main/(e)//{{ (eCommon) maketag0 /reference _markextra (a.b.eCommon2) maketag0 dup /reference _markextra /qualified _markextra (eLangspec) maketag0 /X.foo _markextra (eLangspec+Common) maketag0 dup /X.foo _markextra /reference _markextra }} --_mtable-regex-X=main/(x)//{{ { /nosuchextra _extraenabled } stopped { (OK:no such extra) } { pop (thiShouldNotBeTagged) } ifelse maketag }} --_mtable-regex-X=main/(y)//{{ { /X.nosuchextra _extraenabled } stopped { (OK:no such language extra) } { pop (thiShouldNotBeTagged) } ifelse maketag }} --_mtable-regex-X=main/(z)//{{ % this one is for testing _tquit. _tquit }} ================================================ FILE: Units/optscript.r/op-extras.d/expected.tags ================================================ a input.unknown /^abcdaxyezb$/;" d B input.unknown /^abcdaxyezb$/;" d c input.unknown /^abcdaxyezb$/;" d D input.unknown /^abcdaxyezb$/;" d a input.unknown /^abcdaxyezb$/;" d OK:no such extra input.unknown /^abcdaxyezb$/;" d OK:no such language extra input.unknown /^abcdaxyezb$/;" d eCommon input.unknown /^abcdaxyezb$/;" d extras:reference a.b.eCommon2 input.unknown /^abcdaxyezb$/;" d extras:qualified,reference eLangspec input.unknown /^abcdaxyezb$/;" d extras:foo eLangspec+Common input.unknown /^abcdaxyezb$/;" d extras:reference,foo ================================================ FILE: Units/optscript.r/op-extras.d/input.unknown ================================================ abcdaxyezb ================================================ FILE: Units/optscript.r/op-inherits.d/args.ctags ================================================ --fields=+{inherits} --sort=no --fields=+{extras} --langdef=X --map-X=.unknown --kinddef-X=c,class,classes --regex-X=/^class[ \t]+([A-Z]+)(<([A-Z]+))?/\1/c/{scope=push}{{ \3 _isstring { . \3 inherits: } if }} --regex-X=/[ \t]*set_paring[ \t]+([A-Z]+)//{{ _scopetop { \1 inherits: } if }} --regex-X=/[ \t]*clear_paring//{{ _scopetop { false inherits: } if }} --regex-X=/^end//{scope=pop}{placeholder} ================================================ FILE: Units/optscript.r/op-inherits.d/expected.tags ================================================ A input.unknown /^class A) . :name _buildstring . :kind . _tagloc _tag _commit /FOO.withprefix _markextra }} ================================================ FILE: Units/optscript.r/op-tagloc.d/expected.tags ================================================ x input.foo /^def x$/;" d extras:withprefix y input.foo /^def y$/;" d extras:withprefix x input.foo /^def x$/;" d y input.foo /^def y$/;" d ================================================ FILE: Units/optscript.r/op-tagloc.d/input.foo ================================================ def x def y ================================================ FILE: Units/optscript.r/op-traced.d/args.ctags ================================================ --langdef=X --map-X=.unknown --kinddef-X=d,def,definitions --regex-X=/[ \t]*def ([a-z])/\1/d/{exclusive}{{ _traced { mark . :name (-debug) _buildstring /def _tag _commit pop } if }} --_trace=X ================================================ FILE: Units/optscript.r/op-traced.d/expected.tags ================================================ a input.unknown /^def a$/;" d a-debug input.unknown /^def a$/;" d ================================================ FILE: Units/optscript.r/op-traced.d/features ================================================ debug ================================================ FILE: Units/optscript.r/op-traced.d/input.unknown ================================================ def a ================================================ FILE: Units/optscript.r/op-typeref.d/args.ctags ================================================ --langdef=X --map-X=.unknown --kinddef-X=d,def,definitions --kinddef-X=t,type,type definitions --_prelude-X={{ /typedict 5 dict def }} --regex-X=/^type[ ]+([A-Z]+)$/\1/t/{{ typedict \1 cvn . put }} # [string string] --regex-X=/def[ ]+([a-z]+)[ ]*:[ ]*([a-z]+)/\1/d/{{ . [ (postfix) \2 ] typeref: }} # string --regex-X=/def[ ]+<([a-z]+)>[ ]*([a-z]+)/\2/d/{{ . \1 typeref: }} # index --regex-X=/def[ ]+([A-Z]+)\^([a-z]+)/\2/d/{{ typedict \1 cvn known { . typedict \1 cvn get typeref: } if }} # false --regex-X=/def[ ]+([a-z]+)\^!([a-z]+)/\2/d/{{ . \1 typeref: . false typeref: }} ================================================ FILE: Units/optscript.r/op-typeref.d/expected.tags ================================================ T input.unknown /^type T$/;" t a input.unknown /^def a:int = 1$/;" d typeref:postfix:int b input.unknown /^def b:str = "abc"$/;" d typeref:postfix:str c input.unknown /^def c = true$/;" d typeref:typename:boolean d input.unknown /^def T^d = 1.0$/;" d typeref:type:T e input.unknown /^def float^!e = 1.0$/;" d ================================================ FILE: Units/optscript.r/op-typeref.d/input.unknown ================================================ def a:int = 1 def b:str = "abc" def c = true type T def T^d = 1.0 def float^!e = 1.0 ================================================ FILE: Units/optscript.r/with-foreignLanguage-flag.d/args.ctags ================================================ --sort=no --extras=+r --fields=+rl --langdef=XXX{_foreignLanguage=C} --map-XXX=.xxx --fields=+n --kinddef-XXX=a,abc,abcx --_roledef-XXX.a=assigned,assigned --regex-XXX=/^(a)$/\1/a/ --regex-XXX=/^(b)$//{{ \1 /abc _tag _commit pop }} --regex-XXX=/^(c)$/\1/a/{_role=assigned} --regex-XXX=/^(d)$//{{ \1 /abc /assigned _reftag _commit pop }} --_roledef-C.f=arolefortesting,a role for testing --regex-XXX=/\/\*(A)\(\)\*\//\1/f/{_language=C} --regex-XXX=/\/\*(B)\(\)\*\///{{ \1 /C /function _foreigntag _commit pop }} --regex-XXX=/\/\*(C)\(\)\*\//\1/f/{_language=C}{_role=arolefortesting} --regex-XXX=/\/\*(D)\(\)\*\//\1/f/{_role=arolefortesting}{_language=C} --regex-XXX=/\/\*(E)\(\)\*\///{{ \1 /C /function /arolefortesting _foreignreftag _commit pop 1 _matchloc }} --regex-XXX=/\/\*(F)\(\)\*\///{{ dup \1 /C /function 4 -1 roll _foreigntag _commit pop }} --regex-XXX=/\/\*(G)\(\)\*\///{{ dup \1 /C /function /arolefortesting 5 -1 roll _foreignreftag _commit pop }} --regex-XXX=/\/\*(H)\(\)\*\///{{ \1 /C /function null 5 -1 roll _foreignreftag _commit pop }} --regex-C=/FUNC\(([a-z]*)\);/\1/f/ ================================================ FILE: Units/optscript.r/with-foreignLanguage-flag.d/expected.tags ================================================ a input.xxx /^a$/;" a line:1 language:XXX roles:def b input.xxx /^b$/;" a line:2 language:XXX roles:def c input.xxx /^c$/;" a line:3 language:XXX roles:assigned d input.xxx /^d$/;" a line:4 language:XXX roles:assigned A input.xxx /^\/*A()*\/$/;" f line:5 language:C roles:def B input.xxx /^\/*B()*\/$/;" f line:6 language:C roles:def C input.xxx /^\/*C()*\/$/;" f line:7 language:C roles:arolefortesting D input.xxx /^\/*D()*\/$/;" f line:8 language:C roles:arolefortesting E input.xxx /^\/*E()*\/$/;" f line:9 language:C roles:arolefortesting F input.xxx /^\/*E()*\/$/;" f line:9 language:C roles:def G input.xxx /^\/*E()*\/$/;" f line:9 language:C roles:arolefortesting H input.xxx /^\/*E()*\/$/;" f line:9 language:C roles:def myfunc input-0.c /^FUNC(myfunc);$/;" f line:1 language:C roles:def ================================================ FILE: Units/optscript.r/with-foreignLanguage-flag.d/input-0.c ================================================ FUNC(myfunc); ================================================ FILE: Units/optscript.r/with-foreignLanguage-flag.d/input.xxx ================================================ a b c d /*A()*/ /*B()*/ /*C()*/ /*D()*/ /*E()*/ /*F()*/ /*G()*/ /*H()*/ ================================================ FILE: Units/paramdef.r/no-set.d/args.ctags ================================================ --langdef=Foo --map-Foo=.foo --kinddef-Foo=v,xval,externally defined values --_paramdef-Foo=VAR,desc --regex-Foo=/(x)//{{ /VAR _param { /xval _tag _commit pop } { \1 /xval _tag _commit pop } ifelse }} ================================================ FILE: Units/paramdef.r/no-set.d/expected.tags ================================================ x input.foo /^x$/;" v ================================================ FILE: Units/paramdef.r/no-set.d/input.foo ================================================ x ================================================ FILE: Units/paramdef.r/simple.d/args.ctags ================================================ --langdef=Foo --map-Foo=.foo --kinddef-Foo=v,xval,externally defined values --_paramdef-Foo=VAR,desc --regex-Foo=/(x)//{{ /VAR _param { /xval _tag _commit pop } if }} --param-Foo.VAR=y ================================================ FILE: Units/paramdef.r/simple.d/expected.tags ================================================ y input.foo /^x$/;" v ================================================ FILE: Units/paramdef.r/simple.d/input.foo ================================================ x ================================================ FILE: Units/parser-I18nRubyGem.r/language-force.d/args.ctags ================================================ --sort=no --language-force=I18nRubyGem --fields=+E ================================================ FILE: Units/parser-I18nRubyGem.r/language-force.d/expected.tags ================================================ test input.i18n /^ test: 2$/;" k locale:en extras:subparser other input.i18n /^ other: 10$/;" k locale:en extras:subparser dog input.i18n /^ dog: dog$/;" k keyInMiddle:en.animals extras:subparser cat input.i18n /^ cat: cat$/;" k keyInMiddle:en.animals extras:subparser tracer input.i18n /^ tracer: tracer$/;" k keyInMiddle:en.tools extras:subparser reporter input.i18n /^ reporter: reporter$/;" k keyInMiddle:en.tools extras:subparser test input.i18n /^ test: 2$/;" k locale:en extras:subparser,localeless en.test input.i18n /^ test: 2$/;" k locale:en extras:subparser,localeful other input.i18n /^ other: 10$/;" k locale:en extras:subparser,localeless en.other input.i18n /^ other: 10$/;" k locale:en extras:subparser,localeful animals.dog input.i18n /^ dog: dog$/;" k locale:en extras:subparser,localeless en.animals.dog input.i18n /^ dog: dog$/;" k keyInMiddle:en.animals extras:subparser,localeful animals.cat input.i18n /^ cat: cat$/;" k locale:en extras:subparser,localeless en.animals.cat input.i18n /^ cat: cat$/;" k keyInMiddle:en.animals extras:subparser,localeful tools.tracer input.i18n /^ tracer: tracer$/;" k locale:en extras:subparser,localeless en.tools.tracer input.i18n /^ tracer: tracer$/;" k keyInMiddle:en.tools extras:subparser,localeful tools.reporter input.i18n /^ reporter: reporter$/;" k locale:en extras:subparser,localeless en.tools.reporter input.i18n /^ reporter: reporter$/;" k keyInMiddle:en.tools extras:subparser,localeful ================================================ FILE: Units/parser-I18nRubyGem.r/language-force.d/features ================================================ yaml ================================================ FILE: Units/parser-I18nRubyGem.r/language-force.d/input.i18n ================================================ --- en: test: 2 other: 10 animals: dog: dog cat: cat tools: tracer: tracer reporter: reporter ================================================ FILE: Units/parser-I18nRubyGem.r/locale-kind.d/args.ctags ================================================ --sort=no --language-force=I18nRubyGem --fields=+E --extras-I18nRubyGem= --kinds-I18nRubyGem={locale} ================================================ FILE: Units/parser-I18nRubyGem.r/locale-kind.d/expected.tags ================================================ en input.yml /^en:$/;" l extras:subparser en input-0.yml /^en:$/;" l extras:subparser ================================================ FILE: Units/parser-I18nRubyGem.r/locale-kind.d/features ================================================ yaml ================================================ FILE: Units/parser-I18nRubyGem.r/locale-kind.d/input-0.yml ================================================ --- en: hello: hello ================================================ FILE: Units/parser-I18nRubyGem.r/locale-kind.d/input.yml ================================================ --- en: test: 2 other: 10 animals: dog: dog cat: cat tools: tracer: tracer reporter: reporter ================================================ FILE: Units/parser-I18nRubyGem.r/no-language-force.d/args.ctags ================================================ --sort=no --fields=+E ================================================ FILE: Units/parser-I18nRubyGem.r/no-language-force.d/expected.tags ================================================ test input.yml /^ test: 2$/;" k locale:en extras:subparser other input.yml /^ other: 10$/;" k locale:en extras:subparser dog input.yml /^ dog: dog$/;" k keyInMiddle:en.animals extras:subparser cat input.yml /^ cat: cat$/;" k keyInMiddle:en.animals extras:subparser tracer input.yml /^ tracer: tracer$/;" k keyInMiddle:en.tools extras:subparser reporter input.yml /^ reporter: reporter$/;" k keyInMiddle:en.tools extras:subparser test input.yml /^ test: 2$/;" k locale:en extras:subparser,localeless en.test input.yml /^ test: 2$/;" k locale:en extras:subparser,localeful other input.yml /^ other: 10$/;" k locale:en extras:subparser,localeless en.other input.yml /^ other: 10$/;" k locale:en extras:subparser,localeful animals.dog input.yml /^ dog: dog$/;" k locale:en extras:subparser,localeless en.animals.dog input.yml /^ dog: dog$/;" k keyInMiddle:en.animals extras:subparser,localeful animals.cat input.yml /^ cat: cat$/;" k locale:en extras:subparser,localeless en.animals.cat input.yml /^ cat: cat$/;" k keyInMiddle:en.animals extras:subparser,localeful tools.tracer input.yml /^ tracer: tracer$/;" k locale:en extras:subparser,localeless en.tools.tracer input.yml /^ tracer: tracer$/;" k keyInMiddle:en.tools extras:subparser,localeful tools.reporter input.yml /^ reporter: reporter$/;" k locale:en extras:subparser,localeless en.tools.reporter input.yml /^ reporter: reporter$/;" k keyInMiddle:en.tools extras:subparser,localeful hello input-0.yml /^ hello: hello$/;" k locale:en extras:subparser hello input-0.yml /^ hello: hello$/;" k locale:en extras:subparser,localeless en.hello input-0.yml /^ hello: hello$/;" k locale:en extras:subparser,localeful ================================================ FILE: Units/parser-I18nRubyGem.r/no-language-force.d/features ================================================ yaml ================================================ FILE: Units/parser-I18nRubyGem.r/no-language-force.d/input-0.yml ================================================ --- en: hello: hello ================================================ FILE: Units/parser-I18nRubyGem.r/no-language-force.d/input.yml ================================================ --- en: test: 2 other: 10 animals: dog: dog cat: cat tools: tracer: tracer reporter: reporter ================================================ FILE: Units/parser-I18nRubyGem.r/no-locale.d/args.ctags ================================================ --sort=no --fields=+E ================================================ FILE: Units/parser-I18nRubyGem.r/no-locale.d/expected.tags ================================================ hello input-0.yml /^ hello: hello$/;" k locale:en extras:subparser hello input-0.yml /^ hello: hello$/;" k locale:en extras:subparser,localeless en.hello input-0.yml /^ hello: hello$/;" k locale:en extras:subparser,localeful ================================================ FILE: Units/parser-I18nRubyGem.r/no-locale.d/features ================================================ yaml ================================================ FILE: Units/parser-I18nRubyGem.r/no-locale.d/input-0.yml ================================================ --- en: hello: hello ================================================ FILE: Units/parser-I18nRubyGem.r/no-locale.d/input.yml ================================================ --- nosuchlocale: test: 2 other: 10 animals: dog: dog cat: cat tools: tracer: tracer reporter: reporter ================================================ FILE: Units/parser-I18nRubyGem.r/qualified.d/args.ctags ================================================ --sort=no --language-force=I18nRubyGem --fields=+E --extras=+q --extras-I18nRubyGem=-{localeful} ================================================ FILE: Units/parser-I18nRubyGem.r/qualified.d/expected.tags ================================================ test input.yml /^ test: 2$/;" k locale:en extras:subparser en.test input.yml /^ test: 2$/;" k locale:en extras:qualified,subparser other input.yml /^ other: 10$/;" k locale:en extras:subparser en.other input.yml /^ other: 10$/;" k locale:en extras:qualified,subparser dog input.yml /^ dog: dog$/;" k keyInMiddle:en.animals extras:subparser en.animals.dog input.yml /^ dog: dog$/;" k keyInMiddle:en.animals extras:qualified,subparser cat input.yml /^ cat: cat$/;" k keyInMiddle:en.animals extras:subparser en.animals.cat input.yml /^ cat: cat$/;" k keyInMiddle:en.animals extras:qualified,subparser tracer input.yml /^ tracer: tracer$/;" k keyInMiddle:en.tools extras:subparser en.tools.tracer input.yml /^ tracer: tracer$/;" k keyInMiddle:en.tools extras:qualified,subparser reporter input.yml /^ reporter: reporter$/;" k keyInMiddle:en.tools extras:subparser en.tools.reporter input.yml /^ reporter: reporter$/;" k keyInMiddle:en.tools extras:qualified,subparser test input.yml /^ test: 2$/;" k locale:en extras:subparser,localeless other input.yml /^ other: 10$/;" k locale:en extras:subparser,localeless animals.dog input.yml /^ dog: dog$/;" k locale:en extras:subparser,localeless animals.cat input.yml /^ cat: cat$/;" k locale:en extras:subparser,localeless tools.tracer input.yml /^ tracer: tracer$/;" k locale:en extras:subparser,localeless tools.reporter input.yml /^ reporter: reporter$/;" k locale:en extras:subparser,localeless hello input-0.yml /^ hello: hello$/;" k locale:en extras:subparser en.hello input-0.yml /^ hello: hello$/;" k locale:en extras:qualified,subparser hello input-0.yml /^ hello: hello$/;" k locale:en extras:subparser,localeless ================================================ FILE: Units/parser-I18nRubyGem.r/qualified.d/features ================================================ yaml ================================================ FILE: Units/parser-I18nRubyGem.r/qualified.d/input-0.yml ================================================ --- en: hello: hello ================================================ FILE: Units/parser-I18nRubyGem.r/qualified.d/input.yml ================================================ --- en: test: 2 other: 10 animals: dog: dog cat: cat tools: tracer: tracer reporter: reporter ================================================ FILE: Units/parser-I18nRubyGem.r/simple-I18nRubyGem.d/args.ctags ================================================ --sort=no --language-force=I18nRubyGem --fields=+E ================================================ FILE: Units/parser-I18nRubyGem.r/simple-I18nRubyGem.d/expected.tags ================================================ test input.yml /^ test: 2$/;" k locale:en extras:subparser other input.yml /^ other: 10$/;" k locale:en extras:subparser dog input.yml /^ dog: dog$/;" k keyInMiddle:en.animals extras:subparser cat input.yml /^ cat: cat$/;" k keyInMiddle:en.animals extras:subparser tracer input.yml /^ tracer: tracer$/;" k keyInMiddle:en.tools extras:subparser reporter input.yml /^ reporter: reporter$/;" k keyInMiddle:en.tools extras:subparser test input.yml /^ test: 2$/;" k locale:en extras:subparser,localeless en.test input.yml /^ test: 2$/;" k locale:en extras:subparser,localeful other input.yml /^ other: 10$/;" k locale:en extras:subparser,localeless en.other input.yml /^ other: 10$/;" k locale:en extras:subparser,localeful animals.dog input.yml /^ dog: dog$/;" k locale:en extras:subparser,localeless en.animals.dog input.yml /^ dog: dog$/;" k keyInMiddle:en.animals extras:subparser,localeful animals.cat input.yml /^ cat: cat$/;" k locale:en extras:subparser,localeless en.animals.cat input.yml /^ cat: cat$/;" k keyInMiddle:en.animals extras:subparser,localeful tools.tracer input.yml /^ tracer: tracer$/;" k locale:en extras:subparser,localeless en.tools.tracer input.yml /^ tracer: tracer$/;" k keyInMiddle:en.tools extras:subparser,localeful tools.reporter input.yml /^ reporter: reporter$/;" k locale:en extras:subparser,localeless en.tools.reporter input.yml /^ reporter: reporter$/;" k keyInMiddle:en.tools extras:subparser,localeful hello input-0.yml /^ hello: hello$/;" k locale:en extras:subparser hello input-0.yml /^ hello: hello$/;" k locale:en extras:subparser,localeless en.hello input-0.yml /^ hello: hello$/;" k locale:en extras:subparser,localeful ================================================ FILE: Units/parser-I18nRubyGem.r/simple-I18nRubyGem.d/features ================================================ yaml ================================================ FILE: Units/parser-I18nRubyGem.r/simple-I18nRubyGem.d/input-0.yml ================================================ --- en: hello: hello ================================================ FILE: Units/parser-I18nRubyGem.r/simple-I18nRubyGem.d/input.yml ================================================ --- en: test: 2 other: 10 animals: dog: dog cat: cat tools: tracer: tracer reporter: reporter ================================================ FILE: Units/parser-I18nRubyGem.r/symbols.d/args.ctags ================================================ --sort=no --language-force=I18nRubyGem --fields=+E ================================================ FILE: Units/parser-I18nRubyGem.r/symbols.d/expected.tags ================================================ test input.yml /^ :test: 2$/;" k locale:en extras:subparser other input.yml /^ :other: 10$/;" k locale:en extras:subparser dog input.yml /^ :dog: dog$/;" k keyInMiddle:en.animals extras:subparser cat input.yml /^ :cat: cat$/;" k keyInMiddle:en.animals extras:subparser tracer input.yml /^ :tracer: tracer$/;" k keyInMiddle:en.tools extras:subparser reporter input.yml /^ :reporter: reporter$/;" k keyInMiddle:en.tools extras:subparser test input.yml /^ :test: 2$/;" k locale:en extras:subparser,localeless en.test input.yml /^ :test: 2$/;" k locale:en extras:subparser,localeful other input.yml /^ :other: 10$/;" k locale:en extras:subparser,localeless en.other input.yml /^ :other: 10$/;" k locale:en extras:subparser,localeful animals.dog input.yml /^ :dog: dog$/;" k locale:en extras:subparser,localeless en.animals.dog input.yml /^ :dog: dog$/;" k keyInMiddle:en.animals extras:subparser,localeful animals.cat input.yml /^ :cat: cat$/;" k locale:en extras:subparser,localeless en.animals.cat input.yml /^ :cat: cat$/;" k keyInMiddle:en.animals extras:subparser,localeful tools.tracer input.yml /^ :tracer: tracer$/;" k locale:en extras:subparser,localeless en.tools.tracer input.yml /^ :tracer: tracer$/;" k keyInMiddle:en.tools extras:subparser,localeful tools.reporter input.yml /^ :reporter: reporter$/;" k locale:en extras:subparser,localeless en.tools.reporter input.yml /^ :reporter: reporter$/;" k keyInMiddle:en.tools extras:subparser,localeful hello input-0.yml /^ :hello: hello$/;" k locale:en extras:subparser hello input-0.yml /^ :hello: hello$/;" k locale:en extras:subparser,localeless en.hello input-0.yml /^ :hello: hello$/;" k locale:en extras:subparser,localeful ================================================ FILE: Units/parser-I18nRubyGem.r/symbols.d/features ================================================ yaml ================================================ FILE: Units/parser-I18nRubyGem.r/symbols.d/input-0.yml ================================================ --- :en: :hello: hello ================================================ FILE: Units/parser-I18nRubyGem.r/symbols.d/input.yml ================================================ --- :en: :test: 2 :other: 10 :animals: :dog: dog :cat: cat :tools: :tracer: tracer :reporter: reporter ================================================ FILE: Units/parser-ada.r/ada-adb.d/expected.tags ================================================ Altivec input.adb /^procedure Altivec is$/;" r Vector_A input.adb /^ Vector_A : constant vector_unsigned_int := To_Vector (View_A);$/;" n subprogram:Altivec file: Vector_B input.adb /^ Vector_B : constant vector_unsigned_int := To_Vector (View_B);$/;" n subprogram:Altivec file: Vector_C input.adb /^ Vector_C : vector_unsigned_int;$/;" v subprogram:Altivec file: View_A input.adb /^ View_A : constant VUI_View := (Values => (1, 2, 3, 4));$/;" n subprogram:Altivec file: View_B input.adb /^ View_B : constant VUI_View := (Values => (1, 1, 1, 1));$/;" n subprogram:Altivec file: View_C input.adb /^ View_C : VUI_View;$/;" v subprogram:Altivec file: ================================================ FILE: Units/parser-ada.r/ada-adb.d/input.adb ================================================ -- Taken from altivec of GNAT examples (http://www.adacore.com/developers/code-samples/gnat-examples/) -- ==================================================================================================== -- This example shows how to create and manipulate vectors by the mean of high -- level views. with GNAT.Altivec; use GNAT.Altivec; with GNAT.Altivec.Conversions; use GNAT.Altivec.Conversions; with GNAT.Altivec.Vector_Operations; use GNAT.Altivec.Vector_Operations; with GNAT.Altivec.Vector_Types; use GNAT.Altivec.Vector_Types; with GNAT.Altivec.Vector_Views; use GNAT.Altivec.Vector_Views; with GNAT.IO; use GNAT.IO; procedure Altivec is View_A : constant VUI_View := (Values => (1, 2, 3, 4)); Vector_A : constant vector_unsigned_int := To_Vector (View_A); View_B : constant VUI_View := (Values => (1, 1, 1, 1)); Vector_B : constant vector_unsigned_int := To_Vector (View_B); Vector_C : vector_unsigned_int; View_C : VUI_View; begin Vector_C := vec_add (Vector_A, Vector_B); -- C = A + B View_C := To_View (Vector_C); for I in View_C.Values'Range loop Put_Line (unsigned_int'Image (View_C.Values (I))); end loop; end Altivec; ================================================ FILE: Units/parser-ada.r/ada-ads.d/expected.tags ================================================ Adjust input.ads /^ procedure Adjust(S: in out Stack);$/;" R packspec:GenStack Data input.ads /^ Data: Data_Ptr;$/;" c type:Node file: Data_Ptr input.ads /^ type Data_Ptr is access StackData'Class;$/;" t packspec:GenStack file: Empty input.ads /^ function Empty(S: Stack) return Boolean;$/;" R packspec:GenStack Finalize input.ads /^ procedure Finalize(S: in out Stack);$/;" R packspec:GenStack GenStack input.ads /^package GenStack is$/;" P Head input.ads /^ Head: Node_Ptr;$/;" c type:Stack file: Initialize input.ads /^ procedure Initialize(S: in out Stack);$/;" R packspec:GenStack Next input.ads /^ Next: Node_Ptr;$/;" c type:Node file: Node input.ads /^ type Node is record$/;" t packspec:GenStack file: Node_Ptr input.ads /^ type Node_Ptr is access Node;$/;" t packspec:GenStack file: Pop input.ads /^ procedure Pop(S: in out Stack; D: in out StackData'class);$/;" R packspec:GenStack Push input.ads /^ procedure Push(S: in out Stack; D: StackData'class);$/;" R packspec:GenStack Stack input.ads /^ type Stack is new Controlled with private;$/;" t packspec:GenStack Stack input.ads /^ type Stack is new Controlled with record$/;" t packspec:GenStack file: StackData input.ads /^ type StackData is new Controlled with null record;$/;" t packspec:GenStack Top input.ads /^ procedure Top(S: Stack; Data: in out StackData'class);$/;" R packspec:GenStack ================================================ FILE: Units/parser-ada.r/ada-ads.d/input.ads ================================================ -- Object-oriented generalized stack. This illustrates the use of a -- controlled type, which is one that has construction and destructions. -- It also shows how to create two related types in the same package so -- that they can share private declarations. This sort of thing is -- accomplished in Java or C++ using nested classes, or using friend -- declarations in C++. -- with Ada.Finalization; use Ada.Finalization; package GenStack is -- This is the stack type. type Stack is new Controlled with private; -- This is the base type for nodes. Client packages must derive their -- nodes from StackData. Since it comes from Controlled, the user can -- override the Initialize, Adjust, and Finalize methods as needed. type StackData is new Controlled with null record; -- Initialization operations. procedure Initialize(S: in out Stack); procedure Adjust(S: in out Stack); procedure Finalize(S: in out Stack); -- Stack operations. procedure Push(S: in out Stack; D: StackData'class); procedure Pop(S: in out Stack; D: in out StackData'class); procedure Top(S: Stack; Data: in out StackData'class); function Empty(S: Stack) return Boolean; private -- Pointer to the node type. type Node; type Node_Ptr is access Node; -- Here is the generalized stack itself. We would just make it the -- pointer itself, but it needs to be a record so it can be in a with. type Stack is new Controlled with record Head: Node_Ptr; end record; -- Now, we need a pointer to the data part. type Data_Ptr is access StackData'Class; -- This is the node type. type Node is record Data: Data_Ptr; Next: Node_Ptr; end record; end GenStack; ================================================ FILE: Units/parser-ada.r/ada-block-tracking.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-ada.r/ada-block-tracking.d/expected.tags ================================================ Input input.adb /^package body Input is$/;" p F input.adb /^ function F (S : Integer) return Integer is$/;" r package:Input file: R input.adb /^ R : Integer;$/;" v subprogram:F file: T input.adb /^ T : Integer := 2;$/;" v anon:declare file: P input.adb /^ P : Integer := 4;$/;" v anon:declare file: G input.adb /^ function G (A : Integer) return Integer is$/;" r package:Input file: B input.adb /^ B : Integer;$/;" v subprogram:G file: C input.adb /^ C : Integer := 2;$/;" v anon:declare file: D input.adb /^ D : Integer := 4;$/;" v anon:declare file: ================================================ FILE: Units/parser-ada.r/ada-block-tracking.d/input.adb ================================================ package body Input is function F (S : Integer) return Integer is R : Integer; begin if S < 1 then declare T : Integer := 2; begin if S > T then T := 3; end if; R := S; end; else declare P : Integer := 4; begin return P; end; end if; return R; end F; function G (A : Integer) return Integer is B : Integer; begin if A < 1 then declare C : Integer := 2; begin case A is when 1 => null; when others => null; end case; B := A; end; else declare D : Integer := 4; begin return D; end; end if; return B; end G; end Input; ================================================ FILE: Units/parser-ada.r/ada-block-tracking.d/validator ================================================ gnat ================================================ FILE: Units/parser-ada.r/ada-char-literal.d/expected.tags-e ================================================ input.adb,158 package body System.Val_Util isSystem.Val_Util/b4,69 procedure Bad_Value (S : String) isBad_Value/p6,102 procedure Not_Tagged isNot_Tagged/p11,236 ================================================ FILE: Units/parser-ada.r/ada-char-literal.d/input.adb ================================================ --- file: s-valuti.adb with System.Case_Util; use System.Case_Util; package body System.Val_Util is procedure Bad_Value (S : String) is begin raise Constraint_Error with "bad input for 'Value: """ & S & '"'; end Bad_Value; procedure Not_Tagged is begin null; end Not_Tagged; end System.Val_Util; ================================================ FILE: Units/parser-ada.r/ada-end-without-designator.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-ada.r/ada-end-without-designator.d/expected.tags ================================================ Truc input.adb /^procedure Truc is$/;" r Some_Function input.adb /^ function Some_Function return Boolean is$/;" r subprogram:Truc file: Inner_Function_Without_End_Label input.adb /^ function Inner_Function_Without_End_Label return Boolean is$/;" r subprogram:Some_Function file: Result input.adb /^ Result : constant Boolean := Inner_Function_Without_End_Label;$/;" n subprogram:Some_Function file: Smurf input.adb /^ function Smurf return Integer is$/;" r subprogram:Truc file: ================================================ FILE: Units/parser-ada.r/ada-end-without-designator.d/input.adb ================================================ -- Taken from #4205 submitted by @koenmeersman procedure Truc is function Some_Function return Boolean is function Inner_Function_Without_End_Label return Boolean is begin return True; end; Result : constant Boolean := Inner_Function_Without_End_Label; begin return Result; end Some_Function; function Smurf return Integer is begin if Some_Function then return 1; else return 2; end if; end Smurf; begin if Smurf > 2 then raise Program_Error; end if; end Truc; ================================================ FILE: Units/parser-ada.r/ada-end-without-designator.d/validator ================================================ gnat ================================================ FILE: Units/parser-ada.r/ada-entry.d/args.ctags ================================================ --sort=no --kinds-Ada=+E --langdef=GnatProject --map-GnatProject=.gpr --kinddef-GnatProject=P,project,projects --regex-GnatProject=/^project[ \t]+([a-zA-Z0-9_]+)/\1/P/ ================================================ FILE: Units/parser-ada.r/ada-entry.d/expected.tags ================================================ Input input.adb /^procedure Input is$/;" r Input_0 input_0.gpr /^project Input_0 is$/;" P Input_1 input_1.adb /^package body Input_1 is$/;" p Ma_Tasche input_1.adb /^ task body Ma_Tasche is$/;" k package:Input_1 file: Var_Continuer input_1.adb /^ Var_Continuer : Boolean := False;$/;" v task:Ma_Tasche file: Boucle_Principale input_1.adb /^ Boucle_Principale :$/;" i task:Ma_Tasche file: Accepter input_1.adb /^ accept Accepter$/;" e identifier:Boucle_Principale file: Mon_Autre_Tasche input_1.adb /^ task body Mon_Autre_Tasche is$/;" k package:Input_1 file: Une_Autre_Tasche_1 input_1.adb /^ Une_Autre_Tasche_1 : Tasche_Type_1_T;$/;" v package:Input_1 file: Tasche_Type_1_T input_1.adb /^ task body Tasche_Type_1_T is$/;" k package:Input_1 file: Tasche_Type_2_T input_1.adb /^ task body Tasche_Type_2_T is$/;" k package:Input_1 file: Tasche_Type_3_T input_1.adb /^ task body Tasche_Type_3_T is$/;" k package:Input_1 file: Une_Autre_Tasche_2 input_1.adb /^ Une_Autre_Tasche_2 : Tasche_Type_2_T;$/;" v package:Input_1 file: Une_Autre_Tasche_3 input_1.adb /^ Une_Autre_Tasche_3 : Tasche_Type_3_T (Taille => 5);$/;" v package:Input_1 file: Objet_Protege input_1.adb /^ protected body Objet_Protege is$/;" o package:Input_1 file: Demarrer input_1.adb /^ entry Demarrer$/;" e protected:Objet_Protege file: Faire input_1.adb /^ procedure Faire is$/;" r protected:Objet_Protege file: Tester input_1.adb /^ function Tester$/;" r protected:Objet_Protege file: Type_Protege input_1.adb /^ protected body Type_Protege is$/;" o package:Input_1 file: Demarrer input_1.adb /^ entry Demarrer$/;" e protected:Type_Protege file: Faire input_1.adb /^ procedure Faire is$/;" r protected:Type_Protege file: Tester input_1.adb /^ function Tester$/;" r protected:Type_Protege file: Discriminant_Protege input_1.adb /^ protected body Discriminant_Protege is$/;" o package:Input_1 file: Demarrer input_1.adb /^ entry Demarrer$/;" e protected:Discriminant_Protege file: Faire input_1.adb /^ procedure Faire is$/;" r protected:Discriminant_Protege file: Tester input_1.adb /^ function Tester$/;" r protected:Discriminant_Protege file: Input_1 input_1.ads /^package Input_1 is$/;" P Ma_Tasche input_1.ads /^ task Ma_Tasche is$/;" K packspec:Input_1 Accepter input_1.ads /^ entry Accepter$/;" E taskspec:Ma_Tasche Mon_Autre_Tasche input_1.ads /^ task Mon_Autre_Tasche;$/;" K packspec:Input_1 Tasche_Type_1_T input_1.ads /^ task type Tasche_Type_1_T;$/;" K packspec:Input_1 Une_Tasche input_1.ads /^ Une_Tasche : Tasche_Type_1_T;$/;" v packspec:Input_1 Tasche_Type_2_T input_1.ads /^ task type Tasche_Type_2_T is$/;" K packspec:Input_1 Start input_1.ads /^ entry Start;$/;" E taskspec:Tasche_Type_2_T Lire input_1.ads /^ entry Lire$/;" E taskspec:Tasche_Type_2_T Tasche_Type_3_T input_1.ads /^ task type Tasche_Type_3_T$/;" K packspec:Input_1 Start input_1.ads /^ entry Start;$/;" E taskspec:Tasche_Type_3_T Objet_Protege input_1.ads /^ protected Objet_Protege is$/;" O packspec:Input_1 Demarrer input_1.ads /^ entry Demarrer;$/;" E protectspec:Objet_Protege Faire input_1.ads /^ procedure Faire;$/;" R protectspec:Objet_Protege Tester input_1.ads /^ function Tester return Boolean;$/;" R protectspec:Objet_Protege Variable input_1.ads /^ Variable : Boolean := True;$/;" v protectspec:Objet_Protege file: Type_Protege input_1.ads /^ protected type Type_Protege is$/;" O packspec:Input_1 Demarrer input_1.ads /^ entry Demarrer;$/;" E protectspec:Type_Protege Faire input_1.ads /^ procedure Faire;$/;" R protectspec:Type_Protege Tester input_1.ads /^ function Tester return Boolean;$/;" R protectspec:Type_Protege Variable input_1.ads /^ Variable : Boolean := True;$/;" v protectspec:Type_Protege file: Discriminant_Protege input_1.ads /^ protected type Discriminant_Protege$/;" O packspec:Input_1 Demarrer input_1.ads /^ entry Demarrer;$/;" E protectspec:Discriminant_Protege Faire input_1.ads /^ procedure Faire;$/;" R protectspec:Discriminant_Protege Tester input_1.ads /^ function Tester return Boolean;$/;" R protectspec:Discriminant_Protege Variable input_1.ads /^ Variable : Boolean := True;$/;" v protectspec:Discriminant_Protege file: ================================================ FILE: Units/parser-ada.r/ada-entry.d/input.adb ================================================ with Ada.Text_IO; -- with Mes_Tasches_P; with Input_1; -- procedure Client is procedure Input is begin Ada.Text_IO.Put_Line ("Tasks won't stop, kill it with CTRL-C"); -- Mes_Tasches_P.Ma_Tasche.Accepter (Continuer => True); Input_1.Ma_Tasche.Accepter (Continuer => True); end Input; -- end Client; ================================================ FILE: Units/parser-ada.r/ada-entry.d/input_0.gpr ================================================ -- project Client is project Input_0 is for Main use ("input.adb"); for Source_Dirs use ("./**"); for Object_Dir use "obj/"; for Exec_Dir use "bin/"; for Create_Missing_Dirs use "True"; package Compiler is for Default_Switches ("Ada") use ("-O0", "-Wall"); end Compiler; end Input_0; -- end Client; ================================================ FILE: Units/parser-ada.r/ada-entry.d/input_1.adb ================================================ -- package body Mes_Tasches_P is package body Input_1 is --------------------------------------------------------------------------- task body Ma_Tasche is Var_Continuer : Boolean := False; begin Boucle_Principale : loop accept Accepter (Continuer : Boolean) do Var_Continuer := Continuer; end Accepter; end loop Boucle_Principale; end Ma_Tasche; --------------------------------------------------------------------------- --------------------------------------------------------------------------- task body Mon_Autre_Tasche is begin null; end Mon_Autre_Tasche; --------------------------------------------------------------------------- Une_Autre_Tasche_1 : Tasche_Type_1_T; --------------------------------------------------------------------------- task body Tasche_Type_1_T is begin null; end Tasche_Type_1_T; --------------------------------------------------------------------------- --------------------------------------------------------------------------- task body Tasche_Type_2_T is begin null; end Tasche_Type_2_T; --------------------------------------------------------------------------- --------------------------------------------------------------------------- task body Tasche_Type_3_T is begin null; end Tasche_Type_3_T; --------------------------------------------------------------------------- Une_Autre_Tasche_2 : Tasche_Type_2_T; Une_Autre_Tasche_3 : Tasche_Type_3_T (Taille => 5); --------------------------------------------------------------------------- protected body Objet_Protege is entry Demarrer when Variable is begin null; end Demarrer; procedure Faire is begin null; end Faire; function Tester return Boolean is begin return Variable; end Tester; end Objet_Protege; --------------------------------------------------------------------------- --------------------------------------------------------------------------- protected body Type_Protege is entry Demarrer when Variable is begin null; end Demarrer; procedure Faire is begin null; end Faire; function Tester return Boolean is begin return Variable; end Tester; end Type_Protege; --------------------------------------------------------------------------- --------------------------------------------------------------------------- protected body Discriminant_Protege is entry Demarrer when Variable is begin null; end Demarrer; procedure Faire is begin null; end Faire; function Tester return Boolean is begin return Variable; end Tester; end Discriminant_Protege; --------------------------------------------------------------------------- end Input_1; -- end Mes_Tasches_P; ================================================ FILE: Units/parser-ada.r/ada-entry.d/input_1.ads ================================================ -- package Mes_Tasches_P is package Input_1 is task Ma_Tasche is entry Accepter (Continuer : Boolean); end Ma_Tasche; task Mon_Autre_Tasche; task type Tasche_Type_1_T; Une_Tasche : Tasche_Type_1_T; task type Tasche_Type_2_T is entry Start; entry Lire (Donnee : out Integer); end Tasche_Type_2_T; -- Task type with discriminant. task type Tasche_Type_3_T -- We could have any number of arguments in discriminant -- Work exactly like argument in procedure/function/entry/accept (Taille : Integer) is entry Start; end Tasche_Type_3_T; -- protected objects. protected Objet_Protege is entry Demarrer; procedure Faire; function Tester return Boolean; private Variable : Boolean := True; end Objet_Protege; protected type Type_Protege is entry Demarrer; procedure Faire; function Tester return Boolean; private Variable : Boolean := True; end Type_Protege; protected type Discriminant_Protege (Priorite : Natural) is entry Demarrer; procedure Faire; function Tester return Boolean; private Variable : Boolean := True; end Discriminant_Protege; end Input_1; -- end Mes_Tasches_P; ================================================ FILE: Units/parser-ada.r/ada-etags-suffix.d/args.ctags ================================================ --sort=no --kinds-Ada=-l ================================================ FILE: Units/parser-ada.r/ada-etags-suffix.d/expected.tags-e ================================================ input.ads,0 input_0.adb,234 package body Input_0 isInput_0/b1,0 function My_Function return Boolean isMy_Function/f2,24 procedure My_Procedure isMy_Procedure/p7,115 task body My_Task isMy_Task/b12,187 accept GET (X: in My_T) doGET14,220 input_0.ads,217 package Input_0 isInput_0/s1,0 function My_Function return Boolean;My_Function/f5,192 procedure My_Procedure;My_Procedure/p9,411 type My_T is (A, B, C);My_T/t16,792 task My_Task isMy_Task/k20,973 ================================================ FILE: Units/parser-ada.r/ada-etags-suffix.d/input.ads ================================================ -- DUMMY ================================================ FILE: Units/parser-ada.r/ada-etags-suffix.d/input_0.adb ================================================ package body Input_0 is function My_Function return Boolean is begin return True; end My_Function; procedure My_Procedure is begin null; end My_Procedure; task body My_Task is begin accept GET (X: in My_T) do null; end GET; end My_Task; end Input_0; ================================================ FILE: Units/parser-ada.r/ada-etags-suffix.d/input_0.ads ================================================ package Input_0 is -- Expecting above to create tag 'Input_0/s' as this is 'package spec'-definition with name 'Input_0'. -- Emacs tag-search on Input_0/s should navigate to the above. function My_Function return Boolean; -- Expecting above to create tag 'My_Function/f' as this is 'function'-definition with name My_Function. -- Emacs tag-search on My_Function/f should navigate to the above. procedure My_Procedure; -- Expecting above to create tag 'My_Procedure/p' as this is 'procedure'-definition with name My_Procedure. -- Emacs tag-search on My_Procedure/p should navigate to the above. -- Expecting above to create tag 'Input_0/s' as this is 'package spec'-definition with name 'Input_0'. -- Emacs tag-search on Input_0/s should navigate to the above. type My_T is (A, B, C); -- Expecting above to create tag 'My_T/t' as this is 'type'-definition with name 'My_T'. -- Emacs tag-search on My_T/t should navigate to the above. task My_Task is -- Expecting above to create tag 'My_Task/k' as this is 'task'-definition with name 'My_Task'. -- Emacs tag-search on My_Task/k should navigate to the above. entry GET (X : in My_T); end My_Task; end Input_0; ================================================ FILE: Units/parser-ada.r/ada-expression-function-with-generic.d/expected.tags-e ================================================ input.adb,486 procedure My_Package isMy_Package/p1,0 package Generic_Integer_Images isGeneric_Integer_Images/s5,71 function Digit_To_Character (X : Unsigned_Type) return Character;Digit_To_Character/f6,107 type Unsigned_Type is range <>;Unsigned_Type4,35 package body Generic_Integer_Images isGeneric_Integer_Images/b9,208 function Digit_To_Character (X : Unsigned_Type) return Character isDigit_To_Character/f10,249 type Signed_Address is rangeSigned_Address/t14,379 ================================================ FILE: Units/parser-ada.r/ada-expression-function-with-generic.d/input.adb ================================================ procedure My_Package is generic type Unsigned_Type is range <>; package Generic_Integer_Images is function Digit_To_Character (X : Unsigned_Type) return Character; end Generic_Integer_Images; package body Generic_Integer_Images is function Digit_To_Character (X : Unsigned_Type) return Character is (Character'Val (0)); end Generic_Integer_Images; type Signed_Address is range -2**(Standard'Address_Size - 1) .. 2**(Standard'Address_Size - 1) - 1; begin null; end My_Package; ================================================ FILE: Units/parser-ada.r/ada-expression-function.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-ada.r/ada-expression-function.d/expected.tags ================================================ Test input.adb /^procedure Test is$/;" r My_Type input.adb /^ My_Type : Boolean := True;$/;" v subprogram:Test file: Tagged_Procedure input.adb /^ procedure Tagged_Procedure is$/;" r subprogram:Test file: Boolean_As_String input.adb /^ function Boolean_As_String return String is$/;" r subprogram:Tagged_Procedure file: Another_Boolean_As_String input.adb /^ function Another_Boolean_As_String return String is$/;" r subprogram:Tagged_Procedure file: p0 input.adb /^ procedure p0 is $/;" r subprogram:Tagged_Procedure file: Yet_Boolean_As_String input.adb /^ function Yet_Boolean_As_String return String is$/;" r subprogram:Tagged_Procedure file: p1 input.adb /^ procedure p1 is $/;" r subprogram:Tagged_Procedure file: Not_Tagged_Procedure input.adb /^ procedure Not_Tagged_Procedure is$/;" r subprogram:Test file: ================================================ FILE: Units/parser-ada.r/ada-expression-function.d/input.adb ================================================ with Ada.Text_IO; procedure Test is My_Type : Boolean := True; procedure Tagged_Procedure is function Boolean_As_String return String is (case My_Type is when True => "True Value", when False => "False Value"); function Another_Boolean_As_String return String is (case My_Type is when True => "; function dummy0 return String is (", when False => "; function dummy1 return String is ("); procedure p0 is begin Ada.Text_IO.put ("-0"); end p0; function Yet_Boolean_As_String return String is (case My_Type is when True => "1", when False => "0"); procedure p1 is begin Ada.Text_IO.put ("-1"); end p1; begin null; end Tagged_Procedure; procedure Not_Tagged_Procedure is begin null; end Not_Tagged_Procedure; begin null; end Test; ================================================ FILE: Units/parser-ada.r/ada-function.d/args.ctags ================================================ --language-force=Ada ================================================ FILE: Units/parser-ada.r/ada-function.d/input.broken ================================================ function a(){}}function b( ================================================ FILE: Units/parser-ada.r/ada-generic-in-package.d/args.ctags ================================================ --sort=no --kinds-Ada=+{formal} ================================================ FILE: Units/parser-ada.r/ada-generic-in-package.d/expected.tags-e ================================================ input.ads,278 package My_Package isMy_Package/s2,48 package Conversions isConversions/s6,108 function From_Big_Real (Arg : Integer) return Num;From_Big_Real/f7,133 type Num is digits <>;Num5,81 type Missing_Tag is recordMissing_Tag/t10,208 Num : Integer;Num11,237 input_1.adb,1666 procedure Input_1 isInput_1/p1,0 procedure Generic_Reverse_Array (X : in out Array_T);Generic_Reverse_Array/p9,200 type T is private;T4,32 type Index is range <>;Index5,55 type Array_T is array (Index range <>) of T;Array_T6,83 with function Img (A, B: T) return boolean;Img8,152 procedure Generic_Reverse_Array (X : in out Array_T) isGeneric_Reverse_Array/p11,257 Tmp : T;Tmp15,389 X_Left : T renames X (I);X_Left16,403 X_Right : T renames X (X'Last + X'First - I);X_Right17,431 type Color is (None, Black, Red, Green, Blue, White);Color/t26,603 type Color is (None, Black, Red, Green, Blue, White);None26,603 type Color is (None, Black, Red, Green, Blue, White);Black26,603 type Color is (None, Black, Red, Green, Blue, White);Red26,603 type Color is (None, Black, Red, Green, Blue, White);Green26,603 type Color is (None, Black, Red, Green, Blue, White);Blue26,603 type Color is (None, Black, Red, Green, Blue, White);White26,603 type Color_Array is array (Integer range <>) of Color;Color_Array/t27,659 procedure Reverse_Color_Array is new Generic_Reverse_ArrayReverse_Color_Array/p28,716 type Shape is (None, Circle, Triangle, Square);Shape/t31,859 type Shape is (None, Circle, Triangle, Square);None31,859 type Shape is (None, Circle, Triangle, Square);Circle31,859 type Shape is (None, Circle, Triangle, Square);Triangle31,859 type Shape is (None, Circle, Triangle, Square);Square31,859 type Shape_Array is array (Integer range <>) of Shape;Shape_Array/t32,909 procedure Reverse_Shape_Array is new Generic_Reverse_ArrayReverse_Shape_Array/p33,966 input_2.ads,301 package input_2 isinput_2/s1,0 type Generator is null record;Generator/t3,20 type Unsigned is mod <>;Unsigned5,63 type Real is digits <>;Real6,92 with function Random (G: Generator) return Unsigned is <>;Random7,120 function Random (G: Generator) return Real;Random/f8,183 ================================================ FILE: Units/parser-ada.r/ada-generic-in-package.d/input.ads ================================================ -- Taken from #2925 submitted by @koenmeersman package My_Package is generic type Num is digits <>; package Conversions is function From_Big_Real (Arg : Integer) return Num; end Conversions; type Missing_Tag is record Num : Integer; end record; end My_Package; ================================================ FILE: Units/parser-ada.r/ada-generic-in-package.d/input_1.adb ================================================ procedure Input_1 is generic type T is private; type Index is range <>; type Array_T is array (Index range <>) of T; Null_Value : T; with function Img (A, B: T) return boolean; procedure Generic_Reverse_Array (X : in out Array_T); procedure Generic_Reverse_Array (X : in out Array_T) is begin for I in X'First .. (X'Last + X'First) / 2 loop declare Tmp : T; X_Left : T renames X (I); X_Right : T renames X (X'Last + X'First - I); begin Tmp := X_Left; X_Left := X_Right; X_Right := Tmp; end; end loop; end Generic_Reverse_Array; type Color is (None, Black, Red, Green, Blue, White); type Color_Array is array (Integer range <>) of Color; procedure Reverse_Color_Array is new Generic_Reverse_Array (T => Color, Index => Integer, Array_T => Color_Array, Null_Value => None); type Shape is (None, Circle, Triangle, Square); type Shape_Array is array (Integer range <>) of Shape; procedure Reverse_Shape_Array is new Generic_Reverse_Array (T => Shape, Index => Integer, Array_T => Shape_Array, Null_Value => None); begin null; end Input_1; ================================================ FILE: Units/parser-ada.r/ada-generic-in-package.d/input_2.ads ================================================ package input_2 is type Generator is null record; generic type Unsigned is mod <>; type Real is digits <>; with function Random (G: Generator) return Unsigned is <>; function Random (G: Generator) return Real; end input_2; ================================================ FILE: Units/parser-ada.r/ada-is-end.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-ada.r/ada-is-end.d/expected.tags ================================================ Seg_Fault_Example input.ada /^procedure Seg_Fault_Example is$/;" r ================================================ FILE: Units/parser-ada.r/ada-is-end.d/input.ada ================================================ with Ada.Text_IO; procedure Seg_Fault_Example is ================================================ FILE: Units/parser-ada.r/ada-label.d/args.ctags ================================================ --sort=no --kinds-Ada="" --kinds-Ada=+{label} ================================================ FILE: Units/parser-ada.r/ada-label.d/expected.tags ================================================ Null_Before_Label input.adb /^ <> null; <>$/;" b subprogram:Input file: Null_After_Label input.adb /^ <> null; <>$/;" b subprogram:Input file: Assignment_Before_Label input.adb /^ <> X := 1; <>$/;" b subprogram:Input file: Assignment_After_Label input.adb /^ <> X := 1; <>$/;" b subprogram:Input file: Exit_Before_Label input.adb /^ <> exit; <>$/;" b anon:loop file: Exit_After_Label input.adb /^ <> exit; <>$/;" b anon:loop file: Goto_Before_Label input.adb /^ <> goto Assignment_Before_Label; <>$/;" b anon:loop file: Goto_After_Label input.adb /^ <> goto Assignment_Before_Label; <>$/;" b anon:loop file: Procedure_Call_Before_Label input.adb /^ <> Ada.Text_IO.Put_Line ("Hello World"); <> Ada.Text_IO.Put_Line ("Hello World"); <> return; <>$/;" b subprogram:Input file: Return_After_Label input.adb /^ <> return; <>$/;" b subprogram:Input file: Accept_Before_Label input.adb /^ <> accept Start(Nr : in Natural) do$/;" b task:Server file: Requeue_Before_Label input.adb /^ <> requeue Start; <>$/;" b entry:Start file: Requeue_After_Label input.adb /^ <> requeue Start; <>$/;" b entry:Start file: Accept_After_Label input.adb /^ end Start; <>$/;" b task:Server file: Entry_Before_Label input.adb /^ <> My_Task.Start (1); <>$/;" b anon:declare file: Entry_After_Label input.adb /^ <> My_Task.Start (1); <>$/;" b anon:declare file: Delay_Before_Label input.adb /^ <> delay 100.0; <>$/;" b anon:declare file: Delay_After_Label input.adb /^ <> delay 100.0; <>$/;" b anon:declare file: Abort_Before_Label input.adb /^ <> abort My_Task; <>$/;" b anon:declare file: Abort_After_Label input.adb /^ <> abort My_Task; <>$/;" b anon:declare file: Select_Before_Statement input.adb /^ <> select$/;" b anon:declare file: Select_After_Statement input.adb /^ end select; <>$/;" b task:Server file: Code_Before_Label input.adb /^ <>$/;" b task:Server file: Code_After_Label input.adb /^ <>$/;" b task:Server file: Multiple_1_Before_Label input.adb /^ <> <> <> null; <> <> <> null; <> <> <> null; <> <> <> null; <> <> <> null; <> <> <> null; <> raise constraint_error; <>$/;" b task:Server file: Raise_After_Label input.adb /^ <> raise constraint_error; <>$/;" b task:Server file: If_Before_Label input.adb /^ <> if X>1 then$/;" b task:Server file: If_After_Label input.adb /^ end if; <> $/;" b task:Server file: Case_Before_Label input.adb /^ <> case X is$/;" b task:Server file: Case_Code_Before_Label input.adb /^ when 1 => <> Ada.Text_IO.Put_Line ("1"); <> $/;" b task:Server file: Case_Code_After_Label input.adb /^ when 1 => <> Ada.Text_IO.Put_Line ("1"); <> $/;" b task:Server file: Case_After_Label input.adb /^ end case; <>$/;" b task:Server file: Loop_Before_Label input.adb /^ <> loop $/;" b task:Server file: Loop_Code_Before_Label input.adb /^ <> Ada.Text_IO.Put_Line ("1"); <>$/;" b anon:loop file: Loop_Code_After_Label input.adb /^ <> Ada.Text_IO.Put_Line ("1"); <>$/;" b anon:loop file: Loop_After_Label input.adb /^ end loop; <>$/;" b task:Server file: While_Before_Label input.adb /^ <> while X > 1 loop$/;" b task:Server file: While_Code_Before_Label input.adb /^ <> X := X + 1; <>$/;" b anon:loop file: While_Code_After_Label input.adb /^ <> X := X + 1; <>$/;" b anon:loop file: While_After_Label input.adb /^ end loop; <>$/;" b task:Server file: For_Before_Label input.adb /^ <> for I in 1 .. X loop$/;" b task:Server file: For_Code_Before_Label input.adb /^ <> Ada.Text_IO.Put_Line (X'Image); <> $/;" b anon:loop file: For_Code_After_Label input.adb /^ <> Ada.Text_IO.Put_Line (X'Image); <> $/;" b anon:loop file: For_After_Label input.adb /^ end loop; <>$/;" b task:Server file: Declare_Before_Label input.adb /^ <> declare$/;" b task:Server file: Declare_After_Label input.adb /^ end; <>$/;" b task:Server file: Begin_Before_Label input.adb /^ <> begin$/;" b task:Server file: Begin_After_Label input.adb /^ end; <>$/;" b task:Server file: Return_Before_Label input.adb /^ <> return Coord : Coordinate do$/;" b subprogram:Extended_Return file: Return_After_Label input.adb /^ end return; <>$/;" b subprogram:Extended_Return file: ================================================ FILE: Units/parser-ada.r/ada-label.d/input.adb ================================================ -- Test labels -- See: ARM 5.1 : Simple and Compound Statements - Sequences of Statements -- -- A label should come before a simple statement or a compound statment. -- -- Check if file compiles: gnatmake -gnatc Units/parser-ada.r/ada-label.d/input.adb -- with Ada.Text_IO; procedure Input is X : Integer; begin -- ARM 5.1(4/2) : Simple statements -- null statement <> null; <> -- assignment <> X := 1; <> for I in 1 .. X loop if I > 1 then -- exit statement <> exit; <> elsif I > 2 then -- goto statement <> goto Assignment_Before_Label; <> end if; end loop; -- procedure call statement <> Ada.Text_IO.Put_Line ("Hello World"); <> if X > 1 then -- simple return statement <> return; <> end if; declare task type Server is entry Start(Nr : in Natural); end Server; task body Server is Iden : Natural; begin <> accept Start(Nr : in Natural) do Iden := Nr; <> requeue Start; <> end Start; <> Ada.Text_IO.Put_Line ("Working..."); end; My_Task : Server; begin <> My_Task.Start (1); <> <> delay 100.0; <> <> abort My_Task; <> if X > 1 then <> select My_Task.Start (1); or delay 10.0; end select; <> end if; end; <> Ada.Text_IO.Put_Line ("Code 1"); Ada.Text_IO.Put_Line ("Code 2"); <> <> <> <> null; <> <> <> <> raise constraint_error; <> -- ARM 5.1(5/2) Compound statements -- if statement <> if X>1 then Ada.Text_IO.Put_Line ("X>1"); elsif X > 2 then Ada.Text_IO.Put_Line ("X > 2"); end if; <> -- case statement <> case X is when 1 => <> Ada.Text_IO.Put_Line ("1"); <> when 2 => Ada.Text_IO.Put_Line ("2"); when others => Ada.Text_IO.Put_Line ("2"); end case; <> -- loop statement <> loop <> Ada.Text_IO.Put_Line ("1"); <> exit; end loop; <> <> while X > 1 loop <> X := X + 1; <> end loop; <> <> for I in 1 .. X loop <> Ada.Text_IO.Put_Line (X'Image); <> end loop; <> -- block statement <> declare Y : Integer; begin Y := X + 1; Ada.Text_IO.Put_Line (Y'Image); end; <> <> begin null; end; <> -- extended return statement declare type Coordinate is record X : Integer; Y : Integer; end record; function Extended_Return return Coordinate is begin <> return Coord : Coordinate do Coord.X := 10; Coord.Y := 20; end return; <> end Extended_Return; begin null; end; -- accept statement See above <> and <> -- select statement See above <> and <> end Input; ================================================ FILE: Units/parser-ada.r/ada-overriding.d/args.ctags ================================================ --kinds-Ada=+E --sort=no ================================================ FILE: Units/parser-ada.r/ada-overriding.d/expected.tags ================================================ Input input.ads /^package Input$/;" P Tasche_T input.ads /^ task type Tasche_T is new Carte_T with$/;" K packspec:Input Coucou input.ads /^ entry Coucou;$/;" E taskspec:Tasche_T Inutile input.ads /^ procedure Inutile$/;" R packspec:Input input_2 input_2.adb /^package body input_2$/;" p Tasche_T input_2.adb /^ task body Tasche_T is$/;" k package:input_2 file: Coucou input_2.adb /^ accept Coucou do$/;" e task:Tasche_T file: Inutile input_2.adb /^ procedure Inutile$/;" r package:input_2 file: Input_3 input_3.ads /^package Input_3 is$/;" P Object input_3.ads /^ type Object is tagged null record;$/;" t packspec:Input_3 Primitive input_3.ads /^ function Primitive return access Object; -- new in Ada 2005$/;" R packspec:Input_3 Derived_Object input_3.ads /^ type Derived_Object is new Object with null record;$/;" t packspec:Input_3 Primitive input_3.ads /^ procedure Primitive (This : in Derived_Object); -- new primitive operation$/;" R packspec:Input_3 Primitive input_3.ads /^ function Primitive return access Derived_Object;$/;" R packspec:Input_3 ================================================ FILE: Units/parser-ada.r/ada-overriding.d/input.ads ================================================ -- Taken from #2382 submitted by @JulienPivard -- @summary -- Implémentation par une tâche. -- @description -- Implémentation par une tache de la classe synchronisé. -- @group Version tâche -- -- package Carte_P.Tasche_P package Input with Pure => False, Preelaborate => False, Elaborate_Body => True, Spark_Mode => Off is --------------------------------------------------------------------------- task type Tasche_T is new Carte_T with -- Implémentation par une tâche de l'interface Carte_T. ----------------------------------- overriding entry Coucou; -- Implémentation par un accept. ----------------------------------- -- overriding -- entry Inutile; -- Implémentation par un accept. -- @param This -- La carte. end Tasche_T; --------------------------------------------------------------------------- overriding procedure Inutile (This : in out Tasche_T); -- Implémentation par une procédure. -- @param This -- La carte. end Carte_P.Tasche_P; ================================================ FILE: Units/parser-ada.r/ada-overriding.d/input_2.adb ================================================ -- Taken from #2382 submitted by @JulienPivard with Ada.Text_IO; package body input_2 with Spark_Mode => Off is --------------------------------------------------------------------------- task body Tasche_T is -- Les déclarations qui vont bien. begin accept Coucou do null; end Coucou; Ada.Text_IO.Put_Line (Item => "Wesh gros je suis une tâche"); -- accept Inutile do -- null; -- end Inutile; abort Tasche_T; end Tasche_T; --------------------------------------------------------------------------- --------------------------------------------------------------------------- overriding procedure Inutile (This : in out Tasche_T) is begin null; end Inutile; --------------------------------------------------------------------------- end input_2; ================================================ FILE: Units/parser-ada.r/ada-overriding.d/input_3.ads ================================================ -- Taken from https://en.wikibooks.org/wiki/Ada_Programming/Object_Orientation#Overriding_indicators package Input_3 is type Object is tagged null record; function Primitive return access Object; -- new in Ada 2005 type Derived_Object is new Object with null record; not overriding -- new optional keywords in Ada 2005 procedure Primitive (This : in Derived_Object); -- new primitive operation overriding function Primitive return access Derived_Object; end X; ================================================ FILE: Units/parser-ada.r/ada-partial-bug.d/expected.tags ================================================ Altivec input.adb /^procedure Altivec is$/;" r ================================================ FILE: Units/parser-ada.r/ada-partial-bug.d/input.adb ================================================ procedure Altivec is V ================================================ FILE: Units/parser-ada.r/ada-partial-bug2.d/input.adb ================================================ procedure Altivec is: V ================================================ FILE: Units/parser-ada.r/ada-partial-type.d/expected.tags ================================================ One input.ads /^ One: access T;$/;" c type:T file: P input.ads /^package P is$/;" P T input.ads /^ type T is record$/;" t packspec:P Two input.ads /^ Two: access T$/;" c type:T file: ================================================ FILE: Units/parser-ada.r/ada-partial-type.d/input.ads ================================================ package P is type T; type T is record One: access T; -- Missing semicolon used to choke the Ada parser Two: access T end record; end P; ================================================ FILE: Units/parser-ada.r/ada-protected.d/input.adb ================================================ protected ================================================ FILE: Units/parser-ada.r/ada-separate.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r ================================================ FILE: Units/parser-ada.r/ada-separate.d/expected.tags ================================================ Buffer input.adb /^separate (Buffer);$/;" p roles:subunit Test input.adb /^package body Test is$/;" p package:Buffer roles:def Parent input-1.adb /^package body Parent is$/;" p roles:def Variable input-1.adb /^ Variable : String := "Hello, there.";$/;" v package:Parent file: roles:def Parent input-1.adb /^separate(Parent)$/;" p roles:subunit Inner input-1.adb /^procedure Inner is$/;" r package:Parent roles:def ================================================ FILE: Units/parser-ada.r/ada-separate.d/input-1.adb ================================================ -- Taken from https://www.adaic.org/resources/add_content/standards/05rm/html/RM-10-1-3.html package body Parent is Variable : String := "Hello, there."; procedure Inner is separate; end Parent; with Ada.Text_IO; separate(Parent) procedure Inner is begin Ada.Text_IO.Put_Line(Variable); end Inner; ================================================ FILE: Units/parser-ada.r/ada-separate.d/input.adb ================================================ -- Taken from #2943 submitted by @koenmeersman with Ada.Text_IO; separate (Buffer); package body Test is procedure Inner is separate; begin null; end Test; ================================================ FILE: Units/parser-ada.r/ada-string-literal.d/expected.tags-e ================================================ input.adb,660 procedure Reproduce isReproduce/p2,18 type String_T is new String;String_T/t4,42 function "+" (Left : String) return String_T is (String_T(Left));"+"/f5,73 function "+" (Left : String_T; Right : String) return String_T is (String_T(String (Left) & Ri"+"/f6,141 package Generic_G isGeneric_G/s10,283 procedure Go;Go/p11,306 package body Generic_G isGeneric_G/b14,342 procedure Go isGo/p15,370 package Impl isImpl/s21,481 procedure Go;Go/p22,499 package body Impl isImpl/b25,530 package Generic1 is new Generic_G (Description => +"; " +":");Generic1/s26,553 procedure Go renames Generic1.Go;Go/p27,620 ================================================ FILE: Units/parser-ada.r/ada-string-literal.d/input.adb ================================================ with Ada.Text_IO; procedure Reproduce is type String_T is new String; function "+" (Left : String) return String_T is (String_T(Left)); function "+" (Left : String_T; Right : String) return String_T is (String_T(String (Left) & Right)); generic Description : String_T; package Generic_G is procedure Go; end Generic_G; package body Generic_G is procedure Go is begin Ada.Text_IO.Put_Line (String (Description)); end Go; end Generic_G; package Impl is procedure Go; end Impl; package body Impl is package Generic1 is new Generic_G (Description => +"; " +":"); procedure Go renames Generic1.Go; end Impl; begin Impl.Go; end Reproduce; ================================================ FILE: Units/parser-ada.r/ada-type-new-without-with.d/args.ctags ================================================ --sort=no --kinds-Ada=* ================================================ FILE: Units/parser-ada.r/ada-type-new-without-with.d/expected.tags ================================================ Input input.adb /^procedure Input is$/;" r Pak input.adb /^ package Pak is$/;" P subprogram:Input file: Integer_1 input.adb /^ type Integer_1 is range 1 .. 10;$/;" t packspec:Pak P input.adb /^ procedure P (I: in Integer_1); -- primitive operation, assumes 1 .. 10$/;" R packspec:Pak I input.adb /^ procedure P (I: in Integer_1); -- primitive operation, assumes 1 .. 10$/;" a subprogspec:P file: Integer_2 input.adb /^ type Integer_2 is new Integer_1 range 8 .. 10; -- must not break P's assumption$/;" t packspec:Pak Pak input.adb /^ package body Pak is$/;" p subprogram:Input file: A input.adb /^ A: Integer_1 := 4;$/;" v subprogram:Input file: B input.adb /^ B: Integer_2 := 9;$/;" v subprogram:Input file: ================================================ FILE: Units/parser-ada.r/ada-type-new-without-with.d/input.adb ================================================ -- Taken from https://en.wikibooks.org/wiki/Ada_Programming/Type_System -- -- This code has a from of "type foo is new ..." -- Though "new" is used in the form, "with" doesn't -- follow "new" like "type foo is new bar with ...". -- procedure Input is package Pak is type Integer_1 is range 1 .. 10; procedure P (I: in Integer_1); -- primitive operation, assumes 1 .. 10 type Integer_2 is new Integer_1 range 8 .. 10; -- must not break P's assumption -- procedure P (I: in Integer_2); inherited P implicitly defined here end Pak; package body Pak is -- omitted end Pak; use Pak; A: Integer_1 := 4; B: Integer_2 := 9; begin P (B); -- OK, call the inherited operation end Derived_Types; ================================================ FILE: Units/parser-ada.r/ada-whitespaces-between-id-and-colon.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-ada.r/ada-whitespaces-between-id-and-colon.d/expected.tags ================================================ Go input.adb /^procedure Go is$/;" r Loop_Label input.adb /^ Loop_Label :$/;" i subprogram:Go file: Not_Tagged input.adb /^ procedure Not_Tagged is$/;" r anon:declare file: ================================================ FILE: Units/parser-ada.r/ada-whitespaces-between-id-and-colon.d/input.adb ================================================ -- Taken from #2933 submitted by @koenmeersman procedure Go is begin Loop_Label : while True loop declare procedure Not_Tagged is begin null; end Step_T; begin null; end; end loop Loop_Label; end Go; ================================================ FILE: Units/parser-ansibleplaybook.r/broken-input.d/README ================================================ This is a crash test. ================================================ FILE: Units/parser-ansibleplaybook.r/broken-input.d/args.ctags ================================================ --language-force=AnsiblePlaybook ================================================ FILE: Units/parser-ansibleplaybook.r/broken-input.d/features ================================================ yaml ================================================ FILE: Units/parser-ansibleplaybook.r/broken-input.d/input.yml ================================================ f: x y: ================================================ FILE: Units/parser-ansibleplaybook.r/play-name.d/args.ctags ================================================ --fields=+e ================================================ FILE: Units/parser-ansibleplaybook.r/play-name.d/expected.tags ================================================ Update ctags input.yml /^- name: Update ctags$/;" p end:3 Update etags input.yml /^- name: Update etags$/;" p end:5 ================================================ FILE: Units/parser-ansibleplaybook.r/play-name.d/features ================================================ yaml ================================================ FILE: Units/parser-ansibleplaybook.r/play-name.d/input.yml ================================================ - name: Update ctags yum: pkg=ctags latest - name: Update etags yum: pkg=etags latest ================================================ FILE: Units/parser-ant.r/regex-based.d/args.ctags ================================================ --language-force=ant ================================================ FILE: Units/parser-ant.r/regex-based.d/expected.tags ================================================ MyProject input.xml /^$/;" p clean input.xml /^ $/;" t compile_something input.xml /^ $/;" t deploy input.xml /^ $/;" t generate_h_from_java input.xml /^ $/;" t init input.xml /^ $/;" t javadoc input.xml /^ $/;" t rootDir input.xml /^ $/;" P srcDir input.xml /^ $/;" P ================================================ FILE: Units/parser-ant.r/regex-based.d/features ================================================ !xpath ================================================ FILE: Units/parser-ant.r/regex-based.d/input.xml ================================================ ================================================ FILE: Units/parser-ant.r/xpath-based-unix.d/args.ctags ================================================ --language-force=ant --extras=+r --fields=+rln ================================================ FILE: Units/parser-ant.r/xpath-based-unix.d/expected.tags ================================================ MyProject input.xml /^$/;" p line:3 language:Ant roles:def another.ant input.xml /^ $/;" i line:4 language:Ant project:MyProject roles:imported base.classpath input.xml /^ $/;" i line:11 language:XML roles:def clean input.xml /^ $/;" t line:16 language:Ant project:MyProject roles:def compile_something input.xml /^ $/;" t line:23 language:Ant project:MyProject roles:def deploy input.xml /^ $/;" t line:68 language:Ant project:MyProject roles:def generate_h_from_java input.xml /^ $/;" t line:47 language:Ant project:MyProject roles:def init input.xml /^ $/;" t line:6 language:Ant project:MyProject roles:def javadoc input.xml /^ $/;" t line:52 language:Ant project:MyProject roles:def x input.xml /^ $/;" P line:5 language:Ant project:MyProject roles:def ================================================ FILE: Units/parser-ant.r/xpath-based-unix.d/features ================================================ xpath ================================================ FILE: Units/parser-ant.r/xpath-based-unix.d/input.xml ================================================ ================================================ FILE: Units/parser-ant.r/xpath-based.d/args.ctags ================================================ --language-force=ant --extras=+r --fields=+rln ================================================ FILE: Units/parser-ant.r/xpath-based.d/expected.tags ================================================ MyProject input.xml /^$/;" p line:3 language:Ant roles:def another.ant input.xml /^ $/;" i line:4 language:Ant project:MyProject roles:imported base.classpath input.xml /^ $/;" i line:11 language:XML roles:def clean input.xml /^ $/;" t line:16 language:Ant project:MyProject roles:def compile_something input.xml /^ $/;" t line:23 language:Ant project:MyProject roles:def deploy input.xml /^ $/;" t line:68 language:Ant project:MyProject roles:def generate_h_from_java input.xml /^ $/;" t line:47 language:Ant project:MyProject roles:def init input.xml /^ $/;" t line:6 language:Ant project:MyProject roles:def javadoc input.xml /^ $/;" t line:52 language:Ant project:MyProject roles:def x input.xml /^ $/;" P line:5 language:Ant project:MyProject roles:def ================================================ FILE: Units/parser-ant.r/xpath-based.d/features ================================================ xpath ================================================ FILE: Units/parser-ant.r/xpath-based.d/input.xml ================================================ ================================================ FILE: Units/parser-asciidoc.r/anchor-asciidoc.d/expected.tags ================================================ Chapter 1 (Level 0) input.asciidoc /^= Chapter 1 (Level 0)$/;" c Chapter 2 input.asciidoc /^Chapter 2$/;" c Level 3 Section 1.1.1.1 Title input.asciidoc /^==== Level 3 Section 1.1.1.1 Title$/;" t subsection:Subsection 1.1.1 Level 4 Section 1.1.1.1.1 Title input.asciidoc /^===== Level 4 Section 1.1.1.1.1 Title [#inline-anchor-1]$/;" T subsubsection:Level 3 Section 1.1.1.1 Title Section 1.1 input.asciidoc /^== Section 1.1$/;" s chapter:Chapter 1 (Level 0) Section 1.2 input.asciidoc /^== Section 1.2$/;" s chapter:Chapter 1 (Level 0) Section 2.1 input.asciidoc /^Section 2.1$/;" s chapter:Chapter 2 Subsection 1.1.1 input.asciidoc /^=== Subsection 1.1.1$/;" S section:Section 1.1 Subsection 1.2.1 Title input.asciidoc /^=== [#inline-anchor-2a]Subsection 1.2.1 Title [[inline-anchor-2b, Subsection 1.2.1]]$/;" S section:Section 1.2 Subsection 1.2.2 Title input.asciidoc /^=== [[inline-anchor-3a]][#inline-anchor-3b]Subsection 1.2.2 Title [#inline-anchor-3c] ===$/;" S section:Section 1.2 Subsection 2.1.1 input.asciidoc /^Subsection 2.1.1$/;" S section:Section 2.1 chapter_2_anchor input.asciidoc /^[[chapter_2_anchor]]$/;" a subsection:Subsection 1.2.2 Title inline-anchor-1 input.asciidoc /^===== Level 4 Section 1.1.1.1.1 Title [#inline-anchor-1]$/;" a subsubsection:Level 3 Section 1.1.1.1 Title inline-anchor-2a input.asciidoc /^=== [#inline-anchor-2a]Subsection 1.2.1 Title [[inline-anchor-2b, Subsection 1.2.1]]$/;" a section:Section 1.2 inline-anchor-2b input.asciidoc /^=== [#inline-anchor-2a]Subsection 1.2.1 Title [[inline-anchor-2b, Subsection 1.2.1]]$/;" a section:Section 1.2 inline-anchor-3a input.asciidoc /^=== [[inline-anchor-3a]][#inline-anchor-3b]Subsection 1.2.2 Title [#inline-anchor-3c] ===$/;" a section:Section 1.2 inline-anchor-3b input.asciidoc /^=== [[inline-anchor-3a]][#inline-anchor-3b]Subsection 1.2.2 Title [#inline-anchor-3c] ===$/;" a section:Section 1.2 inline-anchor-3c input.asciidoc /^=== [[inline-anchor-3a]][#inline-anchor-3b]Subsection 1.2.2 Title [#inline-anchor-3c] ===$/;" a section:Section 1.2 section_1_1_1_1_anchor input.asciidoc /^[#section_1_1_1_1_anchor]$/;" a subsection:Subsection 1.1.1 section_1_1_1_anchor input.asciidoc /^[[section_1_1_1_anchor, The section 1.1.1 anchor]]$/;" a section:Section 1.1 section_1_1_anchor input.asciidoc /^[[section_1_1_anchor]]$/;" a chapter:Chapter 1 (Level 0) section_1_2_anchor input.asciidoc /^[#section_1_2_anchor, The section 1.2 anchor]$/;" a l4subsection:Level 4 Section 1.1.1.1.1 Title section_2_1_1_anchor input.asciidoc /^[#section_2_1_1_anchor]$/;" a section:Section 2.1 section_2_1_anchor input.asciidoc /^[[section_2_1_anchor]]$/;" a chapter:Chapter 2 ================================================ FILE: Units/parser-asciidoc.r/anchor-asciidoc.d/input.asciidoc ================================================ = Chapter 1 (Level 0) Intro text of chapter 1 [[section_1_1_anchor]] == Section 1.1 Text of section 1.1 [[section_1_1_1_anchor, The section 1.1.1 anchor]] === Subsection 1.1.1 Text of subsection 1.1.1 [#section_1_1_1_1_anchor] ==== Level 3 Section 1.1.1.1 Title Text of subsection 1.1.1.1 ===== Level 4 Section 1.1.1.1.1 Title [#inline-anchor-1] Text of subsection 1.1.1.1 [#section_1_2_anchor, The section 1.2 anchor] == Section 1.2 [#invalid anchor for Text of section 1.2 === [#inline-anchor-2a]Subsection 1.2.1 Title [[inline-anchor-2b, Subsection 1.2.1]] Text of subsection 1.2.1 === [[inline-anchor-3a]][#inline-anchor-3b]Subsection 1.2.2 Title [#inline-anchor-3c] === Text of subsection 1.2.2 // and now two-line titles: [[chapter_2_anchor]] Chapter 2 ========= Intro text of chapter 2 [[section_2_1_anchor]] Section 2.1 ------------ Text of section 2.1 [#section_2_1_1_anchor] Subsection 2.1.1 ~~~~~~~~~~~~~~~ other invalid anchors: [[]] [#] [#,] [[] [# ================================================ FILE: Units/parser-asciidoc.r/anchor-invalid-asciidoc.d/expected.tags ================================================ L1 input.adoc /^== L1$/;" s chapter:[A B] L1_b input.adoc /^== L1_b$/;" s chapter:[A B] L2 input.adoc /^=== L2$/;" S section:L1 L3 Title input.adoc /^==== L3 Title$/;" t subsection:L2 L4 Title [ ] input.adoc /^===== L4 Title [ ]$/;" T subsubsection:L3 Title [ #bad] L2_b Title [,] input.adoc /^=== [ #bad] L2_b Title [,]$/;" S section:L1_b [A B] input.adoc /^= [A B]$/;" c [foo][bar] L2_c Title [[] input.adoc /^=== [foo][bar] L2_c Title [[] ===$/;" S section:L1_b good_anchor input.adoc /^[[good_anchor, ]]$/;" a section:L1 ================================================ FILE: Units/parser-asciidoc.r/anchor-invalid-asciidoc.d/input.adoc ================================================ = [A B] Intro text of chapter 1 [c] == L1 Text of section 1.1 [[good_anchor, ]] === L2 Text of subsection 1.1.1 [#] ==== L3 Title Text of subsection 1.1.1.1 ===== L4 Title [ ] Text of subsection 1.1.1.1 [, bad] == L1_b [#invalid anchor for Text of section 1.2 === [ #bad] L2_b Title [,] Text of subsection 1.2.1 === [foo][bar] L2_c Title [[] === Text of subsection 1.2.2 ================================================ FILE: Units/parser-asciidoc.r/one-character-title.d/expected.tags ================================================ a input.adoc /^= a$/;" c b input.adoc /^== b$/;" s chapter:a c input.adoc /^=== c$/;" S section:b ================================================ FILE: Units/parser-asciidoc.r/one-character-title.d/input.adoc ================================================ = a Lorem Ipsum. == b Lorem Ipsum. === c Lorem Ipsum. ================================================ FILE: Units/parser-asciidoc.r/simple-asciidoc.d/expected.tags ================================================ Chapter 1 (Level 0) input.asciidoc /^= Chapter 1 (Level 0)$/;" c Chapter 2 input.asciidoc /^Chapter 2$/;" c Level 3 Section 1.1.1.1 Title input.asciidoc /^==== Level 3 Section 1.1.1.1 Title$/;" t subsection:Subsection 1.1.1 Level 3 Section 2.1.1.1 Title input.asciidoc /^Level 3 Section 2.1.1.1 Title$/;" t subsection:Subsection 2.1.1 Level 4 Section 1.1.1.1.1 Title input.asciidoc /^===== Level 4 Section 1.1.1.1.1 Title$/;" T subsubsection:Level 3 Section 1.1.1.1 Title Level 4 Section 2.1.1.1.1 Title input.asciidoc /^Level 4 Section 2.1.1.1.1 Title$/;" T subsubsection:Level 3 Section 2.1.1.1 Title Level 5 Section 1.1.1.1.1.1 Title input.asciidoc /^====== Level 5 Section 1.1.1.1.1.1 Title$/;" u l4subsection:Level 4 Section 1.1.1.1.1 Title Section 1.1 input.asciidoc /^== Section 1.1$/;" s chapter:Chapter 1 (Level 0) Section 1.2 input.asciidoc /^== Section 1.2$/;" s chapter:Chapter 1 (Level 0) Section 2.1 input.asciidoc /^Section 2.1$/;" s chapter:Chapter 2 Section 2.2 input.asciidoc /^Section 2.2$/;" s chapter:Chapter 2 Subsection 1.1.1 input.asciidoc /^=== Subsection 1.1.1$/;" S section:Section 1.1 Subsection 2.1.1 input.asciidoc /^Subsection 2.1.1$/;" S section:Section 2.1 ================================================ FILE: Units/parser-asciidoc.r/simple-asciidoc.d/input.asciidoc ================================================ = Chapter 1 (Level 0) Intro text of chapter 1 == Section 1.1 Text of section 1.1 === Subsection 1.1.1 Text of subsection 1.1.1 ==== Level 3 Section 1.1.1.1 Title Text of subsection 1.1.1.1 ===== Level 4 Section 1.1.1.1.1 Title Text of subsection 1.1.1.1.1 ====== Level 5 Section 1.1.1.1.1.1 Title Text of subsection 1.1.1.1.1.1 == Section 1.2 Text of section 1.2 // and now two-line titles: Chapter 2 ========= Intro text of chapter 2 Section 2.1 ------------ Text of section 2.1 Subsection 2.1.1 ~~~~~~~~~~~~~~~ Level 3 Section 2.1.1.1 Title ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Text of subsection 2.1.1.1 Level 4 Section 2.1.1.1.1 Title +++++++++++++++++++++++++++++++ Text of subsection 2.1.1.1.1 Section 2.2 ----------- Text of section 2.2 ================================================ FILE: Units/parser-asciidoc.r/utf8-asciidoc.d/expected.tags ================================================ @Ѐ–𐀀 input.asc /^=== @Ѐ–𐀀$/;" S section:Šéçtiön 1.1 Chàptěr 1 input.asc /^Chàptěr 1$/;" c Subsubsection 1.1.1.1 input.asc /^==== Subsubsection 1.1.1.1$/;" t subsection:@Ѐ–𐀀 Šéçtiön 1.1 input.asc /^Šéçtiön 1.1$/;" s chapter:Chàptěr 1 ================================================ FILE: Units/parser-asciidoc.r/utf8-asciidoc.d/input.asc ================================================ Chàptěr 1 ========= Intro text of chapter 1 Šéçtiön 1.1 ----------- Text of section 1.1 === @Ѐ–𐀀 Text of subsection 1.1.1 ==== Subsubsection 1.1.1.1 ================================================ FILE: Units/parser-asm.r/68hc11.asm.d/expected.tags ================================================ COLD input.asm /^COLD LDS #STACK$/;" l INTERRUPTS input.asm /^INTERRUPTS:$/;" l PORTD input.asm /^PORTD EQU $1008$/;" d PROMPT input.asm /^PROMPT FCB CR,LF$/;" l SP input.asm /^SP EQU $20$/;" d TRAPP input.asm /^TRAPP FCB CR,LF$/;" l sym1 input.asm /^sym1 EQU 1$/;" d sym2 input.asm /^sym2: EQU 2$/;" d sym3 input.asm /^sym3:$/;" l sym4 input.asm /^sym4: bne sym3$/;" l ================================================ FILE: Units/parser-asm.r/68hc11.asm.d/input.asm ================================================ INTERRUPTS: ; PORTD EQU $1008 ; SP EQU $20 ; TRAPP FCB CR,LF FCB CR,LF FCC ' ******** ILLEGAL OPCODE TRAP !!! ********' FCB CR,LF FCB 0 PROMPT FCB CR,LF FCC ' 68Mon V1.2 (C) 1992 Keith Vasilakes' FCB CR,LF FCB 0 COLD LDS #STACK LDAA #$20 ; http://www.mekatronix.com/downloads/docs/as11_man.pdf sym1 EQU 1 sym2: EQU 2 sym3: sym4: bne sym3 ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion-cmdline.d/args.ctags ================================================ --sort=no --param-Asm.useCPreProcessor=1 --param-CPreProcessor._expand=1 --fields=+{signature} --fields-CPreProcessor=+{macrodef} --param-Asm.extraLinesepChars=; -DGENTRY(LABEL)=.global LABEL; LABEL: -DLENTRY(LABEL)=LABEL; LABEL: ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion-cmdline.d/expected.tags ================================================ gfunc0 input.S /^GENTRY(gfunc0)$/;" s gfunc0 input.S /^GENTRY(gfunc0)$/;" l lfunc input.S /^LENTRY(lfunc)$/;" l lfunc input.S /^LENTRY(lfunc)$/;" l gfunc1 input.S /^GENTRY(gfunc1)$/;" s gfunc1 input.S /^GENTRY(gfunc1)$/;" l ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion-cmdline.d/input.S ================================================ GENTRY(gfunc0) nop LENTRY(lfunc) nop GENTRY(gfunc1) nop ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion-with-limitation.d/args.ctags ================================================ --param-CPreProcessor._expand=1 --fields-CPreProcessor=+{macrodef} --fields=+{language}{signature} ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion-with-limitation.d/expected.tags ================================================ X input.S /^#define X /;" d language:CPreProcessor file: macrodef:Y Y input.S /^#define Y Y$/;" d language:CPreProcessor file: macrodef:Y Y input.S /^X:$/;" l language:Asm ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion-with-limitation.d/input.S ================================================ #define X Y #define Y Y X: nop ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion-with-multi-line-args-last-items.b/args.ctags ================================================ --sort=no --param-Asm.useCPreProcessor=1 --param-CPreProcessor._expand=1 --fields=+{signature}{line} --fields-CPreProcessor=+{macrodef} --param-Asm.commentCharsAtBOL=# --param-Asm.extraLinesepChars=; ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion-with-multi-line-args-last-items.b/expected.tags ================================================ ENTRY input.S /^#define ENTRY(/;" d line:1 file: signature:(SYMBOL,LABEL) macrodef:.global SYMBOL ;LABEL: nop E input.S /^ENTRY($/;" s line:6 F input.S /^ F)$/;" l line:7 G input.S /^ENTRY($/;" s line:10 H input.S /^ )$/;" l line:11 I input.S /^ENTRY($/;" s line:15 J input.S /^ )$/;" l line:16 ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion-with-multi-line-args-last-items.b/input.S ================================================ #define ENTRY(SYMBOL,LABEL) .global SYMBOL ;\ LABEL: \ nop ENTRY( E, F) ENTRY( G, H ) ENTRY( I, J,K, L ) ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion-with-multi-line-args.d/args.ctags ================================================ --sort=no --param-Asm.useCPreProcessor=1 --param-CPreProcessor._expand=1 --fields=+{signature}{line} --fields-CPreProcessor=+{macrodef} --param-Asm.commentCharsAtBOL=# --param-Asm.extraLinesepChars=; ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion-with-multi-line-args.d/expected.tags ================================================ ENTRY input.S /^#define ENTRY(/;" d line:1 file: signature:(SYMBOL,LABEL) macrodef:.global SYMBOL ;LABEL: nop A input.S /^ENTRY(A, B)$/;" s line:5 B input.S /^ENTRY(A, B)$/;" l line:5 C input.S /^ENTRY(C,$/;" s line:6 D input.S /^ D)$/;" l line:7 ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion-with-multi-line-args.d/input.S ================================================ #define ENTRY(SYMBOL,LABEL) .global SYMBOL ;\ LABEL: \ nop ENTRY(A, B) ENTRY(C, D) ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion.d/args.ctags ================================================ --sort=no --param-Asm.useCPreProcessor=1 --param-CPreProcessor._expand=1 --fields=+{signature} --fields-CPreProcessor=+{macrodef} --param-Asm.commentCharsAtBOL=# --param-Asm.extraLinesepChars=; ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion.d/expected.tags ================================================ ENTRY input.S /^#define ENTRY(/;" d file: signature:(LABEL) macrodef:.global LABEL ;LABEL main input.S /^ENTRY(main):$/;" s main input.S /^ENTRY(main):$/;" l ENTRY2 input.S /^#define ENTRY2(/;" d file: signature:(LABEL,UNUSED) macrodef:.global LABEL ;LABEL loop0 input.S /^ENTRY2(loop0, "STRING"):$/;" s loop0 input.S /^ENTRY2(loop0, "STRING"):$/;" l loop1 input.S /^ENTRY2(loop1, 'c'):$/;" s loop1 input.S /^ENTRY2(loop1, 'c'):$/;" l loop2 input.S /^ENTRY2(loop2, ('c')):$/;" s loop2 input.S /^ENTRY2(loop2, ('c')):$/;" l ASM_NL input.S /^#define ASM_NL /;" d file: macrodef:; SYM_ENTRY input.S /^#define SYM_ENTRY(/;" d file: signature:(name,linkage,align...) macrodef:linkage(name) ASM_NL align ASM_NL name: SYM_START input.S /^#define SYM_START(/;" d file: signature:(name,linkage,align...) macrodef:SYM_ENTRY(name, linkage, align) SYM_CODE_START input.S /^#define SYM_CODE_START(/;" d file: signature:(name) macrodef:SYM_START(name, SYM_L_GLOBAL, SYM_A_ALIGN) asm_exc_nmi input.S /^SYM_CODE_START(asm_exc_nmi)$/;" l ENTRY0 input-0.S /^#define ENTRY0(/;" d file: signature:(LABEL) macrodef:.global LABEL ;LABEL ENTRY1 input-1.S /^#define ENTRY1(/;" d file: signature:(LABEL) macrodef:.global LABEL ;LABEL ENTRY2 input-2.S /^#define ENTRY2(/;" d file: signature:(LABEL) macrodef:.global LABEL ;LABEL exit2 input-2.S /^ENTRY2(exit2):$/;" s exit2 input-2.S /^ENTRY2(exit2):$/;" l ENTRY3 input-3.S /^#define ENTRY3 /;" d file: macrodef:label3:; nop;.section .entry.text, label3 input-3.S /^ ENTRY3"a"$/;" l ENTRY4 input-4.S /^#define ENTRY4 /;" d file: macrodef:label4: ENTRY5 input-4.S /^#define ENTRY5 /;" d file: macrodef:label5: label4 input-4.S /^ENTRY4; nop$/;" l label5 input-4.S /^ENTRY5$/;" l MAC5 input-5.S /^#define MAC5 /;" d file: macrodef:maclabel5:; nop;maclabel50:; nop maclabel5 input-5.S /^MAC5/;" l maclabel50 input-5.S /^MAC5/;" l ENTRYZ input-6.S /^#define ENTRYZ /;" d file: macrodef:label6:; nop;.section .entry.text, label6 input-6.S /^ ENTRYZ'z'$/;" l X input-7.S /^#define X(/;" d file: signature:() macrodef:mylabel:; nop; ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion.d/input-0.S ================================================ #define ENTRY0(LABEL) .global LABEL ;\ LABEL #comment ENTRY0(dummy0: nop exit0: nop ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion.d/input-1.S ================================================ #define ENTRY1(LABEL) .global LABEL ;\ LABEL #comment ENTRY1(dummy1: nop ENTRY1(exit1): nop ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion.d/input-2.S ================================================ #define ENTRY2(LABEL) .global LABEL ;\ LABEL #comment ENTRY2() ENTRY2(exit2): ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion.d/input-3.S ================================================ #define ENTRY3 label3:; nop;.section .entry.text, ENTRY3"a" /* gcc -c input-3.S (x86_64) */ ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion.d/input-4.S ================================================ #define ENTRY4 label4: #define ENTRY5 label5: ENTRY4; nop ENTRY5 nop /* gcc -c input-3.S (x86_64) */ ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion.d/input-5.S ================================================ /* Don't put NEWLINE at the eof this file. No NEWLINE is part of testing. */ #define MAC5 maclabel5:; nop;maclabel50:; nop MAC5 ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion.d/input-6.S ================================================ /* This is abroken input (at lesat for GAS) */ #define ENTRYZ label6:; nop;.section .entry.text, ENTRYZ'z' ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion.d/input-7.S ================================================ #define X() mylabel:; nop; X: nop ================================================ FILE: Units/parser-asm.r/asm-cpp-macro-expansion.d/input.S ================================================ #define ENTRY(LABEL) .global LABEL ;\ LABEL #comment ENTRY(main): nop #define ENTRY2(LABEL,UNUSED) .global LABEL ;\ LABEL ENTRY2(loop0, "STRING"): nop ENTRY2(loop1, 'c'): nop ENTRY2(loop2, ('c')): nop /* Taken from linux kernel */ #define ASM_NL ; #define SYM_ENTRY(name, linkage, align...) \ linkage(name) ASM_NL \ align ASM_NL \ name: #define SYM_START(name, linkage, align...) \ SYM_ENTRY(name, linkage, align) #define SYM_CODE_START(name) \ SYM_START(name, SYM_L_GLOBAL, SYM_A_ALIGN) SYM_CODE_START(asm_exc_nmi) UNWIND_HINT_IRET_REGS ENDBR ================================================ FILE: Units/parser-asm.r/bd32.s.d/expected.tags ================================================ CRLF input.s /^CRLF dc.b 13,10,0 , , null$/;" d TEST input.s /^TEST move.l a0,a1 get argv in a1$/;" l signon input.s /^signon dc.b 'TEST PROGRAM for BD32 programming drivers'$/;" d test_1 input.s /^test_1 moveq.l #BD_PUTS,d0 puts () system call$/;" l test_error input.s /^test_error moveq.l #BD_QUIT,d0 all done - quit$/;" l ================================================ FILE: Units/parser-asm.r/bd32.s.d/input.s ================================================ * From: http://www.programmersheaven.com/zone5/cat462/3642.htm * For 68000 assembler manual, see http://www.ece.iit.edu/ftp/242/Asm.doc * * test driver for BD32 programming command * Scott Howard February 1992 * Format: TEST [ ...] * simply echoes the command line parameters back to the user opt nol include ipd.inc opt l dc.l TEST execution address signon dc.b 'TEST PROGRAM for BD32 programming drivers' CRLF dc.b 13,10,0 , , null even * following is the mainline routine for the driver TEST move.l a0,a1 get argv in a1 move.l d0,d2 get argc lea.l signon(PC),a0 print signon string moveq.l #BD_PUTS,d0 use 'putstring' function in BD32 bgnd cmpi.l #2,d2 arg count < 2? bcc test_1 moveq.l #1,d1 bail out - error code 1 bra test_error test_1 moveq.l #BD_PUTS,d0 puts () system call movea.l (a1)+,a0 point to next string bgnd moveq.l #' ',d1 print space between each one moveq.l #BD_PUTCHAR,d0 bgnd subq #1,d2 bne test_1 loop till done lea.l CRLF(PC),a0 point to string moveq.l #BD_PUTS,d0 display it on user screen bgnd clr.l d1 indicate 'no error' to BD32 test_error moveq.l #BD_QUIT,d0 all done - quit bgnd END TEST ================================================ FILE: Units/parser-asm.r/bug538629.asm.d/expected.tags ================================================ MYMACRO input.asm /^ MYMACRO EQU 01234h$/;" d ================================================ FILE: Units/parser-asm.r/bug538629.asm.d/input.asm ================================================ MYMACRO EQU 01234h ================================================ FILE: Units/parser-asm.r/cpp-parameter-false.d/args.ctags ================================================ --sort=no --param-Asm.useCPreProcessor=0 ================================================ FILE: Units/parser-asm.r/cpp-parameter-false.d/expected.tags ================================================ labelM input.s /^ .global labelM$/;" s labelM input.s /^labelM:$/;" l ================================================ FILE: Units/parser-asm.r/cpp-parameter-false.d/input.s ================================================ #define labelM main .global labelM labelM: nop ================================================ FILE: Units/parser-asm.r/cpp-parameter-true.d/args.ctags ================================================ --sort=no --param-Asm.useCPreProcessor=1 ================================================ FILE: Units/parser-asm.r/cpp-parameter-true.d/expected.tags ================================================ labelM input.S /^#define labelM /;" d file: labelM input.S /^ .global labelM$/;" s labelM input.S /^labelM:$/;" l ================================================ FILE: Units/parser-asm.r/cpp-parameter-true.d/input.S ================================================ #define labelM main .global labelM labelM: nop ================================================ FILE: Units/parser-asm.r/crash-when-deleting-token.d/README ================================================ This is a crash test. ================================================ FILE: Units/parser-asm.r/crash-when-deleting-token.d/args.ctags ================================================ -Iconst ================================================ FILE: Units/parser-asm.r/crash-when-deleting-token.d/input.S ================================================ const ================================================ FILE: Units/parser-asm.r/directive-before-label.d/expected.tags ================================================ ================================================ FILE: Units/parser-asm.r/directive-before-label.d/input.s ================================================ .aDirective label ================================================ FILE: Units/parser-asm.r/gas-parameterized-comment-no-cpp.d/args.ctags ================================================ --sort=no --param-Asm.commentCharsAtBOL=L --param-Asm.useCPreProcessor=false ================================================ FILE: Units/parser-asm.r/gas-parameterized-comment-no-cpp.d/expected.tags ================================================ retry input.s /^retry:$/;" l ================================================ FILE: Units/parser-asm.r/gas-parameterized-comment-no-cpp.d/input.s ================================================ #define X 1 Loop: retry: jmp retry ================================================ FILE: Units/parser-asm.r/gas-parameterized-comment.d/args.ctags ================================================ --sort=no --param-Asm.commentCharsAtBOL=L --param-Asm.useCPreProcessor=true ================================================ FILE: Units/parser-asm.r/gas-parameterized-comment.d/expected.tags ================================================ X input.s /^#define X /;" d file: retry input.s /^retry:$/;" l ================================================ FILE: Units/parser-asm.r/gas-parameterized-comment.d/input.s ================================================ #define X 1 Loop: retry: jmp retry ================================================ FILE: Units/parser-asm.r/gas-parameterized-linesep-no-cpp.d/args.ctags ================================================ --sort=no --param-Asm.extraLinesepChars=, # To increse the test coverage, overwrite the parameter # that set from the command line once. --param-Asm.extraLinesepChars=; --param-Asm.useCPreProcessor=false ================================================ FILE: Units/parser-asm.r/gas-parameterized-linesep-no-cpp.d/expected.tags ================================================ retry input.s /^retry:;loop:$/;" l loop input.s /^retry:;loop:$/;" l ================================================ FILE: Units/parser-asm.r/gas-parameterized-linesep-no-cpp.d/input.s ================================================ #define X 1 retry:;loop: jmp retry jmp loop ================================================ FILE: Units/parser-asm.r/gas-parameterized-linesep.d/args.ctags ================================================ --sort=no --param-Asm.extraLinesepChars=, # To increse the test coverage, overwrite the parameter # that set from the command line once. --param-Asm.extraLinesepChars=; --param-Asm.useCPreProcessor=true ================================================ FILE: Units/parser-asm.r/gas-parameterized-linesep.d/expected.tags ================================================ X input.s /^#define X /;" d file: retry input.s /^retry:;loop:$/;" l loop input.s /^retry:;loop:$/;" l ================================================ FILE: Units/parser-asm.r/gas-parameterized-linesep.d/input.s ================================================ #define X 1 retry:;loop: jmp retry jmp loop ================================================ FILE: Units/parser-asm.r/gas-section.d/args.ctags ================================================ --sort=no --extras=+r --fields=+rlK ================================================ FILE: Units/parser-asm.r/gas-section.d/expected.tags ================================================ machine/asm.h input.s /^#include /;" header language:CPreProcessor roles:system .rodata.cst8 input.s /^ .section .rodata.cst8,"aM",@progbits,8$/;" inputSection language:LdScript roles:destination one input.s /^one: .double 1.0$/;" label language:Asm roles:def limit input.s /^limit: .double 0.29$/;" label language:Asm roles:def .inittext input-0.s /^ .section ".inittext","ax"$/;" inputSection language:LdScript roles:destination intcall input-0.s /^ .globl intcall$/;" symbol language:LdScript inputSection:.inittext roles:def intcall input-0.s /^intcall:$/;" label language:Asm roles:def define_ftsec input-1.s /^.macro define_ftsec name$/;" macro language:Asm roles:def .head.text.\\name\\() input-1.s /^ .section ".head.text.\\name\\()","ax",@progbits$/;" inputSection language:LdScript roles:destination ================================================ FILE: Units/parser-asm.r/gas-section.d/input-0.s ================================================ /* Taken from linux/arch/x86/boot/bioscall.S */ /* * "Glove box" for BIOS calls. Avoids the constant problems with BIOSes * touching registers they shouldn't be. */ .code16 .section ".inittext","ax" .globl intcall .type intcall, @function intcall: /* Self-modify the INT instruction. Ugly, but works. */ cmpb %al, 3f ================================================ FILE: Units/parser-asm.r/gas-section.d/input-1.s ================================================ /* Taken from linux/arch/powerpc/include/asm/head-64.h */ #ifdef __ASSEMBLY__ .macro define_ftsec name .section ".head.text.\name\()","ax",@progbits .endm #endif ================================================ FILE: Units/parser-asm.r/gas-section.d/input.s ================================================ /* Taken from glibc/sysdeps/x86_64/fpu/e_logl.S */ /* * Written by J.T. Conklin . * Public domain. * * Adapted for `long double' by Ulrich Drepper . * Adapted for x86-64 by Andreas Jaeger . */ #include .section .rodata.cst8,"aM",@progbits,8 .p2align 3 .type one,@object one: .double 1.0 ASM_SIZE_DIRECTIVE(one) /* It is not important that this constant is precise. It is only a value which is known to be on the safe side for using the fyl2xp1 instruction. */ .type limit,@object limit: .double 0.29 ASM_SIZE_DIRECTIVE(limit) ================================================ FILE: Units/parser-asm.r/gas.s.d/args.ctags ================================================ --fields=+en ================================================ FILE: Units/parser-asm.r/gas.s.d/expected.tags ================================================ X input.s /^#define X /;" d line:7 file: end:7 _EQU input.s /^.equ _EQU equ1$/;" d line:14 _EQUIV input.s /^.equiv _EQUIV equiv2$/;" d line:15 _EQV input.s /^.eqv _EQV eqv3$/;" d line:16 altsum input.s /^.macro altsum from=0, to=6$/;" m line:8 end:13 sum input.s /^.macro sum from=0, to=5$/;" m line:1 end:6 ================================================ FILE: Units/parser-asm.r/gas.s.d/input.s ================================================ .macro sum from=0, to=5 .long \from .if \to-\from sum "(\from+1)",\to .endif .endm #define X 1 .macro altsum from=0, to=6 .long \from .if \to-\from sum "(\from+1)",\to .endif .endm .equ _EQU equ1 .equiv _EQUIV equiv2 .eqv _EQV eqv3 ================================================ FILE: Units/parser-asm.r/label-capturing.d/expected.tags ================================================ idtentry input.S /^.macro idtentry sym do_sym has_error_code:req paranoid=0 shift_ist=-1 ist_offset=0 create_gap=0 /;" m ================================================ FILE: Units/parser-asm.r/label-capturing.d/input.S ================================================ /* Taken from linux/arch/x86/entry/entry_64.S idtentry is a macro. It should not be captured as a label. */ /* SPDX-License-Identifier: GPL-2.0 */ /* * linux/arch/x86_64/entry.S * * Copyright (C) 1991, 1992 Linus Torvalds * Copyright (C) 2000, 2001, 2002 Andi Kleen SuSE Labs * Copyright (C) 2000 Pavel Machek * * entry.S contains the system-call and fault low-level handling routines. * * Some of this is documented in Documentation/x86/entry_64.rst * * A note on terminology: * - iret frame: Architecture defined interrupt frame from SS to RIP * at the top of the kernel process stack. * * Some macro usage: * - SYM_FUNC_START/END:Define functions in the symbol table. * - TRACE_IRQ_*: Trace hardirq state for lock debugging. * - idtentry: Define exception entry points. */ .macro idtentry sym do_sym has_error_code:req paranoid=0 shift_ist=-1 ist_offset=0 create_gap=0 read_cr2=0 SYM_CODE_START(\sym) UNWIND_HINT_IRET_REGS offset=\has_error_code*8 /* Sanity check */ .if \shift_ist != -1 && \paranoid != 1 .error "using shift_ist requires paranoid=1" .endif .if \create_gap && \paranoid .error "using create_gap requires paranoid=0" .endif ASM_CLAC .if \has_error_code == 0 pushq $-1 /* ORIG_RAX: no syscall to restart */ .endif .if \paranoid == 1 testb $3, CS-ORIG_RAX(%rsp) /* If coming from userspace, switch stacks */ jnz .Lfrom_usermode_switch_stack_\@ .endif .if \create_gap == 1 /* * If coming from kernel space, create a 6-word gap to allow the * int3 handler to emulate a call instruction. */ testb $3, CS-ORIG_RAX(%rsp) jnz .Lfrom_usermode_no_gap_\@ .rept 6 pushq 5*8(%rsp) .endr UNWIND_HINT_IRET_REGS offset=8 .Lfrom_usermode_no_gap_\@: .endif idtentry_part \do_sym, \has_error_code, \read_cr2, \paranoid, \shift_ist, \ist_offset .if \paranoid == 1 /* * Entry from userspace. Switch stacks and treat it * as a normal entry. This means that paranoid handlers * run in real process context if user_mode(regs). */ .Lfrom_usermode_switch_stack_\@: idtentry_part \do_sym, \has_error_code, \read_cr2, paranoid=0 .endif _ASM_NOKPROBE(\sym) SYM_CODE_END(\sym) .endm idtentry divide_error do_divide_error has_error_code=0 idtentry overflow do_overflow has_error_code=0 idtentry bounds do_bounds has_error_code=0 idtentry invalid_op do_invalid_op has_error_code=0 idtentry device_not_available do_device_not_available has_error_code=0 idtentry double_fault do_double_fault has_error_code=1 paranoid=2 read_cr2=1 idtentry coprocessor_segment_overrun do_coprocessor_segment_overrun has_error_code=0 idtentry invalid_TSS do_invalid_TSS has_error_code=1 idtentry segment_not_present do_segment_not_present has_error_code=1 idtentry spurious_interrupt_bug do_spurious_interrupt_bug has_error_code=0 idtentry coprocessor_error do_coprocessor_error has_error_code=0 idtentry alignment_check do_alignment_check has_error_code=1 idtentry simd_coprocessor_error do_simd_coprocessor_error has_error_code=0 ================================================ FILE: Units/parser-asm.r/label-just-before-comment-no-cpp.d/args.ctags ================================================ --sort=no --param-Asm.commentCharsInMOL=; --param-Asm.useCPreProcessor=false ================================================ FILE: Units/parser-asm.r/label-just-before-comment-no-cpp.d/expected.tags ================================================ retry input.s /^retry:;loop:$/;" l ================================================ FILE: Units/parser-asm.r/label-just-before-comment-no-cpp.d/input.s ================================================ #define X 1 retry:;loop: jmp retry jmp retry ================================================ FILE: Units/parser-asm.r/label-just-before-comment.d/args.ctags ================================================ --sort=no --param-Asm.commentCharsInMOL=; --param-Asm.useCPreProcessor=true ================================================ FILE: Units/parser-asm.r/label-just-before-comment.d/expected.tags ================================================ X input.s /^#define X /;" d file: retry input.s /^retry:;loop:$/;" l ================================================ FILE: Units/parser-asm.r/label-just-before-comment.d/input.s ================================================ #define X 1 retry:;loop: jmp retry jmp retry ================================================ FILE: Units/parser-asm.r/macro-params.d/args.ctags ================================================ --sort=no --kinds-Asm=+z --fields=+eSo --fields-Asm=+{properties} ================================================ FILE: Units/parser-asm.r/macro-params.d/expected.tags ================================================ comm input.asm /^ .macro comm$/;" m end:4 plus1 input.asm /^ .macro plus1 p, p1$/;" m signature:p p1 end:7 p input.asm /^ .macro plus1 p, p1$/;" z macro:plus1 nth:0 p1 input.asm /^ .macro plus1 p, p1$/;" z macro:plus1 nth:1 plus2 input.asm /^ .macro plus2 p p1$/;" m signature:p p1 end:10 p input.asm /^ .macro plus2 p p1$/;" z macro:plus2 nth:0 p1 input.asm /^ .macro plus2 p p1$/;" z macro:plus2 nth:1 reserve_str input.asm /^ .macro reserve_str p1=0 p2$/;" m signature:p1=0 p2 end:13 p1 input.asm /^ .macro reserve_str p1=0 p2$/;" z macro:reserve_str nth:0 p2 input.asm /^ .macro reserve_str p1=0 p2$/;" z macro:reserve_str nth:1 m input.asm /^ .macro m p1:req, p2=0, p3:vararg$/;" m signature:p1:req p2=0 p3:vararg end:16 p1 input.asm /^ .macro m p1:req, p2=0, p3:vararg$/;" z macro:m nth:0 properties:req p2 input.asm /^ .macro m p1:req, p2=0, p3:vararg$/;" z macro:m nth:1 p3 input.asm /^ .macro m p1:req, p2=0, p3:vararg$/;" z macro:m nth:2 properties:vararg func_define input.asm /^ .macro func_define name,nr=0$/;" m signature:name nr=0 end:27 name input.asm /^ .macro func_define name,nr=0$/;" z macro:func_define nth:0 nr input.asm /^ .macro func_define name,nr=0$/;" z macro:func_define nth:1 \\name input.asm /^ .macro \\name arg1,arg2,arg3,arg4$/;" m macro:func_define signature:arg1 arg2 arg3 arg4 end:26 arg1 input.asm /^ .macro \\name arg1,arg2,arg3,arg4$/;" z macro:func_define.\\name nth:0 arg2 input.asm /^ .macro \\name arg1,arg2,arg3,arg4$/;" z macro:func_define.\\name nth:1 arg3 input.asm /^ .macro \\name arg1,arg2,arg3,arg4$/;" z macro:func_define.\\name nth:2 arg4 input.asm /^ .macro \\name arg1,arg2,arg3,arg4$/;" z macro:func_define.\\name nth:3 ================================================ FILE: Units/parser-asm.r/macro-params.d/input.asm ================================================ ;; Taken from "7.63 '.macro'", the section of the info document for Gas .macro comm .endm .macro plus1 p, p1 .endm .macro plus2 p p1 .endm .macro reserve_str p1=0 p2 .endm .macro m p1:req, p2=0, p3:vararg .endm ;; Taken From linux/arch/m68k/kernel/head.S .macro func_define name,nr=0 .macro \name arg1,arg2,arg3,arg4 move_stack \nr,\arg1,\arg2,\arg3,\arg4 func_call \name .if \nr lea %sp@(\nr*4),%sp .endif .endm .endm ================================================ FILE: Units/parser-asm.r/masm.asm.d/expected.tags ================================================ BYTE_BUFFER input.asm /^BYTE_BUFFER LABEL BYTE$/;" l LabelMaker1 input.asm /^LabelMaker1:$/;" l LabelMaker2 input.asm /^LabelMaker2:$/;" l Msg input.asm /^Msg DB "Text string"$/;" d QUACK input.asm /^QUACK PROC PUBLIC$/;" l WORD_BUFFER input.asm /^WORD_BUFFER DW 512 dup (?)$/;" d hllequal input.asm /^hllequal := 4$/;" d myequ input.asm /^myequ EQU 3$/;" d myequal input.asm /^myequal = 4$/;" d mymacro input.asm /^mymacro macro args$/;" m mystruct input.asm /^mystruct struct$/;" t ================================================ FILE: Units/parser-asm.r/masm.asm.d/input.asm ================================================ .MODEL medium .DATA Msg DB "Text string" .CODE QUACK PROC PUBLIC enter 0, 0 ; May be an instruction or a macro mov bx, OFFSET DGROUP:Msg mov bx, [bp+6] mov WORD PTR [bx], ax leave ret 2 QUACK ENDP END myequ EQU 3 myequal = 4 ; http://www.xploiter.com/mirrors/asm/asm_1.htm hllequal := 4 BYTE_BUFFER LABEL BYTE WORD_BUFFER DW 512 dup (?) mov bx, ax LabelMaker1: xor ax, ax LabelMaker2: mymacro macro args endm mystruct struct ends ================================================ FILE: Units/parser-asm.r/moniker.x68.d/expected.tags ================================================ CHECK2 input.x68 /^CHECK2 CMPI.B #'A',(A0) Is Char > A ?$/;" l DUMMY input.x68 /^DUMMY DS.B 1$/;" d F_NAME input.x68 /^F_NAME DS.B 80$/;" d INITIAL input.x68 /^INITIAL MOVEA.L #F_NAME,A1 Move the first char to A1$/;" l PRNSURNAME input.x68 /^PRNSURNAME MOVEA.L #S_NAME,A1 Pointer to start of prompt text$/;" l PROMPT1 input.x68 /^PROMPT1 DC.B 'Please enter your firstname (Max 80): '$/;" d PROMPT2 input.x68 /^PROMPT2 DC.B 'Please enter your surname (Max 80): '$/;" d PRTSTR input.x68 /^PRTSTR EQU 1 Print string Function$/;" d QUIT input.x68 /^QUIT STOP #$2700 Stop the prorgam$/;" l READSTR input.x68 /^READSTR EQU 2 Read string function$/;" d RETURNFALSE input.x68 /^RETURNFALSE MOVE.B #0,D5 Moves a zero to D5 to make CAPS false$/;" l RETURNTRUE input.x68 /^RETURNTRUE MOVE.B #1,D5 Moves a one to D5 to make CAPS ture$/;" l START input.x68 /^START MOVEA.L #PROMPT1,A1 Pointer to start of prompt text$/;" l SURNAME input.x68 /^SURNAME MOVEA.L #PROMPT2,A1 Pointer to start of prompt text$/;" l S_NAME input.x68 /^S_NAME DS.B 80$/;" d ================================================ FILE: Units/parser-asm.r/moniker.x68.d/input.x68 ================================================ * http://www.xrmx.com/solutions/software/68k-fe/samples/moniker.x68 * MONIKER.X68 * Author : Greg Colley * Date : 29/01/99 * Program Description. * This will prompt for surname and firstname, and check if its uppercase * If it is it prints Initial + surname else it repromts. * This program will only exit when nothing is entered in the surname or * firstname. PRTSTR EQU 1 Print string Function READSTR EQU 2 Read string function ORG $1000 Start of code location * Print user prompt for enter the firstname * ========================================= START MOVEA.L #PROMPT1,A1 Pointer to start of prompt text MOVE.B #PRTSTR,D0 Set up print string function MOVE.W #(PROMPT2-PROMPT1),D1 The prompt string length TRAP #15 Print Prompt * Get firstname * ============= MOVEA.L #F_NAME,A1 Pointer to store the sentence MOVE.B #READSTR,D0 Set up readstring function TRAP #15 Get string from KB MOVE.W D1,D4 Save length of input string to d4 * Check if Return is pressed CMPI.W #0,D4 Is the length = 0 BEQ QUIT If length = 0 then Quit * Set up the stuff to check it the entered word is in CAPS * ======================================================== MOVEA.L #F_NAME,A0 Move the first char to A0 JSR CHECK2 Check if uppercase CMPI.B #1,D5 See if all the sentence is CAPS BCS START if it is'nt then re-enter * Print user prompt for enter the surname * ======================================= SURNAME MOVEA.L #PROMPT2,A1 Pointer to start of prompt text MOVE.B #PRTSTR,D0 Set up print string function MOVE.W #(F_NAME-PROMPT2),D1 The prompt string length TRAP #15 Print Prompt * Get surname * =========== MOVEA.L #S_NAME,A1 Pointer to store the sentence MOVE.B #READSTR,D0 Set up readstring function TRAP #15 Get string from KB MOVE.W D1,D4 Save length on input string MOVE.W D1,D3 Save length of input string to d3 * Check is Return is pressed CMPI.W #0,D4 Is the length = 0 BEQ QUIT If length = 0 then Quit * Set up the stuff to check it the entered word is in CAPS * ======================================================== MOVEA.L #S_NAME,A0 Move the first char to A0 JSR CHECK2 Check if uppercase CMPI.B #1,D5 See if all the sentence is CAPS BCS SURNAME if it is'nt then re-enter * Move the first char for fname and prints it (Initial Bit) * ========================================================= INITIAL MOVEA.L #F_NAME,A1 Move the first char to A1 MOVE.B (A1),D1 Move the first char of F_NAME to D1 MOVE.B #6,D0 Set up trap number TRAP #15 Print the Initial PRNSURNAME MOVEA.L #S_NAME,A1 Pointer to start of prompt text MOVE.B #0,D0 Set up print string function MOVE.W D3,D1 The prompt string length TRAP #15 Print Prompt QUIT STOP #$2700 Stop the prorgam * Check if uppercase * ================== * This subroutine will return a 1 in, d5 if it's OK or * return a 0 in d5 if its not ok. CHECK2 CMPI.B #'A',(A0) Is Char > A ? BCS RETURNFALSE If no then re-enter CMP.B #('Z'+1),(A0)+ Check if char is < Z BCC RETURNFALSE If it is then it must be a cap SUBI.B #1,D4 Decrease s_name / f_name Length BNE CHECK2 jump if the sentence is not = 0 RETURNTRUE MOVE.B #1,D5 Moves a one to D5 to make CAPS ture RTS Jump back to the main program RETURNFALSE MOVE.B #0,D5 Moves a zero to D5 to make CAPS false RTS Jump back to the main program * Var's & Const's * =============== PROMPT1 DC.B 'Please enter your firstname (Max 80): ' PROMPT2 DC.B 'Please enter your surname (Max 80): ' F_NAME DS.B 80 S_NAME DS.B 80 DUMMY DS.B 1 END $1000 End of assembley ================================================ FILE: Units/parser-asm.r/unbalanced-end-macro.d/expected.tags ================================================ ================================================ FILE: Units/parser-asm.r/unbalanced-end-macro.d/input.S ================================================ NOP .endm ================================================ FILE: Units/parser-autoconf.r/disabling-m4.d/args.ctags ================================================ --sort=no --fields=+elnr --extras=+fr --languages=-M4 ================================================ FILE: Units/parser-autoconf.r/disabling-m4.d/expected.tags ================================================ PKG_PREREQ input.ac /^AC_DEFUN([PKG_PREREQ],$/;" m line:4 language:Autoconf roles:def end:8 input.ac input.ac 1;" F line:1 language:Autoconf roles:def end:12 ================================================ FILE: Units/parser-autoconf.r/disabling-m4.d/input.ac ================================================ changequote([`],[']) define(`x', 1) changequote(`[',`]') AC_DEFUN([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ m4_define([y], 2) m4_changequote([`],[']) define(`z', 3) ================================================ FILE: Units/parser-autoconf.r/forcing-autoconf-and-disabling-m4.d/args.ctags ================================================ --sort=no --fields=+elnr --extras=+fr --languages=-M4 --language-force=Autoconf ================================================ FILE: Units/parser-autoconf.r/forcing-autoconf-and-disabling-m4.d/expected.tags ================================================ PKG_PREREQ input.m4 /^AC_DEFUN([PKG_PREREQ],$/;" m line:4 language:Autoconf roles:def end:8 input.m4 input.m4 1;" F line:1 language:Autoconf roles:def end:12 ================================================ FILE: Units/parser-autoconf.r/forcing-autoconf-and-disabling-m4.d/input.m4 ================================================ changequote([`],[']) define(`x', 1) changequote(`[',`]') AC_DEFUN([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ m4_define([y], 2) m4_changequote([`],[']) define(`z', 3) ================================================ FILE: Units/parser-autoconf.r/nested-block.ac.d/args.ctags ================================================ --sort=no --fields=+lneKz ================================================ FILE: Units/parser-autoconf.r/nested-block.ac.d/expected.tags ================================================ USE_STDBOOL_H input.ac /^ AH_TEMPLATE([USE_STDBOOL_H], [whether or not to use .])$/;" kind:template line:3 language:Autoconf end:3 USE_STDBOOL_H input.ac /^ AC_DEFINE([USE_STDBOOL_H])$/;" kind:definition line:4 language:Autoconf end:4 bool input.ac /^ AH_TEMPLATE([bool], [type for 'bool' if is missing or broken.])$/;" kind:template line:7 language:Autoconf end:7 true input.ac /^ AH_TEMPLATE([true], [value of 'true' if is missing or broken.])$/;" kind:template line:8 language:Autoconf end:8 false input.ac /^ AH_TEMPLATE([false], [value of 'false' if is missing or broken.])$/;" kind:template line:9 language:Autoconf end:9 true input.ac /^ AC_DEFINE([true], [1])$/;" kind:definition line:10 language:Autoconf end:10 false input.ac /^ AC_DEFINE([false], [0])$/;" kind:definition line:11 language:Autoconf end:11 ================================================ FILE: Units/parser-autoconf.r/nested-block.ac.d/input.ac ================================================ AC_CHECK_HEADERS([stdbool.h], [ AH_TEMPLATE([USE_STDBOOL_H], [whether or not to use .]) AC_DEFINE([USE_STDBOOL_H]) ], [ AH_TEMPLATE([bool], [type for 'bool' if is missing or broken.]) AH_TEMPLATE([true], [value of 'true' if is missing or broken.]) AH_TEMPLATE([false], [value of 'false' if is missing or broken.]) AC_DEFINE([true], [1]) AC_DEFINE([false], [0]) ]) ================================================ FILE: Units/parser-autoconf.r/no-string-literal.d/expected.tags ================================================ HAVE_CONFDB input.ac /^AC_DEFINE_UNQUOTED(HAVE_CONFDB, $HAVE_confdb, Have the old herarchial Corosync config API)$/;" d UUID_FILE input.ac /^AC_DEFINE_UNQUOTED(UUID_FILE,"$localstatedir\/lib\/heartbeat\/hb_uuid", I'm a bad boy.)$/;" d ================================================ FILE: Units/parser-autoconf.r/no-string-literal.d/input.ac ================================================ dnl Taken from configure.ac of pacemaker AC_DEFINE_UNQUOTED(UUID_FILE,"$localstatedir/lib/heartbeat/hb_uuid", I'm a bad boy.) AC_DEFINE_UNQUOTED(HAVE_CONFDB, $HAVE_confdb, Have the old herarchial Corosync config API) ================================================ FILE: Units/parser-autoconf.r/simple.ac.d/args.ctags ================================================ --sort=no --fields=+KeE ================================================ FILE: Units/parser-autoconf.r/simple.ac.d/expected.tags ================================================ universal-ctags input.ac /^AC_INIT([universal-ctags],[0.0.0])$/;" package extras:subparser end:1 TMPDIR input.ac /^AH_TEMPLATE([TMPDIR],$/;" template extras:subparser end:4 CHECK_HEADER_DEFINE input.ac /^AC_DEFUN([CHECK_HEADER_DEFINE], [$/;" macro extras:subparser end:19 ctags-libexecdir input.ac /^AC_ARG_WITH([ctags-libexecdir],$/;" optwith extras:subparser end:22 tmpdir input.ac /^AC_ARG_ENABLE(tmpdir,$/;" optenable extras:subparser end:26 pkgsysconfdir input.ac /^AC_SUBST([pkgsysconfdir])$/;" subst extras:subparser end:27 pkglibexecdir input.ac /^AC_SUBST([pkglibexecdir])$/;" subst extras:subparser end:28 INSTALL_LIB input.ac /^AM_CONDITIONAL(INSTALL_LIB, [test "x$enable_readlib" = "xyes"])$/;" condition extras:subparser end:29 INSTALL_ETAGS input.ac /^AM_CONDITIONAL(INSTALL_ETAGS, [test "x$enable_etags" = "xyes"])$/;" condition extras:subparser end:30 USE_READCMD input.ac /^AM_CONDITIONAL(USE_READCMD, [test "x$enable_readcmd" = "xyes"])$/;" condition extras:subparser end:31 ctags_name_executable input.ac /^AC_SUBST(ctags_name_executable)$/;" subst extras:subparser end:35 etags_name_executable input.ac /^AC_SUBST(etags_name_executable)$/;" subst extras:subparser end:37 ETAGS input.ac /^AC_DEFINE_UNQUOTED(ETAGS, "$etags_name_executable")$/;" definition extras:subparser end:39 MSDOS_STYLE_PATH input.ac /^ AC_DEFINE(MSDOS_STYLE_PATH)$/;" definition extras:subparser end:45 ================================================ FILE: Units/parser-autoconf.r/simple.ac.d/input.ac ================================================ AC_INIT([universal-ctags],[0.0.0]) AH_TEMPLATE([TMPDIR], [If you wish to change the directory in which temporary files are stored, define this label to the directory desired.]) AC_DEFUN([CHECK_HEADER_DEFINE], [ AC_MSG_CHECKING([if $1 is defined in $2]) AC_EGREP_CPP([$2:$1], [ #include <$2> #ifdef $1 const char *result_yes = "$2:$1"; #endif ], [ AC_MSG_RESULT(yes) [$3] ], [ AC_MSG_RESULT(no) [$4] ]) ]) AC_ARG_WITH([ctags-libexecdir], [AS_HELP_STRING([--with-ctags-libexecdir=DIR], ['universal-ctags'-specific program executables [LIBEXECDIR/ctags]])]) AC_ARG_ENABLE(tmpdir, [AS_HELP_STRING([--enable-tmpdir=DIR], [default directory for temporary files [ARG=/tmp]])], tmpdir_specified=yes) AC_SUBST([pkgsysconfdir]) AC_SUBST([pkglibexecdir]) AM_CONDITIONAL(INSTALL_LIB, [test "x$enable_readlib" = "xyes"]) AM_CONDITIONAL(INSTALL_ETAGS, [test "x$enable_etags" = "xyes"]) AM_CONDITIONAL(USE_READCMD, [test "x$enable_readcmd" = "xyes"]) dnl AC_MSG_NOTICE(Change with $program_transform_name) ctags_name_executable=`echo ctags | sed "$program_transform_name"` AC_SUBST(ctags_name_executable) etags_name_executable=`echo etags | sed "$program_transform_name"` AC_SUBST(etags_name_executable) AC_DEFINE_UNQUOTED(ETAGS, "$etags_name_executable") # Check for host type case "$host" in i?86-*-mingw* | x86_64-*-mingw*) host_mingw=yes AC_DEFINE(MSDOS_STYLE_PATH) ;; esac ================================================ FILE: Units/parser-autoconf.r/simple2.ac.d/args.ctags ================================================ --sort=no --fields=+elnr --extras=+fr ================================================ FILE: Units/parser-autoconf.r/simple2.ac.d/expected.tags ================================================ x input.ac /^define(`x', 1)$/;" d line:2 language:M4 roles:def end:2 PKG_PREREQ input.ac /^AC_DEFUN([PKG_PREREQ],$/;" m line:4 language:Autoconf roles:def end:8 PKG_MACROS_VERSION input.ac /^[m4_define([PKG_MACROS_VERSION], [0.29])$/;" d line:5 language:M4 roles:def end:5 y input.ac /^m4_define([y], 2)$/;" d line:9 language:M4 roles:def end:9 z input.ac /^define(`z', 3)$/;" d line:11 language:M4 roles:def end:11 input.ac input.ac 1;" F line:1 language:Autoconf roles:def end:12 ================================================ FILE: Units/parser-autoconf.r/simple2.ac.d/input.ac ================================================ changequote([`],[']) define(`x', 1) changequote(`[',`]') AC_DEFUN([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ m4_define([y], 2) m4_changequote([`],[']) define(`z', 3) ================================================ FILE: Units/parser-autoit.r/simple-au3.d/args.ctags ================================================ --fields=+erS --fields-AutoIt=+{properties} --extras=+r ================================================ FILE: Units/parser-autoit.r/simple-au3.d/expected.tags ================================================ All functions input.au3 /^#Region All functions$/;" r roles:def end:54 Constants.au3 input.au3 /^#include $/;" S roles:system GUIConstantsEx.au3 input.au3 /^#include$/;" S roles:system MyDouble input.au3 /^Func MyDouble($iValue)$/;" f region:All functions signature:($iValue) roles:def end:32 MyDouble0 input.au3 /^func MyDouble0($iValue)$/;" f region:All functions signature:($iValue) roles:def end:38 MyDouble1 input.au3 /^ FUNC MyDouble1($iValue)$/;" f region:All functions signature:($iValue) roles:def end:43 MyDummy input.au3 /^FUNC MyDummy($iValue)$/;" f region:All functions signature:($iValue) roles:def end:53 MyVolatileDouble input.au3 /^Volatile Func MyVolatileDouble ($iValue)$/;" f region:All functions signature:($iValue) roles:def end:47 properties:volatile WindowsConstants.au3 input.au3 /^#include "WindowsConstants.au3"$/;" S roles:local iDoubled input.au3 /^Local $iDoubled = 0$/;" l roles:def iFirst input.au3 /^ LOCAL STATIC $iFirst = 0$/;" l func:All functions.MyDummy roles:def properties:static iNumber input.au3 /^Local $iNumber = 10$/;" l roles:def iSecond input.au3 /^ STATIC LOCAL $iSecond = 1$/;" l func:All functions.MyDummy roles:def properties:static iSomething input.au3 /^ Local $iSomething = 42$/;" l func:All functions.MyDouble0 roles:def ================================================ FILE: Units/parser-autoit.r/simple-au3.d/input.au3 ================================================ ; Taken from https://www.autoitscript.com/autoit3/docs/intro/lang_functions.htm #include #include #include "WindowsConstants.au3" Local $iNumber = 10 Local $iDoubled = 0 For $i = 1 To 10 $iDoubled = MyDouble($iNumber) MsgBox($MB_OK, "", $iNumber & " doubled is " & $iDoubled) $iNumber = $iDoubled Next Exit #cs Func Ignored() EndFunc #comments-start Func Ignored0() EndFunc #comments-end Func Ignored1() EndFunc #ce #Region All functions Func MyDouble($iValue) $iValue = $iValue * 2 Return $iValue EndFunc ;==>MyDouble func MyDouble0($iValue) Local $iSomething = 42 $iValue = $iValue * 2 Return $iValue EndFunc ;==>MyDouble FUNC MyDouble1($iValue) $iValue = $iValue * 2 Return $iValue EndFunc Volatile Func MyVolatileDouble ($iValue) Return $iValue * 2; EndFunc FUNC MyDummy($iValue) LOCAL STATIC $iFirst = 0 STATIC LOCAL $iSecond = 1 RETURN $iValue * $iSecond + $iFirst ENDFUNC #EndRegion All functions ================================================ FILE: Units/parser-automake.r/disable-make-parser.d/args.ctags ================================================ --language-force=Automake --languages=-Make --fields=+r --extras=+r ================================================ FILE: Units/parser-automake.r/disable-make-parser.d/expected.tags ================================================ bin input.am /^bin_PROGRAMS = x$/;" d roles:program x input.am /^bin_PROGRAMS = x$/;" P directory:bin roles:def ================================================ FILE: Units/parser-automake.r/disable-make-parser.d/input.am ================================================ bin_PROGRAMS = x ================================================ FILE: Units/parser-automake.r/eof-value.d/README ================================================ This is a crash test. ================================================ FILE: Units/parser-automake.r/eof-value.d/args.ctags ================================================ --kinds-all' --fields=* --fields-all=* --extras=* --extras-all=* --roles-all.*=* ================================================ FILE: Units/parser-automake.r/eof-value.d/input.am ================================================ l: ================================================ FILE: Units/parser-automake.r/langstack.am.d/args.ctags ================================================ --sort=no --language-force=Automake --fields=+rlK --extras=+r ================================================ FILE: Units/parser-automake.r/langstack.am.d/expected.tags ================================================ prefix input.am /^prefix=c$/;" macro language:Make roles:def $(top_srcdir)/source.mak input.am /^include $(top_srcdir)\/source.mak$/;" makefile language:Make roles:included cbin input.am /^cbin=$(bindir)\/ctags$/;" macro language:Make roles:def cbin_PROGRAMS input.am /^cbin_PROGRAMS = $(prefix)ctags$/;" macro language:Make roles:def cbin input.am /^cbin_PROGRAMS = $(prefix)ctags$/;" directory language:Automake roles:program $(prefix)ctags input.am /^cbin_PROGRAMS = $(prefix)ctags$/;" program language:Automake directory:cbin roles:def __prefix_ctags input.am /^cbin_PROGRAMS = $(prefix)ctags$/;" program language:Automake directory:cbin roles:def INSTALL_ETAGS input.am /^if INSTALL_ETAGS$/;" condition language:Automake roles:branched install-exec-hook input.am /^install-exec-hook:$/;" target language:Make roles:def uninstall-hook input.am /^uninstall-hook:$/;" target language:Make roles:def ================================================ FILE: Units/parser-automake.r/langstack.am.d/input.am ================================================ prefix=c include $(top_srcdir)/source.mak cbin=$(bindir)/ctags cbin_PROGRAMS = $(prefix)ctags if INSTALL_ETAGS install-exec-hook: cd $(DESTDIR)$(bindir) && \ $(LN_S) ctags$(EXEEXT) etags$(EXEEXT) uninstall-hook: rm $(DESTDIR)$(bindir)/etags$(EXEEXT) endif ================================================ FILE: Units/parser-automake.r/noinst.d/args.ctags ================================================ --sort=no --extras=sr --fields=lZKrz ================================================ FILE: Units/parser-automake.r/noinst.d/expected.tags ================================================ check_LIBRARIES input.am /^check_LIBRARIES = libt0.a libt1.a$/;" kind:macro language:Make roles:def libt0.a input.am /^check_LIBRARIES = libt0.a libt1.a$/;" kind:library language:Automake scope:pseudodir:check roles:def libt0_a input.am /^check_LIBRARIES = libt0.a libt1.a$/;" kind:library language:Automake scope:pseudodir:check roles:def libt1.a input.am /^check_LIBRARIES = libt0.a libt1.a$/;" kind:library language:Automake scope:pseudodir:check roles:def libt1_a input.am /^check_LIBRARIES = libt0.a libt1.a$/;" kind:library language:Automake scope:pseudodir:check roles:def check_PROGRAMS input.am /^check_PROGRAMS = testprog0 testprog1$/;" kind:macro language:Make roles:def testprog0 input.am /^check_PROGRAMS = testprog0 testprog1$/;" kind:program language:Automake scope:pseudodir:check roles:def testprog1 input.am /^check_PROGRAMS = testprog0 testprog1$/;" kind:program language:Automake scope:pseudodir:check roles:def EXTRA_PROGRAMS input.am /^EXTRA_PROGRAMS = xprog0 xprog1$/;" kind:macro language:Make roles:def xprog0 input.am /^EXTRA_PROGRAMS = xprog0 xprog1$/;" kind:program language:Automake scope:pseudodir:EXTRA roles:def xprog1 input.am /^EXTRA_PROGRAMS = xprog0 xprog1$/;" kind:program language:Automake scope:pseudodir:EXTRA roles:def ================================================ FILE: Units/parser-automake.r/noinst.d/input.am ================================================ check_LIBRARIES = libt0.a libt1.a check_PROGRAMS = testprog0 testprog1 EXTRA_PROGRAMS = xprog0 xprog1 ================================================ FILE: Units/parser-automake.r/objprefix.d/args.ctags ================================================ --sort=no --extras=sr --fields=lZKrzE ================================================ FILE: Units/parser-automake.r/objprefix.d/expected.tags ================================================ dist_data_DATA input.am /^dist_data_DATA = distribute-this$/;" kind:macro language:Make roles:def data input.am /^dist_data_DATA = distribute-this$/;" kind:directory language:Automake roles:data extras:reference,subparser distribute-this input.am /^dist_data_DATA = distribute-this$/;" kind:data language:Automake scope:directory:data roles:def extras:subparser bin_PROGRAMS input.am /^bin_PROGRAMS = foo$/;" kind:macro language:Make roles:def bin input.am /^bin_PROGRAMS = foo$/;" kind:directory language:Automake roles:program extras:reference,subparser foo input.am /^bin_PROGRAMS = foo$/;" kind:program language:Automake scope:directory:bin roles:def extras:subparser nodist_foo_SOURCES input.am /^nodist_foo_SOURCES = do-not-distribute.c$/;" kind:macro language:Make roles:def nobase_include_HEADERS input.am /^nobase_include_HEADERS = sys\/types.h$/;" kind:macro language:Make roles:def man_MANS input.am /^man_MANS = foo.1$/;" kind:macro language:Make roles:def man input.am /^man_MANS = foo.1$/;" kind:directory language:Automake roles:man extras:reference,subparser foo.1 input.am /^man_MANS = foo.1$/;" kind:man language:Automake scope:directory:man roles:def extras:subparser notrans_man_MANS input.am /^notrans_man_MANS = foo.3$/;" kind:macro language:Make roles:def man input.am /^notrans_man_MANS = foo.3$/;" kind:directory language:Automake roles:man extras:reference,subparser foo.3 input.am /^notrans_man_MANS = foo.3$/;" kind:man language:Automake scope:directory:man roles:def extras:subparser notrans_dist_man3_MANS input.am /^notrans_dist_man3_MANS = bar.3$/;" kind:macro language:Make roles:def man3 input.am /^notrans_dist_man3_MANS = bar.3$/;" kind:directory language:Automake roles:man extras:reference,subparser bar.3 input.am /^notrans_dist_man3_MANS = bar.3$/;" kind:man language:Automake scope:directory:man3 roles:def extras:subparser ================================================ FILE: Units/parser-automake.r/objprefix.d/input.am ================================================ dist_data_DATA = distribute-this bin_PROGRAMS = foo nodist_foo_SOURCES = do-not-distribute.c nobase_include_HEADERS = sys/types.h man_MANS = foo.1 notrans_man_MANS = foo.3 notrans_dist_man3_MANS = bar.3 ================================================ FILE: Units/parser-automake.r/simple.am.d/args.ctags ================================================ --sort=no --language-force=Automake --fields=+r --extras=+r ================================================ FILE: Units/parser-automake.r/simple.am.d/expected.tags ================================================ $(top_srcdir)/source.mak input.am /^include $(top_srcdir)\/source.mak$/;" I roles:included EXTRA_DIST input.am /^EXTRA_DIST = $(NULL)$/;" m roles:def bin_PROGRAMS input.am /^bin_PROGRAMS = ctags$/;" m roles:def bin input.am /^bin_PROGRAMS = ctags$/;" d roles:program ctags input.am /^bin_PROGRAMS = ctags$/;" P directory:bin roles:def USE_READCMD input.am /^if USE_READCMD$/;" c roles:branched bin input.am /^bin_PROGRAMS+= readtags$/;" d roles:program readtags input.am /^bin_PROGRAMS+= readtags$/;" P directory:bin roles:def readtags_CPPFLAGS input.am /^readtags_CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)\/main -I$(srcdir)\/read$/;" m roles:def dist_readtags_SOURCES input.am /^dist_readtags_SOURCES = $(READTAGS_SRCS) $(READTAGS_HEADS)$/;" m roles:def HAVE_FNMATCH input.am /^if !HAVE_FNMATCH$/;" c roles:branched HAVE_REGCOMP input.am /^if !HAVE_REGCOMP$/;" c roles:branched HAVE_LIBXML input.am /^if HAVE_LIBXML$/;" c roles:branched ctags_CPPFLAGS input.am /^ctags_CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)\/main$/;" m roles:def ENABLE_DEBUGGING input.am /^if ENABLE_DEBUGGING$/;" c roles:branched ctags_CFLAGS input.am /^ctags_CFLAGS =$/;" m roles:def ctags_LDADD input.am /^ctags_LDADD =$/;" m roles:def nodist_ctags_SOURCES input.am /^nodist_ctags_SOURCES = $(REPOINFO_HEADS)$/;" m roles:def BUILT_SOURCES input.am /^BUILT_SOURCES = $(REPOINFO_HEADS)$/;" m roles:def CLEANFILES input.am /^CLEANFILES = $(REPOINFO_HEADS)$/;" m roles:def $(REPOINFO_OBJS) input.am /^$(REPOINFO_OBJS): $(REPOINFO_SRCS) $(REPOINFO_HEADS)$/;" t roles:def BUILD_IN_GIT_REPO input.am /^if BUILD_IN_GIT_REPO$/;" c roles:branched GEN_REPOINFO input.am /^GEN_REPOINFO = $(srcdir)\/misc\/gen-repoinfo$/;" m roles:def $(REPOINFO_HEADS) input.am /^$(REPOINFO_HEADS): $(GEN_REPOINFO) $(srcdir)\/.git\/*$/;" t roles:def $(REPOINFO_HEADS) input.am /^$(REPOINFO_HEADS):$/;" t roles:def RUN_OPTLIB2C input.am /^if RUN_OPTLIB2C$/;" c roles:branched optlib2c_verbose input.am /^optlib2c_verbose = $(optlib2c_verbose_@AM_V@)$/;" m roles:def optlib2c_verbose_ input.am /^optlib2c_verbose_ = $(optlib2c_verbose_@AM_DEFAULT_V@)$/;" m roles:def optlib2c_verbose_0 input.am /^optlib2c_verbose_0 = @echo OPTLIB2C " $@";$/;" m roles:def OPTLIB2C input.am /^OPTLIB2C = $(srcdir)\/misc\/optlib2c$/;" m roles:def %.c input.am /^%.c: %.ctags $(OPTLIB2C) Makefile$/;" t roles:def dist_ctags_SOURCES input.am /^dist_ctags_SOURCES = $(ALL_HEADS) $(ALL_SRCS)$/;" m roles:def man_MANS input.am /^man_MANS = ctags.1$/;" m roles:def man input.am /^man_MANS = ctags.1$/;" d roles:man ctags.1 input.am /^man_MANS = ctags.1$/;" M directory:man roles:def ENABLE_XCMD input.am /^if ENABLE_XCMD$/;" c roles:branched driversdir input.am /^driversdir = $(pkglibexecdir)\/drivers$/;" m roles:def drivers input.am /^driversdir = $(pkglibexecdir)\/drivers$/;" d roles:def dist_drivers_SCRIPTS input.am /^dist_drivers_SCRIPTS = libexec\/drivers\/coffeetags$/;" m roles:def drivers input.am /^dist_drivers_SCRIPTS = libexec\/drivers\/coffeetags$/;" d roles:script libexec/drivers/coffeetags input.am /^dist_drivers_SCRIPTS = libexec\/drivers\/coffeetags$/;" S directory:drivers roles:def INSTALL_ETAGS input.am /^if INSTALL_ETAGS$/;" c roles:branched install-exec-hook input.am /^install-exec-hook:$/;" t roles:def uninstall-hook input.am /^uninstall-hook:$/;" t roles:def $(top_srcdir)/makefiles/testing.mak input.am /^include $(top_srcdir)\/makefiles\/testing.mak$/;" I roles:included $(top_srcdir)/makefiles/test-cases.mak input.am /^include $(top_srcdir)\/makefiles\/test-cases.mak$/;" I roles:included $(top_srcdir)/makefiles/help.mak input.am /^include $(top_srcdir)\/makefiles\/help.mak$/;" I roles:included ================================================ FILE: Units/parser-automake.r/simple.am.d/input.am ================================================ include $(top_srcdir)/source.mak # Test cases are added to EXTRA_DIST in makefiles/test-cases.mak EXTRA_DIST = $(NULL) bin_PROGRAMS = ctags if USE_READCMD bin_PROGRAMS+= readtags readtags_CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/main -I$(srcdir)/read dist_readtags_SOURCES = $(READTAGS_SRCS) $(READTAGS_HEADS) readtags_CPPFLAGS += -DQUALIFIER -I$(srcdir)/dsl dist_readtags_SOURCES += $(QUALIFIER_SRCS) $(QUALIFIER_HEADS) endif if !HAVE_FNMATCH MAIN_SRCS += $(FNMATCH_SRCS) MAIN_HEADS += $(FNMATCH_HEADS) endif if !HAVE_REGCOMP MAIN_SRCS += $(REGEX_SRCS) MAIN_HEADS += $(REGEX_HEADS) endif if HAVE_LIBXML PARSER_SRCS += $(XML_SRCS) PARSER_HEADS += $(XML_HEADS) endif ctags_CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/main if ENABLE_DEBUGGING ctags_CPPFLAGS+= $(DEBUG_CPPFLAGS) endif ctags_CPPFLAGS+= $(FNMATCH_CPPFLAGS) ctags_CPPFLAGS+= $(REGCOMP_CPPFLAGS) ctags_CPPFLAGS+= -DHAVE_REPOINFO_H ctags_CFLAGS = ctags_CFLAGS += $(EXTRA_CFLAGS) ctags_CFLAGS += $(WARNING_CFLAGS) ctags_CFLAGS += $(COVERAGE_CFLAGS) ctags_CFLAGS += $(CGCC_CFLAGS) ctags_CFLAGS += $(LIBXML_CFLAGS) ctags_LDADD = ctags_LDADD += $(LIBXML_LIBS) nodist_ctags_SOURCES = $(REPOINFO_HEADS) BUILT_SOURCES = $(REPOINFO_HEADS) CLEANFILES = $(REPOINFO_HEADS) $(REPOINFO_OBJS): $(REPOINFO_SRCS) $(REPOINFO_HEADS) if BUILD_IN_GIT_REPO GEN_REPOINFO = $(srcdir)/misc/gen-repoinfo $(REPOINFO_HEADS): $(GEN_REPOINFO) $(srcdir)/.git/* $(GEN_REPOINFO) > $@ else $(REPOINFO_HEADS): echo > $@ endif if RUN_OPTLIB2C optlib2c_verbose = $(optlib2c_verbose_@AM_V@) optlib2c_verbose_ = $(optlib2c_verbose_@AM_DEFAULT_V@) optlib2c_verbose_0 = @echo OPTLIB2C " $@"; OPTLIB2C = $(srcdir)/misc/optlib2c %.c: %.ctags $(OPTLIB2C) Makefile $(optlib2c_verbose)$(OPTLIB2C) --transform-cmd="$(program_transform_name)" $< > $@ endif dist_ctags_SOURCES = $(ALL_HEADS) $(ALL_SRCS) man_MANS = ctags.1 if ENABLE_XCMD driversdir = $(pkglibexecdir)/drivers dist_drivers_SCRIPTS = libexec/drivers/coffeetags endif if INSTALL_ETAGS install-exec-hook: cd $(DESTDIR)$(bindir) && \ $(LN_S) ctags$(EXEEXT) etags$(EXEEXT) uninstall-hook: rm $(DESTDIR)$(bindir)/etags$(EXEEXT) endif include $(top_srcdir)/makefiles/testing.mak include $(top_srcdir)/makefiles/test-cases.mak include $(top_srcdir)/makefiles/help.mak ================================================ FILE: Units/parser-automake.r/subdirs.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-automake.r/subdirs.d/expected.tags ================================================ SUBDIRS input.am /^SUBDIRS = lib src . test$/;" m lib input.am /^SUBDIRS = lib src . test$/;" s src input.am /^SUBDIRS = lib src . test$/;" s . input.am /^SUBDIRS = lib src . test$/;" s test input.am /^SUBDIRS = lib src . test$/;" s docs input.am /^SUBDIRS += docs$/;" s ================================================ FILE: Units/parser-automake.r/subdirs.d/input.am ================================================ SUBDIRS = lib src . test SUBDIRS += docs ================================================ FILE: Units/parser-awk.r/functions.d/expected.tags ================================================ leadingWhitespace input.awk /^ function leadingWhitespace() {}$/;" f ================================================ FILE: Units/parser-awk.r/functions.d/input.awk ================================================ # match function definitions preceded by whitespace function leadingWhitespace() {} ================================================ FILE: Units/parser-awk.r/gawk-alias.d/args.ctags ================================================ -G ================================================ FILE: Units/parser-awk.r/gawk-alias.d/expected.tags ================================================ mysub input.unknown /^function mysub(pat, repl, str, global)$/;" f ================================================ FILE: Units/parser-awk.r/gawk-alias.d/input.unknown ================================================ #!/usr/bin/env gawk # Taken from info manual of gawk. function mysub(pat, repl, str, global) { if (global) gsub(pat, repl, str) else sub(pat, repl, str) return str } ================================================ FILE: Units/parser-awk.r/simple-awk.d/expected.tags ================================================ mysub input.awk /^function mysub(pat, repl, str, global)$/;" f ================================================ FILE: Units/parser-awk.r/simple-awk.d/input.awk ================================================ # Taken from info manual of gawk. function mysub(pat, repl, str, global) { if (global) gsub(pat, repl, str) else sub(pat, repl, str) return str } ================================================ FILE: Units/parser-awk.r/simple2-awk.d/expected.tags ================================================ max input.awk /^function max(x, y) { return (x > y) ? x : y }$/;" f numjust input.awk /^function numjust(n, s) { # position s in field n$/;" f ================================================ FILE: Units/parser-awk.r/simple2-awk.d/input.awk ================================================ # Aho, Alfred V., Brian W. Kernighan, and Peter J. Weinberger. The AWK # Programming Language. Reading, MA: Addison-Wesley Pub., 1988, p. 98. # table - simple table formatter BEGIN { FS = "\t"; blanks = sprintf("%100s", " ") number = "^[+-]?([0-9]+[.]?[0-9]*|[.][0-9]+)$" } { row[NR] = $0 for (i = 1; i <= NF; i++) { if ($i ~ number) nwid[i] = max(nwid[i], length($i)) wid[i] = max(wid[i], length($i)) } } END { for (r = 1; r <= NR; r++) { n = split(row[r], d) for (i = 1; i <= n; i++) { sep = (i < n) ? " " : "\n" if (d[i] ~ number) printf("%" wid[i] "s%s", numjust(i,d[i]), sep) else printf("%-" wid[i] "s%s", d[i], sep) } } } function max(x, y) { return (x > y) ? x : y } function numjust(n, s) { # position s in field n return s substr(blanks, 1, int((wid[n]-nwid[n])/2)) } ================================================ FILE: Units/parser-basic.r/basic-labels.d/expected.tags ================================================ repeat input.bas /^repeat:$/;" l ================================================ FILE: Units/parser-basic.r/basic-labels.d/input.bas ================================================ ' This is not a label: REM This is not a label: repeat: PRINT "Going 'round again" GOTO repeat END ================================================ FILE: Units/parser-basic.r/freebasic-access.d/args.ctags ================================================ --sort=no --fields=+{access} ================================================ FILE: Units/parser-basic.r/freebasic-access.d/expected.tags ================================================ i_am_private input.bas /^Private Sub i_am_private$/;" f access:private i_am_public input.bas /^Public Sub i_am_public$/;" f access:public ================================================ FILE: Units/parser-basic.r/freebasic-access.d/input.bas ================================================ # Taken from https://documentation.help/FreeBASIC/KeyPgPublic.html Private Sub i_am_private End Sub Public Sub i_am_public End Sub ================================================ FILE: Units/parser-basic.r/freebasic-decls.d/args.ctags ================================================ --sort=no --fields=+rE --extras=+r ================================================ FILE: Units/parser-basic.r/freebasic-decls.d/expected.tags ================================================ curses input.bas /^namespace curses 'public use this$/;" n roles:def win input.bas /^ type win as curses.curses_priv._win_st$/;" t namespace:curses roles:def _Init input.bas /^ declare function _Init alias "initscr" () as win ptr$/;" f namespace:curses roles:decl extras:reference GetMaxX input.bas /^ declare function GetMaxX alias "getmaxx" (byval as win ptr) as integer$/;" f namespace:curses roles:decl extras:reference GetMaxY input.bas /^ declare function GetMaxY alias "getmaxy" (byval as win ptr) as integer$/;" f namespace:curses roles:decl extras:reference CreateWindow input.bas /^ declare function CreateWindow alias "newwin" (byval as integer, byval as integer, byval as int/;" f namespace:curses roles:decl extras:reference CreateSubWindow input.bas /^ declare function CreateSubWindow alias "subwin" (byval as win ptr, byval as integer, byval as /;" f namespace:curses roles:decl extras:reference GetChar input.bas /^ declare function GetChar alias "getch" () as UByte$/;" f namespace:curses roles:decl extras:reference CBreak input.bas /^ declare function CBreak alias "cbreak" () as integer$/;" f namespace:curses roles:decl extras:reference EreaseTerm input.bas /^ declare function EreaseTerm alias "erase" () as integer$/;" f namespace:curses roles:decl extras:reference ClearTerm input.bas /^ declare function ClearTerm alias "clear" () as integer$/;" f namespace:curses roles:decl extras:reference EreaseWindow input.bas /^ declare function EreaseWindow alias "werase" (byval as win ptr) as integer$/;" f namespace:curses roles:decl extras:reference ClearWindow input.bas /^ declare function ClearWindow alias "wclear" (byval as win ptr) as integer$/;" f namespace:curses roles:decl extras:reference DeleteWindow input.bas /^ declare function DeleteWindow alias "delwin" (byval as win ptr) as integer$/;" f namespace:curses roles:decl extras:reference _Exit input.bas /^ declare function _Exit alias "endwin" () as integer$/;" f namespace:curses roles:decl extras:reference RefresTerm input.bas /^ declare function RefresTerm alias "refresh" () as integer$/;" f namespace:curses roles:decl extras:reference RefreshWindow input.bas /^ declare function RefreshWindow alias "wrefresh" (byval as win ptr) as integer$/;" f namespace:curses roles:decl extras:reference PrintTerm input.bas /^ declare function PrintTerm alias "printw" (byval as zstring ptr, ... ) as integer$/;" f namespace:curses roles:decl extras:reference PrintWindow input.bas /^ declare function PrintWindow alias "wprintw" (byval as win ptr, byval as zstring ptr, ... ) as/;" f namespace:curses roles:decl extras:reference SetCursorPositionTerm input.bas /^ declare function SetCursorPositionTerm alias "move" (byval as integer,byval as integer) as int/;" f namespace:curses roles:decl extras:reference SetCursorPositionWindow input.bas /^ declare function SetCursorPositionWindow alias "wmove" (byval as win ptr, byval as integer, by/;" f namespace:curses roles:decl extras:reference ================================================ FILE: Units/parser-basic.r/freebasic-decls.d/input.bas ================================================ ' Taken from https://termbin.com/x9wo submitted by @Glog78 namespace curses 'public use this #include "curses_priv.bi" #inclib "curses" extern "c" type win as curses.curses_priv._win_st declare function _Init alias "initscr" () as win ptr declare function GetMaxX alias "getmaxx" (byval as win ptr) as integer declare function GetMaxY alias "getmaxy" (byval as win ptr) as integer declare function CreateWindow alias "newwin" (byval as integer, byval as integer, byval as integer, byval as integer) as win declare function CreateSubWindow alias "subwin" (byval as win ptr, byval as integer, byval as integer, byval as integer, byval as integer) as win ptr declare function GetChar alias "getch" () as UByte declare function CBreak alias "cbreak" () as integer declare function EreaseTerm alias "erase" () as integer declare function ClearTerm alias "clear" () as integer declare function EreaseWindow alias "werase" (byval as win ptr) as integer declare function ClearWindow alias "wclear" (byval as win ptr) as integer declare function DeleteWindow alias "delwin" (byval as win ptr) as integer declare function _Exit alias "endwin" () as integer declare function RefresTerm alias "refresh" () as integer declare function RefreshWindow alias "wrefresh" (byval as win ptr) as integer declare function PrintTerm alias "printw" (byval as zstring ptr, ... ) as integer declare function PrintWindow alias "wprintw" (byval as win ptr, byval as zstring ptr, ... ) as integer declare function SetCursorPositionTerm alias "move" (byval as integer,byval as integer) as integer declare function SetCursorPositionWindow alias "wmove" (byval as win ptr, byval as integer, byval as integer) as integer end extern end namespace 'curses ' vim: bs=2 sw=2 ss=2 ts=2 nu noet ft=basic ================================================ FILE: Units/parser-basic.r/freebasic-namespace.d/args.ctags ================================================ --sort=no --fields=+e ================================================ FILE: Units/parser-basic.r/freebasic-namespace.d/expected.tags ================================================ first input.bas /^namespace first 'first defines something'$/;" n end:12 first_func input.bas /^ sub first_func$/;" f namespace:first second input.bas /^ namespace second 'second defines something'$/;" n namespace:first end:11 first_func input.bas /^ sub first_func 'oh a second first_func$/;" f namespace:first.second second_func input.bas /^ sub second_func$/;" f namespace:first.second first_func input.bas /^sub first_func 'oh another first_func$/;" f ================================================ FILE: Units/parser-basic.r/freebasic-namespace.d/input.bas ================================================ namespace first 'first defines something' sub first_func end sub namespace second 'second defines something' sub first_func 'oh a second first_func end sub sub second_func end sub end namespace 'ignored' end namespace sub first_func 'oh another first_func end sub ' vim: bs=2 sw=2 ss=2 ts=2 nu et ft=basic ================================================ FILE: Units/parser-basic.r/simple.bas.d/expected.tags ================================================ a input.bas /^Common a As Integer$/;" v b input.bas /^Dim b As Integer$/;" v c input.bas /^dim as string c(20), d="a", e$/;" v d input.bas /^dim as string c(20), d="a", e$/;" v e input.bas /^dim as string c(20), d="a", e$/;" v f input.bas /^Function f()$/;" f g input.bas /^dim shared as string g$/;" v h input.bas /^dim as string ptr h$/;" v i input.bas /^dim as string * 4096 i$/;" v j input.bas /^dim j as string="Export_GIR_FULL_"+mid(date,7)+","+mid(date,1,2)+""+mid(date,4,2)+".csv"$/;" v k input.bas /^dim as string k="Export_GIR_FULL_"+mid(date(),"(")+","+mid(date,1,2)+""+mid(date,4,2)+".csv", l$/;" v l input.bas /^dim as string k="Export_GIR_FULL_"+mid(date(),"(")+","+mid(date,1,2)+""+mid(date,4,2)+".csv", l$/;" v one input.bas /^Const one = 1$/;" c start input.bas /^start:$/;" l str input.bas /^DIM AS STRING str$/;" v test input.bas /^Type test$/;" t ================================================ FILE: Units/parser-basic.r/simple.bas.d/input.bas ================================================ Gosub start Const one = 1 Common a As Integer Dim b As Integer DIM AS STRING str dim as string c(20), d="a", e dim shared as string g dim as string ptr h dim as string * 4096 i dim j as string="Export_GIR_FULL_"+mid(date,7)+","+mid(date,1,2)+""+mid(date,4,2)+".csv" dim as string k="Export_GIR_FULL_"+mid(date(),"(")+","+mid(date,1,2)+""+mid(date,4,2)+".csv", l Type test a As Integer b As Integer End Type Function f() a = 3 End Function start: f() Return ================================================ FILE: Units/parser-basic.r/simple.bb.d/expected.tags ================================================ a input.bb /^Global a$/;" v b input.bb /^Dim b(100)$/;" v f input.bb /^Function f()$/;" f one# input.bb /^Const one# = 1.0$/;" c start input.bb /^.start$/;" l test input.bb /^Type test$/;" t ================================================ FILE: Units/parser-basic.r/simple.bb.d/input.bb ================================================ Gosub start Const one# = 1.0 Global a Dim b(100) Type test Field a Field b End Type Function f() a = 3 End Function .start f() Return ================================================ FILE: Units/parser-bats.r/bats-simple.d/args.ctags ================================================ --sort=no --extras=+sr --fields=+lr ================================================ FILE: Units/parser-bats.r/bats-simple.d/expected.tags ================================================ Zeroth test input.bats /^@test "Zeroth test" {$/;" t language:Bats roles:def First test input.bats /^@test "First test" {$/;" t language:Bats roles:def Second test input.bats /^@test "Second test" {$/;" t language:Bats roles:def Loading input.bats /^@test "Loading" {$/;" t language:Bats roles:def ABC input.bats /^ load "ABC"$/;" S language:Bats roles:loaded a"b input.bats /^ load "a\\"b"$/;" S language:Bats roles:loaded c\\d input.bats /^ load "c\\\\d"$/;" S language:Bats roles:loaded EFG input.bats /^ load EFG$/;" S language:Bats roles:loaded HIJ input.bats /^ load 'HIJ'$/;" S language:Bats roles:loaded h\\ij input.bats /^ load 'h\\ij'$/;" S language:Bats roles:loaded K L;M input.bats /^ load K\\ L\\;M$/;" S language:Bats roles:loaded ================================================ FILE: Units/parser-bats.r/bats-simple.d/input.bats ================================================ #!/usr/bin/env bats @test "Zeroth test" { # will have no tags } # bats file_tags=a:b # bats test_tags=c:d @test "First test" { # will be tagged a:b, c:d } # bats file_tags= @test "Second test" { # will have no tags } @test "Loading" { load "ABC" load "a\"b" load "c\\d" load EFG load 'HIJ' load 'h\ij' load K\ L\;M } # Taken from https://bats-core.readthedocs.io/en/stable/writing-tests.html ================================================ FILE: Units/parser-bibtex.r/bib-simple.d/args.ctags ================================================ --sort=no --fields=+l ================================================ FILE: Units/parser-bibtex.r/bib-simple.d/expected.tags ================================================ 1957-doe_loc_ident input.bib /^@article{1957-doe_loc_ident,$/;" a language:BibTeX doe+rocket input.bib /^@Book{doe+rocket,$/;" b language:BibTeX tiny_collect input.bib /^@booklet{tiny_collect,$/;" B language:BibTeX 1960-rocket_deep-exploration input.bib /^@conference{1960-rocket_deep-exploration,$/;" c language:BibTeX 1961-doe-diverse_splits input.bib /^@inbook{1961-doe-diverse_splits,$/;" i language:BibTeX 1960-doe-location_splits input.bib /^@incollection{1960-doe-location_splits,$/;" I language:BibTeX 1959-rocket_exploration input.bib /^@INPROCEEDINGS{1959-rocket_exploration,$/;" j language:BibTeX man_loc_splits input.bib /^@manual{man_loc_splits,$/;" m language:BibTeX doe_mastersth input.bib /^@mastersthesis{doe_mastersth,$/;" M language:BibTeX doe_mastersth_data input.bib /^@misc{doe_mastersth_data,$/;" n language:BibTeX doe_phd input.bib /^@phdthesis{doe_phd,$/;" p language:BibTeX 1960_conf_splits input.bib /^@proceedings{1960_conf_splits,$/;" P language:BibTeX john_doe input.bib /^@string{john_doe = "Prof. Dr. John Doe"}$/;" s language:BibTeX 1961_splits input.bib /^@techreport{1961_splits$/;" t language:BibTeX xx_thoughts input.bib /^@unpublished{xx_thoughts,$/;" u language:BibTeX hicks:2001 input.bib /^@Book{hicks:2001,$/;" b language:BibTeX knuthwebsite input.bib /^@online{knuthwebsite,$/;" V language:BibLaTeX 10.1145/605432.605407 input.bib /^@Article{10.1145\/605432.605407,$/;" a language:BibTeX ================================================ FILE: Units/parser-bibtex.r/bib-simple.d/input.bib ================================================ % this is a comment that will be ignored @article{1957-doe_loc_ident, author = "John Doe", title = "Exploration of the Location-Identity Split", journal = "Journal of Splits", year = 1957, volume = 3 } @Book{doe+rocket, author = "John Doe and Rocket Scientist", title = "Theory of Splits", publisher = "Dover", year = 1964, address = "New York City", edition = "ninth Dover printing, tenth GPO printing" } @booklet{tiny_collect, title = "A tiny collection of stuff" } @conference{1960-rocket_deep-exploration, author = "Rocket Scientist", title = "Deep Exploration of the Singleton Split", booktitle = "34th international conference of important stuff (ICIS)", year = 1960 } @inbook{1961-doe-diverse_splits, author = "John Doe", title = "A comprehensive list of splits", pages = {13-39}, publisher = "Penguin Books", year = 1961 } @incollection{1960-doe-location_splits, author = "John Doe", title = "Survey of location splits", booktitle = "Current state of the art in computational methods", publisher = "Penguin Books", year = 1960 } @INPROCEEDINGS{1959-rocket_exploration, author = "Rocket Scientist", title = "Exploration of the Location-Singleton Split", booktitle = "33th international conference of important stuff (ICIS)", year = 1959 } @manual{man_loc_splits, title = "Introduction to Location Splits" } @mastersthesis{doe_mastersth, author = "John Doe" title = "Evaluating location splits under identity constraints", school = "School of Computer Science", year = 1955 } @misc{doe_mastersth_data, author = "John Doe" title = "Dataset of location splits under identity constraints", howpublished = "http://johndoe.edu/masterthesis/data", year = 1955 } @phdthesis{doe_phd, author = "John Doe" title = "Evaluating location splits under diverse constraints", school = "School of Computer Science", year = 1958 } @proceedings{1960_conf_splits, title = "First international conference of splits", year = 1960 } @string{john_doe = "Prof. Dr. John Doe"} @techreport{1961_splits , author = "Rocket Scientist" , title = "An introduction to advanced splits" , institution = "School of Engineering" , year = 1961 } @unpublished{xx_thoughts, author = "John Doe and Rocket Scientist", title = "Thoughts on the future of splits", note = "Heavily thought about" } @Comment Taken from https://ja.wikipedia.org/wiki/BibTeX @Book{hicks:2001, author = "von Hicks, III, Michael", title = "Design of a Carbon Fiber Composite Grid Structure for the GLAST Spacecraft Using a Novel Manufacturing Technique", publisher = "Stanford Press", year = 2001, address = "Palo Alto", edition = "1st,", isbn = "0-69-697269-4" } @Comment Taken fron https://ja.overleaf.com/learn/latex/Bibliography_management_with_biblatex @online{knuthwebsite, author = "Donald Knuth", title = "Knuth: Computers and Typesetting", url = "http://www-cs-faculty.stanford.edu/~uno/abcde.html", keywords = "latex,knuth" } @Comment Taken from https://github.com/universal-ctags/ctags/issues/3802#issuecomment-1723511773 @Comment submitted by @andregpss (André Silva) @Article{10.1145/605432.605407, author = {Levis, Philip and Culler, David}, title = {Mat'{e}: A Tiny Virtual Machine for Sensor Networks}, year = {2002} } ================================================ FILE: Units/parser-c.r/anonymous-param-in-broken-paramlist.d/README ================================================ This is a test case for detecting memory leaking. ================================================ FILE: Units/parser-c.r/anonymous-param-in-broken-paramlist.d/args.ctags ================================================ --kinds-C=+z --extras=+{anonymous} ================================================ FILE: Units/parser-c.r/anonymous-param-in-broken-paramlist.d/input-0.c ================================================ /* https://gitlab.gnome.org/GNOME/glib/-/blob/main/gio/gdummyproxyresolver.c */ G_DEFINE_TYPE_WITH_CODE (GDummyProxyResolver, g_dummy_proxy_resolver, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE (G_TYPE_PROXY_RESOLVER, g_dummy_proxy_resolver_iface_init) _g_io_modules_ensure_extension_points_registered (); g_io_extension_point_implement (G_PROXY_RESOLVER_EXTENSION_POINT_NAME, g_define_type_id, "dummy", -100)) static void g_dummy_proxy_resolver_finalize (GObject *object) { /* must chain up */ G_OBJECT_CLASS (g_dummy_proxy_resolver_parent_class)->finalize (object); } ================================================ FILE: Units/parser-c.r/anonymous-param-in-broken-paramlist.d/input-1.c ================================================ G (f () g ()) h (void) { ================================================ FILE: Units/parser-c.r/anonymous-param-in-broken-paramlist.d/input.c ================================================ f(a,){ ================================================ FILE: Units/parser-c.r/attr-attached-to-array-failed.b/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-c.r/attr-attached-to-array-failed.b/expected.tags ================================================ registered_fb3 input.c /^struct fb_info *registered_fb3[FB_MAX] __read_mostly X Y();$/;" v typeref:struct:fb_info * [FB_MAX]__read_mostly X Y() registered_fb7 input.c /^struct fb_info *registered_fb7[FB_MAX] __read_mostly X("a");$/;" v typeref:struct:fb_info * [FB_MAX]__read_mostly X ("a") registered_fb8 input.c /^struct fb_info *registered_fb8[FB_MAX] __read_mostly X("a") C;$/;" v typeref:struct:fb_info * [FB_MAX]__read_mostly X ("a") C ================================================ FILE: Units/parser-c.r/attr-attached-to-array-failed.b/input.c ================================================ struct fb_info *registered_fb3[FB_MAX] __read_mostly X Y(); struct fb_info *registered_fb7[FB_MAX] __read_mostly X("a"); struct fb_info *registered_fb8[FB_MAX] __read_mostly X("a") C; ================================================ FILE: Units/parser-c.r/attr-attached-to-array.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-c.r/attr-attached-to-array.d/expected.tags ================================================ registered_fb1 input.c /^struct fb_info *registered_fb1[FB_MAX] __read_mostly;$/;" v typeref:struct:fb_info * [FB_MAX]__read_mostly registered_fb2 input.c /^struct fb_info *registered_fb2[FB_MAX] __read_mostly X;$/;" v typeref:struct:fb_info * [FB_MAX]__read_mostly X registered_fb4 input.c /^struct fb_info *registered_fb4[FB_MAX] __read_mostly X Y(1, 2);$/;" v typeref:struct:fb_info * [FB_MAX]__read_mostly X Y (1,2) registered_fb5 input.c /^struct fb_info *registered_fb5[FB_MAX] __read_mostly X Y(1, 2), fb6[3] _Z_;$/;" v typeref:struct:fb_info * [FB_MAX]__read_mostly X Y (1,2) fb6 input.c /^struct fb_info *registered_fb5[FB_MAX] __read_mostly X Y(1, 2), fb6[3] _Z_;$/;" v typeref:struct:fb_info[3]_Z_ ================================================ FILE: Units/parser-c.r/attr-attached-to-array.d/input.c ================================================ struct fb_info *registered_fb1[FB_MAX] __read_mostly; struct fb_info *registered_fb2[FB_MAX] __read_mostly X; struct fb_info *registered_fb4[FB_MAX] __read_mostly X Y(1, 2); struct fb_info *registered_fb5[FB_MAX] __read_mostly X Y(1, 2), fb6[3] _Z_; ================================================ FILE: Units/parser-c.r/backslash-in-input.c.d/expected.tags ================================================ main input.c /^int main \\$/;" f typeref:typename:int ================================================ FILE: Units/parser-c.r/backslash-in-input.c.d/input.c ================================================ int main \ () { } ================================================ FILE: Units/parser-c.r/bit_field.c.d/args.ctags ================================================ --sort=no --fields-all=+{end} ================================================ FILE: Units/parser-c.r/bit_field.c.d/expected.tags ================================================ bit_fields input.c /^struct bit_fields {$/;" s file: end:5 a input.c /^ unsigned int a: 1;$/;" m struct:bit_fields typeref:typename:unsigned int:1 file: end:2 b input.c /^ unsigned int b: 1;$/;" m struct:bit_fields typeref:typename:unsigned int:1 file: end:3 c input.c /^ unsigned int c: 2;$/;" m struct:bit_fields typeref:typename:unsigned int:2 file: end:4 __anon1719c4a50108 input.c /^struct {$/;" s file: end:12 sign input.c /^ unsigned sign : 1;$/;" m struct:__anon1719c4a50108 typeref:typename:unsigned:1 file: end:8 exp input.c /^ unsigned exp : _FP_EXPBITS_D;$/;" m struct:__anon1719c4a50108 typeref:typename:unsigned file: end:9 frac1 input.c /^ unsigned frac1 : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0) - _FP_W_TYPE_SIZE;$/;" m struct:__anon1719c4a50108 typeref:typename:unsigned file: end:10 frac0 input.c /^ unsigned frac0 : _FP_W_TYPE_SIZE;$/;" m struct:__anon1719c4a50108 typeref:typename:unsigned file: end:11 shortname_info input.c /^struct shortname_info {$/;" s file: end:18 lower input.c /^ unsigned char lower:1,$/;" m struct:shortname_info typeref:typename:unsigned char:1 file: end:15 upper input.c /^ upper:1,$/;" m struct:shortname_info typeref:typename:unsigned char:1 file: end:16 valid input.c /^ valid:1;$/;" m struct:shortname_info typeref:typename:unsigned char:1 file: end:17 __anon1719c4a50208 input.c /^{$/;" s file: end:27 public input.c /^ BYTE public: 1;$/;" m struct:__anon1719c4a50208 typeref:typename:BYTE:1 file: end:23 bad2 input.c /^ BYTE bad2: 1;$/;" m struct:__anon1719c4a50208 typeref:typename:BYTE:1 file: end:24 group input.c /^ BYTE group: 1;$/;" m struct:__anon1719c4a50208 typeref:typename:BYTE:1 file: end:25 personal input.c /^ BYTE personal: 1;$/;" m struct:__anon1719c4a50208 typeref:typename:BYTE:1 file: end:26 bitfield_flags input.c /^} bitfield_flags;$/;" t typeref:struct:__anon1719c4a50208 file: __anon1719c4a50308 input.c /^{$/;" s file: end:35 this input.c /^ BYTE this;$/;" m struct:__anon1719c4a50308 typeref:typename:BYTE file: end:31 public input.c /^ BYTE public;$/;" m struct:__anon1719c4a50308 typeref:typename:BYTE file: end:32 private input.c /^ BYTE private;$/;" m struct:__anon1719c4a50308 typeref:typename:BYTE file: end:33 that input.c /^ BYTE that;$/;" m struct:__anon1719c4a50308 typeref:typename:BYTE file: end:34 mystruct input.c /^} mystruct;$/;" t typeref:struct:__anon1719c4a50308 file: ================================================ FILE: Units/parser-c.r/bit_field.c.d/input.c ================================================ struct bit_fields { unsigned int a: 1; unsigned int b: 1; unsigned int c: 2; }; struct { unsigned sign : 1; unsigned exp : _FP_EXPBITS_D; unsigned frac1 : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0) - _FP_W_TYPE_SIZE; unsigned frac0 : _FP_W_TYPE_SIZE; }; struct shortname_info { unsigned char lower:1, upper:1, valid:1; }; // Problem reported by Michael Brown on 23 October 2001. typedef struct { BYTE public: 1; BYTE bad2: 1; BYTE group: 1; BYTE personal: 1; } bitfield_flags; typedef struct { BYTE this; BYTE public; BYTE private; BYTE that; } mystruct; ================================================ FILE: Units/parser-c.r/broken-input-cxx-operator.d/input.c ================================================ struct a::b{ ================================================ FILE: Units/parser-c.r/bug1020715.c.d/args.ctags ================================================ --fields=+S --excmd=number --kinds-C=+l ================================================ FILE: Units/parser-c.r/bug1020715.c.d/expected.tags ================================================ f input.c 43;" f typeref:typename:void signature:() ================================================ FILE: Units/parser-c.r/bug1020715.c.d/input.c ================================================ /* Bugs item #1020715, was opened at 2004-09-01 22:42 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106556&aid=1020715&group_id=6556 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Arne Georg Gleditsch (argggh) Assigned to: Nobody/Anonymous (nobody) Summary: Strange parsing of C code Initial Comment: Running ctags 5.5.4 like this /usr/local/bin/ctags --fields=+S --excmd=number -f - --c-types=+l /usr/src/source/2.6.6/drivers/scsi/aha152x.c | grep ^done returns a bogus entry for the function "done" on line 1745 with a wacky signature. The file aha152x.c is from Linux 2.6.6, but is appended for convenience. */ /* Date: 2007-08-14 01:00 Sender: elliotth Hide i don't really understand why the other lines in the test case were necessary to exercise the bug, but changing parseParens to call processAngleBracket instead of just skipToMatch("<>") fixes this bug. i've committed that since it causes no regressions. Date: 2007-08-14 00:34 Sender: elliotth Hide i've come up with a minimal test case, and committed it. it's pretty weird: */ void f() { done(a<<1); a->a; if (a->a) { } } /* change just about anything and the bizarre "done" tag goes away. you can't even switch from '->' to '.', which seems odd. */ ================================================ FILE: Units/parser-c.r/bug1085585.c.d/args.ctags ================================================ --kinds-c=+p ================================================ FILE: Units/parser-c.r/bug1085585.c.d/expected.tags ================================================ check_parity input.c /^static int check_parity(des_cblock (*key));$/;" p typeref:typename:int file: des_check_key input.c /^int des_check_key=0;$/;" v typeref:typename:int ================================================ FILE: Units/parser-c.r/bug1085585.c.d/input.c ================================================ /* Bugs item #1085585, was opened at 2004-12-14 20:55 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106556&aid=1085585&group_id=6556 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: boisterous (yadavnav) Assigned to: Nobody/Anonymous (nobody) Summary: ctags 5.5.4 doesn't work correctly on some files Initial Comment: Hi, I ran exuberant ctags on the following file FreeBSD kernel : src/sys/crypto/des/des_setkey.c If I run the 5.5.4 ctags on version 1.3 of the above file then it doesn't produce all the tags The version 1.3 is at: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/crypto/des/des_setkey.c?rev=1.3&content-type=text/x-cvsweb-markup [...] Why does ctags fail on the 1.3 version of the file ? */ /* relevant portion from file */ static int check_parity(des_cblock (*key)); int des_check_key=0; ================================================ FILE: Units/parser-c.r/bug1086609.c.d/expected.tags ================================================ func2 input.c /^int func2(int a)$/;" f typeref:typename:int ================================================ FILE: Units/parser-c.r/bug1086609.c.d/input.c ================================================ /* Bugs item #1086609, was opened at 2004-12-16 13:07 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106556&aid=1086609&group_id=6556 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Mikhail Kruk (meshko) Assigned to: Nobody/Anonymous (nobody) Summary: ctags getting confused by #if 0 Initial Comment: Here is a sample C program which confuses ctags. I think every line in it is significant. Dropping any of the #ifdefs or the #define makes the problem go away: */ #if 0 #define __PROC__ int func1( #if 0 #endif ) { } #endif int func2(int a) { } /* Somehow the opening brace from line 3 doesn't get ignored and the closing brace does get ignored and ctags drops out on "int func2(int a)" line with "failed to find match for '(' at line 11" error. Granted, having #if 0 in the middle of args list is weird, but perfeclty legal. */ ================================================ FILE: Units/parser-c.r/bug1198.c.d/args.ctags ================================================ --kinds-c=fpvx --fields=+tS ================================================ FILE: Units/parser-c.r/bug1198.c.d/expected.tags ================================================ XESetCopyEventCookie input.c /^extern Bool (*XESetCopyEventCookie($/;" p typeref:typename:Bool (*)(Display *,XGenericEventCookie *,XGenericEventCookie *) file: signature:(Display *,int,Bool (*)(Display *,XGenericEventCookie *,XGenericEventCookie *)) f input.c /^int (* f (char c)) (void * a)$/;" f typeref:typename:int (*)(void * a) signature:(char c) f input.c /^int (* f (char c)) (void * a);$/;" p typeref:typename:int (*)(void * a) file: signature:(char c) g input.c /^static int g (void *a)$/;" f typeref:typename:int file: signature:(void * a) ================================================ FILE: Units/parser-c.r/bug1198.c.d/input.c ================================================ /* Bug 1198@github reported by lvc on 26/11/2016. The latest universal ctags 015eae7 doesn't detect function XESetCopyEventCookie from libX11-1.3 library (include/X11/Xlibint.h): */ extern Bool (*XESetCopyEventCookie( Display* /* display */, int /* extension */, Bool (*) ( Display* /* display */, XGenericEventCookie* /* in */, XGenericEventCookie* /* out */ ) /* proc */ ))( Display*, XGenericEventCookie*, XGenericEventCookie* ); /* also adding simplified output found by masatake */ int (* f (char c)) (void * a); static int g (void *a) { return 1; } int (* f (char c)) (void * a) { return g; } ================================================ FILE: Units/parser-c.r/bug1201689.c.d/expected.tags ================================================ test input.c /^void test(a, ...)$/;" f ================================================ FILE: Units/parser-c.r/bug1201689.c.d/input.c ================================================ /* Bugs item #1201689, was opened at 2005-05-13 18:18 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106556&aid=1201689&group_id=6556 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Scott Ferguson (shf301) Assigned to: Nobody/Anonymous (nobody) Summary: Variable Length Argument Lists in K&R Style not Parsed Initial Comment: A function with a K&R style parameter list that has a variable length argument list will not be added to the tags file. For example create a file, say test.c with the following code */ void test(a, ...) char a; { return; } /* Run ctags test.c. the tags file with only contain the line: a test.c /^char a;$/;" v This occurs with ctags 5.3 and 5.5.4. Variable length argument lists work fine if the function is in ANSI style, void test(char a, ...) will work fine. */ ================================================ FILE: Units/parser-c.r/bug1458930.c.d/args.ctags ================================================ --kinds-c=+p ================================================ FILE: Units/parser-c.r/bug1458930.c.d/expected.tags ================================================ x input.c /^char x();$/;" p typeref:typename:char file: y input.c /^wchar_t y();$/;" p typeref:typename:wchar_t file: ================================================ FILE: Units/parser-c.r/bug1458930.c.d/input.c ================================================ // test with --kinds-c=+p char x(); wchar_t y(); ================================================ FILE: Units/parser-c.r/bug1466117.c.d/expected.tags ================================================ __anonadd2b98b0108 input.c /^typedef struct {$/;" s file: a input.c /^ int a;$/;" m struct:__anonadd2b98b0108 typeref:typename:int file: a input.c /^ int a;$/;" m struct:mystruct typeref:typename:int file: b input.c /^ int b;$/;" m struct:__anonadd2b98b0108 typeref:typename:int file: b input.c /^ int b;$/;" m struct:mystruct typeref:typename:int file: mystruct input.c /^typedef struct mystruct {$/;" s file: mystruct input.c /^} mystruct;$/;" t typeref:struct:__anonadd2b98b0108 file: ================================================ FILE: Units/parser-c.r/bug1466117.c.d/input.c ================================================ typedef struct mystruct { int a; int b; }; typedef struct { int a; int b; } mystruct; ================================================ FILE: Units/parser-c.r/bug1491666.c.d/args.ctags ================================================ --kinds-c=+l ================================================ FILE: Units/parser-c.r/bug1491666.c.d/expected.tags ================================================ __anon329ddd920108 input.c /^typedef struct {$/;" s file: main input.c /^void main (void) {$/;" f typeref:typename:void my_struct input.c /^} my_struct;$/;" t typeref:struct:__anon329ddd920108 file: var1 input.c /^ my_struct var1;$/;" l function:main typeref:typename:my_struct file: var2 input.c /^ var2;$/;" l function:main typeref:typename:my_struct file: x input.c /^ x;$/;" m struct:__anon329ddd920108 typeref:typename:int file: y input.c /^ y;$/;" m struct:__anon329ddd920108 typeref:typename:float file: ================================================ FILE: Units/parser-c.r/bug1491666.c.d/input.c ================================================ typedef struct { int x; float y; } my_struct; void main (void) { my_struct var1; my_struct var2; } ================================================ FILE: Units/parser-c.r/bug1764143.h.d/expected.tags ================================================ arch_reset input.h /^static inline void arch_reset(char mode)$/;" f typeref:typename:void omap1_arch_reset input.h /^static inline void omap1_arch_reset(char mode)$/;" f typeref:typename:void ================================================ FILE: Units/parser-c.r/bug1764143.h.d/input.h ================================================ static inline void omap1_arch_reset(char mode) { /* * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 * "Global Software Reset Affects Traffic Controller Frequency". */ if (cpu_is_omap5912()) { omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4), DPLL_CTL); omap_writew(0x8, ARM_RSTCT1); } if (machine_is_voiceblue()) voiceblue_reset(); else omap_writew(1, ARM_RSTCT1); } static inline void arch_reset(char mode) { if (!cpu_is_omap24xx()) omap1_arch_reset(mode); else omap_prcm_arch_reset(mode); } #endif ================================================ FILE: Units/parser-c.r/bug2554.c.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-c.r/bug2554.c.d/expected.tags ================================================ __anonbbb2b4710108 input.c /^{$/;" s file: n input.c /^ int*n;$/;" m struct:__anonbbb2b4710108 typeref:typename:int * file: S input.c /^} S;$/;" t typeref:struct:__anonbbb2b4710108 file: foo input.c /^struct foo {$/;" s file: bar input.c /^ int bar;$/;" m struct:foo typeref:typename:int file: v input.c /^} v = {$/;" v typeref:struct:foo w input.c /^struct foo w = {$/;" v typeref:struct:foo ================================================ FILE: Units/parser-c.r/bug2554.c.d/input.c ================================================ /* valgrind reported an error when ctags built with * --enable-debugging configure option. * * To reproduce: * * $ make units LANGUAGES=C VG=1 * */ typedef struct { int*n; } S; struct foo { int bar; } v = { .bar = 1, }; struct foo w = { .bar = 2, }; ================================================ FILE: Units/parser-c.r/bug507864.c.d/README ================================================ This one is prepared as part of a bug report, sf-bugs:22, http://sourceforge.net/p/ctags/bugs/22/. Darren Hiebert closed the bug with "closed-wont-fix" status with following comment: The use of a macro call in an argument list, as shown in bad_code.c is too problematic to derive a good solution for. Such bizarre used of macros are rare and not worth the risk of breaking more common situations. So I(Masatake YAMATO), don't touch this case and put it here. ================================================ FILE: Units/parser-c.r/bug507864.c.d/expected.tags ================================================ func1 input.c /^FUNCSTS func1(ENTSEQNO(seq)) {}$/;" f typeref:typename:FUNCSTS func2 input.c /^FUNCSTS func2 (MEMTXT(form_msg), MEMTXT (text), MEMTXT (mail)) {}$/;" f typeref:typename:FUNCSTS ================================================ FILE: Units/parser-c.r/bug507864.c.d/input.c ================================================ FUNCSTS func1(ENTSEQNO(seq)) {} FUNCSTS func2 (MEMTXT(form_msg), MEMTXT (text), MEMTXT (mail)) {} ================================================ FILE: Units/parser-c.r/bug556645.c.d/README ================================================ This one is prepared as part of a bug report, sf-bugs:33, http://sourceforge.net/p/ctags/bugs/33/. Darren Hiebert closed the bug with "closed-wont-fix" status with following comment: This cannot be handled without preprocessing. Ctags does not do preprocessing for a number of reasons, and so will never handle such a situation. You can do the preprocessing yourself and run ctags on the output with the --line-directives option. So I(Masatake YAMATO), don't touch this case and put it here. -------------------------------------------------------------------- Surprisingly, new C/Cxx parser can capture Qtype well. ================================================ FILE: Units/parser-c.r/bug556645.c.d/expected.tags ================================================ A1 input.c /^#define A1(/;" d file: Qtype input.c /^typedef A1(ilm_struct, 1) Qtype;$/;" t file: ================================================ FILE: Units/parser-c.r/bug556645.c.d/input.c ================================================ /* From noreply@sourceforge.net Wed May 29 23:11:25 2002 Date: Wed, 15 May 2002 23:25:52 -0700 From: noreply@sourceforge.net To: noreply@sourceforge.net Subject: [ ctags-Bugs-556645 ] Some typedef can not be tagged in C code Bugs item #556645, was opened at 2002-05-16 14:25 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106556&aid=556645&group_id=6556 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Howard Wu (howardhbwu) Assigned to: Nobody/Anonymous (nobody) Summary: Some typedef can not be tagged in C code Initial Comment: My Ctags version:5.2.3 The typedef of "Qtype" as the following, */ #define A1(_type, _length) \ struct { \ unsigned int head; \ unsigned int tail; \ bool is_full; \ _type queue[_length]; \ } typedef A1(ilm_struct, 1) Qtype; /* As using ctags, the "Qtype" can not be tagged by it. */ ================================================ FILE: Units/parser-c.r/bug556646.c.d/expected.tags ================================================ A input.c /^ A = INDX_T2$/;" e enum:__anone0aee1a10103 file: INDX_C1 input.c /^ INDX_C1,$/;" e enum:__anone0aee1a10103 file: INDX_C2 input.c /^ INDX_C2,$/;" e enum:__anone0aee1a10103 file: INDX_IM1 input.c /^ INDX_IM1,$/;" e enum:__anone0aee1a10103 file: INDX_IM2 input.c /^ INDX_IM2,$/;" e enum:__anone0aee1a10103 file: INDX_L input.c /^ INDX_L,$/;" e enum:__anone0aee1a10103 file: INDX_L2 input.c /^ INDX_L2,$/;" e enum:__anone0aee1a10103 file: INDX_M input.c /^ INDX_M,$/;" e enum:__anone0aee1a10103 file: INDX_NIL input.c /^ INDX_NIL = 0x00,$/;" e enum:__anone0aee1a10103 file: INDX_P input.c /^ INDX_P,$/;" e enum:__anone0aee1a10103 file: INDX_R input.c /^ INDX_R,$/;" e enum:__anone0aee1a10103 file: INDX_R2 input.c /^ INDX_R2,$/;" e enum:__anone0aee1a10103 file: INDX_S input.c /^ INDX_S,$/;" e enum:__anone0aee1a10103 file: INDX_S1 input.c /^ INDX_S1,$/;" e enum:__anone0aee1a10103 file: INDX_S2 input.c /^ INDX_S2,$/;" e enum:__anone0aee1a10103 file: INDX_S3 input.c /^ INDX_S3,$/;" e enum:__anone0aee1a10103 file: INDX_S4 input.c /^ INDX_S4,$/;" e enum:__anone0aee1a10103 file: INDX_T input.c /^ INDX_T,$/;" e enum:__anone0aee1a10103 file: INDX_T2 input.c /^ INDX_T2,$/;" e enum:__anone0aee1a10103 file: __anone0aee1a10103 input.c /^typedef enum{$/;" g file: task_indx_type input.c /^} task_indx_type;$/;" t typeref:enum:__anone0aee1a10103 file: ================================================ FILE: Units/parser-c.r/bug556646.c.d/input.c ================================================ /* Bugs item #556646, was opened at 2002-05-16 14:36 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106556&aid=556646&group_id=6556 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Howard Wu (howardhbwu) Assigned to: Nobody/Anonymous (nobody) Summary: Some typedef can not be tagged in C code Initial Comment: My Ctags version: 5.2.3 */ typedef enum{ INDX_NIL = 0x00, INDX_P, INDX_S, INDX_M, INDX_S1, INDX_S2, INDX_S3, INDX_C1, INDX_C2, INDX_S4, INDX_T, INDX_L, INDX_R, INDX_R2, INDX_IM1, INDX_IM2, INDX_L2, INDX_T2, A = INDX_T2 } task_indx_type; /* "task_indx_type" can not be tagged with Ctags */ ================================================ FILE: Units/parser-c.r/bug945.c.d/args.ctags ================================================ -I __read_mostly ================================================ FILE: Units/parser-c.r/bug945.c.d/expected.tags ================================================ edsa_packet_type input.c /^struct packet_type edsa_packet_type __read_mostly = {$/;" v typeref:struct:packet_type ================================================ FILE: Units/parser-c.r/bug945.c.d/input.c ================================================ /* Bug 945@github reported by masatake on 21/05/2016. The code below was treated as a struct declaration instead of variable declaration. */ /* Taken from linux-3.10.0-229.fc21.x86_64/net/dsa/tag_edsa.c */ struct packet_type edsa_packet_type __read_mostly = { .type = cpu_to_be16(ETH_P_EDSA), .func = edsa_rcv, }; ================================================ FILE: Units/parser-c.r/bug950.c.d/args.ctags ================================================ --kinds-c=p --fields=+tS ================================================ FILE: Units/parser-c.r/bug950.c.d/expected.tags ================================================ IdentifyImageMonochrome input.c /^ IdentifyImageMonochrome(const Image *,ExceptionInfo *),$/;" p typeref:typename:MagickExport MagickBooleanType file: signature:(const Image *,ExceptionInfo *) IsGrayImage input.c /^ IsGrayImage(const Image *,ExceptionInfo *),$/;" p typeref:typename:MagickExport MagickBooleanType file: signature:(const Image *,ExceptionInfo *) IsMonochromeImage input.c /^ IsMonochromeImage(const Image *,ExceptionInfo *),$/;" p typeref:typename:MagickExport MagickBooleanType file: signature:(const Image *,ExceptionInfo *) IsOpaqueImage input.c /^ IsOpaqueImage(const Image *,ExceptionInfo *),$/;" p typeref:typename:MagickExport MagickBooleanType file: signature:(const Image *,ExceptionInfo *) SetImageChannelDepth input.c /^ SetImageChannelDepth(Image *,const ChannelType,const size_t),$/;" p typeref:typename:MagickExport MagickBooleanType file: signature:(Image *,const ChannelType,const size_t) SetImageDepth input.c /^ SetImageDepth(Image *,const size_t),$/;" p typeref:typename:MagickExport MagickBooleanType file: signature:(Image *,const size_t) SetImageType input.c /^ SetImageType(Image *,const ImageType);$/;" p typeref:typename:MagickExport MagickBooleanType file: signature:(Image *,const ImageType) ================================================ FILE: Units/parser-c.r/bug950.c.d/input.c ================================================ /* Bug 931@github reported by lvc on 24/05/2016. The latest version (9320ecf) of the universal ctags failed to recognize SetImageChannelDepth symbol in the ImageMagick library header file (include/ImageMagick-6/magick/attribute.h, v6.9.4-4): In fact only the last function prototype was extracted and everything else was treated as a giant return type. */ extern MagickExport MagickBooleanType IdentifyImageMonochrome(const Image *,ExceptionInfo *), IsGrayImage(const Image *,ExceptionInfo *), IsMonochromeImage(const Image *,ExceptionInfo *), IsOpaqueImage(const Image *,ExceptionInfo *), SetImageChannelDepth(Image *,const ChannelType,const size_t), SetImageDepth(Image *,const size_t), SetImageType(Image *,const ImageType); ================================================ FILE: Units/parser-c.r/c-define-mixed.d/args.ctags ================================================ --excmd=mixed --fields=+n ================================================ FILE: Units/parser-c.r/c-define-mixed.d/expected.tags ================================================ X input.c /^#define X /;" d line:1 file: Y input.c /^#define Y(/;" d line:6 file: ================================================ FILE: Units/parser-c.r/c-define-mixed.d/input.c ================================================ #define X 1 /* 2 */ /* 3 */ /* 4 */ /* 5 */ #define Y(v) (6 + v) /* 7 */ ================================================ FILE: Units/parser-c.r/c-digraphs.d/expected.tags ================================================ A input.c /^%:define A /;" d file: B input.c /^%:define B /;" d file: M3_INIT input.c /^%:define M3_INIT(/;" d file: STRINGIFY input.c /^%:define STRINGIFY(x) STRINGIFY_/;" d file: STRINGIFY_INTERN input.c /^%:define STRINGIFY_INTERN(/;" d file: buf input.c /^ char *buf;$/;" m struct:str typeref:typename:char * file: len input.c /^ unsigned int len, size;$/;" m struct:str typeref:typename:unsigned int file: main input.c /^int main(void)$/;" f typeref:typename:int matrix3 input.c /^typedef int matrix3<:3:>;$/;" t typeref:typename:int[3] file: size input.c /^ unsigned int len, size;$/;" m struct:str typeref:typename:unsigned int file: str input.c /^struct str <%$/;" s file: ================================================ FILE: Units/parser-c.r/c-digraphs.d/input.c ================================================ /* simple trigraphs */ %:define A 1 %:define B 2 %:define STRINGIFY_INTERN(x) %:x %:define STRINGIFY(x) STRINGIFY_INTERN(x) %:define M3_INIT(a, b, c) <% a, b, c %> typedef int matrix3<:3:>; struct str <% char *buf; unsigned int len, size; %>; int main(void) <% const char *hello = STRINGIFY(hello); matrix3 m = M3_INIT(1, 2, 3); return m<:2:>; %> %:if 0 #define bug4 %:endif /* test the same with untaken preprocessor paths (as they are then not read by * the C parser but get.c) */ #if 0 %:define if0d_A 1 %:define if0d_B 2 #endif ================================================ FILE: Units/parser-c.r/c-include.d/args.ctags ================================================ --kinds-c=+h --fields=+r --extras=+r ================================================ FILE: Units/parser-c.r/c-include.d/expected.tags ================================================ ../e.h input.c /^#include <..\/e.h>/;" h roles:system ../f.h input.c /^#include "..\/f.h"/;" h roles:local D input.c /^#define D /;" d file: roles:def a.h input.c /^#include /;" h roles:system b.h input.c /^#include "b.h"/;" h roles:local g.h input.c /^#include/;" h roles:system h.h input.c /^#include"h.h"/;" h roles:local i.h input.c /^#include /;" h roles:system j.h input.c /^#include "j.h"/;" h roles:local stdio.h input.c /^ # include /;" h roles:system sys/c.h input.c /^#include /;" h roles:system sys/d.h input.c /^#include "sys\/d.h"/;" h roles:local ================================================ FILE: Units/parser-c.r/c-include.d/input.c ================================================ #include #include "b.h" #include #include "sys/d.h" /* this is actually a syntax error */ " #include #include \"L.h\" " #include <../e.h> #include "../f.h" int M(void) { return 0; } #define D 1 #include #include"h.h" #include #include "j.h" # include /* objc constant String */ @"#include" ================================================ FILE: Units/parser-c.r/c-keyword-alignas.d/args.ctags ================================================ --sort=no --kinds-C=+l ================================================ FILE: Units/parser-c.r/c-keyword-alignas.d/expected.tags ================================================ sse_t input.c /^struct sse_t$/;" s file: sse_data input.c /^ alignas(16) float sse_data[4];$/;" m struct:sse_t typeref:typename:float[4] file: sse_data_ input.c /^ _Alignas(16) float sse_data_[4];$/;" m struct:sse_t typeref:typename:float[4] file: data input.c /^struct data$/;" s file: x input.c /^ char x;$/;" m struct:data typeref:typename:char file: cacheline input.c /^ alignas(128) char cacheline[128]; \/\/ over-aligned array of char,$/;" m struct:data typeref:typename:char[128] file: cacheline_ input.c /^ _Alignas(128) char cacheline_[128];$/;" m struct:data typeref:typename:char[128] file: main input.c /^int main(void)$/;" f typeref:typename:int d input.c /^ alignas(2048) struct data d; \/\/ this instance of data is aligned even stricter$/;" l function:main typeref:struct:data file: d_ input.c /^ _Alignas(2048) struct data d_;$/;" l function:main typeref:struct:data file: ================================================ FILE: Units/parser-c.r/c-keyword-alignas.d/input.c ================================================ /* Taken from https://en.cppreference.com/w/c/language/_Alignas */ #include #include // every object of type struct sse_t will be aligned to 16-byte boundary // (note: needs support for DR 444) struct sse_t { alignas(16) float sse_data[4]; _Alignas(16) float sse_data_[4]; }; // every object of type struct data will be aligned to 128-byte boundary struct data { char x; alignas(128) char cacheline[128]; // over-aligned array of char, // not array of over-aligned chars _Alignas(128) char cacheline_[128]; }; int main(void) { printf("sizeof(data) = %zu (1 byte + 127 bytes padding + 128-byte array)\n", sizeof(struct data)); printf("alignment of sse_t is %zu\n", alignof(struct sse_t)); alignas(2048) struct data d; // this instance of data is aligned even stricter _Alignas(2048) struct data d_; (void)d; // suppresses "maybe unused" warning } ================================================ FILE: Units/parser-c.r/c-knr.d/args.ctags ================================================ --kinds-c=fz ================================================ FILE: Units/parser-c.r/c-knr.d/expected.tags ================================================ f01 input.c /^int f01()$/;" f typeref:typename:int f02 input.c /^int f02(f02a01,f02a02)$/;" f f02a01 input.c /^ int f02a01;$/;" z function:f02 typeref:typename:int file: f02a02 input.c /^ int f02a02;$/;" z function:f02 typeref:typename:int file: f03 input.c /^int f03(void)$/;" f typeref:typename:int f04 input.c /^int f04(...)$/;" f typeref:typename:int f05 input.c /^int f05($/;" f f05a01 input.c /^ unsigned short f05a01;$/;" z function:f05 typeref:typename:unsigned short file: f05a02 input.c /^ int * f05a02;$/;" z function:f05 typeref:typename:int * file: f06 input.c /^int f06(f06a01,f06a02)$/;" f f06a01 input.c /^ unsigned short int f06a01, ** f06a02;$/;" z function:f06 typeref:typename:unsigned short int file: f06a02 input.c /^ unsigned short int f06a01, ** f06a02;$/;" z function:f06 typeref:typename:unsigned short int ** file: ================================================ FILE: Units/parser-c.r/c-knr.d/input.c ================================================ int f01() { return 0; } int f02(f02a01,f02a02) int f02a01; int f02a02; { return f02a01 + f02a02; } int f03(void) { return 0; } int f04(...) { return 0; } int f05( f05a01, f05a02, ... ) unsigned short f05a01; int * f05a02; { return 0; } int f06(f06a01,f06a02) unsigned short int f06a01, ** f06a02; { return 0; } ================================================ FILE: Units/parser-c.r/c-label.d/args.ctags ================================================ --kinds-c=+L ================================================ FILE: Units/parser-c.r/c-label.d/expected.tags ================================================ main input.c /^main(int argc)$/;" f typeref:typename:int out input.c /^ out:$/;" L function:main file: ================================================ FILE: Units/parser-c.r/c-label.d/input.c ================================================ int main(int argc) { goto out; switch (argc) { case 1: break; case A|B: break; default: break; } out: return 0; } ================================================ FILE: Units/parser-c.r/c-multichars-between-single-quotes.d/expected.tags ================================================ c input.c /^char c[]={'o.'};$/;" v typeref:typename:char[] ================================================ FILE: Units/parser-c.r/c-multichars-between-single-quotes.d/input.c ================================================ char c[]={'o.'}; ================================================ FILE: Units/parser-c.r/c-sample.d/expected.tags ================================================ main input.c /^main(void)$/;" f typeref:typename:int ================================================ FILE: Units/parser-c.r/c-sample.d/input.c ================================================ int main(void) { return 0; } ================================================ FILE: Units/parser-c.r/c-size_t-wchar_t-typedef.d/expected.tags ================================================ size_t input.c /^typedef int size_t;$/;" t typeref:typename:int file: wchar_t input.c /^typedef int wchar_t;$/;" t typeref:typename:int file: ================================================ FILE: Units/parser-c.r/c-size_t-wchar_t-typedef.d/input.c ================================================ typedef int size_t; typedef int wchar_t; ================================================ FILE: Units/parser-c.r/c-struct-var-with-initializer.d/args.ctags ================================================ --sort=no --kinds-c=+lz --fields=+K ================================================ FILE: Units/parser-c.r/c-struct-var-with-initializer.d/expected.tags ================================================ __anon61565e570108 input.c /^struct {$/;" struct file: a input.c /^ int a;$/;" member struct:__anon61565e570108 typeref:typename:int file: b input.c /^} b = { 1 };$/;" variable typeref:struct:__anon61565e570108 c input.c /^int c;$/;" variable typeref:typename:int d input.c /^int d(int e) {$/;" function typeref:typename:int e input.c /^int d(int e) {$/;" parameter function:d typeref:typename:int file: __anon61565e570208 input.c /^ struct {$/;" struct function:d file: f input.c /^ int f;$/;" member struct:d::__anon61565e570208 typeref:typename:int file: g input.c /^ } g = { 1 };$/;" local function:d typeref:struct:d::__anon61565e570208 file: h input.c /^ int h;$/;" local function:d typeref:typename:int file: ================================================ FILE: Units/parser-c.r/c-struct-var-with-initializer.d/input.c ================================================ /* Derived from an issue (#1311) opened by BodoStroesser */ struct { int a; } b = { 1 }; int c; int d(int e) { struct { int f; } g = { 1 }; int h; g = (typeof(g)){ 2 }; } ================================================ FILE: Units/parser-c.r/c-trigraphs.d/expected.tags ================================================ A input.c /^??=define A /;" d file: B input.c /^??=define B /;" d file: D input.c /^??=define D /;" d file: E input.c /^??=define E /;" d file: F input.c /^??=define F /;" d file: M3_INIT input.c /^??=define M3_INIT(/;" d file: STRINGIFY input.c /^??=define STRINGIFY(x) STRINGIFY_/;" d file: STRINGIFY_INTERN input.c /^??=define STRINGIFY_INTERN(/;" d file: buf input.c /^ char *buf;$/;" m struct:str typeref:typename:char * file: len input.c /^ unsigned int len, size;$/;" m struct:str typeref:typename:unsigned int file: main input.c /^int main(void)$/;" f typeref:typename:int matrix3 input.c /^typedef int matrix3??(3??);$/;" t typeref:typename:int[3] file: size input.c /^ unsigned int len, size;$/;" m struct:str typeref:typename:unsigned int file: str input.c /^struct str ??<$/;" s file: ================================================ FILE: Units/parser-c.r/c-trigraphs.d/input.c ================================================ /* simple trigraphs */ ??=define A 1 ??=define B 2 ??=define STRINGIFY_INTERN(x) ??=x ??=define STRINGIFY(x) STRINGIFY_INTERN(x) /* doesn't expand to anything that makes sense, but as "???" is not a valid * trigraph it should not prevent "??/" to match */ ??=define D 4 ???/ #define bug1 ??=define E ?????/ #define bug2 /* \ isn't interpreted for trigraphs */ ??=define F ???\??/ extern int bug3 = ??-0; ??=define M3_INIT(a, b, c) ??< a, b, c ??> typedef int matrix3??(3??); struct str ??< char *buf; unsigned int len, size; ??>; int main(void) ??< const char *hello = STRINGIFY(hello); matrix3 m = M3_INIT(1, 2, 3); return m??(2??); ??> /* FIXME: how to test "??'" ("^"), "??!" ("|") and "??-" ("~")? * I can't think of a construct CTags cares about using those */ ??=if 0 #define bug4 ??=endif /* test the same with untaken preprocessor paths (as they are then not read by * the C parser but get.c) */ #if 0 ??=define if0d_A 1 ??=define if0d_B 2 ??=define if0d_C 4 ???/ #define bug5 ??=define I ?????/ #define bug6 ??=define I ??????????/ #define bug7 #endif ================================================ FILE: Units/parser-c.r/c-var-initialized-using-macro.d/args.ctags ================================================ --sort=no --kinds-C=+lp ================================================ FILE: Units/parser-c.r/c-var-initialized-using-macro.d/expected.tags ================================================ INIT input.c /^#define INIT(/;" d file: i input.c /^static const int i = INIT(2);$/;" v typeref:typename:const int file: j input.c /^int j;$/;" v typeref:typename:int k input.c /^int k = 1;$/;" v typeref:typename:int f input.c /^int f(void)$/;" f typeref:typename:int l input.c /^ int l = INIT(3);$/;" l function:f typeref:typename:int file: ================================================ FILE: Units/parser-c.r/c-var-initialized-using-macro.d/input.c ================================================ #define INIT(x) x static const int i = INIT(2); int j; int k = 1; int f(void) { int l = INIT(3); return l + k + j + i; } ================================================ FILE: Units/parser-c.r/complex_decl.c.d/expected.tags ================================================ ScanAction input.c /^static void (* const(ScanAction[5][5]))(void *)= {};$/;" v typeref:typename:void (* const ([5][5]))(void *) file: ================================================ FILE: Units/parser-c.r/complex_decl.c.d/input.c ================================================ /* Complex declarations */ static void (* const(ScanAction[5][5]))(void *)= {}; ================================================ FILE: Units/parser-c.r/cxx-keywords-simple.d/args.ctags ================================================ --sort=no --kinds-C=+p --fields=+K ================================================ FILE: Units/parser-c.r/cxx-keywords-simple.d/expected.tags ================================================ private input.h /^struct private {int x;} v24;$/;" struct x input.h /^struct private {int x;} v24;$/;" member struct:private typeref:typename:int v24 input.h /^struct private {int x;} v24;$/;" variable typeref:struct:private protected input.h /^struct protected {int x;} v25;$/;" struct x input.h /^struct protected {int x;} v25;$/;" member struct:protected typeref:typename:int v25 input.h /^struct protected {int x;} v25;$/;" variable typeref:struct:protected public input.h /^struct public {int x;} v26;$/;" struct x input.h /^struct public {int x;} v26;$/;" member struct:public typeref:typename:int v26 input.h /^struct public {int x;} v26;$/;" variable typeref:struct:public s24 input.h /^struct s24 {int private;} ;$/;" struct private input.h /^struct s24 {int private;} ;$/;" member struct:s24 typeref:typename:int s25 input.h /^struct s25 {int protected;} ;$/;" struct protected input.h /^struct s25 {int protected;} ;$/;" member struct:s25 typeref:typename:int s26 input.h /^struct s26 {int public;} ;$/;" struct public input.h /^struct s26 {int public;} ;$/;" member struct:s26 typeref:typename:int private input.h /^typedef int private; \/* 24 *\/$/;" typedef typeref:typename:int protected input.h /^typedef int protected; \/* 25 *\/$/;" typedef typeref:typename:int public input.h /^typedef int public; \/* 26 *\/$/;" typedef typeref:typename:int v24 input.h /^int v24, private;$/;" variable typeref:typename:int private input.h /^int v24, private;$/;" variable typeref:typename:int v25 input.h /^int v25, protected;$/;" variable typeref:typename:int protected input.h /^int v25, protected;$/;" variable typeref:typename:int v26 input.h /^int v26, public;$/;" variable typeref:typename:int public input.h /^int v26, public;$/;" variable typeref:typename:int private input.h /^int private (int a24);$/;" prototype typeref:typename:int protected input.h /^int protected (int a25);$/;" prototype typeref:typename:int public input.h /^int public (int a26);$/;" prototype typeref:typename:int ================================================ FILE: Units/parser-c.r/cxx-keywords-simple.d/input.h ================================================ struct private {int x;} v24; struct protected {int x;} v25; struct public {int x;} v26; struct s24 {int private;} ; struct s25 {int protected;} ; struct s26 {int public;} ; typedef int private; /* 24 */ typedef int protected; /* 25 */ typedef int public; /* 26 */ int v24, private; int v25, protected; int v26, public; int private (int a24); int protected (int a25); int public (int a26); ================================================ FILE: Units/parser-c.r/cxx-scope-keywords.d/args.ctags ================================================ --sort=no --kinds-C=+L --fields=+K ================================================ FILE: Units/parser-c.r/cxx-scope-keywords.d/expected.tags ================================================ data0 input.h /^struct data0 {$/;" struct private input.h /^ void *private;$/;" member struct:data0 typeref:typename:void * public input.h /^ void *public;$/;" member struct:data0 typeref:typename:void * protected input.h /^ void *protected;$/;" member struct:data0 typeref:typename:void * data1 input.h /^struct data1 {$/;" struct private input.h /^ void *private\/* comment *\/;$/;" member struct:data1 typeref:typename:void * public input.h /^ void *public\/* comment$/;" member struct:data1 typeref:typename:void * protected input.h /^ void *protected \/* comment$/;" member struct:data1 typeref:typename:void * data2 input.h /^struct data2 {$/;" struct private input.h /^ void *private ;$/;" member struct:data2 typeref:typename:void * public input.h /^ int public:1 ;$/;" member struct:data2 typeref:typename:int:1 protected input.h /^ void *protected __attribute__ ((aligned (8))) ;$/;" member struct:data2 typeref:typename:void * foo input.h /^void foo(void) {$/;" function typeref:typename:void private input.h /^private:$/;" label function:foo file: bar input.h /^void bar(void) {$/;" function typeref:typename:void private input.h /^private :$/;" label function:bar file: baz input.h /^void baz(void) {$/;" function typeref:typename:void private input.h /^ private\/* coment *\/:$/;" label function:baz file: private input.h /^int private;$/;" variable typeref:typename:int ================================================ FILE: Units/parser-c.r/cxx-scope-keywords.d/input.h ================================================ struct data0 { void *private; void *public; void *protected; }; struct data1 { void *private/* comment */; void *public/* comment */ ; void *protected /* comment */; }; struct data2 { void *private ; int public:1 ; void *protected __attribute__ ((aligned (8))) ; }; void foo(void) { goto private; private: return; } void bar(void) { goto private ; private : return; } void baz(void) { goto private/* comment */; private/* coment */: return; } int private; ================================================ FILE: Units/parser-c.r/directives-2.c.d/args.ctags ================================================ --extras=+r --fields=+r ================================================ FILE: Units/parser-c.r/directives-2.c.d/expected.tags ================================================ func input.c /^int func()$/;" f typeref:typename:int roles:def main input.c /^int main()$/;" f typeref:typename:int roles:def ================================================ FILE: Units/parser-c.r/directives-2.c.d/input.c ================================================ int main() { if (something) { printf("hello"); #ifdef world } else printf(" world\n"); #else } #endif } int func() { } ================================================ FILE: Units/parser-c.r/directives.c.d/README ================================================ About the expected output, see #379. ================================================ FILE: Units/parser-c.r/directives.c.d/args.ctags ================================================ --extras=+r --fields=+r ================================================ FILE: Units/parser-c.r/directives.c.d/expected.tags ================================================ FUNCTION_LIKE input.c /^#define FUNCTION_LIKE(/;" d file: roles:def MACRO_TO_SEE1 input.c /^# define MACRO_TO_SEE1 /;" d file: roles:def MACRO_TO_SEE1 input.c /^#undef MACRO_TO_SEE1$/;" d file: roles:undef MACRO_TO_SEE2 input.c /^# define MACRO_TO_SEE2 /;" d file: roles:def MACRO_TO_SEE3 input.c /^# define MACRO_TO_SEE3 /;" d file: roles:def MACRO_TO_SEE4 input.c /^# define MACRO_TO_SEE4 /;" d file: roles:def PATH1 input.c /^#define PATH1$/;" d file: roles:def PATH1b input.c /^#define PATH1b$/;" d file: roles:def SEE_THIS_MACRO input.c /^# define SEE_THIS_MACRO /;" d file: roles:def VARIABLE_LIKE input.c /^#define VARIABLE_LIKE /;" d file: roles:def WeakSymbol input.c /^#pragma weak WeakSymbol /;" d file: roles:def a input.c /^int a;$/;" v typeref:typename:int roles:def b input.c /^int b;$/;" v typeref:typename:int roles:def bar1 input.c /^int bar1 (void)$/;" f typeref:typename:int roles:def c input.c /^int c;$/;" v typeref:typename:int roles:def d input.c /^int d;$/;" v typeref:typename:int roles:def foo1 input.c /^int foo1 (void)$/;" f typeref:typename:int roles:def g input.c /^int g;$/;" v typeref:typename:int roles:def p1 input.c /^int p1;$/;" v typeref:typename:int roles:def with_long_comment input.c /^#define with_long_comment /;" d file: roles:def z_this_branch_is_chosen input.c /^#define z_this_branch_is_chosen /;" d file: roles:def ================================================ FILE: Units/parser-c.r/directives.c.d/input.c ================================================ /* Test simple cases */ #define VARIABLE_LIKE some_value #define FUNCTION_LIKE(a,b) (a + b) #pragma weak WeakSymbol = StrongSymbol #define with_long_comment /* line 1 line 2 */ /* Test usual case */ #ifdef MY_MACRO # define MACRO_TO_SEE1 1 int a; #elif YOUR_MACRO # define MACRO_TO_SEE2 2 int b; #elif defined (THEIR_MACRO) # define MACRO_TO_SEE3 3 int c; #else # define MACRO_TO_SEE4 4 int d; #endif /* Test commented-out case */ #if 0 #define IGNORE_MACRO int e; # if 0 # define ANOTHER_IGNORE_MACRO int f; # else # define YAIM # endif #else # define SEE_THIS_MACRO 1 int g; #endif /* Test path selection algorithm */ #ifdef OK #define PATH1 int foo1 (void) { #define z_this_branch_is_chosen 0 #elif defined (OK) #define PATH2 int foo2 (void) { #else #define PATH3 int foo3 (void) { #endif } int bar1 (void) { #ifdef OK #define PATH1b } int p1; #elif defined (OK) #define PATH2b } int p2; #else #define PATH3b } int p3; #endif #undef MACRO_TO_SEE1 ================================================ FILE: Units/parser-c.r/end-field-of-macro.d/args.ctags ================================================ --fields-all=+{end} --fields=+{line} ================================================ FILE: Units/parser-c.r/end-field-of-macro.d/expected.tags ================================================ F input.c /^#define F(/;" d line:1 file: end:1 G input.c /^#define G$/;" d line:2 file: end:2 Z input.c /^#define Z(/;" d line:4 file: end:8 ================================================ FILE: Units/parser-c.r/end-field-of-macro.d/input.c ================================================ #define F(X) X #define G #include #define Z(Y) \ int main (void) \ { \ return 0; \ } ================================================ FILE: Units/parser-c.r/end-field-of-var.d/args.ctags ================================================ --sort=no --fields=+ne ================================================ FILE: Units/parser-c.r/end-field-of-var.d/expected.tags ================================================ n input.c /^int n [2] = {$/;" v line:1 typeref:typename:int[2] end:4 m0 input.c /^int m0 [2] = {$/;" v line:7 typeref:typename:int[2] end:10 m1 input.c /^}, m1 [3] = {$/;" v line:10 typeref:typename:int[3] end:14 point input.c /^struct point {$/;" s line:16 file: end:18 x input.c /^ int x, y;$/;" m line:17 struct:point typeref:typename:int file: end:17 y input.c /^ int x, y;$/;" m line:17 struct:point typeref:typename:int file: end:17 P input.c /^struct point P = {$/;" v line:20 typeref:struct:point end:23 ================================================ FILE: Units/parser-c.r/end-field-of-var.d/input.c ================================================ int n [2] = { 1, 2, }; int m0 [2] = { 3, 4, }, m1 [3] = { 5, 6, 8, }; struct point { int x, y; }; struct point P = { .x = 1, .y = 2, }; ================================================ FILE: Units/parser-c.r/enum-bit-fields.d/args.ctags ================================================ --sort=no --fields-C=+{macrodef} --param-CPreProcessor._expand=1 --fields=+{signature} ================================================ FILE: Units/parser-c.r/enum-bit-fields.d/expected.tags ================================================ s0 input.c /^struct s0 {$/;" s file: __anon4724ae570103 input.c /^ enum {ID0} e0:1;$/;" g struct:s0 file: ID0 input.c /^ enum {ID0} e0:1;$/;" e enum:s0::__anon4724ae570103 file: e0 input.c /^ enum {ID0} e0:1;$/;" m struct:s0 typeref:enum:s0::__anon4724ae570103:1 file: x0 input.c /^ int x0;$/;" m struct:s0 typeref:typename:int file: E1 input.c /^enum E1 {ID1};$/;" g file: ID1 input.c /^enum E1 {ID1};$/;" e enum:E1 file: s1 input.c /^struct s1 {$/;" s file: e1 input.c /^ enum E1 e1:1;$/;" m struct:s1 typeref:enum:E1:1 file: x1 input.c /^ int x1;$/;" m struct:s1 typeref:typename:int file: s2 input.c /^struct s2 {$/;" s file: E2 input.c /^ enum E2 {ID2} e2:1;$/;" g struct:s2 file: ID2 input.c /^ enum E2 {ID2} e2:1;$/;" e enum:s2::E2 file: e2 input.c /^ enum E2 {ID2} e2:1;$/;" m struct:s2 typeref:enum:s2::E2:1 file: x2 input.c /^ int x2;$/;" m struct:s2 typeref:typename:int file: E3 input.c /^enum E3 {ID3};$/;" g file: ID3 input.c /^enum E3 {ID3};$/;" e enum:E3 file: s3 input.c /^struct s3 {$/;" s file: e3 input.c /^ enum E3 e3:1;$/;" m struct:s3 typeref:enum:E3:1 file: x3 input.c /^ int x3;$/;" m struct:s3 typeref:typename:int file: E4 input.c /^enum E4 {ID4};$/;" g file: ID4 input.c /^enum E4 {ID4};$/;" e enum:E4 file: bits input.c /^#define bits /;" d file: macrodef:7 s4 input.c /^struct s4 {$/;" s file: e4_1 input.c /^ enum E4 e4_1:1, e4_2:2, e4_3:bits;$/;" m struct:s4 typeref:enum:E4:1 file: e4_2 input.c /^ enum E4 e4_1:1, e4_2:2, e4_3:bits;$/;" m struct:s4 typeref:enum:E4:2 file: e4_3 input.c /^ enum E4 e4_1:1, e4_2:2, e4_3:bits;$/;" m struct:s4 typeref:enum:E4:7 file: x4 input.c /^ int x4;$/;" m struct:s4 typeref:typename:int file: ================================================ FILE: Units/parser-c.r/enum-bit-fields.d/input.c ================================================ struct s0 { enum {ID0} e0:1; int x0; }; enum E1 {ID1}; struct s1 { enum E1 e1:1; int x1; }; struct s2 { enum E2 {ID2} e2:1; int x2; }; enum E3 {ID3}; struct s3 { enum E3 e3:1; int x3; }; enum E4 {ID4}; #define bits 7 struct s4 { enum E4 e4_1:1, e4_2:2, e4_3:bits; int x4; }; ================================================ FILE: Units/parser-c.r/enum.c.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-c.r/enum.c.d/expected.tags ================================================ E1 input.c /^enum E1 {$/;" g file: E1_member1 input.c /^ E1_member1 = 1,$/;" e enum:E1 file: E1_member2 input.c /^ E1_member2,$/;" e enum:E1 file: E1_member3 input.c /^ E1_member3$/;" e enum:E1 file: __anonbdb313d80103 input.c /^enum {$/;" g file: Anon1_member1 input.c /^ Anon1_member1$/;" e enum:__anonbdb313d80103 file: var1 input.c /^enum E1 var1;$/;" v typeref:enum:E1 __anonbdb313d80203 input.c /^enum { Anon2_member1 } var2;$/;" g file: Anon2_member1 input.c /^enum { Anon2_member1 } var2;$/;" e enum:__anonbdb313d80203 file: var2 input.c /^enum { Anon2_member1 } var2;$/;" v typeref:enum:__anonbdb313d80203 __anonbdb313d80303 input.c /^enum { Anon3_member1 } function(){ return Anon3_member1; };$/;" g file: Anon3_member1 input.c /^enum { Anon3_member1 } function(){ return Anon3_member1; };$/;" e enum:__anonbdb313d80303 file: function input.c /^enum { Anon3_member1 } function(){ return Anon3_member1; };$/;" f typeref:enum:__anonbdb313d80303 E2 input.c /^enum E2 { E2_member1 } var3[10];$/;" g file: E2_member1 input.c /^enum E2 { E2_member1 } var3[10];$/;" e enum:E2 file: var3 input.c /^enum E2 { E2_member1 } var3[10];$/;" v typeref:enum:E2[10] ================================================ FILE: Units/parser-c.r/enum.c.d/input.c ================================================ enum E1 { E1_member1 = 1, E1_member2, E1_member3 }; enum { Anon1_member1 }; enum E1 var1; enum { Anon2_member1 } var2; // The following is valid only in C enum { Anon3_member1 } function(){ return Anon3_member1; }; // The following is accepted by gcc but it is also semantically flawed since the // function definition cannot be present in the same compilation unit. // // enum { Anon4_member1 } function2(); // // It's true that the definition for function2 *could* be in some other compilation // unit and since the enum is technically an int, it might even work at linker level. // // However, it's ugly and complicates ctags parsing quite a lot. // So for now I deliberately choose to not support it. If you find a piece of code // that needs it, drop me a mail at :P enum E2 { E2_member1 } var3[10]; ================================================ FILE: Units/parser-c.r/extern_variable.h.b/README ================================================ Exuberant ctags generates following tags file $ ctags -o - --C-kinds='x' input.h C /home/jet/var/ctags/Units/review-needed.r/extern_variable.h.t/input.h /^class C;$/;" x S /home/jet/var/ctags/Units/review-needed.r/extern_variable.h.t/input.h /^struct S;$/;" x a /home/jet/var/ctags/Units/review-needed.r/extern_variable.h.t/input.h /^extern int a;$/;" x b /home/jet/var/ctags/Units/review-needed.r/extern_variable.h.t/input.h /^extern struct B b;$/;" x Universal ctags generates following tags file $ ./ctags -o - --kinds-C='x' input.h a /home/jet/var/ctags/Units/review-needed.r/extern_variable.h.t/input.h /^extern int a;$/;" x typeref:typename:int b /home/jet/var/ctags/Units/review-needed.r/extern_variable.h.t/input.h /^extern struct B b;$/;" x typeref:struct:B I marked this .b. We have to consider which behavior is better. ================================================ FILE: Units/parser-c.r/extern_variable.h.b/args.ctags ================================================ --kinds-C=x ================================================ FILE: Units/parser-c.r/extern_variable.h.b/expected.tags ================================================ ================================================ FILE: Units/parser-c.r/extern_variable.h.b/input.h ================================================ extern int a; extern struct B b; struct S; class C; ================================================ FILE: Units/parser-c.r/func-after-typedef-for-fptr-returning-enum.d/args.ctags ================================================ --sort=no --fields=+S ================================================ FILE: Units/parser-c.r/func-after-typedef-for-fptr-returning-enum.d/expected.tags ================================================ s input.c /^enum s { E };$/;" g file: E input.c /^enum s { E };$/;" e enum:s file: g input.c /^typedef enum s (*g)(void);$/;" t typeref:enum:s (*)(void) file: f input.c /^void f(void){}$/;" f typeref:typename:void signature:(void) ================================================ FILE: Units/parser-c.r/func-after-typedef-for-fptr-returning-enum.d/input.c ================================================ enum s { E }; typedef enum s (*g)(void); void f(void){} ================================================ FILE: Units/parser-c.r/func-after-typedef-for-fptr-returning-struct.d/args.ctags ================================================ --sort=no --fields=+S ================================================ FILE: Units/parser-c.r/func-after-typedef-for-fptr-returning-struct.d/expected.tags ================================================ s input.c /^struct s {};$/;" s file: g input.c /^typedef struct s (*g)(void);$/;" t typeref:struct:s (*)(void) file: f input.c /^void f(void){}$/;" f typeref:typename:void signature:(void) ================================================ FILE: Units/parser-c.r/func-after-typedef-for-fptr-returning-struct.d/input.c ================================================ struct s {}; typedef struct s (*g)(void); void f(void){} ================================================ FILE: Units/parser-c.r/func_typedef.h.d/expected.tags ================================================ symlist_t input.h /^typedef SLIST_HEAD(symlist, symbol_node) symlist_t;$/;" t ================================================ FILE: Units/parser-c.r/func_typedef.h.d/input.h ================================================ typedef SLIST_HEAD(symlist, symbol_node) symlist_t; ================================================ FILE: Units/parser-c.r/if0.c.d/args.ctags ================================================ --if0 ================================================ FILE: Units/parser-c.r/if0.c.d/expected.tags ================================================ x input.c /^int x;$/;" v typeref:typename:int y input.c /^int y;$/;" v typeref:typename:int ================================================ FILE: Units/parser-c.r/if0.c.d/input.c ================================================ #if 0 int x; #else int y; #endif ================================================ FILE: Units/parser-c.r/line_directives.c.d/README ================================================ Universal ctags also reports NEWLANG as the language for input.c. ================== THE ORIGINAL DOCUMENT ================== Currently this test case made an assertion failure. See also #402. "OK.zzz ", a line of input.c changes the language, the value stored to a global variable, File.source.language. Initially ctags sets C to File.source.language. However, ctags sets NEWLANG to it as specified in args.ctags when ctags reads the line. Reset the language is not so bad. However, when the preprocessor part(get.c) of C parser reads "#define x 1" from input stream, get.c makes a 'v, variable definitions' kind tag. Such kind doesn't exist in the kind table of NEWLANG. This makes the assertion failure. We can remove the code which reset File.source.language to avoid the assertion failure:: ``` diff --git a/main/read.c b/main/read.c index 91c661c..79af808 100644 --- a/main/read.c +++ b/main/read.c @@ -118,7 +118,7 @@ static boolean setSourceFileName (vString *const fileName) vStringValue (File.path), vStringValue (fileName)); pathName = vStringNewOwn (tmp); } - setSourceFileParameters (pathName, language); + setSourceFileParameters (pathName, getSourceLanguage()); result = TRUE; } return result; ``` This looks good to me. However the output (tags file) becomes incompatible to exuberant ctags when --fields=+l option is given to ctags. ``` [exuberant]$ ctags -o - --fields='+l' \ --langdef=NEWLANG --langmap=NEWLANG:+.zzz --line-directives --excmd=number \ Units/review-needed.r/line_directives.c.d/input.c ctags: Warning: Ignoring non-option in ./.ctags a Units/review-needed.r/line_directives.c.d/a.c 10;" v language:C b Units/review-needed.r/line_directives.c.d/b.c 20;" v language:C c Units/review-needed.r/line_directives.c.d/c.c 30;" v language:C d Units/review-needed.r/line_directives.c.d/OK.zzz 2;" v language:NEWLANG [universal]$ ./ctags -o - --fields='+l' \ --langdef=NEWLANG --langmap=NEWLANG:+.zzz --line-directives --excmd=number \ Units/review-needed.r/line_directives.c.d/input.c a Units/review-needed.r/line_directives.c.d/a.c 10;" v language:C b Units/review-needed.r/line_directives.c.d/b.c 20;" v language:C c Units/review-needed.r/line_directives.c.d/c.c 30;" v language:C d Units/review-needed.r/line_directives.c.d/OK.zzz 2;" v language:C ``` Exuberant ctags reports NEWLANG as the language of OK.zzz. Universal ctags reports C as the language of OK.zzz. 'v' is a kind of C language. So even we ignore the assertion issue, C should be reported. This is my position. As suffix shows OK.zzz is obviously not a C language source code. Reporting C as its language is wrong. This may be the position of exuberant ctags. I replaced expected.tags with the output of universal ctags with the above patch. ================================================ FILE: Units/parser-c.r/line_directives.c.d/args.ctags ================================================ --line-directives --excmd=number --fields=+l --langdef=NEWLANG --map-NEWLANG=+.zzz ================================================ FILE: Units/parser-c.r/line_directives.c.d/expected.tags ================================================ a a.c 10;" v language:C typeref:typename:int b b.c 20;" v language:C typeref:typename:int c c.c 30;" v language:C typeref:typename:int d OK.zzz 2;" v language:NEWLANG typeref:typename:int e OK.y 100;" v language:YACC typeref:typename:int ================================================ FILE: Units/parser-c.r/line_directives.c.d/input.c ================================================ /* ANSI format */ # line 10 "a.c" int a; /* GNU C format */ # 20 "b.c" int b; /* obsolete format */ # 30 c.c int c; /* invalid formats */ # 1 OK.zzz # 0 Not OK int d; # 100 OK.y int e; ================================================ FILE: Units/parser-c.r/local.c.d/args.ctags ================================================ --kinds-c=+lL ================================================ FILE: Units/parser-c.r/local.c.d/expected.tags ================================================ a input.c /^ int a;$/;" l function:main typeref:typename:int file: b input.c /^ int b = 3;$/;" l function:main typeref:typename:int file: isContextualKeyword input.c /^static boolean isContextualKeyword (const tokenInfo *const token)$/;" f typeref:typename:boolean file: label input.c /^label:$/;" L function:isContextualKeyword file: main input.c /^main ()$/;" f result input.c /^ boolean result;$/;" l function:isContextualKeyword typeref:typename:boolean file: ================================================ FILE: Units/parser-c.r/local.c.d/input.c ================================================ main () { int a; int b = 3; a = 2; } static boolean isContextualKeyword (const tokenInfo *const token) { boolean result; label: goto label; switch (token->keyword) { case KEYWORD_UNION: result = TRUE; break; default: result = FALSE; break; } return result; } ================================================ FILE: Units/parser-c.r/macrodef.d/args.ctags ================================================ --sort=no --fields-C=+{macrodef} --fields=+Sl ================================================ FILE: Units/parser-c.r/macrodef.d/expected.tags ================================================ INT input.c /^#define INT /;" d language:C file: macrodef:1 STR input.c /^#define STR /;" d language:C file: macrodef:"bar" CHR input.c /^#define CHR /;" d language:C file: macrodef:'b' HEX input.c /^#define HEX /;" d language:C file: macrodef:0xff01 OCT input.c /^#define OCT /;" d language:C file: macrodef:0644 SYSCALL_METADATA input.c /^#define SYSCALL_METADATA(/;" d language:C file: signature:(sname,nb,...) macrodef: SYSCALL_DEFINE2 input.c /^#define SYSCALL_DEFINE2(/;" d language:C file: signature:(name,...) macrodef:SYSCALL_DEFINEx(2, _##name, __VA_ARGS__) SYSCALL_DEFINEx input.c /^#define SYSCALL_DEFINEx(/;" d language:C file: signature:(x,sname,...) macrodef:SYSCALL_METADATA(sname, x, __VA_ARGS__) __SYSCALL_DEFINEx(x, sname, __VA_ARGS__) __SYSCALL_DEFINEx input.c /^#define __SYSCALL_DEFINEx(/;" d language:C file: signature:(x,name,...) macrodef:__diag_push(); __diag_ignore(GCC, 8, "-Wattribute-alias", "Type aliasing is used to sanitize syscall arguments"); asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) __attribute__((alias(__stringify(__se_sys##name)))); ALLOW_ERROR_INJECTION(sys##name, ERRNO); static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) { long ret = __do_sys##name(__MAP(x,__SC_CAST,__VA_ARGS__)); __MAP(x,__SC_TEST,__VA_ARGS__); __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); return ret; } __diag_pop(); static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) __MAP1 input.c /^#define __MAP1(/;" d language:C file: signature:(m,t,a,...) macrodef:m(t,a) __MAP2 input.c /^#define __MAP2(/;" d language:C file: signature:(m,t,a,...) macrodef:m(t,a), __MAP1(m,__VA_ARGS__) __MAP input.c /^#define __MAP(n,...) __MAP#/;" d language:C file: signature:(n,...) macrodef:__MAP##n(__VA_ARGS__) __SC_DECL input.c /^#define __SC_DECL(/;" d language:C file: signature:(t,a) macrodef:t a ================================================ FILE: Units/parser-c.r/macrodef.d/input.c ================================================ #define INT 1 #define STR "bar" #define CHR 'b' #define HEX 0xff01 #define OCT 0644 /* * Taken from linux kernel */ #define SYSCALL_METADATA(sname, nb, ...) #define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__) #define SYSCALL_DEFINEx(x, sname, ...) \ SYSCALL_METADATA(sname, x, __VA_ARGS__) \ __SYSCALL_DEFINEx(x, sname, __VA_ARGS__) /* * The asmlinkage stub is aliased to a function named __se_sys_*() which * sign-extends 32-bit ints to longs whenever needed. The actual work is * done within __do_sys_*(). */ #define __SYSCALL_DEFINEx(x, name, ...) \ __diag_push(); \ __diag_ignore(GCC, 8, "-Wattribute-alias", \ "Type aliasing is used to sanitize syscall arguments");\ asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ __attribute__((alias(__stringify(__se_sys##name)))); \ ALLOW_ERROR_INJECTION(sys##name, ERRNO); \ static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ { \ long ret = __do_sys##name(__MAP(x,__SC_CAST,__VA_ARGS__));\ __MAP(x,__SC_TEST,__VA_ARGS__); \ __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \ return ret; \ } \ __diag_pop(); \ static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) #define __MAP1(m,t,a,...) m(t,a) #define __MAP2(m,t,a,...) m(t,a), __MAP1(m,__VA_ARGS__) #define __MAP(n,...) __MAP##n(__VA_ARGS__) #define __SC_DECL(t, a) t a #if 0 SYSCALL_DEFINE2(setregid16, old_gid_t, rgid, old_gid_t, egid) { return __sys_setregid(low2highgid(rgid), low2highgid(egid)); } #endif ================================================ FILE: Units/parser-c.r/macroexpand-empty-arg.d/args.ctags ================================================ --sort=no --fields=+n{signature} --param-CPreProcessor._expand=1 --fields-C={macrodef} ================================================ FILE: Units/parser-c.r/macroexpand-empty-arg.d/expected.tags ================================================ X input.c /^#define X$/;" d line:1 file: macrodef: m0 input.c /^#define m0(/;" d line:2 file: signature:(Q,W,E,R) macrodef:int Q m1 input.c /^#define m1(/;" d line:3 file: signature:(Q,W,E,R) macrodef:int W m2 input.c /^#define m2(/;" d line:4 file: signature:(Q,W,E,R) macrodef:int E m3 input.c /^#define m3(/;" d line:5 file: signature:(Q,W,E,R) macrodef:int R a input.c /^m0(a,b,c,d);$/;" v line:7 typeref:typename:int a input.c /^m0(a,X,c,d);$/;" v line:8 typeref:typename:int a input.c /^m0(a,b,X,d);$/;" v line:9 typeref:typename:int a input.c /^m0(a,b,c,X);$/;" v line:10 typeref:typename:int a input.c /^m0(a,X,X,d);$/;" v line:11 typeref:typename:int a input.c /^m0(a,b,X,X);$/;" v line:12 typeref:typename:int a input.c /^m0(a,X,c,X);$/;" v line:13 typeref:typename:int a input.c /^m0(a,X,X,X);$/;" v line:14 typeref:typename:int b input.c /^m1(a,b,c,d);$/;" v line:16 typeref:typename:int b input.c /^m1(X,b,c,d);$/;" v line:17 typeref:typename:int b input.c /^m1(a,b,X,d);$/;" v line:18 typeref:typename:int b input.c /^m1(a,b,c,X);$/;" v line:19 typeref:typename:int b input.c /^m1(X,b,X,d);$/;" v line:20 typeref:typename:int b input.c /^m1(a,b,X,X);$/;" v line:21 typeref:typename:int b input.c /^m1(X,b,c,X);$/;" v line:22 typeref:typename:int b input.c /^m1(X,b,X,X);$/;" v line:23 typeref:typename:int c input.c /^m2(a,b,c,d);$/;" v line:25 typeref:typename:int c input.c /^m2(X,b,c,d);$/;" v line:26 typeref:typename:int c input.c /^m2(a,X,c,d);$/;" v line:27 typeref:typename:int c input.c /^m2(a,b,c,X);$/;" v line:28 typeref:typename:int c input.c /^m2(X,X,c,d);$/;" v line:29 typeref:typename:int c input.c /^m2(a,X,c,X);$/;" v line:30 typeref:typename:int c input.c /^m2(X,b,c,X);$/;" v line:31 typeref:typename:int c input.c /^m2(X,X,c,X);$/;" v line:32 typeref:typename:int d input.c /^m3(a,b,c,d);$/;" v line:34 typeref:typename:int d input.c /^m3(X,b,c,d);$/;" v line:35 typeref:typename:int d input.c /^m3(a,X,c,d);$/;" v line:36 typeref:typename:int d input.c /^m3(a,b,X,d);$/;" v line:37 typeref:typename:int d input.c /^m3(X,X,c,d);$/;" v line:38 typeref:typename:int d input.c /^m3(a,X,X,d);$/;" v line:39 typeref:typename:int d input.c /^m3(X,b,X,d);$/;" v line:40 typeref:typename:int d input.c /^m3(X,X,X,d);$/;" v line:41 typeref:typename:int a input.c /^m0(a,b,c,d);$/;" v line:43 typeref:typename:int a input.c /^m0(a,,c,d);$/;" v line:44 typeref:typename:int a input.c /^m0(a,b,,d);$/;" v line:45 typeref:typename:int a input.c /^m0(a,b,c,);$/;" v line:46 typeref:typename:int a input.c /^m0(a,,,d);$/;" v line:47 typeref:typename:int a input.c /^m0(a,b,,);$/;" v line:48 typeref:typename:int a input.c /^m0(a,,c,);$/;" v line:49 typeref:typename:int a input.c /^m0(a,,,);$/;" v line:50 typeref:typename:int b input.c /^m1(a,b,c,d);$/;" v line:52 typeref:typename:int b input.c /^m1(,b,c,d);$/;" v line:53 typeref:typename:int b input.c /^m1(a,b,,d);$/;" v line:54 typeref:typename:int b input.c /^m1(a,b,c,);$/;" v line:55 typeref:typename:int b input.c /^m1(,b,,d);$/;" v line:56 typeref:typename:int b input.c /^m1(a,b,,);$/;" v line:57 typeref:typename:int b input.c /^m1(,b,c,);$/;" v line:58 typeref:typename:int b input.c /^m1(,b,,);$/;" v line:59 typeref:typename:int c input.c /^m2(a,b,c,d);$/;" v line:61 typeref:typename:int c input.c /^m2(,b,c,d);$/;" v line:62 typeref:typename:int c input.c /^m2(a,,c,d);$/;" v line:63 typeref:typename:int c input.c /^m2(a,b,c,);$/;" v line:64 typeref:typename:int c input.c /^m2(,,c,d);$/;" v line:65 typeref:typename:int c input.c /^m2(a,,c,);$/;" v line:66 typeref:typename:int c input.c /^m2(,b,c,);$/;" v line:67 typeref:typename:int c input.c /^m2(,,c,);$/;" v line:68 typeref:typename:int d input.c /^m3(a,b,c,d);$/;" v line:70 typeref:typename:int d input.c /^m3(,b,c,d);$/;" v line:71 typeref:typename:int d input.c /^m3(a,,c,d);$/;" v line:72 typeref:typename:int d input.c /^m3(a,b,,d);$/;" v line:73 typeref:typename:int d input.c /^m3(,,c,d);$/;" v line:74 typeref:typename:int d input.c /^m3(a,,,d);$/;" v line:75 typeref:typename:int d input.c /^m3(,b,,d);$/;" v line:76 typeref:typename:int d input.c /^m3(,,,d);$/;" v line:77 typeref:typename:int ================================================ FILE: Units/parser-c.r/macroexpand-empty-arg.d/input.c ================================================ #define X #define m0(Q,W,E,R) int Q #define m1(Q,W,E,R) int W #define m2(Q,W,E,R) int E #define m3(Q,W,E,R) int R m0(a,b,c,d); m0(a,X,c,d); m0(a,b,X,d); m0(a,b,c,X); m0(a,X,X,d); m0(a,b,X,X); m0(a,X,c,X); m0(a,X,X,X); m1(a,b,c,d); m1(X,b,c,d); m1(a,b,X,d); m1(a,b,c,X); m1(X,b,X,d); m1(a,b,X,X); m1(X,b,c,X); m1(X,b,X,X); m2(a,b,c,d); m2(X,b,c,d); m2(a,X,c,d); m2(a,b,c,X); m2(X,X,c,d); m2(a,X,c,X); m2(X,b,c,X); m2(X,X,c,X); m3(a,b,c,d); m3(X,b,c,d); m3(a,X,c,d); m3(a,b,X,d); m3(X,X,c,d); m3(a,X,X,d); m3(X,b,X,d); m3(X,X,X,d); m0(a,b,c,d); m0(a,,c,d); m0(a,b,,d); m0(a,b,c,); m0(a,,,d); m0(a,b,,); m0(a,,c,); m0(a,,,); m1(a,b,c,d); m1(,b,c,d); m1(a,b,,d); m1(a,b,c,); m1(,b,,d); m1(a,b,,); m1(,b,c,); m1(,b,,); m2(a,b,c,d); m2(,b,c,d); m2(a,,c,d); m2(a,b,c,); m2(,,c,d); m2(a,,c,); m2(,b,c,); m2(,,c,); m3(a,b,c,d); m3(,b,c,d); m3(a,,c,d); m3(a,b,,d); m3(,,c,d); m3(a,,,d); m3(,b,,d); m3(,,,d); ================================================ FILE: Units/parser-c.r/macroexpand-typeof.d/args.ctags ================================================ --sort=no --param-CPreProcessor._expand=true --fields-C=+{macrodef} --fields=+{signature} --kinds-C=+x ================================================ FILE: Units/parser-c.r/macroexpand-typeof.d/expected.tags ================================================ __attribute_copy__ input.c /^# define __attribute_copy__(/;" d file: signature:(arg) macrodef:__attribute__ ((__copy__ (arg))) weak_alias input.c /^# define weak_alias(name, aliasname) _weak_alias /;" d file: signature:(name,aliasname) macrodef:_weak_alias (name, aliasname) _weak_alias input.c /^# define _weak_alias(/;" d file: signature:(name,aliasname) macrodef:extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))) __attribute_copy__ (name); __brk input.c /^__brk (void *addr)$/;" f typeref:typename:int signature:(void * addr) brk input.c /^weak_alias (__brk, brk)$/;" x typeref:typename:__typeof(__brk) ================================================ FILE: Units/parser-c.r/macroexpand-typeof.d/input.c ================================================ // Derrived from glibc # define __attribute_copy__(arg) __attribute__ ((__copy__ (arg))) # define weak_alias(name, aliasname) _weak_alias (name, aliasname) # define _weak_alias(name, aliasname) \ extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))) \ __attribute_copy__ (name); int __brk (void *addr) { /* ... */ return 0; } weak_alias (__brk, brk) ================================================ FILE: Units/parser-c.r/macroexpand-with-linenum-adjustment.d/args.ctags ================================================ --sort=no --fields=+ne -D SYSCALL_DEFINE3(name,...)=long name(__VA_ARGS__) --param-CPreProcessor._expand=1 --fields=+{signature} --fields-C=+{macrodef} ================================================ FILE: Units/parser-c.r/macroexpand-with-linenum-adjustment.d/expected.tags ================================================ faccessat input.c /^SYSCALL_DEFINE3(faccessat, int, dfd, const char __user *, filename, int, mode)$/;" f line:1 typeref:typename:long signature:(int,dfd,const char __user *,filename,int,mode) end:4 fchmodat input.c /^SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename,$/;" f line:6 typeref:typename:long signature:(int,dfd,const char __user *,filename,umode_t,mode) end:10 mysyscall input.c /^ mysyscall, int, dfd,$/;" f line:16 typeref:typename:long signature:(int,dfd,const char __user *,filename,umode_t,mode) end:21 INJECT_MEMBERS input.c /^#define INJECT_MEMBERS(/;" d line:23 file: signature:(m0,m1) end:26 macrodef:int m0; int padding; int m1 P input.c /^struct P {$/;" s line:28 file: end:33 x input.c /^ x$/;" m line:30 struct:P typeref:typename:int file: padding input.c /^ INJECT_MEMBERS($/;" m line:29 struct:P typeref:typename:int file: end:29 y input.c /^ y);$/;" m line:32 struct:P typeref:typename:int file: end:32 ================================================ FILE: Units/parser-c.r/macroexpand-with-linenum-adjustment.d/input.c ================================================ SYSCALL_DEFINE3(faccessat, int, dfd, const char __user *, filename, int, mode) { return do_faccessat(dfd, filename, mode, 0); } SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename, umode_t, mode) { return do_fchmodat(dfd, filename, mode, 0); } SYSCALL_DEFINE3( /* * noise */ mysyscall, int, dfd, const char __user *, filename, umode_t, mode) { return 0; } #define INJECT_MEMBERS(m0, m1) \ int m0; \ int padding; \ int m1 struct P { INJECT_MEMBERS( x , y); }; ================================================ FILE: Units/parser-c.r/macros.c.d/README ================================================ This case tests multiple behavior of C parser. 1. #pragma weak 2. Top level function call like macro expansions (MACRO1, MACRO2, MACRO3) If a macro takes one parameter, according to my observation ctags records the parameter as a variable by default. It looks sensible behavior. Look at following code: #define DEF_LANG(X) struct Lang X ... DEF_LANG(alpha); In this case ctags records alpha by default. MACRO1 tests this default behavior. With -I option you can make this behavior for a specified macro be disabled. MACRO2 tests the -I option. If a macro takes more than one parameters, according to my observation ctags records nothing. In the future we can change this behavior interesting way but in this case tests the current implementation(MACRO3). 3. name before double parenthesis (__ARGS) ctags.1 says: Ctags will also try to specially handle arguments lists enclosed in double sets of parentheses in order to accept the following conditional construct: extern void foo __ARGS((int one, char two)); Any name immediately preceding the "((" will be automatically ignored and the previous name will be used. 4. #undef ================================================ FILE: Units/parser-c.r/macros.c.d/args.ctags ================================================ --kinds-c=+p --fields=+S -I MACRO2 --fields=+r --extras=+r ================================================ FILE: Units/parser-c.r/macros.c.d/expected.tags ================================================ DECL1 input.c /^DECL1(foo); \/* gcc will accept this as function prototype (with some warnings) *\/$/;" p file: signature:(foo) roles:def DECL3 input.c /^DECL3(x, y); \/* gcc will accept this as function prototype (with some warnings) *\/$/;" p file: signature:(x,y) roles:def FUNCTION_LIKE input.c /^#define FUNCTION_LIKE(/;" d file: signature:(a,b) roles:def FUNCTION_LIKE input.c /^#undef FUNCTION_LIKE$/;" d file: roles:undef VARIABLE_LIKE input.c /^#define VARIABLE_LIKE /;" d file: roles:def VARIABLE_LIKE input.c /^#undef VARIABLE_LIKE$/;" d file: roles:undef WeakSymbol input.c /^#pragma weak WeakSymbol /;" d file: roles:def prototype1 input.c /^void prototype1 __ARGS((int arg1, void *arg2));$/;" p typeref:typename:void file: signature:(int arg1,void * arg2) roles:def prototype2 input.c /^void prototype2 __ARGS((int arg1, void *arg2))$/;" f typeref:typename:void signature:(int arg1,void * arg2) roles:def ================================================ FILE: Units/parser-c.r/macros.c.d/input.c ================================================ #define VARIABLE_LIKE some_value #define FUNCTION_LIKE(a,b) (a + b) #pragma weak WeakSymbol = StrongSymbol /* handling of spoofing macros */ DECL1(foo); /* gcc will accept this as function prototype (with some warnings) */ MACRO2(bar); DECL3(x, y); /* gcc will accept this as function prototype (with some warnings) */ void prototype1 __ARGS((int arg1, void *arg2)); void prototype2 __ARGS((int arg1, void *arg2)) { } #undef FUNCTION_LIKE #undef VARIABLE_LIKE ================================================ FILE: Units/parser-c.r/option-disable-undef.c.d/args.ctags ================================================ #--undef=no ================================================ FILE: Units/parser-c.r/option-disable-undef.c.d/expected.tags ================================================ MACRO_TO_SEE input.c /^#define MACRO_TO_SEE$/;" d file: ================================================ FILE: Units/parser-c.r/option-disable-undef.c.d/input.c ================================================ #define MACRO_TO_SEE #undef MACRO_NOT_TO_SEE ================================================ FILE: Units/parser-c.r/properties-thread.d/args.ctags ================================================ --sort=no --kinds-c=*-{parameter} --fields=+x --fields-c=+{properties} ================================================ FILE: Units/parser-c.r/properties-thread.d/expected.tags ================================================ i input.c /^__thread int i;$/;" v typeref:typename:int properties:thread_local s input.c /^extern __thread struct state s;$/;" x typeref:struct:state properties:extern,thread_local p input.c /^static __thread char *p;$/;" v typeref:typename:char * file: properties:static,thread_local q input.c /^static _Thread_local char *q;$/;" v typeref:typename:char * file: properties:static,thread_local ================================================ FILE: Units/parser-c.r/properties-thread.d/input.c ================================================ /* Taken from https://gcc.gnu.org/onlinedocs/gcc-3.3.1/gcc/Thread-Local.html#Thread-Local */ __thread int i; extern __thread struct state s; static __thread char *p; static _Thread_local char *q; ================================================ FILE: Units/parser-c.r/properties.c.d/args.ctags ================================================ --sort=no --kinds-c=* --fields=+x --fields-c=+{properties} ================================================ FILE: Units/parser-c.r/properties.c.d/expected.tags ================================================ T input.c /^static struct T {int t;} f1(int i)$/;" s file: t input.c /^static struct T {int t;} f1(int i)$/;" m struct:T typeref:typename:int file: f1 input.c /^static struct T {int t;} f1(int i)$/;" f typeref:struct:T file: properties:static i input.c /^static struct T {int t;} f1(int i)$/;" z function:f1 typeref:typename:int file: r input.c /^ struct T r = {.t = i};$/;" l function:f1 typeref:struct:T file: ================================================ FILE: Units/parser-c.r/properties.c.d/input.c ================================================ // See #3943. // static struct S {int s;} fS1(int i); /* This is invalid input as C++ code. */ static struct T {int t;} f1(int i) { struct T r = {.t = i}; return r; } ================================================ FILE: Units/parser-c.r/prototype.h.d/args.ctags ================================================ --kinds-C=+p ================================================ FILE: Units/parser-c.r/prototype.h.d/expected.tags ================================================ prototype_a input.h /^int prototype_a (int a, char *b);$/;" p typeref:typename:int prototype_b input.h /^extern void prototype_b (void);$/;" p typeref:typename:void ================================================ FILE: Units/parser-c.r/prototype.h.d/input.h ================================================ int prototype_a (int a, char *b); extern void prototype_b (void); ================================================ FILE: Units/parser-c.r/recursive-macros-2.d/README ================================================ typeref field for `p' in expected.tags may be changed when the definition for CXX_PARSER_MAXIMUM_MACRO_USE_COUNT is changed. ================================================ FILE: Units/parser-c.r/recursive-macros-2.d/args.ctags ================================================ --kinds-C=* -D p=a -D a=(p+p) ================================================ FILE: Units/parser-c.r/recursive-macros-2.d/expected.tags ================================================ dummy input.c /^int dummy;$/;" v typeref:typename:int p input.c /^int p;$/;" v typeref:typename:int ((((((((+p)+p)+p)+p)+p)+p)+p)+p) ================================================ FILE: Units/parser-c.r/recursive-macros-2.d/input.c ================================================ int p; int dummy; ================================================ FILE: Units/parser-c.r/recursive-macros.d/args.ctags ================================================ --kinds-C=* -D p=a -D a=p+p ================================================ FILE: Units/parser-c.r/recursive-macros.d/expected.tags ================================================ dummy input.c /^int dummy;$/;" v typeref:typename:int ================================================ FILE: Units/parser-c.r/recursive-macros.d/input.c ================================================ int p; int dummy; ================================================ FILE: Units/parser-c.r/spurious_label_tags.c.d/args.ctags ================================================ --kinds-c=+lp ================================================ FILE: Units/parser-c.r/spurious_label_tags.c.d/expected.tags ================================================ label_forced_tags input.c /^static void label_forced_tags(void)$/;" f typeref:typename:void file: ================================================ FILE: Units/parser-c.r/spurious_label_tags.c.d/input.c ================================================ /* When run with --kinds-c=+lp option demonstrates spurious tags for statement * following a label */ static void label_forced_tags(void) { label1: proto1(arg); label2: if (arg) proto2(arg); label3: variable = 3; while (condition) { label4: proto3(arg); } } ================================================ FILE: Units/parser-c.r/static_array.c.d/expected.tags ================================================ charset2uni input.c /^static wchar_t charset2uni[256] = {$/;" v typeref:typename:wchar_t[256] file: ================================================ FILE: Units/parser-c.r/static_array.c.d/input.c ================================================ /* Demonstrates temporary bug caused by statement reinitialization */ static wchar_t charset2uni[256] = { }; ================================================ FILE: Units/parser-c.r/using-cxx-keyword-in-c-code.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-c.r/using-cxx-keyword-in-c-code.d/expected.tags ================================================ mutable input.c /^static int mutable;$/;" v typeref:typename:int file: ================================================ FILE: Units/parser-c.r/using-cxx-keyword-in-c-code.d/input.c ================================================ static int mutable; ================================================ FILE: Units/parser-c.r/vardef-surrounded-by-parentheses.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-c.r/vardef-surrounded-by-parentheses.d/expected.tags ================================================ A input.c /^int (A);$/;" v typeref:typename:int () B input.c /^int *(B);$/;" v typeref:typename:int * () C input.c /^struct s *(C);$/;" v typeref:struct:s * () a input.c /^int (a[1]);$/;" v typeref:typename:int ([1]) b input.c /^int *(b[2]);$/;" v typeref:typename:int * ([2]) c input.c /^int (c[1][2]);$/;" v typeref:typename:int ([1][2]) d input.c /^int *(d[2][3]);$/;" v typeref:typename:int * ([2][3]) e input.c /^int *(* const volatile * e[3]);$/;" v typeref:typename:int * (* const volatile * [3]) s input.c /^struct s {$/;" s file: f input.c /^ int *(* const volatile * f[3][3]);$/;" m struct:s typeref:typename:int * (* const volatile * [3][3]) file: g input.c /^ int (g[3]);$/;" m struct:s typeref:typename:int ([3]) file: t input.c /^} t;$/;" v typeref:struct:s h input.c /^int (* volatile * (*h[1]));$/;" v typeref:typename:int (* volatile * (* [1])) ================================================ FILE: Units/parser-c.r/vardef-surrounded-by-parentheses.d/input.c ================================================ // The next one will be reconigzed as a macro. // struct s (a); int (A); MACRO(ARGS); int *(B); struct s *(C); int (a[1]); int *(b[2]); int (c[1][2]); int *(d[2][3]); int *(* const volatile * e[3]); struct s { int *(* const volatile * f[3][3]); int (g[3]); } t; int (* volatile * (*h[1])); ================================================ FILE: Units/parser-cargo.r/simple.d/args.ctags ================================================ --languages=-TOML --languages=+Cargo --map-Cargo=.cargo --sort=no --fields=+lK ================================================ FILE: Units/parser-cargo.r/simple.d/expected.tags ================================================ myapp input.cargo /^name = "myapp"$/;" package language:Cargo ================================================ FILE: Units/parser-cargo.r/simple.d/features ================================================ packcc ================================================ FILE: Units/parser-cargo.r/simple.d/input.cargo ================================================ [package] name = "myapp" ================================================ FILE: Units/parser-clojure.r/broken-ns.d/expected.tags ================================================ ================================================ FILE: Units/parser-clojure.r/broken-ns.d/input-0.clj ================================================ (ns ^abc ================================================ FILE: Units/parser-clojure.r/broken-ns.d/input-1.clj ================================================ (ns ^abc ================================================ FILE: Units/parser-clojure.r/broken-ns.d/input.clj ================================================ (ns ^{:doc "Document"} ================================================ FILE: Units/parser-clojure.r/clojure-def-in-unknown-scope.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-clojure.r/clojure-def-in-unknown-scope.d/expected.tags ================================================ N input.clj /^(ns N)$/;" n defn input.clj /^(defn defn [n]$/;" f namespace:N S input.clj /^(ns S$/;" n g input.clj /^(N\/defn 'g)$/;" Y namespace:S name:g h input.clj /^(clojure.core\/defn h [] 1)$/;" f namespace:S ================================================ FILE: Units/parser-clojure.r/clojure-def-in-unknown-scope.d/input.clj ================================================ (ns N) (defn defn [n] 1) (ns S (:require [N])) (N/defn 'g) (clojure.core/defn h [] 1) ================================================ FILE: Units/parser-clojure.r/clojure-metadata-in-fn.d/expected.tags ================================================ my-fn input.clj /^(defn my-fn [])$/;" f my-hinted-fn input.clj /^(defn my-hinted-fn ^MyReturnType [])$/;" f my-private-fn input.clj /^(defn ^:private my-private-fn [])$/;" f my-private-hinted-fn input.clj /^(defn ^:private my-private-hinted-fn ^MyReturnType [])$/;" f my-public-fn input.clj /^(defn ^{:foo :bar} my-public-fn [])$/;" f so-many-hints input.clj /^(defn ^:private so-many-hints ^MyReturnType$/;" f ================================================ FILE: Units/parser-clojure.r/clojure-metadata-in-fn.d/input.clj ================================================ (defn my-fn []) (defn ^:private my-private-fn []) (defn ^{:foo :bar} my-public-fn []) (defn my-hinted-fn ^MyReturnType []) (defn ^:private my-private-hinted-fn ^MyReturnType []) (defn ^:private so-many-hints ^MyReturnType [^MyArgType x]) ================================================ FILE: Units/parser-clojure.r/clojure-metadata-in-ns.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-clojure.r/clojure-metadata-in-ns.d/expected.tags ================================================ ns0 input.clj /^(ns ^{:doc "Utility functions."} ns0)$/;" n debug0? input.clj /^(defn debug0? ^boolean$/;" f namespace:ns0 ns1 input-0.clj /^(ns ^:dynamic ns1)$/;" n debug1? input-0.clj /^(defn debug1? ^boolean$/;" f namespace:ns1 ns2 input-0.clj /^(ns ^String ns2)$/;" n debug2? input-0.clj /^(defn debug2? ^boolean$/;" f namespace:ns2 ns00 input-0.clj /^(ns ^{:doc "Utility functions."} ^{:doc1 "something"} ns00)$/;" n debug00? input-0.clj /^(defn debug00? ^boolean$/;" f namespace:ns00 ns01 input-0.clj /^(ns ^{:doc "Utility functions."} ^:dynamic ns01)$/;" n debug01? input-0.clj /^(defn debug01? ^boolean$/;" f namespace:ns01 ns02 input-0.clj /^(ns ^{:doc "Utility functions."} ^String ns02)$/;" n debug02? input-0.clj /^(defn debug02? ^boolean$/;" f namespace:ns02 ns10 input-0.clj /^(ns ^:dynamic ^{:doc "Utility functions."} ns10)$/;" n debug10? input-0.clj /^(defn debug10? ^boolean$/;" f namespace:ns10 ns11 input-0.clj /^(ns ^:dynamic ^:dynamic-something ns11)$/;" n debug11? input-0.clj /^(defn debug11? ^boolean$/;" f namespace:ns11 ns12 input-0.clj /^(ns ^:dynamic ^String ns12)$/;" n debug12? input-0.clj /^(defn debug12? ^boolean$/;" f namespace:ns12 ns20 input-0.clj /^(ns ^String ^{:doc "Utility functions."} ns20)$/;" n debug20? input-0.clj /^(defn debug20? ^boolean$/;" f namespace:ns20 ns21 input-0.clj /^(ns ^String ^:dynamic ns21)$/;" n debug21? input-0.clj /^(defn debug21? ^boolean$/;" f namespace:ns21 ns22 input-0.clj /^(ns ^String ^String-something ns22)$/;" n debug22? input-0.clj /^(defn debug22? ^boolean$/;" f namespace:ns22 ================================================ FILE: Units/parser-clojure.r/clojure-metadata-in-ns.d/input-0.clj ================================================ (ns ^:dynamic ns1) (defn debug1? ^boolean [] goog.DEBUG) (ns ^String ns2) (defn debug2? ^boolean [] goog.DEBUG) (ns ^{:doc "Utility functions."} ^{:doc1 "something"} ns00) (defn debug00? ^boolean [] goog.DEBUG) (ns ^{:doc "Utility functions."} ^:dynamic ns01) (defn debug01? ^boolean [] goog.DEBUG) (ns ^{:doc "Utility functions."} ^String ns02) (defn debug02? ^boolean [] goog.DEBUG) (ns ^:dynamic ^{:doc "Utility functions."} ns10) (defn debug10? ^boolean [] goog.DEBUG) (ns ^:dynamic ^:dynamic-something ns11) (defn debug11? ^boolean [] goog.DEBUG) (ns ^:dynamic ^String ns12) (defn debug12? ^boolean [] goog.DEBUG) (ns ^String ^{:doc "Utility functions."} ns20) (defn debug20? ^boolean [] goog.DEBUG) (ns ^String ^:dynamic ns21) (defn debug21? ^boolean [] goog.DEBUG) (ns ^String ^String-something ns22) (defn debug22? ^boolean [] goog.DEBUG) ================================================ FILE: Units/parser-clojure.r/clojure-metadata-in-ns.d/input.clj ================================================ ;; Taken from #1657 opened by @arichiardi (ns ^{:doc "Utility functions."} ns0) (defn debug0? ^boolean [] goog.DEBUG) ================================================ FILE: Units/parser-clojure.r/clojure-methods.b/README ================================================ About methodId kind, see #4126. ================================================ FILE: Units/parser-clojure.r/clojure-methods.b/args.ctags ================================================ --sort=no --fields=+KzZ ================================================ FILE: Units/parser-clojure.r/clojure-methods.b/expected.tags ================================================ multimethod.test input.clj /^(ns multimethod.test)$/;" kind:namespace test input.clj /^(defmulti test$/;" kind:multi scope:namespace:multimethod.test documented-multimethod input.clj /^(defmulti documented-multimethod "Documentation"$/;" kind:multi scope:namespace:multimethod.test test input.clj /^(defmethod test nil$/;" kind:method scope:namespace:multimethod.test test input.clj /^(defmethod test :test$/;" kind:method scope:namespace:multimethod.test test input.clj /^(defmethod test :test2 named-method$/;" kind:method scope:namespace:multimethod.test named-method input.clj /^(defmethod test :test2 named-method$/;" kind:methodId method:test scope:namespace:multimethod.test ================================================ FILE: Units/parser-clojure.r/clojure-methods.b/input.clj ================================================ (ns multimethod.test) (defmulti test (fn [type] type)) (defmulti documented-multimethod "Documentation" (fn [type] type)) (defmethod test nil [& _] nil) (defmethod test :test [& _] nil) (defmethod test :test2 named-method [& _] nil) ================================================ FILE: Units/parser-clojure.r/clojure-vars.b/args.ctags ================================================ --sort=no --fields=+KzZ ================================================ FILE: Units/parser-clojure.r/clojure-vars.b/expected.tags ================================================ vars.test input.clj /^(ns vars.test)$/;" kind:namespace var input.clj /^(def var 'var)$/;" kind:variable namespace:vars.test doc-var input.clj /^(def doc-var "Documentation" 'var)$/;" kind:variable scope:namespace:vars.test dynamic-var input.clj /^(def dynamic-var ^:dynamic 'var)$/;" kind:variable scope:namespace:vars.test const-var input.clj /^(def const-var ^:const 'var)$/;" kind:variable scope:namespace:vars.test once-var input.clj /^(defonce once-var 'evaluated-once)$/;" kind:variable scope:namespace:vars.test fn-var input.clj /^(def fn-var (fn [] true))$/;" kind:function scope:namespace:vars.test ================================================ FILE: Units/parser-clojure.r/clojure-vars.b/input.clj ================================================ (ns vars.test) (def var 'var) (def doc-var "Documentation" 'var) (def dynamic-var ^:dynamic 'var) (def const-var ^:const 'var) (defonce once-var 'evaluated-once) (def fn-var (fn [] true)) ================================================ FILE: Units/parser-clojure.r/macros.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-clojure.r/macros.d/expected.tags ================================================ with-tree input.clj /^(defmacro with-tree$/;" m unless input.clj /^(defmacro unless [pred a b]$/;" m ================================================ FILE: Units/parser-clojure.r/macros.d/input.clj ================================================ ;; Taken from https://clojuredocs.org/clojure.core/defmacro (defmacro with-tree "works on a JTree and restores its expanded paths after executing body" [tree & body] `(let [tree# ~tree root# (.getRoot (.getModel tree#)) expanded# (if-let [x# (.getExpandedDescendants tree# (TreePath. root#))] (enumeration-seq x#) ()) selectionpaths# (. selectionmodel# getSelectionPaths)] ~@body (doseq [path# expanded#] (.expandPath tree# path#)))) (defmacro unless [pred a b] `(if (not ~pred) ~a ~b)) ================================================ FILE: Units/parser-clojure.r/simple-clojure.d/expected.tags ================================================ another.name input.clj /^(clojure.core\/ns another.name)$/;" n app.controller input.clj /^(ns app.controller)$/;" n core-function-with-body input.clj /^(clojure.core\/defn core-function-with-body []$/;" f namespace:app.controller empty-fn input.clj /^ (defn empty-fn [])$/;" f namespace:app.controller function-with-body input.clj /^(defn function-with-body []$/;" f namespace:app.controller x input.clj /^(defn x [])$/;" f namespace:another.name ================================================ FILE: Units/parser-clojure.r/simple-clojure.d/input.clj ================================================ (ns app.controller) (defn empty-fn []) (defn function-with-body [] (println "body")) (clojure.core/defn core-function-with-body [] (println "core")) '(defn quoted-function []) (quote quoted-function2 []) (clojure.core/ns another.name) (defn x []) ================================================ FILE: Units/parser-cmake.r/cmake-comments.d/expected.tags ================================================ another_good_target input.cmake /^add_library(another_good_target# <-- target$/;" t good_target input.cmake /^ good_target# this is legal comment placement set(NO_TAG foo)$/;" t tag_this input.cmake /^]]set(tag_this)$/;" v ================================================ FILE: Units/parser-cmake.r/cmake-comments.d/input.cmake ================================================ # this is a test of comments set(DO_NOT_TAG "foo") #[[ multi-linecomments option(DO_NOT_TAG "foo" OFF) ] not the end ]]set(tag_this) add_custom_target(# comment set(NO_TAG "foo") # anothe rline comment good_target# this is legal comment placement set(NO_TAG foo) ALL) add_library(another_good_target# <-- target SHARED # set(NO_TAG bar) gmock-all.cc ) ================================================ FILE: Units/parser-cmake.r/cmake-function.d/args.ctags ================================================ --fields=+ne ================================================ FILE: Units/parser-cmake.r/cmake-function.d/expected.tags ================================================ Bfunctiontag_this_2 input.cmake /^ function( Bfunctiontag_this_2 ${BAR})$/;" f line:3 end:4 a input.cmake /^function(a)$/;" f line:20 end:28 b input.cmake /^ function(b)$/;" f line:22 function:a end:27 c input.cmake /^ function(c)$/;" f line:24 function:a.b end:26 cxx_shared_library input.cmake /^function(cxx_shared_library#$/;" f line:6 end:9 d_ALSO_Tag_this input.cmake /^ d_ALSO_Tag_this#[[ set(foo) ]]$/;" f line:12 end:14 eLastlyTagThis_ input.cmake /^eLastlyTagThis_ "hello")$/;" f line:17 end:18 tag_this1 input.cmake /^function(tag_this1)$/;" f line:1 end:2 var1_in_func_a input.cmake /^ set(var1_in_func_a TRUE)$/;" v line:21 function:a var2_in_func_a_b input.cmake /^ set(var2_in_func_a_b TRUE)$/;" v line:23 function:a.b var3_in_func_a_b_c input.cmake /^ set(var3_in_func_a_b_c TRUE)$/;" v line:25 function:a.b.c var4_in_no_func input.cmake /^set(var4_in_no_func TRUE)$/;" v line:30 ================================================ FILE: Units/parser-cmake.r/cmake-function.d/input.cmake ================================================ function(tag_this1) endfunction(tag_this1) function( Bfunctiontag_this_2 ${BAR}) endfunction() function(cxx_shared_library# name cxx_flags) cxx_library_with_type(${name} SHARED "${cxx_flags}" ${ARGN}) endfunction() FUNCTION ( d_ALSO_Tag_this#[[ set(foo) ]] true) ENDFUNCTION() Function( eLastlyTagThis_ "hello") Endfunction() function(a) set(var1_in_func_a TRUE) function(b) set(var2_in_func_a_b TRUE) function(c) set(var3_in_func_a_b_c TRUE) endfunction(c) endfunction(b) endfunction(a) set(var4_in_no_func TRUE) function(${not_this} foo) function(not-this foo) function(not.this foo) function(1notthis foo) ================================================ FILE: Units/parser-cmake.r/cmake-macro.d/args.ctags ================================================ --fields=+ne ================================================ FILE: Units/parser-cmake.r/cmake-macro.d/expected.tags ================================================ Bmacrotag_this_2 input.cmake /^ macro( Bmacrotag_this_2 ${BAR})$/;" m line:3 a input.cmake /^macro(a)$/;" m line:20 cxx_shared_library input.cmake /^macro(cxx_shared_library#$/;" m line:6 d_ALSO_Tag_this input.cmake /^ d_ALSO_Tag_this#[[ set(foo) ]]$/;" m line:12 eLastlyTagThis_ input.cmake /^eLastlyTagThis_ "hello")$/;" m line:17 tag_this1 input.cmake /^macro(tag_this1)$/;" m line:1 var1_unscoped input.cmake /^ set(var1_unscoped TRUE)$/;" v line:21 ================================================ FILE: Units/parser-cmake.r/cmake-macro.d/input.cmake ================================================ macro(tag_this1) endmacro(tag_this1) macro( Bmacrotag_this_2 ${BAR}) endmacro() macro(cxx_shared_library# name cxx_flags) cxx_library_with_type(${name} SHARED "${cxx_flags}" ${ARGN}) endmacro() MACRO ( d_ALSO_Tag_this#[[ set(foo) ]] true) ENDMACRO() Macro( eLastlyTagThis_ "hello") Endmacro() macro(a) set(var1_unscoped TRUE) endmacro(a) macro(${not_this} foo) macro(not-this foo) macro(not.this foo) macro(1not_this foo) ================================================ FILE: Units/parser-cmake.r/cmake-option.d/expected.tags ================================================ 1_tag_this input.cmake /^option(1_tag_this foo)$/;" D B-option-tag_this_2 input.cmake /^option(B-option-tag_this_2 ${BAR})$/;" D c_TAG_THIS input.cmake /^ option ( c_TAG_THIS but_not_this)$/;" D d-ALSO-Tag.this input.cmake /^ d-ALSO-Tag.this$/;" D e.LastlyTagThis input.cmake /^e.LastlyTagThis "hello")$/;" D ================================================ FILE: Units/parser-cmake.r/cmake-option.d/input.cmake ================================================ option(1_tag_this foo) option(B-option-tag_this_2 ${BAR}) option ( c_TAG_THIS but_not_this) OPTION ( d-ALSO-Tag.this true) Option( e.LastlyTagThis "hello") option(${not_this} foo) option(${ not_this } foo) option(not~this foo) ================================================ FILE: Units/parser-cmake.r/cmake-project.d/expected.tags ================================================ 1_tag_this input.cmake /^project(1_tag_this)$/;" p B-project-tag_this_2 input.cmake /^project(B-project-tag_this_2 ${BAR})$/;" p c_TAG_THIS input.cmake /^ project ( c_TAG_THIS but_not_this)$/;" p d-ALSO-Tag.this input.cmake /^ d-ALSO-Tag.this$/;" p e.LastlyTagThis input.cmake /^e.LastlyTagThis "hello")$/;" p ================================================ FILE: Units/parser-cmake.r/cmake-project.d/input.cmake ================================================ project(1_tag_this) project(B-project-tag_this_2 ${BAR}) project ( c_TAG_THIS but_not_this) PROJECT ( d-ALSO-Tag.this ) Project( e.LastlyTagThis "hello") project(${not_this}) project(${ not_this }) project(not/this) ================================================ FILE: Units/parser-cmake.r/cmake-scoped-variable.d/args.ctags ================================================ --fields=+ne ================================================ FILE: Units/parser-cmake.r/cmake-scoped-variable.d/expected.tags ================================================ _var10 input.cmake /^ set (_var10 "\/FI\\"${_prefixFileNative}\\"" "\/FI\\"${_prefixFileNative}\\"")$/;" v line:24 function:cxx_shared_library _var11_unscoped input.cmake /^ set (_var11_unscoped "\/FI\\"${_prefixFileNative}\\"" "\/FI\\"${_prefixFileNative}\\"" PARENT_/;" v line:25 _var6 input.cmake /^ set (_var6 "-x ${_xLanguage_${_language}} -c \\"${_prefixFile}\\" -o \\"${_pchFile}\\"")$/;" v line:16 function:cxx_shared_library _var7_unscoped input.cmake /^ set (_var7_unscoped "-x ${_xLanguage_${_language}} -c \\"${_prefixFile}\\" -o \\"${_pchFile}\\/;" v line:17 _var8_unscoped input.cmake /^ _var8_unscoped$/;" v line:19 function:cxx_shared_library _var9 input.cmake /^ set (_var9 "\/FI\\"${_prefixFileNative}\\"")$/;" v line:23 function:cxx_shared_library a input.cmake /^function(a)$/;" f line:39 end:50 b input.cmake /^ function(b)$/;" f line:40 function:a end:49 c input.cmake /^ function(c ...)$/;" f line:45 function:a.b end:48 cxx_shared_library input.cmake /^function(cxx_shared_library name cxx_flags)$/;" f line:12 end:26 func1 input.cmake /^function(func1)$/;" f line:1 end:4 func2 input.cmake /^ function( func2 ${BAR})$/;" f line:6 end:10 func4 input.cmake /^ func4$/;" f line:29 end:33 macro1 input.cmake /^macro(macro1)$/;" m line:35 macro2 input.cmake /^ macro(macro2)$/;" m line:41 var1 input.cmake /^ set(var1 TRUE)$/;" v line:2 function:func1 var13_unscoped input.cmake /^ set(var13_unscoped TRUE)$/;" v line:36 var14_a_b input.cmake /^ set(var14_a_b TRUE)$/;" v line:42 function:a.b var15_a_b_c input.cmake /^ set(var15_a_b_c TRUE)$/;" v line:46 function:a.b.c var2 input.cmake /^ set(var2 "hello")$/;" v line:3 function:func1 var_12 input.cmake /^ SET ( var_12 "hello" foo ${bar})$/;" v line:31 function:func4 var_16_unscoped input.cmake /^ set(var_16_unscoped "hello \\"" ${ARGN} "\\" world" PARENT_SCOPE)$/;" v line:47 var_3_unscoped input.cmake /^ set ( var_3_unscoped "hello" PARENT_SCOPE)$/;" v line:7 var_4_unscoped input.cmake /^ set ( var_4_unscoped "hello" "world" PARENT_SCOPE)$/;" v line:8 var_5_unscoped input.cmake /^ set ( var_5_unscoped "hello \\"" ${ARGN} "\\" world" PARENT_SCOPE)$/;" v line:9 ================================================ FILE: Units/parser-cmake.r/cmake-scoped-variable.d/input.cmake ================================================ function(func1) set(var1 TRUE) set(var2 "hello") endfunction() function( func2 ${BAR}) set ( var_3_unscoped "hello" PARENT_SCOPE) set ( var_4_unscoped "hello" "world" PARENT_SCOPE) set ( var_5_unscoped "hello \"" ${ARGN} "\" world" PARENT_SCOPE) endfunction() function(cxx_shared_library name cxx_flags) cxx_library_with_type(${name} SHARED "${cxx_flags}" ${ARGN}) # yes cmake files reall have these types of things: set (_var6 "-x ${_xLanguage_${_language}} -c \"${_prefixFile}\" -o \"${_pchFile}\"") set (_var7_unscoped "-x ${_xLanguage_${_language}} -c \"${_prefixFile}\" -o \"${_pchFile}\"" PARENT_SCOPE) set ( _var8_unscoped "-x ${_xLanguage_${_language}} -c \"${_prefixFile}\" -o \"${_pchFile}\"" PARENT_SCOPE) set (_var9 "/FI\"${_prefixFileNative}\"") set (_var10 "/FI\"${_prefixFileNative}\"" "/FI\"${_prefixFileNative}\"") set (_var11_unscoped "/FI\"${_prefixFileNative}\"" "/FI\"${_prefixFileNative}\"" PARENT_SCOPE) endfunction() FUNCTION ( func4 true) SET ( var_12 "hello" foo ${bar}) ENDFUNCTION() macro(macro1) set(var13_unscoped TRUE) endmacro() function(a) function(b) macro(macro2) set(var14_a_b TRUE) endmacro() function(c ...) set(var15_a_b_c TRUE) set(var_16_unscoped "hello \"" ${ARGN} "\" world" PARENT_SCOPE) endfunction() endfunction() endfunction() ================================================ FILE: Units/parser-cmake.r/cmake-simple.d/expected.tags ================================================ BUILD_GMOCK input.cmake /^option(BUILD_GMOCK "Builds the googlemock subproject" ON)$/;" D BUILD_GTEST input.cmake /^option(BUILD_GTEST "Builds the googletest subproject" OFF)$/;" D CMAKE_INSTALL_BINDIR input.cmake /^ set(CMAKE_INSTALL_BINDIR "bin" CACHE STRING "User executables (bin)")$/;" v CMAKE_INSTALL_INCLUDEDIR input.cmake /^ set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE STRING "C header files (include)")$/;" v CMAKE_INSTALL_LIBDIR input.cmake /^ set(CMAKE_INSTALL_LIBDIR "lib${LIB_SUFFIX}" CACHE STRING "Object code libraries (lib)")$/;" v googletest-distribution input.cmake /^project( googletest-distribution )$/;" p ================================================ FILE: Units/parser-cmake.r/cmake-simple.d/input.cmake ================================================ # taken from https://github.com/google/googletest/blob/master/CMakeLists.txt cmake_minimum_required(VERSION 2.6.4) if (POLICY CMP0048) cmake_policy(SET CMP0048 NEW) endif (POLICY CMP0048) project( googletest-distribution ) enable_testing() include(CMakeDependentOption) if (CMAKE_VERSION VERSION_LESS 2.8.5) set(CMAKE_INSTALL_BINDIR "bin" CACHE STRING "User executables (bin)") set(CMAKE_INSTALL_LIBDIR "lib${LIB_SUFFIX}" CACHE STRING "Object code libraries (lib)") set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE STRING "C header files (include)") mark_as_advanced(CMAKE_INSTALL_BINDIR CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_INCLUDEDIR) else() include(GNUInstallDirs) endif() option(BUILD_GTEST "Builds the googletest subproject" OFF) #Note that googlemock target already builds googletest option(BUILD_GMOCK "Builds the googlemock subproject" ON) cmake_dependent_option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON "BUILD_GTEST OR BUILD_GMOCK" OFF) cmake_dependent_option(INSTALL_GMOCK "Enable installation of googlemock. (Projects embedding googlemock may want to turn this OFF.)" ON "BUILD_GMOCK" OFF) if(BUILD_GMOCK) add_subdirectory( googlemock ) elseif(BUILD_GTEST) add_subdirectory( googletest ) endif() ================================================ FILE: Units/parser-cmake.r/cmake-target.d/expected.tags ================================================ 1_tag_this input.cmake /^add_custom_target(1_tag_this)$/;" t 1_tag_this input.cmake /^add_executable(1_tag_this)$/;" t 1_tag_this input.cmake /^add_library(1_tag_this)$/;" t B-add_custom_target-tag_this_2 input.cmake /^add_custom_target(B-add_custom_target-tag_this_2 ${BAR})$/;" t B-add_executable-tag_this_2 input.cmake /^add_executable(B-add_executable-tag_this_2#[[ set(foo) ]]${BAR})$/;" t B-add_library-tag_this_2 input.cmake /^add_library(B-add_library-tag_this_2#$/;" t c_TAG_THIS input.cmake /^ add_custom_target ( c_TAG_THIS#$/;" t c_TAG_THIS input.cmake /^ add_executable ( c_TAG_THIS but_not_this)$/;" t c_TAG_THIS input.cmake /^ add_library ( c_TAG_THIS but_not_this)$/;" t d-ALSO-Tag.this input.cmake /^ d-ALSO-Tag.this$/;" t d-ALSO-Tag.this input.cmake /^ d-ALSO-Tag.this $/;" t d-ALSO-Tag.this input.cmake /^ d-ALSO-Tag.this$/;" t e.LastlyTagThis input.cmake /^e.LastlyTagThis "CustomTarget")$/;" t e.LastlyTagThis input.cmake /^e.LastlyTagThis "Executable")$/;" t e.LastlyTagThis input.cmake /^e.LastlyTagThis "Library")$/;" t ================================================ FILE: Units/parser-cmake.r/cmake-target.d/input.cmake ================================================ add_custom_target(1_tag_this) add_custom_target(B-add_custom_target-tag_this_2 ${BAR}) add_custom_target ( c_TAG_THIS# but_not_this) ADD_CUSTOM_TARGET ( d-ALSO-Tag.this ) Add_Custom_target( e.LastlyTagThis "CustomTarget") add_custom_target(${not_this}) add_custom_target(${ not_this }) add_custom_target(not/this) add_executable(1_tag_this) add_executable(B-add_executable-tag_this_2#[[ set(foo) ]]${BAR}) add_executable ( c_TAG_THIS but_not_this) ADD_EXECUTABLE ( d-ALSO-Tag.this ) Add_Executable( e.LastlyTagThis "Executable") add_executable(${not_this}) add_executable(${ not_this }) add_executable(not/this) add_library(1_tag_this) add_library(B-add_library-tag_this_2# ${BAR}) add_library ( c_TAG_THIS but_not_this) ADD_LIBRARY ( d-ALSO-Tag.this ) Add_Library( e.LastlyTagThis "Library") add_library(${not_this}) add_library(${ not_this }) add_library(not/this) ================================================ FILE: Units/parser-cmake.r/cmake-variable.d/expected.tags ================================================ 1_tag_this input.cmake /^set(1_tag_this foo)$/;" v B-set-tag_this_2 input.cmake /^set(B-set-tag_this_2 ${BAR})$/;" v c_TAG_THIS input.cmake /^ set ( c_TAG_THIS but_not_this)$/;" v d-ALSO-Tag.this input.cmake /^ d-ALSO-Tag.this$/;" v e.LastlyTagThis input.cmake /^e.LastlyTagThis "hello")$/;" v ================================================ FILE: Units/parser-cmake.r/cmake-variable.d/input.cmake ================================================ set(1_tag_this foo) set(B-set-tag_this_2 ${BAR}) set ( c_TAG_THIS but_not_this) SET ( d-ALSO-Tag.this true) Set( e.LastlyTagThis "hello") set(${not_this} foo) ================================================ FILE: Units/parser-cobol-to-review.r/HelloWorld.d/expected.tags ================================================ CONFIGURATION input.cbl /^ CONFIGURATION SECTION.$/;" s DATA input.cbl /^ DATA DIVISION.$/;" D ENVIRONMENT input.cbl /^ ENVIRONMENT DIVISION.$/;" D FILE input.cbl /^ FILE SECTION.$/;" s HelloWorld input.cbl /^ PROGRAM-ID. HelloWorld.$/;" P IDENTIFICATION input.cbl /^ IDENTIFICATION DIVISION.$/;" D INPUT-OUTPUT input.cbl /^ INPUT-OUTPUT SECTION.$/;" s MAIN-PROCEDURE input.cbl /^ MAIN-PROCEDURE.$/;" p PROCEDURE input.cbl /^ PROCEDURE DIVISION.$/;" D WORKING-STORAGE input.cbl /^ WORKING-STORAGE SECTION.$/;" s ================================================ FILE: Units/parser-cobol-to-review.r/HelloWorld.d/input.cbl ================================================ ****************************************************************** * Author: Colin Duquesnoy * Date: 23/02/2014 * Purpose: Hello world world example mean to test parser with a * non free syntax. * Tectonics: cobc ****************************************************************** IDENTIFICATION DIVISION. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- PROGRAM-ID. HelloWorld. ENVIRONMENT DIVISION. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- CONFIGURATION SECTION. *----------------------- INPUT-OUTPUT SECTION. *----------------------- DATA DIVISION. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- FILE SECTION. *----------------------- WORKING-STORAGE SECTION. *----------------------- PROCEDURE DIVISION. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- MAIN-PROCEDURE. ** * The main procedure of the program ** DISPLAY "Hello world" STOP RUN. ** add other procedures here END PROGRAM HelloWorld. ================================================ FILE: Units/parser-cobol-to-review.r/HelloWorldFree.d/args.ctags ================================================ --language-force=CobolFree ================================================ FILE: Units/parser-cobol-to-review.r/HelloWorldFree.d/expected.tags ================================================ CONFIGURATION input.cbl /^CONFIGURATION SECTION.$/;" s DATA input.cbl /^DATA DIVISION.$/;" D ENVIRONMENT input.cbl /^ENVIRONMENT DIVISION.$/;" D FILE input.cbl /^FILE SECTION.$/;" s IDENTIFICATION input.cbl /^IDENTIFICATION DIVISION.$/;" D INPUT-OUTPUT input.cbl /^INPUT-OUTPUT SECTION.$/;" s MAIN-PROCEDURE input.cbl /^MAIN-PROCEDURE.$/;" p PROCEDURE input.cbl /^PROCEDURE DIVISION.$/;" D WORKING-STORAGE input.cbl /^WORKING-STORAGE SECTION.$/;" s YOUR-PROGRAM-NAME input.cbl /^PROGRAM-ID. YOUR-PROGRAM-NAME.$/;" P ================================================ FILE: Units/parser-cobol-to-review.r/HelloWorldFree.d/input.cbl ================================================ IDENTIFICATION DIVISION. PROGRAM-ID. YOUR-PROGRAM-NAME. ENVIRONMENT DIVISION. CONFIGURATION SECTION. INPUT-OUTPUT SECTION. DATA DIVISION. FILE SECTION. WORKING-STORAGE SECTION. PROCEDURE DIVISION. MAIN-PROCEDURE. DISPLAY "Hello world" DISPLAY 'HAHA' STOP RUN. END PROGRAM YOUR-PROGRAM-NAME. ================================================ FILE: Units/parser-cobol-to-review.r/HelloWorldLatin1.d/expected.tags ================================================ CONFIGURATION input.cbl /^ CONFIGURATION SECTION.$/;" s DATA input.cbl /^ DATA DIVISION.$/;" D ENVIRONMENT input.cbl /^ ENVIRONMENT DIVISION.$/;" D FILE input.cbl /^ FILE SECTION.$/;" s IDENTIFICATION input.cbl /^ IDENTIFICATION DIVISION.$/;" D INPUT-OUTPUT input.cbl /^ INPUT-OUTPUT SECTION.$/;" s MAIN-PROCEDURE input.cbl /^ MAIN-PROCEDURE.$/;" p PROCEDURE input.cbl /^ PROCEDURE DIVISION.$/;" D WORKING-STORAGE input.cbl /^ WORKING-STORAGE SECTION.$/;" s YOUR-PROGRAM-NAME input.cbl /^ PROGRAM-ID. YOUR-PROGRAM-NAME.$/;" P ================================================ FILE: Units/parser-cobol-to-review.r/HelloWorldLatin1.d/input.cbl ================================================ ****************************************************************** * Author: Colin Duquesnoy * Date: 23/02/2014 * Purpose: Test d'un fichier encod en latin-1. * non free syntax. * Tectonics: cobc ****************************************************************** IDENTIFICATION DIVISION. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- PROGRAM-ID. YOUR-PROGRAM-NAME. ENVIRONMENT DIVISION. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- CONFIGURATION SECTION. *----------------------- INPUT-OUTPUT SECTION. *----------------------- DATA DIVISION. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- FILE SECTION. *----------------------- WORKING-STORAGE SECTION. *----------------------- PROCEDURE DIVISION. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- MAIN-PROCEDURE. ** * The main procedure of the program ** DISPLAY "Hello world" STOP RUN. ** add other procedures here END PROGRAM YOUR-PROGRAM-NAME. ================================================ FILE: Units/parser-cobol-to-review.r/MALFORMED.d/expected.tags ================================================ CONFIGURATION input.cbl /^ CONFIGURATION SECTION.$/;" s DATA input.cbl /^ DATA DIVISION.$/;" D ENVIRONMENT input.cbl /^ ENVIRONMENT DIVISION.$/;" D FILE input.cbl /^ FILE SECTION.$/;" s IDENTIFICATION input.cbl /^ IDENTIFICATION DIVISION.$/;" D INPUT-OUTPUT input.cbl /^ INPUT-OUTPUT SECTION.$/;" s MAIN-PROCEDURE input.cbl /^ MAIN-PROCEDURE.$/;" p PROCEDURE input.cbl /^ PROCEDURE DIVISION.$/;" D WORKING-STORAGE input.cbl /^ WORKING-STORAGE SECTION.$/;" s YOUR-PROGRAM-NAME input.cbl /^ PROGRAM-ID. YOUR-PROGRAM-NAME.$/;" P var input.cbl /^ 01 var PIC 99.$/;" d ================================================ FILE: Units/parser-cobol-to-review.r/MALFORMED.d/input.cbl ================================================ ****************************************************************** * Author: * Date: * Purpose: * Tectonics: cobc ****************************************************************** PROGRAM-ID. YOUR-PROGRAM-NAME. IDENTIFICATION DIVISION. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- CONFIGURATION SECTION. *----------------------- INPUT-OUTPUT SECTION. *----------------------- DATA DIVISION. 01 var PIC 99. 02 generate-a-p *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- FILE SECTION. *----------------------- WORKING-STORAGE SECTION. ENVIRONMENT DIVISION. *----------------------- PROCEDURE DIVISION. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- MAIN-PROCEDURE. ** * The main procedure of the program ** DISPLAY "Hello world" STOP RUN. ** add other procedures here END PROGRAM YOUR-PROGRAM-NAME. ================================================ FILE: Units/parser-cobol-to-review.r/README ================================================ Imported from https://github.com/OpenCobolIDE/OpenCobolIDE/tree/master/test/testfiles. https://github.com/OpenCobolIDE/OpenCobolIDE/ is GPLv3 ================================================ FILE: Units/parser-cobol-to-review.r/TEST-PRINTER.d/expected.tags ================================================ BUF-NB-LIGNES-PAR-PAGE input.cbl /^ 01 BUF-NB-LIGNES-PAR-PAGE PIC 99 VALUE 10.$/;" d DATA input.cbl /^ DATA DIVISION.$/;" D ENVIRONMENT input.cbl /^ ENVIRONMENT DIVISION.$/;" D FILE input.cbl /^ FILE SECTION.$/;" s HELLO-WORLD input.cbl /^ HELLO-WORLD.$/;" p IDENTIFICATION input.cbl /^ IDENTIFICATION DIVISION.$/;" D INPUT-OUTPUT input.cbl /^ INPUT-OUTPUT SECTION.$/;" s MAIN-PROCEDURE input.cbl /^ MAIN-PROCEDURE.$/;" p PA-BUFFER input.cbl /^ 02 PA-BUFFER PIC X(80) VALUE SPACES .$/;" d group:PRINTER-PARAM PA-HOWMANY input.cbl /^ 02 PA-HOWMANY PIC 99 VALUE 1 .$/;" d group:PRINTER-PARAM PA-RESET input.cbl /^ 02 PA-RESET PIC X VALUE "N" .$/;" d group:PRINTER-PARAM PA-WHAT input.cbl /^ 02 PA-WHAT PIC X(5) VALUE "LINES" .$/;" d group:PRINTER-PARAM PA-WHEN input.cbl /^ 02 PA-WHEN PIC X(6) VALUE "AFTER" .$/;" d group:PRINTER-PARAM PRINTER-PARAM input.cbl /^ 01 PRINTER-PARAM.$/;" g PROCEDURE input.cbl /^ PROCEDURE DIVISION.$/;" D TEST-PRINTER input.cbl /^ PROGRAM-ID. TEST-PRINTER.$/;" P WORKING-STORAGE input.cbl /^ WORKING-STORAGE SECTION.$/;" s ================================================ FILE: Units/parser-cobol-to-review.r/TEST-PRINTER.d/input.cbl ================================================ ******************************************************************* **================================================================= ** Ce programme teste le module VIRTUAL-PRINTER ** ** Auteurs: Colin Duquesnoy, Thomas Bertels ** Date: Mai 2013 ******************************************************************* IDENTIFICATION DIVISION. ************************************** PROGRAM-ID. TEST-PRINTER. ** ENVIRONMENT DIVISION. ************************************** ** INPUT-OUTPUT SECTION. **-*-*-*-*-*-*-*-*-*-*-*-*-* ** DATA DIVISION. ************************************** FILE SECTION. **-*-*-*-*-*-*-*-*-*-*-*-*-* ** WORKING-STORAGE SECTION. **-*-*-*-*-*-*-*-*-*-*-*-*-* 01 PRINTER-PARAM. 02 PA-RESET PIC X VALUE "N" . 02 PA-BUFFER PIC X(80) VALUE SPACES . 02 PA-WHEN PIC X(6) VALUE "AFTER" . 02 PA-WHAT PIC X(5) VALUE "LINES" . 02 PA-HOWMANY PIC 99 VALUE 1 . 01 BUF-NB-LIGNES-PAR-PAGE PIC 99 VALUE 10. ** PROCEDURE DIVISION. ************************************** MAIN-PROCEDURE. DISPLAY "Proj UF31: Test virtual printer" DISPLAY "Combien de lignes par pages desirez-vous ?" ACCEPT BUF-NB-LIGNES-PAR-PAGE MOVE "O" TO PA-RESET 01234A call "VIRTUAL-PRINTER" using PRINTER-PARAM MOVE "Bonjour" TO PA-BUFFER 01234A call "VIRTUAL-PRINTER" using PRINTER-PARAM MOVE "La vie est dure et pleine de confiture" to PA-BUFFER MOVE "LINES" TO PA-WHAT MOVE "BEFORE" TO PA-WHEN MOVE 5 TO PA-HOWMANY 01234A call "VIRTUAL-PRINTER" using PRINTER-PARAM MOVE "Bonjour" TO PA-BUFFER MOVE "PAGE" TO PA-WHAT MOVE "BEFORE" TO PA-WHEN 01234A call "VIRTUAL-PRINTER" using PRINTER-PARAM MOVE "Bye bye" TO PA-BUFFER 01234A call "VIRTUAL-PRINTER" using PRINTER-PARAM DISPLAY "End" STOP RUN. HELLO-WORLD. DISPLAY "Hello World!!". END PROGRAM TEST-PRINTER. ================================================ FILE: Units/parser-cobol-to-review.r/TEST-PRINTER2.d/expected.tags ================================================ BUF-NB-LIGNES-PAR-PAGE input.cbl /^ 01 BUF-NB-LIGNES-PAR-PAGE PIC 99 VALUE 10.$/;" d DATA input.cbl /^ DATA DIVISION.$/;" D ENVIRONMENT input.cbl /^ ENVIRONMENT DIVISION.$/;" D FILE input.cbl /^ FILE SECTION.$/;" s IDENTIFICATION input.cbl /^ IDENTIFICATION DIVISION.$/;" D INPUT-OUTPUT input.cbl /^ INPUT-OUTPUT SECTION.$/;" s MAIN-PROCEDURE input.cbl /^ MAIN-PROCEDURE.$/;" p PA-BUFFER input.cbl /^ 02 PA-BUFFER PIC X(80) VALUE SPACES .$/;" d group:PRINTER-PARAM PA-HOWMANY input.cbl /^ 02 PA-HOWMANY PIC 99 VALUE 1 .$/;" d group:PRINTER-PARAM PA-RESET input.cbl /^ 02 PA-RESET PIC X VALUE "N" .$/;" d group:PRINTER-PARAM PA-WHAT input.cbl /^ 02 PA-WHAT PIC X(5) VALUE "LINES" .$/;" d group:PRINTER-PARAM PA-WHEN input.cbl /^ 02 PA-WHEN PIC X(6) VALUE "AFTER" .$/;" d group:PRINTER-PARAM PRINTER-PARAM input.cbl /^ 01 PRINTER-PARAM.$/;" g PROCEDURE input.cbl /^ PROCEDURE DIVISION.$/;" D TEST-PRINTER input.cbl /^ PROGRAM-ID. TEST-PRINTER.$/;" P WORKING-STORAGE input.cbl /^ WORKING-STORAGE SECTION.$/;" s ================================================ FILE: Units/parser-cobol-to-review.r/TEST-PRINTER2.d/input.cbl ================================================ ******************************************************************* **================================================================= ** Ce programme teste le module VIRTUAL-PRINTER ** ** Auteurs: Colin Duquesnoy, Thomas Bertels ** Date: Mai 2013 ******************************************************************* IDENTIFICATION DIVISION. ************************************** PROGRAM-ID. TEST-PRINTER. ** ENVIRONMENT DIVISION. ************************************** ** INPUT-OUTPUT SECTION. **-*-*-*-*-*-*-*-*-*-*-*-*-* ** DATA DIVISION. ************************************** FILE SECTION. **-*-*-*-*-*-*-*-*-*-*-*-*-* ** WORKING-STORAGE SECTION. **-*-*-*-*-*-*-*-*-*-*-*-*-* 01 PRINTER-PARAM. 02 PA-RESET PIC X VALUE "N" . 02 PA-BUFFER PIC X(80) VALUE SPACES . 02 PA-WHEN PIC X(6) VALUE "AFTER" . 02 PA-WHAT PIC X(5) VALUE "LINES" . 02 PA-HOWMANY PIC 99 VALUE 1 . 01 BUF-NB-LIGNES-PAR-PAGE PIC 99 VALUE 10. ** PROCEDURE DIVISION. ************************************** MAIN-PROCEDURE. DISPLAY "Proj UF31: Test virtual printer" DISPLAY "Combien de lignes par pages desirez-vous ?" ACCEPT BUF-NB-LIGNES-PAR-PAGE MOVE "O" TO PA-RESET CALL "VIRTUAL-PRINTER" USING PRINTER-PARAM CALL "VIRTUAL-PRINTER2" USING PRINTER-PARAM END PROGRAM TEST-PRINTER. ================================================ FILE: Units/parser-cobol-to-review.r/TEST-PRINTER3.d/expected.tags ================================================ BUF-NB-LIGNES-PAR-PAGE input.cbl /^ 01 BUF-NB-LIGNES-PAR-PAGE PIC 99 VALUE 10.$/;" d DATA input.cbl /^ DATA DIVISION.$/;" D ENVIRONMENT input.cbl /^ ENVIRONMENT DIVISION.$/;" D FILE input.cbl /^ FILE SECTION.$/;" s HELLO-WORLD input.cbl /^ HELLO-WORLD.$/;" p IDENTIFICATION input.cbl /^ IDENTIFICATION DIVISION.$/;" D INPUT-OUTPUT input.cbl /^ INPUT-OUTPUT SECTION.$/;" s MAIN-PROCEDURE input.cbl /^ MAIN-PROCEDURE.$/;" p PA-BUFFER input.cbl /^ 02 PA-BUFFER PIC X(80) VALUE SPACES .$/;" d group:PRINTER-PARAM PA-HOWMANY input.cbl /^ 02 PA-HOWMANY PIC 99 VALUE 1 .$/;" d group:PRINTER-PARAM PA-RESET input.cbl /^ 02 PA-RESET PIC X VALUE "N" .$/;" d group:PRINTER-PARAM PA-WHAT input.cbl /^ 02 PA-WHAT PIC X(5) VALUE "LINES" .$/;" d group:PRINTER-PARAM PA-WHEN input.cbl /^ 02 PA-WHEN PIC X(6) VALUE "AFTER" .$/;" d group:PRINTER-PARAM PRINTER-PARAM input.cbl /^ 01 PRINTER-PARAM.$/;" g PROCEDURE input.cbl /^ PROCEDURE DIVISION.$/;" D TEST-PRINTER input.cbl /^ PROGRAM-ID. TEST-PRINTER.$/;" P WORKING-STORAGE input.cbl /^ WORKING-STORAGE SECTION.$/;" s ================================================ FILE: Units/parser-cobol-to-review.r/TEST-PRINTER3.d/input.cbl ================================================ ******************************************************************* **================================================================= ** Ce programme teste le module VIRTUAL-PRINTER ** ** Auteurs: Colin Duquesnoy, Thomas Bertels ** Date: Mai 2013 ******************************************************************* IDENTIFICATION DIVISION. ************************************** PROGRAM-ID. TEST-PRINTER. ** ENVIRONMENT DIVISION. ************************************** ** INPUT-OUTPUT SECTION. **-*-*-*-*-*-*-*-*-*-*-*-*-* ** DATA DIVISION. ************************************** FILE SECTION. **-*-*-*-*-*-*-*-*-*-*-*-*-* ** WORKING-STORAGE SECTION. **-*-*-*-*-*-*-*-*-*-*-*-*-* 01 PRINTER-PARAM. 02 PA-RESET PIC X VALUE "N" . 02 PA-BUFFER PIC X(80) VALUE SPACES . 02 PA-WHEN PIC X(6) VALUE "AFTER" . 02 PA-WHAT PIC X(5) VALUE "LINES" . 02 PA-HOWMANY PIC 99 VALUE 1 . 01 BUF-NB-LIGNES-PAR-PAGE PIC 99 VALUE 10. ** PROCEDURE DIVISION. ************************************** MAIN-PROCEDURE. DISPLAY "Proj UF31: Test virtual printer" DISPLAY "Combien de lignes par pages desirez-vous ?" ACCEPT BUF-NB-LIGNES-PAR-PAGE MOVE "O" TO PA-RESET CALL "VIRTUAL-PRINTER" USING PRINTER-PARAM MOVE "Bonjour" TO PA-BUFFER CALL "VIRTUAL-PRINTER" USING PRINTER-PARAM MOVE "La vie est dure et pleine de confiture" to PA-BUFFER MOVE "LINES" TO PA-WHAT MOVE "BEFORE" TO PA-WHEN MOVE 5 TO PA-HOWMANY CALL "VIRTUAL-PRINTER" USING PRINTER-PARAM MOVE "Bonjour" TO PA-BUFFER MOVE "PAGE" TO PA-WHAT MOVE "BEFORE" TO PA-WHEN CALL "VIRTUAL-PRINTER" USING PRINTER-PARAM MOVE "Bye bye" TO PA-BUFFER CALL "VIRTUAL-PRINTER" USING PRINTER-PARAM DISPLAY "End" STOP RUN. HELLO-WORLD. DISPLAY "Hello World!!". END PROGRAM TEST-PRINTER. ================================================ FILE: Units/parser-cobol-to-review.r/TEST-SINGLE-QUOTES.d/expected.tags ================================================ DATA input.cbl /^ DATA DIVISION.$/;" D ENVIRONMENT input.cbl /^ ENVIRONMENT DIVISION.$/;" D FILE input.cbl /^ FILE SECTION.$/;" s HELLO-WORLD input.cbl /^ HELLO-WORLD.$/;" p IDENTIFICATION input.cbl /^ IDENTIFICATION DIVISION.$/;" D INPUT-OUTPUT input.cbl /^ INPUT-OUTPUT SECTION.$/;" s MAIN-PROCEDURE input.cbl /^ MAIN-PROCEDURE.$/;" p PA-BUFFER input.cbl /^ 02 PA-BUFFER PIC X(80) VALUE SPACES .$/;" d group:PRINTER-PARAM PA-HOWMANY input.cbl /^ 02 PA-HOWMANY PIC 99 VALUE 1 .$/;" d group:PRINTER-PARAM PA-RESET input.cbl /^ 02 PA-RESET PIC X VALUE "N" .$/;" d group:PRINTER-PARAM PA-WHAT input.cbl /^ 02 PA-WHAT PIC X(5) VALUE "LINES" .$/;" d group:PRINTER-PARAM PA-WHEN input.cbl /^ 02 PA-WHEN PIC X(6) VALUE "AFTER" .$/;" d group:PRINTER-PARAM PRINTER-PARAM input.cbl /^ 01 PRINTER-PARAM.$/;" g PROCEDURE input.cbl /^ PROCEDURE DIVISION.$/;" D TEST-PRINTER input.cbl /^ PROGRAM-ID. TEST-PRINTER.$/;" P WORKING-STORAGE input.cbl /^ WORKING-STORAGE SECTION.$/;" s ================================================ FILE: Units/parser-cobol-to-review.r/TEST-SINGLE-QUOTES.d/input.cbl ================================================ ******************************************************************* **================================================================= ** Ce programme teste le module VIRTUAL-PRINTER ** ** Auteurs: Colin Duquesnoy, Thomas Bertels ** Date: Mai 2013 ******************************************************************* IDENTIFICATION DIVISION. ************************************** PROGRAM-ID. TEST-PRINTER. ** ENVIRONMENT DIVISION. ************************************** ** INPUT-OUTPUT SECTION. **-*-*-*-*-*-*-*-*-*-*-*-*-* ** DATA DIVISION. ************************************** FILE SECTION. **-*-*-*-*-*-*-*-*-*-*-*-*-* ** WORKING-STORAGE SECTION. **-*-*-*-*-*-*-*-*-*-*-*-*-* 01 PRINTER-PARAM. 02 PA-RESET PIC X VALUE "N" . 02 PA-BUFFER PIC X(80) VALUE SPACES . 02 PA-WHEN PIC X(6) VALUE "AFTER" . 02 PA-WHAT PIC X(5) VALUE "LINES" . 02 PA-HOWMANY PIC 99 VALUE 1 . ** PROCEDURE DIVISION. ************************************** MAIN-PROCEDURE. DISPLAY "Proj UF31: Test virtual printer" MOVE "O" TO PA-RESET CALL 'VIRTUAL-PRINTER' USING PRINTER-PARAM MOVE "Bonjour" TO PA-BUFFER CALL 'VIRTUAL-PRINTER' USING PRINTER-PARAM MOVE "La vie est dure et pleine de confiture" to PA-BUFFER MOVE "LINES" TO PA-WHAT MOVE "BEFORE" TO PA-WHEN MOVE 5 TO PA-HOWMANY CALL 'VIRTUAL-PRINTER' USING PRINTER-PARAM MOVE "Bonjour" TO PA-BUFFER MOVE "PAGE" TO PA-WHAT MOVE "BEFORE" TO PA-WHEN CALL 'VIRTUAL-PRINTER' USING PRINTER-PARAM MOVE "Bye bye" TO PA-BUFFER CALL 'VIRTUAL-PRINTER' USING PRINTER-PARAM DISPLAY "End" STOP RUN. HELLO-WORLD. DISPLAY "Hello World!!". END PROGRAM TEST-PRINTER. ================================================ FILE: Units/parser-cobol-to-review.r/VIRTUAL-PRINTER.d/expected.tags ================================================ DATA input.cbl /^ DATA DIVISION.$/;" D ENREG-PRINTER input.cbl /^ 01 ENREG-PRINTER PIC X(80).$/;" d ENVIRONMENT input.cbl /^ ENVIRONMENT DIVISION.$/;" D FILE input.cbl /^ FILE SECTION.$/;" s FILE-CONTROL input.cbl /^ FILE-CONTROL.$/;" p FPRINTER input.cbl /^ FD FPRINTER.$/;" f IDENTIFICATION input.cbl /^ IDENTIFICATION DIVISION.$/;" D INPUT-OUTPUT input.cbl /^ INPUT-OUTPUT SECTION.$/;" s LINKAGE input.cbl /^ LINKAGE SECTION.$/;" s MAIN-PRINTER input.cbl /^ MAIN-PRINTER.$/;" p PA-BUFFER input.cbl /^ 02 PA-BUFFER PIC X(80) .$/;" d group:RECEIVED-PARAM PA-HOWMANY input.cbl /^ 02 PA-HOWMANY PIC 99 .$/;" d group:RECEIVED-PARAM PA-RESET input.cbl /^ 02 PA-RESET PIC X .$/;" d group:RECEIVED-PARAM PA-WHAT input.cbl /^ 02 PA-WHAT PIC X(5) .$/;" d group:RECEIVED-PARAM PA-WHEN input.cbl /^ 02 PA-WHEN PIC X(6) .$/;" d group:RECEIVED-PARAM RECEIVED-PARAM input.cbl /^ 01 RECEIVED-PARAM.$/;" g VIRTUAL-PRINTER input.cbl /^ PROGRAM-ID. VIRTUAL-PRINTER.$/;" P WORKING-STORAGE input.cbl /^ WORKING-STORAGE SECTION.$/;" s ================================================ FILE: Units/parser-cobol-to-review.r/VIRTUAL-PRINTER.d/input.cbl ================================================ ******************************************************************* ** Virtual printer subprogram ******************************************************************* IDENTIFICATION DIVISION. ************************************** PROGRAM-ID. VIRTUAL-PRINTER. ** ENVIRONMENT DIVISION. *************************************** ** INPUT-OUTPUT SECTION. **-*-*-*-*-*-*-*-*-*-*-*-*-* FILE-CONTROL. SELECT FPRINTER ASSIGN to "./printer.dat" ORGANIZATION LINE SEQUENTIAL ACCESS SEQUENTIAL. ** DATA DIVISION. ************************************** FILE SECTION. **-*-*-*-*-*-*-*-*-*-*-*-*-* FD FPRINTER. 01 ENREG-PRINTER PIC X(80). ** WORKING-STORAGE SECTION. **-*-*-*-*-*-*-*-*-*-*-*-*-* LINKAGE SECTION. **-*-*-*-*-*-*-*-*-*-*-*-*-* 01 RECEIVED-PARAM. 02 PA-RESET PIC X . 02 PA-BUFFER PIC X(80) . 02 PA-WHEN PIC X(6) . 02 PA-WHAT PIC X(5) . 02 PA-HOWMANY PIC 99 . PROCEDURE DIVISION USING RECEIVED-PARAM. ************************************** MAIN-PRINTER. IF(PA-RESET = "O") OPEN OUTPUT FPRINTER if(PA-WHEN = "AFTER") if(PA-WHEN = "AFTER") WRITE ENREG-PRINTER END-IF END-IF ELSE OPEN EXTEND FPRINTER IF(PA-WHEN = "AFTER") IF(PA-WHAT = "PAGE") MOVE '>------------------------------------------' -'------------------------------------<' TO ENREG-PRINTER WRITE ENREG-PRINTER ELSE SUBTRACT 1 FROM PA-HOWMANY PERFORM PA-HOWMANY TIMES MOVE SPACES TO ENREG-PRINTER WRITE ENREG-PRINTER END-PERFORM END-IF END-IF WRITE ENREG-PRINTER FROM PA-BUFFER IF(PA-WHEN = "BEFORE") IF(PA-WHAT = "PAGE") MOVE '>------------------------------------------' -'------------------------------------<' TO ENREG-PRINTER WRITE ENREG-PRINTER ELSE SUBTRACT 1 FROM PA-HOWMANY PERFORM PA-HOWMANY TIMES MOVE SPACES TO ENREG-PRINTER WRITE ENREG-PRINTER END-PERFORM END-IF END-IF END-IF CLOSE FPRINTER MOVE "N" TO PA-RESET MOVE SPACES TO PA-BUFFER MOVE "AFTER" TO PA-WHEN MOVE "LINES" TO PA-WHAT MOVE 1 TO PA-HOWMANY EXIT PROGRAM. END PROGRAM VIRTUAL-PRINTER. ================================================ FILE: Units/parser-cobol-to-review.r/VIRTUAL-PRINTER2.d/args.ctags ================================================ --language-force=CobolVariable ================================================ FILE: Units/parser-cobol-to-review.r/VIRTUAL-PRINTER2.d/expected.tags ================================================ DATA input.cbl /^ DATA DIVISION.$/;" D ENREG-PRINTER input.cbl /^ 01 ENREG-PRINTER PIC X(80).$/;" d ENVIRONMENT input.cbl /^ ENVIRONMENT DIVISION.$/;" D FILE input.cbl /^ FILE SECTION.$/;" s FILE-CONTROL input.cbl /^ FILE-CONTROL.$/;" p FPRINTER input.cbl /^ FD FPRINTER.$/;" f IDENTIFICATION input.cbl /^ IDENTIFICATION DIVISION.$/;" D INPUT-OUTPUT input.cbl /^ INPUT-OUTPUT SECTION.$/;" s LINKAGE input.cbl /^ LINKAGE SECTION.$/;" s MAIN-PRINTER input.cbl /^ MAIN-PRINTER.$/;" p PA-BUFFER input.cbl /^ 02 PA-BUFFER PIC X(80) .$/;" d group:RECEIVED-PARAM PA-HOWMANY input.cbl /^ 02 PA-HOWMANY PIC 99 .$/;" d group:RECEIVED-PARAM PA-RESET input.cbl /^ 02 PA-RESET PIC X .$/;" d group:RECEIVED-PARAM PA-WHAT input.cbl /^ 02 PA-WHAT PIC X(5) .$/;" d group:RECEIVED-PARAM PA-WHEN input.cbl /^ 02 PA-WHEN PIC X(6) .$/;" d group:RECEIVED-PARAM RECEIVED-PARAM input.cbl /^ RECEIVED-PARAM.$/;" p RECEIVED-PARAM input.cbl /^ 01 RECEIVED-PARAM.$/;" g VIRTUAL-PRINTER input.cbl /^ PROGRAM-ID. VIRTUAL-PRINTER.$/;" P WORKING-STORAGE input.cbl /^ WORKING-STORAGE SECTION.$/;" s ================================================ FILE: Units/parser-cobol-to-review.r/VIRTUAL-PRINTER2.d/input.cbl ================================================ ******************************************************************* ** Virtual printer subprogram ******************************************************************* IDENTIFICATION DIVISION. ************************************** PROGRAM-ID. VIRTUAL-PRINTER. ** ENVIRONMENT DIVISION. *************************************** ** INPUT-OUTPUT SECTION. **-*-*-*-*-*-*-*-*-*-*-*-*-* FILE-CONTROL. SELECT FPRINTER ASSIGN to "./printer.dat" ORGANIZATION LINE SEQUENTIAL ACCESS SEQUENTIAL. ** DATA DIVISION. ************************************** FILE SECTION. **-*-*-*-*-*-*-*-*-*-*-*-*-* FD FPRINTER. 01 ENREG-PRINTER PIC X(80). ** WORKING-STORAGE SECTION. **-*-*-*-*-*-*-*-*-*-*-*-*-* LINKAGE SECTION. **-*-*-*-*-*-*-*-*-*-*-*-*-* 01 RECEIVED-PARAM. 02 PA-RESET PIC X . 02 PA-BUFFER PIC X(80) . 02 PA-WHEN PIC X(6) . 02 PA-WHAT PIC X(5) . 02 PA-HOWMANY PIC 99 . PROCEDURE DIVISION USING RECEIVED-PARAM. ************************************** MAIN-PRINTER. IF(PA-RESET = "O") OPEN OUTPUT FPRINTER ELSE OPEN EXTEND FPRINTER IF(PA-WHEN = "AFTER") IF(PA-WHAT = "PAGE") MOVE '>------------------------------------------' -'------------------------------------<' TO ENREG-PRINTER WRITE ENREG-PRINTER ELSE SUBTRACT 1 FROM PA-HOWMANY PERFORM PA-HOWMANY TIMES MOVE SPACES TO ENREG-PRINTER WRITE ENREG-PRINTER END-PERFORM END-IF END-IF WRITE ENREG-PRINTER FROM PA-BUFFER IF(PA-WHEN = "BEFORE") IF(PA-WHAT = "PAGE") MOVE '>------------------------------------------' -'------------------------------------<' TO ENREG-PRINTER WRITE ENREG-PRINTER ELSE SUBTRACT 1 FROM PA-HOWMANY PERFORM PA-HOWMANY TIMES MOVE SPACES TO ENREG-PRINTER WRITE ENREG-PRINTER END-PERFORM END-IF END-IF END-IF CLOSE FPRINTER MOVE "N" TO PA-RESET MOVE SPACES TO PA-BUFFER MOVE "AFTER" TO PA-WHEN MOVE "LINES" TO PA-WHAT MOVE 1 TO PA-HOWMANY EXIT PROGRAM. END PROGRAM VIRTUAL-PRINTER. ================================================ FILE: Units/parser-cobol-to-review2.r/FETCHTBL.d/expected.tags ================================================ AUTHOR input.cbl /^ AUTHOR. TSH.$/;" p D-EMP-NAME input.cbl /^ 05 D-EMP-NAME PIC X(20).$/;" d group:D-EMP-REC D-EMP-NO input.cbl /^ 05 D-EMP-NO PIC 9(04).$/;" d group:D-EMP-REC D-EMP-REC input.cbl /^ 01 D-EMP-REC.$/;" g D-EMP-SALARY input.cbl /^ 05 D-EMP-SALARY PIC --,--9.$/;" d group:D-EMP-REC DATA input.cbl /^ DATA DIVISION.$/;" D DATE-WRITTEN input.cbl /^ DATE-WRITTEN. 2013-06-28.$/;" p DBNAME input.cbl /^ 01 DBNAME PIC X(30) VALUE SPACE.$/;" d EMP-CNT input.cbl /^ 01 EMP-CNT PIC 9(04).$/;" d EMP-NAME input.cbl /^ 05 EMP-NAME PIC X(20) .$/;" d group:EMP-REC-VARS EMP-NO input.cbl /^ 05 EMP-NO PIC S9(04).$/;" d group:EMP-REC-VARS EMP-REC-VARS input.cbl /^ 01 EMP-REC-VARS.$/;" g EMP-SALARY input.cbl /^ 05 EMP-SALARY PIC S9(04).$/;" d group:EMP-REC-VARS END-EVALUATE input.cbl /^ END-EVALUATE.$/;" p END-PERFORM input.cbl /^ END-PERFORM.$/;" p ERROR-RTN input.cbl /^ ERROR-RTN.$/;" p FETCHTBL input.cbl /^ PROGRAM-ID. FETCHTBL.$/;" P IDENTIFICATION input.cbl /^ IDENTIFICATION DIVISION.$/;" D MAIN-RTN input.cbl /^ MAIN-RTN.$/;" p PASSWD input.cbl /^ 01 PASSWD PIC X(10) VALUE SPACE.$/;" d PROCEDURE input.cbl /^ PROCEDURE DIVISION.$/;" D USERNAME input.cbl /^ 01 USERNAME PIC X(30) VALUE SPACE.$/;" d WORKING-STORAGE input.cbl /^ WORKING-STORAGE SECTION.$/;" s ================================================ FILE: Units/parser-cobol-to-review2.r/FETCHTBL.d/input.cbl ================================================ ****************************************************************** * Open Cobol ESQL (Ocesql) Sample Program * * FETCHTBL --- demonstrates CONNECT, SELECT COUNT(*), * DECLARE cursor, FETCH cursor, COMMIT, * ROLLBACK, DISCONNECT * * Copyright 2013 Tokyo System House Co., Ltd. ****************************************************************** IDENTIFICATION DIVISION. ****************************************************************** PROGRAM-ID. FETCHTBL. AUTHOR. TSH. DATE-WRITTEN. 2013-06-28. ****************************************************************** DATA DIVISION. ****************************************************************** WORKING-STORAGE SECTION. 01 D-EMP-REC. 05 D-EMP-NO PIC 9(04). 05 FILLER PIC X. 05 D-EMP-NAME PIC X(20). 05 FILLER PIC X. 05 D-EMP-SALARY PIC --,--9. EXEC SQL BEGIN DECLARE SECTION END-EXEC. 01 DBNAME PIC X(30) VALUE SPACE. 01 USERNAME PIC X(30) VALUE SPACE. 01 PASSWD PIC X(10) VALUE SPACE. 01 EMP-REC-VARS. 05 EMP-NO PIC S9(04). 05 EMP-NAME PIC X(20) . 05 EMP-SALARY PIC S9(04). 01 EMP-CNT PIC 9(04). EXEC SQL END DECLARE SECTION END-EXEC. EXEC SQL INCLUDE SQLCA END-EXEC. ****************************************************************** PROCEDURE DIVISION. ****************************************************************** MAIN-RTN. DISPLAY "*** FETCHTBL STARTED ***". * WHENEVER IS NOT YET SUPPORTED :( * EXEC SQL WHENEVER SQLERROR PERFORM ERROR-RTN END-EXEC. * CONNECT MOVE "testdb" TO DBNAME. MOVE "postgres" TO USERNAME. MOVE SPACE TO PASSWD. EXEC SQL CONNECT :USERNAME IDENTIFIED BY :PASSWD USING :DBNAME END-EXEC. IF SQLCODE NOT = ZERO PERFORM ERROR-RTN STOP RUN. * SELECT COUNT(*) INTO HOST-VARIABLE EXEC SQL SELECT COUNT(*) INTO :EMP-CNT FROM EMP END-EXEC. DISPLAY "TOTAL RECORD: " EMP-CNT. * DECLARE CURSOR EXEC SQL DECLARE C1 CURSOR FOR SELECT EMP_NO, EMP_NAME, EMP_SALARY FROM EMP ORDER BY EMP_NO END-EXEC. EXEC SQL OPEN C1 END-EXEC. * FETCH DISPLAY "---- -------------------- ------". DISPLAY "NO NAME SALARY". DISPLAY "---- -------------------- ------". EXEC SQL FETCH C1 INTO :EMP-NO, :EMP-NAME, :EMP-SALARY END-EXEC. PERFORM UNTIL SQLCODE NOT = ZERO MOVE EMP-NO TO D-EMP-NO MOVE EMP-NAME TO D-EMP-NAME MOVE EMP-SALARY TO D-EMP-SALARY DISPLAY D-EMP-REC EXEC SQL FETCH C1 INTO :EMP-NO, :EMP-NAME, :EMP-SALARY END-EXEC END-PERFORM. * CLOSE CURSOR EXEC SQL CLOSE C1 END-EXEC. * COMMIT EXEC SQL COMMIT WORK END-EXEC. * DISCONNECT EXEC SQL DISCONNECT ALL END-EXEC. * END DISPLAY "*** FETCHTBL FINISHED ***". STOP RUN. ****************************************************************** ERROR-RTN. ****************************************************************** DISPLAY "*** SQL ERROR ***". DISPLAY "SQLCODE: " SQLCODE " " NO ADVANCING. EVALUATE SQLCODE WHEN +10 DISPLAY "Record not found" WHEN -01 DISPLAY "Connection falied" WHEN -20 DISPLAY "Internal error" WHEN -30 DISPLAY "PostgreSQL error" DISPLAY "ERRCODE: " SQLSTATE DISPLAY SQLERRMC *> TO RESTART TRANSACTION, DO ROLLBACK. EXEC SQL ROLLBACK END-EXEC WHEN OTHER DISPLAY "Undefined error" DISPLAY "ERRCODE: " SQLSTATE DISPLAY SQLERRMC END-EVALUATE. ****************************************************************** ================================================ FILE: Units/parser-cobol-to-review2.r/INSERTTBL.d/expected.tags ================================================ AUTHOR input.cbl /^ AUTHOR. TSH.$/;" p DATA input.cbl /^ DATA DIVISION.$/;" D DATE-WRITTEN input.cbl /^ DATE-WRITTEN. 2013-06-28.$/;" p DBNAME input.cbl /^ 01 DBNAME PIC X(30) VALUE SPACE.$/;" d EMP-NAME input.cbl /^ 03 EMP-NAME PIC X(20) .$/;" d group:EMP-REC-VARS EMP-NO input.cbl /^ 03 EMP-NO PIC S9(04) VALUE ZERO.$/;" d group:EMP-REC-VARS EMP-REC-VARS input.cbl /^ 01 EMP-REC-VARS.$/;" g EMP-SALARY input.cbl /^ 03 EMP-SALARY PIC S9(04) VALUE ZERO.$/;" d group:EMP-REC-VARS END-EVALUATE input.cbl /^ END-EVALUATE.$/;" p END-PERFORM input.cbl /^ END-PERFORM.$/;" p ERROR-RTN input.cbl /^ ERROR-RTN.$/;" p IDENTIFICATION input.cbl /^ IDENTIFICATION DIVISION.$/;" D IDX input.cbl /^ 01 IDX PIC 9(02).$/;" d INSERTTBL input.cbl /^ PROGRAM-ID. INSERTTBL.$/;" P MAIN-RTN input.cbl /^ MAIN-RTN.$/;" p PASSWD input.cbl /^ 01 PASSWD PIC X(10) VALUE SPACE.$/;" d PROCEDURE input.cbl /^ PROCEDURE DIVISION.$/;" D SYS-TIME input.cbl /^ 01 SYS-TIME PIC 9(08).$/;" d TEST-DATA input.cbl /^ 01 TEST-DATA.$/;" g TEST-DATA-R input.cbl /^ 01 TEST-DATA-R REDEFINES TEST-DATA.$/;" d TEST-NAME input.cbl /^ 05 TEST-NAME PIC X(20) .$/;" d data:TEST-DATA-R.TEST-TBL TEST-NO input.cbl /^ 05 TEST-NO PIC S9(04).$/;" d data:TEST-DATA-R.TEST-TBL TEST-SALARY input.cbl /^ 05 TEST-SALARY PIC S9(04).$/;" d data:TEST-DATA-R.TEST-TBL TEST-TBL input.cbl /^ 03 TEST-TBL OCCURS 10.$/;" d data:TEST-DATA-R USERNAME input.cbl /^ 01 USERNAME PIC X(30) VALUE SPACE.$/;" d WORKING-STORAGE input.cbl /^ WORKING-STORAGE SECTION.$/;" s ================================================ FILE: Units/parser-cobol-to-review2.r/INSERTTBL.d/input.cbl ================================================ ****************************************************************** * Open Cobol ESQL (Ocesql) Sample Program * * INSERTTBL -- demonstrates CONNECT, DROP TABLE, CREATE TABLE, * INSERT rows, COMMIT, ROLLBACK, DISCONNECT * * Copyright 2013 Tokyo System House Co., Ltd. ****************************************************************** IDENTIFICATION DIVISION. ****************************************************************** PROGRAM-ID. INSERTTBL. AUTHOR. TSH. DATE-WRITTEN. 2013-06-28. ****************************************************************** DATA DIVISION. ****************************************************************** WORKING-STORAGE SECTION. 01 TEST-DATA. *>"---+++++++++++++++++++++----" * 03 FILLER PIC X(28) VALUE "0001HOKKAI TARO 0400". * 03 FILLER PIC X(28) VALUE "0002AOMORI JIRO 0350". * 03 FILLER PIC X(28) VALUE "0003AKITA SABURO 0300". * 03 FILLER PIC X(28) VALUE "0004IWATE SHIRO 025p". * 03 FILLER PIC X(28) VALUE "0005MIYAGI GORO 020p". * 03 FILLER PIC X(28) VALUE "0006FUKUSHIMA RIKURO 0150". * 03 FILLER PIC X(28) VALUE "0007TOCHIGI SHICHIRO 010p". * 03 FILLER PIC X(28) VALUE "0008IBARAKI HACHIRO 0050". * 03 FILLER PIC X(28) VALUE "0009GUMMA KURO 020p". * 03 FILLER PIC X(28) VALUE "0010SAITAMA JURO 0350". 03 FILLER PIC X(28) VALUE "0001kC@Y 0400". 03 FILLER PIC X(28) VALUE "0002X@Y 0350". 03 FILLER PIC X(28) VALUE "0003Hc@OY 0300". 03 FILLER PIC X(28) VALUE "0004@lY 025p". 03 FILLER PIC X(28) VALUE "0005{@ܘY 020p". 03 FILLER PIC X(28) VALUE "0006@ZY 0150". 03 FILLER PIC X(28) VALUE "0007Ȗ؁@Y 010p". 03 FILLER PIC X(28) VALUE "0008@Y 0050". 03 FILLER PIC X(28) VALUE "0009Qn@Y 020p". 03 FILLER PIC X(28) VALUE "0010ʁ@\Y 0350". 01 TEST-DATA-R REDEFINES TEST-DATA. 03 TEST-TBL OCCURS 10. 05 TEST-NO PIC S9(04). 05 TEST-NAME PIC X(20) . 05 TEST-SALARY PIC S9(04). 01 IDX PIC 9(02). 01 SYS-TIME PIC 9(08). EXEC SQL BEGIN DECLARE SECTION END-EXEC. 01 DBNAME PIC X(30) VALUE SPACE. 01 USERNAME PIC X(30) VALUE SPACE. 01 PASSWD PIC X(10) VALUE SPACE. 01 EMP-REC-VARS. 03 EMP-NO PIC S9(04) VALUE ZERO. 03 EMP-NAME PIC X(20) . 03 EMP-SALARY PIC S9(04) VALUE ZERO. EXEC SQL END DECLARE SECTION END-EXEC. EXEC SQL INCLUDE SQLCA END-EXEC. ****************************************************************** PROCEDURE DIVISION. ****************************************************************** MAIN-RTN. DISPLAY "*** INSERTTBL STARTED ***". * WHENEVER IS NOT YET SUPPORTED :( * EXEC SQL WHENEVER SQLERROR PERFORM ERROR-RTN END-EXEC. * CONNECT MOVE "testdb" TO DBNAME. MOVE "postgres" TO USERNAME. MOVE SPACE TO PASSWD. EXEC SQL CONNECT :USERNAME IDENTIFIED BY :PASSWD USING :DBNAME END-EXEC. IF SQLCODE NOT = ZERO PERFORM ERROR-RTN STOP RUN. * DROP TABLE EXEC SQL DROP TABLE IF EXISTS EMP END-EXEC. IF SQLCODE NOT = ZERO PERFORM ERROR-RTN. * CREATE TABLE EXEC SQL CREATE TABLE EMP ( EMP_NO NUMERIC(4,0) NOT NULL, EMP_NAME CHAR(20), EMP_SALARY NUMERIC(4,0), CONSTRAINT IEMP_0 PRIMARY KEY (EMP_NO) ) END-EXEC. IF SQLCODE NOT = ZERO PERFORM ERROR-RTN STOP RUN. * INSERT ROWS USING LITERAL EXEC SQL * INSERT INTO EMP VALUES (46, 'KAGOSHIMA ROKURO', -320) INSERT INTO EMP VALUES (46, '@ZY', -320) END-EXEC. IF SQLCODE NOT = ZERO PERFORM ERROR-RTN. EXEC SQL * INSERT INTO EMP VALUES (47, 'OKINAWA SHICHIRO', 480) INSERT INTO EMP VALUES (47, '@Y', 480) END-EXEC. IF SQLCODE NOT = ZERO PERFORM ERROR-RTN. * INSERT ROWS USING HOST VARIABLE PERFORM VARYING IDX FROM 1 BY 1 UNTIL IDX > 10 MOVE TEST-NO(IDX) TO EMP-NO MOVE TEST-NAME(IDX) TO EMP-NAME MOVE TEST-SALARY(IDX) TO EMP-SALARY EXEC SQL INSERT INTO EMP VALUES (:EMP-NO,:EMP-NAME,:EMP-SALARY) END-EXEC IF SQLCODE NOT = ZERO PERFORM ERROR-RTN EXIT PERFORM END-IF END-PERFORM. * COMMIT EXEC SQL COMMIT WORK END-EXEC. * DISCONNECT EXEC SQL DISCONNECT ALL END-EXEC. * END DISPLAY "*** INSERTTBL FINISHED ***". STOP RUN. ****************************************************************** ERROR-RTN. ****************************************************************** DISPLAY "*** SQL ERROR ***". DISPLAY "SQLCODE: " SQLCODE " " NO ADVANCING. EVALUATE SQLCODE WHEN +10 DISPLAY "Record not found" WHEN -01 DISPLAY "Connection falied" WHEN -20 DISPLAY "Internal error" WHEN -30 DISPLAY "PostgreSQL error" DISPLAY "ERRCODE: " SQLSTATE DISPLAY SQLERRMC *> TO RESTART TRANSACTION, DO ROLLBACK. EXEC SQL ROLLBACK END-EXEC WHEN OTHER DISPLAY "Undefined error" DISPLAY "ERRCODE: " SQLSTATE DISPLAY SQLERRMC END-EVALUATE. ****************************************************************** ================================================ FILE: Units/parser-cobol-to-review2.r/README ================================================ License: GPLv2+ Taken from https://github.com/opensourcecobol/Open-COBOL-ESQL/tree/develop/sample and https://github.com/opensourcecobol/Open-COBOL-ESQL/blob/develop/copy/sqlca.cbl ================================================ FILE: Units/parser-cobol-to-review2.r/sqlca.d/expected.tags ================================================ SQLCABC input.cbl /^ 05 SQLCABC PIC S9(9) COMP-5.$/;" d SQLCAID input.cbl /^ 05 SQLCAID PIC X(8).$/;" d SQLCODE input.cbl /^ 05 SQLCODE PIC S9(9) COMP-5.$/;" d SQLERRD input.cbl /^ 05 SQLERRD OCCURS 6 TIMES *> used only ERRD(3)$/;" d SQLERRM input.cbl /^ 05 SQLERRM.$/;" g SQLERRMC input.cbl /^ 49 SQLERRMC PIC X(70).$/;" d group:SQLERRM SQLERRML input.cbl /^ 49 SQLERRML PIC S9(4) COMP-5.$/;" d group:SQLERRM SQLERRP input.cbl /^ 05 SQLERRP PIC X(8). *> not used$/;" d SQLSTATE input.cbl /^ 05 SQLSTATE PIC X(5).$/;" d SQLWARN input.cbl /^ 05 SQLWARN. *> not used$/;" g SQLWARN0 input.cbl /^ 10 SQLWARN0 PIC X(1).$/;" d group:SQLWARN SQLWARN1 input.cbl /^ 10 SQLWARN1 PIC X(1).$/;" d group:SQLWARN SQLWARN2 input.cbl /^ 10 SQLWARN2 PIC X(1).$/;" d group:SQLWARN SQLWARN3 input.cbl /^ 10 SQLWARN3 PIC X(1).$/;" d group:SQLWARN SQLWARN4 input.cbl /^ 10 SQLWARN4 PIC X(1).$/;" d group:SQLWARN SQLWARN5 input.cbl /^ 10 SQLWARN5 PIC X(1).$/;" d group:SQLWARN SQLWARN6 input.cbl /^ 10 SQLWARN6 PIC X(1).$/;" d group:SQLWARN SQLWARN7 input.cbl /^ 10 SQLWARN7 PIC X(1).$/;" d group:SQLWARN ================================================ FILE: Units/parser-cobol-to-review2.r/sqlca.d/input.cbl ================================================ ****************************************************************** * SQLCA: SQL Communications Area for Ocesql * ****************************************************************** 01 SQLCA GLOBAL. 05 SQLCAID PIC X(8). 05 SQLCABC PIC S9(9) COMP-5. 05 SQLCODE PIC S9(9) COMP-5. 05 SQLERRM. 49 SQLERRML PIC S9(4) COMP-5. 49 SQLERRMC PIC X(70). 05 SQLERRP PIC X(8). *> not used 05 SQLERRD OCCURS 6 TIMES *> used only ERRD(3) PIC S9(9) COMP-5. 05 SQLWARN. *> not used 10 SQLWARN0 PIC X(1). 10 SQLWARN1 PIC X(1). 10 SQLWARN2 PIC X(1). 10 SQLWARN3 PIC X(1). 10 SQLWARN4 PIC X(1). 10 SQLWARN5 PIC X(1). 10 SQLWARN6 PIC X(1). 10 SQLWARN7 PIC X(1). 05 SQLSTATE PIC X(5). ****************************************************************** ================================================ FILE: Units/parser-cobol.r/comments.d/expected.tags ================================================ ================================================ FILE: Units/parser-cobol.r/comments.d/input.cbl ================================================ * DONTTAGME SECTION. ================================================ FILE: Units/parser-cobol.r/helloworld.d/expected.tags ================================================ 00-MAIN input.cbl /^ 04100 00-MAIN. 00160000$/;" p CONFIGURATION input.cbl /^ 02100 CONFIGURATION SECTION. 00090000$/;" s DATA input.cbl /^ 03000 DATA DIVISION. 00140000$/;" D ENVIRONMENT input.cbl /^ 02000 ENVIRONMENT DIVISION. 00080000$/;" D HELLO input.cbl /^ 01100 PROGRAM-ID. 'HELLO'. 00070000$/;" P IDENTIFICATION input.cbl /^ 01000 IDENTIFICATION DIVISION. 00060000$/;" D OBJECT-COMPUTER input.cbl /^ 02120 OBJECT-COMPUTER. HERCULES. 00110000$/;" p PROCEDURE input.cbl /^ 04000 PROCEDURE DIVISION. 00150000$/;" D SOURCE-COMPUTER input.cbl /^ 02110 SOURCE-COMPUTER. GNULINUX. 00100000$/;" p SPECIAL-NAMES input.cbl /^ 02200 SPECIAL-NAMES. 00120000$/;" p ================================================ FILE: Units/parser-cobol.r/helloworld.d/input.cbl ================================================ 00000* VALIDATION OF BASE COBOL INSTALL 00050000 01000 IDENTIFICATION DIVISION. 00060000 01100 PROGRAM-ID. 'HELLO'. 00070000 02000 ENVIRONMENT DIVISION. 00080000 02100 CONFIGURATION SECTION. 00090000 02110 SOURCE-COMPUTER. GNULINUX. 00100000 02120 OBJECT-COMPUTER. HERCULES. 00110000 02200 SPECIAL-NAMES. 00120000 02210 CONSOLE IS CONSL. 00130000 03000 DATA DIVISION. 00140000 04000 PROCEDURE DIVISION. 00150000 04100 00-MAIN. 00160000 04110 DISPLAY 'HELLO, WORLD' UPON CONSL. 00170000 04900 STOP RUN. 00180000 ================================================ FILE: Units/parser-cobol.r/helloworld2.d/expected.tags ================================================ 00-MAIN input.cbl /^ 04100 00-MAIN.$/;" p CONFIGURATION input.cbl /^ 02100 CONFIGURATION SECTION.$/;" s DATA input.cbl /^ 03000 DATA DIVISION.$/;" D ENVIRONMENT input.cbl /^ 02000 ENVIRONMENT DIV$/;" D HELLO WORLD input.cbl /^ 01100 PROGRAM-ID. 'HELLO WORLD'.$/;" P IDENTIFICATION input.cbl /^ IDENTIFICATION DIVISION.$/;" D OBJECT-COMPUTER input.cbl /^ 02120 OBJECT-COMPUTER. HERCULES.$/;" p PROCEDURE input.cbl /^ 04000 PROCEDUR$/;" D SOURCE-COMPUTER input.cbl /^ 02110 SOURCE-COMPUTER. GNULINUX.$/;" p SPECIAL-NAMES input.cbl /^ 02200 SPECIAL$/;" p ================================================ FILE: Units/parser-cobol.r/helloworld2.d/input.cbl ================================================ 00000* VALIDATION OF BASE COBOL INSTALL IDENTIFICATION DIVISION. 01100 PROGRAM-ID. 'HELLO WORLD'. 02000 ENVIRONMENT DIV -ISION. 02100 CONFIGURATION SECTION. 02110 SOURCE-COMPUTER. GNULINUX. 02120 OBJECT-COMPUTER. HERCULES. 02200 SPECIAL --NAMES. 02210 CONSOLE IS CONSL. 03000 DATA DIVISION. 04000 PROCEDUR - E DIVISION. 04100 00-MAIN. 04110 DISPLAY 'HELLO, WORLD' UPON CONSL. 04900 STOP RUN. ================================================ FILE: Units/parser-cobol.r/issue-1324.d/README ================================================ input.cbl is taken from a post by @FrankCal in #1324. ================================================ FILE: Units/parser-cobol.r/issue-1324.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r ================================================ FILE: Units/parser-cobol.r/issue-1324.d/expected.tags ================================================ IDENTIFICATION input.cbl /^ IDENTIFICATION DIVISION.$/;" D roles:def ENVIRONMENT input.cbl /^ ENVIRONMENT DIVISION.$/;" D roles:def CONFIGURATION input.cbl /^ CONFIGURATION SECTION.$/;" s roles:def SPECIAL-NAMES input.cbl /^ SPECIAL-NAMES.$/;" p roles:def DATA input.cbl /^ DATA DIVISION.$/;" D roles:def WORKING-STORAGE input.cbl /^ WORKING-STORAGE SECTION.$/;" s roles:def WS-ABBRUCH-TYP input.cbl /^ 01 WS-ABBRUCH-TYP PIC 99.$/;" d roles:def WS-ABBRUCH-EVENT input.cbl /^ 88 WS-ABBRUCH-EVENT VALUE 91.$/;" d data:WS-ABBRUCH-TYP roles:def WS-ABBRUCH-OBJMGR input.cbl /^. 88 WS-ABBRUCH-OBJMGR VALUE 92.$/;" d data:WS-ABBRUCH-TYP roles:def WS-ABBRUCH-DB input.cbl /^. 88 WS-ABBRUCH-DB VALUE 93.$/;" d data:WS-ABBRUCH-TYP roles:def WS-ABBRUCH-PGM input.cbl /^. 88 WS-ABBRUCH-PGM VALUE 94.$/;" d data:WS-ABBRUCH-TYP roles:def F-TEXT input.cbl /^ 01 F-TEXT.$/;" g roles:def F-TEXT-DB input.cbl /^ 05 F-TEXT-DB PIC X(5).$/;" d group:F-TEXT roles:def F-TEXT-KEY1 input.cbl /^ 05 F-TEXT-KEY1 PIC 9(8).$/;" d group:F-TEXT roles:def F-TEXT-KEY2 input.cbl /^ 05 F-TEXT-KEY2 PIC 9(8).$/;" d group:F-TEXT roles:def F-TEXT-KEY3 input.cbl /^ 05 F-TEXT-KEY3 PIC 99.$/;" d group:F-TEXT roles:def F-TEXT-EVENT input.cbl /^ 05 F-TEXT-EVENT PIC X(10).$/;" d group:F-TEXT roles:def TCTOENV input.cbl /^ COPY TCTOENV.$/;" S roles:copied TCWFLENG input.cbl /^ COPY TCWFLENG.$/;" S roles:copied TCPR input.cbl /^ COPY TCPR.$/;" S roles:copied LINKAGE input.cbl /^ LINKAGE SECTION.$/;" s roles:def PROCEDURE input.cbl /^ PROCEDURE DIVISION.$/;" D roles:def MAIN input.cbl /^ MAIN SECTION.$/;" s roles:def MAIN-EX input.cbl /^ MAIN-EX. EXIT.$/;" p roles:def E01-PRUEFEN input.cbl /^ E01-PRUEFEN SECTION.$/;" s roles:def M01-VORLAUF input.cbl /^ M01-VORLAUF SECTION.$/;" s roles:def M01-VORLAUF-EX input.cbl /^ M01-VORLAUF-EX.$/;" p roles:def M02-NACHLAUF input.cbl /^ M02-NACHLAUF SECTION.$/;" s roles:def M02-NACHLAUF-EX input.cbl /^ M02-NACHLAUF-EX.$/;" p roles:def M99-ABBRUCH input.cbl /^ M99-ABBRUCH SECTION.$/;" s roles:def M99-ABBRUCH-EX input.cbl /^ M99-ABBRUCH-EX. EXIT.$/;" p roles:def ================================================ FILE: Units/parser-cobol.r/issue-1324.d/input.cbl ================================================ IDENTIFICATION DIVISION. EXEC TAA IDENTIFY EFUN SERVICE FAWEFUN-11 IN FAW END-EXEC. * ENVIRONMENT DIVISION. CONFIGURATION SECTION. SPECIAL-NAMES. DECIMAL-POINT IS COMMA. * DATA DIVISION. * WORKING-STORAGE SECTION. * 01 WS-ABBRUCH-TYP PIC 99. 88 WS-ABBRUCH-EVENT VALUE 91. . 88 WS-ABBRUCH-OBJMGR VALUE 92. . 88 WS-ABBRUCH-DB VALUE 93. . 88 WS-ABBRUCH-PGM VALUE 94. 01 F-TEXT. 05 F-TEXT-DB PIC X(5). 05 FILLER PIC X VALUE SPACE. 05 F-TEXT-KEY1 PIC 9(8). 05 FILLER PIC X VALUE '/'. 05 F-TEXT-KEY2 PIC 9(8). 05 FILLER PIC X VALUE '/'. 05 F-TEXT-KEY3 PIC 99. 05 FILLER PIC X(7) VALUE ' EVENT:'. 05 F-TEXT-EVENT PIC X(10). * COPY TCTOENV. COPY TCWFLENG. COPY TCPR. LINKAGE SECTION. * PROCEDURE DIVISION. * MAIN SECTION. EXEC TAA REGISTER END-EXEC EXEC TAA ON SEVERE EXIT ARBG END-EXEC PERFORM M01-VORLAUF EVALUATE TRUE WHEN TC-EVENT-PRUEFEN OF ME PERFORM E01-PRUEFEN SET TC-STATE-OK OF ME TO TRUE WHEN OTHER SET WS-ABBRUCH-EVENT TO TRUE PERFORM M99-ABBRUCH END-EVALUATE PERFORM M02-NACHLAUF EXEC TAA UNREGISTER END-EXEC * CONTINUE. MAIN-EX. EXIT. * E01-PRUEFEN SECTION. EXIT. * M01-VORLAUF SECTION. CONTINUE. M01-VORLAUF-EX. EXIT. * M02-NACHLAUF SECTION. CONTINUE. M02-NACHLAUF-EX. EXIT. * M99-ABBRUCH SECTION. EVALUATE TRUE WHEN WS-ABBRUCH-OBJMGR EXEC TAA SET AND RAISE SEVERE GROUP OMERR CODE 0 END-EXEC WHEN WS-ABBRUCH-EVENT EXEC TAA SET SEVERE GROUP AAEZUG01 CODE 2 ARGUMENTS = (TC-EVENT) END-EXEC EXEC TAA SET AND RAISE SEVERE GROUP USERERR CODE 1 END-EXEC WHEN WS-ABBRUCH-PGM EXEC TAA SET SEVERE GROUP AAEZUG01 CODE 3 ARGUMENTS = (TX-IM-SHORTNAME) END-EXEC EXEC TAA SET AND RAISE SEVERE GROUP USERERR CODE 1 END-EXEC WHEN OTHER EXEC TAA SET AND RAISE SEVERE GROUP USERERR CODE 0 END-EXEC END-EVALUATE CONTINUE. M99-ABBRUCH-EX. EXIT. ================================================ FILE: Units/parser-cobol.r/levels.d/expected.tags ================================================ DATA input.cbl /^ DATA DIVISION.$/;" D EVEN input.cbl /^ 88 EVEN VALUES 2, 4, 6, 8.$/;" d data:RECORD1.ITEM2 G1 input.cbl /^ 02 G1.$/;" g group:REC2 IDENTIFICATION input.cbl /^ IDENTIFICATION DIVISION.$/;" D ITEM1 input.cbl /^ 05 ITEM1 PICTURE X(10).$/;" d group:REC2.G1 ITEM1 input.cbl /^ 05 ITEM1 PIC X(1).$/;" d group:RECORD1 ITEM2 input.cbl /^ 05 ITEM2 PIC X(10).$/;" d group:REC2.G1 ITEM2 input.cbl /^ 05 ITEM2 PIC A(1).$/;" d group:RECORD1 ITEM3 input.cbl /^ 05 ITEM3 PIC X(6).$/;" d group:RECORD1 MAIN-PROCEDURE input.cbl /^ MAIN-PROCEDURE.$/;" p ODD input.cbl /^ 88 ODD VALUES 1, 3, 5, 7, 9.$/;" d data:RECORD1.ITEM2 OTHERNAME1 input.cbl /^ 66 OTHERNAME1 RENAMES ITEM1 IN REC2.$/;" d group:REC2 OTHERNAME2 input.cbl /^ 66 OTHERNAME2 RENAMES G1.$/;" d group:REC2 PROCEDURE input.cbl /^ PROCEDURE DIVISION.$/;" D RDITEM4 input.cbl /^ 66 RDITEM4 RENAMES ITEM1 THRU ITEM2.$/;" d group:RECORD1 RDITEM5 input.cbl /^ 66 RDITEM5 RENAMES ITEM1 THROUGH ITEM3.$/;" d group:RECORD1 REC2 input.cbl /^ 01 REC2.$/;" g RECORD1 input.cbl /^ 01 RECORD1.$/;" g STDLN1 input.cbl /^ 77 STDLN1 PIC A(4).$/;" d Test-Items input.cbl /^ PROGRAM-ID. Test-Items.$/;" P WORKING-STORAGE input.cbl /^ WORKING-STORAGE SECTION.$/;" s ================================================ FILE: Units/parser-cobol.r/levels.d/input.cbl ================================================ IDENTIFICATION DIVISION. PROGRAM-ID. Test-Items. DATA DIVISION. WORKING-STORAGE SECTION. 01 RECORD1. 05 ITEM1 PIC X(1). 05 ITEM2 PIC A(1). 88 ODD VALUES 1, 3, 5, 7, 9. 88 EVEN VALUES 2, 4, 6, 8. 05 ITEM3 PIC X(6). 66 RDITEM4 RENAMES ITEM1 THRU ITEM2. 66 RDITEM5 RENAMES ITEM1 THROUGH ITEM3. 77 STDLN1 PIC A(4). 01 REC2. 02 G1. 05 ITEM1 PICTURE X(10). 05 ITEM2 PIC X(10). 66 OTHERNAME1 RENAMES ITEM1 IN REC2. 66 OTHERNAME2 RENAMES G1. PROCEDURE DIVISION. MAIN-PROCEDURE. DISPLAY "Hello world". DISPLAY OTHERNAME2. STOP RUN. END PROGRAM Test-Items. ================================================ FILE: Units/parser-cobol.r/quoted-program-id.cbl.d/expected.tags ================================================ IDENTIFICATION input.cbl /^ IDENTIFICATION DIVISION.$/;" D MAIN input.cbl /^ MAIN.$/;" p PROCEDURE input.cbl /^ PROCEDURE DIVISION.$/;" D Test program name input.cbl /^ PROGRAM-ID. 'Test program name'.$/;" P ================================================ FILE: Units/parser-cobol.r/quoted-program-id.cbl.d/input.cbl ================================================ IDENTIFICATION DIVISION. PROGRAM-ID. 'Test program name'. PROCEDURE DIVISION. MAIN. DISPLAY 'This is a test program'. STOP RUN. END PROGRAM 'Test program name'. ================================================ FILE: Units/parser-cobol.r/simple.cbl.d/expected.tags ================================================ AUTHOR input.cbl /^ AUTHOR. Darren Hiebert.$/;" p Begin input.cbl /^ Begin.$/;" p DATA input.cbl /^ DATA DIVISION.$/;" D DW-DAYS-IN-MONTH input.cbl /^ 05 DW-DAYS-IN-MONTH OCCURS 12 TIMES$/;" d data:Group-Name.Data-Item1.DW-DAYS-IN-MONTHS DW-DAYS-IN-MONTHS input.cbl /^ 03 DW-DAYS-IN-MONTHS VALUE "312831303130313130313031".$/;" d data:Group-Name.Data-Item1 Data-Item1 input.cbl /^ 02 Data-Item1 PIC 9 VALUE ZEROS.$/;" d group:Group-Name ENVIRONMENT input.cbl /^ ENVIRONMENT DIVISION.$/;" D FILE input.cbl /^ FILE SECTION.$/;" s FILE-CONTROL input.cbl /^ FILE-CONTROL.$/;" p File-Data-Item input.cbl /^ 02 File-Data-Item PIC 9(7).$/;" d group:File-Group-Name File-Group-Name input.cbl /^ 01 File-Group-Name.$/;" g File-Name input.cbl /^ FD File-Name.$/;" f Group-Name input.cbl /^ 01 Group-Name.$/;" g IDENTIFICATION input.cbl /^ IDENTIFICATION DIVISION.$/;" D INPUT-OUPUT input.cbl /^ INPUT-OUPUT SECTION.$/;" s PROCEDURE input.cbl /^ PROCEDURE DIVISION.$/;" D Program-Name input.cbl /^ PROGRAM-ID. Program-Name.$/;" P SH-WORK-MMDDYYYY input.cbl /^ 03 SH-WORK-MMDDYYYY PIC 9(08) VALUE 0.$/;" d data:Group-Name.Data-Item1 SH-WORK-MMDDYYYY-2 input.cbl /^ 03 SH-WORK-MMDDYYYY-2 REDEFINES SH-WORK-MMDDYYYY.$/;" d data:Group-Name.Data-Item1 Subprogram-Name input.cbl /^ Subprogram-Name.$/;" p WORKING-STORAGE input.cbl /^ WORKING-STORAGE SECTION.$/;" s ================================================ FILE: Units/parser-cobol.r/simple.cbl.d/features ================================================ regex ================================================ FILE: Units/parser-cobol.r/simple.cbl.d/input.cbl ================================================ IDENTIFICATION DIVISION. PROGRAM-ID. Program-Name. AUTHOR. Darren Hiebert. ENVIRONMENT DIVISION. INPUT-OUPUT SECTION. FILE-CONTROL. SELECT File-Name ASSIGN TO "SAMPLE.DAT" ORGANIZATION IS LINE SEQUENTIAL. DATA DIVISION. FILE SECTION. FD File-Name. 01 File-Group-Name. 02 File-Data-Item PIC 9(7). WORKING-STORAGE SECTION. 01 Group-Name. 02 Data-Item1 PIC 9 VALUE ZEROS. 03 SH-WORK-MMDDYYYY PIC 9(08) VALUE 0. 03 SH-WORK-MMDDYYYY-2 REDEFINES SH-WORK-MMDDYYYY. 03 DW-DAYS-IN-MONTHS VALUE "312831303130313130313031". 05 DW-DAYS-IN-MONTH OCCURS 12 TIMES PIC 9(02). PROCEDURE DIVISION. Begin. STOP RUN. Subprogram-Name. ================================================ FILE: Units/parser-cpreprocessor.r/asm-area.d/args.ctags ================================================ --sort=no --fields=+lE --extras=+g ================================================ FILE: Units/parser-cpreprocessor.r/asm-area.d/expected.tags ================================================ DO_NOTHING_ input.c /^ .macro DO_NOTHING_$/;" m language:Asm extras:guest DO_NOTHING_0 input-0.c /^ .macro DO_NOTHING_0$/;" m language:Asm extras:guest do_nothing_1 input-1.c /^inline void do_nothing_1(void) {}$/;" f language:C typeref:typename:void do_nothing_2 input-2.c /^ inline void do_nothing_2 (void) {}$/;" f language:C typeref:typename:void DO_NOTHING_2 input-2.c /^ .macro DO_NOTHING_2$/;" m language:Asm extras:guest do_nothing_3a input-3.c /^ inline void do_nothing_3a (void) {}$/;" f language:C typeref:typename:void do_nothing_3b input-3.c /^ inline void do_nothing_3b (void) {}$/;" f language:C typeref:typename:void DO_NOTHING_3 input-3.c /^ .macro DO_NOTHING_3$/;" m language:Asm extras:guest do_nothing_4a input-4.c /^ inline void do_nothing_4a (void) {}$/;" f language:C typeref:typename:void do_nothing_4b input-4.c /^ inline void do_nothing_4b (void) {}$/;" f language:C typeref:typename:void DO_NOTHING_4 input-4.c /^ .macro DO_NOTHING_4$/;" m language:Asm extras:guest do_nothing_5 input-5.c /^inline void do_nothing_5(void) {}$/;" f language:C typeref:typename:void DO_NOTHING_5 input-5.c /^ .macro DO_NOTHING_5$/;" m language:Asm extras:guest do_nothing_6 input-6.c /^inline void do_nothing_6(void) {}$/;" f language:C typeref:typename:void DO_NOTHING_7_NO_GUEST input-7.asm /^.macro DO_NOTHING_7_NO_GUEST$/;" m language:Asm ================================================ FILE: Units/parser-cpreprocessor.r/asm-area.d/input-0.c ================================================ #ifdef __ASSEMBLER__ .macro DO_NOTHING_0 nop .endm #endif ================================================ FILE: Units/parser-cpreprocessor.r/asm-area.d/input-1.c ================================================ #ifndef __ASSEMBLER__ inline void do_nothing_1(void) {} #endif ================================================ FILE: Units/parser-cpreprocessor.r/asm-area.d/input-2.c ================================================ #if __ASSEMBLER__ .macro DO_NOTHING_2 nop .endm #else inline void do_nothing_2 (void) {} #endif ================================================ FILE: Units/parser-cpreprocessor.r/asm-area.d/input-3.c ================================================ #if __ASSEMBLER__ .macro DO_NOTHING_3 nop .endm #elif CONDITION3 inline void do_nothing_3a (void) {} #else inline void do_nothing_3b (void) {} #endif ================================================ FILE: Units/parser-cpreprocessor.r/asm-area.d/input-4.c ================================================ #ifdef __ASSEMBLER__ .macro DO_NOTHING_4 nop .endm #elif CONDITION4 inline void do_nothing_4a (void) {} #else inline void do_nothing_4b (void) {} #endif ================================================ FILE: Units/parser-cpreprocessor.r/asm-area.d/input-5.c ================================================ #ifndef __ASSEMBLER__ inline void do_nothing_5(void) {} #else .macro DO_NOTHING_5 nop .endm #endif ================================================ FILE: Units/parser-cpreprocessor.r/asm-area.d/input-6.c ================================================ #ifndef __ASSEMBLER__ inline void do_nothing_6(void) {} #elif CONDITION5 .macro DO_NOTHING_6a_this_cannot_be_tagged nop .endm #else .macro DO_NOTHING_6b_this_cannot_be_tagged nop .endm #endif ================================================ FILE: Units/parser-cpreprocessor.r/asm-area.d/input-7.asm ================================================ #ifdef __ASSEMBLER__ .macro DO_NOTHING_7_NO_GUEST nop .endm #endif ================================================ FILE: Units/parser-cpreprocessor.r/asm-area.d/input.c ================================================ #if __ASSEMBLER__ .macro DO_NOTHING_ nop .endm #endif ================================================ FILE: Units/parser-cpreprocessor.r/backslash-in-parameters.d/args.ctags ================================================ --sort=no --fields=+Sn ================================================ FILE: Units/parser-cpreprocessor.r/backslash-in-parameters.d/expected.tags ================================================ IX_GET_BIT_FIELD16 input.h /^#define IX_GET_BIT_FIELD16(/;" d line:2 signature:(arg_PackedData16,arg_FieldLSBBit,arg_FieldMSBBit) ================================================ FILE: Units/parser-cpreprocessor.r/backslash-in-parameters.d/input.h ================================================ /* Taken from u-boot */ #define IX_GET_BIT_FIELD16( \ arg_PackedData16, \ arg_FieldLSBBit, \ arg_FieldMSBBit \ ) \ (((ix_uint16)(arg_PackedData16) & IX_BIT_FIELD_MASK16(arg_FieldLSBBit, arg_FieldMSBBit)) >> \ arg_FieldLSBBit) ================================================ FILE: Units/parser-cpreprocessor.r/capture-params-in-macro-defs.d/args.ctags ================================================ --sort=no --language-force=CPreProcessor --kinds-CPreProcessor=+D --fields=+Sn ================================================ FILE: Units/parser-cpreprocessor.r/capture-params-in-macro-defs.d/expected.tags ================================================ arg_PackedData16 input.h /^ arg_PackedData16, \\$/;" D line:3 macro:IX_GET_BIT_FIELD16 arg_FieldLSBBit input.h /^ arg_FieldLSBBit, \\$/;" D line:4 macro:IX_GET_BIT_FIELD16 arg_FieldMSBBit input.h /^ arg_FieldMSBBit \\$/;" D line:5 macro:IX_GET_BIT_FIELD16 IX_GET_BIT_FIELD16 input.h /^#define IX_GET_BIT_FIELD16(/;" d line:2 signature:(arg_PackedData16,arg_FieldLSBBit,arg_FieldMSBBit) M0 input.h /^#define M0(/;" d line:10 signature:() X input.h /^#define M1(X) 1 + X$/;" D line:11 macro:M1 M1 input.h /^#define M1(/;" d line:11 signature:(X) X input.h /^#define M2(X,Y) 1 + X + Y$/;" D line:12 macro:M2 Y input.h /^#define M2(X,Y) 1 + X + Y$/;" D line:12 macro:M2 M2 input.h /^#define M2(/;" d line:12 signature:(X,Y) X input.h /^#define M3(X,Y,Z) 1 + X + Y + Z$/;" D line:13 macro:M3 Y input.h /^#define M3(X,Y,Z) 1 + X + Y + Z$/;" D line:13 macro:M3 Z input.h /^#define M3(X,Y,Z) 1 + X + Y + Z$/;" D line:13 macro:M3 M3 input.h /^#define M3(/;" d line:13 signature:(X,Y,Z) X input.h /^#define Mn(X,Y,Z,...) 1 + X + Y + Z$/;" D line:14 macro:Mn Y input.h /^#define Mn(X,Y,Z,...) 1 + X + Y + Z$/;" D line:14 macro:Mn Z input.h /^#define Mn(X,Y,Z,...) 1 + X + Y + Z$/;" D line:14 macro:Mn Mn input.h /^#define Mn(/;" d line:14 signature:(X,Y,Z,...) ================================================ FILE: Units/parser-cpreprocessor.r/capture-params-in-macro-defs.d/input.h ================================================ /* Taken from u-boot */ #define IX_GET_BIT_FIELD16( \ arg_PackedData16, \ arg_FieldLSBBit, \ arg_FieldMSBBit \ ) \ (((ix_uint16)(arg_PackedData16) & IX_BIT_FIELD_MASK16(arg_FieldLSBBit, arg_FieldMSBBit)) >> \ arg_FieldLSBBit) #define M0() 1 #define M1(X) 1 + X #define M2(X,Y) 1 + X + Y #define M3(X,Y,Z) 1 + X + Y + Z #define Mn(X,Y,Z,...) 1 + X + Y + Z ================================================ FILE: Units/parser-cpreprocessor.r/disable-cpp-client--clinet-kind.d/README ================================================ See #1514. ================================================ FILE: Units/parser-cpreprocessor.r/disable-cpp-client--clinet-kind.d/args.ctags ================================================ --languages=-CPreProcessor --kinds-C=-d ================================================ FILE: Units/parser-cpreprocessor.r/disable-cpp-client--clinet-kind.d/expected.tags ================================================ main input.c /^main(int argc)$/;" f typeref:typename:int ================================================ FILE: Units/parser-cpreprocessor.r/disable-cpp-client--clinet-kind.d/input.c ================================================ #define X 1 int main(int argc) { return X; } ================================================ FILE: Units/parser-cpreprocessor.r/disable-cpp-client--cpp-kind.d/README ================================================ See #1514. ================================================ FILE: Units/parser-cpreprocessor.r/disable-cpp-client--cpp-kind.d/args.ctags ================================================ --languages=-CPreProcessor --kinds-CPreProcessor=-d ================================================ FILE: Units/parser-cpreprocessor.r/disable-cpp-client--cpp-kind.d/expected.tags ================================================ X input.c /^#define X /;" d file: main input.c /^main(int argc)$/;" f typeref:typename:int ================================================ FILE: Units/parser-cpreprocessor.r/disable-cpp-client--cpp-kind.d/input.c ================================================ #define X 1 int main(int argc) { return X; } ================================================ FILE: Units/parser-cpreprocessor.r/disable-cpp-client.d/README ================================================ See #1514. ================================================ FILE: Units/parser-cpreprocessor.r/disable-cpp-client.d/args.ctags ================================================ --languages=-CPreProcessor ================================================ FILE: Units/parser-cpreprocessor.r/disable-cpp-client.d/expected.tags ================================================ X input.c /^#define X /;" d file: main input.c /^main(int argc)$/;" f typeref:typename:int ================================================ FILE: Units/parser-cpreprocessor.r/disable-cpp-client.d/input.c ================================================ #define X 1 int main(int argc) { return X; } ================================================ FILE: Units/parser-cpreprocessor.r/disable-cpp-cpp.d/args.ctags ================================================ --languages=-CPreProcessor ================================================ FILE: Units/parser-cpreprocessor.r/disable-cpp-cpp.d/expected.tags ================================================ 0x00 input.dts /^ phandle = <0x00>;$/;" p label:label label input.dts /^label: test {$/;" l label2 input.dts /^ label2: chosen { } ;$/;" l label:label ================================================ FILE: Units/parser-cpreprocessor.r/disable-cpp-cpp.d/input.dts ================================================ /dts-v1/; #include "foo.dtsi" #define bar 98 label: test { dummy { label2: chosen { } ; phandle = <0x00>; }; }; #undef bar ================================================ FILE: Units/parser-cpreprocessor.r/if0-false-with-param.c.d/args.ctags ================================================ --param-CPreProcessor.if0=false ================================================ FILE: Units/parser-cpreprocessor.r/if0-false-with-param.c.d/expected.tags ================================================ y input.c /^int y;$/;" v typeref:typename:int ================================================ FILE: Units/parser-cpreprocessor.r/if0-false-with-param.c.d/input.c ================================================ #if 0 int x; #else int y; #endif ================================================ FILE: Units/parser-cpreprocessor.r/if0-true-with-param.c.d/args.ctags ================================================ --param-CPreProcessor.if0=true ================================================ FILE: Units/parser-cpreprocessor.r/if0-true-with-param.c.d/expected.tags ================================================ x input.c /^int x;$/;" v typeref:typename:int y input.c /^int y;$/;" v typeref:typename:int ================================================ FILE: Units/parser-cpreprocessor.r/if0-true-with-param.c.d/input.c ================================================ #if 0 int x; #else int y; #endif ================================================ FILE: Units/parser-cpreprocessor.r/macro-condition-role.d/args.ctags ================================================ --sort=no --roles-C++.{macro}=+{condition} --extras=+r --fields=+rn ================================================ FILE: Units/parser-cpreprocessor.r/macro-condition-role.d/expected.tags ================================================ X0 input.h /^#ifdef X0$/;" d line:1 roles:condition HAVE_FEAT input.h /^#if defined HAVE_FEAT && (Y_2k1 && _0Z \\$/;" d line:2 roles:condition Y_2k1 input.h /^#if defined HAVE_FEAT && (Y_2k1 && _0Z \\$/;" d line:2 roles:condition _0Z input.h /^#if defined HAVE_FEAT && (Y_2k1 && _0Z \\$/;" d line:2 roles:condition _A_0_ input.h /^ || \/* C *\/ _A_0_)$/;" d line:3 roles:condition X1 input.h /^#ifndef X1$/;" d line:5 roles:condition Y1 input.h /^#elif Y1$/;" d line:7 roles:condition ================================================ FILE: Units/parser-cpreprocessor.r/macro-condition-role.d/input.h ================================================ #ifdef X0 #if defined HAVE_FEAT && (Y_2k1 && _0Z \ || /* C */ _A_0_) extern #ifndef X1 int #elif Y1 long #else short #endif x; #endif #endif ================================================ FILE: Units/parser-cpreprocessor.r/macrodef.d/args.ctags ================================================ --language-force=CPreProcessor --sort=no --fields-CPreProcessor=+{macrodef} --fields=+Sl ================================================ FILE: Units/parser-cpreprocessor.r/macrodef.d/expected.tags ================================================ INT input.h /^#define INT /;" d language:CPreProcessor macrodef:1 STR input.h /^#define STR /;" d language:CPreProcessor macrodef:"bar" CHR input.h /^#define CHR /;" d language:CPreProcessor macrodef:'b' HEX input.h /^#define HEX /;" d language:CPreProcessor macrodef:0xff01 OCT input.h /^#define OCT /;" d language:CPreProcessor macrodef:0644 SYSCALL_METADATA input.h /^#define SYSCALL_METADATA(/;" d language:CPreProcessor signature:(sname,nb,...) macrodef: SYSCALL_DEFINE2 input.h /^#define SYSCALL_DEFINE2(/;" d language:CPreProcessor signature:(name,...) macrodef:SYSCALL_DEFINEx(2, _##name, __VA_ARGS__) SYSCALL_DEFINEx input.h /^#define SYSCALL_DEFINEx(/;" d language:CPreProcessor signature:(x,sname,...) macrodef:SYSCALL_METADATA(sname, x, __VA_ARGS__) __SYSCALL_DEFINEx(x, sname, __VA_ARGS__) __SYSCALL_DEFINEx input.h /^#define __SYSCALL_DEFINEx(/;" d language:CPreProcessor signature:(x,name,...) macrodef:__diag_push(); __diag_ignore(GCC, 8, "-Wattribute-alias", "Type aliasing is used to sanitize syscall arguments"); asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) __attribute__((alias(__stringify(__se_sys##name)))); ALLOW_ERROR_INJECTION(sys##name, ERRNO); static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) { long ret = __do_sys##name(__MAP(x,__SC_CAST,__VA_ARGS__)); __MAP(x,__SC_TEST,__VA_ARGS__); __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); return ret; } __diag_pop(); static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) __MAP1 input.h /^#define __MAP1(/;" d language:CPreProcessor signature:(m,t,a,...) macrodef:m(t,a) __MAP2 input.h /^#define __MAP2(/;" d language:CPreProcessor signature:(m,t,a,...) macrodef:m(t,a), __MAP1(m,__VA_ARGS__) __MAP input.h /^#define __MAP(n,...) __MAP#/;" d language:CPreProcessor signature:(n,...) macrodef:__MAP##n(__VA_ARGS__) __SC_DECL input.h /^#define __SC_DECL(/;" d language:CPreProcessor signature:(t,a) macrodef:t a slash_fn input.h /^#define slash_fn(/;" d language:CPreProcessor signature:(t) macrodef:t fn (t i, t j) { return i / j; } question_fn input.h /^#define question_fn(/;" d language:CPreProcessor signature:(t) macrodef:t fn (t i, t j) { return (i < j)? i: j; } finally input.h /^#define finally(/;" d language:CPreProcessor signature:(X) macrodef:int fin_##X(void) { return 0; } ================================================ FILE: Units/parser-cpreprocessor.r/macrodef.d/input.h ================================================ #define INT 1 #define STR "bar" #define CHR 'b' #define HEX 0xff01 #define OCT 0644 /* * Taken from linux kernel */ #define SYSCALL_METADATA(sname, nb, ...) #define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__) #define SYSCALL_DEFINEx(x, sname, ...) \ SYSCALL_METADATA(sname, x, __VA_ARGS__) \ __SYSCALL_DEFINEx(x, sname, __VA_ARGS__) /* * The asmlinkage stub is aliased to a function named __se_sys_*() which * sign-extends 32-bit ints to longs whenever needed. The actual work is * done within __do_sys_*(). */ #define __SYSCALL_DEFINEx(x, name, ...) \ __diag_push(); \ __diag_ignore(GCC, 8, "-Wattribute-alias", \ "Type aliasing is used to sanitize syscall arguments");\ asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ __attribute__((alias(__stringify(__se_sys##name)))); \ ALLOW_ERROR_INJECTION(sys##name, ERRNO); \ static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ { \ long ret = __do_sys##name(__MAP(x,__SC_CAST,__VA_ARGS__));\ __MAP(x,__SC_TEST,__VA_ARGS__); \ __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \ return ret; \ } \ __diag_pop(); \ static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) #define __MAP1(m,t,a,...) m(t,a) #define __MAP2(m,t,a,...) m(t,a), __MAP1(m,__VA_ARGS__) #define __MAP(n,...) __MAP##n(__VA_ARGS__) #define __SC_DECL(t, a) t a SYSCALL_DEFINE2(setregid16, old_gid_t, rgid, old_gid_t, egid) { return __sys_setregid(low2highgid(rgid), low2highgid(egid)); } #define slash_fn(t) t fn (t i, t j) { \ return i / j; \ } #define question_fn(t) t fn (t i, t j) { \ return (i < j)? i: j; \ } #define finally(X) \ int fin_##X(void) { return 0; } \ \ \ \ ================================================ FILE: Units/parser-cpreprocessor.r/macroexpand.d/args.ctags ================================================ --param-CPreProcessor._expand=1 --fields-C=+{macrodef} --fields=+Ss --sort=no # Override the defintion in the input file. -DS=float ================================================ FILE: Units/parser-cpreprocessor.r/macroexpand.d/expected.tags ================================================ defStruct input.c /^#define defStruct(/;" d file: signature:(PREFIX,X) macrodef:struct PREFIX##X begin input.c /^#define begin /;" d file: macrodef:{ defField input.c /^#define defField(/;" d file: signature:(PREFIX,T,F) macrodef:T PREFIX##F; endf input.c /^#define endf /;" d file: macrodef:; ends input.c /^#define ends /;" d file: macrodef:}; mydefs input.c /^#define mydefs(/;" d file: signature:(X) macrodef:defStruct(my_,X) mydeff input.c /^#define mydeff(/;" d file: signature:(T,Y) macrodef:defField(my_,T,Y) your_point input.c /^defStruct(your_,point) begin$/;" s file: your_x input.c /^ defField(your_,int, x) endf$/;" m struct:your_point typeref:typename:int file: your_y input.c /^ defField(your_,int, y) endf$/;" m struct:your_point typeref:typename:int file: my_point3d input.c /^mydefs(point3d) begin$/;" s file: my_x input.c /^ mydeff(int, x) endf$/;" m struct:my_point3d typeref:typename:int file: my_y input.c /^ mydeff(int, y) endf$/;" m struct:my_point3d typeref:typename:int file: my_z input.c /^ mydeff(int, z) endf$/;" m struct:my_point3d typeref:typename:int file: T input-0.c /^#define T /;" d file: macrodef:int mytype0 input-0.c /^typedef T mytype0;$/;" t typeref:typename:int file: S input-0.c /^#define S /;" d file: macrodef:int mytype1 input-0.c /^typedef S mytype1;$/;" t typeref:typename:float file: IO7__POX_ERRSUM__UPE_ERROR input-1.c /^#define IO7__POX_ERRSUM__UPE_ERROR GEN_MASK(IO7__POX_ERRSUM__UPE_ERROR)/;" d file: macrodef:GEN_MASK(IO7__POX_ERRSUM__UPE_ERROR) f input-1.c /^f(int err_sum)$/;" f typeref:typename:int signature:(int err_sum) ================================================ FILE: Units/parser-cpreprocessor.r/macroexpand.d/input-0.c ================================================ #define T int typedef T mytype0; #define S int typedef S mytype1; ================================================ FILE: Units/parser-cpreprocessor.r/macroexpand.d/input-1.c ================================================ /* This code could trigger an infinite loop. */ #define IO7__POX_ERRSUM__UPE_ERROR GEN_MASK(IO7__POX_ERRSUM__UPE_ERROR) int f(int err_sum) { if (err_sum & IO7__POX_ERRSUM__UPE_ERROR) { return 0; } } ================================================ FILE: Units/parser-cpreprocessor.r/macroexpand.d/input.c ================================================ #define defStruct(PREFIX,X) struct PREFIX##X #define begin { #define defField(PREFIX,T, F) T PREFIX##F; #define endf ; #define ends }; #define mydefs(X) defStruct(my_,X) #define mydeff(T,Y) defField(my_,T,Y) defStruct(your_,point) begin defField(your_,int, x) endf defField(your_,int, y) endf ends mydefs(point3d) begin mydeff(int, x) endf mydeff(int, y) endf mydeff(int, z) endf ends ================================================ FILE: Units/parser-cpreprocessor.r/macros-specified-with-param.c.d/README ================================================ This case test is derrived from parser-c.r/macros.c.d. ================================================ FILE: Units/parser-cpreprocessor.r/macros-specified-with-param.c.d/args.ctags ================================================ --kinds-c=+p --fields=+S --param-CPreProcessor.ignore=MACRO2 --fields=+r --extras=+r ================================================ FILE: Units/parser-cpreprocessor.r/macros-specified-with-param.c.d/expected.tags ================================================ DECL1 input.c /^DECL1(foo); \/* gcc will accept this as function prototype (with some warnings) *\/$/;" p file: signature:(foo) roles:def DECL3 input.c /^DECL3(x, y); \/* gcc will accept this as function prototype (with some warnings) *\/$/;" p file: signature:(x,y) roles:def FUNCTION_LIKE input.c /^#define FUNCTION_LIKE(/;" d file: signature:(a,b) roles:def FUNCTION_LIKE input.c /^#undef FUNCTION_LIKE$/;" d file: roles:undef VARIABLE_LIKE input.c /^#define VARIABLE_LIKE /;" d file: roles:def VARIABLE_LIKE input.c /^#undef VARIABLE_LIKE$/;" d file: roles:undef WeakSymbol input.c /^#pragma weak WeakSymbol /;" d file: roles:def prototype1 input.c /^void prototype1 __ARGS((int arg1, void *arg2));$/;" p typeref:typename:void file: signature:(int arg1,void * arg2) roles:def prototype2 input.c /^void prototype2 __ARGS((int arg1, void *arg2))$/;" f typeref:typename:void signature:(int arg1,void * arg2) roles:def ================================================ FILE: Units/parser-cpreprocessor.r/macros-specified-with-param.c.d/input.c ================================================ #define VARIABLE_LIKE some_value #define FUNCTION_LIKE(a,b) (a + b) #pragma weak WeakSymbol = StrongSymbol /* handling of spoofing macros */ DECL1(foo); /* gcc will accept this as function prototype (with some warnings) */ MACRO2(bar); DECL3(x, y); /* gcc will accept this as function prototype (with some warnings) */ void prototype1 __ARGS((int arg1, void *arg2)); void prototype2 __ARGS((int arg1, void *arg2)) { } #undef FUNCTION_LIKE #undef VARIABLE_LIKE ================================================ FILE: Units/parser-cpreprocessor.r/simple-cpreprocessor.d/args.ctags ================================================ --language-force=CPreProcessor --extras=+r --fields=+r ================================================ FILE: Units/parser-cpreprocessor.r/simple-cpreprocessor.d/expected.tags ================================================ X input.c /^#define X /;" d file: roles:def stdio.h input.c /^#include /;" h roles:system ================================================ FILE: Units/parser-cpreprocessor.r/simple-cpreprocessor.d/input.c ================================================ #define X 1 #include /* #define Y 2 */ // #define Z 3 ================================================ FILE: Units/parser-cpreprocessor.r/skip-newlines-in-literals.d/args.ctags ================================================ --sort=no --fields-C={macrodef} ================================================ FILE: Units/parser-cpreprocessor.r/skip-newlines-in-literals.d/expected.tags ================================================ X input.c /^#define X /;" d file: macrodef:"abc \\n\\t\tefg" Y input.c /^#define Y /;" d file: macrodef:"abc" A input.c /^#define A /;" d file: macrodef:'a' B input.c /^#define B /;" d file: macrodef:'b' C input.c /^#define C /;" d file: macrodef:'\\n' D input-0.c /^#define D "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/;" d file: macrodef:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalast" E input-0.c /^#define E "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/;" d file: macrodef:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaala\\n" F input-0.c /^#define F /;" d file: macrodef:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalasS" G input-0.c /^#define G /;" d file: macrodef:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalaSH" H input-0.c /^#define H /;" d file: macrodef:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalasS" J input-1.c /^#define J /;" d file: macrodef:'aaaaaalast' K input-1.c /^#define K /;" d file: macrodef:'aaaaaalast' L input-1.c /^#define L /;" d file: macrodef:'aaaaaalast' M input-1.c /^#define M /;" d file: macrodef:'aaaaaala\\n' N input-1.c /^#define N /;" d file: macrodef:'aaaaaalast' O input-1.c /^#define O /;" d file: macrodef:'aaaaaalaxx' ================================================ FILE: Units/parser-cpreprocessor.r/skip-newlines-in-literals.d/input-0.c ================================================ #define D "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalastSHOULDBEINCLUDE" #define E "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaala\nSHOULDBEINCLUDE" #define F "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalas\nSHOULDBEINCLUDE" #define G "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaala\ SHOULDBEINCLUDE" #define H "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalas\ SHOULDBEINCLUDE" ================================================ FILE: Units/parser-cpreprocessor.r/skip-newlines-in-literals.d/input-1.c ================================================ #define J 'aaaaaalastSHOULDNOTBETAGGED' #define K 'aaaaaalast\n' #define L 'aaaaaalas\nt' #define M 'aaaaaala\nxx' #define N 'aaaaaalas\ t' #define O 'aaaaaala\ xx' ================================================ FILE: Units/parser-cpreprocessor.r/skip-newlines-in-literals.d/input.c ================================================ #define X "abc \n\t\ efg" #define Y "abc" #define A '\ a' #define B 'b' #define C '\n' ================================================ FILE: Units/parser-cpreprocessor.r/unget-mbyte-string.d/README ================================================ This is a crash test. ================================================ FILE: Units/parser-cpreprocessor.r/unget-mbyte-string.d/input-0.lds ================================================ i"犬" ================================================ FILE: Units/parser-cpreprocessor.r/unget-mbyte-string.d/input-1.java ================================================ a(i'犬' ================================================ FILE: Units/parser-cpreprocessor.r/unget-mbyte-string.d/input-2.lds ================================================ i'犬' ================================================ FILE: Units/parser-cpreprocessor.r/unget-mbyte-string.d/input-3.java ================================================ a(i"犬猫鼠羊兎鶏牛熊" /* Push back a logger string */ ================================================ FILE: Units/parser-cpreprocessor.r/unget-mbyte-string.d/input.java ================================================ a(i"犬" ================================================ FILE: Units/parser-cpreprocessor.r/unget-multi-bytes-string.d/README ================================================ This is a crash test. ================================================ FILE: Units/parser-cpreprocessor.r/unget-multi-bytes-string.d/input-0.lds ================================================ i"犬" ================================================ FILE: Units/parser-cpreprocessor.r/unget-multi-bytes-string.d/input-1.java ================================================ a(i'犬' ================================================ FILE: Units/parser-cpreprocessor.r/unget-multi-bytes-string.d/input-2.lds ================================================ i'犬' ================================================ FILE: Units/parser-cpreprocessor.r/unget-multi-bytes-string.d/input.java ================================================ a(i"犬" ================================================ FILE: Units/parser-csharp.r/nullable-parameters.d/args.ctags ================================================ --sort=no --fields=+{signature} ================================================ FILE: Units/parser-csharp.r/nullable-parameters.d/expected.tags ================================================ Foo input.cs /^public class Foo$/;" c Bar input.cs /^ public void Bar(decimal? p)$/;" m class:Foo signature:(decimal? p) ================================================ FILE: Units/parser-csharp.r/nullable-parameters.d/input.cs ================================================ public class Foo { public void Bar(decimal? p) { } } ================================================ FILE: Units/parser-css.r/css-at-rules.d/expected.tags ================================================ body input.css /^ body { font-size: 10pt; }$/;" s body input.css /^ body { font-size: 12px; }$/;" s body input.css /^ body { line-height: 1.2 }$/;" s html input.css /^html { color: blue; }$/;" s ================================================ FILE: Units/parser-css.r/css-at-rules.d/input.css ================================================ @import "foo.css"; @namespace url(http://www.w3.org/1999/xhtml); @namespace svg url(http://www.w3.org/2000/svg); @media screen { body { font-size: 10pt; } } @media print { body { font-size: 12px; } } @media screen, print { body { line-height: 1.2 } } @page :first { margin: 2in; } @font-face { font-family: Sample; src: local("Sample"), url(Sample.ttf); } html { color: blue; } ================================================ FILE: Units/parser-css.r/css-at-supports.d/expected.tags ================================================ html input.css /^ html { test-property: 42; }$/;" s html input.css /^html { color: blue; }$/;" s ================================================ FILE: Units/parser-css.r/css-at-supports.d/input.css ================================================ @supports ((test-property: 42) or (test-property2: 42)) { html { test-property: 42; } } html { color: blue; } ================================================ FILE: Units/parser-css.r/css-attribute-selectors.d/expected.tags ================================================ a[href^="http://"] input.css /^a[href^="http:\/\/"] { color: red; }$/;" s a[href^="https://"] input.css /^a[href^="https:\/\/"] { color: green; }$/;" s a[lang~=en] input.css /^a[lang~=en] { background-color: light-green; }$/;" s body input.css /^body { color: black; }$/;" s p input.css /^p { color: gray }$/;" s ================================================ FILE: Units/parser-css.r/css-attribute-selectors.d/input.css ================================================ body { color: black; } a[href^="http://"] { color: red; } a[href^="https://"] { color: green; } a[lang~=en] { background-color: light-green; } p { color: gray } ================================================ FILE: Units/parser-css.r/css-comma-no-space.d/expected.tags ================================================ input input.css /^input,textarea{border: 1px solid red;}$/;" s textarea input.css /^input,textarea{border: 1px solid red;}$/;" s ================================================ FILE: Units/parser-css.r/css-comma-no-space.d/input.css ================================================ input,textarea{border: 1px solid red;} ================================================ FILE: Units/parser-css.r/css-namespace-selectors.d/expected.tags ================================================ *|div input.css /^*|div { color: blue; }$/;" s svg|a input.css /^svg|a { color: green; }$/;" s |a input.css /^|a { color: red; }$/;" s ================================================ FILE: Units/parser-css.r/css-namespace-selectors.d/input.css ================================================ |a { color: red; } svg|a { color: green; } *|div { color: blue; } ================================================ FILE: Units/parser-css.r/css-pseudo-classes.d/expected.tags ================================================ a:lang(en):after input.css /^a:lang(en):after { content: "[en]" }$/;" s body :not(span) input.css /^body :not(span) { color: green; }$/;" s span:not(:first-child) input.css /^span:not(:first-child) { color: red; }$/;" s span:nth-child(-n+3) input.css /^span:nth-child(-n+3) { color: lime; }$/;" s span:nth-child(0n+1) input.css /^span:nth-child(0n+1) { color: lime; }$/;" s span:nth-child(1) input.css /^span:nth-child(1) { color: lime; }$/;" s tr:nth-child(10n+0) input.css /^tr:nth-child(10n+0) { background-color: gray }$/;" s tr:nth-child(2n) input.css /^tr:nth-child(2n) { background-color: light-gray }$/;" s tr:nth-child(2n+1) input.css /^tr:nth-child(2n+1) { background-color: light-gray }$/;" s tr:nth-child(even) input.css /^tr:nth-child(even) { background-color: light-gray }$/;" s tr:nth-child(odd) input.css /^tr:nth-child(odd) { background-color: light-gray }$/;" s ================================================ FILE: Units/parser-css.r/css-pseudo-classes.d/input.css ================================================ tr:nth-child(2n+1) { background-color: light-gray } tr:nth-child(odd) { background-color: light-gray } tr:nth-child(2n) { background-color: light-gray } tr:nth-child(even) { background-color: light-gray } tr:nth-child(10n+0) { background-color: gray } span:nth-child(0n+1) { color: lime; } span:nth-child(1) { color: lime; } span:nth-child(-n+3) { color: lime; } span:not(:first-child) { color: red; } body :not(span) { color: green; } a:lang(en):after { content: "[en]" } ================================================ FILE: Units/parser-css.r/css-simple.d/expected.tags ================================================ #footer input.css /^#footer { font-size: 80%; }$/;" i * input.css /^* { padding:0; }$/;" s .foo a input.css /^.foo a, .foo b { color: blue; }$/;" s .foo b input.css /^.foo a, .foo b { color: blue; }$/;" s .header input.css /^.header { font-size: 200%; }$/;" c .red input.css /^.red { color: red }$/;" c div.magic input.css /^div.magic $/;" c html input.css /^html$/;" s img ~ p input.css /^img ~ p {$/;" s ul > li > a input.css /^ul > li > a {$/;" s ul li input.css /^ul li { padding-left: 1em; }$/;" s ================================================ FILE: Units/parser-css.r/css-simple.d/input.css ================================================ * { padding:0; } html { margin: 0 } .header { font-size: 200%; } #footer { font-size: 80%; } div.magic { /* haha */ text-decoration: blink; } .red { color: red } ul li { padding-left: 1em; } .foo a, .foo b { color: blue; } ul > li > a { font: monospace; } /* The general sibling combinator (~) * See https://developer.mozilla.org/en-US/docs/Web/CSS/General_sibling_combinator */ img ~ p { color: red; } ================================================ FILE: Units/parser-css.r/css-singlequote-in-comment-issue2.d/expected.tags ================================================ a input.css /^a{x:0;\/*'*\/}$/;" s b input.css /^b{y:0;}$/;" s ================================================ FILE: Units/parser-css.r/css-singlequote-in-comment-issue2.d/input.css ================================================ a{x:0;/*'*/} b{y:0;} ================================================ FILE: Units/parser-css.r/css-tag-types.d/expected.tags ================================================ #a #foo input.css /^#a #foo{ color: red }$/;" i #a #foo #bar input.css /^#a #foo #bar{ color: red }$/;" i #a #foo .bar input.css /^#a #foo .bar{ color: red }$/;" c #a #foo bar input.css /^#a #foo bar{ color: red }$/;" s #a .foo input.css /^#a .foo{ color: red }$/;" c #a .foo #bar input.css /^#a .foo #bar{ color: red }$/;" i #a .foo .bar input.css /^#a .foo .bar{ color: red }$/;" c #a .foo bar input.css /^#a .foo bar{ color: red }$/;" s #a foo input.css /^#a foo{ color: red }$/;" s #a foo #bar input.css /^#a foo #bar{ color: red }$/;" i #a foo .bar input.css /^#a foo .bar{ color: red }$/;" c #a foo bar input.css /^#a foo bar{ color: red }$/;" s .a #foo input.css /^.a #foo{ color: red }$/;" i .a #foo #bar input.css /^.a #foo #bar{ color: red }$/;" i .a #foo .bar input.css /^.a #foo .bar{ color: red }$/;" c .a #foo bar input.css /^.a #foo bar{ color: red }$/;" s .a .foo input.css /^.a .foo{ color: red }$/;" c .a .foo #bar input.css /^.a .foo #bar{ color: red }$/;" i .a .foo .bar input.css /^.a .foo .bar{ color: red }$/;" c .a .foo bar input.css /^.a .foo bar{ color: red }$/;" s .a foo input.css /^.a foo{ color: red }$/;" s .a foo #bar input.css /^.a foo #bar{ color: red }$/;" i .a foo .bar input.css /^.a foo .bar{ color: red }$/;" c .a foo bar input.css /^.a foo bar{ color: red }$/;" s a #foo input.css /^a #foo{ color: red }$/;" i a #foo #bar input.css /^a #foo #bar{ color: red }$/;" i a #foo .bar input.css /^a #foo .bar{ color: red }$/;" c a #foo bar input.css /^a #foo bar{ color: red }$/;" s a .foo input.css /^a .foo{ color: red }$/;" c a .foo #bar input.css /^a .foo #bar{ color: red }$/;" i a .foo .bar input.css /^a .foo .bar{ color: red }$/;" c a .foo bar input.css /^a .foo bar{ color: red }$/;" s a foo input.css /^a foo{ color: red }$/;" s a foo #bar input.css /^a foo #bar{ color: red }$/;" i a foo .bar input.css /^a foo .bar{ color: red }$/;" c a foo bar input.css /^a foo bar{ color: red }$/;" s ================================================ FILE: Units/parser-css.r/css-tag-types.d/input.css ================================================ a foo{ color: red } a #foo{ color: red } a .foo{ color: red } a foo bar{ color: red } a foo #bar{ color: red } a foo .bar{ color: red } a #foo bar{ color: red } a #foo #bar{ color: red } a #foo .bar{ color: red } a .foo bar{ color: red } a .foo #bar{ color: red } a .foo .bar{ color: red } #a foo{ color: red } #a #foo{ color: red } #a .foo{ color: red } #a foo bar{ color: red } #a foo #bar{ color: red } #a foo .bar{ color: red } #a #foo bar{ color: red } #a #foo #bar{ color: red } #a #foo .bar{ color: red } #a .foo bar{ color: red } #a .foo #bar{ color: red } #a .foo .bar{ color: red } .a foo{ color: red } .a #foo{ color: red } .a .foo{ color: red } .a foo bar{ color: red } .a foo #bar{ color: red } .a foo .bar{ color: red } .a #foo bar{ color: red } .a #foo #bar{ color: red } .a #foo .bar{ color: red } .a .foo bar{ color: red } .a .foo #bar{ color: red } .a .foo .bar{ color: red } ================================================ FILE: Units/parser-css.r/css-trivial.d/expected.tags ================================================ a input.css /^a{ color: red; }$/;" s html input.css /^html{ font: sans-serif; }$/;" s input input.css /^input, textarea{ border: 1px solid green; }$/;" s p input.css /^p{ text-align: justify; }$/;" s textarea input.css /^input, textarea{ border: 1px solid green; }$/;" s ================================================ FILE: Units/parser-css.r/css-trivial.d/input.css ================================================ html{ font: sans-serif; } a{ color: red; } p{ text-align: justify; } input, textarea{ border: 1px solid green; } ================================================ FILE: Units/parser-cuda.r/cuda-sample.d/args.ctags ================================================ --sort=no --kinds-cuda=* ================================================ FILE: Units/parser-cuda.r/cuda-sample.d/expected.tags ================================================ array1 input.cu /^__shared__ float2 array1[];$/;" v typeref:typename:float2[] array2 input.cu /^__shared__ __device__ dim3 array2[];$/;" v typeref:typename:dim3[] i1 input.cu /^__device__ volatile int i1 = 1;$/;" v typeref:typename:volatile int i2 input.cu /^__constant__ int i2 = 2;$/;" v typeref:typename:int dev1 input.cu /^__device__ void dev1(float * a,const float * __restrict__ b)$/;" f typeref:typename:void a input.cu /^__device__ void dev1(float * a,const float * __restrict__ b)$/;" z function:dev1 typeref:typename:float * file: b input.cu /^__device__ void dev1(float * a,const float * __restrict__ b)$/;" z function:dev1 typeref:typename:const float * file: kernel1 input.cu /^__global__ void kernel1(float * a,float * __restrict__ b)$/;" f typeref:typename:void a input.cu /^__global__ void kernel1(float * a,float * __restrict__ b)$/;" z function:kernel1 typeref:typename:float * file: b input.cu /^__global__ void kernel1(float * a,float * __restrict__ b)$/;" z function:kernel1 typeref:typename:float * file: main input.cu /^int main()$/;" f typeref:typename:int ================================================ FILE: Units/parser-cuda.r/cuda-sample.d/input.cu ================================================ // C with some CUDA extensions. __shared__ float2 array1[]; __shared__ __device__ dim3 array2[]; __device__ volatile int i1 = 1; __constant__ int i2 = 2; __device__ void dev1(float * a,const float * __restrict__ b) { } __global__ void kernel1(float * a,float * __restrict__ b) { } int main() { kernel1<<<1024 * 1024 / 256,256>>>(NULL,NULL); } ================================================ FILE: Units/parser-cuda.r/param-with-default-value.d/args.ctags ================================================ --sort=no --fields=+{signature} ================================================ FILE: Units/parser-cuda.r/param-with-default-value.d/expected.tags ================================================ foo1 input.cuh /^float foo1(int a)$/;" f typeref:typename:float signature:(int a) foo2 input.cuh /^bool foo2(float* pointer = NULL)$/;" f typeref:typename:bool signature:(float * pointer=NULL) foo2_alt input.cuh /^bool foo2_alt(float* pointer)$/;" f typeref:typename:bool signature:(float * pointer) foo3 input.cuh /^bool foo3(const int a, float b, double c)$/;" f typeref:typename:bool signature:(const int a,float b,double c) ================================================ FILE: Units/parser-cuda.r/param-with-default-value.d/input.cuh ================================================ /* Taken from #4187 submitted by @emilioj, Emilio J. Padrón González */ float foo1(int a) { for (int useless1=0; i<1000; ++i) { nonsense() } } bool foo2(float* pointer = NULL) { for (int useless2=0; i<1000; ++i) { nonsense() } } bool foo2_alt(float* pointer) { for (int useless2_alt=0; i<1000; ++i) { nonsense() } } bool foo3(const int a, float b, double c) { for (int useless3=0; i<1000; ++i) { nonsense() } } ================================================ FILE: Units/parser-cxx.r/1117-using-in-c.d/input.c ================================================ using std::terminate_handler; ================================================ FILE: Units/parser-cxx.r/README ================================================ See https://github.com/universal-ctags/ctags/pull/742 local variable handling verified in variables-prototypes-2.cpp.d and variables-prototypes.cpp.b. ================================================ FILE: Units/parser-cxx.r/alignas-in-struct.d/expected.tags ================================================ AlignasTestStruct input.cpp /^struct alignas( 64 ) AlignasTestStruct$/;" s file: AlignasTestStruct2 input.cpp /^class alignas( 64 ) AlignasTestStruct2$/;" c file: ================================================ FILE: Units/parser-cxx.r/alignas-in-struct.d/input.cpp ================================================ // Taken from #1374 submitted by @oison-dan struct alignas( 64 ) AlignasTestStruct { }; class alignas( 64 ) AlignasTestStruct2 { }; ================================================ FILE: Units/parser-cxx.r/angle_bracket.cpp.d/expected.tags ================================================ bar input.cpp /^static void bar (int value)$/;" f typeref:typename:void file: bar2 input.cpp /^static bar2 (void)$/;" f file: foo input.cpp /^static void foo (int nelem)$/;" f typeref:typename:void file: ================================================ FILE: Units/parser-cxx.r/angle_bracket.cpp.d/input.cpp ================================================ static void foo (int nelem) { int rsize = 2; while (nelem < 0) { rsize <<= 1; } } static void bar (int value) { return value < 0 ? value : 3; } static bar2 (void) { } ================================================ FILE: Units/parser-cxx.r/attribute-alias.cpp.d/args.ctags ================================================ --sort=no --fields-C=+{alias} --extras=+r --fields=+{roles}{language} ================================================ FILE: Units/parser-cxx.r/attribute-alias.cpp.d/expected.tags ================================================ y input.c /^int x __attribute__((alias("y")));$/;" s language:LdScript roles:aliased x input.c /^int x __attribute__((alias("y")));$/;" v language:C typeref:typename:int roles:def alias:y ================================================ FILE: Units/parser-cxx.r/attribute-alias.cpp.d/input.c ================================================ int x __attribute__((alias("y"))); ================================================ FILE: Units/parser-cxx.r/attribute-sections.cpp-no-ldscript.d/args.ctags ================================================ --sort=no --kinds-C=+p --param-CPreProcessor._expand=1 --fields-C=+{section}{macrodef} --fields=+S --fields=+rl --extras=+r --languages=-LdScript ================================================ FILE: Units/parser-cxx.r/attribute-sections.cpp-no-ldscript.d/expected.tags ================================================ f input.c /^char f [] __attribute__((section("__ksymtab_strings"), used, aligned(1)));$/;" v language:C typeref:typename:char[] roles:def section:__ksymtab_strings a input.c /^struct duart a __attribute__ ((section ("DUART_A"))) = { 0 };$/;" v language:C typeref:struct:duart roles:def section:DUART_A b input.c /^struct duart b __attribute__ ((section ("DUART_B"))) = { 0 };$/;" v language:C typeref:struct:duart roles:def section:DUART_B stack input.c /^char stack[10000] __attribute__ ((section ("STACK"))) = { 0 };$/;" v language:C typeref:typename:char[10000] roles:def section:STACK init_data input.c /^int init_data __attribute__ ((section ("INITDATA")));$/;" v language:C typeref:typename:int roles:def section:INITDATA ================================================ FILE: Units/parser-cxx.r/attribute-sections.cpp-no-ldscript.d/input.c ================================================ /* Variables */ char f [] __attribute__((section("__ksymtab_strings"), used, aligned(1))); /* Taken form gcc's info document. */ struct duart a __attribute__ ((section ("DUART_A"))) = { 0 }; struct duart b __attribute__ ((section ("DUART_B"))) = { 0 }; char stack[10000] __attribute__ ((section ("STACK"))) = { 0 }; int init_data __attribute__ ((section ("INITDATA"))); ================================================ FILE: Units/parser-cxx.r/attribute-sections.cpp.d/args.ctags ================================================ --sort=no --kinds-C=+p --param-CPreProcessor._expand=1 --fields-C=+{section}{macrodef} --fields=+S --fields=+rl --extras=+r ================================================ FILE: Units/parser-cxx.r/attribute-sections.cpp.d/expected.tags ================================================ __ksymtab_strings input.c /^char f [] __attribute__((section("__ksymtab_strings"), used, aligned(1)));$/;" i language:LdScript roles:destination f input.c /^char f [] __attribute__((section("__ksymtab_strings"), used, aligned(1)));$/;" v language:C typeref:typename:char[] roles:def section:__ksymtab_strings DUART_A input.c /^struct duart a __attribute__ ((section ("DUART_A"))) = { 0 };$/;" i language:LdScript roles:destination a input.c /^struct duart a __attribute__ ((section ("DUART_A"))) = { 0 };$/;" v language:C typeref:struct:duart roles:def section:DUART_A DUART_B input.c /^struct duart b __attribute__ ((section ("DUART_B"))) = { 0 };$/;" i language:LdScript roles:destination b input.c /^struct duart b __attribute__ ((section ("DUART_B"))) = { 0 };$/;" v language:C typeref:struct:duart roles:def section:DUART_B STACK input.c /^char stack[10000] __attribute__ ((section ("STACK"))) = { 0 };$/;" i language:LdScript roles:destination stack input.c /^char stack[10000] __attribute__ ((section ("STACK"))) = { 0 };$/;" v language:C typeref:typename:char[10000] roles:def section:STACK INITDATA input.c /^int init_data __attribute__ ((section ("INITDATA")));$/;" i language:LdScript roles:destination init_data input.c /^int init_data __attribute__ ((section ("INITDATA")));$/;" v language:C typeref:typename:int roles:def section:INITDATA COMMAND_LINE_SIZE input-0.c /^#define COMMAND_LINE_SIZE /;" d language:C file: roles:def macrodef:127 __section input-0.c /^#define __section(section) __attribute__((__section_/;" d language:C file: signature:(section) roles:def macrodef:__attribute__((__section__(section))) __initdata input-0.c /^#define __initdata /;" d language:C file: roles:def macrodef:__section(".init.data") .init.data input-0.c /^char __initdata b0[COMMAND_LINE_SIZE];$/;" i language:LdScript roles:destination b0 input-0.c /^char __initdata b0[COMMAND_LINE_SIZE];$/;" v language:C typeref:typename:char[127] roles:def section:.init.data .init.data input-0.c /^char b1[COMMAND_LINE_SIZE] __initdata;$/;" i language:LdScript roles:destination b1 input-0.c /^char b1[COMMAND_LINE_SIZE] __initdata;$/;" v language:C typeref:typename:char[127] roles:def section:.init.data bar0p input-1.c /^extern void f0 (void) __attribute__ ((section ("bar0p")));$/;" i language:LdScript roles:destination f0 input-1.c /^extern void f0 (void) __attribute__ ((section ("bar0p")));$/;" p language:C typeref:typename:void file: signature:(void) roles:def section:bar0p bar0 input-1.c /^{$/;" i language:LdScript roles:destination f0 input-1.c /^void f0 (void) __attribute__ ((section ("bar0")))$/;" f language:C typeref:typename:void signature:(void) roles:def section:bar0 bar1p input-1.c /^extern void __attribute__ ((section ("bar1p"))) f1 (void);$/;" i language:LdScript roles:destination f1 input-1.c /^extern void __attribute__ ((section ("bar1p"))) f1 (void);$/;" p language:C typeref:typename:void file: signature:(void) roles:def section:bar1p bar1 input-1.c /^{$/;" i language:LdScript roles:destination f1 input-1.c /^void __attribute__ ((section ("bar1"))) f1 (void)$/;" f language:C typeref:typename:void signature:(void) roles:def section:bar1 bar2p input-1.c /^extern __attribute__ ((section ("bar2p"))) void f2 (void);$/;" i language:LdScript roles:destination f2 input-1.c /^extern __attribute__ ((section ("bar2p"))) void f2 (void);$/;" p language:C typeref:typename:void file: signature:(void) roles:def section:bar2p bar2 input-1.c /^{$/;" i language:LdScript roles:destination f2 input-1.c /^__attribute__ ((section ("bar2"))) void f2 (void)$/;" f language:C typeref:typename:void signature:(void) roles:def section:bar2 bar3p input-1.c /^__attribute__ ((section ("bar3p"))) extern void f3 (void);$/;" i language:LdScript roles:destination f3 input-1.c /^__attribute__ ((section ("bar3p"))) extern void f3 (void);$/;" p language:C typeref:typename:void file: signature:(void) roles:def section:bar3p bar3 input-1.c /^{$/;" i language:LdScript roles:destination f3 input-1.c /^__attribute__ ((section ("bar3"))) extern void f3 (void)$/;" f language:C typeref:typename:void signature:(void) roles:def section:bar3 bar4p input-1.c /^__attribute__ ((section ("bar4p"))) static void f4 (void);$/;" i language:LdScript roles:destination f4 input-1.c /^__attribute__ ((section ("bar4p"))) static void f4 (void);$/;" p language:C typeref:typename:void file: signature:(void) roles:def section:bar4p bar4 input-1.c /^{$/;" i language:LdScript roles:destination f4 input-1.c /^__attribute__ ((section ("bar4"))) static void f4 (void)$/;" f language:C typeref:typename:void file: signature:(void) roles:def section:bar4 ================================================ FILE: Units/parser-cxx.r/attribute-sections.cpp.d/input-0.c ================================================ /* --param-CPreProcessor._expand=1 */ #define COMMAND_LINE_SIZE 127 #define __section(section) __attribute__((__section__(section))) #define __initdata __section(".init.data") char __initdata b0[COMMAND_LINE_SIZE]; char b1[COMMAND_LINE_SIZE] __initdata; ================================================ FILE: Units/parser-cxx.r/attribute-sections.cpp.d/input-1.c ================================================ extern void f0 (void) __attribute__ ((section ("bar0p"))); void f0 (void) __attribute__ ((section ("bar0"))) { } extern void __attribute__ ((section ("bar1p"))) f1 (void); void __attribute__ ((section ("bar1"))) f1 (void) { } extern __attribute__ ((section ("bar2p"))) void f2 (void); __attribute__ ((section ("bar2"))) void f2 (void) { } __attribute__ ((section ("bar3p"))) extern void f3 (void); __attribute__ ((section ("bar3"))) extern void f3 (void) { } __attribute__ ((section ("bar4p"))) static void f4 (void); __attribute__ ((section ("bar4"))) static void f4 (void) { } ================================================ FILE: Units/parser-cxx.r/attribute-sections.cpp.d/input.c ================================================ /* Variables */ char f [] __attribute__((section("__ksymtab_strings"), used, aligned(1))); /* Taken form gcc's info document. */ struct duart a __attribute__ ((section ("DUART_A"))) = { 0 }; struct duart b __attribute__ ((section ("DUART_B"))) = { 0 }; char stack[10000] __attribute__ ((section ("STACK"))) = { 0 }; int init_data __attribute__ ((section ("INITDATA"))); ================================================ FILE: Units/parser-cxx.r/attribute.cpp.d/args.ctags ================================================ --kinds-c++=* --fields-C++=+{properties} --fields=+tS --sort=no ================================================ FILE: Units/parser-cxx.r/attribute.cpp.d/expected.tags ================================================ v1 input.cpp /^int v1 __attribute__((aligned(16)));$/;" v typeref:typename:int v2 input.cpp /^unsigned int v2 __attribute__((aligned(8),weak,visibility("hidden")));$/;" v typeref:typename:unsigned int v3 input.cpp /^char v3[10000] __attribute__((section("STACK"))) = { 0 };$/;" v typeref:typename:char[10000] v4 input.cpp /^char *__attribute__((aligned(8))) *v4;$/;" v typeref:typename:char ** s1 input.cpp /^struct s1$/;" s file: s1v1 input.cpp /^ char s1v1;$/;" m struct:s1 typeref:typename:char file: s1v2 input.cpp /^ int s1v2[2] __attribute__((packed));$/;" m struct:s1 typeref:typename:int[2] file: v5 input.cpp /^struct s1 __attribute__((vector_size(16))) v5;$/;" v typeref:struct:s1 s2 input.cpp /^struct s2$/;" s file: s2v1 input.cpp /^ short s2v1[3];$/;" m struct:s2 typeref:typename:short[3] file: s3 input.cpp /^struct __attribute__((__packed__)) s3$/;" s file: s3v1 input.cpp /^ char s3v1 __attribute__((deprecated));$/;" m struct:s3 typeref:typename:char file: properties:deprecated s3v2 input.cpp /^ char s3v2;$/;" m struct:s3 typeref:typename:char file: t1 input.cpp /^typedef int t1 __attribute__ ((aligned (8)));$/;" t typeref:typename:int file: t2 input.cpp /^typedef int t2 __attribute__ ((deprecated));$/;" t typeref:typename:int file: e1 input.cpp /^enum e1 {$/;" g file: e1e1 input.cpp /^ e1e1 __attribute__((deprecated)),$/;" e enum:e1 file: e1e2 input.cpp /^ e1e2$/;" e enum:e1 file: p1 input.cpp /^__attribute__((noreturn)) void p1(void),$/;" p typeref:typename:void file: signature:(void) p2 input.cpp /^ __attribute__((format(printf, 1, 2))) p2 (const char *, ...),$/;" p typeref:typename:void file: signature:(const char *,...) __anon6f96ad27010d input.cpp /^ __attribute__((format(printf, 1, 2))) p2 (const char *, ...),$/;" z prototype:p2 typeref:typename:const char * file: p3 input.cpp /^ p3 (void);$/;" p typeref:typename:void file: signature:(void) p4 input.cpp /^void (__attribute__((noreturn)) ****p4) (void) __attribute__((deprecated));$/;" v typeref:typename:void (****)(void) properties:deprecated p5 input.cpp /^void p5() __attribute__ ((weak, alias ("p4")));$/;" p typeref:typename:void file: signature:() f1 input.cpp /^ f1(int f1p1,int f1p2 __attribute__((unused)),int f1p3)$/;" f typeref:typename:int signature:(int f1p1,int f1p2,int f1p3) properties:inline,deprecated f1p1 input.cpp /^ f1(int f1p1,int f1p2 __attribute__((unused)),int f1p3)$/;" z function:f1 typeref:typename:int file: f1p2 input.cpp /^ f1(int f1p1,int f1p2 __attribute__((unused)),int f1p3)$/;" z function:f1 typeref:typename:int file: f1p3 input.cpp /^ f1(int f1p1,int f1p2 __attribute__((unused)),int f1p3)$/;" z function:f1 typeref:typename:int file: l1 input.cpp /^l1:$/;" L function:f1 file: ================================================ FILE: Units/parser-cxx.r/attribute.cpp.d/input.cpp ================================================ int v1 __attribute__((aligned(16))); unsigned int v2 __attribute__((aligned(8),weak,visibility("hidden"))); char v3[10000] __attribute__((section("STACK"))) = { 0 }; char *__attribute__((aligned(8))) *v4; struct s1 { char s1v1; int s1v2[2] __attribute__((packed)); }; struct s1 __attribute__((vector_size(16))) v5; struct s2 { short s2v1[3]; } __attribute__ ((aligned (8))); struct __attribute__((__packed__)) s3 { char s3v1 __attribute__((deprecated)); char s3v2; }; typedef int t1 __attribute__ ((aligned (8))); typedef int t2 __attribute__ ((deprecated)); enum e1 { e1e1 __attribute__((deprecated)), e1e2 }; __attribute__((noreturn)) void p1(void), __attribute__((format(printf, 1, 2))) p2 (const char *, ...), p3 (void); void (__attribute__((noreturn)) ****p4) (void) __attribute__((deprecated)); void p5() __attribute__ ((weak, alias ("p4"))); int __attribute__((visibility("protected"))) f1(int f1p1,int f1p2 __attribute__((unused)),int f1p3) __attribute__ ((warn_unused_result,always_inline,deprecated)) { l1: __attribute__((cold, unused)); /* Semi-colon is required here */ return -1; } ================================================ FILE: Units/parser-cxx.r/blocks-nesting-too-deep.d/README ================================================ This is a crash test. ================================================ FILE: Units/parser-cxx.r/blocks-nesting-too-deep.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-cxx.r/blocks-nesting-too-deep.d/expected.tags ================================================ foo input.cxx /^void foo(void) {$/;" f typeref:typename:void bar input-0.cxx /^void bar(void) {}$/;" f typeref:typename:void v1 input-0.cxx /^ int v1[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[/;" v typeref:typename:int baz input-1.cxx /^void baz(void) {}$/;" f typeref:typename:void ================================================ FILE: Units/parser-cxx.r/blocks-nesting-too-deep.d/input-0.cxx ================================================ // // Derived from https://raw.githubusercontent.com/llvm/llvm-project/25d1285eecbab731eaf418c8aab44e4eb5f9e538/clang/test/Parser/parser_overflow.c // void bar(void) {} #ifdef HUGE // 16384 [, 16384 ] int v0[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]; #else // 299 [, 299 ] int v1[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]; #endif ================================================ FILE: Units/parser-cxx.r/blocks-nesting-too-deep.d/input-1.cxx ================================================ // // Derived from https://raw.githubusercontent.com/llvm/llvm-project/25d1285eecbab731eaf418c8aab44e4eb5f9e538/clang/test/Parser/parser_overflow.c // void baz(void) {} #ifdef HUGE // 16384 (, 16384 ) int a0 = (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); #else // 299 (, 299 ) int a1 = ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); #endif ================================================ FILE: Units/parser-cxx.r/blocks-nesting-too-deep.d/input.cxx ================================================ // // Taken from https://raw.githubusercontent.com/llvm/llvm-project/25d1285eecbab731eaf418c8aab44e4eb5f9e538/clang/test/Parser/parser_overflow.c // // RUN: not %clang_cc1 %s -fsyntax-only -DHUGE 2>&1 | FileCheck %s // RUN: %clang_cc1 %s -fsyntax-only // RUN: not %clang_cc1 %s -fsyntax-only -fbracket-depth 299 2>&1 | FileCheck %s // RUN: %clang_cc1 %s -fsyntax-only -fbracket-depth 300 // RUN: not %clang %s -fsyntax-only -fbracket-depth=299 2>&1 | FileCheck %s // RUN: %clang %s -fsyntax-only -fbracket-depth=300 void foo(void) { #ifdef HUGE // 16384 {, 16384 } {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} #else // 299 {, 299 } {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} #endif } // CHECK: fatal error: bracket nesting level exceeded maximum of {{2048|299}} // CHECK: note: use -fbracket-depth=N to increase maximum nesting level ================================================ FILE: Units/parser-cxx.r/brackets.cpp.d/args.ctags ================================================ --kinds-c++=* --fields=+SK --sort=no ================================================ FILE: Units/parser-cxx.r/brackets.cpp.d/expected.tags ================================================ EMPTY_MACRO input.cpp /^#define EMPTY_MACRO$/;" macro file: n01 input.cpp /^namespace n01 {$/;" namespace file: g01 input.cpp /^ std::string g01 { "" };$/;" variable namespace:n01 typeref:typename:std::string f01 input.cpp /^ auto f01(std::string p01) -> std::string {$/;" function namespace:n01 typeref:typename:std::string signature:(std::string p01) p01 input.cpp /^ auto f01(std::string p01) -> std::string {$/;" parameter function:n01::f01 typeref:typename:std::string file: l01 input.cpp /^ std::string l01 { "" };$/;" local function:n01::f01 typeref:typename:std::string file: l02 input.cpp /^ std::string l02 = { "" };$/;" local function:n01::f01 typeref:typename:std::string file: C01 input.cpp /^ class C01$/;" class namespace:n01 file: m01 input.cpp /^ std::string m01 { "" };$/;" member class:n01::C01 typeref:typename:std::string file: m02 input.cpp /^ std::string m02;$/;" member class:n01::C01 typeref:typename:std::string file: m03 input.cpp /^ std::string m03;$/;" member class:n01::C01 typeref:typename:std::string file: C01 input.cpp /^ C01(std::string p02)$/;" function class:n01::C01 file: signature:(std::string p02) p02 input.cpp /^ C01(std::string p02)$/;" parameter function:n01::C01::C01 typeref:typename:std::string file: C01 input.cpp /^ C01()$/;" function class:n01::C01 file: signature:() l03 input.cpp /^ std::string l03 { "" };$/;" local function:n01::C01::C01 typeref:typename:std::string file: l04 input.cpp /^ std::string l04 { "" };$/;" local function:n01::C01::C01 typeref:typename:std::string file: l05 input.cpp /^ C01 l05{ "" };$/;" local function:n01::C01::C01 typeref:typename:C01 file: f02 input.cpp /^ std::string f02() const EMPTY_MACRO { }$/;" function class:n01::C01 typeref:typename:std::string file: signature:() const m04 input.cpp /^ int m04 { 0 };$/;" member class:n01::C01 typeref:typename:int file: f03 input.cpp /^ std::string f03() const EMPTY_MACRO { }$/;" function class:n01::C01 typeref:typename:std::string file: signature:() const f04 input.cpp /^ std::string f04() const EMPTY_MACRO { }$/;" function class:n01::C01 typeref:typename:std::string file: signature:() const m05 input.cpp /^ int m05 { 0 };$/;" member class:n01::C01 typeref:typename:int file: f05 input.cpp /^ std::string f05() const EMPTY_MACRO { }$/;" function class:n01::C01 typeref:typename:std::string file: signature:() const f06 input.cpp /^ std::string f06() const { }$/;" function class:n01::C01 typeref:typename:std::string file: signature:() const f07 input.cpp /^ std::string f07() { }$/;" function class:n01::C01 typeref:typename:std::string file: signature:() ================================================ FILE: Units/parser-cxx.r/brackets.cpp.d/input.cpp ================================================ // Compile with gcc -std=c++11 input.cpp #include #include #define EMPTY_MACRO namespace n01 { std::string g01 { "" }; auto f01(std::string p01) -> std::string { // initialization of unnamed temporary (makes no sense to report it, just don't think it's a function) std::string { "" }; // list initialisation for local std::string l01 { "" }; // constructor call for list initialisation new std::string { "" }; // copy list initialisation for local std::string l02 = { "" }; // return list initalizer return { "" }; } class C01 { public: std::string m01 { "" }; std::string m02; std::string m03; C01(std::string p02) : m02 { "" } { } C01() : m02 { "" }, m03 { "" } { std::string l03 { "" }; f01({ "" }); std::string l04 { "" }; C01 l05{ "" }; } std::string f02() const EMPTY_MACRO { } int m04 { 0 }; std::string f03() const EMPTY_MACRO { } std::string f04() const EMPTY_MACRO { } int m05 { 0 }; std::string f05() const EMPTY_MACRO { } std::string f06() const { } std::string f07() { } }; } ================================================ FILE: Units/parser-cxx.r/broken-input.d/input.cc ================================================ __attribute__((visibility("protected"))) f1(int f1p1,int f1p2 __attribute__([(unused)),int f1p3) __attribute__ ((warn_unused_result,always_inline,deprecated)) { ================================================ FILE: Units/parser-cxx.r/bug-github-1111.cpp.d/expected.tags ================================================ ================================================ FILE: Units/parser-cxx.r/bug-github-1111.cpp.d/input.cpp ================================================ test ================================================ FILE: Units/parser-cxx.r/bug-github-1671.cpp.d/expected.tags ================================================ my_function input.cpp /^void my_function()$/;" f typeref:typename:void tabs input.cpp /^struct tabs { const static long value = x; };$/;" s file: tabs input.cpp /^struct tabs::type> { const static long value = -x; };$/;" s file: value input.cpp /^struct tabs { const static long value = x; };$/;" m struct:tabs typeref:typename:const long file: value input.cpp /^struct tabs::type> { const static long value = -x; };$/;" m struct:tabs typeref:typename:const long file: ================================================ FILE: Units/parser-cxx.r/bug-github-1671.cpp.d/input.cpp ================================================ /* Bug #1671 reported by davisking on 2018.01.28 */ template struct tabs { const static long value = x; }; // specialize tabs template struct tabs::type> { const static long value = -x; }; void my_function() { } ================================================ FILE: Units/parser-cxx.r/bug-github-1675.cpp.d/expected.tags ================================================ longlong3 input.cpp /^struct __device_builtin__ longlong3$/;" s file: longlong4 input.cpp /^struct __device_builtin__ __builtin_align__(16) longlong4$/;" s file: w input.cpp /^ long long int x, y, z, w;$/;" m struct:longlong4 typeref:typename:long long int file: x input.cpp /^ long long int x, y, z, w;$/;" m struct:longlong4 typeref:typename:long long int file: x input.cpp /^ long long int x, y, z;$/;" m struct:longlong3 typeref:typename:long long int file: y input.cpp /^ long long int x, y, z, w;$/;" m struct:longlong4 typeref:typename:long long int file: y input.cpp /^ long long int x, y, z;$/;" m struct:longlong3 typeref:typename:long long int file: z input.cpp /^ long long int x, y, z, w;$/;" m struct:longlong4 typeref:typename:long long int file: z input.cpp /^ long long int x, y, z;$/;" m struct:longlong3 typeref:typename:long long int file: ================================================ FILE: Units/parser-cxx.r/bug-github-1675.cpp.d/input.cpp ================================================ // issue #1675 opened by bfrg on 01/02/2018 // // Structure declarations that contain macro functions are not parsed correctly. // structure longlong4 is completely ignored struct __device_builtin__ __builtin_align__(16) longlong4 { // x,y,z,w will be parsed as (global) variables and not members long long int x, y, z, w; }; // this one is parsed correctly struct __device_builtin__ longlong3 { long long int x, y, z; }; ================================================ FILE: Units/parser-cxx.r/bug-github-1781.cpp.d/args.ctags ================================================ --fields-c++=+{properties} --fields=+n+a+Z+S+e --kinds-c++=pfzlv ================================================ FILE: Units/parser-cxx.r/bug-github-1781.cpp.d/expected.tags ================================================ copyMatrix input.cpp /^void copyMatrix(const ::cv::Mat source_p, LaGenMatDouble *destination_p_p)$/;" f line:3 typeref:typename:void signature:(const::cv::Mat source_p,LaGenMatDouble * destination_p_p) end:17 copyMatrix input.cpp /^void copyMatrix(const LaGenMatDouble source_p, ::cv::Mat *destination_p_p)$/;" f line:19 typeref:typename:void signature:(const LaGenMatDouble source_p,::cv::Mat * destination_p_p) end:33 destination_p_p input.cpp /^void copyMatrix(const ::cv::Mat source_p, LaGenMatDouble *destination_p_p)$/;" z line:3 scope:function:copyMatrix typeref:typename:LaGenMatDouble * file: destination_p_p input.cpp /^void copyMatrix(const LaGenMatDouble source_p, ::cv::Mat *destination_p_p)$/;" z line:19 scope:function:copyMatrix typeref:typename:::cv::Mat * file: i_l input.cpp /^ for (int i_l = 0; i_l < source_p.rows(); ++i_l)$/;" l line:23 scope:function:copyMatrix typeref:typename:int file: end:23 i_l input.cpp /^ for (int i_l = 0; i_l < source_p.rows; ++i_l)$/;" l line:7 scope:function:copyMatrix typeref:typename:int file: end:7 j_l input.cpp /^ for (int j_l = 0; j_l < source_p.cols(); ++j_l)$/;" l line:25 scope:function:copyMatrix typeref:typename:int file: end:25 j_l input.cpp /^ for (int j_l = 0; j_l < source_p.cols; ++j_l)$/;" l line:9 scope:function:copyMatrix typeref:typename:int file: end:9 source_p input.cpp /^void copyMatrix(const ::cv::Mat source_p, LaGenMatDouble *destination_p_p)$/;" z line:3 scope:function:copyMatrix typeref:typename:const::cv::Mat file: source_p input.cpp /^void copyMatrix(const LaGenMatDouble source_p, ::cv::Mat *destination_p_p)$/;" z line:19 scope:function:copyMatrix typeref:typename:const LaGenMatDouble file: ================================================ FILE: Units/parser-cxx.r/bug-github-1781.cpp.d/input.cpp ================================================ // Bug reported by reidakdumont on 2018/07/05 void copyMatrix(const ::cv::Mat source_p, LaGenMatDouble *destination_p_p) { if (destination_p_p->rows() != source_p.rows || destination_p_p->cols() != source_p.cols) *destination_p_p = LaGenMatDouble(source_p.rows, source_p.cols); for (int i_l = 0; i_l < source_p.rows; ++i_l) { for (int j_l = 0; j_l < source_p.cols; ++j_l) { if (source_p.type() == CV_32F) (*destination_p_p)(i_l,j_l) = source_p.at(i_l,j_l); else if (source_p.type() == CV_64F) (*destination_p_p)(i_l,j_l) = source_p.at(i_l,j_l); } } } void copyMatrix(const LaGenMatDouble source_p, ::cv::Mat *destination_p_p) { if (destination_p_p->rows != source_p.rows() || destination_p_p->cols != source_p.cols()) *destination_p_p = ::cv::Mat(source_p.rows(), source_p.cols(), CV_64F); for (int i_l = 0; i_l < source_p.rows(); ++i_l) { for (int j_l = 0; j_l < source_p.cols(); ++j_l) { if (destination_p_p->type() == CV_32F) destination_p_p->at(i_l,j_l) = (source_p)(i_l,j_l); else if (destination_p_p->type() == CV_64F) destination_p_p->at(i_l,j_l) = (source_p)(i_l,j_l); } } } ================================================ FILE: Units/parser-cxx.r/bug-github-2263.cpp.d/args.ctags ================================================ --sort=no --kinds-C++=*-l ================================================ FILE: Units/parser-cxx.r/bug-github-2263.cpp.d/expected.tags ================================================ C0 input.cc /^template class C0 {$/;" c file: T input.cc /^template class C0 {$/;" Z class:C0 typeref:meta:class t input.cc /^ T t;$/;" m class:C0 typeref:typename:T file: C1 input.cc /^template > class C1 {$/;" c file: T input.cc /^template > class C1 {$/;" Z class:C1 typeref:meta:class T0 input.cc /^template > class C1 {$/;" Z class:C1 typeref:meta:typename t0 input.cc /^ T0 t0;$/;" m class:C1 typeref:typename:T0 file: c1rehash input.cc /^ void c1rehash() {}$/;" f class:C1 typeref:typename:void file: C2 input.cc /^template >> class C2 {$/;" c file: T input.cc /^template >> class C2 {$/;" Z class:C2 typeref:meta:class T1 input.cc /^template >> class C2 {$/;" Z class:C2 typeref:meta:typename t1 input.cc /^ T1 t1;$/;" m class:C2 typeref:typename:T1 file: c2rehash input.cc /^ void c2rehash() {}$/;" f class:C2 typeref:typename:void file: C3 input.cc /^template >>> class C3 {$/;" c file: T input.cc /^template >>> class C3 {$/;" Z class:C3 typeref:meta:class T2 input.cc /^template >>> class C3 {$/;" Z class:C3 typeref:meta:typename t2 input.cc /^ T2 t2;$/;" m class:C3 typeref:typename:T2 file: c3rehash input.cc /^ void c3rehash() {}$/;" f class:C3 typeref:typename:void file: C4 input.cc /^template >>>> class C4 {$/;" c file: T input.cc /^template >>>> class C4 {$/;" Z class:C4 typeref:meta:class T3 input.cc /^template >>>> class C4 {$/;" Z class:C4 typeref:meta:typename t3 input.cc /^ T3 t3;$/;" m class:C4 typeref:typename:T3 file: c4rehash input.cc /^ void c4rehash() {}$/;" f class:C4 typeref:typename:void file: C5 input.cc /^template >>>>> class C5 {$/;" c file: T input.cc /^template >>>>> class C5 {$/;" Z class:C5 typeref:meta:class T4 input.cc /^template >>>>> class C5 {$/;" Z class:C5 typeref:meta:typename t4 input.cc /^ T4 t4;$/;" m class:C5 typeref:typename:T4 file: c5rehash input.cc /^ void c5rehash() {}$/;" f class:C5 typeref:typename:void file: C4x1 input.cc /^template >>>, class S = int> class C4x1 {$/;" c file: T input.cc /^template >>>, class S = int> class C4x1 {$/;" Z class:C4x1 typeref:meta:class T3 input.cc /^template >>>, class S = int> class C4x1 {$/;" Z class:C4x1 typeref:meta:typename S input.cc /^template >>>, class S = int> class C4x1 {$/;" Z class:C4x1 typeref:meta:class t3 input.cc /^ T3 t3;$/;" m class:C4x1 typeref:typename:T3 file: s input.cc /^ S s;$/;" m class:C4x1 typeref:typename:S file: c4x1rehash input.cc /^ void c4x1rehash() {}$/;" f class:C4x1 typeref:typename:void file: C4x2 input.cc /^template >>>, class S = C0> class C4x2 {$/;" c file: T input.cc /^template >>>, class S = C0> class C4x2 {$/;" Z class:C4x2 typeref:meta:class T3 input.cc /^template >>>, class S = C0> class C4x2 {$/;" Z class:C4x2 typeref:meta:typename S input.cc /^template >>>, class S = C0> class C4x2 {$/;" Z class:C4x2 typeref:meta:class t3 input.cc /^ T3 t3;$/;" m class:C4x2 typeref:typename:T3 file: s input.cc /^ S s;$/;" m class:C4x2 typeref:typename:S file: c4x2rehash input.cc /^ void c4x2rehash() {}$/;" f class:C4x2 typeref:typename:void file: main input.cc /^main(void)$/;" f typeref:typename:int ================================================ FILE: Units/parser-cxx.r/bug-github-2263.cpp.d/input.cc ================================================ template class C0 { T t; }; template > class C1 { T0 t0; public: void c1rehash() {} }; template >> class C2 { T1 t1; public: void c2rehash() {} }; template >>> class C3 { T2 t2; public: void c3rehash() {} }; template >>>> class C4 { T3 t3; public: void c4rehash() {} }; template >>>>> class C5 { T4 t4; public: void c5rehash() {} }; template >>>, class S = int> class C4x1 { T3 t3; S s; public: void c4x1rehash() {} }; template >>>, class S = C0> class C4x2 { T3 t3; S s; public: void c4x2rehash() {} }; int main(void) { C0 c0; C1 c1(); C2 c2(); C3 c3(); C4 c4(); C4x1 cx41(); C4x2 cx42(); return 0; } ================================================ FILE: Units/parser-cxx.r/bug-github-2538.cpp.d/args.ctags ================================================ -D'M=T(M)' -D'x=y.x' ================================================ FILE: Units/parser-cxx.r/bug-github-2538.cpp.d/expected.tags ================================================ f input.cpp /^int f(int v)$/;" f typeref:typename:int test input.cpp /^struct test$/;" s file: x input.cpp /^ int x;$/;" m struct:test typeref:typename:int file: ================================================ FILE: Units/parser-cxx.r/bug-github-2538.cpp.d/input.cpp ================================================ // Recursive macro expansion causes a segmentation fault // or infinite loop struct test { int x; }; int f(int v) { struct test y; y.x = 10; return v & M; } ================================================ FILE: Units/parser-cxx.r/bug-github-3019.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-cxx.r/bug-github-3019.d/expected.tags ================================================ X input.cpp /^struct X {$/;" s file: operator int input.cpp /^ operator int() const { return 7; }$/;" f struct:X file: operator int* input.cpp /^ explicit operator int*() const { return nullptr; }$/;" f struct:X file: arr_t input.cpp /^ using arr_t = int[3];$/;" t struct:X typeref:typename:int[3] file: operator arr_t* input.cpp /^ operator arr_t*() const { return nullptr; } \/\/ OK if done through typedef$/;" f struct:X file: main input.cpp /^int main()$/;" f typeref:typename:int myint input-1.cpp /^typedef int myint;$/;" t typeref:typename:int file: Point input-1.cpp /^struct Point {$/;" s file: Point input-1.cpp /^ Point (int i): x(i), y(i) {}$/;" f struct:Point file: x input-1.cpp /^ int x,y;$/;" m struct:Point typeref:typename:int file: y input-1.cpp /^ int x,y;$/;" m struct:Point typeref:typename:int file: Int input-1.cpp /^class Int {$/;" c file: Int input-1.cpp /^ Int (int i = 0): val(i), p(i) {}$/;" f class:Int file: operator myint input-1.cpp /^ operator myint() const { return val; }$/;" f class:Int file: operator const myint input-1.cpp /^ operator const myint() const { return val; }$/;" f class:Int file: operator myint* input-1.cpp /^ operator myint*() const { return NULL; }$/;" f class:Int file: operator const myint* input-1.cpp /^ operator const myint*() const { return NULL; }$/;" f class:Int file: operator myint*const input-1.cpp /^ operator myint*const() const { return NULL; }$/;" f class:Int file: operator const myint*const input-1.cpp /^ operator const myint*const() const { return NULL; }$/;" f class:Int file: operator int input-1.cpp /^ operator int() const { return val; }$/;" f class:Int file: operator int* input-1.cpp /^ operator int *() const { return 0; }$/;" f class:Int file: operator const int* input-1.cpp /^ operator const int *() const { return 0; }$/;" f class:Int file: operator const int*const input-1.cpp /^ operator const int *const() const { return 0; }$/;" f class:Int file: operator int*const input-1.cpp /^ operator int *const() const { return 0; }$/;" f class:Int file: operator struct Point* input-1.cpp /^ operator struct Point *() const { return (Point *)&p; }$/;" f class:Int file: operator const struct Point* input-1.cpp /^ operator const struct Point *() const { return 0; }$/;" f class:Int file: operator const struct Point*const input-1.cpp /^ operator const struct Point *const() const { return 0; }$/;" f class:Int file: operator struct Point*const input-1.cpp /^ operator struct Point *const() const { return 0; }$/;" f class:Int file: val input-1.cpp /^ int val;$/;" m class:Int typeref:typename:int file: p input-1.cpp /^ struct Point p;$/;" m class:Int typeref:struct:Point file: main input-1.cpp /^int main(void)$/;" f typeref:typename:int muchar input-2.cpp /^typedef char muchar;$/;" t typeref:typename:char file: Range input-2.cpp /^struct Range {$/;" s file: Range input-2.cpp /^ Range (int b, int e): begin(b), end(end) {}$/;" f struct:Range file: begin input-2.cpp /^ int begin, end;$/;" m struct:Range typeref:typename:int file: end input-2.cpp /^ int begin, end;$/;" m struct:Range typeref:typename:int file: Char input-2.cpp /^class Char {$/;" c file: Char input-2.cpp /^ Char (char i = 0): val(i), r(i, i) {}$/;" f class:Char file: operator volatile muchar input-2.cpp /^ operator volatile muchar() const { return val; }$/;" f class:Char file: operator volatile const muchar* input-2.cpp /^ operator volatile const muchar*() const { return 0; }$/;" f class:Char file: operator volatile const muchar*const input-2.cpp /^ operator volatile const muchar*const() const { return 0; }$/;" f class:Char file: operator volatile int* input-2.cpp /^ operator volatile int *() const { return 0; }$/;" f class:Char file: operator volatile int*volatile input-2.cpp /^ operator volatile int *volatile() const { return 0; }$/;" f class:Char file: operator int*volatile input-2.cpp /^ operator int *volatile() const { return 0; }$/;" f class:Char file: operator volatile const int* input-2.cpp /^ operator volatile const int *() const { return 0; }$/;" f class:Char file: operator volatile const int*volatile input-2.cpp /^ operator volatile const int *volatile() const { return 0; }$/;" f class:Char file: operator int*volatile const input-2.cpp /^ operator int *volatile const() const { return 0; }$/;" f class:Char file: operator volatile const int* input-2.cpp /^ operator volatile const int *() volatile { return 0; }$/;" f class:Char file: operator volatile const int*volatile input-2.cpp /^ operator volatile const int *volatile() volatile { return 0; }$/;" f class:Char file: operator int*volatile const input-2.cpp /^ operator int *volatile const() volatile { return 0; }$/;" f class:Char file: operator volatile struct Range* input-2.cpp /^ operator volatile struct Range *() const { return 0; }$/;" f class:Char file: operator volatile struct Range*volatile input-2.cpp /^ operator volatile struct Range *volatile() const { return 0; }$/;" f class:Char file: operator struct Range*volatile input-2.cpp /^ operator struct Range *volatile() const { return 0; }$/;" f class:Char file: operator volatile const struct Range* input-2.cpp /^ operator volatile const struct Range *() const { return 0; }$/;" f class:Char file: operator volatile const struct Range*volatile input-2.cpp /^ operator volatile const struct Range *volatile() const { return 0; }$/;" f class:Char file: operator struct Range*volatile const input-2.cpp /^ operator struct Range *volatile const() const { return 0; }$/;" f class:Char file: operator volatile const struct Range* input-2.cpp /^ operator volatile const struct Range *() volatile { return 0; }$/;" f class:Char file: operator volatile const struct Range*volatile input-2.cpp /^ operator volatile const struct Range *volatile() volatile { return 0; }$/;" f class:Char file: operator struct Range*volatile const input-2.cpp /^ operator struct Range *volatile const() volatile { return 0; } $/;" f class:Char file: val input-2.cpp /^ int val;$/;" m class:Char typeref:typename:int file: r input-2.cpp /^ struct Range r;$/;" m class:Char typeref:struct:Range file: main input-2.cpp /^int main(void)$/;" f typeref:typename:int ================================================ FILE: Units/parser-cxx.r/bug-github-3019.d/input-1.cpp ================================================ typedef int myint; struct Point { Point (int i): x(i), y(i) {} int x,y; }; class Int { public: Int (int i = 0): val(i), p(i) {} operator myint() const { return val; } operator const myint() const { return val; } operator myint*() const { return NULL; } operator const myint*() const { return NULL; } operator myint*const() const { return NULL; } operator const myint*const() const { return NULL; } operator int() const { return val; } operator int *() const { return 0; } operator const int *() const { return 0; } operator const int *const() const { return 0; } operator int *const() const { return 0; } operator struct Point *() const { return (Point *)&p; } operator const struct Point *() const { return 0; } operator const struct Point *const() const { return 0; } operator struct Point *const() const { return 0; } private: int val; struct Point p; }; int main(void) { return Int (); } ================================================ FILE: Units/parser-cxx.r/bug-github-3019.d/input-2.cpp ================================================ typedef char muchar; struct Range { Range (int b, int e): begin(b), end(end) {} int begin, end; }; class Char { public: Char (char i = 0): val(i), r(i, i) {} operator volatile muchar() const { return val; } operator volatile const muchar*() const { return 0; } operator volatile const muchar*const() const { return 0; } operator volatile int *() const { return 0; } operator volatile int *volatile() const { return 0; } operator int *volatile() const { return 0; } operator volatile const int *() const { return 0; } operator volatile const int *volatile() const { return 0; } operator int *volatile const() const { return 0; } operator volatile const int *() volatile { return 0; } operator volatile const int *volatile() volatile { return 0; } operator int *volatile const() volatile { return 0; } operator volatile struct Range *() const { return 0; } operator volatile struct Range *volatile() const { return 0; } operator struct Range *volatile() const { return 0; } operator volatile const struct Range *() const { return 0; } operator volatile const struct Range *volatile() const { return 0; } operator struct Range *volatile const() const { return 0; } operator volatile const struct Range *() volatile { return 0; } operator volatile const struct Range *volatile() volatile { return 0; } operator struct Range *volatile const() volatile { return 0; } private: int val; struct Range r; }; int main(void) { return Char (); } ================================================ FILE: Units/parser-cxx.r/bug-github-3019.d/input.cpp ================================================ // Taken from #3019 submitted by @hammockt struct X { //implicit conversion operator int() const { return 7; } // explicit conversion explicit operator int*() const { return nullptr; } // Error: array operator not allowed in conversion-type-id // operator int(*)[3]() const { return nullptr; } using arr_t = int[3]; operator arr_t*() const { return nullptr; } // OK if done through typedef // operator arr_t () const; // Error: conversion to array not allowed in any case }; int main() { X x; int n = static_cast(x); // OK: sets n to 7 int m = x; // OK: sets m to 7 int* p = static_cast(x); // OK: sets p to null // int* q = x; // Error: no implicit conversion int (*pa)[3] = x; // OK } ================================================ FILE: Units/parser-cxx.r/bug-github-3413.cpp.d/README ================================================ This is a crash test. So no expected.tags here. ================================================ FILE: Units/parser-cxx.r/bug-github-3413.cpp.d/input.hpp ================================================ struct S ================================================ FILE: Units/parser-cxx.r/bug-github-871.cpp.d/args.ctags ================================================ --kinds-c++=* ================================================ FILE: Units/parser-cxx.r/bug-github-871.cpp.d/expected.tags ================================================ funa input.cpp /^bool funa()$/;" f typeref:typename:bool funb input.cpp /^int funb()$/;" f typeref:typename:int ================================================ FILE: Units/parser-cxx.r/bug-github-871.cpp.d/input.cpp ================================================ // Bug reported by hierabyss on github.com. // funb() was not present in the ctags output. bool funa() { if (first) return false; #if defined (MACRO) if (a) { if (second) #else if (a) { #endif return false; } return true; } int funb() { } ================================================ FILE: Units/parser-cxx.r/bug-github-pull-972.cpp.d/args.ctags ================================================ --sort=no --fields=+StiZK --fields-c++=+{template}{properties} ================================================ FILE: Units/parser-cxx.r/bug-github-pull-972.cpp.d/expected.tags ================================================ A input.cpp /^class A : public T$/;" class file: inherits:T template: this_type input.cpp /^ typedef A this_type;$/;" typedef scope:class:A typeref:typename:A file: A input.cpp /^ A(int i ) : m_i(i)$/;" function scope:class:A file: signature:(int i) create input.cpp /^ static A create(int i)$/;" function scope:class:A typeref:typename:A file: signature:(int i) properties:static g_i input.cpp /^ static int g_i;$/;" member scope:class:A typeref:typename:int file: properties:static m_i input.cpp /^ int m_i;$/;" member scope:class:A typeref:typename:int file: g_i input.cpp /^int A::g_i; \/\/ (3) fail during parsing static member definition/;" member scope:class:A typeref:typename:int template: ================================================ FILE: Units/parser-cxx.r/bug-github-pull-972.cpp.d/input.cpp ================================================ // Reported by Przemyslaw Szymanski on 02.06.2016 template // (1) fail if there are multiple params with default values class A : public T { public: typedef A this_type; A(int i ) : m_i(i) { } static A create(int i) { return this_type(i); // (2) fail here } static int g_i; private: int m_i; }; template int A::g_i; // (3) fail during parsing static member definition ================================================ FILE: Units/parser-cxx.r/bug-issue-3166.d/args.ctags ================================================ --sort=no --fields=+e ================================================ FILE: Units/parser-cxx.r/bug-issue-3166.d/expected.tags ================================================ DEAMER_LANGUAGE_DATASTRUCTURE_DEFINITION_OBJECT_MAIN_THREAT_THREAT_ANALYZER_DEAMER_LEXICON_TYPE_H input.cxx /^#define DEAMER_LANGUAGE_DATASTRUCTURE_DEFINITION_OBJECT_MAIN_THREAT_THREAT_ANALYZER_DEAMER_LEXIC/;" d file: end:24 deamer input.cxx /^namespace deamer::language::type::definition::object::main::threat::deamer::lexicon$/;" n file: end:42 language input.cxx /^namespace deamer::language::type::definition::object::main::threat::deamer::lexicon$/;" n namespace:deamer file: end:42 type input.cxx /^namespace deamer::language::type::definition::object::main::threat::deamer::lexicon$/;" n namespace:deamer::language file: end:42 definition input.cxx /^namespace deamer::language::type::definition::object::main::threat::deamer::lexicon$/;" n namespace:deamer::language::type file: end:42 object input.cxx /^namespace deamer::language::type::definition::object::main::threat::deamer::lexicon$/;" n namespace:deamer::language::type::definition file: end:42 main input.cxx /^namespace deamer::language::type::definition::object::main::threat::deamer::lexicon$/;" n namespace:deamer::language::type::definition::object file: end:42 threat input.cxx /^namespace deamer::language::type::definition::object::main::threat::deamer::lexicon$/;" n namespace:deamer::language::type::definition::object::main file: end:42 deamer input.cxx /^namespace deamer::language::type::definition::object::main::threat::deamer::lexicon$/;" n namespace:deamer::language::type::definition::object::main::threat file: end:42 lexicon input.cxx /^namespace deamer::language::type::definition::object::main::threat::deamer::lexicon$/;" n namespace:deamer::language::type::definition::object::main::threat::deamer file: end:42 Type input.cxx /^ enum class Type$/;" g namespace:deamer::language::type::definition::object::main::threat::deamer::lexicon file: end:41 Unknown input.cxx /^ Unknown = 0,$/;" e enum:deamer::language::type::definition::object::main::threat::deamer::lexicon::Type file: UnusedTerminal input.cxx /^ UnusedTerminal = 1,$/;" e enum:deamer::language::type::definition::object::main::threat::deamer::lexicon::Type file: DeletedTerminalReferencedInGrammar input.cxx /^ DeletedTerminalReferencedInGrammar = 2,$/;" e enum:deamer::language::type::definition::object::main::threat::deamer::lexicon::Type file: CrashTerminalReferencedInGrammar input.cxx /^ CrashTerminalReferencedInGrammar = 3,$/;" e enum:deamer::language::type::definition::object::main::threat::deamer::lexicon::Type file: TerminalIsBaseSetOfLaterTerminal input.cxx /^ TerminalIsBaseSetOfLaterTerminal = 4,$/;" e enum:deamer::language::type::definition::object::main::threat::deamer::lexicon::Type file: NonStandardNamingConvention input.cxx /^ NonStandardNamingConvention = 5,$/;" e enum:deamer::language::type::definition::object::main::threat::deamer::lexicon::Type file: ================================================ FILE: Units/parser-cxx.r/bug-issue-3166.d/input.cxx ================================================ // Taken from theDeamerProject/Deamer/include/Deamer/Language/Type/Definition/Object/Main/Threat/Threat/Analyzer/Deamer/Lexicon/Type.h // of https://github.com/Deruago/theDeamerProject /* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 3 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* * Part of the DeamerProject. * For more information go to: https://github.com/Deruago/theDeamerProject */ #ifndef DEAMER_LANGUAGE_DATASTRUCTURE_DEFINITION_OBJECT_MAIN_THREAT_THREAT_ANALYZER_DEAMER_LEXICON_TYPE_H #define DEAMER_LANGUAGE_DATASTRUCTURE_DEFINITION_OBJECT_MAIN_THREAT_THREAT_ANALYZER_DEAMER_LEXICON_TYPE_H namespace deamer::language::type::definition::object::main::threat::deamer::lexicon { /*! \enum Type * * \brief All lexicon threats */ enum class Type { Unknown = 0, UnusedTerminal = 1, DeletedTerminalReferencedInGrammar = 2, CrashTerminalReferencedInGrammar = 3, TerminalIsBaseSetOfLaterTerminal = 4, NonStandardNamingConvention = 5, }; } #endif // DEAMER_LANGUAGE_DATASTRUCTURE_DEFINITION_OBJECT_MAIN_THREAT_THREAT_ANALYZER_DEAMER_LEXICON_TYPE_H ================================================ FILE: Units/parser-cxx.r/bug1020715.cpp.d/expected.tags ================================================ f input.cpp /^void f() {$/;" f typeref:typename:void ================================================ FILE: Units/parser-cxx.r/bug1020715.cpp.d/input.cpp ================================================ void f() { done(a<<1); a->a; if (a->a) { } } ================================================ FILE: Units/parser-cxx.r/bug1093123.cpp.d/args.ctags ================================================ --sort=no --kinds-C++=* ================================================ FILE: Units/parser-cxx.r/bug1093123.cpp.d/expected.tags ================================================ main input.cpp /^int main() {$/;" f typeref:typename:int std input.cpp /^using namespace std;$/;" U function:main m input.cpp /^int m;$/;" l function:main typeref:typename:int file: ================================================ FILE: Units/parser-cxx.r/bug1093123.cpp.d/input.cpp ================================================ #include int main() { using namespace std; cout << 0 << endl; int m; } ================================================ FILE: Units/parser-cxx.r/bug1187505.cpp.d/args.ctags ================================================ --sort=no --kinds-C++=* ================================================ FILE: Units/parser-cxx.r/bug1187505.cpp.d/expected.tags ================================================ Abra input.cpp /^class Abra : public Kadabra$/;" c file: ================================================ FILE: Units/parser-cxx.r/bug1187505.cpp.d/input.cpp ================================================ MY_MACRO(qwerty < 1); class Abra : public Kadabra { }; ================================================ FILE: Units/parser-cxx.r/bug1252.cpp.d/expected.tags ================================================ _PyNone_Type input.cpp /^PyAPI_DATA(PyTypeObject) _PyNone_Type;/;" v typeref:typename:PyAPI_DATA (PyTypeObject) ================================================ FILE: Units/parser-cxx.r/bug1252.cpp.d/input.cpp ================================================ PyAPI_DATA(PyTypeObject) _PyNone_Type; ================================================ FILE: Units/parser-cxx.r/bug1548443.cpp.d/args.ctags ================================================ --kinds-c++=+p --fields=+iaS --extras=+q ================================================ FILE: Units/parser-cxx.r/bug1548443.cpp.d/expected.tags ================================================ TestStruct input.cpp /^struct TestStruct$/;" s file: TestStruct::_number input.cpp /^int _number;$/;" m struct:TestStruct typeref:typename:int file: access:public TestUnion input.cpp /^union TestUnion$/;" u file: TestUnion::_number input.cpp /^int _number;$/;" m union:TestUnion typeref:typename:int file: access:public _number input.cpp /^int _number;$/;" m struct:TestStruct typeref:typename:int file: access:public _number input.cpp /^int _number;$/;" m union:TestUnion typeref:typename:int file: access:public ================================================ FILE: Units/parser-cxx.r/bug1548443.cpp.d/input.cpp ================================================ union TestUnion { int _number; }; struct TestStruct { int _number; }; ================================================ FILE: Units/parser-cxx.r/bug1563476.cpp.d/args.ctags ================================================ --sort=no --kinds-C++=* ================================================ FILE: Units/parser-cxx.r/bug1563476.cpp.d/expected.tags ================================================ g input.cpp /^int g() {$/;" f typeref:typename:int IntroduceBitDef input.cpp /^struct IntroduceBitDef< Accessor, typename$/;" s file: Accessor input.cpp /^template< typename Accessor >$/;" Z struct:IntroduceBitDef typeref:meta:typename f input.cpp /^ int f() { }$/;" f struct:IntroduceBitDef typeref:typename:int file: ================================================ FILE: Units/parser-cxx.r/bug1563476.cpp.d/input.cpp ================================================ int g() { } template< typename Accessor, typename bEnable = void > struct IntroduceBitDef; template< typename Accessor > struct IntroduceBitDef< Accessor, typename boost::enable_if_c< CoreConfig::VERSION <= 3 >::type > { // class body here // anything after this point is not parsed by ctags int f() { } }; ================================================ FILE: Units/parser-cxx.r/bug1575055.cpp.d/README ================================================ 'm' kind is given to the `variable' in the input. I, Masatake YAMATO, think 'v' kind should be ginve instead. ================================================ FILE: Units/parser-cxx.r/bug1575055.cpp.d/expected.tags ================================================ MyClass input.cpp /^ class MyClass { };$/;" c namespace:TheNamespace file: TheNamespace input.cpp /^namespace TheNamespace {$/;" n file: variable input.cpp /^ int variable;$/;" v namespace:TheNamespace typeref:typename:int ================================================ FILE: Units/parser-cxx.r/bug1575055.cpp.d/input.cpp ================================================ namespace TheNamespace { class MyClass { }; int variable; } ================================================ FILE: Units/parser-cxx.r/bug1585745.cpp.d/expected.tags ================================================ Class5 input.cpp /^class Class5 {$/;" c file: ~Class1 input.cpp /^Class1::~Class1() { }$/;" f class:Class1 ~Class2 input.cpp /^Class2::~ Class2() { }$/;" f class:Class2 ~Class3 input.cpp /^Class3:: ~Class3() { }$/;" f class:Class3 ~Class4 input.cpp /^Class4:: ~ Class4() { }$/;" f class:Class4 ~Class5 input.cpp /^ public: ~ Class5() { }$/;" f class:Class5 file: ================================================ FILE: Units/parser-cxx.r/bug1585745.cpp.d/input.cpp ================================================ // Despite the weird whitespace, all these destructors should be recognized and tagged. Class1::~Class1() { } Class2::~ Class2() { } Class3:: ~Class3() { } Class4:: ~ Class4() { } class Class5 { public: ~ Class5() { } }; ================================================ FILE: Units/parser-cxx.r/bug1770479.cpp.d/args.ctags ================================================ --kinds-c++=+l ================================================ FILE: Units/parser-cxx.r/bug1770479.cpp.d/expected.tags ================================================ a input.cpp /^ std::ostringstream a;$/;" l function:main typeref:typename:std::ostringstream file: b input.cpp /^ std::ostringstream b;$/;" l function:main typeref:typename:std::ostringstream file: foo input.cpp /^int foo (int i)$/;" f typeref:typename:int main input.cpp /^int main (int argc, char **argv)$/;" f typeref:typename:int ================================================ FILE: Units/parser-cxx.r/bug1770479.cpp.d/input.cpp ================================================ #include int main (int argc, char **argv) { std::ostringstream a; a << "a"; std::ostringstream b; b << "b"; return 0; } int foo (int i) { return i; } ================================================ FILE: Units/parser-cxx.r/bug1773926.cpp.d/args.ctags ================================================ -n ================================================ FILE: Units/parser-cxx.r/bug1773926.cpp.d/expected.tags ================================================ ERROR_HAPPENED input.cpp 3;" d file: NEXT_DEFINE input.cpp 5;" d file: OK input.cpp 4;" d file: main input.cpp 7;" f typeref:typename:int ================================================ FILE: Units/parser-cxx.r/bug1773926.cpp.d/input.cpp ================================================ #include #define ERROR_HAPPENED 50 #define OK 2 #define NEXT_DEFINE 3 int main(int argc, char* argv[]) { printf("Hello world\n"); return 0; } ================================================ FILE: Units/parser-cxx.r/bug1799340.cpp.d/expected.tags ================================================ f1 input.cpp /^std::string & f1() {}$/;" f typeref:typename:std::string & f2 input.cpp /^const std::string & f2() {}$/;" f typeref:typename:const std::string & f3 input.cpp /^std::string const & f3() {}$/;" f typeref:typename:std::string const & ================================================ FILE: Units/parser-cxx.r/bug1799340.cpp.d/input.cpp ================================================ std::string & f1() {} const std::string & f2() {} std::string const & f3() {} ================================================ FILE: Units/parser-cxx.r/bug1799343-1.cpp.d/args.ctags ================================================ --sort=no --kinds-C++=* ================================================ FILE: Units/parser-cxx.r/bug1799343-1.cpp.d/expected.tags ================================================ C input.cpp /^struct C { int x; };$/;" s file: x input.cpp /^struct C { int x; };$/;" m struct:C typeref:typename:int file: D input.cpp /^struct D : ::C {$/;" s file: D input.cpp /^ D() { x = 123; }$/;" f struct:D file: ~D input.cpp /^ ~D() { std::cout << x << std::endl; }$/;" f struct:D file: main input.cpp /^int main(void) {$/;" f typeref:typename:int d input.cpp /^ D d;$/;" l function:main typeref:typename:D file: ================================================ FILE: Units/parser-cxx.r/bug1799343-1.cpp.d/input.cpp ================================================ #include struct C { int x; }; struct D : ::C { D() { x = 123; } ~D() { std::cout << x << std::endl; } }; int main(void) { D d; return 0; } ================================================ FILE: Units/parser-cxx.r/bug1799343-2.cpp.d/args.ctags ================================================ --sort=no --kinds-C++=* ================================================ FILE: Units/parser-cxx.r/bug1799343-2.cpp.d/expected.tags ================================================ P input.cpp /^class P {$/;" c file: x input.cpp /^ int x;$/;" m class:P typeref:typename:int file: A input.cpp /^namespace A {$/;" n file: P input.cpp /^ class P {$/;" c namespace:A file: x input.cpp /^ int x;$/;" m class:A::P typeref:typename:int file: Q input.cpp /^ class Q {$/;" c namespace:A file: y input.cpp /^ int y;$/;" m class:A::Q typeref:typename:int file: C input.cpp /^ namespace C {$/;" n namespace:A file: R input.cpp /^ class R: ::P, A::Q {$/;" c namespace:A::C file: z input.cpp /^ int z;$/;" m class:A::C::R typeref:typename:int file: f input.cpp /^ int f (int v) { return v + x; }$/;" f class:A::C::R typeref:typename:int file: v input.cpp /^ int f (int v) { return v + x; }$/;" z function:A::C::R::f typeref:typename:int file: B input.cpp /^namespace B {$/;" n file: S input.cpp /^ class S : A::C::R {$/;" c namespace:B file: t input.cpp /^ int t;$/;" m class:B::S typeref:typename:int file: ================================================ FILE: Units/parser-cxx.r/bug1799343-2.cpp.d/input.cpp ================================================ class P { protected: int x; }; namespace A { class P { protected: int x; }; class Q { int y; }; namespace C { class R: ::P, A::Q { int z; int f (int v) { return v + x; } }; } } namespace B { class S : A::C::R { int t; }; } ================================================ FILE: Units/parser-cxx.r/bug1907083.cpp.d/expected.tags ================================================ m1 input.cpp /^C::T * C::m1() {}$/;" f class:C typeref:typename:C::T * m2 input.cpp /^C::T * const C::m2() {}$/;" f class:C typeref:typename:C::T * const m3 input.cpp /^C::T const * C::m3() {}$/;" f class:C typeref:typename:C::T const * m4 input.cpp /^C::T const * const C::m4() {}$/;" f class:C typeref:typename:C::T const * const ================================================ FILE: Units/parser-cxx.r/bug1907083.cpp.d/input.cpp ================================================ // All of these should have "class:C", but m2-m4 have "class C::C" with ctags 5.7. C::T * C::m1() {} C::T * const C::m2() {} C::T const * C::m3() {} C::T const * const C::m4() {} ================================================ FILE: Units/parser-cxx.r/bug1924919.cpp.d/README ================================================ The orignal bug report can be found in https://sourceforge.net/p/ctags/bugs/217/ I, Masatake YAMATO, think both a bug report and developer of e-ctags go wrong. Let's consider following input: #include namespace mud { std::string MajorVersion; std::string MinorVersion; int (* foo) (void); }; All MajorVersion, MinorVersion and foo are tagged with 'm' kind. This is less informative. Whether they are members or not can be known from "namespace:mud" field of tags file. ================================================ FILE: Units/parser-cxx.r/bug1924919.cpp.d/args.ctags ================================================ --sort=no --kinds-C++=* ================================================ FILE: Units/parser-cxx.r/bug1924919.cpp.d/expected.tags ================================================ mud input.cpp /^namespace mud {$/;" n file: MajorVersion input.cpp /^ std::string MajorVersion;$/;" v namespace:mud typeref:typename:std::string MinorVersion input.cpp /^ std::string MinorVersion;$/;" v namespace:mud typeref:typename:std::string foo input.cpp /^ int (* foo) (void);$/;" v namespace:mud typeref:typename:int (*)(void) ================================================ FILE: Units/parser-cxx.r/bug1924919.cpp.d/input.cpp ================================================ #include namespace mud { std::string MajorVersion; std::string MinorVersion; int (* foo) (void); }; ================================================ FILE: Units/parser-cxx.r/bug639639.cpp.d/expected.tags ================================================ Namespace1 input.h /^namespace Namespace1$/;" n __anon4605901a0103 input.h /^enum {anon2=1000};$/;" g anon2 input.h /^enum {anon2=1000};$/;" e enum:__anon4605901a0103 ================================================ FILE: Units/parser-cxx.r/bug639639.cpp.d/input.h ================================================ /* Date: Sun, 17 Nov 2002 04:41:42 -0800 Subject: [ ctags-Bugs-639639 ] incorrect enum field for C++ header Bugs item #639639, was opened at 2002-11-17 13:41 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106556&aid=639639&group_id=6556 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Matthias S. Benkmann (mbenkmann) Assigned to: Nobody/Anonymous (nobody) Summary: incorrect enum field for C++ header Initial Comment: ----------- temp2.h ------------- */ namespace Namespace1 { int function2(char* str); } enum {anon2=1000}; ---------------------------- /* > ctags --excmd=number --fields=+kKmnsSz --file-scope=no -f - temp2.h Namespace1 temp2.h 1;" kind:namespace line:1 anon2 temp2.h 6;" kind:enumerator line:6 enum:Namespace1 As you can see ctags thinks that anon2 belongs to enum Namespace1 which it obviously doesn't (Namespace1 is not even an enum). It should be enum:. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106556&aid=639639&group_id=6556 */ ================================================ FILE: Units/parser-cxx.r/bug639644.cpp.d/expected.tags ================================================ __anon21d591360111 input.h /^{$/;" n foo input.h /^ int foo;$/;" v namespace:__anon21d591360111 typeref:typename:int ================================================ FILE: Units/parser-cxx.r/bug639644.cpp.d/input.h ================================================ /* Date: Sun, 17 Nov 2002 04:57:43 -0800 Subject: [ ctags-Bugs-639644 ] anonymous namespaces in headers Bugs item #639644, was opened at 2002-11-17 13:57 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106556&aid=639644&group_id=6556 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Matthias S. Benkmann (mbenkmann) Assigned to: Nobody/Anonymous (nobody) Summary: anonymous namespaces in headers Initial Comment: --------------------temp3.h---------------- */ namespace { int foo; } /* --------------------------------------------- > ctags -f - temp3.h foo temp3.h /^ int foo;$/;" m namespace: That last field should be "namespace:" and the kind field should be variable, not member. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106556&aid=639644&group_id=6556 */ ================================================ FILE: Units/parser-cxx.r/bug665086.cpp.d/expected.tags ================================================ C12 input.cpp /^ class C12{}$/;" c namespace:N1::N2 file: N1 input.cpp /^namespace N1$/;" n file: N2 input.cpp /^ namespace N2$/;" n namespace:N1 file: ================================================ FILE: Units/parser-cxx.r/bug665086.cpp.d/input.cpp ================================================ /* Bugs item #665086, was opened at 2003-01-09 15:30 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106556&aid=665086&group_id=6556 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Welti Marco (cider101) Assigned to: Nobody/Anonymous (nobody) Summary: nested namespaces Initial Comment: hi it seems that ctags has ommits the scope for nested namespaces. */ namespace N1 { namespace N2 { class C12{} } } /* N1 test.h /^namespace N1$/;" namespace line:1 N2 test.h /^namespace N2$/;" namespace line:3 C12 test.h /^ class C12{};$/;" class line:5 namespace:N1::N2 */ ================================================ FILE: Units/parser-cxx.r/bug834.cpp.d/args.ctags ================================================ --sort=no --kinds-C++=* ================================================ FILE: Units/parser-cxx.r/bug834.cpp.d/expected.tags ================================================ std input.cpp /^using namespace std;$/;" U file: C input.cpp /^vector> C;$/;" v typeref:typename:vector> A input.cpp /^struct A {$/;" s file: a input.cpp /^ int a;$/;" m struct:A typeref:typename:int file: b input.cpp /^ int b;$/;" m struct:A typeref:typename:int file: ================================================ FILE: Units/parser-cxx.r/bug834.cpp.d/input.cpp ================================================ /* github issue 834 reported by hierabyss on 2016.03.12 [...] after run ctags test1.cpp, there is no tag in the tags file. */ #include using namespace std; vector> C; struct A { int a; int b; }; ================================================ FILE: Units/parser-cxx.r/bug849591.cpp.d/expected.tags ================================================ Foo input.cpp /^void MainClass< ParamClass1&, ParamClass2>::Foo()$/;" f class:MainClass typeref:typename:void Foo input.cpp /^void MainClass::Foo()$/;" f class:MainClass typeref:typename:void ================================================ FILE: Units/parser-cxx.r/bug849591.cpp.d/input.cpp ================================================ /* Bugs item #849591, was opened at 2003-11-26 11:35 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106556&aid=849591&group_id=6556 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Igor Proskuriakov (proskig) Assigned to: Nobody/Anonymous (nobody) Summary: C++ Member templates Initial Comment: Hi, There seems to be a problem with how ctags treats C++ member templates. Example: */ void MainClass< ParamClass1&, ParamClass2>::Foo() { exit(0); }; /* Generates erroneous tag ParamClass1 test.cpp /^void MainClass< ParamClass1&, ParamClass2>::Foo()$/;" v Full ctags file: !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ !_TAG_PROGRAM_NAME Exuberant Ctags // !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ !_TAG_PROGRAM_VERSION 5.5.2 // Foo test.cpp /^void MainClass< const ParamClass1&, ParamClass2>::Foo()$/;" f class:ParamClass2 ParamClass1 test.cpp /^void MainClass< ParamClass1&, ParamClass2>::Foo()$/;" v ----- Removing space after first angle bracket: */ void MainClass::Foo() { exit(0); }; /* makes ctags to drop first letter from parameter class name: aramClass1 test.cpp /^void MainClass::Foo()$/;" v Let me know if you need any clarification with this issue. Many thanks in advance! */ ================================================ FILE: Units/parser-cxx.r/bug852368.cpp.d/args.ctags ================================================ --kinds-C++=+p --fields=+S ================================================ FILE: Units/parser-cxx.r/bug852368.cpp.d/expected.tags ================================================ foo input.cpp /^void foo(std::vector &);$/;" p typeref:typename:void file: signature:(std::vector &) ================================================ FILE: Units/parser-cxx.r/bug852368.cpp.d/input.cpp ================================================ /* Bugs item #852368, was opened at 2003-12-01 23:20 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106556&aid=852368&group_id=6556 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Welti Marco (cider101) Assigned to: Nobody/Anonymous (nobody) Summary: c/c++ unabalanced template brackets in signature Initial Comment: hi, ctags 5.5x generates unbalanced template brackets in the method/function signature if a function parameter is a template. i.e. */ void foo(std::vector &); /* generates the following signature signature:void (std::vector<&) let me know if you need more details. regards cider */ ================================================ FILE: Units/parser-cxx.r/bug872494.cpp.d/expected.tags ================================================ FooClass2 input.cpp /^class FooClass2{};$/;" c file: TemplClass input.cpp /^template<> class TemplClass< char* > { int i;};$/;" c file: TemplClass input.cpp /^template class TemplClass { double i;};$/;" c file: i input.cpp /^template<> class TemplClass< char* > { int i;};$/;" m class:TemplClass typeref:typename:int file: i input.cpp /^template class TemplClass { double i;};$/;" m class:TemplClass typeref:typename:double file: ================================================ FILE: Units/parser-cxx.r/bug872494.cpp.d/input.cpp ================================================ /* Bugs item #872494, was opened at 2004-01-07 16:33 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106556&aid=872494&group_id=6556 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Igor Proskuriakov (proskig) Assigned to: Nobody/Anonymous (nobody) Summary: C++ class template specialization Initial Comment: Hi, some time ago I posted a bug related to C++ member template, which was fixed using patch bug849591.diff. Many thanks - it really fixed the problem ! Now about a different one. When parsing C++ file ctags seems to ignore template specialization, but I think that it maybe useful to add it as a configurable feature. Another problem is that template specialization seems to confuse patched version of ctags (patch bug849591.diff). When running a patched version against the following file */ template class TemplClass { double i;}; template<> class TemplClass< char* > { int i;}; class FooClass2{}; /* it does not generate tag for FooClass2 while ctags 5.5.2 does generate tag for FooClass2. Neither of them generate tag for specialization TemplClass. thanks in advance and let me know should you need more info! Igor */ ================================================ FILE: Units/parser-cxx.r/c-header-as-cpp.d/args.ctags ================================================ --kinds-c++=+px ================================================ FILE: Units/parser-cxx.r/c-header-as-cpp.d/expected.tags ================================================ private input.h /^extern int private;$/;" x typeref:typename:int protected input.h /^typedef int protected;$/;" t typeref:typename:int public input.h /^static inline int public(void)$/;" f typeref:typename:int ================================================ FILE: Units/parser-cxx.r/c-header-as-cpp.d/input.h ================================================ /* Reported by masatake in issue #930@github. .h files are always parsed in C++ mode, for safety. However they may actually contain C code, which may use C++ keywords as variable names. This test checks the C++ parser capabilities to guess such occurences. */ extern int private; static inline int public(void) { return private; } typedef int protected; ================================================ FILE: Units/parser-cxx.r/class-inheritance.cpp.d/args.ctags ================================================ --kinds-c++=c --fields=i --sort=no ================================================ FILE: Units/parser-cxx.r/class-inheritance.cpp.d/expected.tags ================================================ A input.cpp /^class A$/ B input.cpp /^class B$/ C input.cpp /^template class C$/ D input.cpp /^class D : public A$/;" inherits:A E input.cpp /^class E : public A, public B$/;" inherits:A,B F input.cpp /^class F : private A, public B$/;" inherits:A,B G input.cpp /^class G : virtual D$/;" inherits:D H input.cpp /^class H : public A, virtual B$/;" inherits:A,B I input.cpp /^class I : public C$/;" inherits:C J input.cpp /^class J : private A, public C$/;" inherits:A,C ================================================ FILE: Units/parser-cxx.r/class-inheritance.cpp.d/input.cpp ================================================ class A { }; class B { }; template class C { }; class D : public A { }; class E : public A, public B { }; class F : private A, public B { }; class G : virtual D { }; class H : public A, virtual B { }; class I : public C { }; class J : private A, public C { }; ================================================ FILE: Units/parser-cxx.r/class.cpp.d/args.ctags ================================================ --kinds-c++=* --sort=no --fields=+{end} ================================================ FILE: Units/parser-cxx.r/class.cpp.d/expected.tags ================================================ C01 input.cpp /^MACRO03 __attribute__("fancy") __declspec(dllexport) class MY_API C01$/;" c file: end:15 ================================================ FILE: Units/parser-cxx.r/class.cpp.d/input.cpp ================================================ // These should be ignored. MACRO01 MACRO02() class N01; MACRO03 class __attribute__("cool") N02; namespace X; // This should be reported. MACRO03 __attribute__("fancy") __declspec(dllexport) class MY_API C01 { // These should be ignored. friend class N03; MACRO04 friend class N04; friend class X::N05; }; ================================================ FILE: Units/parser-cxx.r/complex-macros.d/README ================================================ input-0.cpp is a crash test. ================================================ FILE: Units/parser-cxx.r/complex-macros.d/args.ctags ================================================ --kinds-c++=* --fields-c++=+{properties} --fields=+S --sort=no -D DECLARE_FUNCTION_1=int p0() -D DECLARE_FUNCTION_1A()=int p0A() -D DECLARE_FUNCTION_2(_ret,_name)=_ret _name(); -D DECLARE_FUNCTION_3(_ret,_name,...)=_ret _name(__VA_ARGS__); -D DEPRECATED(...)=__VA_ARGS__ __attribute__((deprecated)) -D ENUM_GNUX(n,e...)=enum n { e } -D DECLARE_TWO_VERSIONS_OF_FUNCTIONS(_prefix1,_prefix2)=DECLARE_FUNCTION_2(int,_prefix1 ## a) DECLARE_FUNCTION_2(int,_prefix2 ## a) -D STRINGIFY(token)=#token -D IMPLEMENT_FUNCTIONS(_prefix)=void _prefix ## a(){ }; void _prefix ## b(){ }; -D DECLARE_VARS(_prefix)=int _prefix ## a; int _prefix ## b; -D DECLARE_FUNCTION_4(Ret,Class,Method,...)=Ret Class##__##Method(Class *that, ##__VA_ARGS__) -D DECLARE_FUNCTION_4_BEGIN(...)={ -D DECLARE_FUNCTION_4_END(...)=} -D var(X)=X ================================================ FILE: Units/parser-cxx.r/complex-macros.d/expected.tags ================================================ DECLARE_FUNCTION_1 input.cpp /^#define DECLARE_FUNCTION_1 /;" d file: p0 input.cpp /^DECLARE_FUNCTION_1;$/;" p typeref:typename:int file: signature:() DECLARE_FUNCTION_1A input.cpp /^#define DECLARE_FUNCTION_1A(/;" d file: signature:() p0A input.cpp /^unsigned DECLARE_FUNCTION_1A(); \/\/ expand$/;" p typeref:typename:unsigned int file: signature:() _ret input.cpp /^#define DECLARE_FUNCTION_2(_ret,_name) _ret _name();$/;" D macro:DECLARE_FUNCTION_2 _name input.cpp /^#define DECLARE_FUNCTION_2(_ret,_name) _ret _name();$/;" D macro:DECLARE_FUNCTION_2 DECLARE_FUNCTION_2 input.cpp /^#define DECLARE_FUNCTION_2(/;" d file: signature:(_ret,_name) p1 input.cpp /^DECLARE_FUNCTION_2(int,p1);$/;" p typeref:typename:int file: signature:() p2 input.cpp /^DECLARE_FUNCTION_2(std::string,p2);$/;" p typeref:typename:std::string file: signature:() _ret input.cpp /^#define DECLARE_FUNCTION_3(_ret,_name,...) _ret _name(__VA_ARGS__);$/;" D macro:DECLARE_FUNCTION_3 _name input.cpp /^#define DECLARE_FUNCTION_3(_ret,_name,...) _ret _name(__VA_ARGS__);$/;" D macro:DECLARE_FUNCTION_3 DECLARE_FUNCTION_3 input.cpp /^#define DECLARE_FUNCTION_3(/;" d file: signature:(_ret,_name,...) p3 input.cpp /^DECLARE_FUNCTION_3(int,p3,int a,int b);$/;" p typeref:typename:int file: signature:(int a,int b) a input.cpp /^DECLARE_FUNCTION_3(int,p3,int a,int b);$/;" z prototype:p3 typeref:typename:int file: b input.cpp /^DECLARE_FUNCTION_3(int,p3,int a,int b);$/;" z prototype:p3 typeref:typename:int file: DEPRECATED input.cpp /^#define DEPRECATED(/;" d file: signature:(...) p4 input.cpp /^DEPRECATED(int p4());$/;" p typeref:typename:int file: signature:() properties:deprecated n input.cpp /^#define ENUM_GNUX(n,e...) enum n { e }$/;" D macro:ENUM_GNUX e input.cpp /^#define ENUM_GNUX(n,e...) enum n { e }$/;" D macro:ENUM_GNUX ENUM_GNUX input.cpp /^#define ENUM_GNUX(/;" d file: signature:(n,e...) color input.cpp /^ENUM_GNUX(color, red, blue, green);$/;" g file: red input.cpp /^ENUM_GNUX(color, red, blue, green);$/;" e enum:color file: blue input.cpp /^ENUM_GNUX(color, red, blue, green);$/;" e enum:color file: green input.cpp /^ENUM_GNUX(color, red, blue, green);$/;" e enum:color file: _prefix1 input.cpp /^#define DECLARE_TWO_VERSIONS_OF_FUNCTIONS(_prefix1,_prefix2) \\$/;" D macro:DECLARE_TWO_VERSIONS_OF_FUNCTIONS _prefix2 input.cpp /^#define DECLARE_TWO_VERSIONS_OF_FUNCTIONS(_prefix1,_prefix2) \\$/;" D macro:DECLARE_TWO_VERSIONS_OF_FUNCTIONS DECLARE_TWO_VERSIONS_OF_FUNCTIONS input.cpp /^#define DECLARE_TWO_VERSIONS_OF_FUNCTIONS(/;" d file: signature:(_prefix1,_prefix2) p5a input.cpp /^DECLARE_TWO_VERSIONS_OF_FUNCTIONS(p5,p6)$/;" p typeref:typename:int file: signature:() p6a input.cpp /^DECLARE_TWO_VERSIONS_OF_FUNCTIONS(p5,p6)$/;" p typeref:typename:int file: signature:() token input.cpp /^#define STRINGIFY(token) #token$/;" D macro:STRINGIFY STRINGIFY input.cpp /^#define STRINGIFY(/;" d file: signature:(token) test input.cpp /^const char * test = "" STRINGIFY(; int notVisible;);$/;" v typeref:typename:const char * Ret input.cpp /^#define DECLARE_FUNCTION_4(Ret,Class,Method,...) Ret Class##__##Method(Class *that, ##__VA_ARGS_/;" D macro:DECLARE_FUNCTION_4 Class input.cpp /^#define DECLARE_FUNCTION_4(Ret,Class,Method,...) Ret Class##__##Method(Class *that, ##__VA_ARGS_/;" D macro:DECLARE_FUNCTION_4 Method input.cpp /^#define DECLARE_FUNCTION_4(Ret,Class,Method,...) Ret Class##__##Method(Class *that, ##__VA_ARGS_/;" D macro:DECLARE_FUNCTION_4 DECLARE_FUNCTION_4 input.cpp /^#define DECLARE_FUNCTION_4(/;" d file: signature:(Ret,Class,Method,...) DECLARE_FUNCTION_4_BEGIN input.cpp /^#define DECLARE_FUNCTION_4_BEGIN(/;" d file: signature:(...) DECLARE_FUNCTION_4_END input.cpp /^#define DECLARE_FUNCTION_4_END(/;" d file: signature:(...) foo__bar input.cpp /^DECLARE_FUNCTION_4(int,foo,bar,int x)$/;" f typeref:typename:int signature:(foo * that,int x) that input.cpp /^DECLARE_FUNCTION_4(int,foo,bar,int x)$/;" z function:foo__bar typeref:typename:foo * file: x input.cpp /^DECLARE_FUNCTION_4(int,foo,bar,int x)$/;" z function:foo__bar typeref:typename:int file: _prefix input.cpp /^#define IMPLEMENT_FUNCTIONS(_prefix) \\$/;" D macro:IMPLEMENT_FUNCTIONS IMPLEMENT_FUNCTIONS input.cpp /^#define IMPLEMENT_FUNCTIONS(/;" d file: signature:(_prefix) f1a input.cpp /^IMPLEMENT_FUNCTIONS(f1);$/;" f typeref:typename:void signature:() f1b input.cpp /^IMPLEMENT_FUNCTIONS(f1);$/;" f typeref:typename:void signature:() _prefix input.cpp /^#define DECLARE_VARS(_prefix) int _prefix ## a; int _prefix ## b;$/;" D macro:DECLARE_VARS DECLARE_VARS input.cpp /^#define DECLARE_VARS(/;" d file: signature:(_prefix) main input.cpp /^int main(int,char **)$/;" f typeref:typename:int signature:(int,char **) __anonb64b5bec010d input.cpp /^int main(int,char **)$/;" z function:main typeref:typename:int file: __anonb64b5bec020d input.cpp /^int main(int,char **)$/;" z function:main typeref:typename:char ** file: la input.cpp /^ DECLARE_VARS(l);$/;" l function:main typeref:typename:int file: lb input.cpp /^ DECLARE_VARS(l);$/;" l function:main typeref:typename:int file: input0 input-0.cpp /^int input0;$/;" v typeref:typename:int ================================================ FILE: Units/parser-cxx.r/complex-macros.d/input-0.cpp ================================================ int input0; int var(input1 ================================================ FILE: Units/parser-cxx.r/complex-macros.d/input.cpp ================================================ #include // Macro without parameters #define DECLARE_FUNCTION_1 int p0() DECLARE_FUNCTION_1; // Macro without parameters #define DECLARE_FUNCTION_1A() int p0A() DECLARE_FUNCTION_1A; // don't expand unsigned DECLARE_FUNCTION_1A(); // expand // Simple macro with parameters #define DECLARE_FUNCTION_2(_ret,_name) _ret _name(); DECLARE_FUNCTION_2(int,p1); DECLARE_FUNCTION_2(std::string,p2); // Var args #define DECLARE_FUNCTION_3(_ret,_name,...) _ret _name(__VA_ARGS__); DECLARE_FUNCTION_3(int,p3,int a,int b); #define DEPRECATED(...) __VA_ARGS__ __attribute__((deprecated)) DEPRECATED(int p4()); #define ENUM_GNUX(n,e...) enum n { e } ENUM_GNUX(color, red, blue, green); // Recursive macro expansion #define DECLARE_TWO_VERSIONS_OF_FUNCTIONS(_prefix1,_prefix2) \ DECLARE_FUNCTION_2(int,_prefix1 ## a) \ DECLARE_FUNCTION_2(int,_prefix2 ## a) DECLARE_TWO_VERSIONS_OF_FUNCTIONS(p5,p6) // Stringification #define STRINGIFY(token) #token const char * test = "" STRINGIFY(; int notVisible;); // Unbalanced brackets (this comes from a nasty example in a github issue) #define DECLARE_FUNCTION_4(Ret,Class,Method,...) Ret Class##__##Method(Class *that, ##__VA_ARGS__) #define DECLARE_FUNCTION_4_BEGIN(...) { /*not really this, but this is what ctags should see*/ #define DECLARE_FUNCTION_4_END(...) } /*not really this, but this is what ctags should see*/ // Unbalanced brackets DECLARE_FUNCTION_4(int,foo,bar,int x) DECLARE_FUNCTION_4_BEGIN({) DECLARE_FUNCTION_4_END(},{ /*dtors*/ }) // Token pasting #define IMPLEMENT_FUNCTIONS(_prefix) \ void _prefix ## a(){ }; \ void _prefix ## b(){ }; IMPLEMENT_FUNCTIONS(f1); #define DECLARE_VARS(_prefix) int _prefix ## a; int _prefix ## b; int main(int,char **) { DECLARE_VARS(l); return 0; } ================================================ FILE: Units/parser-cxx.r/cpp-type-alias-with-using-keyword.d/expected.tags ================================================ Integer input.cpp /^using Integer = int;$/;" t typeref:typename:int file: Vector input.cpp /^using Vector = std::vector;$/;" t typeref:typename:std::vector file: ================================================ FILE: Units/parser-cxx.r/cpp-type-alias-with-using-keyword.d/input.cpp ================================================ /* C++11 introduced the "using name = type;" construct as an alternative to typedefs. Process them as typedefs. Contributed by Maxime Coste */ using Integer = int; template using Vector = std::vector; ================================================ FILE: Units/parser-cxx.r/cpp_destructor.cpp.d/expected.tags ================================================ ~A input.cpp /^A::~A() { }$/;" f class:A ~B input.cpp /^B:: ~B () { }$/;" f class:B ~C input.cpp /^C:: ~ C () { }$/;" f class:C ~D input.cpp /^D:: ~D() { }$/;" f class:D ~E input.cpp /^E:: ~ E() { }$/;" f class:E ~F input.cpp /^F::~F(){ }$/;" f class:F ~G input.cpp /^G:: ~G (){ }$/;" f class:G ~H input.cpp /^H:: ~ H (){ }$/;" f class:H ~I input.cpp /^I:: ~I(){ }$/;" f class:I ~J input.cpp /^J:: ~ J(){ }$/;" f class:J ================================================ FILE: Units/parser-cxx.r/cpp_destructor.cpp.d/input.cpp ================================================ A::~A() { } B:: ~B () { } // bug 1585745 C:: ~ C () { } D:: ~D() { } E:: ~ E() { } F::~F(){ } G:: ~G (){ } H:: ~ H (){ } I:: ~I(){ } J:: ~ J(){ } ================================================ FILE: Units/parser-cxx.r/cxx-keyword-alignas.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-cxx.r/cxx-keyword-alignas.d/expected.tags ================================================ buf0 input.cxx /^alignas(64) int buf0[8192];$/;" v typeref:typename:int[8192] buf1 input.cxx /^alignas(void *) int buf1[8192];$/;" v typeref:typename:int[8192] S input.cxx /^struct alignas(32) S {$/;" s file: i input.cxx /^ alignas(4) int i;$/;" m struct:S typeref:typename:int file: ================================================ FILE: Units/parser-cxx.r/cxx-keyword-alignas.d/input.cxx ================================================ alignas(64) int buf0[8192]; alignas(void *) int buf1[8192]; struct alignas(32) S { alignas(4) int i; }; ================================================ FILE: Units/parser-cxx.r/cxx-keywords-as-c-identifiers.b/README ================================================ gen-input.sh generates a header file in which C++ keywords are used as C identifiers. gen-expected-tags.sh generates an incomplete expected.tags. Copyed from #930: I found this case in linux kernel. Consider a C language header having .h suffix. In C language private is not a keyword. New Cxx parser doesn't record a variable named private because the parser recognized it as C++ keyword.`` Old Cxx parser [yamato@x201]/tmp% cat foo.h extern int private; static inline int f(void) { return private; } typedef int int32; [yamato@x201]/tmp% u-ctags -o - /tmp/foo.h # nothing is captured. [yamato@x201]/tmp% u-ctags --languages=+OldC++ --language-force=OldC++ -o - /tmp/foo.h f /tmp/foo.h /^static inline int f(void)$/;" f int32 /tmp/foo.h /^typedef int int32;$/;" t ================================================ FILE: Units/parser-cxx.r/cxx-keywords-as-c-identifiers.b/args.ctags ================================================ --sort=no --kinds-C++=+px ================================================ FILE: Units/parser-cxx.r/cxx-keywords-as-c-identifiers.b/expected.tags ================================================ NotKeyword input.h /^struct NotKeyword {int x;} v0;$/;" s x input.h /^struct NotKeyword {int x;} v0;$/;" m struct:NotKeyword typeref:typename:int v0 input.h /^struct NotKeyword {int x;} v0;$/;" v typeref:struct:NotKeyword alignas input.h /^struct alignas {int x;} v1;$/;" s x input.h /^struct alignas {int x;} v1;$/;" m struct:alignas typeref:typename:int v1 input.h /^struct alignas {int x;} v1;$/;" v typeref:struct:alignas alignof input.h /^struct alignof {int x;} v2;$/;" s x input.h /^struct alignof {int x;} v2;$/;" m struct:alignof typeref:typename:int v2 input.h /^struct alignof {int x;} v2;$/;" v typeref:struct:alignof __anon9f26d24b0108 input.h /^struct bool {int x;} v3;$/;" s x input.h /^struct bool {int x;} v3;$/;" m struct:__anon9f26d24b0108 typeref:typename:int v3 input.h /^struct bool {int x;} v3;$/;" v typeref:struct:__anon9f26d24b0108 catch input.h /^struct catch {int x;} v4;$/;" s x input.h /^struct catch {int x;} v4;$/;" m struct:catch typeref:typename:int v4 input.h /^struct catch {int x;} v4;$/;" v typeref:struct:catch char16_t input.h /^struct char16_t {int x;} v5;$/;" s x input.h /^struct char16_t {int x;} v5;$/;" m struct:char16_t typeref:typename:int v5 input.h /^struct char16_t {int x;} v5;$/;" v typeref:struct:char16_t char32_t input.h /^struct char32_t {int x;} v6;$/;" s x input.h /^struct char32_t {int x;} v6;$/;" m struct:char32_t typeref:typename:int v6 input.h /^struct char32_t {int x;} v6;$/;" v typeref:struct:char32_t class input.h /^struct class {int x;} v7;$/;" s x input.h /^struct class {int x;} v7;$/;" m struct:class typeref:typename:int v7 input.h /^struct class {int x;} v7;$/;" v typeref:struct:class concept input.h /^struct concept {int x;} v8;$/;" s x input.h /^struct concept {int x;} v8;$/;" m struct:concept typeref:typename:int v8 input.h /^struct concept {int x;} v8;$/;" v typeref:struct:concept constexpr input.h /^struct constexpr {int x;} v9;$/;" s x input.h /^struct constexpr {int x;} v9;$/;" m struct:constexpr typeref:typename:int v9 input.h /^struct constexpr {int x;} v9;$/;" v typeref:struct:constexpr const_cast input.h /^struct const_cast {int x;} v10;$/;" s x input.h /^struct const_cast {int x;} v10;$/;" m struct:const_cast typeref:typename:int v10 input.h /^struct const_cast {int x;} v10;$/;" v typeref:struct:const_cast decltype input.h /^struct decltype {int x;} v11;$/;" s x input.h /^struct decltype {int x;} v11;$/;" m struct:decltype typeref:typename:int v11 input.h /^struct decltype {int x;} v11;$/;" v typeref:struct:decltype delete input.h /^struct delete {int x;} v12;$/;" s x input.h /^struct delete {int x;} v12;$/;" m struct:delete typeref:typename:int v12 input.h /^struct delete {int x;} v12;$/;" v typeref:struct:delete dynamic_cast input.h /^struct dynamic_cast {int x;} v13;$/;" s x input.h /^struct dynamic_cast {int x;} v13;$/;" m struct:dynamic_cast typeref:typename:int v13 input.h /^struct dynamic_cast {int x;} v13;$/;" v typeref:struct:dynamic_cast explicit input.h /^struct explicit {int x;} v14;$/;" s x input.h /^struct explicit {int x;} v14;$/;" m struct:explicit typeref:typename:int v14 input.h /^struct explicit {int x;} v14;$/;" v typeref:struct:explicit export input.h /^struct export {int x;} v15;$/;" s x input.h /^struct export {int x;} v15;$/;" m struct:export typeref:typename:int v15 input.h /^struct export {int x;} v15;$/;" v typeref:struct:export final input.h /^struct final {int x;} v16;$/;" s x input.h /^struct final {int x;} v16;$/;" m struct:final typeref:typename:int v16 input.h /^struct final {int x;} v16;$/;" v typeref:struct:final friend input.h /^struct friend {int x;} v17;$/;" s x input.h /^struct friend {int x;} v17;$/;" m struct:friend typeref:typename:int v17 input.h /^struct friend {int x;} v17;$/;" v typeref:struct:friend mutable input.h /^struct mutable {int x;} v18;$/;" s x input.h /^struct mutable {int x;} v18;$/;" m struct:mutable typeref:typename:int v18 input.h /^struct mutable {int x;} v18;$/;" v typeref:struct:mutable namespace input.h /^struct namespace {int x;} v19;$/;" s x input.h /^struct namespace {int x;} v19;$/;" m struct:namespace typeref:typename:int v19 input.h /^struct namespace {int x;} v19;$/;" v typeref:struct:namespace new input.h /^struct new {int x;} v20;$/;" s x input.h /^struct new {int x;} v20;$/;" m struct:new typeref:typename:int v20 input.h /^struct new {int x;} v20;$/;" v typeref:struct:new noexcept input.h /^struct noexcept {int x;} v21;$/;" s x input.h /^struct noexcept {int x;} v21;$/;" m struct:noexcept typeref:typename:int v21 input.h /^struct noexcept {int x;} v21;$/;" v typeref:struct:noexcept nullptr input.h /^struct nullptr {int x;} v22;$/;" s x input.h /^struct nullptr {int x;} v22;$/;" m struct:nullptr typeref:typename:int v22 input.h /^struct nullptr {int x;} v22;$/;" v typeref:struct:nullptr operator input.h /^struct operator {int x;} v23;$/;" s x input.h /^struct operator {int x;} v23;$/;" m struct:operator typeref:typename:int v23 input.h /^struct operator {int x;} v23;$/;" v typeref:struct:operator private input.h /^struct private {int x;} v24;$/;" s x input.h /^struct private {int x;} v24;$/;" m struct:private typeref:typename:int v24 input.h /^struct private {int x;} v24;$/;" v typeref:struct:private protected input.h /^struct protected {int x;} v25;$/;" s x input.h /^struct protected {int x;} v25;$/;" m struct:protected typeref:typename:int v25 input.h /^struct protected {int x;} v25;$/;" v typeref:struct:protected public input.h /^struct public {int x;} v26;$/;" s x input.h /^struct public {int x;} v26;$/;" m struct:public typeref:typename:int v26 input.h /^struct public {int x;} v26;$/;" v typeref:struct:public reinterpret_cast input.h /^struct reinterpret_cast {int x;} v27;$/;" s x input.h /^struct reinterpret_cast {int x;} v27;$/;" m struct:reinterpret_cast typeref:typename:int v27 input.h /^struct reinterpret_cast {int x;} v27;$/;" v typeref:struct:reinterpret_cast requires input.h /^struct requires {int x;} v28;$/;" s x input.h /^struct requires {int x;} v28;$/;" m struct:requires typeref:typename:int v28 input.h /^struct requires {int x;} v28;$/;" v typeref:struct:requires static_assert input.h /^struct static_assert {int x;} v29;$/;" s x input.h /^struct static_assert {int x;} v29;$/;" m struct:static_assert typeref:typename:int v29 input.h /^struct static_assert {int x;} v29;$/;" v typeref:struct:static_assert static_cast input.h /^struct static_cast {int x;} v30;$/;" s x input.h /^struct static_cast {int x;} v30;$/;" m struct:static_cast typeref:typename:int v30 input.h /^struct static_cast {int x;} v30;$/;" v typeref:struct:static_cast template input.h /^struct template {int x;} v31;$/;" s x input.h /^struct template {int x;} v31;$/;" m struct:template typeref:typename:int v31 input.h /^struct template {int x;} v31;$/;" v typeref:struct:template this input.h /^struct this {int x;} v32;$/;" s x input.h /^struct this {int x;} v32;$/;" m struct:this typeref:typename:int v32 input.h /^struct this {int x;} v32;$/;" v typeref:struct:this thread_local input.h /^struct thread_local {int x;} v33;$/;" s x input.h /^struct thread_local {int x;} v33;$/;" m struct:thread_local typeref:typename:int v33 input.h /^struct thread_local {int x;} v33;$/;" v typeref:struct:thread_local throw input.h /^struct throw {int x;} v34;$/;" s x input.h /^struct throw {int x;} v34;$/;" m struct:throw typeref:typename:int v34 input.h /^struct throw {int x;} v34;$/;" v typeref:struct:throw try input.h /^struct try {int x;} v35;$/;" s x input.h /^struct try {int x;} v35;$/;" m struct:try typeref:typename:int v35 input.h /^struct try {int x;} v35;$/;" v typeref:struct:try typeid input.h /^struct typeid {int x;} v36;$/;" s x input.h /^struct typeid {int x;} v36;$/;" m struct:typeid typeref:typename:int v36 input.h /^struct typeid {int x;} v36;$/;" v typeref:struct:typeid typename input.h /^struct typename {int x;} v37;$/;" s x input.h /^struct typename {int x;} v37;$/;" m struct:typename typeref:typename:int v37 input.h /^struct typename {int x;} v37;$/;" v typeref:struct:typename using input.h /^struct using {int x;} v38;$/;" s x input.h /^struct using {int x;} v38;$/;" m struct:using typeref:typename:int v38 input.h /^struct using {int x;} v38;$/;" v typeref:struct:using virtual input.h /^struct virtual {int x;} v39;$/;" s x input.h /^struct virtual {int x;} v39;$/;" m struct:virtual typeref:typename:int v39 input.h /^struct virtual {int x;} v39;$/;" v typeref:struct:virtual s0 input.h /^struct s0 {int NotKeyword;} ;$/;" s NotKeyword input.h /^struct s0 {int NotKeyword;} ;$/;" m struct:s0 typeref:typename:int s1 input.h /^struct s1 {int alignas;} ;$/;" s alignas input.h /^struct s1 {int alignas;} ;$/;" m struct:s1 typeref:typename:int s2 input.h /^struct s2 {int alignof;} ;$/;" s alignof input.h /^struct s2 {int alignof;} ;$/;" m struct:s2 typeref:typename:int s3 input.h /^struct s3 {int bool;} ;$/;" s s4 input.h /^struct s4 {int catch;} ;$/;" s catch input.h /^struct s4 {int catch;} ;$/;" m struct:s4 typeref:typename:int s5 input.h /^struct s5 {int char16_t;} ;$/;" s char16_t input.h /^struct s5 {int char16_t;} ;$/;" m struct:s5 typeref:typename:int s6 input.h /^struct s6 {int char32_t;} ;$/;" s char32_t input.h /^struct s6 {int char32_t;} ;$/;" m struct:s6 typeref:typename:int s7 input.h /^struct s7 {int class;} ;$/;" s class input.h /^struct s7 {int class;} ;$/;" m struct:s7 typeref:typename:int s8 input.h /^struct s8 {int concept;} ;$/;" s concept input.h /^struct s8 {int concept;} ;$/;" m struct:s8 typeref:typename:int s9 input.h /^struct s9 {int constexpr;} ;$/;" s constexpr input.h /^struct s9 {int constexpr;} ;$/;" m struct:s9 typeref:typename:int s10 input.h /^struct s10 {int const_cast;} ;$/;" s const_cast input.h /^struct s10 {int const_cast;} ;$/;" m struct:s10 typeref:typename:int s11 input.h /^struct s11 {int decltype;} ;$/;" s decltype input.h /^struct s11 {int decltype;} ;$/;" m struct:s11 typeref:typename:int s12 input.h /^struct s12 {int delete;} ;$/;" s delete input.h /^struct s12 {int delete;} ;$/;" m struct:s12 typeref:typename:int s13 input.h /^struct s13 {int dynamic_cast;} ;$/;" s dynamic_cast input.h /^struct s13 {int dynamic_cast;} ;$/;" m struct:s13 typeref:typename:int s14 input.h /^struct s14 {int explicit;} ;$/;" s explicit input.h /^struct s14 {int explicit;} ;$/;" m struct:s14 typeref:typename:int s15 input.h /^struct s15 {int export;} ;$/;" s export input.h /^struct s15 {int export;} ;$/;" m struct:s15 typeref:typename:int s16 input.h /^struct s16 {int final;} ;$/;" s final input.h /^struct s16 {int final;} ;$/;" m struct:s16 typeref:typename:int s17 input.h /^struct s17 {int friend;} ;$/;" s friend input.h /^struct s17 {int friend;} ;$/;" m struct:s17 typeref:typename:int s18 input.h /^struct s18 {int mutable;} ;$/;" s mutable input.h /^struct s18 {int mutable;} ;$/;" m struct:s18 typeref:typename:int s19 input.h /^struct s19 {int namespace;} ;$/;" s namespace input.h /^struct s19 {int namespace;} ;$/;" m struct:s19 typeref:typename:int s20 input.h /^struct s20 {int new;} ;$/;" s new input.h /^struct s20 {int new;} ;$/;" m struct:s20 typeref:typename:int s21 input.h /^struct s21 {int noexcept;} ;$/;" s noexcept input.h /^struct s21 {int noexcept;} ;$/;" m struct:s21 typeref:typename:int s22 input.h /^struct s22 {int nullptr;} ;$/;" s nullptr input.h /^struct s22 {int nullptr;} ;$/;" m struct:s22 typeref:typename:int s23 input.h /^struct s23 {int operator;} ;$/;" s operator input.h /^struct s23 {int operator;} ;$/;" m struct:s23 typeref:typename:int s24 input.h /^struct s24 {int private;} ;$/;" s private input.h /^struct s24 {int private;} ;$/;" m struct:s24 typeref:typename:int s25 input.h /^struct s25 {int protected;} ;$/;" s protected input.h /^struct s25 {int protected;} ;$/;" m struct:s25 typeref:typename:int s26 input.h /^struct s26 {int public;} ;$/;" s public input.h /^struct s26 {int public;} ;$/;" m struct:s26 typeref:typename:int s27 input.h /^struct s27 {int reinterpret_cast;} ;$/;" s reinterpret_cast input.h /^struct s27 {int reinterpret_cast;} ;$/;" m struct:s27 typeref:typename:int s28 input.h /^struct s28 {int requires;} ;$/;" s requires input.h /^struct s28 {int requires;} ;$/;" m struct:s28 typeref:typename:int s29 input.h /^struct s29 {int static_assert;} ;$/;" s static_assert input.h /^struct s29 {int static_assert;} ;$/;" m struct:s29 typeref:typename:int s30 input.h /^struct s30 {int static_cast;} ;$/;" s static_cast input.h /^struct s30 {int static_cast;} ;$/;" m struct:s30 typeref:typename:int s31 input.h /^struct s31 {int template;} ;$/;" s template input.h /^struct s31 {int template;} ;$/;" m struct:s31 typeref:typename:int s32 input.h /^struct s32 {int this;} ;$/;" s this input.h /^struct s32 {int this;} ;$/;" m struct:s32 typeref:typename:int s33 input.h /^struct s33 {int thread_local;} ;$/;" s thread_local input.h /^struct s33 {int thread_local;} ;$/;" m struct:s33 typeref:typename:int s34 input.h /^struct s34 {int throw;} ;$/;" s throw input.h /^struct s34 {int throw;} ;$/;" m struct:s34 typeref:typename:int s35 input.h /^struct s35 {int try;} ;$/;" s try input.h /^struct s35 {int try;} ;$/;" m struct:s35 typeref:typename:int s36 input.h /^struct s36 {int typeid;} ;$/;" s typeid input.h /^struct s36 {int typeid;} ;$/;" m struct:s36 typeref:typename:int s37 input.h /^struct s37 {int typename;} ;$/;" s typename input.h /^struct s37 {int typename;} ;$/;" m struct:s37 typeref:typename:int s38 input.h /^struct s38 {int using;} ;$/;" s using input.h /^struct s38 {int using;} ;$/;" m struct:s38 typeref:typename:int s39 input.h /^struct s39 {int virtual;} ;$/;" s virtual input.h /^struct s39 {int virtual;} ;$/;" m struct:s39 typeref:typename:int NotKeyword input.h /^typedef int NotKeyword; \/* 0 *\/$/;" t typeref:typename:int alignas input.h /^typedef int alignas; \/* 1 *\/$/;" t typeref:typename:int alignof input.h /^typedef int alignof; \/* 2 *\/$/;" t typeref:typename:int catch input.h /^typedef int catch; \/* 4 *\/$/;" t typeref:typename:int char16_t input.h /^typedef int char16_t; \/* 5 *\/$/;" t typeref:typename:int char32_t input.h /^typedef int char32_t; \/* 6 *\/$/;" t typeref:typename:int class input.h /^typedef int class; \/* 7 *\/$/;" t typeref:typename:int concept input.h /^typedef int concept; \/* 8 *\/$/;" t typeref:typename:int constexpr input.h /^typedef int constexpr; \/* 9 *\/$/;" t typeref:typename:int const_cast input.h /^typedef int const_cast; \/* 10 *\/$/;" t typeref:typename:int decltype input.h /^typedef int decltype; \/* 11 *\/$/;" t typeref:typename:int delete input.h /^typedef int delete; \/* 12 *\/$/;" t typeref:typename:int dynamic_cast input.h /^typedef int dynamic_cast; \/* 13 *\/$/;" t typeref:typename:int explicit input.h /^typedef int explicit; \/* 14 *\/$/;" t typeref:typename:int export input.h /^typedef int export; \/* 15 *\/$/;" t typeref:typename:int final input.h /^typedef int final; \/* 16 *\/$/;" t typeref:typename:int friend input.h /^typedef int friend; \/* 17 *\/$/;" t typeref:typename:int mutable input.h /^typedef int mutable; \/* 18 *\/$/;" t typeref:typename:int namespace input.h /^typedef int namespace; \/* 19 *\/$/;" t typeref:typename:int new input.h /^typedef int new; \/* 20 *\/$/;" t typeref:typename:int noexcept input.h /^typedef int noexcept; \/* 21 *\/$/;" t typeref:typename:int nullptr input.h /^typedef int nullptr; \/* 22 *\/$/;" t typeref:typename:int operator input.h /^typedef int operator; \/* 23 *\/$/;" t typeref:typename:int private input.h /^typedef int private; \/* 24 *\/$/;" t typeref:typename:int protected input.h /^typedef int protected; \/* 25 *\/$/;" t typeref:typename:int public input.h /^typedef int public; \/* 26 *\/$/;" t typeref:typename:int reinterpret_cast input.h /^typedef int reinterpret_cast; \/* 27 *\/$/;" t typeref:typename:int requires input.h /^typedef int requires; \/* 28 *\/$/;" t typeref:typename:int static_assert input.h /^typedef int static_assert; \/* 29 *\/$/;" t typeref:typename:int static_cast input.h /^typedef int static_cast; \/* 30 *\/$/;" t typeref:typename:int template input.h /^typedef int template; \/* 31 *\/$/;" t typeref:typename:int this input.h /^typedef int this; \/* 32 *\/$/;" t typeref:typename:int thread_local input.h /^typedef int thread_local; \/* 33 *\/$/;" t typeref:typename:int throw input.h /^typedef int throw; \/* 34 *\/$/;" t typeref:typename:int try input.h /^typedef int try; \/* 35 *\/$/;" t typeref:typename:int typeid input.h /^typedef int typeid; \/* 36 *\/$/;" t typeref:typename:int typename input.h /^typedef int typename; \/* 37 *\/$/;" t typeref:typename:int using input.h /^typedef int using; \/* 38 *\/$/;" t typeref:typename:int virtual input.h /^typedef int virtual; \/* 39 *\/$/;" t typeref:typename:int v0 input.h /^int v0, NotKeyword;$/;" v typeref:typename:int NotKeyword input.h /^int v0, NotKeyword;$/;" v typeref:typename:int v1 input.h /^int v1, alignas;$/;" v typeref:typename:int alignas input.h /^int v1, alignas;$/;" v typeref:typename:int v2 input.h /^int v2, alignof;$/;" v typeref:typename:int alignof input.h /^int v2, alignof;$/;" v typeref:typename:int v3 input.h /^int v3, bool;$/;" v typeref:typename:int v4 input.h /^int v4, catch;$/;" v typeref:typename:int catch input.h /^int v4, catch;$/;" v typeref:typename:int v5 input.h /^int v5, char16_t;$/;" v typeref:typename:int char16_t input.h /^int v5, char16_t;$/;" v typeref:typename:int v6 input.h /^int v6, char32_t;$/;" v typeref:typename:int char32_t input.h /^int v6, char32_t;$/;" v typeref:typename:int v7 input.h /^int v7, class;$/;" v typeref:typename:int class input.h /^int v7, class;$/;" v typeref:typename:int v8 input.h /^int v8, concept;$/;" v typeref:typename:int concept input.h /^int v8, concept;$/;" v typeref:typename:int v9 input.h /^int v9, constexpr;$/;" v typeref:typename:int constexpr input.h /^int v9, constexpr;$/;" v typeref:typename:int v10 input.h /^int v10, const_cast;$/;" v typeref:typename:int const_cast input.h /^int v10, const_cast;$/;" v typeref:typename:int v11 input.h /^int v11, decltype;$/;" v typeref:typename:int decltype input.h /^int v11, decltype;$/;" v typeref:typename:int v12 input.h /^int v12, delete;$/;" v typeref:typename:int delete input.h /^int v12, delete;$/;" v typeref:typename:int v13 input.h /^int v13, dynamic_cast;$/;" v typeref:typename:int dynamic_cast input.h /^int v13, dynamic_cast;$/;" v typeref:typename:int v14 input.h /^int v14, explicit;$/;" v typeref:typename:int explicit input.h /^int v14, explicit;$/;" v typeref:typename:int v15 input.h /^int v15, export;$/;" v typeref:typename:int export input.h /^int v15, export;$/;" v typeref:typename:int v16 input.h /^int v16, final;$/;" v typeref:typename:int final input.h /^int v16, final;$/;" v typeref:typename:int v17 input.h /^int v17, friend;$/;" v typeref:typename:int friend input.h /^int v17, friend;$/;" v typeref:typename:int v18 input.h /^int v18, mutable;$/;" v typeref:typename:int mutable input.h /^int v18, mutable;$/;" v typeref:typename:int v19 input.h /^int v19, namespace;$/;" v typeref:typename:int namespace input.h /^int v19, namespace;$/;" v typeref:typename:int v20 input.h /^int v20, new;$/;" v typeref:typename:int new input.h /^int v20, new;$/;" v typeref:typename:int v21 input.h /^int v21, noexcept;$/;" v typeref:typename:int noexcept input.h /^int v21, noexcept;$/;" v typeref:typename:int v22 input.h /^int v22, nullptr;$/;" v typeref:typename:int nullptr input.h /^int v22, nullptr;$/;" v typeref:typename:int v23 input.h /^int v23, operator;$/;" v typeref:typename:int operator input.h /^int v23, operator;$/;" v typeref:typename:int v24 input.h /^int v24, private;$/;" v typeref:typename:int private input.h /^int v24, private;$/;" v typeref:typename:int v25 input.h /^int v25, protected;$/;" v typeref:typename:int protected input.h /^int v25, protected;$/;" v typeref:typename:int v26 input.h /^int v26, public;$/;" v typeref:typename:int public input.h /^int v26, public;$/;" v typeref:typename:int v27 input.h /^int v27, reinterpret_cast;$/;" v typeref:typename:int reinterpret_cast input.h /^int v27, reinterpret_cast;$/;" v typeref:typename:int v28 input.h /^int v28, requires;$/;" v typeref:typename:int requires input.h /^int v28, requires;$/;" v typeref:typename:int v29 input.h /^int v29, static_assert;$/;" v typeref:typename:int static_assert input.h /^int v29, static_assert;$/;" v typeref:typename:int v30 input.h /^int v30, static_cast;$/;" v typeref:typename:int static_cast input.h /^int v30, static_cast;$/;" v typeref:typename:int v31 input.h /^int v31, template;$/;" v typeref:typename:int template input.h /^int v31, template;$/;" v typeref:typename:int v32 input.h /^int v32, this;$/;" v typeref:typename:int this input.h /^int v32, this;$/;" v typeref:typename:int v33 input.h /^int v33, thread_local;$/;" v typeref:typename:int thread_local input.h /^int v33, thread_local;$/;" v typeref:typename:int v34 input.h /^int v34, throw;$/;" v typeref:typename:int throw input.h /^int v34, throw;$/;" v typeref:typename:int v35 input.h /^int v35, try;$/;" v typeref:typename:int try input.h /^int v35, try;$/;" v typeref:typename:int v36 input.h /^int v36, typeid;$/;" v typeref:typename:int typeid input.h /^int v36, typeid;$/;" v typeref:typename:int v37 input.h /^int v37, typename;$/;" v typeref:typename:int typename input.h /^int v37, typename;$/;" v typeref:typename:int v38 input.h /^int v38, using;$/;" v typeref:typename:int using input.h /^int v38, using;$/;" v typeref:typename:int v39 input.h /^int v39, virtual;$/;" v typeref:typename:int virtual input.h /^int v39, virtual;$/;" v typeref:typename:int NotKeyword input.h /^int NotKeyword (int a0);$/;" p typeref:typename:int alignas input.h /^int alignas (int a1);$/;" p typeref:typename:int alignof input.h /^int alignof (int a2);$/;" p typeref:typename:int catch input.h /^int catch (int a4);$/;" p typeref:typename:int char16_t input.h /^int char16_t (int a5);$/;" p typeref:typename:int char32_t input.h /^int char32_t (int a6);$/;" p typeref:typename:int class input.h /^int class (int a7);$/;" p typeref:typename:int concept input.h /^int concept (int a8);$/;" p typeref:typename:int constexpr input.h /^int constexpr (int a9);$/;" p typeref:typename:int const_cast input.h /^int const_cast (int a10);$/;" p typeref:typename:int decltype input.h /^int decltype (int a11);$/;" p typeref:typename:int delete input.h /^int delete (int a12);$/;" p typeref:typename:int dynamic_cast input.h /^int dynamic_cast (int a13);$/;" p typeref:typename:int explicit input.h /^int explicit (int a14);$/;" p typeref:typename:int export input.h /^int export (int a15);$/;" p typeref:typename:int final input.h /^int final (int a16);$/;" p typeref:typename:int friend input.h /^int friend (int a17);$/;" p typeref:typename:int mutable input.h /^int mutable (int a18);$/;" p typeref:typename:int namespace input.h /^int namespace (int a19);$/;" p typeref:typename:int new input.h /^int new (int a20);$/;" p typeref:typename:int noexcept input.h /^int noexcept (int a21);$/;" p typeref:typename:int nullptr input.h /^int nullptr (int a22);$/;" p typeref:typename:int operator input.h /^int operator (int a23);$/;" p typeref:typename:int private input.h /^int private (int a24);$/;" p typeref:typename:int protected input.h /^int protected (int a25);$/;" p typeref:typename:int public input.h /^int public (int a26);$/;" p typeref:typename:int reinterpret_cast input.h /^int reinterpret_cast (int a27);$/;" p typeref:typename:int requires input.h /^int requires (int a28);$/;" p typeref:typename:int static_assert input.h /^int static_assert (int a29);$/;" p typeref:typename:int static_cast input.h /^int static_cast (int a30);$/;" p typeref:typename:int template input.h /^int template (int a31);$/;" p typeref:typename:int this input.h /^int this (int a32);$/;" p typeref:typename:int thread_local input.h /^int thread_local (int a33);$/;" p typeref:typename:int throw input.h /^int throw (int a34);$/;" p typeref:typename:int try input.h /^int try (int a35);$/;" p typeref:typename:int typeid input.h /^int typeid (int a36);$/;" p typeref:typename:int typename input.h /^int typename (int a37);$/;" p typeref:typename:int using input.h /^int using (int a38);$/;" p typeref:typename:int virtual input.h /^int virtual (int a39);$/;" p typeref:typename:int ================================================ FILE: Units/parser-cxx.r/cxx-keywords-as-c-identifiers.b/gen-expected-tags.sh ================================================ #!/bin/sh # Copyright: 2016 Masatake YAMATO # License: GPL-2 . ./keywords.sh gen_struct_tags () { i=0 for k in $keywords; do cat< class c {};$/;" c file: bVar input.cpp /^c< 8 > bVar;$/;" v typeref:typename:c<8> aVar input.cpp /^c< 1<<8 > aVar;$/;" v typeref:typename:c<1<<8> f12 input.cpp /^template f12( c< 1< & aVar) { };$/;" f signature:(c<1< & aVar) ================================================ FILE: Units/parser-cxx.r/cxx-shift-operators-in-template-parameters.d/input.cpp ================================================ template class c {}; c< 8 > bVar; c< 1<<8 > aVar; template f12( c< 1< & aVar) { }; ================================================ FILE: Units/parser-cxx.r/cxx11-attributes.cpp.d/args.ctags ================================================ --kinds-c++=* --fields-C++=+{properties} --fields=+tS --sort=no ================================================ FILE: Units/parser-cxx.r/cxx11-attributes.cpp.d/expected.tags ================================================ f input.cpp /^inline int f(); \/\/ declare f with four attributes$/;" p typeref:typename:int file: signature:() properties:inline g input.cpp /^int g(); \/\/ same as above, but uses a single attr specifier that contains four attributes$/;" p typeref:typename:int file: signature:() properties:inline h input.cpp /^int h[[gnu::always_inline]](); \/\/ an attribute may appear in multiple specifiers$/;" p typeref:typename:int file: signature:() properties:inline i input.cpp /^int i() { return 0; }$/;" f typeref:typename:int signature:() j input.cpp /^[ [ deprecated ] ] int j(int k) {$/;" f typeref:typename:int signature:(int k) properties:deprecated k input.cpp /^[ [ deprecated ] ] int j(int k) {$/;" z function:j typeref:typename:int file: v1 input.cpp /^ int v1;$/;" l function:j typeref:typename:int file: foo input.cpp /^void foo();$/;" p typeref:typename:void file: signature:() main input.cpp /^int main([[maybe_unused]]int argc, [[maybe_unused]]char *argv[]) {$/;" f typeref:typename:int signature:(int argc,char * argv[]) argc input.cpp /^int main([[maybe_unused]]int argc, [[maybe_unused]]char *argv[]) {$/;" z function:main typeref:typename:int file: argv input.cpp /^int main([[maybe_unused]]int argc, [[maybe_unused]]char *argv[]) {$/;" z function:main typeref:typename:char * [] file: alpha input.cpp /^ int alpha;$/;" l function:main typeref:typename:int file: bravo input.cpp /^ int bravo;$/;" l function:main typeref:typename:int file: charlie input.cpp /^ int charlie;$/;" l function:main typeref:typename:int file: ================================================ FILE: Units/parser-cxx.r/cxx11-attributes.cpp.d/input.cpp ================================================ // Taken from https://en.cppreference.com/w/cpp/language/attributes [[gnu::always_inline]] [[gnu::hot]] [[gnu::const]] [[nodiscard]] inline int f(); // declare f with four attributes [[gnu::always_inline, gnu::const, gnu::hot, nodiscard]] int g(); // same as above, but uses a single attr specifier that contains four attributes // C++17: [[using gnu : const, always_inline, hot]] [[nodiscard]] int h[[gnu::always_inline]](); // an attribute may appear in multiple specifiers int i() { return 0; } [ [ deprecated ] ] int j(int k) { switch(k) { case 1: [[fallthrough]]; case 2: [[likely]] return 3; } int v1; return -1; } /* Taken from issue #2364 opened by andrejlevkovitch. */ void foo(); int main([[maybe_unused]]int argc, [[maybe_unused]]char *argv[]) { int alpha; int bravo; int charlie; return 0; } ================================================ FILE: Units/parser-cxx.r/cxx11-broken-nested-attributes.cpp.d/expected.tags ================================================ i input.cxx /^int i;$/;" v typeref:typename:int j input-0.cxx /^[[)int j;$/;" v typeref:typename:int ================================================ FILE: Units/parser-cxx.r/cxx11-broken-nested-attributes.cpp.d/input-0.cxx ================================================ [[)int j; // This is a broken input; extracting j is not a must. ================================================ FILE: Units/parser-cxx.r/cxx11-broken-nested-attributes.cpp.d/input.cxx ================================================ [[[]]] // This is a crash test. int i; ================================================ FILE: Units/parser-cxx.r/cxx11-constexpr-variable.d/expected.tags ================================================ a_int input.cpp /^constexpr int a_int = 1;$/;" v typeref:typename:int b_int input.cpp /^constexpr const int b_int = 2;$/;" v typeref:typename:const int c_int input.cpp /^static constexpr const int c_int = 3;$/;" v typeref:typename:const int file: d_int input.cpp /^static constexpr int d_int = 4;$/;" v typeref:typename:int file: e_int input.cpp /^constexpr static const int e_int = 5;$/;" v typeref:typename:const int file: f_int input.cpp /^constexpr static int f_int = 6;$/;" v typeref:typename:int file: g_auto input.cpp /^constexpr auto g_auto = 7;$/;" v typeref:typename:auto h_char_ptr input.cpp /^constexpr static const char* const h_char_ptr = "this is valid";$/;" v typeref:typename:const char * const file: i_char_array input.cpp /^static constexpr const char i_char_array[] = "this is also valid";$/;" v typeref:typename:const char[] file: j_ref input.cpp /^static constexpr int const& j_ref = 42;$/;" v typeref:typename:int const & file: k_int_ptr input.cpp /^constexpr const int *k_int_ptr = &a_int;$/;" v typeref:typename:const int * l_raw input.cpp /^static constexpr const char* const l_raw = R"(setfacl {} -m g:{}:{} {})";$/;" v typeref:typename:const char * const file: m_int64 input.cpp /^static constexpr const int64_t m_int64 = 120'000;$/;" v typeref:typename:const int64_t file: ================================================ FILE: Units/parser-cxx.r/cxx11-constexpr-variable.d/input.cpp ================================================ constexpr int a_int = 1; constexpr const int b_int = 2; static constexpr const int c_int = 3; static constexpr int d_int = 4; constexpr static const int e_int = 5; constexpr static int f_int = 6; constexpr auto g_auto = 7; constexpr static const char* const h_char_ptr = "this is valid"; static constexpr const char i_char_array[] = "this is also valid"; static constexpr int const& j_ref = 42; constexpr const int *k_int_ptr = &a_int; static constexpr const char* const l_raw = R"(setfacl {} -m g:{}:{} {})"; static constexpr const int64_t m_int64 = 120'000; ================================================ FILE: Units/parser-cxx.r/cxx11-delete.d/args.ctags ================================================ --kinds-c++=+p --fields=+S ================================================ FILE: Units/parser-cxx.r/cxx11-delete.d/expected.tags ================================================ Del input.cpp /^ Del(const Del &) = delete;$/;" p class:Del file: signature:(const Del &) Del input.cpp /^class Del$/;" c file: operator = input.cpp /^ void operator=(const Del& rDel) = delete;$/;" p class:Del typeref:typename:void file: signature:(const Del & rDel) ================================================ FILE: Units/parser-cxx.r/cxx11-delete.d/input.cpp ================================================ class Del { private: Del(const Del &) = delete; void operator=(const Del& rDel) = delete; }; ================================================ FILE: Units/parser-cxx.r/cxx11-final.d/args.ctags ================================================ --kinds-c++=+p --fields=+S ================================================ FILE: Units/parser-cxx.r/cxx11-final.d/expected.tags ================================================ Base input.cpp /^class Base$/;" c file: Derived input.cpp /^class Derived final : public Base$/;" c file: final input.cpp /^ virtual void final();$/;" p class:Derived typeref:typename:void file: signature:() final input.cpp /^void Derived::final()$/;" f class:Derived typeref:typename:void signature:() foo input.cpp /^ virtual void foo() = 0;$/;" p class:Base typeref:typename:void file: signature:() foo input.cpp /^ virtual void foo() final;$/;" p class:Derived typeref:typename:void file: signature:() foo input.cpp /^void Base::foo()$/;" f class:Base typeref:typename:void signature:() foo input.cpp /^void Derived::foo()$/;" f class:Derived typeref:typename:void signature:() ================================================ FILE: Units/parser-cxx.r/cxx11-final.d/input.cpp ================================================ class Base { public: virtual void foo() = 0; }; class Derived final : public Base { virtual void foo() final; virtual void final(); }; void Base::foo() { } void Derived::foo() { } void Derived::final() { } ================================================ FILE: Units/parser-cxx.r/cxx11-lambdas.d/args.ctags ================================================ --kinds-c++=+pflz --fields=+SsKe --fields-c++=+{captures} --sort=no ================================================ FILE: Units/parser-cxx.r/cxx11-lambdas.d/expected.tags ================================================ call input.cpp /^template int call(T x)$/;" function typeref:typename:int signature:(T x) end:6 x input.cpp /^template int call(T x)$/;" parameter function:call typeref:typename:T file: X input.cpp /^template class X$/;" class file: end:10 test input.cpp /^int test()$/;" function typeref:typename:int signature:() end:30 __anon4e7b1b580102 input.cpp /^ auto l1 = [] { return 0; };$/;" function function:test file: end:14 captures:[] l1 input.cpp /^ auto l1 = [] { return 0; };$/;" local function:test typeref:typename:auto file: end:14 __anon4e7b1b580202 input.cpp /^ auto l2 = [](int a,int b) { return a > b ? a : b; };$/;" function function:test file: signature:(int a,int b) end:16 captures:[] a input.cpp /^ auto l2 = [](int a,int b) { return a > b ? a : b; };$/;" parameter function:test::__anon4e7b1b580202 typeref:typename:int file: b input.cpp /^ auto l2 = [](int a,int b) { return a > b ? a : b; };$/;" parameter function:test::__anon4e7b1b580202 typeref:typename:int file: l2 input.cpp /^ auto l2 = [](int a,int b) { return a > b ? a : b; };$/;" local function:test typeref:typename:auto file: end:16 __anon4e7b1b580302 input.cpp /^ auto l3 = [=](int a,int b) -> int {$/;" function function:test typeref:typename:int file: signature:(int a,int b) end:21 captures:[=] a input.cpp /^ auto l3 = [=](int a,int b) -> int {$/;" parameter function:test::__anon4e7b1b580302 typeref:typename:int file: b input.cpp /^ auto l3 = [=](int a,int b) -> int {$/;" parameter function:test::__anon4e7b1b580302 typeref:typename:int file: __anon4e7b1b580402 input.cpp /^ auto l4 = [a,b](int c){ return a+b+c; };$/;" function function:test::__anon4e7b1b580302 file: signature:(int c) end:19 captures:[a,b] c input.cpp /^ auto l4 = [a,b](int c){ return a+b+c; };$/;" parameter function:test::__anon4e7b1b580302::__anon4e7b1b580402 typeref:typename:int file: l4 input.cpp /^ auto l4 = [a,b](int c){ return a+b+c; };$/;" local function:test::__anon4e7b1b580302 typeref:typename:auto file: end:19 l3 input.cpp /^ auto l3 = [=](int a,int b) -> int {$/;" local function:test typeref:typename:auto file: end:21 __anon4e7b1b580502 input.cpp /^ auto l5 = [](X x,X) -> X { return X(); };$/;" function function:test typeref:typename:X file: signature:(X x,X) end:23 captures:[] x input.cpp /^ auto l5 = [](X x,X) -> X { return X(); };$/;" parameter function:test::__anon4e7b1b580502 typeref:typename:X file: __anon4e7b1b58060d input.cpp /^ auto l5 = [](X x,X) -> X { return X(); };$/;" parameter function:test::__anon4e7b1b580502 typeref:typename:X file: l5 input.cpp /^ auto l5 = [](X x,X) -> X { return X(); };$/;" local function:test typeref:typename:auto file: __anon4e7b1b580702 input.cpp /^ [l1,l2,l3](int a,int b) -> int {$/;" function function:test typeref:typename:int file: signature:(int a,int b) end:28 captures:[l1,l2,l3] a input.cpp /^ [l1,l2,l3](int a,int b) -> int {$/;" parameter function:test::__anon4e7b1b580702 typeref:typename:int file: b input.cpp /^ [l1,l2,l3](int a,int b) -> int {$/;" parameter function:test::__anon4e7b1b580702 typeref:typename:int file: v1 input.cpp /^ int v1 = call($/;" local function:test typeref:typename:int file: end:29 __anon4e7b1b580802 input.cpp /^auto lg1 = [] { return 0; };$/;" function file: end:32 captures:[] lg1 input.cpp /^auto lg1 = [] { return 0; };$/;" variable typeref:typename:auto end:32 __anon4e7b1b580902 input.cpp /^auto lg2 = [](int a,int b) { return a > b ? a : b; };$/;" function file: signature:(int a,int b) end:34 captures:[] a input.cpp /^auto lg2 = [](int a,int b) { return a > b ? a : b; };$/;" parameter function:__anon4e7b1b580902 typeref:typename:int file: b input.cpp /^auto lg2 = [](int a,int b) { return a > b ? a : b; };$/;" parameter function:__anon4e7b1b580902 typeref:typename:int file: lg2 input.cpp /^auto lg2 = [](int a,int b) { return a > b ? a : b; };$/;" variable typeref:typename:auto end:34 __anon4e7b1b580a02 input.cpp /^auto lg3 = [=](int a,int b) -> int {$/;" function typeref:typename:int file: signature:(int a,int b) end:39 captures:[=] a input.cpp /^auto lg3 = [=](int a,int b) -> int {$/;" parameter function:__anon4e7b1b580a02 typeref:typename:int file: b input.cpp /^auto lg3 = [=](int a,int b) -> int {$/;" parameter function:__anon4e7b1b580a02 typeref:typename:int file: __anon4e7b1b580b02 input.cpp /^ auto lg4 = [a,b](int c){ return a+b+c; };$/;" function function:__anon4e7b1b580a02 file: signature:(int c) end:37 captures:[a,b] c input.cpp /^ auto lg4 = [a,b](int c){ return a+b+c; };$/;" parameter function:__anon4e7b1b580a02::__anon4e7b1b580b02 typeref:typename:int file: lg4 input.cpp /^ auto lg4 = [a,b](int c){ return a+b+c; };$/;" local function:__anon4e7b1b580a02 typeref:typename:auto file: end:37 lg3 input.cpp /^auto lg3 = [=](int a,int b) -> int {$/;" variable typeref:typename:auto end:39 __anon4e7b1b580c02 input.cpp /^auto lg5 = [](X x,X) -> X { return X(); };$/;" function typeref:typename:X file: signature:(X x,X) end:41 captures:[] x input.cpp /^auto lg5 = [](X x,X) -> X { return X(); };$/;" parameter function:__anon4e7b1b580c02 typeref:typename:X file: __anon4e7b1b580d0d input.cpp /^auto lg5 = [](X x,X) -> X { return X(); };$/;" parameter function:__anon4e7b1b580c02 typeref:typename:X file: lg5 input.cpp /^auto lg5 = [](X x,X) -> X { return X(); };$/;" variable typeref:typename:auto ================================================ FILE: Units/parser-cxx.r/cxx11-lambdas.d/input.cpp ================================================ // This code compiles with // gcc -std=c++11 input.cpp template int call(T x) { } template class X { }; int test() { auto l1 = [] { return 0; }; auto l2 = [](int a,int b) { return a > b ? a : b; }; auto l3 = [=](int a,int b) -> int { auto l4 = [a,b](int c){ return a+b+c; }; return l4(5); }; auto l5 = [](X x,X) -> X { return X(); }; int v1 = call( [l1,l2,l3](int a,int b) -> int { return l1() + l2(a,b) + l3(a,b); } ); } auto lg1 = [] { return 0; }; auto lg2 = [](int a,int b) { return a > b ? a : b; }; auto lg3 = [=](int a,int b) -> int { auto lg4 = [a,b](int c){ return a+b+c; }; return lg4(5); }; auto lg5 = [](X x,X) -> X { return X(); }; ================================================ FILE: Units/parser-cxx.r/cxx11-noexcept.d/args.ctags ================================================ --kinds-c++=+p --fields=+S ================================================ FILE: Units/parser-cxx.r/cxx11-noexcept.d/expected.tags ================================================ Base input.cpp /^class Base$/;" c file: bar input.cpp /^ virtual void bar() const noexcept = 0;$/;" p class:Base typeref:typename:void file: signature:() const baz input.cpp /^ int baz() noexcept { return 42; }$/;" f class:Base typeref:typename:int file: signature:() foo input.cpp /^ virtual void foo() noexcept = 0;$/;" p class:Base typeref:typename:void file: signature:() ================================================ FILE: Units/parser-cxx.r/cxx11-noexcept.d/input.cpp ================================================ class Base { public: virtual void foo() noexcept = 0; virtual void bar() const noexcept = 0; int baz() noexcept { return 42; } }; ================================================ FILE: Units/parser-cxx.r/cxx11-override.d/args.ctags ================================================ --kinds-c++=+p --fields=+S ================================================ FILE: Units/parser-cxx.r/cxx11-override.d/expected.tags ================================================ Base input.cpp /^class Base$/;" c file: Derived input.cpp /^class Derived : public Base$/;" c file: foo input.cpp /^ virtual void foo() = 0;$/;" p class:Base typeref:typename:void file: signature:() foo input.cpp /^ virtual void foo() const override;$/;" p class:Derived typeref:typename:void file: signature:() const foo input.cpp /^ virtual void foo() override;$/;" p class:Derived typeref:typename:void file: signature:() foo input.cpp /^void Base::foo()$/;" f class:Base typeref:typename:void signature:() foo input.cpp /^void Derived::foo()$/;" f class:Derived typeref:typename:void signature:() override input.cpp /^ virtual void override();$/;" p class:Derived typeref:typename:void file: signature:() override input.cpp /^void Derived::override()$/;" f class:Derived typeref:typename:void signature:() ================================================ FILE: Units/parser-cxx.r/cxx11-override.d/input.cpp ================================================ class Base { public: virtual void foo() = 0; }; class Derived : public Base { virtual void foo() override; virtual void foo() const override; virtual void override(); }; void Base::foo() { } void Derived::foo() { } void Derived::override() { } ================================================ FILE: Units/parser-cxx.r/cxx11-raw-strings.d/expected.tags ================================================ FOUR input.cpp /^#define FOUR /;" d file: memb1 input.cpp /^struct typ1 { int memb1; };$/;" m struct:typ1 typeref:typename:int file: memb2 input.cpp /^struct typ2 { int memb2; };$/;" m struct:typ2 typeref:typename:int file: memb3 input.cpp /^struct typ3 { int memb3; };$/;" m struct:typ3 typeref:typename:int file: memb4 input.cpp /^struct typ4 { int memb4; };$/;" m struct:typ4 typeref:typename:int file: memb5 input.cpp /^struct typ5 { int memb5; };$/;" m struct:typ5 typeref:typename:int file: memb6 input.cpp /^struct typ6 { int memb6; };$/;" m struct:typ6 typeref:typename:int file: memb7 input.cpp /^struct typ7 { int memb7; };$/;" m struct:typ7 typeref:typename:int file: str1 input.cpp /^static const char* str1 = R"blah($/;" v typeref:typename:const char * file: str2 input.cpp /^static const char* str2 = R"blah($/;" v typeref:typename:const char * file: str3 input.cpp /^static const char* str3 = FOUR"f(iv)e";$/;" v typeref:typename:const char * file: str4 input.cpp /^static const char* str4 = LR"blah(";int bug4;)blah";$/;" v typeref:typename:const char * file: str5 input.cpp /^static const char* str5 = u8R"blah(";int bug5;)blah";$/;" v typeref:typename:const char * file: str6 input.cpp /^static const char* str6 = uR"blah(";int bug6;)blah";$/;" v typeref:typename:const char * file: str7 input.cpp /^static const char* str7 = UR"blah(";int bug7;)blah";$/;" v typeref:typename:const char * file: typ1 input.cpp /^struct typ1 { int memb1; };$/;" s file: typ2 input.cpp /^struct typ2 { int memb2; };$/;" s file: typ3 input.cpp /^struct typ3 { int memb3; };$/;" s file: typ4 input.cpp /^struct typ4 { int memb4; };$/;" s file: typ5 input.cpp /^struct typ5 { int memb5; };$/;" s file: typ6 input.cpp /^struct typ6 { int memb6; };$/;" s file: typ7 input.cpp /^struct typ7 { int memb7; };$/;" s file: ================================================ FILE: Units/parser-cxx.r/cxx11-raw-strings.d/input.cpp ================================================ static const char* str1 = R"blah( lots of text )blah"; struct typ1 { int memb1; }; static const char* str2 = R"blah( lots of text including a quote" )blah"; struct typ2 { int memb2; }; /* check we don't get confused by string concatenation */ #define FOUR "four" static const char* str3 = FOUR"f(iv)e"; struct typ3 { int memb3; }; /* check for prefixes */ static const char* str4 = LR"blah(";int bug4;)blah"; struct typ4 { int memb4; }; static const char* str5 = u8R"blah(";int bug5;)blah"; struct typ5 { int memb5; }; static const char* str6 = uR"blah(";int bug6;)blah"; struct typ6 { int memb6; }; static const char* str7 = UR"blah(";int bug7;)blah"; struct typ7 { int memb7; }; ================================================ FILE: Units/parser-cxx.r/cxx11-user-defined-literals.d/expected.tags ================================================ operator ""_e input.h /^float operator ""_e(const char*)$/;" f typeref:typename:float operator ""_print input.h /^void operator"" _print ( const char* str )$/;" f typeref:typename:void ================================================ FILE: Units/parser-cxx.r/cxx11-user-defined-literals.d/input.h ================================================ // Quoted from https://en.cppreference.com/w/cpp/language/user_literal: // used for side-effects void operator"" _print ( const char* str ) { std::cout << str << '\n'; } float operator ""_e(const char*) { return 0.0; } ================================================ FILE: Units/parser-cxx.r/cxx11enum.cpp.d/args.ctags ================================================ --kinds-c++=* --sort=no --fields=+{end} --fields-c++=+{properties} --fields-c=+{properties} ================================================ FILE: Units/parser-cxx.r/cxx11enum.cpp.d/expected.tags ================================================ a input.cpp /^#define SOME_MACRO(a,b) 1$/;" D macro:SOME_MACRO b input.cpp /^#define SOME_MACRO(a,b) 1$/;" D macro:SOME_MACRO SOME_MACRO input.cpp /^#define SOME_MACRO(/;" d file: end:2 whatever_t input.cpp /^typedef int whatever_t;$/;" t typeref:typename:int file: uint8_t input.cpp /^typedef unsigned char uint8_t;$/;" t typeref:typename:unsigned char file: E1 input.cpp /^enum E1 : int { E1_member1, E1_member2 };$/;" g typeref:typename:int file: end:7 E1_member1 input.cpp /^enum E1 : int { E1_member1, E1_member2 };$/;" e enum:E1 file: E1_member2 input.cpp /^enum E1 : int { E1_member1, E1_member2 };$/;" e enum:E1 file: E2 input.cpp /^enum E2 : long { E2_member1 };$/;" g typeref:typename:long file: end:8 E2_member1 input.cpp /^enum E2 : long { E2_member1 };$/;" e enum:E2 file: E3 input.cpp /^enum E3 : unsigned int { E3_member1 };$/;" g typeref:typename:unsigned int file: end:9 E3_member1 input.cpp /^enum E3 : unsigned int { E3_member1 };$/;" e enum:E3 file: E4 input.cpp /^enum E4 : unsigned long long int { } E4_var1, E4_var2;$/;" g typeref:typename:unsigned long long int file: end:10 E4_var1 input.cpp /^enum E4 : unsigned long long int { } E4_var1, E4_var2;$/;" v typeref:enum:E4 end:10 E4_var2 input.cpp /^enum E4 : unsigned long long int { } E4_var1, E4_var2;$/;" v typeref:enum:E4 end:10 E5 input.cpp /^enum E5 : whatever_t { E5_member1 } E5_var1;$/;" g typeref:typename:whatever_t file: end:11 E5_member1 input.cpp /^enum E5 : whatever_t { E5_member1 } E5_var1;$/;" e enum:E5 file: E5_var1 input.cpp /^enum E5 : whatever_t { E5_member1 } E5_var1;$/;" v typeref:enum:E5 end:11 EC1 input.cpp /^enum class EC1 { };$/;" g file: end:13 properties:scopedenum EC2 input.cpp /^enum class EC2 : short { EC2_member1, EC2_member2 };$/;" g typeref:typename:short file: end:14 properties:scopedenum EC2_member1 input.cpp /^enum class EC2 : short { EC2_member1, EC2_member2 };$/;" e enum:EC2 file: EC2_member2 input.cpp /^enum class EC2 : short { EC2_member1, EC2_member2 };$/;" e enum:EC2 file: ES1 input.cpp /^enum struct ES1 { };$/;" g file: end:16 properties:scopedenum ES2 input.cpp /^enum struct ES2 : unsigned { ES2_member1, ES2_member2 };$/;" g typeref:typename:unsigned file: end:17 properties:scopedenum ES2_member1 input.cpp /^enum struct ES2 : unsigned { ES2_member1, ES2_member2 };$/;" e enum:ES2 file: ES2_member2 input.cpp /^enum struct ES2 : unsigned { ES2_member1, ES2_member2 };$/;" e enum:ES2 file: ES3 input.cpp /^enum struct ES3 : uint8_t { ES3_member1 = SOME_MACRO(1,whatever appears here), ES3_member2 };$/;" g typeref:typename:uint8_t file: end:18 properties:scopedenum ES3_member1 input.cpp /^enum struct ES3 : uint8_t { ES3_member1 = SOME_MACRO(1,whatever appears here), ES3_member2 };$/;" e enum:ES3 file: ES3_member2 input.cpp /^enum struct ES3 : uint8_t { ES3_member1 = SOME_MACRO(1,whatever appears here), ES3_member2 };$/;" e enum:ES3 file: ES4 input.cpp /^enum struct ES4 : unsigned long long int { ES4_member1 = (1234 * 10) << 1 };$/;" g typeref:typename:unsigned long long int file: end:19 properties:scopedenum ES4_member1 input.cpp /^enum struct ES4 : unsigned long long int { ES4_member1 = (1234 * 10) << 1 };$/;" e enum:ES4 file: ES5 input.cpp /^enum struct ES5 : signed whatever_t { } ES4_var1[10];$/;" g typeref:typename:signed whatever_t file: end:20 properties:scopedenum ES4_var1 input.cpp /^enum struct ES5 : signed whatever_t { } ES4_var1[10];$/;" v typeref:enum:ES5[10] end:20 __anon5f0fdc1d0103 input.cpp /^enum { Anon1_member1, Anon1_member2 };$/;" g file: end:22 Anon1_member1 input.cpp /^enum { Anon1_member1, Anon1_member2 };$/;" e enum:__anon5f0fdc1d0103 file: Anon1_member2 input.cpp /^enum { Anon1_member1, Anon1_member2 };$/;" e enum:__anon5f0fdc1d0103 file: __anon5f0fdc1d0203 input.cpp /^enum : unsigned int { Anon2_member1 };$/;" g typeref:typename:unsigned int file: end:23 Anon2_member1 input.cpp /^enum : unsigned int { Anon2_member1 };$/;" e enum:__anon5f0fdc1d0203 file: __anon5f0fdc1d0303 input.cpp /^enum : whatever_t { Anon3_member1 };$/;" g typeref:typename:whatever_t file: end:24 Anon3_member1 input.cpp /^enum : whatever_t { Anon3_member1 };$/;" e enum:__anon5f0fdc1d0303 file: Class input.cpp /^class Class$/;" c file: end:32 CE1 input.cpp /^ enum CE1 : int { CE1_member1 = 10, CE1_member2 = (CE1_member1 << 10) };$/;" g class:Class typeref:typename:int file: end:28 CE1_member1 input.cpp /^ enum CE1 : int { CE1_member1 = 10, CE1_member2 = (CE1_member1 << 10) };$/;" e enum:Class::CE1 file: CE1_member2 input.cpp /^ enum CE1 : int { CE1_member1 = 10, CE1_member2 = (CE1_member1 << 10) };$/;" e enum:Class::CE1 file: CEC1 input.cpp /^ enum class CEC1 : unsigned long int { CEC1_member1 };$/;" g class:Class typeref:typename:unsigned long int file: end:29 properties:scopedenum CEC1_member1 input.cpp /^ enum class CEC1 : unsigned long int { CEC1_member1 };$/;" e enum:Class::CEC1 file: CES1 input.cpp /^ enum struct CES1 : int { CES1_member1 };$/;" g class:Class typeref:typename:int file: end:30 properties:scopedenum CES1_member1 input.cpp /^ enum struct CES1 : int { CES1_member1 };$/;" e enum:Class::CES1 file: Function1 input.cpp /^ virtual enum CEC1 Function1(enum CE1 parameter);$/;" p class:Class typeref:enum:CEC1 file: end:31 properties:virtual parameter input.cpp /^ virtual enum CEC1 Function1(enum CE1 parameter);$/;" z prototype:Class::Function1 typeref:enum:CE1 file: E1_var1 input.cpp /^enum E1 E1_var1;$/;" v typeref:enum:E1 end:41 EC1_var1 input.cpp /^enum EC1 EC1_var1[10][10];$/;" v typeref:enum:EC1[10][10] end:42 ================================================ FILE: Units/parser-cxx.r/cxx11enum.cpp.d/input.cpp ================================================ #define SOME_MACRO(a,b) 1 typedef int whatever_t; typedef unsigned char uint8_t; enum E1 : int { E1_member1, E1_member2 }; enum E2 : long { E2_member1 }; enum E3 : unsigned int { E3_member1 }; enum E4 : unsigned long long int { } E4_var1, E4_var2; enum E5 : whatever_t { E5_member1 } E5_var1; enum class EC1 { }; enum class EC2 : short { EC2_member1, EC2_member2 }; enum struct ES1 { }; enum struct ES2 : unsigned { ES2_member1, ES2_member2 }; enum struct ES3 : uint8_t { ES3_member1 = SOME_MACRO(1,whatever appears here), ES3_member2 }; enum struct ES4 : unsigned long long int { ES4_member1 = (1234 * 10) << 1 }; enum struct ES5 : signed whatever_t { } ES4_var1[10]; enum { Anon1_member1, Anon1_member2 }; enum : unsigned int { Anon2_member1 }; enum : whatever_t { Anon3_member1 }; class Class { enum CE1 : int { CE1_member1 = 10, CE1_member2 = (CE1_member1 << 10) }; enum class CEC1 : unsigned long int { CEC1_member1 }; enum struct CES1 : int { CES1_member1 }; virtual enum CEC1 Function1(enum CE1 parameter); }; // Forward declarations: we ignore them. enum F1 : whatever_t; enum class F2; enum class F3 : whatever_t; enum struct F4 : unsigned int; // variable declarations enum E1 E1_var1; enum EC1 EC1_var1[10][10]; //enum class EC2 EC2_var1; <-- this is NOT valid C++11 ================================================ FILE: Units/parser-cxx.r/cxx14-combined.d/args.ctags ================================================ --kinds-c++=+p --fields=+S ================================================ FILE: Units/parser-cxx.r/cxx14-combined.d/expected.tags ================================================ Base input.cpp /^struct Base {$/;" s file: Foo input.cpp /^struct Foo final : public Base {$/;" s file: bar input.cpp /^ static constexpr auto bar() noexcept { return 1; }$/;" f struct:Foo typeref:typename:auto file: signature:() baz input.cpp /^ virtual void baz() const throw() = 0;$/;" p struct:Base typeref:typename:void file: signature:() const baz input.cpp /^ virtual void baz() const throw() final override;$/;" p struct:Foo typeref:typename:void file: signature:() const ================================================ FILE: Units/parser-cxx.r/cxx14-combined.d/input.cpp ================================================ struct Base { virtual void baz() const throw() = 0; }; struct Foo final : public Base { static constexpr auto bar() noexcept { return 1; } virtual void baz() const throw() final override; }; ================================================ FILE: Units/parser-cxx.r/cxx14-digit-separator.d/args.ctags ================================================ --kinds-c++=+l ================================================ FILE: Units/parser-cxx.r/cxx14-digit-separator.d/expected.tags ================================================ X input.cpp /^class X$/;" c file: a1 input.cpp /^long a1=1'048'576;$/;" v typeref:typename:long a2 input.cpp /^long a2=0x10'0000;$/;" v typeref:typename:long a3 input.cpp /^long a3=00'04'00'00'00;$/;" v typeref:typename:long a4 input.cpp /^long a4=0b100'000000'000000'000000;$/;" v typeref:typename:long b1 input.cpp /^ long b1=1'048'576;$/;" l function:test typeref:typename:long file: b2 input.cpp /^ long b2=0x10'0000;$/;" l function:test typeref:typename:long file: b3 input.cpp /^ long b3=00'04'00'00'00;$/;" l function:test typeref:typename:long file: b4 input.cpp /^ long b4=0b100'000000'000000'000000;$/;" l function:test typeref:typename:long file: c1 input.cpp /^ long c1 = 'a';$/;" l function:test typeref:typename:long file: c2 input.cpp /^ long c2 = 'a';$/;" l function:test typeref:typename:long file: c3 input.cpp /^ long c3 = 'a';$/;" l function:test typeref:typename:long file: c4 input.cpp /^ long c4 = 'a';$/;" l function:test typeref:typename:long file: m1 input.cpp /^ long m1=1'048'576;$/;" m class:X typeref:typename:long file: m2 input.cpp /^ long m2=0x10'0000;$/;" m class:X typeref:typename:long file: m3 input.cpp /^ long m3=00'04'00'00'00;$/;" m class:X typeref:typename:long file: m4 input.cpp /^ long m4=0b100'000000'000000'000000;$/;" m class:X typeref:typename:long file: test input.cpp /^void test()$/;" f typeref:typename:void ================================================ FILE: Units/parser-cxx.r/cxx14-digit-separator.d/input.cpp ================================================ long a1=1'048'576; long a2=0x10'0000; long a3=00'04'00'00'00; long a4=0b100'000000'000000'000000; void test() { call(1'048'576); call(1'048'576,0x10'0000,'a',00'04'00'00'00); long b1=1'048'576; long c1 = 'a'; long b2=0x10'0000; long c2 = 'a'; long b3=00'04'00'00'00; long c3 = 'a'; long b4=0b100'000000'000000'000000; long c4 = 'a'; } class X { public: long m1=1'048'576; long m2=0x10'0000; long m3=00'04'00'00'00; long m4=0b100'000000'000000'000000; }; ================================================ FILE: Units/parser-cxx.r/digraph-and-template-angle-confliction.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-cxx.r/digraph-and-template-angle-confliction.d/expected.tags ================================================ std input.hh /^namespace std {$/;" n hash input.hh /^ struct hash<::sockaddr_in> {$/;" s namespace:std a input.hh /^ int a;$/;" m struct:std::hash typeref:typename:int A input.hh /^int A <::> = {1, 2};$/;" v typeref:typename:int[] B input.hh /^int B <:2:> = {1, 2};$/;" v typeref:typename:int[2] N input.hh /^#define N /;" d C input.hh /^int C <:N:> = {1, 2};$/;" v typeref:typename:int[] D input.hh /^int D [] = {1, 2};$/;" v typeref:typename:int[] M input.hh /^const int M = 3;$/;" v typeref:typename:const int E input.hh /^int E <:::M:> = {1, 2};$/;" v typeref:typename:int[] foo input.hh /^int foo (void)$/;" f typeref:typename:int ================================================ FILE: Units/parser-cxx.r/digraph-and-template-angle-confliction.d/input.hh ================================================ #include #include namespace std { template <> struct hash<::sockaddr_in> { int a; }; }; int A <::> = {1, 2}; int B <:2:> = {1, 2}; #define N 2 int C <:N:> = {1, 2}; int D [] = {1, 2}; const int M = 3; int E <:::M:> = {1, 2}; int foo (void) { return 0; } ================================================ FILE: Units/parser-cxx.r/end-field-for-prototype-kind.d/args.ctags ================================================ --fields=+ne --kinds-C++=p ================================================ FILE: Units/parser-cxx.r/end-field-for-prototype-kind.d/expected.tags ================================================ main input.h /^main$/;" p line:2 typeref:typename:int end:11 ================================================ FILE: Units/parser-cxx.r/end-field-for-prototype-kind.d/input.h ================================================ int main ( int argc , char * * argv ); ================================================ FILE: Units/parser-cxx.r/enum-in-a-struct--with-q-extra.d/README ================================================ S::T::E::alpha and S::T::E::beta are not included intentionally Taken from the comments of cxx_tag.c:: // If the scope kind is enumeration then we need to remove the // last scope part. This is what old ctags did. ================================================ FILE: Units/parser-cxx.r/enum-in-a-struct--with-q-extra.d/args.ctags ================================================ --sort=no --extra=+q ================================================ FILE: Units/parser-cxx.r/enum-in-a-struct--with-q-extra.d/expected.tags ================================================ S input.cc /^namespace S {$/;" n file: T input.cc /^ struct T {$/;" s namespace:S file: S::T input.cc /^ struct T {$/;" s namespace:S file: E input.cc /^ enum E {$/;" g struct:S::T file: S::T::E input.cc /^ enum E {$/;" g struct:S::T file: alpha input.cc /^ alpha, beta,$/;" e enum:S::T::E file: S::T::alpha input.cc /^ alpha, beta,$/;" e enum:S::T::E file: beta input.cc /^ alpha, beta,$/;" e enum:S::T::E file: S::T::beta input.cc /^ alpha, beta,$/;" e enum:S::T::E file: elt input.cc /^ } elt;$/;" m struct:S::T typeref:enum:S::T::E file: S::T::elt input.cc /^ } elt;$/;" m struct:S::T typeref:enum:S::T::E file: s input.cc /^struct S::T s = { .elt = S::T::E::alpha };$/;" v typeref:struct:S::T ================================================ FILE: Units/parser-cxx.r/enum-in-a-struct--with-q-extra.d/input.cc ================================================ namespace S { struct T { enum E { alpha, beta, } elt; }; } struct S::T s = { .elt = S::T::E::alpha }; ================================================ FILE: Units/parser-cxx.r/export-2.d/README.md ================================================ The test case testing parts of the syntax (2) in https://en.cppreference.com/w/cpp/language/modules. export declaration (2) ================================================ FILE: Units/parser-cxx.r/export-2.d/args.ctags ================================================ --sort=no --fields-C++=+{properties} ================================================ FILE: Units/parser-cxx.r/export-2.d/expected.tags ================================================ A input.cpp /^export module A; \/\/ declares the primary module interface unit for named module 'A'$/;" M properties:export hello input.cpp /^export char const* hello() { return "hello"; }$/;" f typeref:typename:char const * properties:export world input.cpp /^char const* world() { return "world"; }$/;" f typeref:typename:char const * hi input.cpp /^export namespace hi$/;" n properties:export english input.cpp /^ char const* english() { return "Hi!"; }$/;" f namespace:hi typeref:typename:char const * french input.cpp /^ char const* french() { return "Salut!"; }$/;" f namespace:hi typeref:typename:char const * x input.cpp /^export enum x { a = 1 };$/;" g properties:export a input.cpp /^export enum x { a = 1 };$/;" e enum:x td input.cpp /^export typedef int td;$/;" t typeref:typename:int properties:export s_ input.cpp /^struct s_ {$/;" s file: mbr input.cpp /^ int mbr;$/;" m struct:s_ typeref:typename:int file: s input.cpp /^export struct s {$/;" s properties:export mbr input.cpp /^ int mbr;$/;" m struct:s typeref:typename:int s__ input.cpp /^struct s__ {$/;" s file: mbr input.cpp /^ int mbr;$/;" m struct:s__ typeref:typename:int file: ================================================ FILE: Units/parser-cxx.r/export-2.d/input.cpp ================================================ // Taken from https://en.cppreference.com/w/cpp/language/modules export module A; // declares the primary module interface unit for named module 'A' // hello() will be visible by translations units importing 'A' export char const* hello() { return "hello"; } // world() will NOT be visible. char const* world() { return "world"; } export namespace hi { char const* english() { return "Hi!"; } char const* french() { return "Salut!"; } } export enum x { a = 1 }; export typedef int td; struct s_ { int mbr; }; export struct s { int mbr; }; struct s__ { int mbr; }; ================================================ FILE: Units/parser-cxx.r/export-2.d/validator ================================================ cxx20+module ================================================ FILE: Units/parser-cxx.r/export-3.d/README.md ================================================ The test case testing parts of the syntax (3) in https://en.cppreference.com/w/cpp/language/modules. export { declaration-seq(optional) } (3) ================================================ FILE: Units/parser-cxx.r/export-3.d/args.ctags ================================================ --sort=no --fields-C++=+{properties} --kinds-C++=+p ================================================ FILE: Units/parser-cxx.r/export-3.d/expected.tags ================================================ Y input.cpp /^export module Y;$/;" M properties:export Z0 input.cpp /^ namespace Z0 {$/;" n properties:export z0 input.cpp /^ int z0;$/;" v namespace:Z0 typeref:typename:int X input.cpp /^namespace X {$/;" n file: a input.cpp /^ int a;$/;" v namespace:X typeref:typename:int x input.cpp /^ int x;$/;" v namespace:X typeref:typename:int properties:export f input.cpp /^ int f(int i);$/;" p namespace:X typeref:typename:int properties:export u input.cpp /^ union u {$/;" u namespace:X properties:export mbr input.cpp /^ int mbr;$/;" m union:X::u typeref:typename:int b input.cpp /^ int b;$/;" v namespace:X typeref:typename:int m input.cpp /^int m;$/;" v typeref:typename:int z input.cpp /^ int z;$/;" v typeref:typename:int properties:export E input.cpp /^ enum E { a = 1 };$/;" g properties:export a input.cpp /^ enum E { a = 1 };$/;" e enum:E td input.cpp /^ typedef int td;$/;" t typeref:typename:int properties:export c input.cpp /^ class c {$/;" c properties:export mbr input.cpp /^ int mbr;$/;" m class:c typeref:typename:int n input.cpp /^int n;$/;" v typeref:typename:int o input.cpp /^static int o;$/;" v typeref:typename:int file: properties:static ================================================ FILE: Units/parser-cxx.r/export-3.d/input.cpp ================================================ export module Y; export { namespace Z0 { int z0; }; } namespace X { int a; export { int x; int f(int i); union u { int mbr; }; } int b; }; int m; export { int z; enum E { a = 1 }; typedef int td; class c { int mbr; }; } int n; static int o; ================================================ FILE: Units/parser-cxx.r/export-3.d/validator ================================================ cxx20+module ================================================ FILE: Units/parser-cxx.r/export-namespace-alias.d/args.ctags ================================================ --sort=no --fields-C++=+{properties} --fields=+K --kinds-C++=+{alias} ================================================ FILE: Units/parser-cxx.r/export-namespace-alias.d/expected.tags ================================================ mylib input.cpp /^export module mylib;$/;" module properties:export X input.cpp /^export namespace X {$/;" namespace properties:export i input.cpp /^ int i;$/;" variable namespace:X typeref:typename:int Z input.cpp /^export namespace Z = X;$/;" alias properties:export name:X ================================================ FILE: Units/parser-cxx.r/export-namespace-alias.d/input.cpp ================================================ export module mylib; export namespace X { int i; } export namespace Z = X; ================================================ FILE: Units/parser-cxx.r/export-namespace-alias.d/validator ================================================ cxx20+module ================================================ FILE: Units/parser-cxx.r/export-using.d/args.ctags ================================================ --sort=no --fields=+K --kinds-C++=+MtNp --fields-C++=+{properties} --extras=+r --fields=+r ================================================ FILE: Units/parser-cxx.r/export-using.d/expected.tags ================================================ Delta input.cpp /^export module Delta;$/;" module roles:def properties:export Param input.cpp /^export using Param = int;$/;" typedef typeref:typename:int roles:def properties:export Param input.cpp /^export using ::Param;$/;" name roles:def properties:export Param input.cpp /^export using ::Param; \/\/ We can declare an object more than twice.$/;" name roles:def properties:export fn input.cpp /^export void fn();$/;" prototype typeref:typename:void roles:def properties:export ================================================ FILE: Units/parser-cxx.r/export-using.d/input.cpp ================================================ // Derived from https://github.com/universal-ctags/ctags/issues/4003 submitted by @adrianconstantin-leroy. export module Delta; export using Param = int; export using ::Param; export using ::Param; // We can declare an object more than twice. export void fn(); ================================================ FILE: Units/parser-cxx.r/export-using.d/validator ================================================ cxx20+module ================================================ FILE: Units/parser-cxx.r/extern.d/args.ctags ================================================ --kinds-c++=+px --fields-c++=+{properties} ================================================ FILE: Units/parser-cxx.r/extern.d/expected.tags ================================================ f input.cpp /^extern "C" void f(void);$/;" p typeref:typename:void file: properties:extern g input.cpp /^extern "C" void g(void) {}$/;" f typeref:typename:void properties:extern h input.cpp /^ void h(void);$/;" p typeref:typename:void file: i input.cpp /^ int i;$/;" v typeref:typename:int j input.cpp /^ extern int j;$/;" x typeref:typename:int properties:extern ================================================ FILE: Units/parser-cxx.r/extern.d/input.cpp ================================================ // This was initially reported as bug 931@github reported by Corax26 on // 12/05/2016: the extern "C" declarations were missing from the ctags output. // // Additionally this test checks the +{c.properties} field for the "extern" // property being properly set. extern "C" void f(void); extern "C" void g(void) {} extern "C" { // Please note that h() and i have internal linkage (but their name // mangling is C-style). h() is just a prototype while i is both // a declaration AND a definition of variable. void h(void); int i; // j has external linkage (declaration only). extern int j; } ================================================ FILE: Units/parser-cxx.r/field-nth.d/args.ctags ================================================ --sort=no --fields=+oS --kinds-C++=+DzZ --fields-C++={template} ================================================ FILE: Units/parser-cxx.r/field-nth.d/expected.tags ================================================ f input.h /^inline void f(int x, int y) {}$/;" f typeref:typename:void signature:(int x,int y) x input.h /^inline void f(int x, int y) {}$/;" z function:f typeref:typename:int file: nth:0 y input.h /^inline void f(int x, int y) {}$/;" z function:f typeref:typename:int file: nth:1 X input.h /^#define F(X,Y) (X+Y)$/;" D macro:F nth:0 Y input.h /^#define F(X,Y) (X+Y)$/;" D macro:F nth:1 F input.h /^#define F(/;" d signature:(X,Y) C input.h /^class C {};$/;" c template: T1 input.h /^template$/;" Z class:C typeref:meta:class nth:0 T2 input.h /^template$/;" Z class:C typeref:meta:class nth:1 I input.h /^template$/;" Z class:C typeref:typename:int nth:2 D input.h /^class D {$/;" c i input.h /^ int i, j;$/;" m class:D typeref:typename:int nth:0 j input.h /^ int i, j;$/;" m class:D typeref:typename:int nth:1 c input.h /^ char c;$/;" m class:D typeref:typename:char nth:2 color input.h /^enum color {$/;" g red input.h /^ red, green, blue,$/;" e enum:color nth:0 green input.h /^ red, green, blue,$/;" e enum:color nth:1 blue input.h /^ red, green, blue,$/;" e enum:color nth:2 ================================================ FILE: Units/parser-cxx.r/field-nth.d/input.h ================================================ inline void f(int x, int y) {} #define F(X,Y) (X+Y) template class C {}; class D { int i, j; char c; }; enum color { red, green, blue, }; ================================================ FILE: Units/parser-cxx.r/foreach.d/args.ctags ================================================ --kinds-c++=+pxl -D foreach(arg1,...)=for(arg1;;) ================================================ FILE: Units/parser-cxx.r/foreach.d/expected.tags ================================================ a input.cpp /^int a,b;$/;" v typeref:typename:int b input.cpp /^int a,b;$/;" v typeref:typename:int foreach input.cpp /^#define foreach(/;" d file: main input.cpp /^int main(int,char **)$/;" f typeref:typename:int p input.cpp /^ foreach(char * p,pointers)$/;" l function:main typeref:typename:char * file: pointers input.cpp /^char * pointers[10];$/;" v typeref:typename:char * [10] ================================================ FILE: Units/parser-cxx.r/foreach.d/input.cpp ================================================ // In real world this would have a (rather complex) implementation. // See Q_FOREACH() and foreach() macros in Qt as example. #define foreach(_a,_b) char * pointers[10]; int a,b; int main(int,char **) { //... // p is declared inside foreach() parenthesis. // pointers is NOT declared here foreach(char * p,pointers) { } // This is not a variable declaration. if(a * b) { } return 0; } ================================================ FILE: Units/parser-cxx.r/func-name-in-parentheses.d/args.ctags ================================================ --sort=no --kinds-C=+p --kinds-C++=+p --fields=+KzS ================================================ FILE: Units/parser-cxx.r/func-name-in-parentheses.d/expected.tags ================================================ gboolean input.c /^typedef boolean gboolean;$/;" kind:typedef typeref:typename:boolean file: gchar input.c /^typedef char gchar;$/;" kind:typedef typeref:typename:char file: g_str_has_prefix input.c /^gboolean (g_str_has_prefix) (const gchar *str,$/;" kind:prototype typeref:typename:gboolean file: signature:(const gchar * str,const gchar * prefix) I input.c /^typedef int I;$/;" kind:typedef typeref:typename:int file: fp input.c /^I (fp) (void);$/;" kind:prototype typeref:typename:I file: signature:(void) fi input.c /^I (fi) (void) { return 0; }$/;" kind:function typeref:typename:I signature:(void) gp input.c /^I* (gp) (void);$/;" kind:prototype typeref:typename:I * file: signature:(void) gi input.c /^I* (gi) (void) { return NULL; }$/;" kind:function typeref:typename:I * signature:(void) Point input-0.cpp /^class Point {$/;" kind:class file: x input-0.cpp /^ double x, y;$/;" kind:member class:Point typeref:typename:double file: y input-0.cpp /^ double x, y;$/;" kind:member class:Point typeref:typename:double file: myns input-0.cpp /^namespace myns {$/;" kind:namespace file: g input-0.cpp /^ class Point * (g)();$/;" kind:prototype namespace:myns typeref:class:Point * file: signature:() mysubns input-0.cpp /^ namespace mysubns {$/;" kind:namespace namespace:myns file: h input-0.cpp /^ class Point * ((h))();$/;" kind:prototype namespace:myns::mysubns typeref:class:Point * file: signature:() f input-0.cpp /^class Point * (f)() {$/;" kind:function typeref:class:Point * signature:() ================================================ FILE: Units/parser-cxx.r/func-name-in-parentheses.d/input-0.cpp ================================================ class Point { double x, y; }; namespace myns { class Point * (g)(); namespace mysubns { class Point * ((h))(); }; }; class Point * (f)() { return nullptr; } ================================================ FILE: Units/parser-cxx.r/func-name-in-parentheses.d/input.c ================================================ typedef boolean gboolean; typedef char gchar; gboolean (g_str_has_prefix) (const gchar *str, const gchar *prefix); typedef int I; I (fp) (void); I (fi) (void) { return 0; } I* (gp) (void); I* (gi) (void) { return NULL; } ================================================ FILE: Units/parser-cxx.r/function-return-type-via-macro.d/args.ctags ================================================ --sort=no --kinds-C++=fpvx --fields=+s ================================================ FILE: Units/parser-cxx.r/function-return-type-via-macro.d/expected.tags ================================================ PL_ClearArenaPool input.cpp /^PR_EXTERN(void) PL_ClearArenaPool(PLArenaPool *pool, PRInt32 pattern);$/;" p typeref:typename:void file: deflateBound input.cpp /^GIT_INLINE(size_t) deflateBound(z_streamp stream, size_t s)$/;" f typeref:typename:size_t ap_os_create_privileged_process input.cpp /^AP_DECLARE(apr_status_t) ap_os_create_privileged_process($/;" p typeref:typename:apr_status_t file: handleError input.cpp /^LOCAL(struct errRecord *) handleError(z_streamp stream, size_t s) MAY_EXIT$/;" f typeref:struct:errRecord * ================================================ FILE: Units/parser-cxx.r/function-return-type-via-macro.d/input.cpp ================================================ // Various bugs reported by Ivc. PR_EXTERN(void) PL_ClearArenaPool(PLArenaPool *pool, PRInt32 pattern); GIT_INLINE(size_t) deflateBound(z_streamp stream, size_t s) { return (s + ((s + 7) >> 3) + ((s + 63) >> 6) + 11); } AP_DECLARE(apr_status_t) ap_os_create_privileged_process( const request_rec *r, apr_proc_t *newproc, const char *progname, const char * const *args, const char * const *env, apr_procattr_t *attr, apr_pool_t *p); LOCAL(struct errRecord *) handleError(z_streamp stream, size_t s) MAY_EXIT { if (size == 0) exit (1); return ERR_REC; } ================================================ FILE: Units/parser-cxx.r/function-return-types.d/args.ctags ================================================ --sort=no --kinds-C++=fpm --fields=+te --fields-c++=+{template} ================================================ FILE: Units/parser-cxx.r/function-return-types.d/expected.tags ================================================ p00 input.cpp /^void p00();$/;" p typeref:typename:void file: end:20 p01 input.cpp /^int p01();$/;" p typeref:typename:int file: end:21 p02 input.cpp /^unsigned int p02();$/;" p typeref:typename:unsigned int file: end:22 p03 input.cpp /^auto p03() -> int;$/;" p typeref:typename:int file: end:23 p04 input.cpp /^int * p04();$/;" p typeref:typename:int * file: end:24 p05 input.cpp /^const unsigned long long int & p05();$/;" p typeref:typename:const unsigned long long int & file: end:25 p06 input.cpp /^static inline int * p06();$/;" p typeref:typename:int * file: end:26 p07 input.cpp /^std::string & p07();$/;" p typeref:typename:std::string & file: end:27 p08 input.cpp /^std::vector * p08();$/;" p typeref:typename:std::vector * file: end:28 p09 input.cpp /^auto p09() -> std::vector ***;$/;" p typeref:typename:std::vector *** file: end:29 p10 input.cpp /^auto p10() -> std::string;$/;" p typeref:typename:std::string file: end:30 p11 input.cpp /^auto p11() -> int (*)(int);$/;" p typeref:typename:int (*)(int) file: end:31 p12 input.cpp /^struct Struct p12();$/;" p typeref:struct:Struct file: end:32 p13 input.cpp /^Struct p13();$/;" p typeref:typename:Struct file: end:33 p14 input.cpp /^union Union p14();$/;" p typeref:union:Union file: end:34 p15 input.cpp /^Union p15();$/;" p typeref:typename:Union file: end:35 p15p input.cpp /^class Class * p15p();$/;" p typeref:class:Class * file: end:36 p16 input.cpp /^Class & p16();$/;" p typeref:typename:Class & file: end:37 p17 input.cpp /^const enum Enum p17();$/;" p typeref:typename:const enum Enum file: end:38 p18 input.cpp /^Enum p18();$/;" p typeref:typename:Enum file: end:39 f00 input.cpp /^void f00()$/;" f typeref:typename:void end:43 f01 input.cpp /^int f01()$/;" f typeref:typename:int end:48 f02 input.cpp /^unsigned int f02()$/;" f typeref:typename:unsigned int end:53 f03 input.cpp /^auto f03() -> int$/;" f typeref:typename:int end:58 f04 input.cpp /^int * f04()$/;" f typeref:typename:int * end:63 f05 input.cpp /^const unsigned long long int & f05()$/;" f typeref:typename:const unsigned long long int & end:69 f06 input.cpp /^static inline int * f06()$/;" f typeref:typename:int * file: end:74 f07 input.cpp /^std::string & f07()$/;" f typeref:typename:std::string & end:80 f08 input.cpp /^std::vector * f08()$/;" f typeref:typename:std::vector * end:85 p09 input.cpp /^auto p09() -> std::vector ***$/;" f typeref:typename:std::vector *** end:90 f10 input.cpp /^auto f10() -> std::string$/;" f typeref:typename:std::string end:96 f11 input.cpp /^auto f11() -> int (*)(int)$/;" f typeref:typename:int (*)(int) end:101 f13 input.cpp /^template std::vector * f13()$/;" f typeref:typename:std::vector * end:106 template: f14 input.cpp /^template auto f14() -> std::vector *$/;" f typeref:typename:std::vector * end:111 template: m00 input.cpp /^ void m00();$/;" p class:X typeref:typename:void file: end:116 m01 input.cpp /^ constexpr int m01(){ return 0; };$/;" f class:X typeref:typename:int file: end:117 m02 input.cpp /^ unsigned int m02();$/;" p class:X typeref:typename:unsigned int file: end:118 m03 input.cpp /^ static auto m03() -> int;$/;" p class:X typeref:typename:int file: end:119 m04 input.cpp /^ int * m04();$/;" p class:X typeref:typename:int * file: end:120 m05 input.cpp /^ const unsigned long long int & m05();$/;" p class:X typeref:typename:const unsigned long long int & file: end:121 m06 input.cpp /^ static inline int * m06();$/;" p class:X typeref:typename:int * file: end:122 m07 input.cpp /^ virtual std::string & m07();$/;" p class:X typeref:typename:std::string & file: end:123 m08 input.cpp /^ std::vector * m08();$/;" p class:X typeref:typename:std::vector * file: end:124 m09 input.cpp /^ auto m09() -> std::vector ***;$/;" p class:X typeref:typename:std::vector *** file: end:125 m10 input.cpp /^ virtual auto m10() const -> std::string;$/;" p class:X typeref:typename:std::string file: end:126 m11 input.cpp /^ virtual auto m11() const -> int (*)(int);$/;" p class:X typeref:typename:int (*)(int) file: end:127 ================================================ FILE: Units/parser-cxx.r/function-return-types.d/input.cpp ================================================ #include #include struct Struct { }; enum Enum { }; class Class { }; union Union { }; void p00(); int p01(); unsigned int p02(); auto p03() -> int; int * p04(); const unsigned long long int & p05(); static inline int * p06(); std::string & p07(); std::vector * p08(); auto p09() -> std::vector ***; auto p10() -> std::string; auto p11() -> int (*)(int); struct Struct p12(); Struct p13(); union Union p14(); Union p15(); class Class * p15p(); Class & p16(); const enum Enum p17(); Enum p18(); void f00() { } int f01() { return 0; } unsigned int f02() { return 0; } auto f03() -> int { return 0; } int * f04() { return 0; } const unsigned long long int & f05() { unsigned long long int x; return x; } static inline int * f06() { return 0; } std::string & f07() { std::string x; return x; } std::vector * f08() { return 0; } auto p09() -> std::vector *** { return 0; } auto f10() -> std::string { std::string x; return x; } auto f11() -> int (*)(int) { return 0; } template std::vector * f13() { return 0; } template auto f14() -> std::vector * { return 0; } class X { public: void m00(); constexpr int m01(){ return 0; }; unsigned int m02(); static auto m03() -> int; int * m04(); const unsigned long long int & m05(); static inline int * m06(); virtual std::string & m07(); std::vector * m08(); auto m09() -> std::vector ***; virtual auto m10() const -> std::string; virtual auto m11() const -> int (*)(int); }; ================================================ FILE: Units/parser-cxx.r/function_try_block.d/args.ctags ================================================ --kinds-c++=+pflz --fields=+SsKe --fields-c++=+{captures}+{properties} --sort=no ================================================ FILE: Units/parser-cxx.r/function_try_block.d/expected.tags ================================================ S input.cxx /^struct S {$/;" struct file: end:11 m input.cxx /^ std::string m;$/;" member struct:S typeref:typename:std::string file: end:5 S input.cxx /^ S(const std::string& arg) try : m(arg, 100) {$/;" function struct:S file: signature:(const std::string & arg) end:10 properties:fntryblock arg input.cxx /^ S(const std::string& arg) try : m(arg, 100) {$/;" parameter function:S::S typeref:typename:const std::string & file: e input.cxx /^ } catch(const std::exception& e) {$/;" local function:S::S typeref:typename:const std::exception & file: end:8 f input.cxx /^int f(int n = 2) try {$/;" function typeref:typename:int signature:(int n=2) end:20 properties:fntryblock n input.cxx /^int f(int n = 2) try {$/;" parameter function:f typeref:typename:int file: f2 input.cxx /^int f2() try {$/;" function typeref:typename:int signature:() end:28 properties:fntryblock f2v1 input.cxx /^} catch(SomeKindOfException &f2v1)$/;" local function:f2 typeref:typename:SomeKindOfException & file: end:23 f2v2 input.cxx /^} catch(SomeOtherKindOfException &f2v2)$/;" local function:f2 typeref:typename:SomeOtherKindOfException & file: end:25 f3 input.cxx /^int f3()$/;" function typeref:typename:int signature:() end:38 f3v1 input.cxx /^ int f3v1 = 10;$/;" local function:f3 typeref:typename:int file: end:34 f3v2 input.cxx /^ } catch(std::exception & f3v2)$/;" local function:f3 typeref:typename:std::exception & file: end:35 f4 input.cxx /^auto f4() -> void try {$/;" function typeref:typename:void try signature:() end:43 properties:fntryblock ================================================ FILE: Units/parser-cxx.r/function_try_block.d/input.cxx ================================================ /* Taken from * http://en.cppreference.com/w/cpp/language/function-try-block */ struct S { std::string m; S(const std::string& arg) try : m(arg, 100) { std::cout << "constructed, mn = " << m << '\n'; } catch(const std::exception& e) { std::cerr << "arg=" << arg << " failed: " << e.what() << '\n'; } // implicit throw; here }; int f(int n = 2) try { ++n; // increments the function parameter throw n; } catch(...) { ++n; // n is in scope and still refers to the function parameter assert(n == 4); return n; } int f2() try { } catch(SomeKindOfException &f2v1) { } catch(SomeOtherKindOfException &f2v2) { } catch(...) { } int f3() { // This is NOT a function-try-block try { int f3v1 = 10; } catch(std::exception & f3v2) { } } auto f4() -> void try { } catch(...) { } ================================================ FILE: Units/parser-cxx.r/functions.cpp.d/args.ctags ================================================ --kinds-c++=pfz --fields=+Se ================================================ FILE: Units/parser-cxx.r/functions.cpp.d/expected.tags ================================================ f01 input.cpp /^int f01(int f01a01,int f01a02)$/;" f typeref:typename:int signature:(int f01a01,int f01a02) end:34 f01a01 input.cpp /^int f01(int f01a01,int f01a02)$/;" z function:f01 typeref:typename:int file: f01a02 input.cpp /^int f01(int f01a01,int f01a02)$/;" z function:f01 typeref:typename:int file: f02 input.cpp /^unsigned short int * f02(unsigned int & f02a01,...)$/;" f typeref:typename:unsigned short int * signature:(unsigned int & f02a01,...) end:39 f02a01 input.cpp /^unsigned short int * f02(unsigned int & f02a01,...)$/;" z function:f02 typeref:typename:unsigned int & file: f03 input.cpp /^auto f03(const int & f03a01,void * f03a02) -> const int &$/;" f typeref:typename:const int & signature:(const int & f03a01,void * f03a02) end:44 f03a01 input.cpp /^auto f03(const int & f03a01,void * f03a02) -> const int &$/;" z function:f03 typeref:typename:const int & file: f03a02 input.cpp /^auto f03(const int & f03a01,void * f03a02) -> const int &$/;" z function:f03 typeref:typename:void * file: f04 input.cpp /^auto f04() -> int (*)(int)$/;" f typeref:typename:int (*)(int) signature:() end:49 f05 input.cpp /^static inline std::string f05(const int *** f05a01)$/;" f typeref:typename:std::string file: signature:(const int *** f05a01) end:54 f05a01 input.cpp /^static inline std::string f05(const int *** f05a01)$/;" z function:f05 typeref:typename:const int *** file: f06 input.cpp /^ auto f06(n01::c01 && f06a01) -> type01 *;$/;" p namespace:n01::n02 typeref:typename:type01 * file: signature:(n01::c01 && f06a01) end:15 f06 input.cpp /^auto n01::n02::f06(n01::c01 && f06a01) -> n01::n02::type01 *$/;" f class:n01::n02 typeref:typename:n01::n02::type01 * signature:(n01::c01 && f06a01) end:59 f06a01 input.cpp /^ auto f06(n01::c01 && f06a01) -> type01 *;$/;" z prototype:n01::n02::f06 typeref:typename:n01::c01 && file: f06a01 input.cpp /^auto n01::n02::f06(n01::c01 && f06a01) -> n01::n02::type01 *$/;" z function:n01::n02::f06 typeref:typename:n01::c01 && file: f07 input.cpp /^unsigned int f07(int (*f07a01)(int * x1,int x2),...)$/;" f typeref:typename:unsigned int signature:(int (* f07a01)(int * x1,int x2),...) end:64 f07a01 input.cpp /^unsigned int f07(int (*f07a01)(int * x1,int x2),...)$/;" z function:f07 typeref:typename:int (*)(int * x1,int x2) file: f08 input.cpp /^void (*f08(void (*)(int *f08a01)))(int *)$/;" f typeref:typename:void (*)(int *) signature:(void (*)(int * f08a01)) end:69 f08a01 input.cpp /^void (*f08(void (*)(int *f08a01)))(int *)$/;" z function:f08 typeref:typename:void (*)(int *) file: f09 input.cpp /^int f09(char *((*f09a01)()))$/;" f typeref:typename:int signature:(char * ((* f09a01)())) end:74 f09a01 input.cpp /^int f09(char *((*f09a01)()))$/;" z function:f09 typeref:typename:char * ((*)()) file: f10 input.cpp /^int f10(int f10a01,int f10a02[],int f10a03[2][3],int (f10a04)[],int (f10a05)[][5])$/;" f typeref:typename:int signature:(int f10a01,int f10a02[],int f10a03[2][3],int (f10a04)[],int (f10a05)[][5]) end:79 f10a01 input.cpp /^int f10(int f10a01,int f10a02[],int f10a03[2][3],int (f10a04)[],int (f10a05)[][5])$/;" z function:f10 typeref:typename:int file: f10a02 input.cpp /^int f10(int f10a01,int f10a02[],int f10a03[2][3],int (f10a04)[],int (f10a05)[][5])$/;" z function:f10 typeref:typename:int[] file: f10a03 input.cpp /^int f10(int f10a01,int f10a02[],int f10a03[2][3],int (f10a04)[],int (f10a05)[][5])$/;" z function:f10 typeref:typename:int[2][3] file: f10a04 input.cpp /^int f10(int f10a01,int f10a02[],int f10a03[2][3],int (f10a04)[],int (f10a05)[][5])$/;" z function:f10 typeref:typename:int ()[] file: f10a05 input.cpp /^int f10(int f10a01,int f10a02[],int f10a03[2][3],int (f10a04)[],int (f10a05)[][5])$/;" z function:f10 typeref:typename:int ()[][5] file: p01 input.cpp /^int p01(int p01a01,int p01a02);$/;" p typeref:typename:int file: signature:(int p01a01,int p01a02) end:21 p01a01 input.cpp /^int p01(int p01a01,int p01a02);$/;" z prototype:p01 typeref:typename:int file: p01a02 input.cpp /^int p01(int p01a01,int p01a02);$/;" z prototype:p01 typeref:typename:int file: p02 input.cpp /^unsigned short int * p02(unsigned int & p02a01,...);$/;" p typeref:typename:unsigned short int * file: signature:(unsigned int & p02a01,...) end:22 p02a01 input.cpp /^unsigned short int * p02(unsigned int & p02a01,...);$/;" z prototype:p02 typeref:typename:unsigned int & file: p03 input.cpp /^auto p03(const int & p03a01,void * p03a02) -> const int &;$/;" p typeref:typename:const int & file: signature:(const int & p03a01,void * p03a02) end:23 p03a01 input.cpp /^auto p03(const int & p03a01,void * p03a02) -> const int &;$/;" z prototype:p03 typeref:typename:const int & file: p03a02 input.cpp /^auto p03(const int & p03a01,void * p03a02) -> const int &;$/;" z prototype:p03 typeref:typename:void * file: p04 input.cpp /^auto p04() -> int (*)(int);$/;" p typeref:typename:int (*)(int) file: signature:() end:24 p05 input.cpp /^static std::string p05(const int *** p05a01);$/;" p typeref:typename:std::string file: signature:(const int *** p05a01) end:25 p05a01 input.cpp /^static std::string p05(const int *** p05a01);$/;" z prototype:p05 typeref:typename:const int *** file: p06 input.cpp /^ auto p06(n01::c01 && p06a01) -> type01 *;$/;" p namespace:n01::n02 typeref:typename:type01 * file: signature:(n01::c01 && p06a01) end:16 p06 input.cpp /^auto n01::n02::p06(n01::c01 && p06a01) -> n01::n02::type01 *;$/;" p class:n01::n02 typeref:typename:n01::n02::type01 * file: signature:(n01::c01 && p06a01) end:26 p06a01 input.cpp /^ auto p06(n01::c01 && p06a01) -> type01 *;$/;" z prototype:n01::n02::p06 typeref:typename:n01::c01 && file: p06a01 input.cpp /^auto n01::n02::p06(n01::c01 && p06a01) -> n01::n02::type01 *;$/;" z prototype:n01::n02::p06 typeref:typename:n01::c01 && file: p07 input.cpp /^unsigned int p07(int (*p07a01)(int * x1,int x2),...);$/;" p typeref:typename:unsigned int file: signature:(int (* p07a01)(int * x1,int x2),...) end:27 p07a01 input.cpp /^unsigned int p07(int (*p07a01)(int * x1,int x2),...);$/;" z prototype:p07 typeref:typename:int (*)(int * x1,int x2) file: p08 input.cpp /^void (*p08(void (*)(int *p08a01)))(int *);$/;" p typeref:typename:void (*)(int *) file: signature:(void (*)(int * p08a01)) end:28 p08a01 input.cpp /^void (*p08(void (*)(int *p08a01)))(int *);$/;" z prototype:p08 typeref:typename:void (*)(int *) file: t01 input.cpp /^template std::unique_ptr t01(T && t01a01)$/;" f typeref:typename:std::unique_ptr signature:(T && t01a01) end:85 t01a01 input.cpp /^template std::unique_ptr t01(T && t01a01)$/;" z function:t01 typeref:typename:T && file: t02 input.cpp /^template auto t02(T && t02a01) -> std::unique_ptr$/;" f typeref:typename:std::unique_ptr signature:(T && t02a01) end:94 t02a01 input.cpp /^template auto t02(T && t02a01) -> std::unique_ptr$/;" z function:t02 typeref:typename:T && file: ================================================ FILE: Units/parser-cxx.r/functions.cpp.d/input.cpp ================================================ #include #include namespace n01 { class c01 { }; namespace n02 { typedef unsigned int type01; // These declarations are required by C++ standard for the ones below to compile properly auto f06(n01::c01 && f06a01) -> type01 *; auto p06(n01::c01 && p06a01) -> type01 *; } }; // Valid function prototypes int p01(int p01a01,int p01a02); unsigned short int * p02(unsigned int & p02a01,...); auto p03(const int & p03a01,void * p03a02) -> const int &; auto p04() -> int (*)(int); static std::string p05(const int *** p05a01); auto n01::n02::p06(n01::c01 && p06a01) -> n01::n02::type01 *; unsigned int p07(int (*p07a01)(int * x1,int x2),...); void (*p08(void (*)(int *p08a01)))(int *); // Valid function declarations int f01(int f01a01,int f01a02) { return 0; } unsigned short int * f02(unsigned int & f02a01,...) { return 0; } auto f03(const int & f03a01,void * f03a02) -> const int & { return 0; } auto f04() -> int (*)(int) { return 0; } static inline std::string f05(const int *** f05a01) { return std::string(); } auto n01::n02::f06(n01::c01 && f06a01) -> n01::n02::type01 * { return 0; } unsigned int f07(int (*f07a01)(int * x1,int x2),...) { return 0; } void (*f08(void (*)(int *f08a01)))(int *) { return 0; } int f09(char *((*f09a01)())) { return 0; } int f10(int f10a01,int f10a02[],int f10a03[2][3],int (f10a04)[],int (f10a05)[][5]) { return 0; } // Valid function templates template std::unique_ptr t01(T && t01a01) { return std::unique_ptr(NULL); } #define MACRO_TEXT "" template auto t02(T && t02a01) -> std::unique_ptr { // throw may look like a prototype, but it isn't throw std::string(MACRO_TEXT); return std::unique_ptr(NULL); } // Things that might look similar to function prototypes but are NOT function prototypes (but still valid C++) std::string x01("test"); #if NOTVALIDCPP // This is not really valid C++ because it appears in the wrong context. // However we simulate the parser being wrong about the current state (it happens). // This should be NOT marked as a prototype even if found out of a function. throw std::string(MACRO_TEXT); #endif ================================================ FILE: Units/parser-cxx.r/ignoring-macro-with-parameters.d/args.ctags ================================================ -I _GLIBCXX_VISIBILITY+ -I _MY_INT=int ================================================ FILE: Units/parser-cxx.r/ignoring-macro-with-parameters.d/expected.tags ================================================ foo input.hxx /^namespace foo _GLIBCXX_VISIBILITY(default)$/;" n x input.hxx /^ int x;$/;" v namespace:foo typeref:typename:int y input.hxx /^ _MY_INT y;$/;" v namespace:foo typeref:typename:int ================================================ FILE: Units/parser-cxx.r/ignoring-macro-with-parameters.d/input.hxx ================================================ namespace foo _GLIBCXX_VISIBILITY(default) { int x; _MY_INT y; } ================================================ FILE: Units/parser-cxx.r/import-4.d/README.md ================================================ https://en.cppreference.com/w/cpp/language/modules export(optional) import module-name attr (optional) ; (4) ================================================ FILE: Units/parser-cxx.r/import-4.d/args.ctags ================================================ --sort=no --extras=+rq --fields=+r --fields-C++=+{properties} ================================================ FILE: Units/parser-cxx.r/import-4.d/expected.tags ================================================ X input.cpp /^import X [[something]];$/;" M roles:imported import input.cpp /^int import;$/;" v typeref:typename:int roles:def X.Y input-0.cpp /^import X.Y [[something]];$/;" M roles:imported X input-2.cpp /^export import X [[something]];$/;" M roles:imported properties:export X.Y input-3.cpp /^export import X.Y [[something]];$/;" M roles:imported properties:export ================================================ FILE: Units/parser-cxx.r/import-4.d/input-0.cpp ================================================ import X.Y [[something]]; ================================================ FILE: Units/parser-cxx.r/import-4.d/input-1.cpp ================================================ import; // broken input ================================================ FILE: Units/parser-cxx.r/import-4.d/input-2.cpp ================================================ export import X [[something]]; ================================================ FILE: Units/parser-cxx.r/import-4.d/input-3.cpp ================================================ export import X.Y [[something]]; ================================================ FILE: Units/parser-cxx.r/import-4.d/input-4.cpp ================================================ export import; // broken input ================================================ FILE: Units/parser-cxx.r/import-4.d/input-5.cpp ================================================ import // broken input ================================================ FILE: Units/parser-cxx.r/import-4.d/input-6.cpp ================================================ export import ================================================ FILE: Units/parser-cxx.r/import-4.d/input.cpp ================================================ import X [[something]]; int import; ================================================ FILE: Units/parser-cxx.r/import-5.d/README.md ================================================ https://en.cppreference.com/w/cpp/language/modules export(optional) import module-partition attr (optional) ; (5) ================================================ FILE: Units/parser-cxx.r/import-5.d/args.ctags ================================================ --sort=no --extras=+rq --fields=+r --fields-C++=+{properties} ================================================ FILE: Units/parser-cxx.r/import-5.d/expected.tags ================================================ X input.cpp /^import X:P [[something]];$/;" M roles:partOwner P input.cpp /^import X:P [[something]];$/;" P module:X roles:imported X:P input.cpp /^import X:P [[something]];$/;" P module:X roles:imported X.Y input-0.cpp /^import X.Y:P [[something]];$/;" M roles:partOwner P input-0.cpp /^import X.Y:P [[something]];$/;" P module:X.Y roles:imported X.Y:P input-0.cpp /^import X.Y:P [[something]];$/;" P module:X.Y roles:imported X input-1.cpp /^import X:P.Q [[something]];$/;" M roles:partOwner P.Q input-1.cpp /^import X:P.Q [[something]];$/;" P module:X roles:imported X:P.Q input-1.cpp /^import X:P.Q [[something]];$/;" P module:X roles:imported X.Y input-2.cpp /^import X.Y:P.Q [[something]];$/;" M roles:partOwner P.Q input-2.cpp /^import X.Y:P.Q [[something]];$/;" P module:X.Y roles:imported X.Y:P.Q input-2.cpp /^import X.Y:P.Q [[something]];$/;" P module:X.Y roles:imported X input-3.cpp /^export import X:P [[something]];$/;" M roles:partOwner P input-3.cpp /^export import X:P [[something]];$/;" P module:X roles:imported properties:export X:P input-3.cpp /^export import X:P [[something]];$/;" P module:X roles:imported properties:export X.Y input-4.cpp /^export import X.Y:P [[something]];$/;" M roles:partOwner P input-4.cpp /^export import X.Y:P [[something]];$/;" P module:X.Y roles:imported properties:export X.Y:P input-4.cpp /^export import X.Y:P [[something]];$/;" P module:X.Y roles:imported properties:export X input-5.cpp /^export import X:P.Q [[something]];$/;" M roles:partOwner P.Q input-5.cpp /^export import X:P.Q [[something]];$/;" P module:X roles:imported properties:export X:P.Q input-5.cpp /^export import X:P.Q [[something]];$/;" P module:X roles:imported properties:export X input-6.cpp /^export import X:P.Q [[something]];$/;" M roles:partOwner P.Q input-6.cpp /^export import X:P.Q [[something]];$/;" P module:X roles:imported properties:export X:P.Q input-6.cpp /^export import X:P.Q [[something]];$/;" P module:X roles:imported properties:export A input-7.cpp /^export module A; \/\/ primary module interface unit$/;" M roles:def properties:export B input-7.cpp /^export import :B; \/\/ Hello() is visible when importing 'A'.$/;" P module:A roles:imported properties:export A:B input-7.cpp /^export import :B; \/\/ Hello() is visible when importing 'A'.$/;" P module:A roles:imported properties:export C input-7.cpp /^import :C; \/\/ WorldImpl() is now visible only for 'A.cpp'.$/;" P module:A roles:imported A:C input-7.cpp /^import :C; \/\/ WorldImpl() is now visible only for 'A.cpp'.$/;" P module:A roles:imported World input-7.cpp /^export char const* World()$/;" f typeref:typename:char const * roles:def properties:export ================================================ FILE: Units/parser-cxx.r/import-5.d/input-0.cpp ================================================ import X.Y:P [[something]]; ================================================ FILE: Units/parser-cxx.r/import-5.d/input-1.cpp ================================================ import X:P.Q [[something]]; ================================================ FILE: Units/parser-cxx.r/import-5.d/input-2.cpp ================================================ import X.Y:P.Q [[something]]; ================================================ FILE: Units/parser-cxx.r/import-5.d/input-3.cpp ================================================ export import X:P [[something]]; ================================================ FILE: Units/parser-cxx.r/import-5.d/input-4.cpp ================================================ export import X.Y:P [[something]]; ================================================ FILE: Units/parser-cxx.r/import-5.d/input-5.cpp ================================================ export import X:P.Q [[something]]; ================================================ FILE: Units/parser-cxx.r/import-5.d/input-6.cpp ================================================ export import X:P.Q [[something]]; ================================================ FILE: Units/parser-cxx.r/import-5.d/input-7.cpp ================================================ // Taken from https://en.cppreference.com/w/cpp/language/modules /////// A.cpp export module A; // primary module interface unit export import :B; // Hello() is visible when importing 'A'. import :C; // WorldImpl() is now visible only for 'A.cpp'. // export import :C; // ERROR: Cannot export a module implementation unit. // World() is visible by any translation unit importing 'A'. export char const* World() { return WorldImpl(); } ================================================ FILE: Units/parser-cxx.r/import-5.d/input.cpp ================================================ import X:P [[something]]; ================================================ FILE: Units/parser-cxx.r/import-6.d/README.md ================================================ https://en.cppreference.com/w/cpp/language/modules export(optional) import header-name attr (optional) ; (6) ================================================ FILE: Units/parser-cxx.r/import-6.d/args.ctags ================================================ --sort=no --extras=+rq --fields=+r --fields-C++=+{properties} ================================================ FILE: Units/parser-cxx.r/import-6.d/expected.tags ================================================ a.h input.cpp /^import [[something]];$/;" h roles:system,imported b.h input-0.cpp /^import "b.h" [[something]];$/;" h roles:local,imported a.h input-1.cpp /^export import [[something]];$/;" h roles:system,imported,exported b.h input-2.cpp /^export import "b.h" [[something]];$/;" h roles:local,imported,exported ================================================ FILE: Units/parser-cxx.r/import-6.d/input-0.cpp ================================================ import "b.h" [[something]]; ================================================ FILE: Units/parser-cxx.r/import-6.d/input-1.cpp ================================================ export import [[something]]; ================================================ FILE: Units/parser-cxx.r/import-6.d/input-2.cpp ================================================ export import "b.h" [[something]]; ================================================ FILE: Units/parser-cxx.r/import-6.d/input.cpp ================================================ import [[something]]; ================================================ FILE: Units/parser-cxx.r/initializer-list.d/args.ctags ================================================ --sort=no --langmap=c:.h.c --kinds-C++=+lz --kinds-C=+lz ================================================ FILE: Units/parser-cxx.r/initializer-list.d/expected.tags ================================================ cs input.h /^struct cs {$/;" s i input.h /^ int i;$/;" m struct:cs typeref:typename:int fs input.h /^} fs(int x) { struct cs d = {.i = x}; return d;};$/;" f typeref:struct:cs x input.h /^} fs(int x) { struct cs d = {.i = x}; return d;};$/;" z function:fs typeref:typename:int file: d input.h /^} fs(int x) { struct cs d = {.i = x}; return d;};$/;" l function:fs typeref:struct:cs file: ce input.h /^enum ce {$/;" g X input.h /^ X,$/;" e enum:ce fe input.h /^} fe(void) { return X; }$/;" f typeref:enum:ce main input-0.cpp /^int main()$/;" f typeref:typename:int a0 input-0.cpp /^ std::vector a0 {1, 2, 30};$/;" l function:main typeref:typename:std::vector file: a1 input-0.cpp /^ std::vector a1 {1};$/;" l function:main typeref:typename:std::vector file: a2 input-0.cpp /^ std::vector a2 = {1, 2, 30};$/;" l function:main typeref:typename:std::vector file: a3 input-0.cpp /^ std::vector a3 = {1};$/;" l function:main typeref:typename:std::vector file: a4 input-0.cpp /^ std::vector a4 = {1}, a5 = {1};$/;" l function:main typeref:typename:std::vector file: a5 input-0.cpp /^ std::vector a4 = {1}, a5 = {1};$/;" l function:main typeref:typename:std::vector file: a6 input-0.cpp /^ std::vector a6 = {1}, a7 {1};$/;" l function:main typeref:typename:std::vector file: a7 input-0.cpp /^ std::vector a6 = {1}, a7 {1};$/;" l function:main typeref:typename:std::vector file: a8 input-0.cpp /^ std::vector a8 {1}, a9 = {1};$/;" l function:main typeref:typename:std::vector file: a9 input-0.cpp /^ std::vector a8 {1}, a9 = {1};$/;" l function:main typeref:typename:std::vector file: b input-1.cpp /^int b()$/;" f typeref:typename:int b0 input-1.cpp /^ std::vector b0 {1, 2, 30}, b1 {1};$/;" l function:b typeref:typename:std::vector file: b1 input-1.cpp /^ std::vector b0 {1, 2, 30}, b1 {1};$/;" l function:b typeref:typename:std::vector file: b2 input-1.cpp /^ std::vector b2 = {1, 2, 30}, b3 = {1};$/;" l function:b typeref:typename:std::vector file: b3 input-1.cpp /^ std::vector b2 = {1, 2, 30}, b3 = {1};$/;" l function:b typeref:typename:std::vector file: c input-2.cpp /^int c()$/;" f typeref:typename:int c0 input-2.cpp /^ std::vector c0 {1, 2, 30}, c1 {1}, c2 = {1, 2, 30}, c3 = {1};$/;" l function:c typeref:typename:std::vector file: c1 input-2.cpp /^ std::vector c0 {1, 2, 30}, c1 {1}, c2 = {1, 2, 30}, c3 = {1};$/;" l function:c typeref:typename:std::vector file: c2 input-2.cpp /^ std::vector c0 {1, 2, 30}, c1 {1}, c2 = {1, 2, 30}, c3 = {1};$/;" l function:c typeref:typename:std::vector file: c3 input-2.cpp /^ std::vector c0 {1, 2, 30}, c1 {1}, c2 = {1, 2, 30}, c3 = {1};$/;" l function:c typeref:typename:std::vector file: d input-3.cpp /^int d()$/;" f typeref:typename:int D input-3.cpp /^ class D {$/;" c function:d file: i input-3.cpp /^ int i;$/;" m class:d::D typeref:typename:int file: D input-3.cpp /^ D( int j,...):i(j){}$/;" f class:d::D file: j input-3.cpp /^ D( int j,...):i(j){}$/;" z function:d::D::D typeref:typename:int file: f input-3.cpp /^ int f(){ return i; }$/;" f class:d::D typeref:typename:int file: dx input-3.cpp /^ } dx{1};$/;" l function:d typeref:class:d::D file: E input-3.cpp /^ class E {$/;" c function:d file: j input-3.cpp /^ int j;$/;" m class:d::E typeref:typename:int file: E input-3.cpp /^ E( int k,...):j(k){}$/;" f class:d::E file: k input-3.cpp /^ E( int k,...):j(k){}$/;" z function:d::E::E typeref:typename:int file: f input-3.cpp /^ int f(){ return j; }$/;" f class:d::E typeref:typename:int file: e0 input-3.cpp /^ } e0 {1, 2, 30}, e1 {1}, e2 = {1, 2, 30}, e3 = {1};$/;" l function:d typeref:class:d::E file: e1 input-3.cpp /^ } e0 {1, 2, 30}, e1 {1}, e2 = {1, 2, 30}, e3 = {1};$/;" l function:d typeref:class:d::E file: e2 input-3.cpp /^ } e0 {1, 2, 30}, e1 {1}, e2 = {1, 2, 30}, e3 = {1};$/;" l function:d typeref:class:d::E file: e3 input-3.cpp /^ } e0 {1, 2, 30}, e1 {1}, e2 = {1, 2, 30}, e3 = {1};$/;" l function:d typeref:class:d::E file: c input-4.cpp /^enum c {$/;" g file: X input-4.cpp /^ X, Y$/;" e enum:c file: Y input-4.cpp /^ X, Y$/;" e enum:c file: c0 input-4.cpp /^} c0{X}, c1{Y};$/;" v typeref:enum:c c1 input-4.cpp /^} c0{X}, c1{Y};$/;" v typeref:enum:c ================================================ FILE: Units/parser-cxx.r/initializer-list.d/input-0.cpp ================================================ #include int main() { std::vector a0 {1, 2, 30}; std::vector a1 {1}; std::vector a2 = {1, 2, 30}; std::vector a3 = {1}; std::vector a4 = {1}, a5 = {1}; std::vector a6 = {1}, a7 {1}; std::vector a8 {1}, a9 = {1}; return 0; } ================================================ FILE: Units/parser-cxx.r/initializer-list.d/input-1.cpp ================================================ #include int b() { std::vector b0 {1, 2, 30}, b1 {1}; std::vector b2 = {1, 2, 30}, b3 = {1}; return 0; } ================================================ FILE: Units/parser-cxx.r/initializer-list.d/input-2.cpp ================================================ #include int c() { std::vector c0 {1, 2, 30}, c1 {1}, c2 = {1, 2, 30}, c3 = {1}; return 0; } ================================================ FILE: Units/parser-cxx.r/initializer-list.d/input-3.cpp ================================================ int d() { class D { int i; public: D( int j,...):i(j){} int f(){ return i; } } dx{1}; class E { int j; public: E( int k,...):j(k){} int f(){ return j; } } e0 {1, 2, 30}, e1 {1}, e2 = {1, 2, 30}, e3 = {1}; return 0; } ================================================ FILE: Units/parser-cxx.r/initializer-list.d/input-4.cpp ================================================ enum c { X, Y } c0{X}, c1{Y}; ================================================ FILE: Units/parser-cxx.r/initializer-list.d/input.h ================================================ struct cs { int i; } fs(int x) { struct cs d = {.i = x}; return d;}; enum ce { X, } fe(void) { return X; } ================================================ FILE: Units/parser-cxx.r/initializer-list.d/validator ================================================ c ================================================ FILE: Units/parser-cxx.r/initializer-list.d/validator-0 ================================================ cxx17 ================================================ FILE: Units/parser-cxx.r/initializer-list.d/validator-1 ================================================ cxx17 ================================================ FILE: Units/parser-cxx.r/initializer-list.d/validator-2 ================================================ cxx17 ================================================ FILE: Units/parser-cxx.r/initializer-list.d/validator-3 ================================================ cxx11 ================================================ FILE: Units/parser-cxx.r/initializer-list.d/validator-4 ================================================ cxx11 ================================================ FILE: Units/parser-cxx.r/inline-variables.cpp.d/args.ctags ================================================ --kinds-c++=vm --fields-c++=+{properties} ================================================ FILE: Units/parser-cxx.r/inline-variables.cpp.d/expected.tags ================================================ gv1 input.cpp /^static inline int gv1;$/;" v typeref:typename:int file: properties:inline,static gv2 input.cpp /^inline int gv2;$/;" v typeref:typename:int properties:inline var1 input.cpp /^ static inline int var1;$/;" m class:C1 typeref:typename:int file: properties:inline,static var2 input.cpp /^ inline int var2;$/;" m class:C1 typeref:typename:int file: properties:inline ================================================ FILE: Units/parser-cxx.r/inline-variables.cpp.d/input.cpp ================================================ class C1 { public: static inline int var1; inline int var2; inline void fn(){}; }; static inline int gv1; inline int gv2; ================================================ FILE: Units/parser-cxx.r/instantiation.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-cxx.r/instantiation.d/expected.tags ================================================ X input.hpp /^template struct X { };$/;" s Y input.hpp /^template struct Y { };$/;" s M input.hpp /^#define M /;" d S input.hpp /^struct S {$/;" s i input.hpp /^ int i;$/;" m struct:S typeref:typename:int y input.hpp /^ Y<0> y;$/;" m struct:S typeref:typename:Y<0> x0 input.hpp /^ X< Y< 1 > > x0;$/;" m struct:S typeref:typename:X> x1 input.hpp /^ X< Y< 1 + 2 > > x1;$/;" m struct:S typeref:typename:X> x2 input.hpp /^ X< Y< 1 << 2 > > x2;$/;" m struct:S typeref:typename:X> x3 input.hpp /^ X< Y< M << 2 > > x3;$/;" m struct:S typeref:typename:X> x4 input.hpp /^ X< Y< M << M > > x4;$/;" m struct:S typeref:typename:X> d input.hpp /^ double d;$/;" m struct:S typeref:typename:double ================================================ FILE: Units/parser-cxx.r/instantiation.d/input.hpp ================================================ // Based on an example in https://cpplover.blogspot.com/2013/12/c03c11_3905.html (in Japanese) template struct X { }; template struct Y { }; #define M 2 struct S { int i; Y<0> y; X< Y< 1 > > x0; X< Y< 1 + 2 > > x1; X< Y< 1 << 2 > > x2; X< Y< M << 2 > > x3; X< Y< M << M > > x4; double d; }; ================================================ FILE: Units/parser-cxx.r/instantiation.d/validator ================================================ cxx11 ================================================ FILE: Units/parser-cxx.r/instantiation2.b/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-cxx.r/instantiation2.b/expected.tags ================================================ X input.hpp /^template struct X { };$/;" s Y input.hpp /^template struct Y { };$/;" s M input.hpp /^#define M /;" d S input.hpp /^struct S {$/;" s i input.hpp /^ int i;$/;" m struct:S typeref:typename:int x2 input.hpp /^ X< Y< 1 >> 2 > > x2;$/;" m struct:S typeref:typename:X>2>> x3 input.hpp /^ X< Y< M >> 2 > > x3;$/;" m struct:S typeref:typename:X>2>> x4 input.hpp /^ X< Y< M >> M > > x4;$/;" m struct:S typeref:typename:X>M>> x5 input.hpp /^ X< Y< 1 < 2 > > x5;$/;" m struct:S typeref:typename:X> x6 input.hpp /^ X< Y< M < 2 > > x6;$/;" m struct:S typeref:typename:X> x7 input.hpp /^ X< Y< M < M > > x7;$/;" m struct:S typeref:typename:X> d input.hpp /^ double d;$/;" m struct:S typeref:typename:double ================================================ FILE: Units/parser-cxx.r/instantiation2.b/input.hpp ================================================ // Based on an example in https://cpplover.blogspot.com/2013/12/c03c11_3905.html (in Japanese) // A C++03 compiler accept this input but a C++11 compiler does not. template struct X { }; template struct Y { }; #define M 2 struct S { int i; X< Y< 1 >> 2 > > x2; X< Y< M >> 2 > > x3; X< Y< M >> M > > x4; X< Y< 1 < 2 > > x5; X< Y< M < 2 > > x6; X< Y< M < M > > x7; /* Too ambiguous even in C++03 --------------------------- X< Y< 1 > 2 > > x8; X< Y< M > 2 > > x9; X< Y< M > M > > xa; */ double d; }; ================================================ FILE: Units/parser-cxx.r/instantiation2.b/validator ================================================ cxx03 ================================================ FILE: Units/parser-cxx.r/iostream.d/args.ctags ================================================ --kinds-c++=+l ================================================ FILE: Units/parser-cxx.r/iostream.d/expected.tags ================================================ foo input.cpp /^void foo (int &x, int y, int z)$/;" f typeref:typename:void ================================================ FILE: Units/parser-cxx.r/iostream.d/input.cpp ================================================ #include void foo (int &x, int y, int z) { std::cin >> x; std::cout << y; std::cout << z << endl; } ================================================ FILE: Units/parser-cxx.r/k-and-r.d/args.ctags ================================================ --kinds-c=* --sort=no ================================================ FILE: Units/parser-cxx.r/k-and-r.d/expected.tags ================================================ f00 input.c /^void f00(a00) int a00; {}$/;" f a00 input.c /^void f00(a00) int a00; {}$/;" z function:f00 typeref:typename:int file: f01 input.c /^void f01(a01) int *a01; {}$/;" f a01 input.c /^void f01(a01) int *a01; {}$/;" z function:f01 typeref:typename:int * file: f10 input.c /^void f10(a10) struct file *a10; {}$/;" f a10 input.c /^void f10(a10) struct file *a10; {}$/;" z function:f10 typeref:struct:file * file: f11 input.c /^void f11(a11, a12) struct file *a11; int a12; {}$/;" f a11 input.c /^void f11(a11, a12) struct file *a11; int a12; {}$/;" z function:f11 typeref:struct:file * file: a12 input.c /^void f11(a11, a12) struct file *a11; int a12; {}$/;" z function:f11 typeref:typename:int file: f12 input.c /^void f12(a13, a14) int a13; struct file *a14; {}$/;" f a13 input.c /^void f12(a13, a14) int a13; struct file *a14; {}$/;" z function:f12 typeref:typename:int file: a14 input.c /^void f12(a13, a14) int a13; struct file *a14; {}$/;" z function:f12 typeref:struct:file * file: f13 input.c /^void f13(a15) register struct file *a15; {}$/;" f a15 input.c /^void f13(a15) register struct file *a15; {}$/;" z function:f13 typeref:typename:register struct file * file: f14 input.c /^void f14(a16, a17) register struct file *a16; int a17; {}$/;" f a16 input.c /^void f14(a16, a17) register struct file *a16; int a17; {}$/;" z function:f14 typeref:typename:register struct file * file: a17 input.c /^void f14(a16, a17) register struct file *a16; int a17; {}$/;" z function:f14 typeref:typename:int file: f15 input.c /^void f15(a18, a19) register int a18; struct file *a19; {}$/;" f a18 input.c /^void f15(a18, a19) register int a18; struct file *a19; {}$/;" z function:f15 typeref:typename:register int file: a19 input.c /^void f15(a18, a19) register int a18; struct file *a19; {}$/;" z function:f15 typeref:struct:file * file: f16 input.c /^void f16(a19_1) const struct file *a19_1; {}$/;" f a19_1 input.c /^void f16(a19_1) const struct file *a19_1; {}$/;" z function:f16 typeref:typename:const struct file * file: f17 input.c /^void f17(a19_2, a19_3) const struct file *a19_2; int a19_3; {}$/;" f a19_2 input.c /^void f17(a19_2, a19_3) const struct file *a19_2; int a19_3; {}$/;" z function:f17 typeref:typename:const struct file * file: a19_3 input.c /^void f17(a19_2, a19_3) const struct file *a19_2; int a19_3; {}$/;" z function:f17 typeref:typename:int file: f18 input.c /^void f18(a19_4, a19_5) const int a19_4; struct file *a19_5; {}$/;" f a19_4 input.c /^void f18(a19_4, a19_5) const int a19_4; struct file *a19_5; {}$/;" z function:f18 typeref:typename:const int file: a19_5 input.c /^void f18(a19_4, a19_5) const int a19_4; struct file *a19_5; {}$/;" z function:f18 typeref:struct:file * file: f20 input.c /^void f20(a20) union file *a20; {}$/;" f a20 input.c /^void f20(a20) union file *a20; {}$/;" z function:f20 typeref:union:file * file: f21 input.c /^void f21(a21, a22) union file *a21; int a22; {}$/;" f a21 input.c /^void f21(a21, a22) union file *a21; int a22; {}$/;" z function:f21 typeref:union:file * file: a22 input.c /^void f21(a21, a22) union file *a21; int a22; {}$/;" z function:f21 typeref:typename:int file: f22 input.c /^void f22(a23, a24) int a23; union file *a24; {}$/;" f a23 input.c /^void f22(a23, a24) int a23; union file *a24; {}$/;" z function:f22 typeref:typename:int file: a24 input.c /^void f22(a23, a24) int a23; union file *a24; {}$/;" z function:f22 typeref:union:file * file: f30 input.c /^void f30(a30) enum file *a30; {}$/;" f a30 input.c /^void f30(a30) enum file *a30; {}$/;" z function:f30 typeref:enum:file * file: f31 input.c /^void f31(a31, a32) enum file *a31; int a32; {}$/;" f a31 input.c /^void f31(a31, a32) enum file *a31; int a32; {}$/;" z function:f31 typeref:enum:file * file: a32 input.c /^void f31(a31, a32) enum file *a31; int a32; {}$/;" z function:f31 typeref:typename:int file: f32 input.c /^void f32(a33, a34) int a33; enum file *a34; {}$/;" f a33 input.c /^void f32(a33, a34) int a33; enum file *a34; {}$/;" z function:f32 typeref:typename:int file: a34 input.c /^void f32(a33, a34) int a33; enum file *a34; {}$/;" z function:f32 typeref:enum:file * file: f40 input.c /^void f40 (a41, a42, a43) struct file a41; union file a42; enum file a43; {}$/;" f a41 input.c /^void f40 (a41, a42, a43) struct file a41; union file a42; enum file a43; {}$/;" z function:f40 typeref:struct:file file: a42 input.c /^void f40 (a41, a42, a43) struct file a41; union file a42; enum file a43; {}$/;" z function:f40 typeref:union:file file: a43 input.c /^void f40 (a41, a42, a43) struct file a41; union file a42; enum file a43; {}$/;" z function:f40 typeref:enum:file file: ================================================ FILE: Units/parser-cxx.r/k-and-r.d/input.c ================================================ void f00(a00) int a00; {} void f01(a01) int *a01; {} /* struct */ void f10(a10) struct file *a10; {} void f11(a11, a12) struct file *a11; int a12; {} void f12(a13, a14) int a13; struct file *a14; {} void f13(a15) register struct file *a15; {} void f14(a16, a17) register struct file *a16; int a17; {} void f15(a18, a19) register int a18; struct file *a19; {} void f16(a19_1) const struct file *a19_1; {} void f17(a19_2, a19_3) const struct file *a19_2; int a19_3; {} void f18(a19_4, a19_5) const int a19_4; struct file *a19_5; {} /* union */ void f20(a20) union file *a20; {} void f21(a21, a22) union file *a21; int a22; {} void f22(a23, a24) int a23; union file *a24; {} /* enum */ void f30(a30) enum file *a30; {} void f31(a31, a32) enum file *a31; int a32; {} void f32(a33, a34) int a33; enum file *a34; {} /* struct union enum */ void f40 (a41, a42, a43) struct file a41; union file a42; enum file a43; {} ================================================ FILE: Units/parser-cxx.r/keyword-in-return-type.d/args.ctags ================================================ --sort=no --kinds-C++=+p ================================================ FILE: Units/parser-cxx.r/keyword-in-return-type.d/expected.tags ================================================ a input.cc /^struct Class0 * a();$/;" p typeref:struct:Class0 * file: b input.cc /^struct Class0 * b() { exit(0); }$/;" f typeref:struct:Class0 * c input.cc /^class Class1 * c();$/;" p typeref:class:Class1 * file: d input.cc /^class Class1 * d() { exit(0); }$/;" f typeref:class:Class1 * e input.cc /^union Class1 * e();$/;" p typeref:union:Class1 * file: f input.cc /^union Class1 * f() { exit(0); }$/;" f typeref:union:Class1 * ================================================ FILE: Units/parser-cxx.r/keyword-in-return-type.d/input.cc ================================================ struct Class0 * a(); struct Class0 * b() { exit(0); } class Class1 * c(); class Class1 * d() { exit(0); } union Class1 * e(); union Class1 * f() { exit(0); } ================================================ FILE: Units/parser-cxx.r/less-than-operator-between-anglebrackets.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-cxx.r/less-than-operator-between-anglebrackets.d/expected.tags ================================================ f0 input.cpp /^template0)> void f0(void) { }$/;" f typeref:typename:void f1 input.cpp /^template void f1(void) { }$/;" f typeref:typename:void f2 input.cpp /^template void f2(void) { }$/;" f typeref:typename:void f3 input.cpp /^template void f3(void) { }$/;" f typeref:typename:void f4 input.cpp /^template> 10)> void f4(void) { }$/;" f typeref:typename:void f5 input.cpp /^template 10)> void f5(void) { }$/;" f typeref:typename:void f6 input.cpp /^template void f6(void) { }$/;" f typeref:typename:void f7 input.cpp /^template= 10)> void f7(void) { }$/;" f typeref:typename:void f8 input.cpp /^template j)> void f8(void) { }$/;" f typeref:typename:void f9 input.cpp /^template j)> void f9(void) { }$/;" f typeref:typename:void f10 input.cpp /^template j)> void f10(void) { }$/;" f typeref:typename:void f11 input.cpp /^template void f11(void) { }$/;" f typeref:typename:void main input.cpp /^int main(void) { return 0; }$/;" f typeref:typename:int ================================================ FILE: Units/parser-cxx.r/less-than-operator-between-anglebrackets.d/input.cpp ================================================ /* "gcc input.cpp -c -std=c++11" accepts this source code. */ template0)> void f0(void) { } template void f1(void) { } template void f2(void) { } template void f3(void) { } template> 10)> void f4(void) { } template 10)> void f5(void) { } template void f6(void) { } template= 10)> void f7(void) { } template j)> void f8(void) { } template j)> void f9(void) { } template j)> void f10(void) { } template void f11(void) { } template class A; int main(void) { return 0; } ================================================ FILE: Units/parser-cxx.r/member-with-initial-value.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-cxx.r/member-with-initial-value.d/expected.tags ================================================ __anon0afffb470108 input.cc /^typedef struct {$/;" s file: i input.cc /^ int i;$/;" m struct:__anon0afffb470108 typeref:typename:int file: S input.cc /^} S;$/;" t typeref:struct:__anon0afffb470108 file: c input.cc /^class c {$/;" c file: a input.cc /^ S a = {0};$/;" m class:c typeref:typename:S file: i input.cc /^ int i;$/;" m class:c typeref:typename:int file: t input.cc /^struct t {$/;" s file: b input.cc /^ S b = {0};$/;" m struct:t typeref:typename:S file: j input.cc /^ int j;$/;" m struct:t typeref:typename:int file: u input.cc /^union u {$/;" u file: c input.cc /^ S c = {0};$/;" m union:u typeref:typename:S file: k input.cc /^ int k;$/;" m union:u typeref:typename:int file: ================================================ FILE: Units/parser-cxx.r/member-with-initial-value.d/input.cc ================================================ typedef struct { int i; } S; class c { S a = {0}; int i; }; struct t { S b = {0}; int j; }; union u { S c = {0}; int k; }; ================================================ FILE: Units/parser-cxx.r/modules-1.d/args.ctags ================================================ --sort=no --fields=+{typeref} --fields-C++=+{properties} --extras=+r --fields=+r ================================================ FILE: Units/parser-cxx.r/modules-1.d/expected.tags ================================================ A input.cpp /^export module A; \/\/ declares the primary module interface unit for named module 'A'$/;" M roles:def properties:export A input-0.cpp /^module A; \/\/ declares a module implementation unit for named module 'A'$/;" M roles:def A.B input-1.cpp /^export module A.B; \/\/ declares the primary module interface unit for named module 'A.B'$/;" M roles:def properties:export A.B input-2.cpp /^module A.B; \/\/ declares a module implementation unit for named module 'A.B'$/;" M roles:def module input-3.cpp /^int module;$/;" v typeref:typename:int roles:def moudle input-4.cpp /^void moudle (void)$/;" f typeref:typename:void roles:def module input-5.cpp /^typedef int module;$/;" t typeref:typename:int file: roles:def M input-5.cpp /^typedef module M;$/;" t typeref:typename:module file: roles:def module input-6.cpp /^struct module$/;" s file: roles:def name input-6.cpp /^ const char *name;$/;" m struct:module typeref:typename:const char * file: roles:def C input-7.cpp /^export module C;$/;" M roles:def properties:export moudle input-7.cpp /^void moudle(T x)$/;" f typeref:typename:void roles:def properties:export My.App.ConfigModule input-8.cpp /^export module My.App . ConfigModule [[cats::meow(-1,8, "de"[1])]] ;$/;" M roles:def properties:export My.App.AlgoModule input-9.cpp /^module My.App . AlgoModule [[cats::meow(-1,8, "de"[1])]] ;$/;" M roles:def ================================================ FILE: Units/parser-cxx.r/modules-1.d/input-0.cpp ================================================ module A; // declares a module implementation unit for named module 'A' ================================================ FILE: Units/parser-cxx.r/modules-1.d/input-1.cpp ================================================ export module A.B; // declares the primary module interface unit for named module 'A.B' ================================================ FILE: Units/parser-cxx.r/modules-1.d/input-2.cpp ================================================ module A.B; // declares a module implementation unit for named module 'A.B' ================================================ FILE: Units/parser-cxx.r/modules-1.d/input-3.cpp ================================================ int module; ================================================ FILE: Units/parser-cxx.r/modules-1.d/input-4.cpp ================================================ void moudle (void) { } ================================================ FILE: Units/parser-cxx.r/modules-1.d/input-5.cpp ================================================ typedef int module; typedef module M; ================================================ FILE: Units/parser-cxx.r/modules-1.d/input-6.cpp ================================================ struct module { const char *name; }; ================================================ FILE: Units/parser-cxx.r/modules-1.d/input-7.cpp ================================================ export module C; export template void moudle(T x) { return; } ================================================ FILE: Units/parser-cxx.r/modules-1.d/input-8.cpp ================================================ // Taken from a comment in https://github.com/universal-ctags/ctags/issues/3932 submitted by @terminatorul export module My.App . ConfigModule [[cats::meow(-1,8, "de"[1])]] ; ================================================ FILE: Units/parser-cxx.r/modules-1.d/input-9.cpp ================================================ // Derived from a comment in https://github.com/universal-ctags/ctags/issues/3932 submitted by @terminatorul module My.App . AlgoModule [[cats::meow(-1,8, "de"[1])]] ; ================================================ FILE: Units/parser-cxx.r/modules-1.d/input.cpp ================================================ export module A; // declares the primary module interface unit for named module 'A' ================================================ FILE: Units/parser-cxx.r/modules-1.d/validator ================================================ cxx20+module ================================================ FILE: Units/parser-cxx.r/modules-1.d/validator-0 ================================================ NONE ================================================ FILE: Units/parser-cxx.r/modules-1.d/validator-2 ================================================ NONE ================================================ FILE: Units/parser-cxx.r/modules-1.d/validator-8 ================================================ NONE ================================================ FILE: Units/parser-cxx.r/modules-1.d/validator-9 ================================================ NONE ================================================ FILE: Units/parser-cxx.r/modules-8.d/args.ctags ================================================ --sort=no --extras=+q --fields-C++=+{properties} ================================================ FILE: Units/parser-cxx.r/modules-8.d/expected.tags ================================================ __gmod_a88571800116 input.cpp /^module;$/;" M A input.cpp /^export module A;$/;" M properties:export private input.cpp /^module :private;$/;" P module:A A:private input.cpp /^module :private;$/;" P module:A __gmod_d9936dbd0116 input-0.cpp /^module;$/;" M B input-0.cpp /^export module B;$/;" M properties:export private input-0.cpp /^module :private;$/;" P module:B B:private input-0.cpp /^module :private;$/;" P module:B ================================================ FILE: Units/parser-cxx.r/modules-8.d/input-0.cpp ================================================ module; export module B; module :private; ================================================ FILE: Units/parser-cxx.r/modules-8.d/input.cpp ================================================ module; export module A; module :private; ================================================ FILE: Units/parser-cxx.r/more-decltypes.d/args.ctags ================================================ --sort=no --fields-C++={properties} ================================================ FILE: Units/parser-cxx.r/more-decltypes.d/expected.tags ================================================ a input.cxx /^int a;$/;" v typeref:typename:int b input.cxx /^decltype(a) b;$/;" v typeref:typename:decltype(a) c input.cxx /^typeof(a) c;$/;" v typeref:typename:typeof(a) d input.cxx /^__typeof__(a) d;$/;" v typeref:typename:__typeof__(a) d0 input.cxx /^__typeof(a) d0;$/;" v typeref:typename:__typeof(a) e input.cxx /^decltype(a) const e = 1;$/;" v typeref:typename:decltype(a) const f input.cxx /^typeof(a) const f = 2;$/;" v typeref:typename:typeof(a) const g input.cxx /^__typeof__(a) const g = 3;$/;" v typeref:typename:__typeof__(a) const g0 input.cxx /^__typeof(a) const g0 = 3;$/;" v typeref:typename:__typeof(a) const h input.cxx /^static decltype(a) const h = 4;$/;" v typeref:typename:decltype(a) const file: properties:static i input.cxx /^static typeof(a) const i = 5;$/;" v typeref:typename:typeof(a) const file: properties:static j input.cxx /^static __typeof__(a) const j = 6;$/;" v typeref:typename:__typeof__(a) const file: properties:static j0 input.cxx /^static __typeof(a) const j0 = 6;$/;" v typeref:typename:__typeof(a) const file: properties:static k input.cxx /^static const decltype(a) k = 7;$/;" v typeref:typename:const decltype(a) file: properties:static l input.cxx /^static const typeof(a) l = 8;$/;" v typeref:typename:const typeof(a) file: properties:static m input.cxx /^static const __typeof__(a) m = 9;$/;" v typeref:typename:const __typeof__(a) file: properties:static m0 input.cxx /^static const __typeof(a) m0 = 10;$/;" v typeref:typename:const __typeof(a) file: properties:static ================================================ FILE: Units/parser-cxx.r/more-decltypes.d/input.cxx ================================================ int a; decltype(a) b; typeof(a) c; __typeof__(a) d; __typeof(a) d0; decltype(a) const e = 1; typeof(a) const f = 2; __typeof__(a) const g = 3; __typeof(a) const g0 = 3; static decltype(a) const h = 4; static typeof(a) const i = 5; static __typeof__(a) const j = 6; static __typeof(a) const j0 = 6; static const decltype(a) k = 7; static const typeof(a) l = 8; static const __typeof__(a) m = 9; static const __typeof(a) m0 = 10; ================================================ FILE: Units/parser-cxx.r/namespace-alias-in-function.d/args.ctags ================================================ --kinds-C++=+A ================================================ FILE: Units/parser-cxx.r/namespace-alias-in-function.d/expected.tags ================================================ ABC input.cpp /^namespace ABC {$/;" n file: X input.cpp /^ namespace X = ABC;$/;" A function:foo file: name:ABC foo input.cpp /^int foo (void)$/;" f typeref:typename:int x input.cpp /^ int x = 1;$/;" v namespace:ABC typeref:typename:int ================================================ FILE: Units/parser-cxx.r/namespace-alias-in-function.d/input.cpp ================================================ namespace ABC { int x = 1; } int foo (void) { namespace X = ABC; return X::x; } ================================================ FILE: Units/parser-cxx.r/namespace-and-preprocessor.cpp.d/args.ctags ================================================ --sort=no --kinds-C++=* ================================================ FILE: Units/parser-cxx.r/namespace-and-preprocessor.cpp.d/expected.tags ================================================ Name input.cpp /^ Name {$/;" n file: ================================================ FILE: Units/parser-cxx.r/namespace-and-preprocessor.cpp.d/input.cpp ================================================ #ifdef SOMETHING namespace #else class #endif Name { }; ================================================ FILE: Units/parser-cxx.r/namespace-and-scope.b/args.ctags ================================================ --kinds-C++=* --fields=+K ================================================ FILE: Units/parser-cxx.r/namespace-and-scope.b/expected.tags ================================================ X input.cpp /^namespace X {$/;" namespace file: f input.cpp /^ void f (void);$/;" prototype namespace:X file: f input.cpp /^void X::f (void) {}$/;" function namespace:X ================================================ FILE: Units/parser-cxx.r/namespace-and-scope.b/input.cpp ================================================ namespace X { void f (void); }; void X::f (void) {} ================================================ FILE: Units/parser-cxx.r/namespace.cpp.d/args.ctags ================================================ --sort=no --fields=+e --fields-c++=+{properties} --kinds-c++=+A ================================================ FILE: Units/parser-cxx.r/namespace.cpp.d/expected.tags ================================================ __anon396601200111 input.cpp /^namespace {$/;" n file: end:8 anon_f input.cpp /^ void anon_f() { };$/;" f namespace:__anon396601200111 typeref:typename:void end:3 __anon396601200211 input.cpp /^ namespace {$/;" n namespace:__anon396601200111 file: end:7 anon_anon_f input.cpp /^ void anon_anon_f() { };$/;" f namespace:__anon396601200111::__anon396601200211 typeref:typename:void end:6 a1 input.cpp /^namespace a1 {$/;" n file: end:24 a1_f input.cpp /^ void a1_f() { }$/;" f namespace:a1 typeref:typename:void end:11 a2 input.cpp /^ namespace a2 {$/;" n namespace:a1 file: end:19 a1_a2_f input.cpp /^ void a1_a2_f() { }$/;" f namespace:a1::a2 typeref:typename:void end:14 a3 input.cpp /^ namespace a3 {$/;" n namespace:a1::a2 file: end:18 a1_a2_a3_f input.cpp /^ void a1_a2_a3_f() { };$/;" f namespace:a1::a2::a3 typeref:typename:void end:17 __anon396601200311 input.cpp /^ namespace {$/;" n namespace:a1 file: end:23 a1_anon_f input.cpp /^ void a1_anon_f() { };$/;" f namespace:a1::__anon396601200311 typeref:typename:void end:22 b1 input.cpp /^namespace b1::b2 {$/;" n file: end:32 b2 input.cpp /^namespace b1::b2 {$/;" n namespace:b1 file: end:32 b1_b2_f input.cpp /^ void b1_b2_f() { };$/;" f namespace:b1::b2 typeref:typename:void end:27 b3 input.cpp /^ namespace b3::b4 {$/;" n namespace:b1::b2 file: end:31 b4 input.cpp /^ namespace b3::b4 {$/;" n namespace:b1::b2::b3 file: end:31 b1_b2_b3_b4_f input.cpp /^ void b1_b2_b3_b4_f() { };$/;" f namespace:b1::b2::b3::b4 typeref:typename:void end:30 c1 input.cpp /^inline namespace c1 {$/;" n file: end:38 properties:inline c2 input.cpp /^ namespace c2 {$/;" n namespace:c1 file: end:37 c1_c2_f input.cpp /^ void c1_c2_f() { };$/;" f namespace:c1::c2 typeref:typename:void end:36 d1 input.cpp /^inline namespace d1::d2 {$/;" n file: end:46 properties:inline d2 input.cpp /^inline namespace d1::d2 {$/;" n namespace:d1 file: end:46 properties:inline d1_d2_f input.cpp /^ void d1_d2_f() { };$/;" f namespace:d1::d2 typeref:typename:void end:41 d3 input.cpp /^ inline namespace d3::d4 {$/;" n namespace:d1::d2 file: end:45 properties:inline d4 input.cpp /^ inline namespace d3::d4 {$/;" n namespace:d1::d2::d3 file: end:45 properties:inline d1_d2_d3_d4_f input.cpp /^ void d1_d2_d3_d4_f() { }$/;" f namespace:d1::d2::d3::d4 typeref:typename:void end:44 e1 input.cpp /^namespace e1 = a1::a2::a3;$/;" A file: name:a1::a2::a3 e2 input.cpp /^namespace e2 = b1::b2 __attribute__((abi_tag("blah")));$/;" A file: name:b1::b2 f1 input.cpp /^namespace f1 _SOME_MACRO(default)$/;" n file: end:54 f2 input.cpp /^namespace f2::f3 _SOME_MACRO("blah","foo")$/;" n file: end:58 f3 input.cpp /^namespace f2::f3 _SOME_MACRO("blah","foo")$/;" n namespace:f2 file: end:58 z1 input.cpp /^namespace z1 { };$/;" n file: end:60 ================================================ FILE: Units/parser-cxx.r/namespace.cpp.d/input.cpp ================================================ namespace { void anon_f() { }; namespace { void anon_anon_f() { }; } } namespace a1 { void a1_f() { } namespace a2 { void a1_a2_f() { } namespace a3 { void a1_a2_a3_f() { }; } } namespace { void a1_anon_f() { }; } } namespace b1::b2 { void b1_b2_f() { }; namespace b3::b4 { void b1_b2_b3_b4_f() { }; } } inline namespace c1 { namespace c2 { void c1_c2_f() { }; } } inline namespace d1::d2 { void d1_d2_f() { }; inline namespace d3::d4 { void d1_d2_d3_d4_f() { } } } namespace e1 = a1::a2::a3; namespace e2 = b1::b2 __attribute__((abi_tag("blah"))); namespace f1 _SOME_MACRO(default) { } namespace f2::f3 _SOME_MACRO("blah","foo") { } namespace z1 { }; ================================================ FILE: Units/parser-cxx.r/new-delete.d/args.ctags ================================================ --kinds-c++=* --sort=no ================================================ FILE: Units/parser-cxx.r/new-delete.d/expected.tags ================================================ fn input.cpp /^Class fn()$/;" f typeref:typename:Class ================================================ FILE: Units/parser-cxx.r/new-delete.d/input.cpp ================================================ // Only fn() should be reported here. Class fn() { delete x; delete[] x; new Class(); (void)new Class(); return new Class(); } ================================================ FILE: Units/parser-cxx.r/operators.cpp.d/args.ctags ================================================ --kinds-c++=pf --sort=no ================================================ FILE: Units/parser-cxx.r/operators.cpp.d/expected.tags ================================================ operator = input.cpp /^ X & operator = (const X &x)$/;" f class:X typeref:typename:X & file: operator == input.cpp /^ bool operator == (const X &x)$/;" f class:X typeref:typename:bool file: operator -= input.cpp /^ inline X & operator-=(const X &x)$/;" f class:X typeref:typename:X & file: operator += input.cpp /^ inline X & operator += (const X &x)$/;" f class:X typeref:typename:X & file: operator *= input.cpp /^ X & operator *= (int x);$/;" p class:X typeref:typename:X & file: operator *= input.cpp /^ X & operator *= (const X & x);$/;" p class:X typeref:typename:X & file: operator && input.cpp /^ X operator && (const X &a);$/;" p class:X typeref:typename:X file: operator /= input.cpp /^ inline void operator \/= (int)$/;" f class:X typeref:typename:void file: operator () input.cpp /^ inline void *** operator()()$/;" f class:X typeref:typename:void *** file: operator ++ input.cpp /^ inline X & operator++()$/;" f class:X typeref:typename:X & file: operator -- input.cpp /^ X & operator--()$/;" f class:X typeref:typename:X & file: operator [] input.cpp /^ int operator[](int)$/;" f class:X typeref:typename:int file: operator [] input.cpp /^ int operator[](const X &a) const$/;" f class:X typeref:typename:int file: operator * input.cpp /^ inline friend X operator*(const X &a, const X &b)$/;" f typeref:typename:X file: operator new input.cpp /^ void * operator new(size_t);$/;" p class:X typeref:typename:void * file: operator delete input.cpp /^ void operator delete(void *);$/;" p class:X typeref:typename:void file: operator new[] input.cpp /^ void * operator new[](size_t);$/;" p class:X typeref:typename:void * file: operator delete[] input.cpp /^ void operator delete[](void *);$/;" p class:X typeref:typename:void file: operator Type input.cpp /^ operator Type() const;$/;" p class:X file: operator <=> input.cpp /^ auto operator<=>(const X&a) const -> decltype(1 <=> 2)$/;" f class:X typeref:typename:decltype(1<=>2) file: operator *= input.cpp /^X & X::operator *= (int x)$/;" f class:X typeref:typename:X & operator *= input.cpp /^X & X::operator *= (const X & x)$/;" f class:X typeref:typename:X & operator && input.cpp /^X X::operator && (const X &a)$/;" f class:X typeref:typename:X operator new input.cpp /^void * X::operator new(size_t)$/;" f class:X typeref:typename:void * operator delete input.cpp /^void X::operator delete(void *)$/;" f class:X typeref:typename:void operator new[] input.cpp /^void * X::operator new[](size_t)$/;" f class:X typeref:typename:void * operator delete[] input.cpp /^void X::operator delete[](void *)$/;" f class:X typeref:typename:void main input.cpp /^int main(int argc,char ** argv)$/;" f typeref:typename:int operator Type input.cpp /^X::operator Type() const$/;" f class:X operator Eigen::Transform input.cpp /^template inline cv::Affine3::operator Eigen::Transform #include class Type {}; class X { public: X & operator = (const X &x) { return *this; } bool operator == (const X &x) { return true; } inline X & operator-=(const X &x) { return *this; } inline X & operator += (const X &x) { return *this; } X & operator *= (int x); X & operator *= (const X & x); X operator && (const X &a); inline void operator /= (int) { } inline void *** operator()() { return 0; } inline X & operator++() { return *this; } X & operator--() { return *this; } int operator[](int) { return 0; } int operator[](const X &a) const { return 0; } // This should appear as member of the global namespace inline friend X operator*(const X &a, const X &b) { return X(); } // This should NOT appear at all friend X operator && (const X &a,const X & b); void * operator new(size_t); void operator delete(void *); void * operator new[](size_t); void operator delete[](void *); operator Type() const; // requires -std=c++20 to compile auto operator<=>(const X&a) const -> decltype(1 <=> 2) { return std::strong_ordering::less; } }; X & X::operator *= (int x) { return *this; } X & X::operator *= (const X & x) { return *this; } X X::operator && (const X &a) { return *this; } void * X::operator new(size_t) { return NULL; } void X::operator delete(void *) { } void * X::operator new[](size_t) { return NULL; } void X::operator delete[](void *) { } int main(int argc,char ** argv) { X x; return x[0]; } X::operator Type() const { return Type(); } #ifdef DONT_CARE_ABOUT_COMPILATION // This doesn't compile because it lacks the necessary definitions. But it's still extracted. template inline cv::Affine3::operator Eigen::Transform() const { Eigen::Transform r; cv::Mat hdr(4, 4, cv::traits::Type::value, r.matrix().data()); cv::Mat(matrix, false).copyTo(hdr); return r; } #endif ================================================ FILE: Units/parser-cxx.r/out-range-input-for-isspace.d/expected.tags ================================================ main input.cpp /^int main() {}$/;" f typeref:typename:int ================================================ FILE: Units/parser-cxx.r/out-range-input-for-isspace.d/input.cpp ================================================ extern "C"{ }; int main() {} ================================================ FILE: Units/parser-cxx.r/partition.d/args.ctags ================================================ --sort=no --fields=+{scope}{roles} --fields-C++=+{properties} --extras=+rq ================================================ FILE: Units/parser-cxx.r/partition.d/expected.tags ================================================ My.App.ConfigModule input.cpp /^export module My.App . ConfigModule: ConfigData. IniSettings ;$/;" M roles:partOwner ConfigData.IniSettings input.cpp /^export module My.App . ConfigModule: ConfigData. IniSettings ;$/;" P scope:module:My.App.ConfigModule roles:def properties:export My.App.ConfigModule:ConfigData.IniSettings input.cpp /^export module My.App . ConfigModule: ConfigData. IniSettings ;$/;" P scope:module:My.App.ConfigModule roles:def properties:export My.App.ConfigModule input-0.cpp /^module My.App . ConfigModule: Config.Data. IniSettings ;$/;" M roles:partOwner Config.Data.IniSettings input-0.cpp /^module My.App . ConfigModule: Config.Data. IniSettings ;$/;" P scope:module:My.App.ConfigModule roles:def My.App.ConfigModule:Config.Data.IniSettings input-0.cpp /^module My.App . ConfigModule: Config.Data. IniSettings ;$/;" P scope:module:My.App.ConfigModule roles:def A input-1.cpp /^export module A: ConfigData. IniSettings ;$/;" M roles:partOwner ConfigData.IniSettings input-1.cpp /^export module A: ConfigData. IniSettings ;$/;" P scope:module:A roles:def properties:export A:ConfigData.IniSettings input-1.cpp /^export module A: ConfigData. IniSettings ;$/;" P scope:module:A roles:def properties:export My.App.ConfigModule input-2.cpp /^export module My.App . ConfigModule: B ;$/;" M roles:partOwner B input-2.cpp /^export module My.App . ConfigModule: B ;$/;" P scope:module:My.App.ConfigModule roles:def properties:export My.App.ConfigModule:B input-2.cpp /^export module My.App . ConfigModule: B ;$/;" P scope:module:My.App.ConfigModule roles:def properties:export My.App.ConfigModule input-3.cpp /^export module My.App . ConfigModule: ;$/;" M roles:def properties:export ================================================ FILE: Units/parser-cxx.r/partition.d/input-0.cpp ================================================ module My.App . ConfigModule: Config.Data. IniSettings ; ================================================ FILE: Units/parser-cxx.r/partition.d/input-1.cpp ================================================ export module A: ConfigData. IniSettings ; ================================================ FILE: Units/parser-cxx.r/partition.d/input-2.cpp ================================================ export module My.App . ConfigModule: B ; ================================================ FILE: Units/parser-cxx.r/partition.d/input-3.cpp ================================================ export module My.App . ConfigModule: ; ================================================ FILE: Units/parser-cxx.r/partition.d/input-4.cpp ================================================ module : Config.Data. IniSettings ; // Illegal syntax ================================================ FILE: Units/parser-cxx.r/partition.d/input.cpp ================================================ export module My.App . ConfigModule: ConfigData. IniSettings ; ================================================ FILE: Units/parser-cxx.r/pointer-to-array.d/args.ctags ================================================ --kinds-c=+l ================================================ FILE: Units/parser-cxx.r/pointer-to-array.d/expected.tags ================================================ arr input.c /^ int (*arr)[] = foo();$/;" l function:main typeref:typename:int (*)[] file: bar input.c /^int2ptr_func bar = foo;$/;" v typeref:typename:int2ptr_func baz input.c /^int2ptr (*baz)(void) = foo;$/;" v typeref:typename:int2ptr (*)(void) foo input.c /^static int (*foo(void))[2] {$/;" f typeref:typename:int (*)[2] file: foo_arr input.c /^ static int foo_arr[2] = {1, 2};$/;" l function:foo typeref:typename:int[2] file: int2ptr input.c /^typedef int (*int2ptr)[2];$/;" t typeref:typename:int (*)[2] file: int2ptr_func input.c /^typedef int (*(*int2ptr_func)(void))[2];$/;" t typeref:typename:int (* (*)(void))[2] file: main input.c /^int main(void) {$/;" f typeref:typename:int ================================================ FILE: Units/parser-cxx.r/pointer-to-array.d/input.c ================================================ #include typedef int (*int2ptr)[2]; typedef int (*(*int2ptr_func)(void))[2]; static int (*foo(void))[2] { static int foo_arr[2] = {1, 2}; return &foo_arr; } int2ptr (*baz)(void) = foo; int2ptr_func bar = foo; int main(void) { int (*arr)[] = foo(); printf("array[0] = %d\n", (*arr)[0]); printf("array[1] = %d\n", (*arr)[1]); return 0; } ================================================ FILE: Units/parser-cxx.r/properties-consteval.d/args.ctags ================================================ --sort=no --kinds-c++=*-{parameter} --fields=+x --fields-c++=+{properties} ================================================ FILE: Units/parser-cxx.r/properties-consteval.d/expected.tags ================================================ sqr input.cc /^consteval int sqr(int n)$/;" f typeref:typename:int properties:consteval r input.cc /^constexpr int r = sqr(100); \/\/ OK$/;" v typeref:typename:int properties:constexpr x input.cc /^int x = 100;$/;" v typeref:typename:int r2 input.cc /^int r2 = sqr(x); \/\/ Error: Call does not produce a constant$/;" v typeref:typename:int sqrsqr input.cc /^consteval int sqrsqr(int n)$/;" f typeref:typename:int properties:consteval dblsqr input.cc /^constexpr int dblsqr(int n)$/;" f typeref:typename:int properties:constexpr f input.cc /^consteval int f() { return 42; }$/;" f typeref:typename:int properties:consteval g input.cc /^consteval auto g() { return &f; }$/;" f typeref:typename:auto properties:consteval h input.cc /^consteval int h(int (*p)() = g()) { return p(); }$/;" f typeref:typename:int properties:consteval ================================================ FILE: Units/parser-cxx.r/properties-consteval.d/input.cc ================================================ // Taken from https://en.cppreference.com/w/cpp/language/consteval consteval int sqr(int n) { return n*n; } constexpr int r = sqr(100); // OK int x = 100; int r2 = sqr(x); // Error: Call does not produce a constant consteval int sqrsqr(int n) { return sqr(sqr(n)); // Not a constant expression at this point, but OK } constexpr int dblsqr(int n) { return 2 * sqr(n); // Error: Enclosing function is not consteval // and sqr(n) is not a constant } consteval int f() { return 42; } consteval auto g() { return &f; } consteval int h(int (*p)() = g()) { return p(); } ================================================ FILE: Units/parser-cxx.r/properties-constexpr.d/args.ctags ================================================ --sort=no --kinds-c++=* --fields=+x --fields-c++=+{properties} ================================================ FILE: Units/parser-cxx.r/properties-constexpr.d/expected.tags ================================================ factorial input.cc /^constexpr int factorial(int n)$/;" f typeref:typename:int properties:constexpr n input.cc /^constexpr int factorial(int n)$/;" z function:factorial typeref:typename:int file: factorial_cxx14 input.cc /^constexpr int factorial_cxx14(int n)$/;" f typeref:typename:int properties:constexpr n input.cc /^constexpr int factorial_cxx14(int n)$/;" z function:factorial_cxx14 typeref:typename:int file: res input.cc /^ int res = 1;$/;" l function:factorial_cxx14 typeref:typename:int file: conststr input.cc /^class conststr$/;" c file: p input.cc /^ const char* p;$/;" m class:conststr typeref:typename:const char * file: sz input.cc /^ std::size_t sz;$/;" m class:conststr typeref:typename:std::size_t file: conststr input.cc /^ constexpr conststr(const char(&a)[N]): p(a), sz(N - 1) {}$/;" f class:conststr file: properties:constexpr a input.cc /^ constexpr conststr(const char(&a)[N]): p(a), sz(N - 1) {}$/;" z function:conststr::conststr typeref:typename:const char (&)[N] file: operator [] input.cc /^ constexpr char operator[](std::size_t n) const$/;" f class:conststr typeref:typename:char file: properties:const,constexpr n input.cc /^ constexpr char operator[](std::size_t n) const$/;" z function:conststr::operator [] typeref:typename:std::size_t file: size input.cc /^ constexpr std::size_t size() const { return sz; }$/;" f class:conststr typeref:typename:std::size_t file: properties:const,constexpr countlower input.cc /^constexpr std::size_t countlower(conststr s, std::size_t n = 0,$/;" f typeref:typename:std::size_t properties:constexpr s input.cc /^constexpr std::size_t countlower(conststr s, std::size_t n = 0,$/;" z function:countlower typeref:typename:conststr file: n input.cc /^constexpr std::size_t countlower(conststr s, std::size_t n = 0,$/;" z function:countlower typeref:typename:std::size_t file: c input.cc /^ std::size_t c = 0)$/;" z function:countlower typeref:typename:std::size_t file: constN input.cc /^struct constN$/;" s file: n input.cc /^template$/;" Z struct:constN typeref:typename:int constN input.cc /^ constN() { std::cout << n << '\\n'; }$/;" f struct:constN file: main input.cc /^int main()$/;" f typeref:typename:int out1 input.cc /^ constN out1; \/\/ computed at compile time$/;" l function:main typeref:typename:constN file: k input.cc /^ volatile int k = 8; \/\/ disallow optimization using volatile$/;" l function:main typeref:typename:volatile int file: out2 input.cc /^ constN out2; \/\/ implicitly converted to conststr$/;" l function:main typeref:typename:constN file: a input.cc /^ constexpr int a[12] = {0, 1, 2, 3, 4, 5, 6, 7, 8};$/;" l function:main typeref:typename:int[12] file: properties:constexpr length_a input.cc /^ constexpr int length_a = sizeof(a)\/sizeof(int); \/\/ std::size(a) in C++17,$/;" l function:main typeref:typename:int file: properties:constexpr i input.cc /^ for (int i = 0; i < length_a; ++i)$/;" l function:main typeref:typename:int file: ================================================ FILE: Units/parser-cxx.r/properties-constexpr.d/input.cc ================================================ // Taken from https://en.cppreference.com/w/cpp/language/constexpr #include #include // C++11 constexpr functions use recursion rather than iteration constexpr int factorial(int n) { return n <= 1 ? 1 : (n * factorial(n - 1)); } // C++14 constexpr functions may use local variables and loops #if __cplusplus >= 201402L constexpr int factorial_cxx14(int n) { int res = 1; while (n > 1) res *= n--; return res; } #endif // C++14 // literal class class conststr { const char* p; std::size_t sz; public: template constexpr conststr(const char(&a)[N]): p(a), sz(N - 1) {} // constexpr functions signal errors by throwing exceptions // in C++11, they must do so from the conditional operator ?: constexpr char operator[](std::size_t n) const { return n < sz ? p[n] : throw std::out_of_range(""); } constexpr std::size_t size() const { return sz; } }; // C++11 constexpr functions had to put everything in a single return statement // (C++14 doesn't have that requirement) constexpr std::size_t countlower(conststr s, std::size_t n = 0, std::size_t c = 0) { return n == s.size() ? c : 'a' <= s[n] && s[n] <= 'z' ? countlower(s, n + 1, c + 1) : countlower(s, n + 1, c); } // output function that requires a compile-time constant, for testing template struct constN { constN() { std::cout << n << '\n'; } }; int main() { std::cout << "4! = " ; constN out1; // computed at compile time volatile int k = 8; // disallow optimization using volatile std::cout << k << "! = " << factorial(k) << '\n'; // computed at run time std::cout << "the number of lowercase letters in \"Hello, world!\" is "; constN out2; // implicitly converted to conststr constexpr int a[12] = {0, 1, 2, 3, 4, 5, 6, 7, 8}; constexpr int length_a = sizeof(a)/sizeof(int); // std::size(a) in C++17, // std::ssize(a) in C++20 std::cout << "array of length " << length_a << " has elements: "; for (int i = 0; i < length_a; ++i) std::cout << a[i] << " "; } ================================================ FILE: Units/parser-cxx.r/properties-constinit.d/args.ctags ================================================ --sort=no --kinds-c++=*-{parameter} --fields=+x --fields-c++=+{properties} ================================================ FILE: Units/parser-cxx.r/properties-constinit.d/expected.tags ================================================ g input.cc /^const char *g() { return "dynamic initialization"; }$/;" f typeref:typename:const char * f input.cc /^constexpr const char *f(bool p) { return p ? "constant initializer" : g(); }$/;" f typeref:typename:const char * properties:constexpr c input.cc /^constinit const char *c = f(true); \/\/ OK$/;" v typeref:typename:const char * properties:constinit x input.cc /^extern thread_local constinit int x;$/;" x typeref:typename:int properties:extern,constinit,thread_local f input.cc /^int f() { return x; } \/\/ no check of a guard variable needed$/;" f typeref:typename:int ================================================ FILE: Units/parser-cxx.r/properties-constinit.d/input.cc ================================================ // Taken from https://en.cppreference.com/w/cpp/language/constinit const char *g() { return "dynamic initialization"; } constexpr const char *f(bool p) { return p ? "constant initializer" : g(); } constinit const char *c = f(true); // OK extern thread_local constinit int x; int f() { return x; } // no check of a guard variable needed ================================================ FILE: Units/parser-cxx.r/properties.cpp.d/args.ctags ================================================ --sort=no --kinds-c++=* --fields=+x --fields-c++=+{properties} ================================================ FILE: Units/parser-cxx.r/properties.cpp.d/expected.tags ================================================ C01 input.cpp /^class C01$/;" c file: C01 input.cpp /^ C01() = default;$/;" p class:C01 file: properties:default mp01 input.cpp /^ static int mp01;$/;" m class:C01 typeref:typename:int file: properties:static mp02 input.cpp /^ mutable int mp02;$/;" m class:C01 typeref:typename:int file: properties:mutable mf01 input.cpp /^ virtual void mf01();$/;" p class:C01 typeref:typename:void file: properties:virtual mf02 input.cpp /^ virtual void mf02() final;$/;" p class:C01 typeref:typename:void file: properties:final,virtual C02 input.cpp /^class C02 : public C01$/;" c file: C02 input.cpp /^ C02() = delete;$/;" p class:C02 file: properties:delete C02 input.cpp /^ explicit C02(int i)$/;" f class:C02 file: properties:explicit i input.cpp /^ explicit C02(int i)$/;" z function:C02::C02 typeref:typename:int file: mf01 input.cpp /^ void mf01() override;$/;" p class:C02 typeref:typename:void file: properties:override,virtual mf03 input.cpp /^ virtual void mf03() = 0;$/;" p class:C02 typeref:typename:void file: properties:pure,virtual mf04 input.cpp /^ virtual void mf04() final;$/;" p class:C02 typeref:typename:void file: properties:final,virtual mf05 input.cpp /^ static inline void mf05()$/;" f class:C02 typeref:typename:void file: properties:inline,static mf06 input.cpp /^ inline void mf06() const;$/;" p class:C02 typeref:typename:void file: properties:const,inline mf07 input.cpp /^ void static mf07() volatile;$/;" p class:C02 typeref:typename:void file: properties:static,volatile v01 input.cpp /^extern int v01;$/;" x typeref:typename:int properties:extern v02 input.cpp /^static volatile int v02;$/;" v typeref:typename:volatile int file: properties:static p01 input.cpp /^static void p01();$/;" p typeref:typename:void file: properties:static p02 input.cpp /^extern void p02();$/;" p typeref:typename:void file: properties:extern f01 input.cpp /^static void f01()$/;" f typeref:typename:void file: properties:static f02 input.cpp /^static inline void f02()$/;" f typeref:typename:void file: properties:inline,static point input.cpp /^static struct point { float x, y; } p0, p1;$/;" s file: x input.cpp /^static struct point { float x, y; } p0, p1;$/;" m struct:point typeref:typename:float file: y input.cpp /^static struct point { float x, y; } p0, p1;$/;" m struct:point typeref:typename:float file: p0 input.cpp /^static struct point { float x, y; } p0, p1;$/;" v typeref:struct:point file: properties:static p1 input.cpp /^static struct point { float x, y; } p0, p1;$/;" v typeref:struct:point file: properties:static ================================================ FILE: Units/parser-cxx.r/properties.cpp.d/input.cpp ================================================ class C01 { public: C01() = default; static int mp01; mutable int mp02; virtual void mf01(); virtual void mf02() final; }; class C02 : public C01 { public: C02() = delete; explicit C02(int i) { } void mf01() override; virtual void mf03() = 0; virtual void mf04() final; static inline void mf05() { } inline void mf06() const; void static mf07() volatile; }; extern int v01; static volatile int v02; static void p01(); extern void p02(); static void f01() { } static inline void f02() { } static struct point { float x, y; } p0, p1; ================================================ FILE: Units/parser-cxx.r/prototype-starting-from-scope-op.d/args.ctags ================================================ --sort=no --C++-kinds=+p ================================================ FILE: Units/parser-cxx.r/prototype-starting-from-scope-op.d/expected.tags ================================================ bar input.cpp /^::std::string bar();$/;" p typeref:typename:::std::string file: baz input.cpp /^::std::string baz() { return "not a prototype"; }$/;" f typeref:typename:::std::string ================================================ FILE: Units/parser-cxx.r/prototype-starting-from-scope-op.d/input.cpp ================================================ // Taken from #3693 submitted by @b4n #include ::std::string bar(); ::std::string baz() { return "not a prototype"; } ================================================ FILE: Units/parser-cxx.r/rojas.h.d/args.ctags ================================================ --kinds-C++=+p ================================================ FILE: Units/parser-cxx.r/rojas.h.d/expected.tags ================================================ FFunc input.h /^typedef uint32 (*FFunc) (const astruct * pP, int n);$/;" t typeref:typename:uint32 (*)(const astruct * pP,int n) FooBar input.h /^typedef void * FooBar;$/;" t typeref:typename:void * afunc input.h /^FooBar * afunc (const char * aparam);$/;" p typeref:typename:FooBar * astruct input.h /^struct astruct$/;" s astruct input.h /^typedef struct astruct astruct;$/;" t typeref:struct:astruct m_member input.h /^ int m_member;$/;" m struct:astruct typeref:typename:int ================================================ FILE: Units/parser-cxx.r/rojas.h.d/input.h ================================================ /* Problem reported by Emil Rojas on 22 May 2002 */ /* Fixed by reinitializing statement when either of "extern", "static", or * "typedef" keywords are read. */ # ifdef NOT_DEFINED typedef unsigned long uint32 //; // remove comment before ";" to make ctags work # endif extern "C" { typedef void * FooBar; FooBar * afunc (const char * aparam); struct astruct { int m_member; }; typedef struct astruct astruct; typedef uint32 (*FFunc) (const astruct * pP, int n); } ================================================ FILE: Units/parser-cxx.r/scope-of-using-in-lambda-in-enum.d/args.ctags ================================================ --sort=no --extras=+q ================================================ FILE: Units/parser-cxx.r/scope-of-using-in-lambda-in-enum.d/expected.tags ================================================ e input.cpp /^enum e {$/;" g file: __anon92a0b9a90102 input.cpp /^ x = [] {$/;" f enum:e file: T3 input.cpp /^ using T3 = int;$/;" t function:e::__anon92a0b9a90102 typeref:typename:int file: x input.cpp /^ x = [] {$/;" e enum:e file: main input.cpp /^int main(void)$/;" f typeref:typename:int ================================================ FILE: Units/parser-cxx.r/scope-of-using-in-lambda-in-enum.d/input.cpp ================================================ enum e { x = [] { using T3 = int; return 1; }() }; int main(void) { return e::x; } ================================================ FILE: Units/parser-cxx.r/scope-of-using-in-lambda-in-enum.d/validator ================================================ cxx20+module ================================================ FILE: Units/parser-cxx.r/signature.cpp.d/README ================================================ int bar (a, b) int a; char b; {} I wonder how we should do with a, b. ================================================ FILE: Units/parser-cxx.r/signature.cpp.d/args.ctags ================================================ --fields=+S --extras=+q --kinds-C++=+p ================================================ FILE: Units/parser-cxx.r/signature.cpp.d/expected.tags ================================================ BAR::bar input.cpp /^char *BAR::bar (char *c, double d[]) const {}$/;" f class:BAR typeref:typename:char * signature:(char * c,double d[]) const bar input.cpp /^char *BAR::bar (char *c, double d[]) const {}$/;" f class:BAR typeref:typename:char * signature:(char * c,double d[]) const foo input.cpp /^void foo (int a, char b) {}$/;" f typeref:typename:void signature:(int a,char b) foobar input.cpp /^void foobar __ARGS ((int a, char b));$/;" p typeref:typename:void file: signature:(int a,char b) params1 input.cpp /^void params1(const char * c = "blah");$/;" p typeref:typename:void file: signature:(const char * c="blah") params2 input.cpp /^void params2(char x = 'x');$/;" p typeref:typename:void file: signature:(char x='x') params3 input.cpp /^void params3(char x = ' ');$/;" p typeref:typename:void file: signature:(char x=' ') params4 input.cpp /^void params4(char x = ',');$/;" p typeref:typename:void file: signature:(char x=',') params5 input.cpp /^void params5(char x = '\\n');$/;" p typeref:typename:void file: signature:(char x='\\n') params6 input.cpp /^void params6(char x = '\\t',int n = 10,const char * v = "a string with\\na newline");$/;" p typeref:typename:void file: signature:(char x='\\t',int n=10,const char * v="a string with\\na newline") params7 input.cpp /^void params7(char x = ' ', \/\/ This is tab char$/;" p typeref:typename:void file: signature:(char x='\t',float p=3.14,const char * v="a string with a tab char:\t") ================================================ FILE: Units/parser-cxx.r/signature.cpp.d/input.cpp ================================================ /* Tests for collection of signature */ void foo (int a, char b) {} /* note that K&R style declarations are not valid in C++ */ //int bar (a, b) int a; char b; {} char *BAR::bar (char *c, double d[]) const {} void foobar __ARGS ((int a, char b)); void params1(const char * c = "blah"); void params2(char x = 'x'); void params3(char x = ' '); void params4(char x = ','); void params5(char x = '\n'); void params6(char x = '\t',int n = 10,const char * v = "a string with\na newline"); void params7(char x = ' ', // This is tab char float p = 3.14, const char * v = "a string with a tab char: " ); ================================================ FILE: Units/parser-cxx.r/struct-keyword-not-for-defining-struct.d/args.ctags ================================================ --sort=no --kinds-C++=+plz ================================================ FILE: Units/parser-cxx.r/struct-keyword-not-for-defining-struct.d/expected.tags ================================================ Currency input.cc /^typedef struct Currency$/;" s file: Dollar input.cc /^ int Dollar;$/;" m struct:Currency typeref:typename:int file: Cents input.cc /^ int Cents;$/;" m struct:Currency typeref:typename:int file: operator = input.cc /^ struct Currency &operator=(Currency& value)$/;" f struct:Currency typeref:struct:Currency & file: value input.cc /^ struct Currency &operator=(Currency& value)$/;" z function:Currency::operator = typeref:typename:Currency & file: test input.cc /^void test()$/;" f typeref:typename:void ================================================ FILE: Units/parser-cxx.r/struct-keyword-not-for-defining-struct.d/input.cc ================================================ // Taken from #2840 submitted by @chongchal typedef struct Currency { int Dollar; int Cents; struct Currency &operator=(Currency& value) { Dollar = value.Dollar; Cents = value.Cents; return *this; } }; void test() { } ================================================ FILE: Units/parser-cxx.r/template-member-forward-declaration.d/args.ctags ================================================ --sort=no --kinds-C++=m ================================================ FILE: Units/parser-cxx.r/template-member-forward-declaration.d/expected.tags ================================================ p input.cpp /^ Class *p;$/;" m class:A typeref:typename:Class * file: a_c_forward input.cpp /^ A a_c_forward;$/;" m class:B typeref:typename:A file: a_s_forward input.cpp /^ A a_s_forward;$/;" m class:B typeref:typename:A file: a_u_forward input.cpp /^ A a_u_forward;$/;" m class:B typeref:typename:A file: ================================================ FILE: Units/parser-cxx.r/template-member-forward-declaration.d/input.cpp ================================================ template class A { public: A() { p = new Class(); } Class *p; }; class B { public: // forward declaration okay because only used as pointer in Template A a_c_forward; A a_s_forward; A a_u_forward; }; ================================================ FILE: Units/parser-cxx.r/template-member-function-pointer-scope.d/args.ctags ================================================ --sort=no --fields=+{signature} --kinds-C++=+fstz ================================================ FILE: Units/parser-cxx.r/template-member-function-pointer-scope.d/expected.tags ================================================ TestUtil input.cpp /^struct TestUtil {$/;" s file: isNull input.cpp /^ static bool isNull(const T&) { return false; }$/;" f struct:TestUtil typeref:typename:bool file: signature:(const T &) __anon39cbdfcb010d input.cpp /^ static bool isNull(const T&) { return false; }$/;" z function:TestUtil::isNull typeref:typename:const T & file: TestUtil input.cpp /^struct TestUtil {$/;" s file: isNull input.cpp /^ static bool isNull(T* f) { return 0 == f; }$/;" f struct:TestUtil typeref:typename:bool file: signature:(T * f) f input.cpp /^ static bool isNull(T* f) { return 0 == f; }$/;" z function:TestUtil::isNull typeref:typename:T * file: memtype input.cpp /^struct memtype {};$/;" s file: klass input.cpp /^struct klass {};$/;" s file: isNull input.cpp /^TestUtil::isNull(const memtype klass::* &f)$/;" f class:TestUtil typeref:typename:bool signature:(const memtype klass::* & f) f input.cpp /^TestUtil::isNull(const memtype klass::* &f)$/;" z function:TestUtil::isNull typeref:typename:const memtype klass::* & file: Handler input.cpp /^struct Handler {$/;" s file: process input.cpp /^ void process(T value) { }$/;" f struct:Handler typeref:typename:void file: signature:(T value) value input.cpp /^ void process(T value) { }$/;" z function:Handler::process typeref:typename:T file: Handler input.cpp /^struct Handler {$/;" s file: process input.cpp /^ void process(R (C::*method)()) { }$/;" f struct:Handler typeref:typename:void file: signature:(R (C::* method)()) method input.cpp /^ void process(R (C::*method)()) { }$/;" z function:Handler::process typeref:typename:R (C::*)() file: Handler input.cpp /^struct Handler {$/;" s file: process input.cpp /^ void process(R (C::*method)(A)) { }$/;" f struct:Handler typeref:typename:void file: signature:(R (C::* method)(A)) method input.cpp /^ void process(R (C::*method)(A)) { }$/;" z function:Handler::process typeref:typename:R (C::*)(A) file: ================================================ FILE: Units/parser-cxx.r/template-member-function-pointer-scope.d/input.cpp ================================================ // Derived from #4348 submitted by @gaborbernat. // C++ template specialization that previously triggered scope management crash // Test case for issue 4344: assertion failure in cxxScopePushTop template struct TestUtil { static bool isNull(const T&) { return false; } }; template struct TestUtil { static bool isNull(T* f) { return 0 == f; } }; struct memtype {}; struct klass {}; template <> inline bool TestUtil::isNull(const memtype klass::* &f) { return 0 == f; } // Additional test cases for complex template specializations template struct Handler { void process(T value) { } }; template struct Handler { void process(R (C::*method)()) { } }; template struct Handler { void process(R (C::*method)(A)) { } }; ================================================ FILE: Units/parser-cxx.r/template-member-function-pointer-scope.d/validator ================================================ cxx11 ================================================ FILE: Units/parser-cxx.r/template-nested-triangle-brackets.d/args.ctags ================================================ --sort=no --kinds-c++=+Z --fields-c++={template}{specialization} ================================================ FILE: Units/parser-cxx.r/template-nested-triangle-brackets.d/expected.tags ================================================ Test input.hpp /^class Test : public set {$/;" c template:,class _Comp1=less>> _Comp0 input.hpp /^ class _Comp0=less,$/;" Z class:Test typeref:meta:class _Comp1 input.hpp /^ class _Comp1=less > >$/;" Z class:Test typeref:meta:class xxx input.hpp /^ typedef int xxx;$/;" t class:Test typeref:typename:int Foo input-0.hpp /^class Foo {};$/;" c template: X input-0.hpp /^template $/;" Z class:Foo typeref:meta:typename bar input-0.hpp /^constexpr Foo bar {};$/;" v typeref:typename:Foo template:> Y input-0.hpp /^template >$/;" Z variable:bar typeref:meta:typename i input-0.hpp /^const int i = 3;$/;" v typeref:typename:const int failure input-1.hpp /^class failure {};$/;" c template:> T input-1.hpp /^template >$/;" Z class:failure typeref:meta:class Hash input-1.hpp /^template >$/;" Z class:failure typeref:meta:class V input-2.hpp /^const int V = 10;$/;" v typeref:typename:const int funcA input-2.hpp /^template void funcA(T t)$/;" f typeref:typename:void template: T input-2.hpp /^template void funcA(T t)$/;" Z function:funcA typeref:meta:typename I input-2.hpp /^template void funcA(T t)$/;" Z function:funcA typeref:typename:int K input-2.hpp /^typedef int K;$/;" t typeref:typename:int funcB input-2.hpp /^template void funcB(T t)$/;" f typeref:typename:void template: T input-2.hpp /^template void funcB(T t)$/;" Z function:funcB typeref:meta:typename I input-2.hpp /^template void funcB(T t)$/;" Z function:funcB typeref:typename:int J input-2.hpp /^template void funcB(T t)$/;" Z function:funcB typeref:typename:int funcC input-2.hpp /^template K funcC(T t)$/;" f typeref:typename:K template: T input-2.hpp /^template K funcC(T t)$/;" Z function:funcC typeref:meta:typename I input-2.hpp /^template K funcC(T t)$/;" Z function:funcC typeref:typename:int J input-2.hpp /^template K funcC(T t)$/;" Z function:funcC typeref:typename:int funcD input-2.hpp /^template> 2)> K funcD(T t)$/;" f typeref:typename:K template:>2)> T input-2.hpp /^template> 2)> K funcD(T t)$/;" Z function:funcD typeref:meta:typename I input-2.hpp /^template> 2)> K funcD(T t)$/;" Z function:funcD typeref:typename:int J input-2.hpp /^template> 2)> K funcD(T t)$/;" Z function:funcD typeref:typename:int funcE input-2.hpp /^template> I)> K funcE(T t)$/;" f typeref:typename:K template:> I)> T input-2.hpp /^template> I)> K funcE(T t)$/;" Z function:funcE typeref:meta:typename I input-2.hpp /^template> I)> K funcE(T t)$/;" Z function:funcE typeref:typename:int J input-2.hpp /^template> I)> K funcE(T t)$/;" Z function:funcE typeref:typename:int funcF input-2.hpp /^template> L)> K funcF(T t)$/;" f typeref:typename:K template:> L)> T input-2.hpp /^template> L)> K funcF(T t)$/;" Z function:funcF typeref:meta:typename I input-2.hpp /^template> L)> K funcF(T t)$/;" Z function:funcF typeref:typename:int L input-2.hpp /^template> L)> K funcF(T t)$/;" Z function:funcF typeref:typename:int J input-2.hpp /^template> L)> K funcF(T t)$/;" Z function:funcF typeref:typename:int funcG input-2.hpp /^template> V)> K funcG(T t)$/;" f typeref:typename:K template:> V)> T input-2.hpp /^template> V)> K funcG(T t)$/;" Z function:funcG typeref:meta:typename I input-2.hpp /^template> V)> K funcG(T t)$/;" Z function:funcG typeref:typename:int J input-2.hpp /^template> V)> K funcG(T t)$/;" Z function:funcG typeref:typename:int funcH input-2.hpp /^template> V)> K funcH(T t)$/;" f typeref:typename:K template:> V)> T input-2.hpp /^template> V)> K funcH(T t)$/;" Z function:funcH typeref:meta:typename I input-2.hpp /^template> V)> K funcH(T t)$/;" Z function:funcH typeref:typename:int J input-2.hpp /^template> V)> K funcH(T t)$/;" Z function:funcH typeref:typename:int funcI input-2.hpp /^template> (1+2))> K funcI(T t)$/;" f typeref:typename:K template:> (1+2))> T input-2.hpp /^template> (1+2))> K funcI(T t)$/;" Z function:funcI typeref:meta:typename I input-2.hpp /^template> (1+2))> K funcI(T t)$/;" Z function:funcI typeref:typename:int J input-2.hpp /^template> (1+2))> K funcI(T t)$/;" Z function:funcI typeref:typename:int funcJ input-2.hpp /^template 2)> K funcJ(T t)$/;" f typeref:typename:K template:2)> T input-2.hpp /^template 2)> K funcJ(T t)$/;" Z function:funcJ typeref:meta:typename I input-2.hpp /^template 2)> K funcJ(T t)$/;" Z function:funcJ typeref:typename:int J input-2.hpp /^template 2)> K funcJ(T t)$/;" Z function:funcJ typeref:typename:int funcK input-2.hpp /^template I)> K funcK(T t)$/;" f typeref:typename:K template: I)> T input-2.hpp /^template I)> K funcK(T t)$/;" Z function:funcK typeref:meta:typename I input-2.hpp /^template I)> K funcK(T t)$/;" Z function:funcK typeref:typename:int J input-2.hpp /^template I)> K funcK(T t)$/;" Z function:funcK typeref:typename:int funcL input-2.hpp /^template L)> K funcL(T t)$/;" f typeref:typename:K template: L)> T input-2.hpp /^template L)> K funcL(T t)$/;" Z function:funcL typeref:meta:typename I input-2.hpp /^template L)> K funcL(T t)$/;" Z function:funcL typeref:typename:int L input-2.hpp /^template L)> K funcL(T t)$/;" Z function:funcL typeref:typename:int J input-2.hpp /^template L)> K funcL(T t)$/;" Z function:funcL typeref:typename:int funcO input-2.hpp /^template (1+2))> K funcO(T t)$/;" f typeref:typename:K template: (1+2))> T input-2.hpp /^template (1+2))> K funcO(T t)$/;" Z function:funcO typeref:meta:typename I input-2.hpp /^template (1+2))> K funcO(T t)$/;" Z function:funcO typeref:typename:int J input-2.hpp /^template (1+2))> K funcO(T t)$/;" Z function:funcO typeref:typename:unsigned int TestStruct input-3.hpp /^template struct TestStruct {};$/;" s template: T input-3.hpp /^template struct TestStruct {};$/;" Z struct:TestStruct typeref:meta:typename TemplateParameterStruct input-3.hpp /^template struct TemplateParameterStruct {};$/;" s template: T input-3.hpp /^template struct TemplateParameterStruct {};$/;" Z struct:TemplateParameterStruct typeref:meta:typename ParameterStruct input-3.hpp /^struct ParameterStruct {};$/;" s TestStruct input-3.hpp /^template <> struct TestStruct {};$/;" s template:<> specialization: TestStruct input-3.hpp /^template struct TestStruct> {};$/;" s template: specialization:> P input-3.hpp /^template struct TestStruct> {};$/;" Z struct:TestStruct typeref:meta:typename ================================================ FILE: Units/parser-cxx.r/template-nested-triangle-brackets.d/input-0.hpp ================================================ template class Foo {}; template > constexpr Foo bar {}; const int i = 3; ================================================ FILE: Units/parser-cxx.r/template-nested-triangle-brackets.d/input-1.hpp ================================================ // Derived from issued #2060 submitted by @dmhacker #include template > class failure {}; ================================================ FILE: Units/parser-cxx.r/template-nested-triangle-brackets.d/input-2.hpp ================================================ const int V = 10; template void funcA(T t) { } typedef int K; template void funcB(T t) { } template K funcC(T t) { return 0; } // The original comment: This stuff is allowed by C++03 // template> 2> K funcD(T t) // However, the above input is rejected with: // error: default template arguments may not be used in function templates // without `-std=c++11' or `-std=gnu++11' template> 2)> K funcD(T t) { return 0; } template> I)> K funcE(T t) { return 0; } template> L)> K funcF(T t) { return 0; } template> V)> K funcG(T t) { return 0; } template> V)> K funcH(T t) { return 0; } template> (1+2))> K funcI(T t) { return 0; } template 2)> K funcJ(T t) { return 0; } template I)> K funcK(T t) { return 0; } template L)> K funcL(T t) { return 0; } /* Without the knowledge of V these two are too ambiguous. template V> K funcM(T t) { return 0; } template V> K funcN(T t) { return 0; } */ template (1+2))> K funcO(T t) { return 0; } ================================================ FILE: Units/parser-cxx.r/template-nested-triangle-brackets.d/input-3.hpp ================================================ // Taken from the issue #2433 submitted by @andrejlevkovitch template struct TestStruct {}; template struct TemplateParameterStruct {}; struct ParameterStruct {}; template <> struct TestStruct {}; template struct TestStruct> {}; ================================================ FILE: Units/parser-cxx.r/template-nested-triangle-brackets.d/input.hpp ================================================ template , class _Comp1=less > > class Test : public set { typedef int xxx; }; // Taken from #1750 submitted by @tuarba. ================================================ FILE: Units/parser-cxx.r/template-nested-triangle-brackets.d/validator-2 ================================================ cxx11 ================================================ FILE: Units/parser-cxx.r/template-parameters.d/README ================================================ This reproduced a memory access error. Specify VG=1 when running make for reproducing the original issue. ================================================ FILE: Units/parser-cxx.r/template-parameters.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-cxx.r/template-parameters.d/expected.tags ================================================ B input.h /^template class B {$/;" c a input.h /^ A a;$/;" m class:B typeref:typename:A C input.h /^template class C {$/;" c b input.h /^ class B b;$/;" m class:C typeref:class:B ================================================ FILE: Units/parser-cxx.r/template-parameters.d/input.h ================================================ // -*- c++ -*- template class B { A a; }; template class C { class B b; }; ================================================ FILE: Units/parser-cxx.r/template-prototype.d/args.ctags ================================================ --sort=no --kinds-C++=+pZ --fields=+K ================================================ FILE: Units/parser-cxx.r/template-prototype.d/expected.tags ================================================ f input.cc /^template int f (T t);$/;" prototype typeref:typename:int file: T input.cc /^template int f (T t);$/;" tparam prototype:f typeref:meta:class g input.cc /^template int g (S s) {$/;" function typeref:typename:int S input.cc /^template int g (S s) {$/;" tparam function:g typeref:meta:class ================================================ FILE: Units/parser-cxx.r/template-prototype.d/input.cc ================================================ template int f (T t); template int g (S s) { return 0; } ================================================ FILE: Units/parser-cxx.r/template-specializations-including-op.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-cxx.r/template-specializations-including-op.d/expected.tags ================================================ Point input.cpp /^struct Point {$/;" s file: distance input.cpp /^ int distance(void) {$/;" f struct:Point typeref:typename:int file: NS input.cpp /^namespace NS {$/;" n file: MyReal input.cpp /^ using MyReal = float;$/;" t namespace:NS typeref:typename:float file: MyVec input.cpp /^ using MyVec = T[2];$/;" t namespace:NS typeref:typename:T[2] file: distance input.cpp /^int Point::distance(void) { return 1; }$/;" f class:Point typeref:typename:int distance input.cpp /^int Point::distance(void) { return 1; }$/;" f class:Point typeref:typename:int distance input.cpp /^int Point>::distance(void) { return 1; }$/;" f class:Point typeref:typename:int ================================================ FILE: Units/parser-cxx.r/template-specializations-including-op.d/input.cpp ================================================ template struct Point { int distance(void) { return 0; } }; namespace NS { using MyReal = float; template using MyVec = T[2]; }; template<> int Point::distance(void) { return 1; } template<> int Point::distance(void) { return 1; } template<> int Point>::distance(void) { return 1; } ================================================ FILE: Units/parser-cxx.r/template-specializations-including-op.d/validator ================================================ cxx11 ================================================ FILE: Units/parser-cxx.r/template-specializations.d/args.ctags ================================================ --sort=no --kinds-C++=* --fields=+sS --fields-c++=+{template}{properties}{specialization} ================================================ FILE: Units/parser-cxx.r/template-specializations.d/expected.tags ================================================ A input.cpp /^struct A {$/;" s file: template: T input.cpp /^template$/;" Z struct:A typeref:meta:typename f input.cpp /^ void f(T); \/\/ member, declared in the primary template$/;" p struct:A typeref:typename:void file: signature:(T) __anonc12ce61d010d input.cpp /^ void f(T); \/\/ member, declared in the primary template$/;" z prototype:A::f typeref:typename:T file: h input.cpp /^ void h(T) {} \/\/ member, defined in the primary template$/;" f struct:A typeref:typename:void file: signature:(T) __anonc12ce61d020d input.cpp /^ void h(T) {} \/\/ member, defined in the primary template$/;" z function:A::h typeref:typename:T file: g1 input.cpp /^ template void g1(T, X1); \/\/ member template$/;" p struct:A typeref:typename:void file: signature:(T,X1) template: X1 input.cpp /^ template void g1(T, X1); \/\/ member template$/;" Z prototype:A::g1 typeref:meta:class __anonc12ce61d030d input.cpp /^ template void g1(T, X1); \/\/ member template$/;" z prototype:A::g1 typeref:typename:T file: __anonc12ce61d040d input.cpp /^ template void g1(T, X1); \/\/ member template$/;" z prototype:A::g1 typeref:typename:X1 file: g2 input.cpp /^ template void g2(T, X2); \/\/ member template$/;" p struct:A typeref:typename:void file: signature:(T,X2) template: X2 input.cpp /^ template void g2(T, X2); \/\/ member template$/;" Z prototype:A::g2 typeref:meta:class __anonc12ce61d050d input.cpp /^ template void g2(T, X2); \/\/ member template$/;" z prototype:A::g2 typeref:typename:T file: __anonc12ce61d060d input.cpp /^ template void g2(T, X2); \/\/ member template$/;" z prototype:A::g2 typeref:typename:X2 file: f input.cpp /^template<> void A::f(int);$/;" p class:A typeref:typename:void file: signature:(int) template:<> properties:scopespecialization,specialization __anonc12ce61d070d input.cpp /^template<> void A::f(int);$/;" z prototype:A::f typeref:typename:int file: h input.cpp /^template<> void A::h(int) {}$/;" f class:A typeref:typename:void signature:(int) template:<> properties:scopespecialization,specialization __anonc12ce61d080d input.cpp /^template<> void A::h(int) {}$/;" z function:A::h typeref:typename:int file: g1 input.cpp /^template void A::g1(T, X1) { }$/;" f class:A typeref:typename:void signature:(T,X1) template: properties:scopespecialization,specialization X1 input.cpp /^template void A::g1(T, X1) { }$/;" Z function:A::g1 typeref:meta:class __anonc12ce61d090d input.cpp /^template void A::g1(T, X1) { }$/;" z function:A::g1 typeref:typename:T file: __anonc12ce61d0a0d input.cpp /^template void A::g1(T, X1) { }$/;" z function:A::g1 typeref:typename:X1 file: g1 input.cpp /^template void A::g1(int, X1);$/;" p class:A typeref:typename:void file: signature:(int,X1) template: properties:scopespecialization,specialization X1 input.cpp /^template void A::g1(int, X1);$/;" Z prototype:A::g1 typeref:meta:class __anonc12ce61d0b0d input.cpp /^template void A::g1(int, X1);$/;" z prototype:A::g1 typeref:typename:int file: __anonc12ce61d0c0d input.cpp /^template void A::g1(int, X1);$/;" z prototype:A::g1 typeref:typename:X1 file: g2 input.cpp /^template<> void A::g2(int, char); \/\/ for X2 = char$/;" p class:A typeref:typename:void file: signature:(int,char) template:<> specialization: properties:scopespecialization,specialization __anonc12ce61d0d0d input.cpp /^template<> void A::g2(int, char); \/\/ for X2 = char$/;" z prototype:A::g2 typeref:typename:int file: __anonc12ce61d0e0d input.cpp /^template<> void A::g2(int, char); \/\/ for X2 = char$/;" z prototype:A::g2 typeref:typename:char file: g1 input.cpp /^template<> void A::g1(int, char);$/;" p class:A typeref:typename:void file: signature:(int,char) template:<> properties:scopespecialization,specialization __anonc12ce61d0f0d input.cpp /^template<> void A::g1(int, char);$/;" z prototype:A::g1 typeref:typename:int file: __anonc12ce61d100d input.cpp /^template<> void A::g1(int, char);$/;" z prototype:A::g1 typeref:typename:char file: m input.cpp /^template void m(X)$/;" f typeref:typename:void signature:(X) template: X input.cpp /^template void m(X)$/;" Z function:m typeref:meta:typename __anonc12ce61d110d input.cpp /^template void m(X)$/;" z function:m typeref:typename:X file: m input.cpp /^template<> void m(int)$/;" f typeref:typename:void signature:(int) template:<> specialization: properties:specialization __anonc12ce61d120d input.cpp /^template<> void m(int)$/;" z function:m typeref:typename:int file: m input.cpp /^template<> void m>(A a)$/;" f typeref:typename:void signature:(A a) template:<> specialization:> properties:specialization a input.cpp /^template<> void m>(A a)$/;" z function:m typeref:typename:A file: B input.cpp /^struct B { };$/;" s file: m input.cpp /^template<> void m(B)$/;" f typeref:typename:void signature:(B) template:<> specialization: properties:specialization __anonc12ce61d130d input.cpp /^template<> void m(B)$/;" z function:m typeref:typename:B file: m input.cpp /^template<> void m(char)$/;" f typeref:typename:void signature:(char) template:<> properties:specialization __anonc12ce61d140d input.cpp /^template<> void m(char)$/;" z function:m typeref:typename:char file: C input.cpp /^class C {};$/;" c file: template: T1 input.cpp /^template$/;" Z class:C typeref:meta:class T2 input.cpp /^template$/;" Z class:C typeref:meta:class I input.cpp /^template$/;" Z class:C typeref:typename:int C input.cpp /^class C {};$/;" c file: template: specialization: T input.cpp /^template$/;" Z class:C typeref:meta:class I input.cpp /^template$/;" Z class:C typeref:typename:int C input.cpp /^class C {};$/;" c file: template: specialization: T input.cpp /^template$/;" Z class:C typeref:meta:class T2 input.cpp /^template$/;" Z class:C typeref:meta:class I input.cpp /^template$/;" Z class:C typeref:typename:int C input.cpp /^class C {};$/;" c file: template: specialization: T input.cpp /^template$/;" Z class:C typeref:meta:class C input.cpp /^class C {};$/;" c file: template: specialization: X input.cpp /^template$/;" Z class:C typeref:meta:class T input.cpp /^template$/;" Z class:C typeref:meta:class I input.cpp /^template$/;" Z class:C typeref:typename:int ================================================ FILE: Units/parser-cxx.r/template-specializations.d/input.cpp ================================================ template struct A { void f(T); // member, declared in the primary template void h(T) {} // member, defined in the primary template template void g1(T, X1); // member template template void g2(T, X2); // member template }; // specialization of a member template<> void A::f(int); // member specialization OK even if defined in-class template<> void A::h(int) {} // out of class member template definition template template void A::g1(T, X1) { } // member template specialization template<> template void A::g1(int, X1); // member template specialization template<> template<> void A::g2(int, char); // for X2 = char // same, using template argument deduction (X1 = char) template<> template<> void A::g1(int, char); template void m(X) { } template<> void m(int) { } template<> void m>(A a) { } // bug #2181 struct B { }; template<> void m(B) { } template<> void m(char) { } #if HANDLE_BROKEN_INPUT // This is broken input. Should *not* be extracted. template <> void int(int a); #endif // Examples from the "manual". // primary template template class C {}; //partial specialization where T2 is a pointer to T1 template class C {}; // partial specialization where T1 is a pointer template class C {}; // partial specialization where T1 is int, I is 5, and T2 is a pointer template class C {}; // partial specialization where T2 is a pointer template class C {}; ================================================ FILE: Units/parser-cxx.r/templates-enable-if.d/args.ctags ================================================ --sort=no --kinds-C++=* --fields-c++=+{template} ================================================ FILE: Units/parser-cxx.r/templates-enable-if.d/expected.tags ================================================ A input.cpp /^class A$/;" c file: f1 input.cpp /^ typename std::enable_if<2 << 3,int>::type f1(X x)$/;" f class:A typeref:typename:std::enable_if<2<<3,int>::type file: template: X input.cpp /^ template $/;" Z function:A::f1 typeref:meta:typename x input.cpp /^ typename std::enable_if<2 << 3,int>::type f1(X x)$/;" z function:A::f1 typeref:typename:X file: f2 input.cpp /^ typename std::enable_if::type f2(X x)$/;" f class:A typeref:typename:std::enable_if::type file: template: X input.cpp /^ template $/;" Z function:A::f2 typeref:meta:typename x input.cpp /^ typename std::enable_if::type f2(X x)$/;" z function:A::f2 typeref:typename:X file: B input.cpp /^class B$/;" c file: ================================================ FILE: Units/parser-cxx.r/templates-enable-if.d/input.cpp ================================================ #include class A { public: template typename std::enable_if<2 << 3,int>::type f1(X x) { return (int)x; }; template typename std::enable_if::type f2(X x) { return (int)x; }; }; class B { }; ================================================ FILE: Units/parser-cxx.r/templates-in-labmdas-1.cpp.d/args.ctags ================================================ --kinds-c++=+cfl --fields=+SsK --fields-c++=+{captures} --sort=no ================================================ FILE: Units/parser-cxx.r/templates-in-labmdas-1.cpp.d/expected.tags ================================================ Bar input.cpp /^class Bar$/;" class file: foo input.cpp /^ A foo()$/;" function class:Bar typeref:typename:A file: signature:() f1 input.cpp /^int f1()$/;" function typeref:typename:int signature:() b input.cpp /^ Bar b;$/;" local function:f1 typeref:typename:Bar file: t input.cpp /^ auto t = b.template foo();$/;" local function:f1 typeref:typename:auto file: f2 input.cpp /^int f2()$/;" function typeref:typename:int signature:() b input.cpp /^ Bar b;$/;" local function:f2 typeref:typename:Bar file: __anon1763e7850102 input.cpp /^ auto l = [](auto & p){ return p.template foo();};$/;" function function:f2 file: signature:(auto & p) captures:[] l input.cpp /^ auto l = [](auto & p){ return p.template foo();};$/;" local function:f2 typeref:typename:auto file: main input.cpp /^int main()$/;" function typeref:typename:int signature:() ================================================ FILE: Units/parser-cxx.r/templates-in-labmdas-1.cpp.d/input.cpp ================================================ // Bug reported by akrzyz on github. template class Bar { public: template A foo() { return A{}; } }; int f1() { Bar b; auto t = b.template foo(); return t; } int f2() { Bar b; auto l = [](auto & p){ return p.template foo();}; return l(b); } int main() { return f1() + f2(); } ================================================ FILE: Units/parser-cxx.r/templates-in-labmdas-2.cpp.d/args.ctags ================================================ --kinds-c++=+cfl --fields=+SsKe --fields-c++=+{template}{captures} --sort=no ================================================ FILE: Units/parser-cxx.r/templates-in-labmdas-2.cpp.d/expected.tags ================================================ Foo input.cpp /^namespace Foo$/;" namespace file: end:10 bar input.cpp /^T bar() $/;" function namespace:Foo typeref:typename:T signature:() end:9 template: main input.cpp /^int main()$/;" function typeref:typename:int signature:() end:16 __anonaa3dc9860102 input.cpp /^ auto l = []{return Foo::template bar();};$/;" function function:main file: end:14 captures:[] l input.cpp /^ auto l = []{return Foo::template bar();};$/;" local function:main typeref:typename:auto file: end:14 ================================================ FILE: Units/parser-cxx.r/templates-in-labmdas-2.cpp.d/input.cpp ================================================ // Bug reported by akrzyz on github. namespace Foo { template T bar() { return T{}; }; } int main() { auto l = []{return Foo::template bar();}; return l(); } ================================================ FILE: Units/parser-cxx.r/templates.d/args.ctags ================================================ --sort=no --extras=+q --kinds-C++=* --fields-c++=+{template} ================================================ FILE: Units/parser-cxx.r/templates.d/expected.tags ================================================ zero input.cpp /^zero (const T &v1, const T &v2)$/;" f typeref:typename:int template: T input.cpp /^template int $/;" Z function:zero typeref:meta:typename v1 input.cpp /^zero (const T &v1, const T &v2)$/;" z function:zero typeref:typename:const T & file: v2 input.cpp /^zero (const T &v1, const T &v2)$/;" z function:zero typeref:typename:const T & file: min input.cpp /^min(const T&v1, const T&v2)$/;" f typeref:typename:T template: T input.cpp /^template inline T $/;" Z function:min typeref:meta:typename v1 input.cpp /^min(const T&v1, const T&v2)$/;" z function:min typeref:typename:const T & file: v2 input.cpp /^min(const T&v1, const T&v2)$/;" z function:min typeref:typename:const T & file: Item input.cpp /^class Item$/;" c file: template: Type input.cpp /^template $/;" Z class:Item typeref:meta:class Item::Type input.cpp /^template $/;" Z class:Item typeref:meta:class Item input.cpp /^ Item(const Type &t) : item (t), next (0) { }$/;" f class:Item file: Item::Item input.cpp /^ Item(const Type &t) : item (t), next (0) { }$/;" f class:Item file: t input.cpp /^ Item(const Type &t) : item (t), next (0) { }$/;" z function:Item::Item typeref:typename:const Type & file: item input.cpp /^ Type item;$/;" m class:Item typeref:typename:Type file: Item::item input.cpp /^ Type item;$/;" m class:Item typeref:typename:Type file: next input.cpp /^ Item *next;$/;" m class:Item typeref:typename:Item * file: Item::next input.cpp /^ Item *next;$/;" m class:Item typeref:typename:Item * file: constant input.cpp /^template const T constant = T(10.0);/;" v typeref:typename:const T template: T input.cpp /^template const T constant = T(10.0);/;" Z variable:constant typeref:meta:typename constant::T input.cpp /^template const T constant = T(10.0);/;" Z variable:constant typeref:meta:typename ================================================ FILE: Units/parser-cxx.r/templates.d/input.cpp ================================================ template int zero (const T &v1, const T &v2) { return 0; } template inline T min(const T&v1, const T&v2) { if (v1 < v2) return v1; else return v2; } template class Item { Item(const Type &t) : item (t), next (0) { } Type item; Item *next; }; template const T constant = T(10.0); ================================================ FILE: Units/parser-cxx.r/templates2.d/args.ctags ================================================ --sort=no --extras=+q --kinds-C++=* --fields-c++=+{template} ================================================ FILE: Units/parser-cxx.r/templates2.d/expected.tags ================================================ foo1 input.cpp /^auto foo1(const Container & p_container)$/;" f typeref:typename:auto template: class Container,class Elem> Elem input.cpp /^template class Container, class Elem>$/;" Z function:foo1 typeref:meta:class p_container input.cpp /^auto foo1(const Container & p_container)$/;" z function:foo1 typeref:typename:const Container & file: foo2 input.cpp /^auto foo2(const Container & p_container)$/;" f typeref:typename:auto template: class Container,class Key,class Elem> Key input.cpp /^template class Container, class Key, class Elem>$/;" Z function:foo2 typeref:meta:class Elem input.cpp /^template class Container, class Key, class Elem>$/;" Z function:foo2 typeref:meta:class p_container input.cpp /^auto foo2(const Container & p_container)$/;" z function:foo2 typeref:typename:const Container & file: bar input.cpp /^void bar()$/;" f typeref:typename:void main input.cpp /^int main()$/;" f typeref:typename:int v input.cpp /^ auto v = foo1(std::vector{1,2,3});$/;" l function:main typeref:typename:auto file: m input.cpp /^ auto m = foo2(std::map{{1,2}});$/;" l function:main typeref:typename:auto file: ================================================ FILE: Units/parser-cxx.r/templates2.d/input.cpp ================================================ /* bug reported by akrzyz on 2016.03.10: no tags were emitted */ #include #include template class Container, class Elem> auto foo1(const Container & p_container) { return Container{}; } template class Container, class Key, class Elem> auto foo2(const Container & p_container) { return Container{}; } void bar() { } int main() { auto v = foo1(std::vector{1,2,3}); auto m = foo2(std::map{{1,2}}); return 0; } ================================================ FILE: Units/parser-cxx.r/templates3.d/args.ctags ================================================ --sort=no --extras=+q --kinds-C++=* --fields-c++=+{template} ================================================ FILE: Units/parser-cxx.r/templates3.d/expected.tags ================================================ makeArrayRef input.cpp /^makeArrayRef(ValueType (&p_data)[N], SizeType& p_size)$/;" f typeref:typename:boost::disable_if_c>::type template: ValueType input.cpp /^template $/;" Z function:makeArrayRef typeref:meta:typename N input.cpp /^template $/;" Z function:makeArrayRef typeref:typename:int SizeType input.cpp /^template $/;" Z function:makeArrayRef typeref:meta:typename p_data input.cpp /^makeArrayRef(ValueType (&p_data)[N], SizeType& p_size)$/;" z function:makeArrayRef typeref:typename:ValueType (&)[N] file: p_size input.cpp /^makeArrayRef(ValueType (&p_data)[N], SizeType& p_size)$/;" z function:makeArrayRef typeref:typename:SizeType & file: foo input.cpp /^void foo()$/;" f typeref:typename:void ================================================ FILE: Units/parser-cxx.r/templates3.d/input.cpp ================================================ /* bug reported by akrzyz on 2016.03.10: tags for makeArrayRef were not emitted */ template typename boost::disable_if_c >::type makeArrayRef(ValueType (&p_data)[N], SizeType& p_size) { return ArrayRef(p_data, p_size); } void foo() { } ================================================ FILE: Units/parser-cxx.r/templates4.d/args.ctags ================================================ --sort=no --extras=+q --kinds-C++=* --fields-c++=+{template} ================================================ FILE: Units/parser-cxx.r/templates4.d/expected.tags ================================================ INT input.cpp /^#define INT /;" d file: x input.cpp /^template INT x(void) { return 0; }$/;" f typeref:typename:INT template: i input.cpp /^template INT x(void) { return 0; }$/;" Z function:x typeref:typename:char B input.cpp /^template INT x(void) { return 0; }$/;" Z function:x typeref:typename:bool ================================================ FILE: Units/parser-cxx.r/templates4.d/input.cpp ================================================ #define INT int template INT x(void) { return 0; } ================================================ FILE: Units/parser-cxx.r/templates5.d/args.ctags ================================================ --sort=no --kinds-C++=* --fields-c++=+{template} ================================================ FILE: Units/parser-cxx.r/templates5.d/expected.tags ================================================ Checks input.cpp /^struct Checks$/;" s file: Check input.cpp /^ template static constexpr bool Check()$/;" f struct:Checks typeref:typename:bool file: template: X input.cpp /^ template static constexpr bool Check()$/;" Z function:Checks::Check typeref:meta:typename S input.cpp /^template(),bool>::type = true> cla/;" c file: template: (),bool>::type=true> A input.cpp /^template(),bool>::type = true> cla/;" Z class:S typeref:meta:typename foo input.cpp /^ template void foo(){}$/;" f class:S typeref:typename:void file: template: U input.cpp /^ template void foo(){}$/;" Z function:S::foo typeref:meta:typename bar input.cpp /^template void bar()$/;" f typeref:typename:void template: T input.cpp /^template void bar()$/;" Z function:bar typeref:meta:typename s input.cpp /^ S s;$/;" l function:bar typeref:typename:S file: marker input.cpp /^int marker;$/;" v typeref:typename:int ================================================ FILE: Units/parser-cxx.r/templates5.d/input.cpp ================================================ // template keyword used as disambiguator for dependent names #include struct Checks { template static constexpr bool Check() { return true; } }; template(),bool>::type = true> class S { template void foo(){} }; template void bar() { S s; s.template foo(); } // Marker to make sure the parser doesn't bail out before this line. int marker; ================================================ FILE: Units/parser-cxx.r/templates6.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-cxx.r/templates6.d/expected.tags ================================================ X input.hpp /^namespace X {$/;" n C input.hpp /^template class X::C$/;" c class:X C input.hpp /^ C(void) {$/;" f class:X::C D input.hpp /^template class D$/;" c D input.hpp /^ D(void) {$/;" f class:D Stack input-0.cpp /^class Stack$/;" c file: size input-0.cpp /^ std::size_t size;$/;" m class:Stack typeref:typename:std::size_t file: stack input-0.cpp /^ std::vector stack;$/;" m class:Stack typeref:typename:std::vector file: ~Stack input-0.cpp /^ ~Stack(){};$/;" f class:Stack file: Stack input-0.cpp /^ Stack(std::size_t n) {$/;" f class:Stack file: main input-0.cpp /^int main() {$/;" f typeref:typename:int ================================================ FILE: Units/parser-cxx.r/templates6.d/input-0.cpp ================================================ // Taken from #3390 submitted by @delsner #include #include template class Stack { private: std::size_t size; std::vector stack; public: ~Stack(){}; // Not recognized by ctags. Stack(std::size_t n) { size = n; std::cout << "Constructing a `Stack`\n"; } }; int main() { Stack sf{2}; return 0; } ================================================ FILE: Units/parser-cxx.r/templates6.d/input.hpp ================================================ namespace X { template class C; }; template class X::C { public: C(void) { } }; template class D { public: D(void) { } }; ================================================ FILE: Units/parser-cxx.r/templates6.d/validator ================================================ cxx11 ================================================ FILE: Units/parser-cxx.r/templates7.d/args.ctags ================================================ --sort=no --kinds-C++=* --fields-c++=+{template} ================================================ FILE: Units/parser-cxx.r/templates7.d/expected.tags ================================================ foo input.hpp /^A foo()$/;" f typeref:typename:A template: A input.hpp /^template$/;" Z function:foo typeref:meta:typename B input.hpp /^template$/;" Z function:foo typeref:meta:typename bar input.hpp /^A& bar(A& a, const B& b)$/;" f typeref:typename:A & template: A input.hpp /^template$/;" Z function:bar typeref:meta:typename B input.hpp /^template$/;" Z function:bar typeref:meta:typename a input.hpp /^A& bar(A& a, const B& b)$/;" z function:bar typeref:typename:A & file: b input.hpp /^A& bar(A& a, const B& b)$/;" z function:bar typeref:typename:const B & file: ================================================ FILE: Units/parser-cxx.r/templates7.d/input.hpp ================================================ template A foo() { return A(); } template A& bar(A& a, const B& b) { return a; } ================================================ FILE: Units/parser-cxx.r/templates7.d/validator ================================================ cxx11 ================================================ FILE: Units/parser-cxx.r/templates8.d/README ================================================ This is a crash test. The input is invalid as C++ code. ================================================ FILE: Units/parser-cxx.r/templates8.d/input.cpp ================================================ template struct A { S(); }; ================================================ FILE: Units/parser-cxx.r/typedef-of-function-ptr-with-macro.d/expected.tags ================================================ a input.cpp /^typedef void (WINAPI a) (void);$/;" t typeref:typename:void (WINAPI)(void) file: b input.cpp /^typedef void (WINAPI* b) (void);$/;" t typeref:typename:void (WINAPI *)(void) file: ================================================ FILE: Units/parser-cxx.r/typedef-of-function-ptr-with-macro.d/input.cpp ================================================ typedef void (WINAPI a) (void); typedef void (WINAPI* b) (void); ================================================ FILE: Units/parser-cxx.r/typedefs.cpp.d/args.ctags ================================================ --kinds-c++=t --fields=+t --sort=no ================================================ FILE: Units/parser-cxx.r/typedefs.cpp.d/expected.tags ================================================ T001 input.cpp /^typedef struct AStruct T001;$/;" t typeref:struct:AStruct file: T002 input.cpp /^typedef class AClass T002;$/;" t typeref:class:AClass file: T003 input.cpp /^typedef union AUnion T003;$/;" t typeref:union:AUnion file: T004 input.cpp /^typedef enum AEnum T004;$/;" t typeref:enum:AEnum file: T101 input.cpp /^typedef struct { int a; } T101;$/;" t typeref:struct:__anon0e56f3370108 file: T102 input.cpp /^typedef union { int a; int b; } T102;$/;" t typeref:union:__anon0e56f337020a file: T103 input.cpp /^typedef enum { E2 } T103;$/;" t typeref:enum:__anon0e56f3370303 file: T201 input.cpp /^typedef int* T201;$/;" t typeref:typename:int * file: T202 input.cpp /^typedef const AClass* * T202;$/;" t typeref:typename:const AClass ** file: T301 input.cpp /^typedef int (*T301) (int &,int , AUnion *);$/;" t typeref:typename:int (*)(int &,int,AUnion *) file: T302 input.cpp /^typedef AClass &(* T302)(AClass &);$/;" t typeref:typename:AClass & (*)(AClass &) file: T303 input.cpp /^typedef struct AStruct (*T303)(struct AStruct &);$/;" t typeref:struct:AStruct (*)(struct AStruct &) file: T304 input.cpp /^typedef int (T304)(int);$/;" t typeref:typename:int ()(int) file: T305 input.cpp /^typedef struct AStruct (T305)(int);$/;" t typeref:struct:AStruct ()(int) file: T306 input.cpp /^typedef union AUnion & (T306)(int);$/;" t typeref:union:AUnion & ()(int) file: T307 input.cpp /^typedef AClass (T307)(int);$/;" t typeref:typename:AClass ()(int) file: T308 input.cpp /^typedef enum AEnum (T308)(int);$/;" t typeref:enum:AEnum ()(int) file: T309 input.cpp /^typedef int T309(int);$/;" t typeref:typename:int ()(int) file: T310 input.cpp /^typedef int T310(AUnion *);$/;" t typeref:typename:int ()(AUnion *) file: T401 input.cpp /^typedef int T401 [ 10];$/;" t typeref:typename:int[10] file: T501 input.cpp /^typedef ATemplate1 T501;$/;" t typeref:typename:ATemplate1 file: T502 input.cpp /^typedef ATemplate1< unsigned short int> T502;$/;" t typeref:typename:ATemplate1 file: T503 input.cpp /^typedef ATemplate1 > T503;$/;" t typeref:typename:ATemplate1> file: T504 input.cpp /^typedef ATemplate1 (*T504)();$/;" t typeref:typename:ATemplate1 (*)() file: T601 input.cpp /^ typedef typename Type::iterator1 T601;$/;" t class:Container typeref:typename:Type::iterator1 file: T602 input.cpp /^ typedef typename Type :: iterator2 T602;$/;" t class:Container typeref:typename:Type::iterator2 file: T603 input.cpp /^ typedef ATemplate1 T603;$/;" t class:Container typeref:typename:ATemplate1 file: T604 input.cpp /^ typedef int (*T604)(ATemplate1 &);$/;" t class:Container typeref:typename:int (*)(ATemplate1 &) file: T701 input.cpp /^typedef DECLPOINTER(struct AStruct) T701;$/;" t file: T801 input.cpp /^} T801, *T802;$/;" t typeref:struct:_ABC file: T802 input.cpp /^} T801, *T802;$/;" t typeref:struct:_ABC * file: T803 input.cpp /^typedef int T803, *T804, **T805;$/;" t typeref:typename:int file: T804 input.cpp /^typedef int T803, *T804, **T805;$/;" t typeref:typename:int * file: T805 input.cpp /^typedef int T803, *T804, **T805;$/;" t typeref:typename:int ** file: T806 input.cpp /^typedef ATemplate2< ATemplate2< ATemplate1, AClass>, AStruct> T806, **T807;$/;" t typeref:typename:ATemplate2,AClass>,AStruct> file: T807 input.cpp /^typedef ATemplate2< ATemplate2< ATemplate1, AClass>, AStruct> T806, **T807;$/;" t typeref:typename:ATemplate2,AClass>,AStruct> ** file: T808 input.cpp /^typedef int T808, *T809, (&T810)(int, int *), T811[10], &T812;$/;" t typeref:typename:int file: T809 input.cpp /^typedef int T808, *T809, (&T810)(int, int *), T811[10], &T812;$/;" t typeref:typename:int * file: T810 input.cpp /^typedef int T808, *T809, (&T810)(int, int *), T811[10], &T812;$/;" t typeref:typename:int (&)(int,int *) file: T811 input.cpp /^typedef int T808, *T809, (&T810)(int, int *), T811[10], &T812;$/;" t typeref:typename:int[10] file: T812 input.cpp /^typedef int T808, *T809, (&T810)(int, int *), T811[10], &T812;$/;" t typeref:typename:int & file: T901 input.cpp /^} T901, *T902;$/;" t typeref:typename:const struct AStruct1 file: T902 input.cpp /^} T901, *T902;$/;" t typeref:typename:const struct AStruct1 * file: T903 input.cpp /^typedef const struct AStruct1 T903;$/;" t typeref:typename:const struct AStruct1 file: T904 input.cpp /^typedef const struct AStruct1 * T904,* T905;$/;" t typeref:typename:const struct AStruct1 * file: T905 input.cpp /^typedef const struct AStruct1 * T904,* T905;$/;" t typeref:typename:const struct AStruct1 * file: T906 input.cpp /^typedef volatile struct AStruct1 * T906;$/;" t typeref:typename:volatile struct AStruct1 * file: T907 input.cpp /^typedef const enum AEnum T907, &T908;$/;" t typeref:typename:const enum AEnum file: T908 input.cpp /^typedef const enum AEnum T907, &T908;$/;" t typeref:typename:const enum AEnum & file: ================================================ FILE: Units/parser-cxx.r/typedefs.cpp.d/input.cpp ================================================ // Note that in this file spacing matters: ctags should normalize it. // Auxiliary declarations struct AStruct {}; class AClass {}; union AUnion {}; enum AEnum { E1 }; template class ATemplate1; template class ATemplate2; // class/struct/union/enum typedefs typedef struct AStruct T001; typedef class AClass T002; typedef union AUnion T003; typedef enum AEnum T004; // typedefs with anonymous types typedef struct { int a; } T101; typedef union { int a; int b; } T102; typedef enum { E2 } T103; // plain types, pointers etc typedef int* T201; typedef const AClass* * T202; // function pointers and functions typedef int (*T301) (int &,int , AUnion *); typedef AClass &(* T302)(AClass &); typedef struct AStruct (*T303)(struct AStruct &); typedef int (T304)(int); typedef struct AStruct (T305)(int); typedef union AUnion & (T306)(int); typedef AClass (T307)(int); typedef enum AEnum (T308)(int); typedef int T309(int); typedef int T310(AUnion *); #if 0 // broken input (to make coveralls happy) typedef int int(int); #endif // arrays typedef int T401 [ 10]; // stuff containing template instantiations typedef ATemplate1 T501; typedef ATemplate1< unsigned short int> T502; typedef ATemplate1 > T503; typedef ATemplate1 (*T504)(); // typedefs within a class template class Container { public: typedef typename Type::iterator1 T601; typedef typename Type :: iterator2 T602; typedef ATemplate1 T603; typedef int (*T604)(ATemplate1 &); }; // This should appear as typedef but have not typeref since we can't resolve macros #define DECLPOINTER(name) name * typedef DECLPOINTER(struct AStruct) T701; // Multiple typedefs typedef struct _ABC { int a; int b; } T801, *T802; typedef int T803, *T804, **T805; typedef ATemplate2< ATemplate2< ATemplate1, AClass>, AStruct> T806, **T807; typedef int T808, *T809, (&T810)(int, int *), T811[10], &T812; // Typedefs with const/volatile prefix typedef const struct AStruct1 { int a; } T901, *T902; typedef const struct AStruct1 T903; typedef const struct AStruct1 * T904,* T905; typedef volatile struct AStruct1 * T906; typedef const enum AEnum T907, &T908; ================================================ FILE: Units/parser-cxx.r/unclosed-angle-bracket.d/README ================================================ This is a crash test. ================================================ FILE: Units/parser-cxx.r/unclosed-angle-bracket.d/input.cxx ================================================ class<><{[]{class< ================================================ FILE: Units/parser-cxx.r/using-in-template.d/args.ctags ================================================ --sort=no --kinds-C++=* --fields=+stKZ --fields-C++=+{template} ================================================ FILE: Units/parser-cxx.r/using-in-template.d/expected.tags ================================================ V input.cpp /^using V = std::vector;$/;" typedef typeref:typename:std::vector file: template: T input.cpp /^template $/;" tparam scope:typedef:V typeref:meta:class ================================================ FILE: Units/parser-cxx.r/using-in-template.d/input.cpp ================================================ #include template using V = std::vector; ================================================ FILE: Units/parser-cxx.r/using.cpp.d/args.ctags ================================================ --fields=+SKr --kinds-C++=+pUN --extras=+r ================================================ FILE: Units/parser-cxx.r/using.cpp.d/expected.tags ================================================ A input.cpp /^class A$/;" class file: roles:def B input.cpp /^class B : public A$/;" class file: roles:def operator () input.cpp /^ using A::operator();$/;" name class:B roles:def operator () input.cpp /^ void operator ()() {};$/;" function class:A typeref:typename:void file: signature:() roles:def operator + input.cpp /^ int operator +(int i) { return i; };$/;" function class:A typeref:typename:int file: signature:(int i) roles:def operator + input.cpp /^ using A::operator+;$/;" name class:B roles:def std input.cpp /^using namespace std;$/;" using file: roles:def string input.cpp /^#include /;" header roles:system string input.cpp /^using std::string;$/;" name file: roles:def test input.cpp /^ using A::test;$/;" name class:B roles:def test input.cpp /^ void test();$/;" prototype class:A typeref:typename:void file: signature:() roles:def test input.cpp /^ void test(x t);$/;" prototype class:B typeref:typename:void file: signature:(x t) roles:def x input.cpp /^using x = std::string;$/;" typedef typeref:typename:std::string file: roles:def ================================================ FILE: Units/parser-cxx.r/using.cpp.d/input.cpp ================================================ #include using namespace std; using std::string; using x = std::string; class A { public: void test(); void operator ()() {}; int operator +(int i) { return i; }; }; class B : public A { public: void test(x t); using A::test; using A::operator(); using A::operator+; }; ================================================ FILE: Units/parser-cxx.r/variable-declarations.cpp.d/args.ctags ================================================ --kinds-c++=lvm # for testing that the parser can skip __declspec --kinds-c++=+d --param-CPreProcessor._expand=true --fields=+{signature} --fields-c++=+{macrodef} ================================================ FILE: Units/parser-cxx.r/variable-declarations.cpp.d/expected.tags ================================================ MY_API input.cpp /^#define MY_API /;" d file: macrodef:__declspec(dllexport) SIZE input.cpp /^#define SIZE /;" d file: macrodef:25 l01 input.cpp /^ unsigned short int l01;$/;" l function:main typeref:typename:unsigned short int file: l02 input.cpp /^ unsigned long long int * const l02 = NULL, * l03 = NULL;$/;" l function:main typeref:typename:unsigned long long int * const file: l03 input.cpp /^ unsigned long long int * const l02 = NULL, * l03 = NULL;$/;" l function:main typeref:typename:unsigned long long int * const * file: l04 input.cpp /^ register int ** l04 = 0;$/;" l function:main typeref:typename:register int ** file: l05 input.cpp /^ std::string l05;$/;" l function:main typeref:typename:std::string file: l06 input.cpp /^ std::string l06("test");$/;" l function:main typeref:typename:std::string file: l07 input.cpp /^ std::string l07 = "test";$/;" l function:main typeref:typename:std::string file: l08 input.cpp /^ const std::string & l08 = l07, l09 = l07;$/;" l function:main typeref:typename:const std::string & file: l09 input.cpp /^ const std::string & l08 = l07, l09 = l07;$/;" l function:main typeref:typename:const std::string file: l10 input.cpp /^ const void * (*l10)() = NULL;$/;" l function:main typeref:typename:const void * (*)() file: l11 input.cpp /^ unsigned long int & (*l11)(void *);$/;" l function:main typeref:typename:unsigned long int & (*)(void *) file: l12 input.cpp /^ std::string & (*l12)(void);$/;" l function:main typeref:typename:std::string & (*)(void) file: l13 input.cpp /^ std::string ** (*l13)(int a,int b);$/;" l function:main typeref:typename:std::string ** (*)(int a,int b) file: l14 input.cpp /^ std::basic_string, std::allocator > l14;$/;" l function:main typeref:typename:std::basic_string,std::allocator> file: l15 input.cpp /^ struct Struct1 l15;$/;" l function:main typeref:struct:Struct1 file: l16 input.cpp /^ struct Struct1 * l16, l17, l18[10];$/;" l function:main typeref:struct:Struct1 * file: l17 input.cpp /^ struct Struct1 * l16, l17, l18[10];$/;" l function:main typeref:struct:Struct1 file: l18 input.cpp /^ struct Struct1 * l16, l17, l18[10];$/;" l function:main typeref:struct:Struct1[10] file: l19 input.cpp /^ Struct1 l19 = {};$/;" l function:main typeref:typename:Struct1 file: l20 input.cpp /^ std::string ** l20[SIZE];$/;" l function:main typeref:typename:std::string ** [25] file: l21 input.cpp /^ std::string l21[1 << 2];$/;" l function:main typeref:typename:std::string[] file: l22 input.cpp /^ std::string * l22[SIZE][SIZE];$/;" l function:main typeref:typename:std::string * [25][25] file: l23 input.cpp /^ std::string l23[5][2];$/;" l function:main typeref:typename:std::string[5][2] file: l24 input.cpp /^ std::string * const l24 = 0;$/;" l function:main typeref:typename:std::string * const file: l25 input.cpp /^ wchar_t l25[] = { L"кошка" };$/;" l function:main typeref:typename:wchar_t[] file: l26 input.cpp /^ wchar_t l26[] { L'к', L'о', L'ш', L'к', L'а', L'\\0' };$/;" l function:main typeref:typename:wchar_t[] file: l27 input.cpp /^ std::string l27[] = { std::string("one"),"two",{'t', 'h', 'r', 'e', 'e'} };$/;" l function:main typeref:typename:std::string[] file: l28 input.cpp /^ int l28 {};$/;" l function:main typeref:typename:int file: l29 input.cpp /^ bool l29 { false };$/;" l function:main typeref:typename:bool file: l30 input.cpp /^ std::string * l30{ new std::string("test") };$/;" l function:main typeref:typename:std::string * file: l31 input.cpp /^ std::string * l31(new std::string("test"));$/;" l function:main typeref:typename:std::string * file: l32 input.cpp /^ auto l32 = new std::basic_string, std::allocator >;$/;" l function:main typeref:typename:auto file: l32_33_0 input.cpp /^class MY_API n06 l32_33_0;$/;" v typeref:class:n06 l32_33_1 input.cpp /^class __declspec(dllexport) n07 l32_33_1;$/;" v typeref:class:n07 l33 input.cpp /^ void (Struct1::*l33)() = NULL;$/;" l function:anotherFunc typeref:typename:void (Struct1::*)() file: l34 input.cpp /^ void (Struct1::*l34)(int) = NULL;$/;" l function:anotherFunc typeref:typename:void (Struct1::*)(int) file: l35 input.cpp /^ decltype(l36) l35;$/;" l function:anotherFunc typeref:typename:decltype(l36) file: l35 input.cpp /^ int (Struct1::*l35)(int) = NULL;$/;" l function:anotherFunc typeref:typename:int (Struct1::*)(int) file: m01 input.cpp /^ unsigned int m01;$/;" m struct:Struct1 typeref:typename:unsigned int file: m02 input.cpp /^ std::string m02;$/;" m struct:Struct1 typeref:typename:std::string file: m03 input.cpp /^ std::string ** m03, m04;$/;" m struct:Struct1 typeref:typename:std::string ** file: m04 input.cpp /^ std::string ** m03, m04;$/;" m struct:Struct1 typeref:typename:std::string file: m05 input.cpp /^ std::string & (*m05)(int a,int b);$/;" m struct:Struct1 typeref:typename:std::string & (*)(int a,int b) file: m06 input.cpp /^ std::basic_string, std::allocator > m06[10];$/;" m struct:Struct1 typeref:typename:std::basic_string,std::allocator>[10] file: m07 input.cpp /^ std::string m07 { "test" }; \/\/ C++11$/;" m struct:Struct1 typeref:typename:std::string file: m08 input.cpp /^ std::string m08[2] { "a", "b" };$/;" m struct:Struct1 typeref:typename:std::string[2] file: m09 input.cpp /^ int m09 {};$/;" m struct:Struct1 typeref:typename:int file: m10 input.cpp /^ int m10[2][2]{{1, 2}, {3, 4}};$/;" m struct:Struct1 typeref:typename:int[2][2] file: m11 input.cpp /^ std::array m11 { {1,2,3} };$/;" m struct:Struct1 typeref:typename:std::array file: m12 input.cpp /^ std::string m12[3] { std::string("one"),"two",{'t', 'h', 'r', 'e', 'e'} };$/;" m struct:Struct1 typeref:typename:std::string[3] file: m13 input.cpp /^ int m13 {false};$/;" m struct:Struct1 typeref:typename:int file: m14 input.cpp /^ std::string * m14 { new std::string("test") };$/;" m struct:Struct1 typeref:typename:std::string * file: m15 input.cpp /^ decltype(int) m15;$/;" m struct:Struct1 typeref:typename:decltype(int) file: v01 input.cpp /^} v01, v02[10];$/;" v typeref:struct:Struct1 v02 input.cpp /^} v01, v02[10];$/;" v typeref:struct:Struct1[10] v03 input.cpp /^} v03, * v04;$/;" v typeref:enum:Enum1 v04 input.cpp /^} v03, * v04;$/;" v typeref:enum:Enum1 * v05 input.cpp /^struct Struct1 v05, * v06 = NULL;$/;" v typeref:struct:Struct1 v06 input.cpp /^struct Struct1 v05, * v06 = NULL;$/;" v typeref:struct:Struct1 * v07 input.cpp /^std::string v07("test"), v08("test");$/;" v typeref:typename:std::string v08 input.cpp /^std::string v07("test"), v08("test");$/;" v typeref:typename:std::string v09 input.cpp /^std::basic_string, std::allocator > ** v09;$/;" v typeref:typename:std::basic_string,std::allocator> ** ================================================ FILE: Units/parser-cxx.r/variable-declarations.cpp.d/input.cpp ================================================ #include #include // All the m*, l* and v* are valid variable declarations. The n* are NOT valid declarations. struct Struct1 { unsigned int m01; std::string m02; std::string ** m03, m04; std::string & (*m05)(int a,int b); std::basic_string, std::allocator > m06[10]; std::string m07 { "test" }; // C++11 std::string m08[2] { "a", "b" }; int m09 {}; int m10[2][2]{{1, 2}, {3, 4}}; std::array m11 { {1,2,3} }; std::string m12[3] { std::string("one"),"two",{'t', 'h', 'r', 'e', 'e'} }; int m13 {false}; std::string * m14 { new std::string("test") }; decltype(int) m15; } v01, v02[10]; enum Enum1 { E1 } v03, * v04; struct Struct1 v05, * v06 = NULL; std::string v07("test"), v08("test"); std::basic_string, std::allocator > ** v09; int main(int argc,char ** argv) { unsigned short int l01; unsigned long long int * const l02 = NULL, * l03 = NULL; register int ** l04 = 0; std::string l05; std::string l06("test"); std::string l07 = "test"; const std::string & l08 = l07, l09 = l07; const void * (*l10)() = NULL; unsigned long int & (*l11)(void *); std::string & (*l12)(void); std::string ** (*l13)(int a,int b); std::basic_string, std::allocator > l14; struct Struct1 l15; struct Struct1 * l16, l17, l18[10]; Struct1 l19 = {}; #define SIZE 25 std::string ** l20[SIZE]; std::string l21[1 << 2]; std::string * l22[SIZE][SIZE]; std::string l23[5][2]; std::string * const l24 = 0; wchar_t l25[] = { L"кошка" }; wchar_t l26[] { L'к', L'о', L'ш', L'к', L'а', L'\0' }; std::string l27[] = { std::string("one"),"two",{'t', 'h', 'r', 'e', 'e'} }; int l28 {}; bool l29 { false }; std::string * l30{ new std::string("test") }; std::string * l31(new std::string("test")); auto l32 = new std::basic_string, std::allocator >; return 0; } // All of these are NOT valid variable declarations (but still valid C++) typedef struct X n01; typedef unsigned short int n02; typedef enum Enum1 n03; #define MY_API __declspec(dllexport) class MY_API n04; // This would be nice: parse inside a block surrounded by ifdef/endif. // #ifdef _MSVC class __declspec(dllexport) n05; // #endif class MY_API n06 l32_33_0; class __declspec(dllexport) n07 l32_33_1; // Note that function parameters are NOT extracted in this test. template X func(X p1) { return p1+1; } int anotherFunc(int n06) { func(n06); void (Struct1::*l33)() = NULL; void (Struct1::*l34)(int) = NULL; int (Struct1::*l35)(int) = NULL; decltype(l36) l35; } ================================================ FILE: Units/parser-cxx.r/variable-templates.d/args.ctags ================================================ --sort=no --fields-C++=+{properties}{specialization}{template} --kinds-C++=+Z ================================================ FILE: Units/parser-cxx.r/variable-templates.d/expected.tags ================================================ chip input.cpp /^enum chip {$/;" g file: A6XX input.cpp /^ A6XX = 6,$/;" e enum:chip file: A7XX input.cpp /^ A7XX = 7,$/;" e enum:chip file: CMD_REGS input.cpp /^template int CMD_REGS[] = {};$/;" v typeref:typename:int[] template: CHIP input.cpp /^template int CMD_REGS[] = {};$/;" Z variable:CMD_REGS typeref:typename:chip CMD_REGS input.cpp /^template<> int CMD_REGS[] = {$/;" v typeref:typename:int[] properties:specialization template:<> specialization: CMD_REGS input.cpp /^template<> int CMD_REGS[][1] = {$/;" v typeref:typename:int[][1] properties:specialization template:<> specialization: main input.cpp /^int main(void)$/;" f typeref:typename:int is_integral_v input-0.cpp /^constexpr bool is_integral_v = false;$/;" v typeref:typename:bool properties:constexpr template: T input-0.cpp /^template $/;" Z variable:is_integral_v typeref:meta:class is_integral_v input-0.cpp /^constexpr bool is_integral_v = true;$/;" v typeref:typename:bool properties:specialization,constexpr template:<> specialization: main input-0.cpp /^int main()$/;" f typeref:typename:int zero input-1.cpp /^constexpr T zero = 0;$/;" v typeref:typename:T properties:constexpr template: T input-1.cpp /^template $/;" Z variable:zero typeref:meta:class zero input-1.cpp /^constexpr T* zero = nullptr;$/;" v typeref:typename:T * properties:specialization,constexpr template: specialization: T input-1.cpp /^template $/;" Z variable:zero typeref:meta:class main input-1.cpp /^int main() {$/;" f typeref:typename:int ================================================ FILE: Units/parser-cxx.r/variable-templates.d/input-0.cpp ================================================ // Taken from https://cpprefjp.github.io/lang/cpp14/variable_templates.html template constexpr bool is_integral_v = false; template <> constexpr bool is_integral_v = true; int main() { if (is_integral_v) {} } ================================================ FILE: Units/parser-cxx.r/variable-templates.d/input-1.cpp ================================================ // Taken from https://cpprefjp.github.io/lang/cpp23/generalized_wording_for_partial_specializations.html #include template constexpr T zero = 0; template constexpr T* zero = nullptr; int main() { int x = zero; int* y = zero; std::cout << x << std::endl; std::cout << y << std::endl; } ================================================ FILE: Units/parser-cxx.r/variable-templates.d/input.cpp ================================================ enum chip { A6XX = 6, A7XX = 7, }; template int CMD_REGS[] = {}; template<> int CMD_REGS[] = { 0x3, }; template<> int CMD_REGS[][1] = { {0x4}, }; int main(void) { return CMD_REGS[0]; } ================================================ FILE: Units/parser-cxx.r/variables-in-control-statements.d/args.ctags ================================================ --kinds-C++=l ================================================ FILE: Units/parser-cxx.r/variables-in-control-statements.d/expected.tags ================================================ f01 input.cpp /^ for(int f01=0;f01<10;f01++)$/;" l function:test typeref:typename:int file: f02 input.cpp /^ for(int f02 = getUShort(), * f03 = getPointer();f03 < (getPointer() + 10);f03++)$/;" l function:test typeref:typename:int file: f03 input.cpp /^ for(int f02 = getUShort(), * f03 = getPointer();f03 < (getPointer() + 10);f03++)$/;" l function:test typeref:typename:int * file: f04 input.cpp /^ for(int f04=0,f05=5,f06=10;f04<10;f04++)$/;" l function:test typeref:typename:int file: f05 input.cpp /^ for(int f04=0,f05=5,f06=10;f04<10;f04++)$/;" l function:test typeref:typename:int file: f06 input.cpp /^ for(int f04=0,f05=5,f06=10;f04<10;f04++)$/;" l function:test typeref:typename:int file: f07 input.cpp /^ for(std::string f07 = "test";;)$/;" l function:test typeref:typename:std::string file: f09 input.cpp /^ for(std::unique_ptr f09 = 0;;)$/;" l function:test typeref:typename:std::unique_ptr file: f10 input.cpp /^ for(std::unique_ptr f10(getPointer());;)$/;" l function:test typeref:typename:std::unique_ptr file: f11 input.cpp /^ for(std::pair f11;;)$/;" l function:test typeref:typename:std::pair file: i01 input.cpp /^ if(int i01 = 10 + 20)$/;" l function:test typeref:typename:int file: i02 input.cpp /^ if(INT * i02 = 0)$/;" l function:test typeref:typename:INT * file: i03 input.cpp /^ if(INT & i03 = n01)$/;" l function:test typeref:typename:INT & file: w01 input.cpp /^ while(unsigned short int w01 = getUShort())$/;" l function:test typeref:typename:unsigned short int file: ================================================ FILE: Units/parser-cxx.r/variables-in-control-statements.d/input.cpp ================================================ #include #include // Helpers (should be hidden in ctags output) unsigned short int getUShort() { return 10; } int * getPointer() { return 0; } int n01; unsigned short n02; int * n03; typedef int INT; int n04() { return 0; } int n05,n06,n07,n08,n09,n10,n11,n12,n13,n14,n15,n16; template func(int no){ return no; }; // The real test starts here void test() { // Valid variable declarations inside a for loop control structure for(int f01=0;f01<10;f01++) { } for(int f02 = getUShort(), * f03 = getPointer();f03 < (getPointer() + 10);f03++) { } for(int f04=0,f05=5,f06=10;f04<10;f04++) { } for(std::string f07 = "test";;) { } for(int f08 : { 1,2,3,4,5 }) { } for(std::unique_ptr f09 = 0;;) { } for(std::unique_ptr f10(getPointer());;) { } for(std::pair f11;;) { } for(auto f12 : { 't','e','s','t' }) { } // Non valid variable declarations inside for for(;;) { } for(n01 = 0;n01 < 10;n01++) { } for(n02 = getUShort(), n03 = getPointer();;) { } for(n04();n04();) { } // Valid variable declaration inside an if if(int i01 = 10 + 20) { } if(INT * i02 = 0) { } if(INT & i03 = n01) { } // non valid declarations inside if if(n05 & n06) { } if(n07 * n08) { } if(n09 && n10) { } if(n11 < n12 || n13 > n14) { } if(static_cast(n15) < n14) { } if(func(n16)) { } // Valid variable declarations inside a while while(unsigned short int w01 = getUShort()) { } } ================================================ FILE: Units/parser-cxx.r/variables-prototypes-2.cpp.d/args.ctags ================================================ --kinds-c++=+plv --fields=SKn ================================================ FILE: Units/parser-cxx.r/variables-prototypes-2.cpp.d/expected.tags ================================================ listOfStrings input.cpp /^ List listOfStrings(argv); \/\/ local$/;" local line:4 main input.cpp /^int main( int argc, char ** argv )$/;" function line:1 signature:(int argc,char ** argv) sample input.cpp /^ String sample(argc); \/\/ local$/;" local line:3 ================================================ FILE: Units/parser-cxx.r/variables-prototypes-2.cpp.d/input.cpp ================================================ int main( int argc, char ** argv ) { String sample(argc); // local List listOfStrings(argv); // local foreach(String * p,listOfStrings) // NOT a prototype { p->dump(); // NOT a prototype } } ================================================ FILE: Units/parser-cxx.r/variables-prototypes.cpp.b/args.ctags ================================================ --kinds-c++=+pl --fields=+S ================================================ FILE: Units/parser-cxx.r/variables-prototypes.cpp.b/expected.tags ================================================ A1 input.cpp /^int A1 = i < 7 ? i : 7;$/;" v A2 input.cpp /^int A2 = 8;$/;" v A3 input.cpp /^int A3 = 9;$/;" v A4 input.cpp /^int A4 = p->data;$/;" v A5 input.cpp /^int A5 = 8;$/;" v A6 input.cpp /^int ( *A6 )( int, char ** ) = &main;$/;" v A7 input.cpp /^int A7( short ( *p )( int ) );$/;" p file: signature:( short ( *p )( int ) ) B1 input.cpp /^const char *B1( "uuu" ); \/\/variable$/;" v B2 input.cpp /^int B2( int ooo, const char* o ); \/\/prototype$/;" p file: signature:( int ooo, const char* o ) B3 input.cpp /^int B3( int( 7 ) ); \/\/variable$/;" v C1 input.cpp /^int C1( a >> ooo ); \/\/variable$/;" v C2 input.cpp /^int C2( int * h ); \/\/prototype$/;" p file: signature:( int * h ) C3 input.cpp /^int C3( std::map( 9 ) ); \/\/variable$/;" v C4 input.cpp /^int C4( std::map a ); \/\/prototype$/;" p file: signature:( std::map a ) C5 input.cpp /^int C5( map & a ); \/\/prototype$/;" p file: signature:( map & a ) C6 input.cpp /^int C6( ooo & a ); \/\/prototype$/;" p file: signature:( ooo & a ) C7 input.cpp /^int C7( int & a ); \/\/prototype$/;" p file: signature:( int & a ) C8 input.cpp /^int C8( map a ); \/\/prototype$/;" p file: signature:( map a ) C9 input.cpp /^int C9( int a ); \/\/prototype$/;" p file: signature:( int a ) D1 input.cpp /^ind D1( a * 2 ); \/\/variable$/;" v D2 input.cpp /^ind D2( "a" * 2 ); \/\/variable$/;" v D3 input.cpp /^int D3( *j ); \/\/variable$/;" v F1 input.cpp /^int F1( SomeType (*p)( int ) ); \/\/prototype$/;" p file: signature:( SomeType (*p)( int ) ) F2 input.cpp /^SomeType (*F2)( int o ); \/\/variable$/;" v F3 input.cpp /^int F3( std::map & a ); \/\/prototype$/;" p file: signature:( std::map & a ) G1 input.cpp /^int G1( SomeType a ); \/\/prototype$/;" p file: signature:( SomeType a ) H1 input.cpp /^char H1( const char *a = "a" ); \/\/prototype$/;" p file: signature:( const char *a = ) H2 input.cpp /^int H2(); \/\/prototype$/;" p file: signature:() H3 input.cpp /^char H3( double ); \/\/prototype$/;" p file: signature:( double ) H4 input.cpp /^int H4( h u ); \/\/prototype$/;" p file: signature:( h u ) P1 input.cpp /^int (*P1)( int o ); \/\/variable$/;" v V4 input.cpp /^int V4( iii( 'o' ) ); \/\/variable$/;" v V5 input.cpp /^int V5( iii( o ) ); \/\/variable$/;" v V6 input.cpp /^int V6( int (*p)( int ) ); \/\/prototype$/;" p file: signature:( int (*p)( int ) ) V7 input.cpp /^int V7( 89 ); \/\/variable$/;" v V8 input.cpp /^int V8( ooo ); \/\/variable$/;" v W1 input.cpp /^int W1 __ARGS (( int a )){} \/\/function$/;" f signature:( int a ) W2 input.cpp /^int W2 (( a - 5 ) \/ 6 ); \/\/variable$/;" v X1 input.cpp /^int X1( a.b ); \/\/variable$/;" v X2 input.cpp /^int X2( a->b ); \/\/variable$/;" v X3 input.cpp /^int X3( NS::a b ); \/\/prototype$/;" p file: signature:( NS::a b ) X4 input.cpp /^int X4( a ^ b ); \/\/variable $/;" v X5 input.cpp /^int X5( a ^ 6 ); \/\/variable$/;" v X6 input.cpp /^int X6( a | b ); \/\/variable$/;" v X8 input.cpp /^int X8( a & b & 2 ); \/\/variable$/;" v X9 input.cpp /^int X9( a && b ); \/\/variable$/;" v a1 input.cpp /^ int a1 = i < 7 ? i : 7;$/;" l a2 input.cpp /^ int a2 = 8;$/;" l a3 input.cpp /^ int a3 = 9;$/;" l a4 input.cpp /^ int a4 = p->data;$/;" l a5 input.cpp /^ int a5 = 8;$/;" l a6 input.cpp /^ int ( *a6 )( int, char ** ) = &main;$/;" l a7 input.cpp /^ int a7( short ( *p )( int ) );$/;" p file: signature:( short ( *p )( int ) ) a8 input.cpp /^ short a8 = i;$/;" l b1 input.cpp /^ const char *b1( "uuu" ); \/\/variable$/;" l b2 input.cpp /^ int b2( int ooo, const char* o ); \/\/prototype$/;" p file: signature:( int ooo, const char* o ) b3 input.cpp /^ int b3( int( 7 ) ); \/\/variable$/;" l c1 input.cpp /^ int c1( a >> ooo ); \/\/variable$/;" l c2 input.cpp /^ int c2( int * h ); \/\/prototype$/;" p file: signature:( int * h ) c3 input.cpp /^ int c3( std::map( 9 ) ); \/\/variable$/;" l c4 input.cpp /^ int c4( std::map a ); \/\/prototype$/;" p file: signature:( std::map a ) c5 input.cpp /^ int c5( map & a ); \/\/prototype$/;" p file: signature:( map & a ) c6 input.cpp /^ int c6( ooo & a ); \/\/prototype$/;" p file: signature:( ooo & a ) c7 input.cpp /^ int c7( int & a ); \/\/prototype$/;" p file: signature:( int & a ) c8 input.cpp /^ int c8( map a ); \/\/prototype$/;" p file: signature:( map a ) c9 input.cpp /^ int c9( int a ); \/\/prototype$/;" p file: signature:( int a ) d1 input.cpp /^ ind d1( a * 2 ); \/\/variable$/;" l d2 input.cpp /^ ind d2( "a" * 2 ); \/\/variable$/;" l d3 input.cpp /^ int d3( *j ); \/\/variable$/;" l f1 input.cpp /^ int f1( SomeType (*p)( int ) ); \/\/prototype$/;" p file: signature:( SomeType (*p)( int ) ) f2 input.cpp /^ SomeType (*f2)( int o ); \/\/variable$/;" l f3 input.cpp /^ int f3( std::map & a ); \/\/prototype$/;" p file: signature:( std::map & a ) g1 input.cpp /^ int g1( SomeType a ); \/\/prototype$/;" p file: signature:( SomeType a ) h1 input.cpp /^ char h1( const char *a = "a" ); \/\/prototype$/;" p file: signature:( const char *a = ) h2 input.cpp /^ int h2(); \/\/prototype$/;" p file: signature:() h3 input.cpp /^ char h3( double ); \/\/prototype$/;" p file: signature:( double ) h4 input.cpp /^ int h4( h u ); \/\/prototype$/;" p file: signature:( h u ) main input.cpp /^int main( int argc, char ** argv )$/;" f signature:( int argc, char ** argv ) p1 input.cpp /^ int (*p1)( int o ); \/\/variable$/;" l v4 input.cpp /^ int v4( iii( 'o' ) ); \/\/variable$/;" l v5 input.cpp /^ int v5( iii( o ) ); \/\/variable$/;" l v6 input.cpp /^ int v6( int (*p)( int ) ); \/\/prototype$/;" p file: signature:( int (*p)( int ) ) v7 input.cpp /^ int v7( 89 ); \/\/variable$/;" l v8 input.cpp /^ int v8( ooo ); \/\/variable$/;" l w1 input.cpp /^ int w1 __ARGS (( int a )); \/\/prototype$/;" p file: signature:( int a ) w2 input.cpp /^ int w2 (( a - 5 ) \/ 6 ); \/\/variable$/;" l x1 input.cpp /^ int x1( a.b ); \/\/variable$/;" l x2 input.cpp /^ int x2( a->b ); \/\/variable$/;" l x3 input.cpp /^ int x3( NS::a b ); \/\/prototype$/;" p file: signature:( NS::a b ) x4 input.cpp /^ int x4( a ^ b ); \/\/variable $/;" l x5 input.cpp /^ int x5( a ^ 6 ); \/\/variable$/;" l x6 input.cpp /^ int x6( a | b ); \/\/variable$/;" l x8 input.cpp /^ int x8( a & b & 2 ); \/\/variable$/;" l x9 input.cpp /^ int x9( a && b ); \/\/variable$/;" l ================================================ FILE: Units/parser-cxx.r/variables-prototypes.cpp.b/input.cpp ================================================ int main( int argc, char ** argv ) { // 1. Angle brackets handling bug // As of now a2, a3 and a4 will be skipped int a1 = i < 7 ? i : 7; int a2 = 8; int a3 = 9; int a4 = p->data; int a5 = 8; // 2. Function pointer decl bug // As of now a6 will be skipped int ( *a6 )( int, char ** ) = &main; // 3. Wrong prototype will be written // As of now prototype will be ( SomeType ( p )( int ) ) int a7( short ( *p )( int ) ); // 4. DECL_IGNORE bug // As of now a8 will be skipped if ( argc > 0 ) return 0; short a8 = i; // 5. Local variables support // As of now all the identifiers below are either reported as prototypes, // or not recognized at all // The comments on the right specify which kind of tag should be generated const char *b1( "uuu" ); //variable int b2( int ooo, const char* o ); //prototype int b3( int( 7 ) ); //variable int c1( a >> ooo ); //variable int c2( int * h ); //prototype int c3( std::map( 9 ) ); //variable int c4( std::map a ); //prototype int c5( map & a ); //prototype int c6( ooo & a ); //prototype (ambiguous) int c7( int & a ); //prototype int c8( map a ); //prototype int c9( int a ); //prototype ind d1( a * 2 ); //variable ind d2( "a" * 2 ); //variable int d3( *j ); //variable int f1( SomeType (*p)( int ) ); //prototype SomeType (*f2)( int o ); //variable int f3( std::map & a ); //prototype int g1( SomeType a ); //prototype // As of now, the signature of h1 will be "( int a = R )", // 'R' is to be replaced by something clearer to denote a // string literal char h1( const char *a = "a" ); //prototype int h2(); //prototype char h3( double ); //prototype int h4( h u ); //prototype int (*p1)( int o ); //variable int v4( iii( 'o' ) ); //variable int v5( iii( o ) ); //variable int v6( int (*p)( int ) ); //prototype int v7( 89 ); //variable int v8( ooo ); //variable // __ARGS(x) is a compatibility macro which optionally // expands to x when prototypes are supported, so // w1 should be parsed as a prototype int w1 __ARGS (( int a )); //prototype int w2 (( a - 5 ) / 6 ); //variable int x1( a.b ); //variable int x2( a->b ); //variable int x3( NS::a b ); //prototype int x4( a ^ b ); //variable int x5( a ^ 6 ); //variable int x6( a | b ); //variable // As of now, x7 is not recognized at all; it should // give a variable tag but it's tricky to get it // right because of '&' which suggests a prototype, // so for now let's just ignore it //int x7( a & b & c ); //variable int x8( a & b & 2 ); //variable int x9( a && b ); //variable } /* * Below is a copy/paste of the local identifiers above made uppercase, * but with a global scope instead. */ // 1. Angle brackets handling bug int A1 = i < 7 ? i : 7; int A2 = 8; int A3 = 9; int A4 = p->data; int A5 = 8; // 2. Function pointer decl bug int ( *A6 )( int, char ** ) = &main; // 3. Wrong prototype will be written int A7( short ( *p )( int ) ); // 4. Global variables support const char *B1( "uuu" ); //variable int B2( int ooo, const char* o ); //prototype int B3( int( 7 ) ); //variable int C1( a >> ooo ); //variable int C2( int * h ); //prototype int C3( std::map( 9 ) ); //variable int C4( std::map a ); //prototype int C5( map & a ); //prototype int C6( ooo & a ); //prototype (ambiguous) int C7( int & a ); //prototype int C8( map a ); //prototype int C9( int a ); //prototype ind D1( a * 2 ); //variable ind D2( "a" * 2 ); //variable int D3( *j ); //variable int F1( SomeType (*p)( int ) ); //prototype SomeType (*F2)( int o ); //variable int F3( std::map & a ); //prototype int G1( SomeType a ); //prototype char H1( const char *a = "a" ); //prototype int H2(); //prototype char H3( double ); //prototype int H4( h u ); //prototype int (*P1)( int o ); //variable int V4( iii( 'o' ) ); //variable int V5( iii( o ) ); //variable (ambiguous) int V6( int (*p)( int ) ); //prototype int V7( 89 ); //variable int V8( ooo ); //variable (ambiguous) int W1 __ARGS (( int a )){} //function int W2 (( a - 5 ) / 6 ); //variable int X1( a.b ); //variable int X2( a->b ); //variable int X3( NS::a b ); //prototype int X4( a ^ b ); //variable int X5( a ^ 6 ); //variable int X6( a | b ); //variable //int X7( a & b & c ); //variable int X8( a & b & 2 ); //variable int X9( a && b ); //variable (ambiguous in C++) ================================================ FILE: Units/parser-d.r/d-accessmod.d/args.ctags ================================================ --fields=nksSaf ================================================ FILE: Units/parser-d.r/d-accessmod.d/expected.tags ================================================ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ !_TAG_PROGRAM_NAME Exuberant Ctags // !_TAG_PROGRAM_URL https://github.com/fishman/ctags /official site/ !_TAG_PROGRAM_VERSION Development // A input.d /^class A$/;" c line:4 file: B input.d /^ class B {$/;" c line:47 class:A file: access:protected C input.d /^ private class C {$/;" c line:54 class:A.B file: access:private D input.d /^ class D {$/;" c line:63 class:A.B file: access:protected a input.d /^ void a()$/;" f line:6 class:A access:public signature:() b input.d /^ private void b()$/;" f line:10 class:A file: access:private signature:() bar input.d /^ int bar;$/;" m line:91 file: access:public c input.d /^ protected void c()$/;" f line:15 class:A access:protected signature:() d input.d /^ void d() $/;" f line:23 class:A file: access:private signature:() e input.d /^ void e() $/;" f line:26 class:A file: access:private signature:() f input.d /^ void f() $/;" f line:33 class:A access:public signature:() foo input.d /^ int foo;$/;" m line:86 file: access:private g input.d /^ void g() $/;" f line:36 class:A access:public signature:() h input.d /^ void h()$/;" f line:43 class:A access:protected signature:() i input.d /^ void i() {$/;" f line:49 class:A.B access:public signature:() j input.d /^ void j() {$/;" f line:51 class:A.B access:public signature:() k input.d /^ void k() {$/;" f line:56 class:A.B.C access:public signature:() l input.d /^ private void l() {$/;" f line:58 class:A.B.C file: access:private signature:() m input.d /^ void m() {$/;" f line:65 class:A.B.D access:public signature:() n input.d /^ public void n() {$/;" f line:67 class:A.B.D access:public signature:() o input.d /^ int o;$/;" m line:73 class:A file: access:public p input.d /^ int p;$/;" m line:75 class:A file: access:private q input.d /^ int q;$/;" m line:76 class:A file: access:private r input.d /^ int r;$/;" m line:78 class:A file: access:protected s input.d /^ int s;$/;" m line:79 class:A file: access:protected w input.d /^ int w;$/;" m line:22 class:A file: access:private x input.d /^ protected int x;$/;" m line:48 class:A.B file: access:protected y input.d /^ private int y;$/;" m line:55 class:A.B.C file: access:private z input.d /^ int z;$/;" m line:64 class:A.B.D file: access:public ================================================ FILE: Units/parser-d.r/d-accessmod.d/input.d ================================================ class A { void a() { } private void b() { } protected void c() { } private { int w; void d() { } void e() { } } public { void f() { } void g() { } } protected { void h() { } class B { protected int x; void i() { } void j() { } private class C { private int y; void k() { } private void l() { } } protected { class D { int z; void m() { } public void n() { } } } } } int o; private: int p; int q; protected: int r; int s; } private { int foo; } public { int bar; } ================================================ FILE: Units/parser-d.r/d-size_t-wchar_t-alias.d/expected.tags ================================================ size_t input.d /^alias size_t = int;$/;" a file: wchar_t input.d /^alias wchar_t = int;$/;" a file: ================================================ FILE: Units/parser-d.r/d-size_t-wchar_t-alias.d/input.d ================================================ alias size_t = int; alias wchar_t = int; ================================================ FILE: Units/parser-d.r/simple.d.d/expected.tags ================================================ AliasInt input.d /^alias AliasInt = int;$/;" a file: CT input.d /^ class CT(T)$/;" c class:Class file: Class input.d /^class Class : Interface$/;" c file: Enum input.d /^enum Enum : int$/;" g file: Interface input.d /^interface Interface$/;" i file: Struct input.d /^struct Struct$/;" s file: Union input.d /^ union Union$/;" u struct:Struct file: _bar input.d /^ private AliasInt _bar;$/;" m class:Class file: attr_anon input.d /^@(obj) T attr_anon;$/;" v attr_decl input.d /^@attr(i) int attr_decl = 1;$/;" v bar input.d /^ bar,$/;" e enum:Enum file: bar input.d /^ public AliasInt bar()$/;" f class:Class conditional input.d /^ T conditional;$/;" v file: foo input.d /^ foo,$/;" e enum:Enum file: g_inout input.d /^inout(int)* g_inout(inout(int)* p) { return p; }$/;" f globalVar input.d /^__gshared int globalVar;$/;" v i input.d /^int i;$/;" v main input.d /^void main(string[] args)$/;" f file: member input.d /^ T member;$/;" m class:Class.CT file: modulevar input.d /^ int modulevar;$/;" m file: obj input.d /^Object obj;$/;" v out_contract input.d /^void out_contract()$/;" f file: qar input.d /^ int qar;$/;" m union:Struct.Union file: quxx input.d /^ bool quxx;$/;" m union:Struct.Union file: test.simple input.d /^module test.simple;$/;" M tfun input.d /^ auto tfun(T)(T v)$/;" f class:Class this input.d /^ public this(AliasInt x)$/;" f class:Class toString input.d /^ override string toString() { return ""; }$/;" f class:Class type_con input.d /^const(int)* type_con;$/;" v type_imm input.d /^immutable(int)* type_imm;$/;" v type_shar input.d /^shared(int)[] type_shar;$/;" v ================================================ FILE: Units/parser-d.r/simple.d.d/input.d ================================================ module test.simple; import std.stdio; alias AliasInt = int; struct Struct { union Union { bool quxx; int qar; } } enum Enum : int { foo, bar, } interface Interface { public AliasInt bar(); // FIXME prototypes } class Class : Interface { private AliasInt _bar; public this(AliasInt x) { this._bar = x; } override string toString() { return ""; } public AliasInt bar() { return this._bar; } protected: auto tfun(T)(T v) { return v; } class CT(T) { T member; enum missing = T.init; // FIXME } } public { int modulevar; } Object obj; const(int)* type_con; immutable(int)* type_imm; inout(int)* f_inout(inout Object); // FIXME prototypes inout(int)* g_inout(inout(int)* p) { return p; } shared(int)[] type_shar; private: int i; /+ int error; +/ @attr(i) int attr_decl = 1; @attr(i) attr_decl_infer = 1; // FIXME @(obj) T attr_anon; void attr_post() @attr(obj); // FIXME prototypes static if (is(typeof(__traits(getMember, a, name)) == function)) T conditional; static assert( num < TL.length, "Name '"~name~"' is not found"); __gshared int globalVar; void out_contract() out(r; r > 0) {} void main(string[] args) in(args.length > 0) { auto foo = new Class(1337); alias string AliasString; AliasString baz = "Hello, World!"; writefln("%s", foo.bar()); } ================================================ FILE: Units/parser-d.r/templates.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-d.r/templates.d/expected.tags ================================================ Template input.d /^template Template(alias a, T...)$/;" T file: TemplateAlias input.d /^ alias TemplateAlias = a!T;$/;" a template:Template file: memb input.d /^ int memb;$/;" m template:Template file: b input.d /^Foo!x b;$/;" v c input.d /^Foo!(x) c;$/;" v d input.d /^Foo!(x < 2) d;$/;" v g input.d /^void g(Foo!x) {}$/;" f each input.d /^template each(alias fun = "a")$/;" T file: child input.d /^ template child(){}$/;" T template:each file: tmethod input.d /^ void tmethod()(){}$/;" f template:each ImplementLength input.d /^mixin ImplementLength!source; \/\/ FIXME source too!$/;" X source input.d /^mixin ImplementLength!source; \/\/ FIXME source too!$/;" X IT input.d /^interface IT(T){}$/;" i file: ST input.d /^struct ST(T){}$/;" s file: UT input.d /^union UT(T){}$/;" u file: ================================================ FILE: Units/parser-d.r/templates.d/input.d ================================================ template Template(alias a, T...) if (is(typeof(a))) { private: // no parent: alias TemplateAlias = a!T; int memb; } Foo!x b; Foo!(x) c; Foo!(x < 2) d; void f(Foo!x); // FIXME prototypes void g(Foo!x) {} template each(alias fun = "a") { template child(){} void tmethod()(){} } // FIXME /+ int vt(alias a) = 0; // not parsed // parsed as T: alias AT(T) = T; enum ET(T) = T.init; +/ mixin ImplementLength!source; // FIXME source too! // declaration templates interface IT(T){} struct ST(T){} union UT(T){} ================================================ FILE: Units/parser-dbus-inspect.r/node-as-root-with-dtd.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-dbus-inspect.r/node-as-root-with-dtd.d/expected.tags ================================================ org.gnome.Terminal.Factory0 input.xml /^ $/;" i CreateInstance input.xml /^ $/;" m interface:org.gnome.Terminal.Factory0 options input.xml /^ $/;" a method:org.gnome.Terminal.Factory0.CreateInstance receiver input.xml /^ $/;" a method:org.gnome.Terminal.Factory0.CreateInstance org.gnome.Terminal.Terminal0 input.xml /^ $/;" i Exec input.xml /^ $/;" m interface:org.gnome.Terminal.Terminal0 options input.xml /^ $/;" a method:org.gnome.Terminal.Terminal0.Exec arguments input.xml /^ $/;" a method:org.gnome.Terminal.Terminal0.Exec ChildExited input.xml /^ $/;" s interface:org.gnome.Terminal.Terminal0 exit_code input.xml /^ $/;" a signal:org.gnome.Terminal.Terminal0.ChildExited ================================================ FILE: Units/parser-dbus-inspect.r/node-as-root-with-dtd.d/features ================================================ xpath ================================================ FILE: Units/parser-dbus-inspect.r/node-as-root-with-dtd.d/input.xml ================================================ ================================================ FILE: Units/parser-dbus-inspect.r/node-as-root-without-dtd.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-dbus-inspect.r/node-as-root-without-dtd.d/expected.tags ================================================ / input.xml /^$/;" n org.freedesktop.NetworkManager.Device.Ppp input.xml /^ $/;" i node:/ PropertiesChanged input.xml /^ $/;" s interface:/.org.freedesktop.NetworkManager.Device.Ppp properties input.xml /^ $/;" a signal:/.org.freedesktop.NetworkManager.Device.Ppp.PropertiesChanged ================================================ FILE: Units/parser-dbus-inspect.r/node-as-root-without-dtd.d/features ================================================ xpath ================================================ FILE: Units/parser-dbus-inspect.r/node-as-root-without-dtd.d/input.xml ================================================ ================================================ FILE: Units/parser-dbus-inspect.r/simple-dbus-inspect.d/args.ctags ================================================ --fields=+l ================================================ FILE: Units/parser-dbus-inspect.r/simple-dbus-inspect.d/expected.tags ================================================ ClientAdded input.xml /^ $/;" s language:DBusIntrospect interface:org.gnome.SessionManager SessionName input.xml /^ $/;" p language:DBusIntrospect interface:org.gnome.SessionManager Setenv input.xml /^ $/;" m language:DBusIntrospect interface:org.gnome.SessionManager doc input.xml /^$/;" n language:XML uri:http://www.freedesktop.org/dbus/1.0/doc.dtd id input.xml /^ $/;" a language:DBusIntrospect signal:org.gnome.SessionManager.ClientAdded org.gnome.SessionManager input.xml /^ $/;" i language:DBusIntrospect value input.xml /^ $/;" a language:DBusIntrospect method:org.gnome.SessionManager.Setenv variable input.xml /^ $/;" a language:DBusIntrospect method:org.gnome.SessionManager.Setenv ================================================ FILE: Units/parser-dbus-inspect.r/simple-dbus-inspect.d/features ================================================ xpath ================================================ FILE: Units/parser-dbus-inspect.r/simple-dbus-inspect.d/input.xml ================================================ The variable name The value Adds the variable name to the application launch environment with the specified value. May only be used during the Session Manager initialization phase. The object path for the added client Emitted when a client has been added to the session manager. The name of the session that has been loaded. ================================================ FILE: Units/parser-dbus-service.r/simple.d/README ================================================ The test input is taken from libvirt-dbus-1.4.1-6.fc42.x86_64. ================================================ FILE: Units/parser-dbus-service.r/simple.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r ================================================ FILE: Units/parser-dbus-service.r/simple.d/expected.tags ================================================ D-BUS Service input.service /^[D-BUS Service]$/;" s roles:def Name input.service /^Name=org.libvirt$/;" k section:D-BUS Service roles:def org.libvirt input.service /^Name=org.libvirt$/;" n roles:def Exec input.service /^Exec=\/bin\/false$/;" k section:D-BUS Service roles:def SystemdService input.service /^SystemdService=libvirt-dbus.service$/;" k section:D-BUS Service roles:def libvirt-dbus.service input.service /^SystemdService=libvirt-dbus.service$/;" u roles:foreignlang ================================================ FILE: Units/parser-dbus-service.r/simple.d/input.service ================================================ [D-BUS Service] Name=org.libvirt Exec=/bin/false SystemdService=libvirt-dbus.service ================================================ FILE: Units/parser-dtd.r/colons-in-name.d/args.ctags ================================================ --sort=no --fields=+reK --extras=+r ================================================ FILE: Units/parser-dtd.r/colons-in-name.d/expected.tags ================================================ boolean input.dtd /^$/;" parameterEntity roles:def end:32 accel:acceleratorlist input.dtd /^$/;" element roles:def end:34 accel:acceleratorlist input.dtd /^$/;" element roles:def end:40 accel:item input.dtd /^ ================================================ FILE: Units/parser-dtd.r/condtion.d/args.ctags ================================================ --sort=no --fields=+re --extras=+r ================================================ FILE: Units/parser-dtd.r/condtion.d/expected.tags ================================================ x input.dtd /^ ]]> ================================================ FILE: Units/parser-dtd.r/elements.d/args.ctags ================================================ --sort=no --fields=+re --extras=+r ================================================ FILE: Units/parser-dtd.r/elements.d/expected.tags ================================================ SUB input.mod /^$/;" e roles:def end:1 SUP input.mod /^$/;" e roles:def end:1 ================================================ FILE: Units/parser-dtd.r/elements.d/input.mod ================================================ ================================================ FILE: Units/parser-dtd.r/fq.d/args.ctags ================================================ --sort=no --extras=+rq --fields=+rE ================================================ FILE: Units/parser-dtd.r/fq.d/expected.tags ================================================ a input.dtd /^$/;" e roles:def a input.dtd /^ ================================================ FILE: Units/parser-dtd.r/notation.d/expected.tags ================================================ WEB-JSPTAGLIB.1_2 input.dtd /^ ================================================ FILE: Units/parser-dtd.r/parameter-entities.d/args.ctags ================================================ --sort=no --fields=+reK --extras=+r ================================================ FILE: Units/parser-dtd.r/parameter-entities.d/expected.tags ================================================ id-attr input.dtd /^$/;" parameterEntity roles:def end:27 title-attr input.dtd /^$/;" parameterEntity roles:def end:28 skip-attr input.dtd /^$/;" parameterEntity roles:def end:29 desc-attr input.dtd /^$/;" element roles:def end:41 smil input.dtd /^$/;" parameterEntity roles:def end:47 head-element input.dtd /^$/;" parameterEntity roles:def end:49 head input.dtd /^$/;" element roles:def end:51 head input.dtd /^$/;" element roles:attOwner end:52 id-attr input.dtd /^$/;" parameterEntity element:head roles:partOfAttDef layout input.dtd /^$/;" element roles:def end:61 layout input.dtd /^$/;" element roles:def end:75 region input.dtd /^$/;" element roles:def end:88 root-layout input.dtd /^$/;" element roles:def end:98 meta input.dtd /^$/;" parameterEntity roles:def end:106 schedule input.dtd /^$/;" parameterEntity roles:def end:107 inline-link input.dtd /^$/;" parameterEntity roles:def end:108 assoc-link input.dtd /^$/;" parameterEntity roles:def end:109 link input.dtd /^$/;" parameterEntity roles:def end:110 container-content input.dtd /^$/;" parameterEntity roles:def end:111 body-content input.dtd /^$/;" parameterEntity roles:def end:112 body input.dtd /^$/;" element roles:def end:114 body input.dtd /^$/;" element roles:attOwner end:115 id-attr input.dtd /^$/;" parameterEntity element:body roles:partOfAttDef sync-attributes input.dtd /^$/;" parameterEntity roles:def end:141 par input.dtd /^$/;" element roles:def end:142 par input.dtd /^$/;" parameterEntity roles:def end:155 seq input.dtd /^$/;" element roles:def end:156 seq input.dtd /^$/;" parameterEntity roles:def end:173 switch input.dtd /^$/;" element roles:def end:174 switch input.dtd /^$/;" parameterEntity roles:def end:207 clip-attrs input.dtd /^$/;" element roles:def end:213 audio input.dtd /^$/;" element roles:def end:214 img input.dtd /^$/;" element roles:def end:215 video input.dtd /^$/;" element roles:def end:216 text input.dtd /^$/;" element roles:def end:217 textstream input.dtd /^$/;" element roles:def end:218 animation input.dtd /^$/;" element roles:def end:219 ref input.dtd /^$/;" element roles:attOwner end:221 mo-attributes input.dtd /^$/;" parameterEntity element:ref roles:partOfAttDef clip-attrs input.dtd /^$/;" parameterEntity element:ref roles:partOfAttDef audio input.dtd /^$/;" element roles:attOwner end:222 mo-attributes input.dtd /^$/;" parameterEntity element:audio roles:partOfAttDef clip-attrs input.dtd /^$/;" parameterEntity element:audio roles:partOfAttDef video input.dtd /^$/;" element roles:attOwner end:223 mo-attributes input.dtd /^$/;" parameterEntity element:video roles:partOfAttDef clip-attrs input.dtd /^$/;" parameterEntity element:video roles:partOfAttDef animation input.dtd /^$/;" element roles:attOwner end:224 mo-attributes input.dtd /^$/;" parameterEntity element:animation roles:partOfAttDef clip-attrs input.dtd /^$/;" parameterEntity element:animation roles:partOfAttDef textstream input.dtd /^$/;" element roles:attOwner end:225 mo-attributes input.dtd /^$/;" parameterEntity element:textstream roles:partOfAttDef clip-attrs input.dtd /^$/;" parameterEntity element:textstream roles:partOfAttDef text input.dtd /^$/;" element roles:attOwner end:226 mo-attributes input.dtd /^$/;" parameterEntity element:text roles:partOfAttDef img input.dtd /^$/;" element roles:attOwner end:227 mo-attributes input.dtd /^$/;" parameterEntity element:img roles:partOfAttDef smil-link-attributes input.dtd /^$/;" element roles:def end:240 a input.dtd /^$/;" element roles:def end:247 anchor input.dtd /^ ================================================ FILE: Units/parser-dtd.r/simple-dtd.d/args.ctags ================================================ --sort=no --fields=+reK --extras=+r ================================================ FILE: Units/parser-dtd.r/simple-dtd.d/expected.tags ================================================ resource-agent input.dtd /^$/;" element roles:def end:5 resource-agent input.dtd /^$/;" attribute element:resource-agent roles:def version input.dtd /^$/;" element roles:def end:10 parameters input.dtd /^$/;" element roles:def end:12 actions input.dtd /^$/;" element roles:def end:14 parameter input.dtd /^$/;" element roles:def end:16 parameter input.dtd /^$/;" attribute element:parameter roles:def longdesc input.dtd /^$/;" element roles:def end:22 longdesc input.dtd /^$/;" attribute element:longdesc roles:def shortdesc input.dtd /^$/;" element roles:def end:26 shortdesc input.dtd /^$/;" attribute element:shortdesc roles:def content input.dtd /^$/;" element roles:def end:30 content input.dtd /^$/;" attribute element:content roles:def action input.dtd /^$/;" element roles:def end:35 action input.dtd /^$/;" attribute element:action roles:def ================================================ FILE: Units/parser-dtd.r/simple-dtd.d/input.dtd ================================================ ================================================ FILE: Units/parser-dts.r/dts-core-dump.d/input.dts ================================================ m{ ================================================ FILE: Units/parser-dts.r/dts-fq-core-dump.d/README ================================================ This is a crash test. ================================================ FILE: Units/parser-dts.r/dts-fq-core-dump.d/args.ctags ================================================ --extras=+q ================================================ FILE: Units/parser-dts.r/dts-fq-core-dump.d/input.dts ================================================ m{ ================================================ FILE: Units/parser-dts.r/dts-fq-without-scope-field.d/README ================================================ This test case verifies a corner use case of Cork based automatic full qualified tag generator(FQgen). FQgen caches scope informations built just before emitting it as value for scope fields. Therefore when --field=-s(disabling scope field) is given, FQ tags were not generated. ================================================ FILE: Units/parser-dts.r/dts-fq-without-scope-field.d/args.ctags ================================================ --fields=+r-s --extras=+rq ================================================ FILE: Units/parser-dts.r/dts-fq-without-scope-field.d/expected.tags ================================================ 0x00 input.dts /^ phandle = <0x00>;$/;" p roles:def bar input.dts /^#define bar /;" d file: roles:def bar input.dts /^#undef bar$/;" d file: roles:undef foo.dtsi input.dts /^#include "foo.dtsi"/;" h roles:local label input.dts /^label: test {$/;" l roles:def label.0x00 input.dts /^ phandle = <0x00>;$/;" p roles:def label.label2 input.dts /^ label2: chosen { } ;$/;" l roles:def label2 input.dts /^ label2: chosen { } ;$/;" l roles:def ================================================ FILE: Units/parser-dts.r/dts-fq-without-scope-field.d/input.dts ================================================ /dts-v1/; #include "foo.dtsi" #define bar 98 label: test { dummy { label2: chosen { } ; phandle = <0x00>; }; }; #undef bar ================================================ FILE: Units/parser-dts.r/dts-simple.d/args.ctags ================================================ --fields=+Zrl --extras=+rq ================================================ FILE: Units/parser-dts.r/dts-simple.d/expected.tags ================================================ 0x00 input.dts /^ phandle = <0x00>;$/;" p language:DTS scope:label:label roles:def bar input.dts /^#define bar /;" d language:CPreProcessor file: roles:def bar input.dts /^#undef bar$/;" d language:CPreProcessor file: roles:undef foo.dtsi input.dts /^#include "foo.dtsi"/;" h language:CPreProcessor roles:local label input.dts /^label: test {$/;" l language:DTS roles:def label.0x00 input.dts /^ phandle = <0x00>;$/;" p language:DTS scope:label:label roles:def label.label2 input.dts /^ label2: chosen { } ;$/;" l language:DTS scope:label:label roles:def label2 input.dts /^ label2: chosen { } ;$/;" l language:DTS scope:label:label roles:def ================================================ FILE: Units/parser-dts.r/dts-simple.d/input.dts ================================================ /dts-v1/; #include "foo.dtsi" #define bar 98 label: test { dummy { label2: chosen { } ; phandle = <0x00>; }; }; #undef bar ================================================ FILE: Units/parser-eiffel.r/aliases.e.d/expected.tags ================================================ < input.e /^ a alias "<", b (other: like Current): BOOLEAN$/;" f class:ALIASES ALIASES input.e /^class ALIASES$/;" c ^ input.e /^ yor alias "^", zor (other: like Current): INTEGER$/;" f class:ALIASES a input.e /^ a alias "<", b (other: like Current): BOOLEAN$/;" f class:ALIASES attribute_a input.e /^ attribute_a, attribute_b: INTEGER$/;" f class:ALIASES attribute_b input.e /^ attribute_a, attribute_b: INTEGER$/;" f class:ALIASES b input.e /^ a alias "<", b (other: like Current): BOOLEAN$/;" f class:ALIASES constant_a input.e /^ constant_a, constant_b: INTEGER = 1$/;" f class:ALIASES constant_b input.e /^ constant_a, constant_b: INTEGER = 1$/;" f class:ALIASES function1a input.e /^ function1a, function1b (one: DOUBLE): DOUBLE$/;" f class:ALIASES function1b input.e /^ function1a, function1b (one: DOUBLE): DOUBLE$/;" f class:ALIASES procedure1a input.e /^ procedure1a, procedure1b (one: DOUBLE)$/;" f class:ALIASES procedure1b input.e /^ procedure1a, procedure1b (one: DOUBLE)$/;" f class:ALIASES yor input.e /^ yor alias "^", zor (other: like Current): INTEGER$/;" f class:ALIASES zor input.e /^ yor alias "^", zor (other: like Current): INTEGER$/;" f class:ALIASES ================================================ FILE: Units/parser-eiffel.r/aliases.e.d/input.e ================================================ class ALIASES feature -- One attribute_a, attribute_b: INTEGER constant_a, constant_b: INTEGER = 1 feature -- Two function1a, function1b (one: DOUBLE): DOUBLE do end feature -- Three procedure1a, procedure1b (one: DOUBLE) do end a alias "<", b (other: like Current): BOOLEAN do end yor alias "^", zor (other: like Current): INTEGER do end end ================================================ FILE: Units/parser-eiffel.r/attributes.e.d/expected.tags ================================================ ATTRIBUTES input.e /^expanded class ATTRIBUTES$/;" c anchored input.e /^ anchored: like one$/;" f class:ATTRIBUTES attribute_full input.e /^ attribute_full: STRING$/;" f class:ATTRIBUTES attribute_short input.e /^ attribute_short: STRING$/;" f class:ATTRIBUTES eight input.e /^ eight: DOUBLE = 2.0$/;" f class:ATTRIBUTES final_feature input.e /^ final_feature$/;" f class:ATTRIBUTES five input.e /^ five, six: INTEGER = unique$/;" f class:ATTRIBUTES four input.e /^ four: DOUBLE$/;" f class:ATTRIBUTES nine input.e /^ nine: STRING = "abc"$/;" f class:ATTRIBUTES one input.e /^ one: INTEGER$/;" f class:ATTRIBUTES seven input.e /^ seven: INTEGER = 1$/;" f class:ATTRIBUTES six input.e /^ five, six: INTEGER = unique$/;" f class:ATTRIBUTES three input.e /^ three: HASH_TABLE [ARRAY [DOUBLE], STRING]$/;" f class:ATTRIBUTES two input.e /^ two: ARRAY [STRING]$/;" f class:ATTRIBUTES ================================================ FILE: Units/parser-eiffel.r/attributes.e.d/input.e ================================================ expanded class ATTRIBUTES feature one: INTEGER -- Header comment two: ARRAY [STRING] -- Header comment three: HASH_TABLE [ARRAY [DOUBLE], STRING] -- Header comment four: DOUBLE -- Header comment five, six: INTEGER = unique -- Header comment seven: INTEGER = 1 -- Header comment eight: DOUBLE = 2.0 -- Header comment nine: STRING = "abc" -- Header comment anchored: like one -- Header comment attribute_short: STRING -- Header comment attribute end attribute_full: STRING -- Header comment note obsolete "Obsolete message" require local attribute -- Implementation ensure rescue end final_feature do end end ================================================ FILE: Units/parser-eiffel.r/class.e.d/expected.tags ================================================ // input.e /^ infix "\/" as infix "\/\/"$/;" f class:UBER_CLASS UBER_CLASS input.e /^deferred class UBER_CLASS [G -> CONSTRAINT] obsolete "message"$/;" c guard input.e /^ guard: INTEGER$/;" f class:UBER_CLASS make input.e /^ make$/;" f class:UBER_CLASS make2 input.e /^ make2$/;" f class:UBER_CLASS make3 input.e /^ make3$/;" f class:UBER_CLASS my_generating_type input.e /^ generating_type as my_generating_type,$/;" f class:UBER_CLASS my_generator input.e /^ generator as my_generator,$/;" f class:UBER_CLASS procedure_full input.e /^ procedure_full$/;" f class:UBER_CLASS ================================================ FILE: Units/parser-eiffel.r/class.e.d/input.e ================================================ note description: "Try everything" deferred class UBER_CLASS [G -> CONSTRAINT] obsolete "message" inherit ANY rename generator as my_generator, generating_type as my_generating_type, infix "/" as infix "//" export {NONE} my_generator, my_generating_type; {ANY} same_type undefine is_equal redefine conforms_to select consitent end LINKED_LIST [G] export {NONE} all end create make, make2 create {SOMETHING} make3 feature -- Initialization make do end make2 do end make3 do end feature {ANY, NONE} -- Feature clause comment procedure_full require else local do ensure then rescue end guard: INTEGER invariant label: condition note license: "May not be used for any purpose" end ================================================ FILE: Units/parser-eiffel.r/deprecated-syntax.e.d/README ================================================ Currently (July 2016) the keywords "indexing", "is", and "creation" are all deprecated in both the Eiffel Software and Liberty Eiffel dialects. The "infix" and "prefix" keywords are deprecated by Eiffel Software. Liberty Eiffel currently still supports them alongside "alias" though this is expected to change in the near future. ================================================ FILE: Units/parser-eiffel.r/deprecated-syntax.e.d/expected.tags ================================================ + input.e /^ prefix "+": like Current$/;" f class:DEPRECATED_SYNTAX_TEST // input.e /^ infix "\/" as infix "\/\/"$/;" f class:DEPRECATED_SYNTAX_TEST < input.e /^ infix "<" (other: like Current): BOOLEAN$/;" f class:DEPRECATED_SYNTAX_TEST DEPRECATED_SYNTAX_TEST input.e /^ DEPRECATED_SYNTAX_TEST$/;" c feature1 input.e /^ feature1 is$/;" f class:DEPRECATED_SYNTAX_TEST feature2 input.e /^ feature2: INTEGER is 42$/;" f class:DEPRECATED_SYNTAX_TEST make input.e /^ make is$/;" f class:DEPRECATED_SYNTAX_TEST ================================================ FILE: Units/parser-eiffel.r/deprecated-syntax.e.d/input.e ================================================ indexing label1: "value" class DEPRECATED_SYNTAX_TEST inherit ANY rename infix "/" as infix "//" end creation make feature make is do end feature1 is -- Header comment indexing obsolete "Obsolete message" require local do end feature2: INTEGER is 42 infix "<" (other: like Current): BOOLEAN do end prefix "+": like Current do end indexing label2: "value" end ================================================ FILE: Units/parser-eiffel.r/functions.e.d/expected.tags ================================================ + input.e /^ prefix_alias alias "+": like Current$/;" f class:FUNCTIONS < input.e /^ infix_alias alias "<" (other: like Current): BOOLEAN$/;" f class:FUNCTIONS FUNCTIONS input.e /^deferred class FUNCTIONS$/;" c function0 input.e /^ function0: INTEGER$/;" f class:FUNCTIONS function1 input.e /^ function1 (one: STRING)$/;" f class:FUNCTIONS function2 input.e /^ function2 (one: INTEGER; two: STRING): INTEGER$/;" f class:FUNCTIONS function_anchored input.e /^ function_anchored: like function0$/;" f class:FUNCTIONS function_full input.e /^ function_full (one: STRING)$/;" f class:FUNCTIONS infix_alias input.e /^ infix_alias alias "<" (other: like Current): BOOLEAN$/;" f class:FUNCTIONS prefix_alias input.e /^ prefix_alias alias "+": like Current$/;" f class:FUNCTIONS ================================================ FILE: Units/parser-eiffel.r/functions.e.d/input.e ================================================ deferred class FUNCTIONS feature -- One function0: INTEGER do end feature -- Two function1 (one: STRING) once end function2 (one: INTEGER; two: STRING): INTEGER deferred end function_anchored: like function0 do end function_full (one: STRING) -- header comment note obsolete "Obsolete message" require local do -- Implementation ensure rescue end infix_alias alias "<" (other: like Current): BOOLEAN do end prefix_alias alias "+": like Current do end end ================================================ FILE: Units/parser-eiffel.r/inherit-rename.e.d/expected.tags ================================================ INHERIT_RENAME_TEST input.e /^class INHERIT_RENAME_TEST$/;" c feat2 input.e /^ feat1 as feat2$/;" f class:INHERIT_RENAME_TEST feat4 input.e /^ feat3 as feat4$/;" f class:INHERIT_RENAME_TEST ================================================ FILE: Units/parser-eiffel.r/inherit-rename.e.d/input.e ================================================ class INHERIT_RENAME_TEST inherit FOO rename feat1 as feat2 end insert BAR rename feat3 as feat4 end end ================================================ FILE: Units/parser-eiffel.r/local-kind.e.d/args.ctags ================================================ --kinds-Eiffel=+l ================================================ FILE: Units/parser-eiffel.r/local-kind.e.d/expected.tags ================================================ LOCAL_KIND_TEST input.e /^class LOCAL_KIND_TEST$/;" c c input.e /^ s: STRING; c: CHARACTER$/;" l feature:LOCAL_KIND_TEST.feature1 file: feature1 input.e /^ feature1$/;" f class:LOCAL_KIND_TEST i input.e /^ i: INTEGER$/;" l feature:LOCAL_KIND_TEST.feature1 file: j input.e /^ j, k: INTEGER$/;" l feature:LOCAL_KIND_TEST.feature1 file: k input.e /^ j, k: INTEGER$/;" l feature:LOCAL_KIND_TEST.feature1 file: s input.e /^ s: STRING; c: CHARACTER$/;" l feature:LOCAL_KIND_TEST.feature1 file: ================================================ FILE: Units/parser-eiffel.r/local-kind.e.d/input.e ================================================ class LOCAL_KIND_TEST feature feature1 local i: INTEGER j, k: INTEGER s: STRING; c: CHARACTER do end end ================================================ FILE: Units/parser-eiffel.r/note.e.d/expected.tags ================================================ NOTE_ input.e /^class NOTE_$/;" c ================================================ FILE: Units/parser-eiffel.r/note.e.d/input.e ================================================ note description: "A simple description" class NOTE_ note license: "Eiffel Forum License, version 1" end ================================================ FILE: Units/parser-eiffel.r/obsolete.e.d/expected.tags ================================================ OBSOLETE_ input.e /^class OBSOLETE_ obsolete "Use a different one"$/;" c obsolete_attribute input.e /^ obsolete_attribute: INTEGER obsolete "Use something else"$/;" f class:OBSOLETE_ obsolete_function input.e /^ obsolete_function (one: INTEGER): INTEGER obsolete "Use something else"$/;" f class:OBSOLETE_ obsolete_procedure input.e /^ obsolete_procedure (one: INTEGER) obsolete "Use something else"$/;" f class:OBSOLETE_ ================================================ FILE: Units/parser-eiffel.r/obsolete.e.d/input.e ================================================ class OBSOLETE_ obsolete "Use a different one" feature obsolete_attribute: INTEGER obsolete "Use something else" attribute end obsolete_function (one: INTEGER): INTEGER obsolete "Use something else" do end obsolete_procedure (one: INTEGER) obsolete "Use something else" do end end ================================================ FILE: Units/parser-eiffel.r/procedures.e.d/expected.tags ================================================ PROCEDURES input.e /^deferred class PROCEDURES$/;" c procedure0 input.e /^ procedure0$/;" f class:PROCEDURES procedure1 input.e /^ procedure1 (one: STRING)$/;" f class:PROCEDURES procedure2 input.e /^ procedure2 (one: INTEGER; two: STRING)$/;" f class:PROCEDURES procedure_full input.e /^ procedure_full (one: STRING)$/;" f class:PROCEDURES ================================================ FILE: Units/parser-eiffel.r/procedures.e.d/input.e ================================================ deferred class PROCEDURES feature -- One procedure0 do end feature -- Two procedure1 (one: STRING) once end procedure2 (one: INTEGER; two: STRING) deferred end procedure_full (one: STRING) -- header comment note obsolete "Obsolete message" require local do -- Implementation ensure rescue end end ================================================ FILE: Units/parser-eiffel.r/verbatim.e.d/expected.tags ================================================ VERBATIM input.e /^class VERBATIM$/;" c constant input.e /^ constant: STRING = "[$/;" f class:VERBATIM cpp_query input.e /^ cpp_query (obj: FX_OBJECT; app: POINTER): POINTER$/;" f class:VERBATIM file: tail_attribute input.e /^ tail_attribute: INTEGER$/;" f class:VERBATIM file: ================================================ FILE: Units/parser-eiffel.r/verbatim.e.d/input.e ================================================ note description: "[ This is a verbatim string. ]" class VERBATIM feature -- Sample constant: STRING = "[ Vertbatim constant ]" feature {NONE} -- Implementation cpp_query (obj: FX_OBJECT; app: POINTER): POINTER -- Header comment external "[ C++ [ClassName %"EFXVisual.h%"] (EIF_OBJECT, FXApp*): void* ]" end tail_attribute: INTEGER note library: "[ EiffelBase: Library of reusable components for Eiffel. ]" end ================================================ FILE: Units/parser-elixir.r/elixir-callbacks.d/args.ctags ================================================ --sort=no --fields=+Ka ================================================ FILE: Units/parser-elixir.r/elixir-callbacks.d/expected.tags ================================================ CallbackModule input.ex /^defmodule CallbackModule do$/;" module new_callback input.ex /^ @callback new_callback() :: integer$/;" callback module:CallbackModule old_callback input.ex /^ defcallback old_callback(info :: integer) :: integer$/;" callback module:CallbackModule ================================================ FILE: Units/parser-elixir.r/elixir-callbacks.d/input.ex ================================================ defmodule CallbackModule do use Behaviour # This is the new callback syntax @callback new_callback() :: integer # This is the old (deprecated) callback syntax defcallback old_callback(info :: integer) :: integer end ================================================ FILE: Units/parser-elixir.r/elixir-exceptions.d/args.ctags ================================================ --sort=no --fields=+Ka ================================================ FILE: Units/parser-elixir.r/elixir-exceptions.d/expected.tags ================================================ ModuleError input.ex /^defmodule ModuleError do$/;" module ModuleError input.ex /^ defexception [:message]$/;" exception module:ModuleError exception input.ex /^ def exception(value) do$/;" function module:ModuleError access:public ================================================ FILE: Units/parser-elixir.r/elixir-exceptions.d/input.ex ================================================ defmodule ModuleError do defexception [:message] @impl true def exception(value) do msg = "did not get what was expected, got: #{inspect(value)}" %ModuleError{message: msg} end end ================================================ FILE: Units/parser-elixir.r/elixir-functions.d/args.ctags ================================================ --sort=no --fields=+Ka ================================================ FILE: Units/parser-elixir.r/elixir-functions.d/expected.tags ================================================ FunctionModule input.ex /^defmodule FunctionModule do$/;" module one_liner_func input.ex /^ def one_liner_func, do: :baz$/;" function module:FunctionModule access:public func_no_params input.ex /^ def func_no_params do$/;" function module:FunctionModule access:public func_head input.ex /^ def func_head(string1, string2 \\\\ nil, separator \\\\ " ")$/;" function module:FunctionModule access:public func_one_arity input.ex /^ def func_one_arity(string1, nil, _separator) do$/;" function module:FunctionModule access:public normal_func input.ex /^ def normal_func(string1, string2, separator) do$/;" function module:FunctionModule access:public private_func input.ex /^ defp private_func(a), do: a <> " alone"$/;" function module:FunctionModule access:private private_func_no_params input.ex /^ defp private_func_no_params do$/;" function module:FunctionModule access:private function_with_comma input.ex /^ def function_with_comma,$/;" function module:FunctionModule access:public ================================================ FILE: Units/parser-elixir.r/elixir-functions.d/input.ex ================================================ defmodule FunctionModule do def one_liner_func, do: :baz def func_no_params do # end # Function head def func_head(string1, string2 \\ nil, separator \\ " ") # Function with 1 arity def func_one_arity(string1, nil, _separator) do private_function(string1) end # Normal function def normal_func(string1, string2, separator) do string1 <> separator <> string2 end # Private function defp private_func(a), do: a <> " alone" defp private_func_no_params do # end def function_with_comma, do: :some_constant end ================================================ FILE: Units/parser-elixir.r/elixir-macros.d/args.ctags ================================================ --sort=no --fields=+Ka ================================================ FILE: Units/parser-elixir.r/elixir-macros.d/expected.tags ================================================ MacroModule input.ex /^defmodule MacroModule do$/;" module macro input.ex /^ defmacro macro(expr, opts) do$/;" macro module:MacroModule access:public macro_no_params input.ex /^ defmacro macro_no_params do$/;" macro module:MacroModule access:public private_macro input.ex /^ defmacrop private_macro(expr, opts) do$/;" macro module:MacroModule access:private private_macro_no_params input.ex /^ defmacrop private_macro_no_params do$/;" macro module:MacroModule access:private ================================================ FILE: Units/parser-elixir.r/elixir-macros.d/input.ex ================================================ defmodule MacroModule do defmacro macro(expr, opts) do # end defmacro macro_no_params do # end defmacrop private_macro(expr, opts) do # end defmacrop private_macro_no_params do # end end ================================================ FILE: Units/parser-elixir.r/elixir-modules.d/args.ctags ================================================ --sort=no --fields=+Ka ================================================ FILE: Units/parser-elixir.r/elixir-modules.d/expected.tags ================================================ Foo input.ex /^defmodule Foo do$/;" module Bar input.ex /^defmodule Foo.Bar do$/;" module Baz input.ex /^ defmodule Baz do$/;" module ================================================ FILE: Units/parser-elixir.r/elixir-modules.d/input.ex ================================================ defmodule Foo do end defmodule Foo.Bar do defmodule Baz do end end ================================================ FILE: Units/parser-elixir.r/elixir-records.d/args.ctags ================================================ --sort=no --fields=+Ka ================================================ FILE: Units/parser-elixir.r/elixir-records.d/expected.tags ================================================ RecordsModule input.ex /^defmodule RecordsModule do$/;" module user1 input.ex /^ Record.defrecord(:user1, name: "megan", age: "25")$/;" record module:RecordsModule access:public user2 input.ex /^ Record.defrecordp :user2, name: "ivan", age: "23"$/;" record module:RecordsModule access:private ================================================ FILE: Units/parser-elixir.r/elixir-records.d/input.ex ================================================ defmodule RecordsModule do require Record Record.defrecord(:user1, name: "megan", age: "25") Record.defrecordp :user2, name: "ivan", age: "23" # This is not a typo but an intentional bad test, used to test the parser Record.defrecordp:bad, name: "ivan", age: "23" end ================================================ FILE: Units/parser-elixir.r/elixir-sign-operators.d/args.ctags ================================================ --sort=no --fields=+Ka ================================================ FILE: Units/parser-elixir.r/elixir-sign-operators.d/expected.tags ================================================ OperatorModule input.ex /^defmodule OperatorModule do$/;" module + input.ex /^ def a + b, do: max(a, b)$/;" operator module:OperatorModule - input.ex /^ def a - b, do: max(a, b)$/;" operator module:OperatorModule * input.ex /^ def a * b, do: max(a, b)$/;" operator module:OperatorModule / input.ex /^ def a \/ b, do: max(a, b)$/;" operator module:OperatorModule = input.ex /^ def a = b, do: max(a, b)$/;" operator module:OperatorModule . input.ex /^ def a . b, do: max(a, b)$/;" operator module:OperatorModule | input.ex /^ def a | b, do: max(a, b)$/;" operator module:OperatorModule ||| input.ex /^ def _ ||| b, do: max(a, b)$/;" operator module:OperatorModule &&& input.ex /^ def a &&& _, do: max(a, b)$/;" operator module:OperatorModule <<< input.ex /^ def a <<< b, do: max(a, b)$/;" operator module:OperatorModule >>> input.ex /^ defp a >>> b, do: max(a, b)$/;" operator module:OperatorModule <<~ input.ex /^ defp _ <<~ _, do: max(a, b)$/;" operator module:OperatorModule ~>> input.ex /^ defp a ~>> b, do: max(a, b)$/;" operator module:OperatorModule <~ input.ex /^ defmacro a <~ b, do: max(a, b)$/;" operator module:OperatorModule ~> input.ex /^ defmacro _ ~> b, do: max(a, b)$/;" operator module:OperatorModule <~> input.ex /^ defmacro a <~> _, do: max(a, b)$/;" operator module:OperatorModule <|> input.ex /^ defmacrop a <|> b, do: max(a, b)$/;" operator module:OperatorModule ^^^ input.ex /^ defmacrop _ ^^^ _, do: max(a, b)$/;" operator module:OperatorModule ~~~ input.ex /^ defmacrop a ~~~ b, do: max(a, b)$/;" operator module:OperatorModule ================================================ FILE: Units/parser-elixir.r/elixir-sign-operators.d/input.ex ================================================ defmodule OperatorModule do def a + b, do: max(a, b) def a - b, do: max(a, b) def a * b, do: max(a, b) def a / b, do: max(a, b) def a = b, do: max(a, b) def a . b, do: max(a, b) # The 13 operators bellow are ALL the operators that Elixir is CAPABLE of # parsing and are not used by default, so the user can def a | b, do: max(a, b) def _ ||| b, do: max(a, b) def a &&& _, do: max(a, b) def a <<< b, do: max(a, b) defp a >>> b, do: max(a, b) defp _ <<~ _, do: max(a, b) defp a ~>> b, do: max(a, b) defmacro a <~ b, do: max(a, b) defmacro _ ~> b, do: max(a, b) defmacro a <~> _, do: max(a, b) defmacrop a <|> b, do: max(a, b) defmacrop _ ^^^ _, do: max(a, b) defmacrop a ~~~ b, do: max(a, b) end ================================================ FILE: Units/parser-elixir.r/elixir-simple.d/args.ctags ================================================ --sort=no --fields=+Ka ================================================ FILE: Units/parser-elixir.r/elixir-simple.d/expected.tags ================================================ MyList input.ex /^defmodule MyList do$/;" module reverse input.ex /^ defdelegate reverse(list), to: Enum$/;" delegate module:MyList other_reverse input.ex /^ defdelegate other_reverse(list), to: Enum, as: :reverse$/;" delegate module:MyList Size input.ex /^defprotocol Size do$/;" protocol size input.ex /^ def size(data)$/;" function protocol:Size access:public MyGuards input.ex /^defmodule Integer.MyGuards do$/;" module is_even input.ex /^ defguard is_even(value) when is_integer(value) and rem(value, 2) == 0$/;" guard module:MyGuards access:public is_odd input.ex /^ defguardp is_odd(value) when is_integer(value) and rem(value, 2) != 0$/;" guard module:MyGuards access:private Size input.ex /^defimpl Size, for: BitString do$/;" implementation module:MyGuards size input.ex /^ def size(binary), do: byte_size(binary)$/;" function module:MyGuards access:public ================================================ FILE: Units/parser-elixir.r/elixir-simple.d/input.ex ================================================ # Most of this code is taken from the official Elixir documentation. # With comments and modifications # by Ivan Gonzalez Polanco # # This code doesn't compile, since it's supposed to test de ctags elixir # parser, not the elixir elixir parser. # # d delegates (defdelegate ...) # defmodule MyList do defdelegate reverse(list), to: Enum defdelegate other_reverse(list), to: Enum, as: :reverse end # # p protocols (defprotocol ...) # defprotocol Size do @doc "Calculates the size (and not the length!) of a data structure" def size(data) end # # g guards (defguard ...) # defmodule Integer.MyGuards do defguard is_even(value) when is_integer(value) and rem(value, 2) == 0 defguardp is_odd(value) when is_integer(value) and rem(value, 2) != 0 end # # i implementations (defimpl ...) # defimpl Size, for: BitString do def size(binary), do: byte_size(binary) end ================================================ FILE: Units/parser-elixir.r/elixir-tests.d/args.ctags ================================================ --sort=no --fields=+Ka ================================================ FILE: Units/parser-elixir.r/elixir-tests.d/expected.tags ================================================ TestModule input.ex /^defmodule TestModule do$/;" module good with spaces input.ex /^ test "good with spaces" do$/;" test module:TestModule good with parens input.ex /^ test("good with parens") do$/;" test module:TestModule ================================================ FILE: Units/parser-elixir.r/elixir-tests.d/input.ex ================================================ defmodule TestModule do use ExUnit.Case, async: true test "good with spaces" do assert 1 + 1 == 2 end test("good with parens") do assert 1 + 1 == 2 end test"bad without spaces" do assert 1 + 1 == 2 end test "bad without 'do' word" assert 1 + 1 == 2 end test 'bad with single quotes' do assert 1 + 1 == 2 end end ================================================ FILE: Units/parser-elixir.r/elixir-types.d/args.ctags ================================================ --sort=no --fields=+Ka ================================================ FILE: Units/parser-elixir.r/elixir-types.d/expected.tags ================================================ TypeModule input.ex /^defmodule TypeModule do$/;" module t input.ex /^ @opaque t :: pid$/;" type module:TypeModule access:public credentials input.ex /^ @type credentials :: {atom, password}$/;" type module:TypeModule access:public password input.ex /^ @typep password :: binary$/;" type module:TypeModule access:private ================================================ FILE: Units/parser-elixir.r/elixir-types.d/input.ex ================================================ defmodule TypeModule do @opaque t :: pid @type credentials :: {atom, password} @typep password :: binary end ================================================ FILE: Units/parser-elixir.r/elixir-word-operators.d/args.ctags ================================================ --sort=no --fields=+Ka ================================================ FILE: Units/parser-elixir.r/elixir-word-operators.d/expected.tags ================================================ OperatorModule input.ex /^defmodule OperatorModule do$/;" module and input.ex /^ def a and b, do: max(a, b)$/;" operator module:OperatorModule or input.ex /^ def a or b, do: max(a, b)$/;" operator module:OperatorModule not input.ex /^ defp a not b, do: max(a, b)$/;" operator module:OperatorModule in input.ex /^ defmacro a in b, do: max(a, b)$/;" operator module:OperatorModule not in input.ex /^ defmacrop a not in b, do: max(a, b)$/;" operator module:OperatorModule when input.ex /^ defmacrop a when b, do: max(a, b)$/;" operator module:OperatorModule ================================================ FILE: Units/parser-elixir.r/elixir-word-operators.d/input.ex ================================================ defmodule OperatorModule do def a and b, do: max(a, b) def a or b, do: max(a, b) defp a not b, do: max(a, b) defmacro a in b, do: max(a, b) defmacrop a not in b, do: max(a, b) defmacrop a when b, do: max(a, b) end ================================================ FILE: Units/parser-elm.r/elm-aliases.d/args.ctags ================================================ --sort=no --fields=+r ================================================ FILE: Units/parser-elm.r/elm-aliases.d/expected.tags ================================================ MyAlias1 input.elm /^type alias MyAlias1 = String$/;" a roles:def MyAlias2 input.elm /^type alias MyAlias2 =$/;" a roles:def MyAlias3 input.elm /^ MyAlias3$/;" a roles:def ================================================ FILE: Units/parser-elm.r/elm-aliases.d/input.elm ================================================ type alias MyAlias1 = String type alias MyAlias2 = String type alias MyAlias3 = { x:Float, y:Float } ================================================ FILE: Units/parser-elm.r/elm-bad-lines.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r ================================================ FILE: Units/parser-elm.r/elm-bad-lines.d/expected.tags ================================================ Input input.elm /^import Input exposing (..)$/;" m roles:imported input1a input-1.elm /^input1a = 1$/;" f roles:def input1b input-1.elm /^input1b = 2$/;" f typeref:typename:Int roles:def input2b input-2.elm /^input2b = 1$/;" f roles:def input2c input-2.elm /^input2c = 3$/;" f roles:def module2d input-2.elm /^module2d = 4$/;" f roles:def input3b input-3.elm /^input3b = 1$/;" f roles:def input3d input-3.elm /^input3d = 1$/;" f roles:def ================================================ FILE: Units/parser-elm.r/elm-bad-lines.d/input-1.elm ================================================ type alias Input1a *= ConsA input1a = 1 type alias Input1b *= ConsB input1b : Int input1b = 2 ================================================ FILE: Units/parser-elm.r/elm-bad-lines.d/input-2.elm ================================================ type Input2a = Cons2A1 | Cons2A2 * input2b = 1 module = 2 input2c = 3 module2d = 4 ================================================ FILE: Units/parser-elm.r/elm-bad-lines.d/input-3.elm ================================================ -- Should be able to ignore a function where only part of the body -- parses successfully input3a i3_1 i3_2 = (]? x && input3b = 1 input3c i3_1 i3_2 = (]? x && input3d = 1 ================================================ FILE: Units/parser-elm.r/elm-bad-lines.d/input.elm ================================================ import Input exposinx?* import Input exposing (..) ================================================ FILE: Units/parser-elm.r/elm-case-statements.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r ================================================ FILE: Units/parser-elm.r/elm-case-statements.d/expected.tags ================================================ funcA input.elm /^funcA a1 a2 =$/;" f roles:def funcB input.elm /^funcB b1 =$/;" f roles:def funcC input.elm /^funcC c1 c2 =$/;" f roles:def c2 input.elm /^ c2 = 2$/;" f function:funcC roles:def c3 input.elm /^ c3 = 3$/;" f function:funcC roles:def funcD input.elm /^funcD str =$/;" f roles:def ================================================ FILE: Units/parser-elm.r/elm-case-statements.d/input.elm ================================================ -- A function with a case statement -- The code below won't compile, but it is -- syntactically correct funcA a1 a2 = case (complex ex pression + 12) of "Literal" -> a + b 'l' -> Cons a b Cons a b -> a + b _ -> False -- Check we can still read a simple function funcB b1 = True -- Can we catch functions defined inside case statements? funcC c1 c2 = case (complex ex pression + 12) of "Literal" -> let c2 = 2 c3 = 3 in c2 + c3 _ -> False -- This previously exposed a bug... funcD str = case str of Just c1 -> c1 / 255 _ -> 0 ================================================ FILE: Units/parser-elm.r/elm-comments.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r ================================================ FILE: Units/parser-elm.r/elm-comments.d/expected.tags ================================================ f input.elm /^f = 6 {- another comment -}$/;" f roles:def h input.elm /^h = 9$/;" f roles:def ================================================ FILE: Units/parser-elm.r/elm-comments.d/input.elm ================================================ -- a = 1 {- b = 2 -} {- c = 3 -} {-* d = 4 -} {-* e = 5 -} {- some comment -} f = 6 {- another comment -} -- This should be ignored -- This next line is not top level {- so should continue the above -} + 1 -- A top level statement h = 9 {- comment {- nested comment -} i = 9 -} ================================================ FILE: Units/parser-elm.r/elm-complex-types.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r-t ================================================ FILE: Units/parser-elm.r/elm-complex-types.d/expected.tags ================================================ A input.elm /^type A = ACons { x : Float, y : Float }$/;" t roles:def ACons input.elm /^type A = ACons { x : Float, y : Float }$/;" c type:A roles:def B input.elm /^type B$/;" t roles:def B1Cons input.elm /^ = B1Cons$/;" c type:B roles:def B2Cons input.elm /^ | B2Cons String Integer$/;" c type:B roles:def B3Cons input.elm /^ | B3Cons$/;" c type:B roles:def C input.elm /^type C=CCons{x:Float,y:Float}$/;" t roles:def CCons input.elm /^type C=CCons{x:Float,y:Float}$/;" c type:C roles:def D input.elm /^type D = DCons (String, Float, {x:String, y:Float})$/;" t roles:def DCons input.elm /^type D = DCons (String, Float, {x:String, y:Float})$/;" c type:D roles:def E input.elm /^type E$/;" t roles:def E1Cons input.elm /^ = E1Cons {}$/;" c type:E roles:def E2Cons input.elm /^ | E2Cons ()$/;" c type:E roles:def F input.elm /^type F$/;" t roles:def F1Cons input.elm /^ = F1Cons (String -> Int)$/;" c type:F roles:def F2Cons input.elm /^ | F2Cons (Float -> String -> (String -> {x:Float, y:Float}))$/;" c type:F roles:def F3Cons input.elm /^ | F3Cons$/;" c type:F roles:def G input.elm /^type G a$/;" t roles:def G1Cons input.elm /^ = G1Cons a Int$/;" c type:G roles:def G2Cons input.elm /^ | G2Cons { a | name : String}$/;" c type:G roles:def ================================================ FILE: Units/parser-elm.r/elm-complex-types.d/input.elm ================================================ -- A type with a record spec type A = ACons { x : Float, y : Float } -- A type with more complex spec type B = B1Cons { x : Float , y : Float } | B2Cons String Integer | B3Cons -- With a lack of spacing type C=CCons{x:Float,y:Float} -- Tuples type D = DCons (String, Float, {x:String, y:Float}) -- Empty records and tuples type E = E1Cons {} | E2Cons () -- With functions as type specifications type F = F1Cons (String -> Int) | F2Cons (Float -> String -> (String -> {x:Float, y:Float})) | F3Cons -- With vertical bars within the type type G a = G1Cons a Int | G2Cons { a | name : String} ================================================ FILE: Units/parser-elm.r/elm-constructor-signatures.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r ================================================ FILE: Units/parser-elm.r/elm-constructor-signatures.d/expected.tags ================================================ B input.elm /^type B$/;" t roles:def B1Cons input.elm /^ = B1Cons$/;" c type:B typeref:typename:{ x : Float , y : Float } -> B roles:def B2Cons input.elm /^ | B2Cons String Integer$/;" c type:B typeref:typename:String -> Integer -> B roles:def B3Cons input.elm /^ | B3Cons$/;" c type:B typeref:typename:B roles:def ================================================ FILE: Units/parser-elm.r/elm-constructor-signatures.d/input.elm ================================================ type B = B1Cons { x : Float , y : Float } | B2Cons String Integer | B3Cons ================================================ FILE: Units/parser-elm.r/elm-expressions.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r ================================================ FILE: Units/parser-elm.r/elm-expressions.d/expected.tags ================================================ funcA input.elm /^funcA =$/;" f roles:def funcB input.elm /^funcB = (\\b1 b2 b3 -> 42)$/;" f roles:def funcC input.elm /^funcC =$/;" f roles:def funcD input.elm /^funcD =$/;" f roles:def funcE input.elm /^funcE e1 e2 =$/;" f roles:def funcF input.elm /^funcF = []$/;" f roles:def funcG input.elm /^funcG =$/;" f roles:def funcH input.elm /^funcH h =$/;" f roles:def funcI input.elm /^funcI i1 i2 =$/;" f roles:def funcJ1 input.elm /^funcJ1 =$/;" f roles:def funcJ2 input.elm /^funcJ2 =$/;" f roles:def funcJ3 input.elm /^funcJ3 =$/;" f roles:def funcJ4 input.elm /^funcJ4 =$/;" f roles:def ================================================ FILE: Units/parser-elm.r/elm-expressions.d/input.elm ================================================ -- Expressions with parentheses funcA = (23 + 34) -- Anonymous functions funcB = (\b1 b2 b3 -> 42) -- Allow us to call constructors as functions funcC = Cons a b -- Allow us to functions and constructors using their module names funcD = (List.Deep.Cons a b) + (Main.add a b) -- Basic lists funcE e1 e2 = e1 :: [e2, e1 + e2] -- Empty lists funcF = [] -- Tuples, including an empty tuple funcG = (12, 0x034, ('a')) ++ () -- Record names as function calls funcH h = (3) + (.age h.family.person) -- Binary operators as function calls funcI i1 i2 = (++) (i1 // i2) 99 -- Records funcJ1 = {x = 2 , y = 3 , z = 4} funcJ2 = { point | x = point.x + 1 , y = Cons a b } funcJ3 = {} -- Record with spaces funcJ4 = { model | width = width } ================================================ FILE: Units/parser-elm.r/elm-functions.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r ================================================ FILE: Units/parser-elm.r/elm-functions.d/expected.tags ================================================ funcA input.elm /^funcA a1 a2 = a1 + a2$/;" f roles:def funcB input.elm /^funcB b =$/;" f roles:def funcC input.elm /^funcC = 2 + 1$/;" f roles:def funcD input.elm /^funcD d1$/;" f roles:def funcE input.elm /^funcE=2$/;" f roles:def ================================================ FILE: Units/parser-elm.r/elm-functions.d/input.elm ================================================ -- Simple function with some parameters. funcA a1 a2 = a1 + a2 -- Function over multiple lines funcB b = b + 1 -- Function with no parameter funcC = 2 + 1 -- Function with whitespace - ideally this will be stripped in the type description funcD d1 d2 = d1 + d2 -- Function with no whitespace after the name funcE=2 ================================================ FILE: Units/parser-elm.r/elm-if-then-else.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r ================================================ FILE: Units/parser-elm.r/elm-if-then-else.d/expected.tags ================================================ funcA input.elm /^funcA a1 a2 =$/;" f roles:def funcB input.elm /^funcB b1 =$/;" f roles:def funcC input.elm /^funcC c1 c2 =$/;" f roles:def c2 input.elm /^ c2 = 2$/;" f function:funcC roles:def c3 input.elm /^ c3 = 3$/;" f function:funcC roles:def ================================================ FILE: Units/parser-elm.r/elm-if-then-else.d/input.elm ================================================ -- A function with an if/then/else statement -- The code below won't compile, but it is -- syntactically correct funcA a1 a2 = if (complex ex pression + 12) == "Literal" then a + b else a + b -- Check we can still read a simple function? funcB b1 = True -- Can we catch functions defined inside if statements? funcC c1 c2 = if (complex ex pression + 12) == "Literal" then let c2 = 2 c3 = 3 in c2 + c3 else a + b ================================================ FILE: Units/parser-elm.r/elm-imports.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r-t ================================================ FILE: Units/parser-elm.r/elm-imports.d/expected.tags ================================================ SomeMod input.elm /^module SomeMod exposing (..)$/;" m roles:def PlainImport input.elm /^import PlainImport$/;" m roles:imported MyMod input.elm /^import MyMod exposing$/;" m roles:imported map input.elm /^ ( map, foldl$/;" f module:MyMod roles:exposed foldl input.elm /^ ( map, foldl$/;" f module:MyMod roles:exposed Maybe input.elm /^ , Maybe, Possibly$/;" t module:MyMod roles:exposed Possibly input.elm /^ , Maybe, Possibly$/;" t module:MyMod roles:exposed Result input.elm /^ , Result(..)$/;" t module:MyMod roles:exposed MyList input.elm /^ , MyList(Empty), Tree(Node, Value, Special) )$/;" t module:MyMod roles:exposed Empty input.elm /^ , MyList(Empty), Tree(Node, Value, Special) )$/;" c type:MyMod.MyList roles:exposed Tree input.elm /^ , MyList(Empty), Tree(Node, Value, Special) )$/;" t module:MyMod roles:exposed Node input.elm /^ , MyList(Empty), Tree(Node, Value, Special) )$/;" c type:MyMod.Tree roles:exposed Value input.elm /^ , MyList(Empty), Tree(Node, Value, Special) )$/;" c type:MyMod.Tree roles:exposed Special input.elm /^ , MyList(Empty), Tree(Node, Value, Special) )$/;" c type:MyMod.Tree roles:exposed otherMod input.elm /^import otherMod exposing (Coin)$/;" m roles:imported Coin input.elm /^import otherMod exposing (Coin)$/;" t module:otherMod roles:exposed Dotted.name.Here input.elm /^import Dotted.name.Here exposing (Dot(Cons))$/;" m roles:imported Dot input.elm /^import Dotted.name.Here exposing (Dot(Cons))$/;" t module:Dotted.name.Here roles:exposed Cons input.elm /^import Dotted.name.Here exposing (Dot(Cons))$/;" c type:Dotted.name.Here.Dot roles:exposed func input.elm /^func x =$/;" f module:SomeMod roles:def String input-1.elm /^import String$/;" m roles:imported A input-1.elm /^type A = B$/;" t roles:def B input-1.elm /^type A = B$/;" c type:A roles:def ================================================ FILE: Units/parser-elm.r/elm-imports.d/input-1.elm ================================================ import String type A = B ================================================ FILE: Units/parser-elm.r/elm-imports.d/input.elm ================================================ module SomeMod exposing (..) import PlainImport import MyMod exposing ( map, foldl , Maybe, Possibly , Result(..) , MyList(Empty), Tree(Node, Value, Special) ) -- Allow a bit of looseness in module naming, even though the -- compiler will reject it import otherMod exposing (Coin) -- Allow a dotted module name import Dotted.name.Here exposing (Dot(Cons)) func x = 42 + 24 ================================================ FILE: Units/parser-elm.r/elm-just-comments.d/expected.tags ================================================ ================================================ FILE: Units/parser-elm.r/elm-just-comments.d/input.elm ================================================ -- a = 1 {- b = 2 -} {- c = 3 -} {-* d = 4 -} {-* e = 5 -} {- comment -} {- another comment -} {- comment {- nested comment -} g = 7 -} ================================================ FILE: Units/parser-elm.r/elm-let-in.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r ================================================ FILE: Units/parser-elm.r/elm-let-in.d/expected.tags ================================================ funcA input.elm /^funcA =$/;" f roles:def a1 input.elm /^ a1 = 1$/;" f function:funcA roles:def a2 input.elm /^ a2 x y = x + y$/;" f function:funcA roles:def funcB input.elm /^funcB b =$/;" f roles:def b1 input.elm /^ b1 =$/;" f function:funcB roles:def b2 input.elm /^ b2 x y =$/;" f function:funcB roles:def b3 input.elm /^ b3 x y =$/;" f function:funcB roles:def b4 input.elm /^ b4 v w =$/;" f function:funcB roles:def b5 input.elm /^ b5 i j = i + j$/;" f function:funcB roles:def funcC input.elm /^funcC =$/;" f roles:def c1 input.elm /^ c1 = 1$/;" f function:funcC roles:def c2 input.elm /^ c2 x y = x + y$/;" f function:funcC roles:def ================================================ FILE: Units/parser-elm.r/elm-let-in.d/input.elm ================================================ -- Basic let/in block funcA = let a1 = 1 a2 x y = x + y in a1 << a2 -- Nested let/in blocks funcB b = let b1 = let b2 x y = let b3 x y = x * y b4 v w = v * w in b3 b2 99 in (flip << b2) 77 b5 i j = i + j in b1 b -- Let/in block with type annotation funcC = let c1 : Int c1 = 1 c2 : Int Float -> Something c2 x y = x + y in c1 << c2 ================================================ FILE: Units/parser-elm.r/elm-modules.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r ================================================ FILE: Units/parser-elm.r/elm-modules.d/expected.tags ================================================ Amodule input.elm /^module Amodule exposing (expo)$/;" m roles:def someFunc input.elm /^someFunc a =$/;" f module:Amodule roles:def A1module input-1.elm /^module A1module exposing (expo)$/;" m roles:def someFunc1 input-1.elm /^someFunc1 a =$/;" f module:A1module roles:def expo input-1.elm /^expo a =$/;" f module:A1module roles:def A2_1 input-2.elm /^module A2_1 exposing (expo)$/;" m roles:def func2_1 input-2.elm /^func2_1 a =$/;" f module:A2_1 roles:def func2_2 input-2.elm /^func2_2 a =$/;" f module:A2_1 roles:def A3Module input-3.elm /^module A3Module exposing$/;" m roles:def a4Module input-4.elm /^module a4Module exposing (..)$/;" m roles:def a5.Module.Deep input-5.elm /^module a5.Module.Deep exposing (..)$/;" m roles:def ================================================ FILE: Units/parser-elm.r/elm-modules.d/input-1.elm ================================================ module A1module exposing (expo) someFunc1 a = 42 + 24 expo a = 42 + 24 ================================================ FILE: Units/parser-elm.r/elm-modules.d/input-2.elm ================================================ {- Only the first module declaration should be recognised -} module A2_1 exposing (expo) module A2_2 exposing (expo) func2_1 a = 42 + 24 module A2_3 exposing (expo) func2_2 a = 42 + 24 ================================================ FILE: Units/parser-elm.r/elm-modules.d/input-3.elm ================================================ -- Should be able to parse multiple exposed items in a module declaration module A3Module exposing ( map, foldl , Maybe, Possibly , Result(..) , MyList(Empty), Tree(Node, Value, Special) ) ================================================ FILE: Units/parser-elm.r/elm-modules.d/input-4.elm ================================================ -- Be relaxed about module name capitalisation module a4Module exposing (..) ================================================ FILE: Units/parser-elm.r/elm-modules.d/input-5.elm ================================================ -- Be relaxed about module name capitalisation module a5.Module.Deep exposing (..) ================================================ FILE: Units/parser-elm.r/elm-modules.d/input.elm ================================================ module Amodule exposing (expo) someFunc a = 42 + 24 ================================================ FILE: Units/parser-elm.r/elm-multiline-strings.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r ================================================ FILE: Units/parser-elm.r/elm-multiline-strings.d/expected.tags ================================================ funcA input.elm /^funcA a1 a2 = a1 + a2$/;" f roles:def funcB input.elm /^funcB b =$/;" f roles:def funcD input.elm /^funcD d1 =$/;" f roles:def ================================================ FILE: Units/parser-elm.r/elm-multiline-strings.d/input.elm ================================================ -- We should be able to parse this function funcA a1 a2 = a1 + a2 -- We should get only funcB, not funcC funcB b = b + """This is a multiline string, which ends after funcC = 3 """ funcD d1 = (d1 + 34) -- The end ================================================ FILE: Units/parser-elm.r/elm-namespaces.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r ================================================ FILE: Units/parser-elm.r/elm-namespaces.d/expected.tags ================================================ A1Mod input.elm /^module A1Mod exposing (..)$/;" m roles:def A1NameSpace input.elm /^import A1Import as A1NameSpace exposing (a1ImpFunc)$/;" n module:A1Mod roles:def moduleName:A1Import A1Import input.elm /^import A1Import as A1NameSpace exposing (a1ImpFunc)$/;" m roles:imported a1ImpFunc input.elm /^import A1Import as A1NameSpace exposing (a1ImpFunc)$/;" f module:A1Import roles:exposed func input.elm /^func a1 =$/;" f module:A1Mod roles:def ================================================ FILE: Units/parser-elm.r/elm-namespaces.d/input.elm ================================================ module A1Mod exposing (..) import A1Import as A1NameSpace exposing (a1ImpFunc) func a1 = 42 + 24 ================================================ FILE: Units/parser-elm.r/elm-optlist-compatibility.d/README.md ================================================ This directory contains the tests from the previous Elm parser, which used the optlib parser. The tests are included to here to check compatibility. However, the output from this PEG parser (and hence the contents of expected.tags) is enhanced. ================================================ FILE: Units/parser-elm.r/elm-optlist-compatibility.d/args.ctags ================================================ --sort=no --fields=+r-t --extras=+r ================================================ FILE: Units/parser-elm.r/elm-optlist-compatibility.d/expected.tags ================================================ Main input.elm /^port module Main exposing (..)$/;" m roles:def List input.elm /^import List$/;" m roles:imported Maybe input.elm /^import Maybe exposing (withDefault)$/;" m roles:imported withDefault input.elm /^import Maybe exposing (withDefault)$/;" f module:Maybe roles:exposed Je input.elm /^import Json.Encode as Je$/;" n module:Main roles:def moduleName:Json.Encode Json.Encode input.elm /^import Json.Encode as Je$/;" m roles:imported Thing input.elm /^type Thing$/;" t module:Main roles:def One input.elm /^ = One$/;" c type:Main.Thing roles:def Two input.elm /^ | Two Int$/;" c type:Main.Thing roles:def Param input.elm /^type Param a$/;" t module:Main roles:def Cons input.elm /^ = Cons a$/;" c type:Main.Param roles:def Other input.elm /^ | Other a$/;" c type:Main.Param roles:def Num input.elm /^type alias Num =$/;" a module:Main roles:def outward input.elm /^port outward : String -> Cmd a$/;" p module:Main roles:def inward input.elm /^port inward : (b -> a) -> Sub a$/;" p module:Main roles:def foo input.elm /^foo a =$/;" f module:Main roles:def bar input.elm /^bar =$/;" f module:Main roles:def bas input.elm /^ bas =$/;" f function:Main.bar roles:def ================================================ FILE: Units/parser-elm.r/elm-optlist-compatibility.d/input.elm ================================================ port module Main exposing (..) import List import Maybe exposing (withDefault) import Json.Encode as Je type Thing = One | Two Int type Param a = Cons a | Other a type alias Num = Int port outward : String -> Cmd a port inward : (b -> a) -> Sub a foo : Int -> Int foo a = a + 1 bar = let bas = 1 in bas ================================================ FILE: Units/parser-elm.r/elm-parameter-capture.d/args.ctags ================================================ --sort=no --extras=+r --fields=+rS ================================================ FILE: Units/parser-elm.r/elm-parameter-capture.d/expected.tags ================================================ funcA input.elm /^funcA a1 a2 =$/;" f signature:a1 a2 roles:def funcB input.elm /^funcB b1$/;" f typeref:typename:Int -> Int -> Int signature:b1 b2 roles:def funcC input.elm /^funcC (c1, c2) {c3} (C4Cons c4 c5) =$/;" f signature:(c1, c2) {c3} (C4Cons c4 c5) roles:def funcD input.elm /^funcD = 4$/;" f signature: roles:def funcE input.elm /^funcE=5$/;" f signature: roles:def funcF1 input.elm /^funcF1 =$/;" f signature: roles:def funcF2 input.elm /^ funcF2 f1 f2 = 6$/;" f function:funcF1 signature:f1 f2 roles:def ================================================ FILE: Units/parser-elm.r/elm-parameter-capture.d/input.elm ================================================ -- Simple paramaeters funcA a1 a2 = a1 + a2 -- With extra whitespace and type annotation funcB : Int -> Int -> Int funcB b1 b2 = b1 + b2 -- Complex parameters funcC (c1, c2) {c3} (C4Cons c4 c5) = c1 + c2 -- No parameters funcD = 4 -- No whitespace funcE=5 -- Functions inside let/in block funcF1 = let funcF2 f1 f2 = 6 in 6 ================================================ FILE: Units/parser-elm.r/elm-parameter-patterns.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r ================================================ FILE: Units/parser-elm.r/elm-parameter-patterns.d/expected.tags ================================================ funcA input.elm /^funcA (a1, _, a2) =$/;" f roles:def funcB input.elm /^funcB (b1, b2) (b3, b4) =$/;" f roles:def funcC input.elm /^funcC {c1} {c2, c3} =$/;" f roles:def funcD input.elm /^funcD (D1Cons a b) (D2Cons a b, D3Cons a b) =$/;" f roles:def funcE input.elm /^funcE (D1Cons {a, b} c) d =$/;" f roles:def funcF input.elm /^funcF (D1Cons ({a, b} as ab) c) (d as d2) =$/;" f roles:def funcG input.elm /^funcG =$/;" f roles:def ================================================ FILE: Units/parser-elm.r/elm-parameter-patterns.d/input.elm ================================================ -- Patterns can be found at https://elmprogramming.com/pattern-matching.html -- Simple tuple funcA (a1, _, a2) = a1 + a2 -- Multiple tuples funcB (b1, b2) (b3, b4) = b1 + b2 -- Records with named fields funcC {c1} {c2, c3} = c1 + c2 + c3 -- Constructor patterns funcD (D1Cons a b) (D2Cons a b, D3Cons a b) = b + 1 -- Combining the above funcE (D1Cons {a, b} c) d = c + 1 -- Using 'as' clauses funcF (D1Cons ({a, b} as ab) c) (d as d2) = c + 1 -- Make sure complex parameters can be used in anonymous functions funcG = (\ (D1Cons {a, b} c) d -> a + b + c + d) ================================================ FILE: Units/parser-elm.r/elm-ports.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r ================================================ FILE: Units/parser-elm.r/elm-ports.d/expected.tags ================================================ Main input.elm /^port module Main exposing (..)$/;" m roles:def outgoing input.elm /^port outgoing : Enc.Value -> Cmd msg$/;" p module:Main typeref:typename:Enc.Value -> Cmd msg roles:def incoming input.elm /^port incoming : (Enc.Value -> msg) -> Sub msg$/;" p module:Main typeref:typename:(Enc.Value -> msg) -> Sub msg roles:def ================================================ FILE: Units/parser-elm.r/elm-ports.d/input.elm ================================================ port module Main exposing (..) port outgoing : Enc.Value -> Cmd msg port incoming : (Enc.Value -> msg) -> Sub msg ================================================ FILE: Units/parser-elm.r/elm-single-expressions.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r ================================================ FILE: Units/parser-elm.r/elm-single-expressions.d/expected.tags ================================================ funcA input.elm /^funcA a1 a2 =$/;" f roles:def funcB input.elm /^funcB b1 b2 =$/;" f roles:def funcC input.elm /^funcC c1 =$/;" f roles:def funcD input.elm /^funcD d1 d2 =$/;" f roles:def funcE input.elm /^funcE e1 =$/;" f roles:def funcF input.elm /^funcF f1 =$/;" f roles:def funcG input.elm /^funcG g1 =$/;" f roles:def funcH input.elm /^funcH h1 =$/;" f roles:def funcI input.elm /^funcI i1 =$/;" f roles:def ================================================ FILE: Units/parser-elm.r/elm-single-expressions.d/input.elm ================================================ -- Binary operators and decimals funcA a1 a2 = a1 + a2 - 3.3 * 3e-3 / .1 -- More binary operators funcB b1 b2 = b1 |> b2 >> 3.3 /= 4 + 5 -- Hex numbers funcC c1 = 0xfa0 /= 0xFAE0 -- Parentheses funcD d1 d2 = (3e4 + (5^7 - 0xe) // .2) -- Call prefix functions funcE e1 = e1 + myFunc 3 4 + 5 -- Multiline strings funcF f1 = f1 ++ """This is a multiline string, which ends after this line """ -- Strings funcG g1 = "Double q\"uote, \n, etc" ++ "uni\u{04FA2}code" -- Characters funcH h1 = 'D' ++ '\"' ++ '\'' ++ '\n' ++ '\u{04FA2}' -- Anonymous functions funcI i1 = (\ x y z -> x+y - z) ================================================ FILE: Units/parser-elm.r/elm-type-annotations.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r ================================================ FILE: Units/parser-elm.r/elm-type-annotations.d/expected.tags ================================================ funcA input.elm /^funcA a = 1$/;" f typeref:typename:Int -> Float -> Float roles:def funcB input.elm /^funcB b =$/;" f typeref:typename:String -> Float roles:def funcC input.elm /^funcC c = 3$/;" f typeref:typename:Int -> {c: String} roles:def funcD input.elm /^funcD = 4$/;" f typeref:typename:(Int, Int) -> String roles:def funcE input.elm /^funcE = 5$/;" f typeref:typename:Float -> (Int -> Int -> Int -> String) roles:def funcF input.elm /^funcF = 6$/;" f typeref:typename:String -> {- Old ->-} Int roles:def funcG input.elm /^funcG = 7$/;" f typeref:typename:G.Int -> G.Other roles:def funcH input.elm /^funcH h =$/;" f typeref:typename:Int -> Int roles:def h2 input.elm /^ h2 = 34$/;" f function:funcH roles:def ================================================ FILE: Units/parser-elm.r/elm-type-annotations.d/input.elm ================================================ -- Simple function with a type annotation funcA : Int -> Float -> Float funcA a = 1 -- Type annotation over multiple lines funcB : String -> Float funcB b = b + 1 -- Function with a record in the type annotation funcC : Int -> {c: String} funcC c = 3 -- Function with a tuple in the type annotation funcD : (Int, Int) -> String funcD = 4 -- Functions in the type annotation funcE : Float -> (Int -> Int -> Int -> String) funcE = 5 -- Comments in the type annotation funcF : -- Comment String -> {- Old ->-} Int {-- End--} funcF = 6 -- Dotted types in the type annotation funcG : G.Int -> G.Other funcG = 7 -- Functions with type annotations should provide scope funcH : Int -> Int funcH h = let h2 = 34 in h + h2 ================================================ FILE: Units/parser-elm.r/elm-types.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r-t ================================================ FILE: Units/parser-elm.r/elm-types.d/expected.tags ================================================ Apple input.elm /^type Apple = Cox | Braeburn$/;" t roles:def Cox input.elm /^type Apple = Cox | Braeburn$/;" c type:Apple roles:def Braeburn input.elm /^type Apple = Cox | Braeburn$/;" c type:Apple roles:def Box input.elm /^type Box a = Cardboard a | Wooden$/;" t roles:def Cardboard input.elm /^type Box a = Cardboard a | Wooden$/;" c type:Box roles:def Wooden input.elm /^type Box a = Cardboard a | Wooden$/;" c type:Box roles:def Clog input.elm /^type Clog a b = Dutch | English$/;" t roles:def Dutch input.elm /^type Clog a b = Dutch | English$/;" c type:Clog roles:def English input.elm /^type Clog a b = Dutch | English$/;" c type:Clog roles:def DType input.elm /^type DType$/;" t roles:def D1Cons input.elm /^ = D1Cons { x : String, y:Maybe Int}$/;" c type:DType roles:def D2Cons input.elm /^ | D2Cons Float Float Clog$/;" c type:DType roles:def TypesTwo input-1.elm /^module TypesTwo exposing (..)$/;" m roles:def T2a input-1.elm /^type T2a = T2a_1 | T2a_2$/;" t module:TypesTwo roles:def T2a_1 input-1.elm /^type T2a = T2a_1 | T2a_2$/;" c type:TypesTwo.T2a roles:def T2a_2 input-1.elm /^type T2a = T2a_1 | T2a_2$/;" c type:TypesTwo.T2a roles:def funcT2 input-1.elm /^funcT2 = "T2"$/;" f module:TypesTwo roles:def T2b input-1.elm /^type T2b = T2b_1 | T2b_2$/;" t module:TypesTwo roles:def T2b_1 input-1.elm /^type T2b = T2b_1 | T2b_2$/;" c type:TypesTwo.T2b roles:def T2b_2 input-1.elm /^type T2b = T2b_1 | T2b_2$/;" c type:TypesTwo.T2b roles:def ================================================ FILE: Units/parser-elm.r/elm-types.d/input-1.elm ================================================ -- This is to check scoping still works okay module TypesTwo exposing (..) type T2a = T2a_1 | T2a_2 funcT2 = "T2" type T2b = T2b_1 | T2b_2 ================================================ FILE: Units/parser-elm.r/elm-types.d/input.elm ================================================ type Apple = Cox | Braeburn -- Parameterised types type Box a = Cardboard a | Wooden type Clog a b = Dutch | English -- Constructors with types type DType = D1Cons { x : String, y:Maybe Int} | D2Cons Float Float Clog ================================================ FILE: Units/parser-emacsLisp.r/definitions.d/args.ctags ================================================ --fields=+K ================================================ FILE: Units/parser-emacsLisp.r/definitions.d/expected.tags ================================================ a0 input.el /^(defun a0 (n) (+ 1 n))$/;" function b0 input.el /^(defvar b0 3)$/;" variable c0 input.el /^(defconstant c0 5)$/;" unknown definer:defconstant defunknown0 input.el /^(defmacro defunknown0 (s)$/;" macro defunknown1 input.el /^(defmacro* defunknown1 (s)$/;" macro e0 input.el /^(defalias 'e0 'a0)$/;" alias f0 input.el /^(defvaralias 'f0 'b0)$/;" varalias g0 input.el /^(defsubst g0 () nil)$/;" subst h0 input.el /^(define-error 'h0 (purecopy "TEST"))$/;" error h1 input.el /^(define-error (quote h1) (purecopy "TEST"))$/;" error i0 input.el /^(define-minor-mode i0 "DOC")$/;" minorMode j0 input.el /^(define-derived-mode j0 nil "TEST")$/;" derivedMode k0 input.el /^(defcustom k0 t$/;" custom l0 input.el /^(defgroup l0 nil "DOC" :group 'editing)$/;" group m0 input.el /^(defface m0$/;" face n0 input.el /^(deftheme n0 "DOC")$/;" theme o0 input.el /^(defvar-local o0 1)$/;" variable p0 input.el /^(define-globalized-minor-mode p0$/;" minorMode q0 input.el /^(define-obsolete-function-alias 'q0 'f0)$/;" alias r0 input.el /^(define-global-minor-mode r0$/;" minorMode s0 input.el /^(define-inline s0 (n)$/;" inline t0 input.el /^(defun* t0 (n)$/;" function u0 input.el /^(defsubst* u0 () nil)$/;" subst ================================================ FILE: Units/parser-emacsLisp.r/definitions.d/input.el ================================================ (defun a0 (n) (+ 1 n)) (defvar b0 3) (defconstant c0 5) (defmacro defunknown0 (s) `(defconstant ,s 'unknown)) (defalias 'e0 'a0) (defvaralias 'f0 'b0) (defsubst g0 () nil) (define-error 'h0 (purecopy "TEST")) (define-error (quote h1) (purecopy "TEST")) (define-minor-mode i0 "DOC") (define-derived-mode j0 nil "TEST") (defcustom k0 t "doc" :type 'number :group 'l0 :version "22.1") (defgroup l0 nil "DOC" :group 'editing) (defface m0 '((t (:inherit region))) "DOC" :group 'l0 :version "22.1") (deftheme n0 "DOC") (condition-case nil (define-key dont-capture-me-map "m" 'ctags) (error nil)) (defvar-local o0 1) (define-globalized-minor-mode p0 visual-line-mode turn-on-visual-line-mode) (define-obsolete-function-alias 'q0 'f0) (define-global-minor-mode r0 subword-mode turn-on-subword-mode) (define-inline s0 (n) (+ n 1)) (defun* t0 (n) (+ n 1)) (defmacro* defunknown1 (s) `(defconstant ,s 'unknown)) (defsubst* u0 () nil) ================================================ FILE: Units/parser-emacsLisp.r/misleading-names.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-emacsLisp.r/misleading-names.d/expected.tags ================================================ a input.el /^(defvar a)$/;" v b input.el /^(defvar b)$/;" v ================================================ FILE: Units/parser-emacsLisp.r/misleading-names.d/input.el ================================================ (defvar a) ;; ctags should not tag 'x': (default x) (definition y0) (definitionz y1) (defvar b) ================================================ FILE: Units/parser-emacsLisp.r/newline.b/expected.tags ================================================ f input.el /^ f () 1)$/;" f ================================================ FILE: Units/parser-emacsLisp.r/newline.b/input.el ================================================ (defun f () 1) ================================================ FILE: Units/parser-emacsLisp.r/simple-emacsLisp.d/README ================================================ The input is taken from simple.el of GNU Emacs. I didn't check all the entries of expected.tags because it has so many entires. However, I put this to our git repository because there are so various def* in simple.el. So when we change the code of EmacsLisp parser, this test case may notify something useful. ================================================ FILE: Units/parser-emacsLisp.r/simple-emacsLisp.d/args.ctags ================================================ --sort=no --fields=+K ================================================ FILE: Units/parser-emacsLisp.r/simple-emacsLisp.d/expected.tags ================================================ compilation-current-error input.el /^(defvar compilation-current-error)$/;" variable compilation-context-lines input.el /^(defvar compilation-context-lines)$/;" variable shell-command-dont-erase-buffer input.el /^(defcustom shell-command-dont-erase-buffer nil$/;" custom shell-command-saved-pos input.el /^(defvar shell-command-saved-pos nil$/;" variable idle-update-delay input.el /^(defcustom idle-update-delay 0.5$/;" custom killing input.el /^(defgroup killing nil$/;" group paren-matching input.el /^(defgroup paren-matching nil$/;" group next-error input.el /^(defgroup next-error nil$/;" group next-error input.el /^(defface next-error$/;" face next-error-highlight input.el /^(defcustom next-error-highlight 0.5$/;" custom next-error-highlight-no-select input.el /^(defcustom next-error-highlight-no-select 0.5$/;" custom next-error-recenter input.el /^(defcustom next-error-recenter nil$/;" custom next-error-hook input.el /^(defcustom next-error-hook nil$/;" custom next-error-highlight-timer input.el /^(defvar next-error-highlight-timer nil)$/;" variable next-error-overlay-arrow-position input.el /^(defvar next-error-overlay-arrow-position nil)$/;" variable next-error-last-buffer input.el /^(defvar next-error-last-buffer nil$/;" variable next-error-function input.el /^(defvar next-error-function nil$/;" variable next-error-move-function input.el /^(defvar next-error-move-function nil$/;" variable next-error-buffer-p input.el /^(defsubst next-error-buffer-p (buffer$/;" subst next-error-find-buffer input.el /^(defun next-error-find-buffer (&optional avoid-current$/;" function next-error input.el /^(defun next-error (&optional arg reset)$/;" function next-error-internal input.el /^(defun next-error-internal ()$/;" function goto-next-locus input.el /^(defalias 'goto-next-locus 'next-error)$/;" alias next-match input.el /^(defalias 'next-match 'next-error)$/;" alias previous-error input.el /^(defun previous-error (&optional n)$/;" function first-error input.el /^(defun first-error (&optional n)$/;" function next-error-no-select input.el /^(defun next-error-no-select (&optional n)$/;" function previous-error-no-select input.el /^(defun previous-error-no-select (&optional n)$/;" function next-error-follow-last-line input.el /^(defvar next-error-follow-last-line nil)$/;" variable next-error-follow-minor-mode input.el /^(define-minor-mode next-error-follow-minor-mode$/;" minorMode next-error-follow-mode-post-command-hook input.el /^(defun next-error-follow-mode-post-command-hook ()$/;" function fundamental-mode input.el /^(defun fundamental-mode ()$/;" function special-mode-map input.el /^(defvar special-mode-map$/;" variable special-mode input.el /^(define-derived-mode special-mode nil "Special"$/;" derivedMode self-insert-uses-region-functions input.el /^(defvar self-insert-uses-region-functions nil$/;" variable hard-newline input.el /^(defvar hard-newline (propertize "\\n" 'hard t 'rear-nonsticky '(hard))$/;" variable newline input.el /^(defun newline (&optional arg interactive)$/;" function set-hard-newline-properties input.el /^(defun set-hard-newline-properties (from to)$/;" function open-line input.el /^(defun open-line (n)$/;" function split-line input.el /^(defun split-line (&optional arg)$/;" function delete-indentation input.el /^(defun delete-indentation (&optional arg)$/;" function join-line input.el /^(defalias 'join-line #'delete-indentation) ; easier to find$/;" alias delete-blank-lines input.el /^(defun delete-blank-lines ()$/;" function delete-trailing-lines input.el /^(defcustom delete-trailing-lines t$/;" custom region-modifiable-p input.el /^(defun region-modifiable-p (start end)$/;" function delete-trailing-whitespace input.el /^(defun delete-trailing-whitespace (&optional start end)$/;" function newline-and-indent input.el /^(defun newline-and-indent ()$/;" function reindent-then-newline-and-indent input.el /^(defun reindent-then-newline-and-indent ()$/;" function read-quoted-char-radix input.el /^(defcustom read-quoted-char-radix 8$/;" custom read-quoted-char input.el /^(defun read-quoted-char (&optional prompt)$/;" function quoted-insert input.el /^(defun quoted-insert (arg)$/;" function forward-to-indentation input.el /^(defun forward-to-indentation (&optional arg)$/;" function backward-to-indentation input.el /^(defun backward-to-indentation (&optional arg)$/;" function back-to-indentation input.el /^(defun back-to-indentation ()$/;" function fixup-whitespace input.el /^(defun fixup-whitespace ()$/;" function delete-horizontal-space input.el /^(defun delete-horizontal-space (&optional backward-only)$/;" function just-one-space input.el /^(defun just-one-space (&optional n)$/;" function cycle-spacing--context input.el /^(defvar cycle-spacing--context nil$/;" variable cycle-spacing input.el /^(defun cycle-spacing (&optional n preserve-nl-back mode)$/;" function beginning-of-buffer input.el /^(defun beginning-of-buffer (&optional arg)$/;" function end-of-buffer input.el /^(defun end-of-buffer (&optional arg)$/;" function delete-active-region input.el /^(defcustom delete-active-region t$/;" custom region-extract-function input.el /^(defvar region-extract-function$/;" variable region-insert-function input.el /^(defvar region-insert-function$/;" variable delete-backward-char input.el /^(defun delete-backward-char (n &optional killflag)$/;" function delete-forward-char input.el /^(defun delete-forward-char (n &optional killflag)$/;" function mark-whole-buffer input.el /^(defun mark-whole-buffer ()$/;" function goto-line input.el /^(defun goto-line (line &optional buffer)$/;" function count-words-region input.el /^(defun count-words-region (start end &optional arg)$/;" function count-words input.el /^(defun count-words (start end)$/;" function count-words--buffer-message input.el /^(defun count-words--buffer-message ()$/;" function count-words--message input.el /^(defun count-words--message (str start end)$/;" function count-lines-region input.el /^(define-obsolete-function-alias 'count-lines-region 'count-words-region "24.1")$/;" alias what-line input.el /^(defun what-line ()$/;" function count-lines input.el /^(defun count-lines (start end)$/;" function line-number-at-pos input.el /^(defun line-number-at-pos (&optional pos absolute)$/;" function what-cursor-position input.el /^(defun what-cursor-position (&optional detail)$/;" function read-expression-map input.el /^(defvar read-expression-map$/;" variable read-minibuffer input.el /^(defun read-minibuffer (prompt &optional initial-contents)$/;" function eval-minibuffer input.el /^(defun eval-minibuffer (prompt &optional initial-contents)$/;" function minibuffer-completing-symbol input.el /^(defvar minibuffer-completing-symbol nil$/;" variable minibuffer-default input.el /^(defvar minibuffer-default nil$/;" variable eval-expression-print-level input.el /^(defcustom eval-expression-print-level 4$/;" custom eval-expression-print-length input.el /^(defcustom eval-expression-print-length 12$/;" custom eval-expression-debug-on-error input.el /^(defcustom eval-expression-debug-on-error t$/;" custom eval-expression-print-maximum-character input.el /^(defcustom eval-expression-print-maximum-character 127$/;" custom eval-expression-print-format input.el /^(defun eval-expression-print-format (value)$/;" function eval-expression-minibuffer-setup-hook input.el /^(defvar eval-expression-minibuffer-setup-hook nil$/;" variable read--expression input.el /^(defun read--expression (prompt &optional initial-contents)$/;" function eval-expression-get-print-arguments input.el /^(defun eval-expression-get-print-arguments (prefix-argument)$/;" function eval-expression input.el /^(defun eval-expression (exp &optional insert-value no-truncate char-print-limit)$/;" function edit-and-eval-command input.el /^(defun edit-and-eval-command (prompt command)$/;" function repeat-complex-command input.el /^(defun repeat-complex-command (arg)$/;" function extended-command-history input.el /^(defvar extended-command-history nil)$/;" variable execute-extended-command--last-typed input.el /^(defvar execute-extended-command--last-typed nil)$/;" variable read-extended-command input.el /^(defun read-extended-command ()$/;" function suggest-key-bindings input.el /^(defcustom suggest-key-bindings t$/;" custom extended-command-suggest-shorter input.el /^(defcustom extended-command-suggest-shorter t$/;" custom execute-extended-command--shorter-1 input.el /^(defun execute-extended-command--shorter-1 (name length)$/;" function execute-extended-command--shorter input.el /^(defun execute-extended-command--shorter (name typed)$/;" function execute-extended-command input.el /^(defun execute-extended-command (prefixarg &optional command-name typed)$/;" function command-execute input.el /^(defun command-execute (cmd &optional record-flag keys special)$/;" function minibuffer-history input.el /^(defvar minibuffer-history nil$/;" variable minibuffer-history-sexp-flag input.el /^(defvar minibuffer-history-sexp-flag nil$/;" variable minibuffer-history-search-history input.el /^(defvar minibuffer-history-search-history nil)$/;" variable minibuffer-text-before-history input.el /^(defvar minibuffer-text-before-history nil$/;" variable minibuffer-history-initialize input.el /^(defun minibuffer-history-initialize ()$/;" function minibuffer-avoid-prompt input.el /^(defun minibuffer-avoid-prompt (_new _old)$/;" function minibuffer-history-case-insensitive-variables input.el /^(defcustom minibuffer-history-case-insensitive-variables nil$/;" custom previous-matching-history-element input.el /^(defun previous-matching-history-element (regexp n)$/;" function next-matching-history-element input.el /^(defun next-matching-history-element (regexp n)$/;" function minibuffer-temporary-goal-position input.el /^(defvar minibuffer-temporary-goal-position nil)$/;" variable minibuffer-default-add-function input.el /^(defvar minibuffer-default-add-function 'minibuffer-default-add-completions$/;" variable minibuffer-default-add-done input.el /^(defvar minibuffer-default-add-done nil$/;" variable minibuffer-default-add-completions input.el /^(defun minibuffer-default-add-completions ()$/;" function goto-history-element input.el /^(defun goto-history-element (nabs)$/;" function next-history-element input.el /^(defun next-history-element (n)$/;" function previous-history-element input.el /^(defun previous-history-element (n)$/;" function next-line-or-history-element input.el /^(defun next-line-or-history-element (&optional arg)$/;" function previous-line-or-history-element input.el /^(defun previous-line-or-history-element (&optional arg)$/;" function next-complete-history-element input.el /^(defun next-complete-history-element (n)$/;" function previous-complete-history-element input.el /^(defun previous-complete-history-element (n)$/;" function minibuffer-prompt-width input.el /^(defun minibuffer-prompt-width ()$/;" function minibuffer-history-isearch-message-overlay input.el /^(defvar minibuffer-history-isearch-message-overlay)$/;" variable minibuffer-history-isearch-setup input.el /^(defun minibuffer-history-isearch-setup ()$/;" function minibuffer-history-isearch-end input.el /^(defun minibuffer-history-isearch-end ()$/;" function minibuffer-history-isearch-search input.el /^(defun minibuffer-history-isearch-search ()$/;" function minibuffer-history-isearch-message input.el /^(defun minibuffer-history-isearch-message (&optional c-q-hack ellipsis)$/;" function minibuffer-history-isearch-wrap input.el /^(defun minibuffer-history-isearch-wrap ()$/;" function minibuffer-history-isearch-push-state input.el /^(defun minibuffer-history-isearch-push-state ()$/;" function minibuffer-history-isearch-pop-state input.el /^(defun minibuffer-history-isearch-pop-state (_cmd hist-pos)$/;" function advertised-undo input.el /^(define-obsolete-function-alias 'advertised-undo 'undo "23.2")$/;" alias undo-equiv-table input.el /^(defconst undo-equiv-table (make-hash-table :test 'eq :weakness t)$/;" const undo-in-region input.el /^(defvar undo-in-region nil$/;" variable undo-no-redo input.el /^(defvar undo-no-redo nil$/;" variable pending-undo-list input.el /^(defvar pending-undo-list nil$/;" variable undo input.el /^(defun undo (&optional arg)$/;" function buffer-disable-undo input.el /^(defun buffer-disable-undo (&optional buffer)$/;" function undo-only input.el /^(defun undo-only (&optional arg)$/;" function undo-in-progress input.el /^(defvar undo-in-progress nil$/;" variable undo-more input.el /^(defun undo-more (n)$/;" function primitive-undo input.el /^(defun primitive-undo (n list)$/;" function undo-copy-list input.el /^(defun undo-copy-list (list)$/;" function undo-copy-list-1 input.el /^(defun undo-copy-list-1 (elt)$/;" function undo-start input.el /^(defun undo-start (&optional beg end)$/;" function undo-make-selective-list input.el /^(defun undo-make-selective-list (start end)$/;" function undo-elt-in-region input.el /^(defun undo-elt-in-region (undo-elt start end)$/;" function undo-elt-crosses-region input.el /^(defun undo-elt-crosses-region (undo-elt start end)$/;" function undo-adjust-elt input.el /^(defun undo-adjust-elt (elt deltas)$/;" function undo-adjust-beg-end input.el /^(defun undo-adjust-beg-end (beg end deltas)$/;" function undo-adjust-pos input.el /^(defun undo-adjust-pos (pos deltas &optional use-<)$/;" function undo-delta input.el /^(defun undo-delta (undo-elt)$/;" function undo-auto--last-boundary-cause input.el /^(defvar-local undo-auto--last-boundary-cause nil$/;" variable undo-auto-current-boundary-timer input.el /^(defvar undo-auto-current-boundary-timer nil$/;" variable undo-auto--this-command-amalgamating input.el /^(defvar undo-auto--this-command-amalgamating nil$/;" variable undo-auto--needs-boundary-p input.el /^(defun undo-auto--needs-boundary-p ()$/;" function undo-auto--last-boundary-amalgamating-number input.el /^(defun undo-auto--last-boundary-amalgamating-number ()$/;" function undo-auto--ensure-boundary input.el /^(defun undo-auto--ensure-boundary (cause)$/;" function undo-auto--boundaries input.el /^(defun undo-auto--boundaries (cause)$/;" function undo-auto--boundary-timer input.el /^(defun undo-auto--boundary-timer ()$/;" function undo-auto--boundary-ensure-timer input.el /^(defun undo-auto--boundary-ensure-timer ()$/;" function undo-auto--undoably-changed-buffers input.el /^(defvar undo-auto--undoably-changed-buffers nil$/;" variable undo-auto--add-boundary input.el /^(defun undo-auto--add-boundary ()$/;" function undo-auto-amalgamate input.el /^(defun undo-auto-amalgamate ()$/;" function undo-auto--undoable-change input.el /^(defun undo-auto--undoable-change ()$/;" function undo-amalgamate-change-group input.el /^(defun undo-amalgamate-change-group (handle)$/;" function undo-ask-before-discard input.el /^(defcustom undo-ask-before-discard nil$/;" custom undo-extra-outer-limit input.el /^(defvar undo-extra-outer-limit nil$/;" variable undo-outer-limit-truncate input.el /^(defun undo-outer-limit-truncate (size)$/;" function password-word-equivalents input.el /^(defcustom password-word-equivalents$/;" custom shell-command-history input.el /^(defvar shell-command-history nil$/;" variable shell-command-switch input.el /^(defvar shell-command-switch (purecopy "-c")$/;" variable shell-command-default-error-buffer input.el /^(defvar shell-command-default-error-buffer nil$/;" variable minibuffer-default-add-shell-commands input.el /^(defun minibuffer-default-add-shell-commands ()$/;" function minibuffer-local-shell-command-map input.el /^(defvar minibuffer-local-shell-command-map$/;" variable read-shell-command input.el /^(defun read-shell-command (prompt &optional initial-contents hist &rest args)$/;" function async-shell-command-buffer input.el /^(defcustom async-shell-command-buffer 'confirm-new-buffer$/;" custom async-shell-command-display-buffer input.el /^(defcustom async-shell-command-display-buffer t$/;" custom shell-command--save-pos-or-erase input.el /^(defun shell-command--save-pos-or-erase ()$/;" function shell-command--set-point-after-cmd input.el /^(defun shell-command--set-point-after-cmd (&optional buffer)$/;" function async-shell-command input.el /^(defun async-shell-command (command &optional output-buffer error-buffer)$/;" function shell-command input.el /^(defun shell-command (command &optional output-buffer error-buffer)$/;" function display-message-or-buffer input.el /^(defun display-message-or-buffer (message &optional buffer-name action frame)$/;" function shell-command-sentinel input.el /^(defun shell-command-sentinel (process signal)$/;" function shell-command-on-region input.el /^(defun shell-command-on-region (start end command$/;" function shell-command-to-string input.el /^(defun shell-command-to-string (command)$/;" function process-file input.el /^(defun process-file (program &optional infile buffer display &rest args)$/;" function process-file-side-effects input.el /^(defvar process-file-side-effects t$/;" variable start-file-process input.el /^(defun start-file-process (name buffer program &rest program-args)$/;" function tabulated-list-format input.el /^(defvar tabulated-list-format)$/;" variable tabulated-list-entries input.el /^(defvar tabulated-list-entries)$/;" variable tabulated-list-sort-key input.el /^(defvar tabulated-list-sort-key)$/;" variable process-menu-query-only input.el /^(defvar process-menu-query-only nil)$/;" variable process-menu-mode-map input.el /^(defvar process-menu-mode-map$/;" variable process-menu-mode input.el /^(define-derived-mode process-menu-mode tabulated-list-mode "Process Menu"$/;" derivedMode process-menu-delete-process input.el /^(defun process-menu-delete-process ()$/;" function list-processes--refresh input.el /^(defun list-processes--refresh ()$/;" function process-menu-visit-buffer input.el /^(defun process-menu-visit-buffer (button)$/;" function list-processes input.el /^(defun list-processes (&optional query-only buffer)$/;" function internal-echo-keystrokes-prefix input.el /^(defun internal-echo-keystrokes-prefix ()$/;" function prefix-command-echo-keystrokes-functions input.el /^(defvar prefix-command-echo-keystrokes-functions nil$/;" variable prefix-command-update input.el /^(defun prefix-command-update ()$/;" function prefix-command-preserve-state-hook input.el /^(defvar prefix-command-preserve-state-hook nil$/;" variable prefix-command-preserve-state input.el /^(defun prefix-command-preserve-state ()$/;" function reset-this-command-lengths input.el /^(defun reset-this-command-lengths ()$/;" function universal-argument--description input.el /^(defun universal-argument--description ()$/;" function universal-argument--preserve input.el /^(defun universal-argument--preserve ()$/;" function universal-argument-map input.el /^(defvar universal-argument-map$/;" variable universal-argument--mode input.el /^(defun universal-argument--mode ()$/;" function universal-argument input.el /^(defun universal-argument ()$/;" function universal-argument-more input.el /^(defun universal-argument-more (arg)$/;" function negative-argument input.el /^(defun negative-argument (arg)$/;" function digit-argument input.el /^(defun digit-argument (arg)$/;" function filter-buffer-substring-functions input.el /^(defvar filter-buffer-substring-functions nil$/;" variable filter-buffer-substring-function input.el /^(defvar filter-buffer-substring-function #'buffer-substring--filter$/;" variable buffer-substring-filters input.el /^(defvar buffer-substring-filters nil$/;" variable filter-buffer-substring input.el /^(defun filter-buffer-substring (beg end &optional delete)$/;" function buffer-substring--filter input.el /^(defun buffer-substring--filter (beg end &optional delete)$/;" function interprogram-cut-function input.el /^(defvar interprogram-cut-function #'gui-select-text$/;" variable interprogram-paste-function input.el /^(defvar interprogram-paste-function #'gui-selection-value$/;" variable kill-ring input.el /^(defvar kill-ring nil$/;" variable kill-ring-max input.el /^(defcustom kill-ring-max 60$/;" custom kill-ring-yank-pointer input.el /^(defvar kill-ring-yank-pointer nil$/;" variable save-interprogram-paste-before-kill input.el /^(defcustom save-interprogram-paste-before-kill nil$/;" custom kill-do-not-save-duplicates input.el /^(defcustom kill-do-not-save-duplicates nil$/;" custom kill-new input.el /^(defun kill-new (string &optional replace)$/;" function kill-append-merge-undo input.el /^(defcustom kill-append-merge-undo nil$/;" custom kill-append input.el /^(defun kill-append (string before-p)$/;" function yank-pop-change-selection input.el /^(defcustom yank-pop-change-selection nil$/;" custom current-kill input.el /^(defun current-kill (n &optional do-not-move)$/;" function kill-read-only-ok input.el /^(defcustom kill-read-only-ok nil$/;" custom kill-region input.el /^(defun kill-region (beg end &optional region)$/;" function copy-region-as-kill input.el /^(defun copy-region-as-kill (beg end &optional region)$/;" function kill-ring-save input.el /^(defun kill-ring-save (beg end &optional region)$/;" function indicate-copied-region input.el /^(defun indicate-copied-region (&optional message-len)$/;" function append-next-kill input.el /^(defun append-next-kill (&optional interactive)$/;" function bidi-directional-controls-chars input.el /^(defvar bidi-directional-controls-chars "\\x202a-\\x202e\\x2066-\\x2069"$/;" variable bidi-directional-non-controls-chars input.el /^(defvar bidi-directional-non-controls-chars "^\\x202a-\\x202e\\x2066-\\x2069"$/;" variable squeeze-bidi-context-1 input.el /^(defun squeeze-bidi-context-1 (from to category replacement)$/;" function squeeze-bidi-context input.el /^(defun squeeze-bidi-context (from to)$/;" function line-substring-with-bidi-context input.el /^(defun line-substring-with-bidi-context (start end &optional no-properties)$/;" function buffer-substring-with-bidi-context input.el /^(defun buffer-substring-with-bidi-context (start end &optional no-properties)$/;" function yank-handled-properties input.el /^(defcustom yank-handled-properties$/;" custom yank-excluded-properties input.el /^(defcustom yank-excluded-properties$/;" custom yank-window-start input.el /^(defvar yank-window-start nil)$/;" variable yank-undo-function input.el /^(defvar yank-undo-function nil$/;" variable yank-pop input.el /^(defun yank-pop (&optional arg)$/;" function yank input.el /^(defun yank (&optional arg)$/;" function rotate-yank-pointer input.el /^(defun rotate-yank-pointer (arg)$/;" function kill-forward-chars input.el /^(defun kill-forward-chars (arg)$/;" function kill-backward-chars input.el /^(defun kill-backward-chars (arg)$/;" function backward-delete-char-untabify-method input.el /^(defcustom backward-delete-char-untabify-method 'untabify$/;" custom backward-delete-char-untabify input.el /^(defun backward-delete-char-untabify (arg &optional killp)$/;" function zap-to-char input.el /^(defun zap-to-char (arg char)$/;" function kill-whole-line input.el /^(defcustom kill-whole-line nil$/;" custom kill-line input.el /^(defun kill-line (&optional arg)$/;" function kill-whole-line input.el /^(defun kill-whole-line (&optional arg)$/;" function forward-visible-line input.el /^(defun forward-visible-line (arg)$/;" function end-of-visible-line input.el /^(defun end-of-visible-line ()$/;" function kill-current-buffer input.el /^(defun kill-current-buffer ()$/;" function insert-buffer input.el /^(defun insert-buffer (buffer)$/;" function append-to-buffer input.el /^(defun append-to-buffer (buffer start end)$/;" function prepend-to-buffer input.el /^(defun prepend-to-buffer (buffer start end)$/;" function copy-to-buffer input.el /^(defun copy-to-buffer (buffer start end)$/;" function mark-inactive input.el /^(define-error 'mark-inactive (purecopy "The mark is not active now"))$/;" error activate-mark-hook input.el /^(defvar activate-mark-hook nil$/;" variable deactivate-mark-hook input.el /^(defvar deactivate-mark-hook nil$/;" variable mark input.el /^(defun mark (&optional force)$/;" function deactivate-mark input.el /^(defun deactivate-mark (&optional force)$/;" function activate-mark input.el /^(defun activate-mark (&optional no-tmm)$/;" function set-mark input.el /^(defun set-mark (pos)$/;" function save-mark-and-excursion--save input.el /^(defun save-mark-and-excursion--save ()$/;" function save-mark-and-excursion--restore input.el /^(defun save-mark-and-excursion--restore (saved-mark-info)$/;" function save-mark-and-excursion input.el /^(defmacro save-mark-and-excursion (&rest body)$/;" macro use-empty-active-region input.el /^(defcustom use-empty-active-region nil$/;" custom use-region-p input.el /^(defun use-region-p ()$/;" function region-active-p input.el /^(defun region-active-p ()$/;" function region-bounds input.el /^(defun region-bounds ()$/;" function region-noncontiguous-p input.el /^(defun region-noncontiguous-p ()$/;" function redisplay-unhighlight-region-function input.el /^(defvar redisplay-unhighlight-region-function$/;" variable redisplay-highlight-region-function input.el /^(defvar redisplay-highlight-region-function$/;" variable redisplay--update-region-highlight input.el /^(defun redisplay--update-region-highlight (window)$/;" function pre-redisplay-functions input.el /^(defvar pre-redisplay-functions (list #'redisplay--update-region-highlight)$/;" variable redisplay--pre-redisplay-functions input.el /^(defun redisplay--pre-redisplay-functions (windows)$/;" function mark-ring input.el /^(defvar-local mark-ring nil$/;" variable mark-ring-max input.el /^(defcustom mark-ring-max 16$/;" custom global-mark-ring input.el /^(defvar global-mark-ring nil$/;" variable global-mark-ring-max input.el /^(defcustom global-mark-ring-max 16$/;" custom pop-to-mark-command input.el /^(defun pop-to-mark-command ()$/;" function push-mark-command input.el /^(defun push-mark-command (arg &optional nomsg)$/;" function set-mark-command-repeat-pop input.el /^(defcustom set-mark-command-repeat-pop nil$/;" custom set-mark-command input.el /^(defun set-mark-command (arg)$/;" function push-mark input.el /^(defun push-mark (&optional location nomsg activate)$/;" function pop-mark input.el /^(defun pop-mark ()$/;" function exchange-dot-and-mark input.el /^(define-obsolete-function-alias 'exchange-dot-and-mark$/;" alias exchange-point-and-mark input.el /^(defun exchange-point-and-mark (&optional arg)$/;" function shift-select-mode input.el /^(defcustom shift-select-mode t$/;" custom handle-shift-selection input.el /^(defun handle-shift-selection ()$/;" function transient-mark-mode input.el /^(define-minor-mode transient-mark-mode$/;" minorMode widen-automatically input.el /^(defvar widen-automatically t$/;" variable non-essential input.el /^(defvar non-essential nil$/;" variable pop-global-mark input.el /^(defun pop-global-mark ()$/;" function next-line-add-newlines input.el /^(defcustom next-line-add-newlines nil$/;" custom next-line input.el /^(defun next-line (&optional arg try-vscroll)$/;" function previous-line input.el /^(defun previous-line (&optional arg try-vscroll)$/;" function track-eol input.el /^(defcustom track-eol nil$/;" custom goal-column input.el /^(defcustom goal-column nil$/;" custom temporary-goal-column input.el /^(defvar temporary-goal-column 0$/;" variable last--line-number-width input.el /^(defvar last--line-number-width 0$/;" variable line-move-ignore-invisible input.el /^(defcustom line-move-ignore-invisible t$/;" custom line-move-visual input.el /^(defcustom line-move-visual t$/;" custom default-font-height input.el /^(defun default-font-height ()$/;" function default-font-width input.el /^(defun default-font-width ()$/;" function default-line-height input.el /^(defun default-line-height ()$/;" function window-screen-lines input.el /^(defun window-screen-lines ()$/;" function line-move-partial input.el /^(defun line-move-partial (arg noerror &optional _to-end)$/;" function line-move input.el /^(defun line-move (arg &optional noerror _to-end try-vscroll)$/;" function line-move-visual input.el /^(defun line-move-visual (arg &optional noerror)$/;" function line-move-1 input.el /^(defun line-move-1 (arg &optional noerror _to-end)$/;" function line-move-finish input.el /^(defun line-move-finish (column opoint forward)$/;" function line-move-to-column input.el /^(defun line-move-to-column (col)$/;" function move-end-of-line input.el /^(defun move-end-of-line (arg)$/;" function move-beginning-of-line input.el /^(defun move-beginning-of-line (arg)$/;" function set-goal-column input.el /^(defun set-goal-column (arg)$/;" function end-of-visual-line input.el /^(defun end-of-visual-line (&optional n)$/;" function beginning-of-visual-line input.el /^(defun beginning-of-visual-line (&optional n)$/;" function kill-visual-line input.el /^(defun kill-visual-line (&optional arg)$/;" function next-logical-line input.el /^(defun next-logical-line (&optional arg try-vscroll)$/;" function previous-logical-line input.el /^(defun previous-logical-line (&optional arg try-vscroll)$/;" function visual-line input.el /^(defgroup visual-line nil$/;" group visual-line-mode-map input.el /^(defvar visual-line-mode-map$/;" variable visual-line-fringe-indicators input.el /^(defcustom visual-line-fringe-indicators '(nil nil)$/;" custom visual-line--saved-state input.el /^(defvar visual-line--saved-state nil)$/;" variable visual-line-mode input.el /^(define-minor-mode visual-line-mode$/;" minorMode turn-on-visual-line-mode input.el /^(defun turn-on-visual-line-mode ()$/;" function global-visual-line-mode input.el /^(define-globalized-minor-mode global-visual-line-mode$/;" minorMode transpose-chars input.el /^(defun transpose-chars (arg)$/;" function transpose-words input.el /^(defun transpose-words (arg)$/;" function transpose-sexps input.el /^(defun transpose-sexps (arg)$/;" function transpose-lines input.el /^(defun transpose-lines (arg)$/;" function transpose-subr input.el /^(defun transpose-subr (mover arg &optional special)$/;" function transpose-subr-1 input.el /^(defun transpose-subr-1 (pos1 pos2)$/;" function backward-word input.el /^(defun backward-word (&optional arg)$/;" function mark-word input.el /^(defun mark-word (&optional arg allow-extend)$/;" function kill-word input.el /^(defun kill-word (arg)$/;" function backward-kill-word input.el /^(defun backward-kill-word (arg)$/;" function current-word input.el /^(defun current-word (&optional strict really-word)$/;" function fill-prefix input.el /^(defcustom fill-prefix nil$/;" custom auto-fill-inhibit-regexp input.el /^(defcustom auto-fill-inhibit-regexp nil$/;" custom do-auto-fill input.el /^(defun do-auto-fill ()$/;" function comment-line-break-function input.el /^(defvar comment-line-break-function 'comment-indent-new-line$/;" variable default-indent-new-line input.el /^(defun default-indent-new-line (&optional soft)$/;" function internal-auto-fill input.el /^(defun internal-auto-fill ()$/;" function normal-auto-fill-function input.el /^(defvar normal-auto-fill-function 'do-auto-fill$/;" variable auto-fill-mode input.el /^(define-minor-mode auto-fill-mode$/;" minorMode auto-fill-function input.el /^(defun auto-fill-function ()$/;" function turn-on-auto-fill input.el /^(defun turn-on-auto-fill ()$/;" function turn-off-auto-fill input.el /^(defun turn-off-auto-fill ()$/;" function set-fill-column input.el /^(defun set-fill-column (arg)$/;" function set-selective-display input.el /^(defun set-selective-display (arg)$/;" function indicate-unused-lines input.el /^(defvaralias 'indicate-unused-lines 'indicate-empty-lines)$/;" varalias toggle-truncate-lines input.el /^(defun toggle-truncate-lines (&optional arg)$/;" function toggle-word-wrap input.el /^(defun toggle-word-wrap (&optional arg)$/;" function overwrite-mode-textual input.el /^(defvar overwrite-mode-textual (purecopy " Ovwrt")$/;" variable overwrite-mode-binary input.el /^(defvar overwrite-mode-binary (purecopy " Bin Ovwrt")$/;" variable overwrite-mode input.el /^(define-minor-mode overwrite-mode$/;" minorMode binary-overwrite-mode input.el /^(define-minor-mode binary-overwrite-mode$/;" minorMode line-number-mode input.el /^(define-minor-mode line-number-mode$/;" minorMode column-number-mode input.el /^(define-minor-mode column-number-mode$/;" minorMode size-indication-mode input.el /^(define-minor-mode size-indication-mode$/;" minorMode auto-save-mode input.el /^(define-minor-mode auto-save-mode$/;" minorMode paren-blinking input.el /^(defgroup paren-blinking nil$/;" group blink-matching-paren input.el /^(defcustom blink-matching-paren t$/;" custom blink-matching-paren-on-screen input.el /^(defcustom blink-matching-paren-on-screen t$/;" custom blink-matching-paren-distance input.el /^(defcustom blink-matching-paren-distance (* 100 1024)$/;" custom blink-matching-delay input.el /^(defcustom blink-matching-delay 1$/;" custom blink-matching-paren-dont-ignore-comments input.el /^(defcustom blink-matching-paren-dont-ignore-comments nil$/;" custom blink-matching-check-mismatch input.el /^(defun blink-matching-check-mismatch (start end)$/;" function blink-matching-check-function input.el /^(defvar blink-matching-check-function #'blink-matching-check-mismatch$/;" variable blink-matching--overlay input.el /^(defvar blink-matching--overlay$/;" variable blink-matching-open input.el /^(defun blink-matching-open ()$/;" function blink-paren-function input.el /^(defvar blink-paren-function 'blink-matching-open$/;" variable blink-paren-post-self-insert-function input.el /^(defun blink-paren-post-self-insert-function ()$/;" function keyboard-quit input.el /^(defun keyboard-quit ()$/;" function buffer-quit-function input.el /^(defvar buffer-quit-function nil$/;" variable keyboard-escape-quit input.el /^(defun keyboard-escape-quit ()$/;" function play-sound-file input.el /^(defun play-sound-file (file &optional volume device)$/;" function read-mail-command input.el /^(defcustom read-mail-command 'rmail$/;" custom mail-user-agent input.el /^(defcustom mail-user-agent 'message-user-agent$/;" custom compose-mail-user-agent-warnings input.el /^(defcustom compose-mail-user-agent-warnings t$/;" custom rfc822-goto-eoh input.el /^(defun rfc822-goto-eoh ()$/;" function mail-encode-mml input.el /^(defvar mail-encode-mml nil$/;" variable compose-mail input.el /^(defun compose-mail (&optional to subject other-headers continue$/;" function compose-mail-other-window input.el /^(defun compose-mail-other-window (&optional to subject other-headers continue$/;" function compose-mail-other-frame input.el /^(defun compose-mail-other-frame (&optional to subject other-headers continue$/;" function set-variable-value-history input.el /^(defvar set-variable-value-history nil$/;" variable set-variable input.el /^(defun set-variable (variable value &optional make-local)$/;" function completion-list-mode-map input.el /^(defvar completion-list-mode-map$/;" variable completion-reference-buffer input.el /^(defvar completion-reference-buffer nil$/;" variable completion-no-auto-exit input.el /^(defvar completion-no-auto-exit nil$/;" variable completion-base-position input.el /^(defvar completion-base-position nil$/;" variable completion-list-insert-choice-function input.el /^(defvar completion-list-insert-choice-function #'completion--replace$/;" variable completion-base-size input.el /^(defvar completion-base-size nil$/;" variable delete-completion-window input.el /^(defun delete-completion-window ()$/;" function previous-completion input.el /^(defun previous-completion (n)$/;" function next-completion input.el /^(defun next-completion (n)$/;" function choose-completion input.el /^(defun choose-completion (&optional event)$/;" function choose-completion-guess-base-position input.el /^(defun choose-completion-guess-base-position (string)$/;" function choose-completion-delete-max-match input.el /^(defun choose-completion-delete-max-match (string)$/;" function choose-completion-string-functions input.el /^(defvar choose-completion-string-functions nil$/;" variable choose-completion-string input.el /^(defun choose-completion-string (choice &optional$/;" function completion-list-mode input.el /^(define-derived-mode completion-list-mode nil "Completion List"$/;" derivedMode completion-list-mode-finish input.el /^(defun completion-list-mode-finish ()$/;" function completion-show-help input.el /^(defcustom completion-show-help t$/;" custom completion-setup-function input.el /^(defun completion-setup-function ()$/;" function switch-to-completions input.el /^(defun switch-to-completions ()$/;" function event-apply-alt-modifier input.el /^(defun event-apply-alt-modifier (_ignore-prompt)$/;" function event-apply-super-modifier input.el /^(defun event-apply-super-modifier (_ignore-prompt)$/;" function event-apply-hyper-modifier input.el /^(defun event-apply-hyper-modifier (_ignore-prompt)$/;" function event-apply-shift-modifier input.el /^(defun event-apply-shift-modifier (_ignore-prompt)$/;" function event-apply-control-modifier input.el /^(defun event-apply-control-modifier (_ignore-prompt)$/;" function event-apply-meta-modifier input.el /^(defun event-apply-meta-modifier (_ignore-prompt)$/;" function event-apply-modifier input.el /^(defun event-apply-modifier (event symbol lshiftby prefix)$/;" function clone-buffer-hook input.el /^(defvar clone-buffer-hook nil$/;" variable clone-indirect-buffer-hook input.el /^(defvar clone-indirect-buffer-hook nil$/;" variable clone-process input.el /^(defun clone-process (process &optional newname)$/;" function clone-buffer input.el /^(defun clone-buffer (&optional newname display-flag)$/;" function clone-indirect-buffer input.el /^(defun clone-indirect-buffer (newname display-flag &optional norecord)$/;" function clone-indirect-buffer-other-window input.el /^(defun clone-indirect-buffer-other-window (newname display-flag &optional norecord)$/;" function normal-erase-is-backspace input.el /^(defcustom normal-erase-is-backspace 'maybe$/;" custom normal-erase-is-backspace-setup-frame input.el /^(defun normal-erase-is-backspace-setup-frame (&optional frame)$/;" function normal-erase-is-backspace-mode input.el /^(define-minor-mode normal-erase-is-backspace-mode$/;" minorMode vis-mode-saved-buffer-invisibility-spec input.el /^(defvar vis-mode-saved-buffer-invisibility-spec nil$/;" variable read-only-mode input.el /^(define-minor-mode read-only-mode$/;" minorMode visible-mode input.el /^(define-minor-mode visible-mode$/;" minorMode messages-buffer-mode-map input.el /^(defvar messages-buffer-mode-map$/;" variable messages-buffer-mode input.el /^(define-derived-mode messages-buffer-mode special-mode "Messages"$/;" derivedMode messages-buffer input.el /^(defun messages-buffer ()$/;" function bad-packages-alist input.el /^(defconst bad-packages-alist$/;" const bad-package-check input.el /^(defun bad-package-check (package)$/;" function define-alternatives input.el /^(defmacro define-alternatives (command &rest customizations)$/;" macro upcase-dwim input.el /^(defun upcase-dwim (arg)$/;" function downcase-dwim input.el /^(defun downcase-dwim (arg)$/;" function capitalize-dwim input.el /^(defun capitalize-dwim (arg)$/;" function ================================================ FILE: Units/parser-emacsLisp.r/simple-emacsLisp.d/input.el ================================================ ;;; simple.el --- basic editing commands for Emacs -*- lexical-binding: t -*- ;; Copyright (C) 1985-1987, 1993-2018 Free Software Foundation, Inc. ;; Maintainer: emacs-devel@gnu.org ;; Keywords: internal ;; Package: emacs ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;; A grab-bag of basic Emacs commands not specifically related to some ;; major mode or to file-handling. ;;; Code: (eval-when-compile (require 'cl-lib)) (declare-function widget-convert "wid-edit" (type &rest args)) (declare-function shell-mode "shell" ()) ;;; From compile.el (defvar compilation-current-error) (defvar compilation-context-lines) (defcustom shell-command-dont-erase-buffer nil "If non-nil, output buffer is not erased between shell commands. Also, a non-nil value sets the point in the output buffer once the command completes. The value `beg-last-out' sets point at the beginning of the output, `end-last-out' sets point at the end of the buffer, `save-point' restores the buffer position before the command." :type '(choice (const :tag "Erase buffer" nil) (const :tag "Set point to beginning of last output" beg-last-out) (const :tag "Set point to end of last output" end-last-out) (const :tag "Save point" save-point)) :group 'shell :version "26.1") (defvar shell-command-saved-pos nil "Record of point positions in output buffers after command completion. The value is an alist whose elements are of the form (BUFFER . POS), where BUFFER is the output buffer, and POS is the point position in BUFFER once the command finishes. This variable is used when `shell-command-dont-erase-buffer' is non-nil.") (defcustom idle-update-delay 0.5 "Idle time delay before updating various things on the screen. Various Emacs features that update auxiliary information when point moves wait this many seconds after Emacs becomes idle before doing an update." :type 'number :group 'display :version "22.1") (defgroup killing nil "Killing and yanking commands." :group 'editing) (defgroup paren-matching nil "Highlight (un)matching of parens and expressions." :group 'matching) ;;; next-error support framework (defgroup next-error nil "`next-error' support framework." :group 'compilation :version "22.1") (defface next-error '((t (:inherit region))) "Face used to highlight next error locus." :group 'next-error :version "22.1") (defcustom next-error-highlight 0.5 "Highlighting of locations in selected source buffers. If a number, highlight the locus in `next-error' face for the given time in seconds, or until the next command is executed. If t, highlight the locus until the next command is executed, or until some other locus replaces it. If nil, don't highlight the locus in the source buffer. If `fringe-arrow', indicate the locus by the fringe arrow indefinitely until some other locus replaces it." :type '(choice (number :tag "Highlight for specified time") (const :tag "Semipermanent highlighting" t) (const :tag "No highlighting" nil) (const :tag "Fringe arrow" fringe-arrow)) :group 'next-error :version "22.1") (defcustom next-error-highlight-no-select 0.5 "Highlighting of locations in `next-error-no-select'. If number, highlight the locus in `next-error' face for given time in seconds. If t, highlight the locus indefinitely until some other locus replaces it. If nil, don't highlight the locus in the source buffer. If `fringe-arrow', indicate the locus by the fringe arrow indefinitely until some other locus replaces it." :type '(choice (number :tag "Highlight for specified time") (const :tag "Semipermanent highlighting" t) (const :tag "No highlighting" nil) (const :tag "Fringe arrow" fringe-arrow)) :group 'next-error :version "22.1") (defcustom next-error-recenter nil "Display the line in the visited source file recentered as specified. If non-nil, the value is passed directly to `recenter'." :type '(choice (integer :tag "Line to recenter to") (const :tag "Center of window" (4)) (const :tag "No recentering" nil)) :group 'next-error :version "23.1") (defcustom next-error-hook nil "List of hook functions run by `next-error' after visiting source file." :type 'hook :group 'next-error) (defvar next-error-highlight-timer nil) (defvar next-error-overlay-arrow-position nil) (put 'next-error-overlay-arrow-position 'overlay-arrow-string (purecopy "=>")) (add-to-list 'overlay-arrow-variable-list 'next-error-overlay-arrow-position) (defvar next-error-last-buffer nil "The most recent `next-error' buffer. A buffer becomes most recent when its compilation, grep, or similar mode is started, or when it is used with \\[next-error] or \\[compile-goto-error].") (defvar next-error-function nil "Function to use to find the next error in the current buffer. The function is called with 2 parameters: ARG is an integer specifying by how many errors to move. RESET is a boolean which, if non-nil, says to go back to the beginning of the errors before moving. Major modes providing compile-like functionality should set this variable to indicate to `next-error' that this is a candidate buffer and how to navigate in it.") (make-variable-buffer-local 'next-error-function) (defvar next-error-move-function nil "Function to use to move to an error locus. It takes two arguments, a buffer position in the error buffer and a buffer position in the error locus buffer. The buffer for the error locus should already be current. nil means use goto-char using the second argument position.") (make-variable-buffer-local 'next-error-move-function) (defsubst next-error-buffer-p (buffer &optional avoid-current extra-test-inclusive extra-test-exclusive) "Return non-nil if BUFFER is a `next-error' capable buffer. If AVOID-CURRENT is non-nil, and BUFFER is the current buffer, return nil. The function EXTRA-TEST-INCLUSIVE, if non-nil, is called if BUFFER would not normally qualify. If it returns non-nil, BUFFER is considered `next-error' capable, anyway, and the function returns non-nil. The function EXTRA-TEST-EXCLUSIVE, if non-nil, is called if the buffer would normally qualify. If it returns nil, BUFFER is rejected, and the function returns nil." (and (buffer-name buffer) ;First make sure it's live. (not (and avoid-current (eq buffer (current-buffer)))) (with-current-buffer buffer (if next-error-function ; This is the normal test. ;; Optionally reject some buffers. (if extra-test-exclusive (funcall extra-test-exclusive) t) ;; Optionally accept some other buffers. (and extra-test-inclusive (funcall extra-test-inclusive)))))) (defun next-error-find-buffer (&optional avoid-current extra-test-inclusive extra-test-exclusive) "Return a `next-error' capable buffer. If AVOID-CURRENT is non-nil, treat the current buffer as an absolute last resort only. The function EXTRA-TEST-INCLUSIVE, if non-nil, is called in each buffer that normally would not qualify. If it returns t, the buffer in question is treated as usable. The function EXTRA-TEST-EXCLUSIVE, if non-nil, is called in each buffer that would normally be considered usable. If it returns nil, that buffer is rejected." (or ;; 1. If one window on the selected frame displays such buffer, return it. (let ((window-buffers (delete-dups (delq nil (mapcar (lambda (w) (if (next-error-buffer-p (window-buffer w) avoid-current extra-test-inclusive extra-test-exclusive) (window-buffer w))) (window-list)))))) (if (eq (length window-buffers) 1) (car window-buffers))) ;; 2. If next-error-last-buffer is an acceptable buffer, use that. (if (and next-error-last-buffer (next-error-buffer-p next-error-last-buffer avoid-current extra-test-inclusive extra-test-exclusive)) next-error-last-buffer) ;; 3. If the current buffer is acceptable, choose it. (if (next-error-buffer-p (current-buffer) avoid-current extra-test-inclusive extra-test-exclusive) (current-buffer)) ;; 4. Look for any acceptable buffer. (let ((buffers (buffer-list))) (while (and buffers (not (next-error-buffer-p (car buffers) avoid-current extra-test-inclusive extra-test-exclusive))) (setq buffers (cdr buffers))) (car buffers)) ;; 5. Use the current buffer as a last resort if it qualifies, ;; even despite AVOID-CURRENT. (and avoid-current (next-error-buffer-p (current-buffer) nil extra-test-inclusive extra-test-exclusive) (progn (message "This is the only buffer with error message locations") (current-buffer))) ;; 6. Give up. (error "No buffers contain error message locations"))) (defun next-error (&optional arg reset) "Visit next `next-error' message and corresponding source code. If all the error messages parsed so far have been processed already, the message buffer is checked for new ones. A prefix ARG specifies how many error messages to move; negative means move back to previous error messages. Just \\[universal-argument] as a prefix means reparse the error message buffer and start at the first error. The RESET argument specifies that we should restart from the beginning. \\[next-error] normally uses the most recently started compilation, grep, or occur buffer. It can also operate on any buffer with output from the \\[compile], \\[grep] commands, or, more generally, on any buffer in Compilation mode or with Compilation Minor mode enabled, or any buffer in which `next-error-function' is bound to an appropriate function. To specify use of a particular buffer for error messages, type \\[next-error] in that buffer when it is the only one displayed in the current frame. Once \\[next-error] has chosen the buffer for error messages, it runs `next-error-hook' with `run-hooks', and stays with that buffer until you use it in some other buffer which uses Compilation mode or Compilation Minor mode. To control which errors are matched, customize the variable `compilation-error-regexp-alist'." (interactive "P") (if (consp arg) (setq reset t arg nil)) (when (setq next-error-last-buffer (next-error-find-buffer)) ;; we know here that next-error-function is a valid symbol we can funcall (with-current-buffer next-error-last-buffer (funcall next-error-function (prefix-numeric-value arg) reset) (when next-error-recenter (recenter next-error-recenter)) (run-hooks 'next-error-hook)))) (defun next-error-internal () "Visit the source code corresponding to the `next-error' message at point." (setq next-error-last-buffer (current-buffer)) ;; we know here that next-error-function is a valid symbol we can funcall (with-current-buffer next-error-last-buffer (funcall next-error-function 0 nil) (when next-error-recenter (recenter next-error-recenter)) (run-hooks 'next-error-hook))) (defalias 'goto-next-locus 'next-error) (defalias 'next-match 'next-error) (defun previous-error (&optional n) "Visit previous `next-error' message and corresponding source code. Prefix arg N says how many error messages to move backwards (or forwards, if negative). This operates on the output from the \\[compile] and \\[grep] commands." (interactive "p") (next-error (- (or n 1)))) (defun first-error (&optional n) "Restart at the first error. Visit corresponding source code. With prefix arg N, visit the source code of the Nth error. This operates on the output from the \\[compile] command, for instance." (interactive "p") (next-error n t)) (defun next-error-no-select (&optional n) "Move point to the next error in the `next-error' buffer and highlight match. Prefix arg N says how many error messages to move forwards (or backwards, if negative). Finds and highlights the source line like \\[next-error], but does not select the source buffer." (interactive "p") (let ((next-error-highlight next-error-highlight-no-select)) (next-error n)) (pop-to-buffer next-error-last-buffer)) (defun previous-error-no-select (&optional n) "Move point to the previous error in the `next-error' buffer and highlight match. Prefix arg N says how many error messages to move backwards (or forwards, if negative). Finds and highlights the source line like \\[previous-error], but does not select the source buffer." (interactive "p") (next-error-no-select (- (or n 1)))) ;; Internal variable for `next-error-follow-mode-post-command-hook'. (defvar next-error-follow-last-line nil) (define-minor-mode next-error-follow-minor-mode "Minor mode for compilation, occur and diff modes. With a prefix argument ARG, enable mode if ARG is positive, and disable it otherwise. If called from Lisp, enable mode if ARG is omitted or nil. When turned on, cursor motion in the compilation, grep, occur or diff buffer causes automatic display of the corresponding source code location." :group 'next-error :init-value nil :lighter " Fol" (if (not next-error-follow-minor-mode) (remove-hook 'post-command-hook 'next-error-follow-mode-post-command-hook t) (add-hook 'post-command-hook 'next-error-follow-mode-post-command-hook nil t) (make-local-variable 'next-error-follow-last-line))) ;; Used as a `post-command-hook' by `next-error-follow-mode' ;; for the *Compilation* *grep* and *Occur* buffers. (defun next-error-follow-mode-post-command-hook () (unless (equal next-error-follow-last-line (line-number-at-pos)) (setq next-error-follow-last-line (line-number-at-pos)) (condition-case nil (let ((compilation-context-lines nil)) (setq compilation-current-error (point)) (next-error-no-select 0)) (error t)))) ;;; (defun fundamental-mode () "Major mode not specialized for anything in particular. Other major modes are defined by comparison with this one." (interactive) (kill-all-local-variables) (run-mode-hooks)) ;; Special major modes to view specially formatted data rather than files. (defvar special-mode-map (let ((map (make-sparse-keymap))) (suppress-keymap map) (define-key map "q" 'quit-window) (define-key map " " 'scroll-up-command) (define-key map [?\S-\ ] 'scroll-down-command) (define-key map "\C-?" 'scroll-down-command) (define-key map "?" 'describe-mode) (define-key map "h" 'describe-mode) (define-key map ">" 'end-of-buffer) (define-key map "<" 'beginning-of-buffer) (define-key map "g" 'revert-buffer) map)) (put 'special-mode 'mode-class 'special) (define-derived-mode special-mode nil "Special" "Parent major mode from which special major modes should inherit." (setq buffer-read-only t)) ;; Making and deleting lines. (defvar self-insert-uses-region-functions nil "Special hook to tell if `self-insert-command' will use the region. It must be called via `run-hook-with-args-until-success' with no arguments. If any function on this hook returns a non-nil value, `delete-selection-mode' will act on that value (see `delete-selection-helper'), and will usually delete the region. If all the functions on this hook return nil, it is an indiction that `self-insert-command' needs the region untouched by `delete-selection-mode', and will itself do whatever is appropriate with the region. Any function on `post-self-insert-hook' which act on the region should add a function to this hook so that `delete-selection-mode' could refrain from deleting the region before `post-self-insert-hook' functions are called. This hook is run by `delete-selection-uses-region-p', which see.") (defvar hard-newline (propertize "\n" 'hard t 'rear-nonsticky '(hard)) "Propertized string representing a hard newline character.") (defun newline (&optional arg interactive) "Insert a newline, and move to left margin of the new line if it's blank. If option `use-hard-newlines' is non-nil, the newline is marked with the text-property `hard'. With ARG, insert that many newlines. If `electric-indent-mode' is enabled, this indents the final new line that it adds, and reindents the preceding line. To just insert a newline, use \\[electric-indent-just-newline]. Calls `auto-fill-function' if the current column number is greater than the value of `fill-column' and ARG is nil. A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'." (interactive "*P\np") (barf-if-buffer-read-only) ;; Call self-insert so that auto-fill, abbrev expansion etc. happens. ;; Set last-command-event to tell self-insert what to insert. (let* ((was-page-start (and (bolp) (looking-at page-delimiter))) (beforepos (point)) (last-command-event ?\n) ;; Don't auto-fill if we have a numeric argument. (auto-fill-function (if arg nil auto-fill-function)) (arg (prefix-numeric-value arg)) (postproc ;; Do the rest in post-self-insert-hook, because we want to do it ;; *before* other functions on that hook. (lambda () ;; Mark the newline(s) `hard'. (if use-hard-newlines (set-hard-newline-properties (- (point) arg) (point))) ;; If the newline leaves the previous line blank, and we ;; have a left margin, delete that from the blank line. (save-excursion (goto-char beforepos) (beginning-of-line) (and (looking-at "[ \t]$") (> (current-left-margin) 0) (delete-region (point) (line-end-position)))) ;; Indent the line after the newline, except in one case: ;; when we added the newline at the beginning of a line which ;; starts a page. (or was-page-start (move-to-left-margin nil t))))) (if (not interactive) ;; FIXME: For non-interactive uses, many calls actually ;; just want (insert "\n"), so maybe we should do just ;; that, so as to avoid the risk of filling or running ;; abbrevs unexpectedly. (let ((post-self-insert-hook (list postproc))) (self-insert-command arg)) (unwind-protect (progn (add-hook 'post-self-insert-hook postproc nil t) (self-insert-command arg)) ;; We first used let-binding to protect the hook, but that ;; was naive since add-hook affects the symbol-default ;; value of the variable, whereas the let-binding might ;; only protect the buffer-local value. (remove-hook 'post-self-insert-hook postproc t)))) nil) (defun set-hard-newline-properties (from to) (let ((sticky (get-text-property from 'rear-nonsticky))) (put-text-property from to 'hard 't) ;; If rear-nonsticky is not "t", add 'hard to rear-nonsticky list (if (and (listp sticky) (not (memq 'hard sticky))) (put-text-property from (point) 'rear-nonsticky (cons 'hard sticky))))) (defun open-line (n) "Insert a newline and leave point before it. If there is a fill prefix and/or a `left-margin', insert them on the new line if the line would have been blank. With arg N, insert N newlines." (interactive "*p") (let* ((do-fill-prefix (and fill-prefix (bolp))) (do-left-margin (and (bolp) (> (current-left-margin) 0))) (loc (point-marker)) ;; Don't expand an abbrev before point. (abbrev-mode nil)) (newline n) (goto-char loc) (while (> n 0) (cond ((bolp) (if do-left-margin (indent-to (current-left-margin))) (if do-fill-prefix (insert-and-inherit fill-prefix)))) (forward-line 1) (setq n (1- n))) (goto-char loc) ;; Necessary in case a margin or prefix was inserted. (end-of-line))) (defun split-line (&optional arg) "Split current line, moving portion beyond point vertically down. If the current line starts with `fill-prefix', insert it on the new line as well. With prefix ARG, don't insert `fill-prefix' on new line. When called from Lisp code, ARG may be a prefix string to copy." (interactive "*P") (skip-chars-forward " \t") (let* ((col (current-column)) (pos (point)) ;; What prefix should we check for (nil means don't). (prefix (cond ((stringp arg) arg) (arg nil) (t fill-prefix))) ;; Does this line start with it? (have-prfx (and prefix (save-excursion (beginning-of-line) (looking-at (regexp-quote prefix)))))) (newline 1) (if have-prfx (insert-and-inherit prefix)) (indent-to col 0) (goto-char pos))) (defun delete-indentation (&optional arg) "Join this line to previous and fix up whitespace at join. If there is a fill prefix, delete it from the beginning of this line. With argument, join this line to following line." (interactive "*P") (beginning-of-line) (if arg (forward-line 1)) (if (eq (preceding-char) ?\n) (progn (delete-region (point) (1- (point))) ;; If the second line started with the fill prefix, ;; delete the prefix. (if (and fill-prefix (<= (+ (point) (length fill-prefix)) (point-max)) (string= fill-prefix (buffer-substring (point) (+ (point) (length fill-prefix))))) (delete-region (point) (+ (point) (length fill-prefix)))) (fixup-whitespace)))) (defalias 'join-line #'delete-indentation) ; easier to find (defun delete-blank-lines () "On blank line, delete all surrounding blank lines, leaving just one. On isolated blank line, delete that one. On nonblank line, delete any immediately following blank lines." (interactive "*") (let (thisblank singleblank) (save-excursion (beginning-of-line) (setq thisblank (looking-at "[ \t]*$")) ;; Set singleblank if there is just one blank line here. (setq singleblank (and thisblank (not (looking-at "[ \t]*\n[ \t]*$")) (or (bobp) (progn (forward-line -1) (not (looking-at "[ \t]*$"))))))) ;; Delete preceding blank lines, and this one too if it's the only one. (if thisblank (progn (beginning-of-line) (if singleblank (forward-line 1)) (delete-region (point) (if (re-search-backward "[^ \t\n]" nil t) (progn (forward-line 1) (point)) (point-min))))) ;; Delete following blank lines, unless the current line is blank ;; and there are no following blank lines. (if (not (and thisblank singleblank)) (save-excursion (end-of-line) (forward-line 1) (delete-region (point) (if (re-search-forward "[^ \t\n]" nil t) (progn (beginning-of-line) (point)) (point-max))))) ;; Handle the special case where point is followed by newline and eob. ;; Delete the line, leaving point at eob. (if (looking-at "^[ \t]*\n\\'") (delete-region (point) (point-max))))) (defcustom delete-trailing-lines t "If non-nil, \\[delete-trailing-whitespace] deletes trailing lines. Trailing lines are deleted only if `delete-trailing-whitespace' is called on the entire buffer (rather than an active region)." :type 'boolean :group 'editing :version "24.3") (defun region-modifiable-p (start end) "Return non-nil if the region contains no read-only text." (and (not (get-text-property start 'read-only)) (eq end (next-single-property-change start 'read-only nil end)))) (defun delete-trailing-whitespace (&optional start end) "Delete trailing whitespace between START and END. If called interactively, START and END are the start/end of the region if the mark is active, or of the buffer's accessible portion if the mark is inactive. This command deletes whitespace characters after the last non-whitespace character in each line between START and END. It does not consider formfeed characters to be whitespace. If this command acts on the entire buffer (i.e. if called interactively with the mark inactive, or called from Lisp with END nil), it also deletes all trailing lines at the end of the buffer if the variable `delete-trailing-lines' is non-nil." (interactive (progn (barf-if-buffer-read-only) (if (use-region-p) (list (region-beginning) (region-end)) (list nil nil)))) (save-match-data (save-excursion (let ((end-marker (and end (copy-marker end)))) (goto-char (or start (point-min))) (with-syntax-table (make-syntax-table (syntax-table)) ;; Don't delete formfeeds, even if they are considered whitespace. (modify-syntax-entry ?\f "_") (while (re-search-forward "\\s-$" end-marker t) (skip-syntax-backward "-" (line-beginning-position)) (let ((b (point)) (e (match-end 0))) (when (region-modifiable-p b e) (delete-region b e))))) (if end (set-marker end-marker nil) ;; Delete trailing empty lines. (and delete-trailing-lines ;; Really the end of buffer. (= (goto-char (point-max)) (1+ (buffer-size))) (<= (skip-chars-backward "\n") -2) (region-modifiable-p (1+ (point)) (point-max)) (delete-region (1+ (point)) (point-max))))))) ;; Return nil for the benefit of `write-file-functions'. nil) (defun newline-and-indent () "Insert a newline, then indent according to major mode. Indentation is done using the value of `indent-line-function'. In programming language modes, this is the same as TAB. In some text modes, where TAB inserts a tab, this command indents to the column specified by the function `current-left-margin'." (interactive "*") (delete-horizontal-space t) (newline nil t) (indent-according-to-mode)) (defun reindent-then-newline-and-indent () "Reindent current line, insert newline, then indent the new line. Indentation of both lines is done according to the current major mode, which means calling the current value of `indent-line-function'. In programming language modes, this is the same as TAB. In some text modes, where TAB inserts a tab, this indents to the column specified by the function `current-left-margin'." (interactive "*") (let ((pos (point))) ;; Be careful to insert the newline before indenting the line. ;; Otherwise, the indentation might be wrong. (newline) (save-excursion (goto-char pos) ;; We are at EOL before the call to indent-according-to-mode, and ;; after it we usually are as well, but not always. We tried to ;; address it with `save-excursion' but that uses a normal marker ;; whereas we need `move after insertion', so we do the save/restore ;; by hand. (setq pos (copy-marker pos t)) (indent-according-to-mode) (goto-char pos) ;; Remove the trailing white-space after indentation because ;; indentation may introduce the whitespace. (delete-horizontal-space t)) (indent-according-to-mode))) (defcustom read-quoted-char-radix 8 "Radix for \\[quoted-insert] and other uses of `read-quoted-char'. Legitimate radix values are 8, 10 and 16." :type '(choice (const 8) (const 10) (const 16)) :group 'editing-basics) (defun read-quoted-char (&optional prompt) "Like `read-char', but do not allow quitting. Also, if the first character read is an octal digit, we read any number of octal digits and return the specified character code. Any nondigit terminates the sequence. If the terminator is RET, it is discarded; any other terminator is used itself as input. The optional argument PROMPT specifies a string to use to prompt the user. The variable `read-quoted-char-radix' controls which radix to use for numeric input." (let ((message-log-max nil) (help-events (delq nil (mapcar (lambda (c) (unless (characterp c) c)) help-event-list))) done (first t) (code 0) char translated) (while (not done) (let ((inhibit-quit first) ;; Don't let C-h or other help chars get the help ;; message--only help function keys. See bug#16617. (help-char nil) (help-event-list help-events) (help-form "Type the special character you want to use, or the octal character code. RET terminates the character code and is discarded; any other non-digit terminates the character code and is then used as input.")) (setq char (read-event (and prompt (format "%s-" prompt)) t)) (if inhibit-quit (setq quit-flag nil))) ;; Translate TAB key into control-I ASCII character, and so on. ;; Note: `read-char' does it using the `ascii-character' property. ;; We tried using read-key instead, but that disables the keystroke ;; echo produced by 'C-q', see bug#24635. (let ((translation (lookup-key local-function-key-map (vector char)))) (setq translated (if (arrayp translation) (aref translation 0) char))) (if (integerp translated) (setq translated (char-resolve-modifiers translated))) (cond ((null translated)) ((not (integerp translated)) (setq unread-command-events (list char) done t)) ((/= (logand translated ?\M-\^@) 0) ;; Turn a meta-character into a character with the 0200 bit set. (setq code (logior (logand translated (lognot ?\M-\^@)) 128) done t)) ((and (<= ?0 translated) (< translated (+ ?0 (min 10 read-quoted-char-radix)))) (setq code (+ (* code read-quoted-char-radix) (- translated ?0))) (and prompt (setq prompt (message "%s %c" prompt translated)))) ((and (<= ?a (downcase translated)) (< (downcase translated) (+ ?a -10 (min 36 read-quoted-char-radix)))) (setq code (+ (* code read-quoted-char-radix) (+ 10 (- (downcase translated) ?a)))) (and prompt (setq prompt (message "%s %c" prompt translated)))) ((and (not first) (eq translated ?\C-m)) (setq done t)) ((not first) (setq unread-command-events (list char) done t)) (t (setq code translated done t))) (setq first nil)) code)) (defun quoted-insert (arg) "Read next input character and insert it. This is useful for inserting control characters. With argument, insert ARG copies of the character. If the first character you type after this command is an octal digit, you should type a sequence of octal digits which specify a character code. Any nondigit terminates the sequence. If the terminator is a RET, it is discarded; any other terminator is used itself as input. The variable `read-quoted-char-radix' specifies the radix for this feature; set it to 10 or 16 to use decimal or hex instead of octal. In overwrite mode, this function inserts the character anyway, and does not handle octal digits specially. This means that if you use overwrite as your normal editing mode, you can use this function to insert characters when necessary. In binary overwrite mode, this function does overwrite, and octal digits are interpreted as a character code. This is intended to be useful for editing binary files." (interactive "*p") (let* ((char ;; Avoid "obsolete" warnings for translation-table-for-input. (with-no-warnings (let (translation-table-for-input input-method-function) (if (or (not overwrite-mode) (eq overwrite-mode 'overwrite-mode-binary)) (read-quoted-char) (read-char)))))) ;; This used to assume character codes 0240 - 0377 stand for ;; characters in some single-byte character set, and converted them ;; to Emacs characters. But in 23.1 this feature is deprecated ;; in favor of inserting the corresponding Unicode characters. ;; (if (and enable-multibyte-characters ;; (>= char ?\240) ;; (<= char ?\377)) ;; (setq char (unibyte-char-to-multibyte char))) (unless (characterp char) (user-error "%s is not a valid character" (key-description (vector char)))) (if (> arg 0) (if (eq overwrite-mode 'overwrite-mode-binary) (delete-char arg))) (while (> arg 0) (insert-and-inherit char) (setq arg (1- arg))))) (defun forward-to-indentation (&optional arg) "Move forward ARG lines and position at first nonblank character." (interactive "^p") (forward-line (or arg 1)) (skip-chars-forward " \t")) (defun backward-to-indentation (&optional arg) "Move backward ARG lines and position at first nonblank character." (interactive "^p") (forward-line (- (or arg 1))) (skip-chars-forward " \t")) (defun back-to-indentation () "Move point to the first non-whitespace character on this line." (interactive "^") (beginning-of-line 1) (skip-syntax-forward " " (line-end-position)) ;; Move back over chars that have whitespace syntax but have the p flag. (backward-prefix-chars)) (defun fixup-whitespace () "Fixup white space between objects around point. Leave one space or none, according to the context." (interactive "*") (save-excursion (delete-horizontal-space) (if (or (looking-at "^\\|$\\|\\s)") (save-excursion (forward-char -1) (looking-at "$\\|\\s(\\|\\s'"))) nil (insert ?\s)))) (defun delete-horizontal-space (&optional backward-only) "Delete all spaces and tabs around point. If BACKWARD-ONLY is non-nil, only delete them before point." (interactive "*P") (let ((orig-pos (point))) (delete-region (if backward-only orig-pos (progn (skip-chars-forward " \t") (constrain-to-field nil orig-pos t))) (progn (skip-chars-backward " \t") (constrain-to-field nil orig-pos))))) (defun just-one-space (&optional n) "Delete all spaces and tabs around point, leaving one space (or N spaces). If N is negative, delete newlines as well, leaving -N spaces. See also `cycle-spacing'." (interactive "*p") (cycle-spacing n nil 'single-shot)) (defvar cycle-spacing--context nil "Store context used in consecutive calls to `cycle-spacing' command. The first time `cycle-spacing' runs, it saves in this variable: its N argument, the original point position, and the original spacing around point.") (defun cycle-spacing (&optional n preserve-nl-back mode) "Manipulate whitespace around point in a smart way. In interactive use, this function behaves differently in successive consecutive calls. The first call in a sequence acts like `just-one-space'. It deletes all spaces and tabs around point, leaving one space \(or N spaces). N is the prefix argument. If N is negative, it deletes newlines as well, leaving -N spaces. \(If PRESERVE-NL-BACK is non-nil, it does not delete newlines before point.) The second call in a sequence deletes all spaces. The third call in a sequence restores the original whitespace (and point). If MODE is `single-shot', it only performs the first step in the sequence. If MODE is `fast' and the first step would not result in any change \(i.e., there are exactly (abs N) spaces around point), the function goes straight to the second step. Repeatedly calling the function with different values of N starts a new sequence each time." (interactive "*p") (let ((orig-pos (point)) (skip-characters (if (and n (< n 0)) " \t\n\r" " \t")) (num (abs (or n 1)))) (skip-chars-backward (if preserve-nl-back " \t" skip-characters)) (constrain-to-field nil orig-pos) (cond ;; Command run for the first time, single-shot mode or different argument ((or (eq 'single-shot mode) (not (equal last-command this-command)) (not cycle-spacing--context) (not (eq (car cycle-spacing--context) n))) (let* ((start (point)) (num (- num (skip-chars-forward " " (+ num (point))))) (mid (point)) (end (progn (skip-chars-forward skip-characters) (constrain-to-field nil orig-pos t)))) (setq cycle-spacing--context ;; Save for later. ;; Special handling for case where there was no space at all. (unless (= start end) (cons n (cons orig-pos (buffer-substring start (point)))))) ;; If this run causes no change in buffer content, delete all spaces, ;; otherwise delete all excess spaces. (delete-region (if (and (eq mode 'fast) (zerop num) (= mid end)) start mid) end) (insert (make-string num ?\s)))) ;; Command run for the second time. ((not (equal orig-pos (point))) (delete-region (point) orig-pos)) ;; Command run for the third time. (t (insert (cddr cycle-spacing--context)) (goto-char (cadr cycle-spacing--context)) (setq cycle-spacing--context nil))))) (defun beginning-of-buffer (&optional arg) "Move point to the beginning of the buffer. With numeric arg N, put point N/10 of the way from the beginning. If the buffer is narrowed, this command uses the beginning of the accessible part of the buffer. Push mark at previous position, unless either a \\[universal-argument] prefix is supplied, or Transient Mark mode is enabled and the mark is active." (declare (interactive-only "use `(goto-char (point-min))' instead.")) (interactive "^P") (or (consp arg) (region-active-p) (push-mark)) (let ((size (- (point-max) (point-min)))) (goto-char (if (and arg (not (consp arg))) (+ (point-min) (if (> size 10000) ;; Avoid overflow for large buffer sizes! (* (prefix-numeric-value arg) (/ size 10)) (/ (+ 10 (* size (prefix-numeric-value arg))) 10))) (point-min)))) (if (and arg (not (consp arg))) (forward-line 1))) (defun end-of-buffer (&optional arg) "Move point to the end of the buffer. With numeric arg N, put point N/10 of the way from the end. If the buffer is narrowed, this command uses the end of the accessible part of the buffer. Push mark at previous position, unless either a \\[universal-argument] prefix is supplied, or Transient Mark mode is enabled and the mark is active." (declare (interactive-only "use `(goto-char (point-max))' instead.")) (interactive "^P") (or (consp arg) (region-active-p) (push-mark)) (let ((size (- (point-max) (point-min)))) (goto-char (if (and arg (not (consp arg))) (- (point-max) (if (> size 10000) ;; Avoid overflow for large buffer sizes! (* (prefix-numeric-value arg) (/ size 10)) (/ (* size (prefix-numeric-value arg)) 10))) (point-max)))) ;; If we went to a place in the middle of the buffer, ;; adjust it to the beginning of a line. (cond ((and arg (not (consp arg))) (forward-line 1)) ((and (eq (current-buffer) (window-buffer)) (> (point) (window-end nil t))) ;; If the end of the buffer is not already on the screen, ;; then scroll specially to put it near, but not at, the bottom. (overlay-recenter (point)) (recenter -3)))) (defcustom delete-active-region t "Whether single-char deletion commands delete an active region. This has an effect only if Transient Mark mode is enabled, and affects `delete-forward-char' and `delete-backward-char', though not `delete-char'. If the value is the symbol `kill', the active region is killed instead of deleted." :type '(choice (const :tag "Delete active region" t) (const :tag "Kill active region" kill) (const :tag "Do ordinary deletion" nil)) :group 'killing :version "24.1") (defvar region-extract-function (lambda (method) (when (region-beginning) (cond ((eq method 'bounds) (list (cons (region-beginning) (region-end)))) ((eq method 'delete-only) (delete-region (region-beginning) (region-end))) (t (filter-buffer-substring (region-beginning) (region-end) method))))) "Function to get the region's content. Called with one argument METHOD which can be: - nil: return the content as a string. - `delete-only': delete the region; the return value is undefined. - `bounds': return the boundaries of the region as a list of cons cells of the form (START . END). - anything else: delete the region and return its content as a string, after filtering it with `filter-buffer-substring', which is called with METHOD as its 3rd argument.") (defvar region-insert-function (lambda (lines) (let ((first t)) (while lines (or first (insert ?\n)) (insert-for-yank (car lines)) (setq lines (cdr lines) first nil)))) "Function to insert the region's content. Called with one argument LINES. Insert the region as a list of lines.") (defun delete-backward-char (n &optional killflag) "Delete the previous N characters (following if N is negative). If Transient Mark mode is enabled, the mark is active, and N is 1, delete the text in the region and deactivate the mark instead. To disable this, set option `delete-active-region' to nil. Optional second arg KILLFLAG, if non-nil, means to kill (save in kill ring) instead of delete. Interactively, N is the prefix arg, and KILLFLAG is set if N is explicitly specified. When killing, the killed text is filtered by `filter-buffer-substring' before it is saved in the kill ring, so the actual saved text might be different from what was killed. In Overwrite mode, single character backward deletion may replace tabs with spaces so as to back over columns, unless point is at the end of the line." (declare (interactive-only delete-char)) (interactive "p\nP") (unless (integerp n) (signal 'wrong-type-argument (list 'integerp n))) (cond ((and (use-region-p) delete-active-region (= n 1)) ;; If a region is active, kill or delete it. (if (eq delete-active-region 'kill) (kill-region (region-beginning) (region-end) 'region) (funcall region-extract-function 'delete-only))) ;; In Overwrite mode, maybe untabify while deleting ((null (or (null overwrite-mode) (<= n 0) (memq (char-before) '(?\t ?\n)) (eobp) (eq (char-after) ?\n))) (let ((ocol (current-column))) (delete-char (- n) killflag) (save-excursion (insert-char ?\s (- ocol (current-column)) nil)))) ;; Otherwise, do simple deletion. (t (delete-char (- n) killflag)))) (defun delete-forward-char (n &optional killflag) "Delete the following N characters (previous if N is negative). If Transient Mark mode is enabled, the mark is active, and N is 1, delete the text in the region and deactivate the mark instead. To disable this, set variable `delete-active-region' to nil. Optional second arg KILLFLAG non-nil means to kill (save in kill ring) instead of delete. Interactively, N is the prefix arg, and KILLFLAG is set if N was explicitly specified. When killing, the killed text is filtered by `filter-buffer-substring' before it is saved in the kill ring, so the actual saved text might be different from what was killed." (declare (interactive-only delete-char)) (interactive "p\nP") (unless (integerp n) (signal 'wrong-type-argument (list 'integerp n))) (cond ((and (use-region-p) delete-active-region (= n 1)) ;; If a region is active, kill or delete it. (if (eq delete-active-region 'kill) (kill-region (region-beginning) (region-end) 'region) (funcall region-extract-function 'delete-only))) ;; Otherwise, do simple deletion. (t (delete-char n killflag)))) (defun mark-whole-buffer () "Put point at beginning and mark at end of buffer. If narrowing is in effect, only uses the accessible part of the buffer. You probably should not use this function in Lisp programs; it is usually a mistake for a Lisp function to use any subroutine that uses or sets the mark." (declare (interactive-only t)) (interactive) (push-mark) (push-mark (point-max) nil t) ;; This is really `point-min' in most cases, but if we're in the ;; minibuffer, this is at the end of the prompt. (goto-char (minibuffer-prompt-end))) ;; Counting lines, one way or another. (defun goto-line (line &optional buffer) "Go to LINE, counting from line 1 at beginning of buffer. If called interactively, a numeric prefix argument specifies LINE; without a numeric prefix argument, read LINE from the minibuffer. If optional argument BUFFER is non-nil, switch to that buffer and move to line LINE there. If called interactively with \\[universal-argument] as argument, BUFFER is the most recently selected other buffer. Prior to moving point, this function sets the mark (without activating it), unless Transient Mark mode is enabled and the mark is already active. This function is usually the wrong thing to use in a Lisp program. What you probably want instead is something like: (goto-char (point-min)) (forward-line (1- N)) If at all possible, an even better solution is to use char counts rather than line counts." (declare (interactive-only forward-line)) (interactive (if (and current-prefix-arg (not (consp current-prefix-arg))) (list (prefix-numeric-value current-prefix-arg)) ;; Look for a default, a number in the buffer at point. (let* ((default (save-excursion (skip-chars-backward "0-9") (if (looking-at "[0-9]") (string-to-number (buffer-substring-no-properties (point) (progn (skip-chars-forward "0-9") (point))))))) ;; Decide if we're switching buffers. (buffer (if (consp current-prefix-arg) (other-buffer (current-buffer) t))) (buffer-prompt (if buffer (concat " in " (buffer-name buffer)) ""))) ;; Read the argument, offering that number (if any) as default. (list (read-number (format "Goto line%s: " buffer-prompt) (list default (line-number-at-pos))) buffer)))) ;; Switch to the desired buffer, one way or another. (if buffer (let ((window (get-buffer-window buffer))) (if window (select-window window) (switch-to-buffer-other-window buffer)))) ;; Leave mark at previous position (or (region-active-p) (push-mark)) ;; Move to the specified line number in that buffer. (save-restriction (widen) (goto-char (point-min)) (if (eq selective-display t) (re-search-forward "[\n\C-m]" nil 'end (1- line)) (forward-line (1- line))))) (defun count-words-region (start end &optional arg) "Count the number of words in the region. If called interactively, print a message reporting the number of lines, words, and characters in the region (whether or not the region is active); with prefix ARG, report for the entire buffer rather than the region. If called from Lisp, return the number of words between positions START and END." (interactive (if current-prefix-arg (list nil nil current-prefix-arg) (list (region-beginning) (region-end) nil))) (cond ((not (called-interactively-p 'any)) (count-words start end)) (arg (count-words--buffer-message)) (t (count-words--message "Region" start end)))) (defun count-words (start end) "Count words between START and END. If called interactively, START and END are normally the start and end of the buffer; but if the region is active, START and END are the start and end of the region. Print a message reporting the number of lines, words, and chars. If called from Lisp, return the number of words between START and END, without printing any message." (interactive (list nil nil)) (cond ((not (called-interactively-p 'any)) (let ((words 0)) (save-excursion (save-restriction (narrow-to-region start end) (goto-char (point-min)) (while (forward-word-strictly 1) (setq words (1+ words))))) words)) ((use-region-p) (call-interactively 'count-words-region)) (t (count-words--buffer-message)))) (defun count-words--buffer-message () (count-words--message (if (buffer-narrowed-p) "Narrowed part of buffer" "Buffer") (point-min) (point-max))) (defun count-words--message (str start end) (let ((lines (count-lines start end)) (words (count-words start end)) (chars (- end start))) (message "%s has %d line%s, %d word%s, and %d character%s." str lines (if (= lines 1) "" "s") words (if (= words 1) "" "s") chars (if (= chars 1) "" "s")))) (define-obsolete-function-alias 'count-lines-region 'count-words-region "24.1") (defun what-line () "Print the current buffer line number and narrowed line number of point." (interactive) (let ((start (point-min)) (n (line-number-at-pos))) (if (= start 1) (message "Line %d" n) (save-excursion (save-restriction (widen) (message "line %d (narrowed line %d)" (+ n (line-number-at-pos start) -1) n)))))) (defun count-lines (start end) "Return number of lines between START and END. This is usually the number of newlines between them, but can be one more if START is not equal to END and the greater of them is not at the start of a line." (save-excursion (save-restriction (narrow-to-region start end) (goto-char (point-min)) (if (eq selective-display t) (save-match-data (let ((done 0)) (while (re-search-forward "[\n\C-m]" nil t 40) (setq done (+ 40 done))) (while (re-search-forward "[\n\C-m]" nil t 1) (setq done (+ 1 done))) (goto-char (point-max)) (if (and (/= start end) (not (bolp))) (1+ done) done))) (- (buffer-size) (forward-line (buffer-size))))))) (defun line-number-at-pos (&optional pos absolute) "Return buffer line number at position POS. If POS is nil, use current buffer location. If ABSOLUTE is nil, the default, counting starts at (point-min), so the value refers to the contents of the accessible portion of the (potentially narrowed) buffer. If ABSOLUTE is non-nil, ignore any narrowing and return the absolute line number." (save-restriction (when absolute (widen)) (let ((opoint (or pos (point))) start) (save-excursion (goto-char (point-min)) (setq start (point)) (goto-char opoint) (forward-line 0) (1+ (count-lines start (point))))))) (defun what-cursor-position (&optional detail) "Print info on cursor position (on screen and within buffer). Also describe the character after point, and give its character code in octal, decimal and hex. For a non-ASCII multibyte character, also give its encoding in the buffer's selected coding system if the coding system encodes the character safely. If the character is encoded into one byte, that code is shown in hex. If the character is encoded into more than one byte, just \"...\" is shown. In addition, with prefix argument, show details about that character in *Help* buffer. See also the command `describe-char'." (interactive "P") (let* ((char (following-char)) (bidi-fixer ;; If the character is one of LRE, LRO, RLE, RLO, it will ;; start a directional embedding, which could completely ;; disrupt the rest of the line (e.g., RLO will display the ;; rest of the line right-to-left). So we put an invisible ;; PDF character after these characters, to end the ;; embedding, which eliminates any effects on the rest of ;; the line. For RLE and RLO we also append an invisible ;; LRM, to avoid reordering the following numerical ;; characters. For LRI/RLI/FSI we append a PDI. (cond ((memq char '(?\x202a ?\x202d)) (propertize (string ?\x202c) 'invisible t)) ((memq char '(?\x202b ?\x202e)) (propertize (string ?\x202c ?\x200e) 'invisible t)) ((memq char '(?\x2066 ?\x2067 ?\x2068)) (propertize (string ?\x2069) 'invisible t)) ;; Strong right-to-left characters cause reordering of ;; the following numerical characters which show the ;; codepoint, so append LRM to countermand that. ((memq (get-char-code-property char 'bidi-class) '(R AL)) (propertize (string ?\x200e) 'invisible t)) (t ""))) (beg (point-min)) (end (point-max)) (pos (point)) (total (buffer-size)) (percent (round (* 100.0 (1- pos)) (max 1 total))) (hscroll (if (= (window-hscroll) 0) "" (format " Hscroll=%d" (window-hscroll)))) (col (current-column))) (if (= pos end) (if (or (/= beg 1) (/= end (1+ total))) (message "point=%d of %d (%d%%) <%d-%d> column=%d%s" pos total percent beg end col hscroll) (message "point=%d of %d (EOB) column=%d%s" pos total col hscroll)) (let ((coding buffer-file-coding-system) encoded encoding-msg display-prop under-display) (if (or (not coding) (eq (coding-system-type coding) t)) (setq coding (default-value 'buffer-file-coding-system))) (if (eq (char-charset char) 'eight-bit) (setq encoding-msg (format "(%d, #o%o, #x%x, raw-byte)" char char char)) ;; Check if the character is displayed with some `display' ;; text property. In that case, set under-display to the ;; buffer substring covered by that property. (setq display-prop (get-char-property pos 'display)) (if display-prop (let ((to (or (next-single-char-property-change pos 'display) (point-max)))) (if (< to (+ pos 4)) (setq under-display "") (setq under-display "..." to (+ pos 4))) (setq under-display (concat (buffer-substring-no-properties pos to) under-display))) (setq encoded (and (>= char 128) (encode-coding-char char coding)))) (setq encoding-msg (if display-prop (if (not (stringp display-prop)) (format "(%d, #o%o, #x%x, part of display \"%s\")" char char char under-display) (format "(%d, #o%o, #x%x, part of display \"%s\"->\"%s\")" char char char under-display display-prop)) (if encoded (format "(%d, #o%o, #x%x, file %s)" char char char (if (> (length encoded) 1) "..." (encoded-string-description encoded coding))) (format "(%d, #o%o, #x%x)" char char char))))) (if detail ;; We show the detailed information about CHAR. (describe-char (point))) (if (or (/= beg 1) (/= end (1+ total))) (message "Char: %s%s %s point=%d of %d (%d%%) <%d-%d> column=%d%s" (if (< char 256) (single-key-description char) (buffer-substring-no-properties (point) (1+ (point)))) bidi-fixer encoding-msg pos total percent beg end col hscroll) (message "Char: %s%s %s point=%d of %d (%d%%) column=%d%s" (if enable-multibyte-characters (if (< char 128) (single-key-description char) (buffer-substring-no-properties (point) (1+ (point)))) (single-key-description char)) bidi-fixer encoding-msg pos total percent col hscroll)))))) ;; Initialize read-expression-map. It is defined at C level. (defvar read-expression-map (let ((m (make-sparse-keymap))) (define-key m "\M-\t" 'completion-at-point) ;; Might as well bind TAB to completion, since inserting a TAB char is ;; much too rarely useful. (define-key m "\t" 'completion-at-point) (set-keymap-parent m minibuffer-local-map) m)) (defun read-minibuffer (prompt &optional initial-contents) "Return a Lisp object read using the minibuffer, unevaluated. Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS is a string to insert in the minibuffer before reading. \(INITIAL-CONTENTS can also be a cons of a string and an integer. Such arguments are used as in `read-from-minibuffer'.)" ;; Used for interactive spec `x'. (read-from-minibuffer prompt initial-contents minibuffer-local-map t 'minibuffer-history)) (defun eval-minibuffer (prompt &optional initial-contents) "Return value of Lisp expression read using the minibuffer. Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS is a string to insert in the minibuffer before reading. \(INITIAL-CONTENTS can also be a cons of a string and an integer. Such arguments are used as in `read-from-minibuffer'.)" ;; Used for interactive spec `X'. (eval (read--expression prompt initial-contents))) (defvar minibuffer-completing-symbol nil "Non-nil means completing a Lisp symbol in the minibuffer.") (make-obsolete-variable 'minibuffer-completing-symbol nil "24.1" 'get) (defvar minibuffer-default nil "The current default value or list of default values in the minibuffer. The functions `read-from-minibuffer' and `completing-read' bind this variable locally.") (defcustom eval-expression-print-level 4 "Value for `print-level' while printing value in `eval-expression'. A value of nil means no limit." :group 'lisp :type '(choice (const :tag "No Limit" nil) integer) :version "21.1") (defcustom eval-expression-print-length 12 "Value for `print-length' while printing value in `eval-expression'. A value of nil means no limit." :group 'lisp :type '(choice (const :tag "No Limit" nil) integer) :version "21.1") (defcustom eval-expression-debug-on-error t "If non-nil set `debug-on-error' to t in `eval-expression'. If nil, don't change the value of `debug-on-error'." :group 'lisp :type 'boolean :version "21.1") (defcustom eval-expression-print-maximum-character 127 "The largest integer that will be displayed as a character. This affects printing by `eval-expression' (via `eval-expression-print-format')." :group 'lisp :type 'integer :version "26.1") (defun eval-expression-print-format (value) "If VALUE in an integer, return a specially formatted string. This string will typically look like \" (#o1, #x1, ?\\C-a)\". If VALUE is not an integer, nil is returned. This function is used by commands like `eval-expression' that display the result of expression evaluation." (when (integerp value) (let ((char-string (and (characterp value) (<= value eval-expression-print-maximum-character) (char-displayable-p value) (prin1-char value)))) (if char-string (format " (#o%o, #x%x, %s)" value value char-string) (format " (#o%o, #x%x)" value value))))) (defvar eval-expression-minibuffer-setup-hook nil "Hook run by `eval-expression' when entering the minibuffer.") (defun read--expression (prompt &optional initial-contents) (let ((minibuffer-completing-symbol t)) (minibuffer-with-setup-hook (lambda () ;; FIXME: call emacs-lisp-mode? (add-function :before-until (local 'eldoc-documentation-function) #'elisp-eldoc-documentation-function) (eldoc-mode 1) (add-hook 'completion-at-point-functions #'elisp-completion-at-point nil t) (run-hooks 'eval-expression-minibuffer-setup-hook)) (read-from-minibuffer prompt initial-contents read-expression-map t 'read-expression-history)))) (defun eval-expression-get-print-arguments (prefix-argument) "Get arguments for commands that print an expression result. Returns a list (INSERT-VALUE NO-TRUNCATE CHAR-PRINT-LIMIT) based on PREFIX-ARG. This function determines the interpretation of the prefix argument for `eval-expression' and `eval-last-sexp'." (let ((num (prefix-numeric-value prefix-argument))) (list (not (memq prefix-argument '(- nil))) (= num 0) (cond ((not (memq prefix-argument '(0 -1 - nil))) nil) ((= num -1) most-positive-fixnum) (t eval-expression-print-maximum-character))))) ;; We define this, rather than making `eval' interactive, ;; for the sake of completion of names like eval-region, eval-buffer. (defun eval-expression (exp &optional insert-value no-truncate char-print-limit) "Evaluate EXP and print value in the echo area. When called interactively, read an Emacs Lisp expression and evaluate it. Value is also consed on to front of the variable `values'. Optional argument INSERT-VALUE non-nil (interactively, with a non `-' prefix argument) means insert the result into the current buffer instead of printing it in the echo area. Normally, this function truncates long output according to the value of the variables `eval-expression-print-length' and `eval-expression-print-level'. When NO-TRUNCATE is non-nil (interactively, with a prefix argument of zero), however, there is no such truncation. If the resulting value is an integer, and CHAR-PRINT-LIMIT is non-nil (interactively, unless given a positive prefix argument) it will be printed in several additional formats (octal, hexadecimal, and character). The character format is only used if the value is below CHAR-PRINT-LIMIT (interactively, if the prefix argument is -1 or the value is below `eval-expression-print-maximum-character'). Runs the hook `eval-expression-minibuffer-setup-hook' on entering the minibuffer. If `eval-expression-debug-on-error' is non-nil, which is the default, this command arranges for all errors to enter the debugger." (interactive (cons (read--expression "Eval: ") (eval-expression-get-print-arguments current-prefix-arg))) (if (null eval-expression-debug-on-error) (push (eval exp lexical-binding) values) (let ((old-value (make-symbol "t")) new-value) ;; Bind debug-on-error to something unique so that we can ;; detect when evalled code changes it. (let ((debug-on-error old-value)) (push (eval (macroexpand-all exp) lexical-binding) values) (setq new-value debug-on-error)) ;; If evalled code has changed the value of debug-on-error, ;; propagate that change to the global binding. (unless (eq old-value new-value) (setq debug-on-error new-value)))) (let ((print-length (unless no-truncate eval-expression-print-length)) (print-level (unless no-truncate eval-expression-print-level)) (eval-expression-print-maximum-character char-print-limit) (deactivate-mark)) (let ((out (if insert-value (current-buffer) t))) (prog1 (prin1 (car values) out) (let ((str (and char-print-limit (eval-expression-print-format (car values))))) (when str (princ str out))))))) (defun edit-and-eval-command (prompt command) "Prompting with PROMPT, let user edit COMMAND and eval result. COMMAND is a Lisp expression. Let user edit that expression in the minibuffer, then read and evaluate the result." (let ((command (let ((print-level nil) (minibuffer-history-sexp-flag (1+ (minibuffer-depth)))) (unwind-protect (read-from-minibuffer prompt (prin1-to-string command) read-expression-map t 'command-history) ;; If command was added to command-history as a string, ;; get rid of that. We want only evaluable expressions there. (if (stringp (car command-history)) (setq command-history (cdr command-history))))))) ;; If command to be redone does not match front of history, ;; add it to the history. (or (equal command (car command-history)) (setq command-history (cons command command-history))) (eval command))) (defun repeat-complex-command (arg) "Edit and re-evaluate last complex command, or ARGth from last. A complex command is one which used the minibuffer. The command is placed in the minibuffer as a Lisp form for editing. The result is executed, repeating the command as changed. If the command has been changed or is not the most recent previous command it is added to the front of the command history. You can use the minibuffer history commands \ \\\\[next-history-element] and \\[previous-history-element] to get different commands to edit and resubmit." (interactive "p") (let ((elt (nth (1- arg) command-history)) newcmd) (if elt (progn (setq newcmd (let ((print-level nil) (minibuffer-history-position arg) (minibuffer-history-sexp-flag (1+ (minibuffer-depth)))) (unwind-protect (read-from-minibuffer "Redo: " (prin1-to-string elt) read-expression-map t (cons 'command-history arg)) ;; If command was added to command-history as a ;; string, get rid of that. We want only ;; evaluable expressions there. (if (stringp (car command-history)) (setq command-history (cdr command-history)))))) ;; If command to be redone does not match front of history, ;; add it to the history. (or (equal newcmd (car command-history)) (setq command-history (cons newcmd command-history))) (apply #'funcall-interactively (car newcmd) (mapcar (lambda (e) (eval e t)) (cdr newcmd)))) (if command-history (error "Argument %d is beyond length of command history" arg) (error "There are no previous complex commands to repeat"))))) (defvar extended-command-history nil) (defvar execute-extended-command--last-typed nil) (defun read-extended-command () "Read command name to invoke in `execute-extended-command'." (minibuffer-with-setup-hook (lambda () (add-hook 'post-self-insert-hook (lambda () (setq execute-extended-command--last-typed (minibuffer-contents))) nil 'local) (set (make-local-variable 'minibuffer-default-add-function) (lambda () ;; Get a command name at point in the original buffer ;; to propose it after M-n. (with-current-buffer (window-buffer (minibuffer-selected-window)) (and (commandp (function-called-at-point)) (format "%S" (function-called-at-point))))))) ;; Read a string, completing from and restricting to the set of ;; all defined commands. Don't provide any initial input. ;; Save the command read on the extended-command history list. (completing-read (concat (cond ((eq current-prefix-arg '-) "- ") ((and (consp current-prefix-arg) (eq (car current-prefix-arg) 4)) "C-u ") ((and (consp current-prefix-arg) (integerp (car current-prefix-arg))) (format "%d " (car current-prefix-arg))) ((integerp current-prefix-arg) (format "%d " current-prefix-arg))) ;; This isn't strictly correct if `execute-extended-command' ;; is bound to anything else (e.g. [menu]). ;; It could use (key-description (this-single-command-keys)), ;; but actually a prompt other than "M-x" would be confusing, ;; because "M-x" is a well-known prompt to read a command ;; and it serves as a shorthand for "Extended command: ". "M-x ") (lambda (string pred action) (let ((pred (if (memq action '(nil t)) ;; Exclude obsolete commands from completions. (lambda (sym) (and (funcall pred sym) (or (equal string (symbol-name sym)) (not (get sym 'byte-obsolete-info))))) pred))) (complete-with-action action obarray string pred))) #'commandp t nil 'extended-command-history))) (defcustom suggest-key-bindings t "Non-nil means show the equivalent key-binding when M-x command has one. The value can be a length of time to show the message for. If the value is non-nil and not a number, we wait 2 seconds." :group 'keyboard :type '(choice (const :tag "off" nil) (integer :tag "time" 2) (other :tag "on"))) (defcustom extended-command-suggest-shorter t "If non-nil, show a shorter M-x invocation when there is one." :group 'keyboard :type 'boolean :version "26.1") (defun execute-extended-command--shorter-1 (name length) (cond ((zerop length) (list "")) ((equal name "") nil) (t (nconc (mapcar (lambda (s) (concat (substring name 0 1) s)) (execute-extended-command--shorter-1 (substring name 1) (1- length))) (when (string-match "\\`\\(-\\)?[^-]*" name) (execute-extended-command--shorter-1 (substring name (match-end 0)) length)))))) (defun execute-extended-command--shorter (name typed) (let ((candidates '()) (max (length typed)) (len 1) binding) (while (and (not binding) (progn (unless candidates (setq len (1+ len)) (setq candidates (execute-extended-command--shorter-1 name len))) ;; Don't show the help message if the binding isn't ;; significantly shorter than the M-x command the user typed. (< len (- max 5)))) (input-pending-p) ;Dummy call to trigger input-processing, bug#23002. (let ((candidate (pop candidates))) (when (equal name (car-safe (completion-try-completion candidate obarray 'commandp len))) (setq binding candidate)))) binding)) (defun execute-extended-command (prefixarg &optional command-name typed) ;; Based on Fexecute_extended_command in keyboard.c of Emacs. ;; Aaron S. Hawley 2009-08-24 "Read a command name, then read the arguments and call the command. To pass a prefix argument to the command you are invoking, give a prefix argument to `execute-extended-command'." (declare (interactive-only command-execute)) ;; FIXME: Remember the actual text typed by the user before completion, ;; so that we don't later on suggest the same shortening. (interactive (let ((execute-extended-command--last-typed nil)) (list current-prefix-arg (read-extended-command) execute-extended-command--last-typed))) ;; Emacs<24 calling-convention was with a single `prefixarg' argument. (unless command-name (let ((current-prefix-arg prefixarg) ; for prompt (execute-extended-command--last-typed nil)) (setq command-name (read-extended-command)) (setq typed execute-extended-command--last-typed))) (let* ((function (and (stringp command-name) (intern-soft command-name))) (binding (and suggest-key-bindings (not executing-kbd-macro) (where-is-internal function overriding-local-map t)))) (unless (commandp function) (error "`%s' is not a valid command name" command-name)) ;; Some features, such as novice.el, rely on this-command-keys ;; including M-x COMMAND-NAME RET. (set--this-command-keys (concat "\M-x" (symbol-name function) "\r")) (setq this-command function) ;; Normally `real-this-command' should never be changed, but here we really ;; want to pretend that M-x RET is nothing more than a "key ;; binding" for , so the command the user really wanted to run is ;; `function' and not `execute-extended-command'. The difference is ;; visible in cases such as M-x RET and then C-x z (bug#11506). (setq real-this-command function) (let ((prefix-arg prefixarg)) (command-execute function 'record)) ;; If enabled, show which key runs this command. ;; But first wait, and skip the message if there is input. (let* ((waited ;; If this command displayed something in the echo area; ;; wait a few seconds, then display our suggestion message. ;; FIXME: Wait *after* running post-command-hook! ;; FIXME: Don't wait if execute-extended-command--shorter won't ;; find a better answer anyway! (when suggest-key-bindings (sit-for (cond ((zerop (length (current-message))) 0) ((numberp suggest-key-bindings) suggest-key-bindings) (t 2)))))) (when (and waited (not (consp unread-command-events))) (unless (or (not extended-command-suggest-shorter) binding executing-kbd-macro (not (symbolp function)) (<= (length (symbol-name function)) 2)) ;; There's no binding for CMD. Let's try and find the shortest ;; string to use in M-x. ;; FIXME: Can be slow. Cache it maybe? (while-no-input (setq binding (execute-extended-command--shorter (symbol-name function) typed)))) (when binding (with-temp-message (format-message "You can run the command `%s' with %s" function (if (stringp binding) (concat "M-x " binding " RET") (key-description binding))) (sit-for (if (numberp suggest-key-bindings) suggest-key-bindings 2)))))))) (defun command-execute (cmd &optional record-flag keys special) ;; BEWARE: Called directly from the C code. "Execute CMD as an editor command. CMD must be a symbol that satisfies the `commandp' predicate. Optional second arg RECORD-FLAG non-nil means unconditionally put this command in the variable `command-history'. Otherwise, that is done only if an arg is read using the minibuffer. The argument KEYS specifies the value to use instead of (this-command-keys) when reading the arguments; if it is nil, (this-command-keys) is used. The argument SPECIAL, if non-nil, means that this command is executing a special event, so ignore the prefix argument and don't clear it." (setq debug-on-next-call nil) (let ((prefixarg (unless special ;; FIXME: This should probably be done around ;; pre-command-hook rather than here! (prog1 prefix-arg (setq current-prefix-arg prefix-arg) (setq prefix-arg nil) (when current-prefix-arg (prefix-command-update)))))) (if (and (symbolp cmd) (get cmd 'disabled) disabled-command-function) ;; FIXME: Weird calling convention! (run-hooks 'disabled-command-function) (let ((final cmd)) (while (progn (setq final (indirect-function final)) (if (autoloadp final) (setq final (autoload-do-load final cmd))))) (cond ((arrayp final) ;; If requested, place the macro in the command history. For ;; other sorts of commands, call-interactively takes care of this. (when record-flag (push `(execute-kbd-macro ,final ,prefixarg) command-history) ;; Don't keep command history around forever. (when (and (numberp history-length) (> history-length 0)) (let ((cell (nthcdr history-length command-history))) (if (consp cell) (setcdr cell nil))))) (execute-kbd-macro final prefixarg)) (t ;; Pass `cmd' rather than `final', for the backtrace's sake. (prog1 (call-interactively cmd record-flag keys) (when (and (symbolp cmd) (get cmd 'byte-obsolete-info) (not (get cmd 'command-execute-obsolete-warned))) (put cmd 'command-execute-obsolete-warned t) (message "%s" (macroexp--obsolete-warning cmd (get cmd 'byte-obsolete-info) "command")))))))))) (defvar minibuffer-history nil "Default minibuffer history list. This is used for all minibuffer input except when an alternate history list is specified. Maximum length of the history list is determined by the value of `history-length', which see.") (defvar minibuffer-history-sexp-flag nil "Control whether history list elements are expressions or strings. If the value of this variable equals current minibuffer depth, they are expressions; otherwise they are strings. \(That convention is designed to do the right thing for recursive uses of the minibuffer.)") (setq minibuffer-history-variable 'minibuffer-history) (setq minibuffer-history-position nil) ;; Defvar is in C code. (defvar minibuffer-history-search-history nil) (defvar minibuffer-text-before-history nil "Text that was in this minibuffer before any history commands. This is nil if there have not yet been any history commands in this use of the minibuffer.") (add-hook 'minibuffer-setup-hook 'minibuffer-history-initialize) (defun minibuffer-history-initialize () (setq minibuffer-text-before-history nil)) (defun minibuffer-avoid-prompt (_new _old) "A point-motion hook for the minibuffer, that moves point out of the prompt." (declare (obsolete cursor-intangible-mode "25.1")) (constrain-to-field nil (point-max))) (defcustom minibuffer-history-case-insensitive-variables nil "Minibuffer history variables for which matching should ignore case. If a history variable is a member of this list, then the \\[previous-matching-history-element] and \\[next-matching-history-element]\ commands ignore case when searching it, regardless of `case-fold-search'." :type '(repeat variable) :group 'minibuffer) (defun previous-matching-history-element (regexp n) "Find the previous history element that matches REGEXP. \(Previous history elements refer to earlier actions.) With prefix argument N, search for Nth previous match. If N is negative, find the next or Nth next match. Normally, history elements are matched case-insensitively if `case-fold-search' is non-nil, but an uppercase letter in REGEXP makes the search case-sensitive. See also `minibuffer-history-case-insensitive-variables'." (interactive (let* ((enable-recursive-minibuffers t) (regexp (read-from-minibuffer "Previous element matching (regexp): " nil minibuffer-local-map nil 'minibuffer-history-search-history (car minibuffer-history-search-history)))) ;; Use the last regexp specified, by default, if input is empty. (list (if (string= regexp "") (if minibuffer-history-search-history (car minibuffer-history-search-history) (user-error "No previous history search regexp")) regexp) (prefix-numeric-value current-prefix-arg)))) (unless (zerop n) (if (and (zerop minibuffer-history-position) (null minibuffer-text-before-history)) (setq minibuffer-text-before-history (minibuffer-contents-no-properties))) (let ((history (symbol-value minibuffer-history-variable)) (case-fold-search (if (isearch-no-upper-case-p regexp t) ; assume isearch.el is dumped ;; On some systems, ignore case for file names. (if (memq minibuffer-history-variable minibuffer-history-case-insensitive-variables) t ;; Respect the user's setting for case-fold-search: case-fold-search) nil)) prevpos match-string match-offset (pos minibuffer-history-position)) (while (/= n 0) (setq prevpos pos) (setq pos (min (max 1 (+ pos (if (< n 0) -1 1))) (length history))) (when (= pos prevpos) (user-error (if (= pos 1) "No later matching history item" "No earlier matching history item"))) (setq match-string (if (eq minibuffer-history-sexp-flag (minibuffer-depth)) (let ((print-level nil)) (prin1-to-string (nth (1- pos) history))) (nth (1- pos) history))) (setq match-offset (if (< n 0) (and (string-match regexp match-string) (match-end 0)) (and (string-match (concat ".*\\(" regexp "\\)") match-string) (match-beginning 1)))) (when match-offset (setq n (+ n (if (< n 0) 1 -1))))) (setq minibuffer-history-position pos) (goto-char (point-max)) (delete-minibuffer-contents) (insert match-string) (goto-char (+ (minibuffer-prompt-end) match-offset)))) (if (memq (car (car command-history)) '(previous-matching-history-element next-matching-history-element)) (setq command-history (cdr command-history)))) (defun next-matching-history-element (regexp n) "Find the next history element that matches REGEXP. \(The next history element refers to a more recent action.) With prefix argument N, search for Nth next match. If N is negative, find the previous or Nth previous match. Normally, history elements are matched case-insensitively if `case-fold-search' is non-nil, but an uppercase letter in REGEXP makes the search case-sensitive." (interactive (let* ((enable-recursive-minibuffers t) (regexp (read-from-minibuffer "Next element matching (regexp): " nil minibuffer-local-map nil 'minibuffer-history-search-history (car minibuffer-history-search-history)))) ;; Use the last regexp specified, by default, if input is empty. (list (if (string= regexp "") (if minibuffer-history-search-history (car minibuffer-history-search-history) (user-error "No previous history search regexp")) regexp) (prefix-numeric-value current-prefix-arg)))) (previous-matching-history-element regexp (- n))) (defvar minibuffer-temporary-goal-position nil) (defvar minibuffer-default-add-function 'minibuffer-default-add-completions "Function run by `goto-history-element' before consuming default values. This is useful to dynamically add more elements to the list of default values when `goto-history-element' reaches the end of this list. Before calling this function `goto-history-element' sets the variable `minibuffer-default-add-done' to t, so it will call this function only once. In special cases, when this function needs to be called more than once, it can set `minibuffer-default-add-done' to nil explicitly, overriding the setting of this variable to t in `goto-history-element'.") (defvar minibuffer-default-add-done nil "When nil, add more elements to the end of the list of default values. The value nil causes `goto-history-element' to add more elements to the list of defaults when it reaches the end of this list. It does this by calling a function defined by `minibuffer-default-add-function'.") (make-variable-buffer-local 'minibuffer-default-add-done) (defun minibuffer-default-add-completions () "Return a list of all completions without the default value. This function is used to add all elements of the completion table to the end of the list of defaults just after the default value." (let ((def minibuffer-default) (all (all-completions "" minibuffer-completion-table minibuffer-completion-predicate))) (if (listp def) (append def all) (cons def (delete def all))))) (defun goto-history-element (nabs) "Puts element of the minibuffer history in the minibuffer. The argument NABS specifies the absolute history position." (interactive "p") (when (and (not minibuffer-default-add-done) (functionp minibuffer-default-add-function) (< nabs (- (if (listp minibuffer-default) (length minibuffer-default) 1)))) (setq minibuffer-default-add-done t minibuffer-default (funcall minibuffer-default-add-function))) (let ((minimum (if minibuffer-default (- (if (listp minibuffer-default) (length minibuffer-default) 1)) 0)) elt minibuffer-returned-to-present) (if (and (zerop minibuffer-history-position) (null minibuffer-text-before-history)) (setq minibuffer-text-before-history (minibuffer-contents-no-properties))) (if (< nabs minimum) (user-error (if minibuffer-default "End of defaults; no next item" "End of history; no default available"))) (if (> nabs (if (listp (symbol-value minibuffer-history-variable)) (length (symbol-value minibuffer-history-variable)) 0)) (user-error "Beginning of history; no preceding item")) (unless (memq last-command '(next-history-element previous-history-element)) (let ((prompt-end (minibuffer-prompt-end))) (set (make-local-variable 'minibuffer-temporary-goal-position) (cond ((<= (point) prompt-end) prompt-end) ((eobp) nil) (t (point)))))) (goto-char (point-max)) (delete-minibuffer-contents) (setq minibuffer-history-position nabs) (cond ((< nabs 0) (setq elt (if (listp minibuffer-default) (nth (1- (abs nabs)) minibuffer-default) minibuffer-default))) ((= nabs 0) (setq elt (or minibuffer-text-before-history "")) (setq minibuffer-returned-to-present t) (setq minibuffer-text-before-history nil)) (t (setq elt (nth (1- minibuffer-history-position) (symbol-value minibuffer-history-variable))))) (insert (if (and (eq minibuffer-history-sexp-flag (minibuffer-depth)) (not minibuffer-returned-to-present)) (let ((print-level nil)) (prin1-to-string elt)) elt)) (goto-char (or minibuffer-temporary-goal-position (point-max))))) (defun next-history-element (n) "Puts next element of the minibuffer history in the minibuffer. With argument N, it uses the Nth following element." (interactive "p") (or (zerop n) (goto-history-element (- minibuffer-history-position n)))) (defun previous-history-element (n) "Puts previous element of the minibuffer history in the minibuffer. With argument N, it uses the Nth previous element." (interactive "p") (or (zerop n) (goto-history-element (+ minibuffer-history-position n)))) (defun next-line-or-history-element (&optional arg) "Move cursor vertically down ARG lines, or to the next history element. When point moves over the bottom line of multi-line minibuffer, puts ARGth next element of the minibuffer history in the minibuffer." (interactive "^p") (or arg (setq arg 1)) (let* ((old-point (point)) ;; Don't add newlines if they have the mode enabled globally. (next-line-add-newlines nil) ;; Remember the original goal column of possibly multi-line input ;; excluding the length of the prompt on the first line. (prompt-end (minibuffer-prompt-end)) (old-column (unless (and (eolp) (> (point) prompt-end)) (if (= (line-number-at-pos) 1) (max (- (current-column) (1- prompt-end)) 0) (current-column))))) (condition-case nil (with-no-warnings (next-line arg)) (end-of-buffer ;; Restore old position since `line-move-visual' moves point to ;; the end of the line when it fails to go to the next line. (goto-char old-point) (next-history-element arg) ;; Reset `temporary-goal-column' because a correct value is not ;; calculated when `next-line' above fails by bumping against ;; the bottom of the minibuffer (bug#22544). (setq temporary-goal-column 0) ;; Restore the original goal column on the last line ;; of possibly multi-line input. (goto-char (point-max)) (when old-column (if (= (line-number-at-pos) 1) (move-to-column (+ old-column (1- (minibuffer-prompt-end)))) (move-to-column old-column))))))) (defun previous-line-or-history-element (&optional arg) "Move cursor vertically up ARG lines, or to the previous history element. When point moves over the top line of multi-line minibuffer, puts ARGth previous element of the minibuffer history in the minibuffer." (interactive "^p") (or arg (setq arg 1)) (let* ((old-point (point)) ;; Remember the original goal column of possibly multi-line input ;; excluding the length of the prompt on the first line. (prompt-end (minibuffer-prompt-end)) (old-column (unless (and (eolp) (> (point) prompt-end)) (if (= (line-number-at-pos) 1) (max (- (current-column) (1- prompt-end)) 0) (current-column))))) (condition-case nil (with-no-warnings (previous-line arg)) (beginning-of-buffer ;; Restore old position since `line-move-visual' moves point to ;; the beginning of the line when it fails to go to the previous line. (goto-char old-point) (previous-history-element arg) ;; Reset `temporary-goal-column' because a correct value is not ;; calculated when `previous-line' above fails by bumping against ;; the top of the minibuffer (bug#22544). (setq temporary-goal-column 0) ;; Restore the original goal column on the first line ;; of possibly multi-line input. (goto-char (minibuffer-prompt-end)) (if old-column (if (= (line-number-at-pos) 1) (move-to-column (+ old-column (1- (minibuffer-prompt-end)))) (move-to-column old-column)) ;; Put the cursor at the end of the visual line instead of the ;; logical line, so the next `previous-line-or-history-element' ;; would move to the previous history element, not to a possible upper ;; visual line from the end of logical line in `line-move-visual' mode. (end-of-visual-line) ;; Since `end-of-visual-line' puts the cursor at the beginning ;; of the next visual line, move it one char back to the end ;; of the first visual line (bug#22544). (unless (eolp) (backward-char 1))))))) (defun next-complete-history-element (n) "Get next history element which completes the minibuffer before the point. The contents of the minibuffer after the point are deleted, and replaced by the new completion." (interactive "p") (let ((point-at-start (point))) (next-matching-history-element (concat "^" (regexp-quote (buffer-substring (minibuffer-prompt-end) (point)))) n) ;; next-matching-history-element always puts us at (point-min). ;; Move to the position we were at before changing the buffer contents. ;; This is still sensible, because the text before point has not changed. (goto-char point-at-start))) (defun previous-complete-history-element (n) "\ Get previous history element which completes the minibuffer before the point. The contents of the minibuffer after the point are deleted, and replaced by the new completion." (interactive "p") (next-complete-history-element (- n))) ;; For compatibility with the old subr of the same name. (defun minibuffer-prompt-width () "Return the display width of the minibuffer prompt. Return 0 if current buffer is not a minibuffer." ;; Return the width of everything before the field at the end of ;; the buffer; this should be 0 for normal buffers. (1- (minibuffer-prompt-end))) ;; isearch minibuffer history (add-hook 'minibuffer-setup-hook 'minibuffer-history-isearch-setup) (defvar minibuffer-history-isearch-message-overlay) (make-variable-buffer-local 'minibuffer-history-isearch-message-overlay) (defun minibuffer-history-isearch-setup () "Set up a minibuffer for using isearch to search the minibuffer history. Intended to be added to `minibuffer-setup-hook'." (set (make-local-variable 'isearch-search-fun-function) 'minibuffer-history-isearch-search) (set (make-local-variable 'isearch-message-function) 'minibuffer-history-isearch-message) (set (make-local-variable 'isearch-wrap-function) 'minibuffer-history-isearch-wrap) (set (make-local-variable 'isearch-push-state-function) 'minibuffer-history-isearch-push-state) (add-hook 'isearch-mode-end-hook 'minibuffer-history-isearch-end nil t)) (defun minibuffer-history-isearch-end () "Clean up the minibuffer after terminating isearch in the minibuffer." (if minibuffer-history-isearch-message-overlay (delete-overlay minibuffer-history-isearch-message-overlay))) (defun minibuffer-history-isearch-search () "Return the proper search function, for isearch in minibuffer history." (lambda (string bound noerror) (let ((search-fun ;; Use standard functions to search within minibuffer text (isearch-search-fun-default)) found) ;; Avoid lazy-highlighting matches in the minibuffer prompt when ;; searching forward. Lazy-highlight calls this lambda with the ;; bound arg, so skip the minibuffer prompt. (if (and bound isearch-forward (< (point) (minibuffer-prompt-end))) (goto-char (minibuffer-prompt-end))) (or ;; 1. First try searching in the initial minibuffer text (funcall search-fun string (if isearch-forward bound (minibuffer-prompt-end)) noerror) ;; 2. If the above search fails, start putting next/prev history ;; elements in the minibuffer successively, and search the string ;; in them. Do this only when bound is nil (i.e. not while ;; lazy-highlighting search strings in the current minibuffer text). (unless bound (condition-case nil (progn (while (not found) (cond (isearch-forward (next-history-element 1) (goto-char (minibuffer-prompt-end))) (t (previous-history-element 1) (goto-char (point-max)))) (setq isearch-barrier (point) isearch-opoint (point)) ;; After putting the next/prev history element, search ;; the string in them again, until next-history-element ;; or previous-history-element raises an error at the ;; beginning/end of history. (setq found (funcall search-fun string (unless isearch-forward ;; For backward search, don't search ;; in the minibuffer prompt (minibuffer-prompt-end)) noerror))) ;; Return point of the new search result (point)) ;; Return nil when next(prev)-history-element fails (error nil))))))) (defun minibuffer-history-isearch-message (&optional c-q-hack ellipsis) "Display the minibuffer history search prompt. If there are no search errors, this function displays an overlay with the isearch prompt which replaces the original minibuffer prompt. Otherwise, it displays the standard isearch message returned from the function `isearch-message'." (if (not (and (minibufferp) isearch-success (not isearch-error))) ;; Use standard function `isearch-message' when not in the minibuffer, ;; or search fails, or has an error (like incomplete regexp). ;; This function overwrites minibuffer text with isearch message, ;; so it's possible to see what is wrong in the search string. (isearch-message c-q-hack ellipsis) ;; Otherwise, put the overlay with the standard isearch prompt over ;; the initial minibuffer prompt. (if (overlayp minibuffer-history-isearch-message-overlay) (move-overlay minibuffer-history-isearch-message-overlay (point-min) (minibuffer-prompt-end)) (setq minibuffer-history-isearch-message-overlay (make-overlay (point-min) (minibuffer-prompt-end))) (overlay-put minibuffer-history-isearch-message-overlay 'evaporate t)) (overlay-put minibuffer-history-isearch-message-overlay 'display (isearch-message-prefix c-q-hack ellipsis)) ;; And clear any previous isearch message. (message ""))) (defun minibuffer-history-isearch-wrap () "Wrap the minibuffer history search when search fails. Move point to the first history element for a forward search, or to the last history element for a backward search." ;; When `minibuffer-history-isearch-search' fails on reaching the ;; beginning/end of the history, wrap the search to the first/last ;; minibuffer history element. (if isearch-forward (goto-history-element (length (symbol-value minibuffer-history-variable))) (goto-history-element 0)) (setq isearch-success t) (goto-char (if isearch-forward (minibuffer-prompt-end) (point-max)))) (defun minibuffer-history-isearch-push-state () "Save a function restoring the state of minibuffer history search. Save `minibuffer-history-position' to the additional state parameter in the search status stack." (let ((pos minibuffer-history-position)) (lambda (cmd) (minibuffer-history-isearch-pop-state cmd pos)))) (defun minibuffer-history-isearch-pop-state (_cmd hist-pos) "Restore the minibuffer history search state. Go to the history element by the absolute history position HIST-POS." (goto-history-element hist-pos)) ;Put this on C-x u, so we can force that rather than C-_ into startup msg (define-obsolete-function-alias 'advertised-undo 'undo "23.2") (defconst undo-equiv-table (make-hash-table :test 'eq :weakness t) "Table mapping redo records to the corresponding undo one. A redo record for undo-in-region maps to t. A redo record for ordinary undo maps to the following (earlier) undo.") (defvar undo-in-region nil "Non-nil if `pending-undo-list' is not just a tail of `buffer-undo-list'.") (defvar undo-no-redo nil "If t, `undo' doesn't go through redo entries.") (defvar pending-undo-list nil "Within a run of consecutive undo commands, list remaining to be undone. If t, we undid all the way to the end of it.") (defun undo (&optional arg) "Undo some previous changes. Repeat this command to undo more changes. A numeric ARG serves as a repeat count. In Transient Mark mode when the mark is active, only undo changes within the current region. Similarly, when not in Transient Mark mode, just \\[universal-argument] as an argument limits undo to changes within the current region." (interactive "*P") ;; Make last-command indicate for the next command that this was an undo. ;; That way, another undo will undo more. ;; If we get to the end of the undo history and get an error, ;; another undo command will find the undo history empty ;; and will get another error. To begin undoing the undos, ;; you must type some other command. (let* ((modified (buffer-modified-p)) ;; For an indirect buffer, look in the base buffer for the ;; auto-save data. (base-buffer (or (buffer-base-buffer) (current-buffer))) (recent-save (with-current-buffer base-buffer (recent-auto-save-p))) message) ;; If we get an error in undo-start, ;; the next command should not be a "consecutive undo". ;; So set `this-command' to something other than `undo'. (setq this-command 'undo-start) (unless (and (eq last-command 'undo) (or (eq pending-undo-list t) ;; If something (a timer or filter?) changed the buffer ;; since the previous command, don't continue the undo seq. (let ((list buffer-undo-list)) (while (eq (car list) nil) (setq list (cdr list))) ;; If the last undo record made was made by undo ;; it shows nothing else happened in between. (gethash list undo-equiv-table)))) (setq undo-in-region (or (region-active-p) (and arg (not (numberp arg))))) (if undo-in-region (undo-start (region-beginning) (region-end)) (undo-start)) ;; get rid of initial undo boundary (undo-more 1)) ;; If we got this far, the next command should be a consecutive undo. (setq this-command 'undo) ;; Check to see whether we're hitting a redo record, and if ;; so, ask the user whether she wants to skip the redo/undo pair. (let ((equiv (gethash pending-undo-list undo-equiv-table))) (or (eq (selected-window) (minibuffer-window)) (setq message (format "%s%s!" (if (or undo-no-redo (not equiv)) "Undo" "Redo") (if undo-in-region " in region" "")))) (when (and (consp equiv) undo-no-redo) ;; The equiv entry might point to another redo record if we have done ;; undo-redo-undo-redo-... so skip to the very last equiv. (while (let ((next (gethash equiv undo-equiv-table))) (if next (setq equiv next)))) (setq pending-undo-list equiv))) (undo-more (if (numberp arg) (prefix-numeric-value arg) 1)) ;; Record the fact that the just-generated undo records come from an ;; undo operation--that is, they are redo records. ;; In the ordinary case (not within a region), map the redo ;; record to the following undos. ;; I don't know how to do that in the undo-in-region case. (let ((list buffer-undo-list)) ;; Strip any leading undo boundaries there might be, like we do ;; above when checking. (while (eq (car list) nil) (setq list (cdr list))) (puthash list ;; Prevent identity mapping. This can happen if ;; consecutive nils are erroneously in undo list. (if (or undo-in-region (eq list pending-undo-list)) t pending-undo-list) undo-equiv-table)) ;; Don't specify a position in the undo record for the undo command. ;; Instead, undoing this should move point to where the change is. (let ((tail buffer-undo-list) (prev nil)) (while (car tail) (when (integerp (car tail)) (let ((pos (car tail))) (if prev (setcdr prev (cdr tail)) (setq buffer-undo-list (cdr tail))) (setq tail (cdr tail)) (while (car tail) (if (eq pos (car tail)) (if prev (setcdr prev (cdr tail)) (setq buffer-undo-list (cdr tail))) (setq prev tail)) (setq tail (cdr tail))) (setq tail nil))) (setq prev tail tail (cdr tail)))) ;; Record what the current undo list says, ;; so the next command can tell if the buffer was modified in between. (and modified (not (buffer-modified-p)) (with-current-buffer base-buffer (delete-auto-save-file-if-necessary recent-save))) ;; Display a message announcing success. (if message (message "%s" message)))) (defun buffer-disable-undo (&optional buffer) "Make BUFFER stop keeping undo information. No argument or nil as argument means do this for the current buffer." (interactive) (with-current-buffer (if buffer (get-buffer buffer) (current-buffer)) (setq buffer-undo-list t))) (defun undo-only (&optional arg) "Undo some previous changes. Repeat this command to undo more changes. A numeric ARG serves as a repeat count. Contrary to `undo', this will not redo a previous undo." (interactive "*p") (let ((undo-no-redo t)) (undo arg))) (defvar undo-in-progress nil "Non-nil while performing an undo. Some change-hooks test this variable to do something different.") (defun undo-more (n) "Undo back N undo-boundaries beyond what was already undone recently. Call `undo-start' to get ready to undo recent changes, then call `undo-more' one or more times to undo them." (or (listp pending-undo-list) (user-error (concat "No further undo information" (and undo-in-region " for region")))) (let ((undo-in-progress t)) ;; Note: The following, while pulling elements off ;; `pending-undo-list' will call primitive change functions which ;; will push more elements onto `buffer-undo-list'. (setq pending-undo-list (primitive-undo n pending-undo-list)) (if (null pending-undo-list) (setq pending-undo-list t)))) (defun primitive-undo (n list) "Undo N records from the front of the list LIST. Return what remains of the list." ;; This is a good feature, but would make undo-start ;; unable to do what is expected. ;;(when (null (car (list))) ;; ;; If the head of the list is a boundary, it is the boundary ;; ;; preceding this command. Get rid of it and don't count it. ;; (setq list (cdr list)))) (let ((arg n) ;; In a writable buffer, enable undoing read-only text that is ;; so because of text properties. (inhibit-read-only t) ;; Don't let `intangible' properties interfere with undo. (inhibit-point-motion-hooks t) ;; We use oldlist only to check for EQ. ++kfs (oldlist buffer-undo-list) (did-apply nil) (next nil)) (while (> arg 0) (while (setq next (pop list)) ;Exit inner loop at undo boundary. ;; Handle an integer by setting point to that value. (pcase next ((pred integerp) (goto-char next)) ;; Element (t . TIME) records previous modtime. ;; Preserve any flag of NONEXISTENT_MODTIME_NSECS or ;; UNKNOWN_MODTIME_NSECS. (`(t . ,time) ;; If this records an obsolete save ;; (not matching the actual disk file) ;; then don't mark unmodified. (when (or (equal time (visited-file-modtime)) (and (consp time) (equal (list (car time) (cdr time)) (visited-file-modtime)))) (when (fboundp 'unlock-buffer) (unlock-buffer)) (set-buffer-modified-p nil))) ;; Element (nil PROP VAL BEG . END) is property change. (`(nil . ,(or `(,prop ,val ,beg . ,end) pcase--dontcare)) (when (or (> (point-min) beg) (< (point-max) end)) (error "Changes to be undone are outside visible portion of buffer")) (put-text-property beg end prop val)) ;; Element (BEG . END) means range was inserted. (`(,(and beg (pred integerp)) . ,(and end (pred integerp))) ;; (and `(,beg . ,end) `(,(pred integerp) . ,(pred integerp))) ;; Ideally: `(,(pred integerp beg) . ,(pred integerp end)) (when (or (> (point-min) beg) (< (point-max) end)) (error "Changes to be undone are outside visible portion of buffer")) ;; Set point first thing, so that undoing this undo ;; does not send point back to where it is now. (goto-char beg) (delete-region beg end)) ;; Element (apply FUN . ARGS) means call FUN to undo. (`(apply . ,fun-args) (let ((currbuff (current-buffer))) (if (integerp (car fun-args)) ;; Long format: (apply DELTA START END FUN . ARGS). (pcase-let* ((`(,delta ,start ,end ,fun . ,args) fun-args) (start-mark (copy-marker start nil)) (end-mark (copy-marker end t))) (when (or (> (point-min) start) (< (point-max) end)) (error "Changes to be undone are outside visible portion of buffer")) (apply fun args) ;; Use `save-current-buffer'? ;; Check that the function did what the entry ;; said it would do. (unless (and (= start start-mark) (= (+ delta end) end-mark)) (error "Changes to be undone by function different than announced")) (set-marker start-mark nil) (set-marker end-mark nil)) (apply fun-args)) (unless (eq currbuff (current-buffer)) (error "Undo function switched buffer")) (setq did-apply t))) ;; Element (STRING . POS) means STRING was deleted. (`(,(and string (pred stringp)) . ,(and pos (pred integerp))) (let ((valid-marker-adjustments nil) (apos (abs pos))) (when (or (< apos (point-min)) (> apos (point-max))) (error "Changes to be undone are outside visible portion of buffer")) ;; Check that marker adjustments which were recorded ;; with the (STRING . POS) record are still valid, ie ;; the markers haven't moved. We check their validity ;; before reinserting the string so as we don't need to ;; mind marker insertion-type. (while (and (markerp (car-safe (car list))) (integerp (cdr-safe (car list)))) (let* ((marker-adj (pop list)) (m (car marker-adj))) (and (eq (marker-buffer m) (current-buffer)) (= apos m) (push marker-adj valid-marker-adjustments)))) ;; Insert string and adjust point (if (< pos 0) (progn (goto-char (- pos)) (insert string)) (goto-char pos) (insert string) (goto-char pos)) ;; Adjust the valid marker adjustments (dolist (adj valid-marker-adjustments) ;; Insert might have invalidated some of the markers ;; via modification hooks. Update only the currently ;; valid ones (bug#25599). (if (marker-buffer (car adj)) (set-marker (car adj) (- (car adj) (cdr adj))))))) ;; (MARKER . OFFSET) means a marker MARKER was adjusted by OFFSET. (`(,(and marker (pred markerp)) . ,(and offset (pred integerp))) (warn "Encountered %S entry in undo list with no matching (TEXT . POS) entry" next) ;; Even though these elements are not expected in the undo ;; list, adjust them to be conservative for the 24.4 ;; release. (Bug#16818) (when (marker-buffer marker) (set-marker marker (- marker offset) (marker-buffer marker)))) (_ (error "Unrecognized entry in undo list %S" next)))) (setq arg (1- arg))) ;; Make sure an apply entry produces at least one undo entry, ;; so the test in `undo' for continuing an undo series ;; will work right. (if (and did-apply (eq oldlist buffer-undo-list)) (setq buffer-undo-list (cons (list 'apply 'cdr nil) buffer-undo-list)))) list) ;; Deep copy of a list (defun undo-copy-list (list) "Make a copy of undo list LIST." (mapcar 'undo-copy-list-1 list)) (defun undo-copy-list-1 (elt) (if (consp elt) (cons (car elt) (undo-copy-list-1 (cdr elt))) elt)) (defun undo-start (&optional beg end) "Set `pending-undo-list' to the front of the undo list. The next call to `undo-more' will undo the most recently made change. If BEG and END are specified, then only undo elements that apply to text between BEG and END are used; other undo elements are ignored. If BEG and END are nil, all undo elements are used." (if (eq buffer-undo-list t) (user-error "No undo information in this buffer")) (setq pending-undo-list (if (and beg end (not (= beg end))) (undo-make-selective-list (min beg end) (max beg end)) buffer-undo-list))) ;; The positions given in elements of the undo list are the positions ;; as of the time that element was recorded to undo history. In ;; general, subsequent buffer edits render those positions invalid in ;; the current buffer, unless adjusted according to the intervening ;; undo elements. ;; ;; Undo in region is a use case that requires adjustments to undo ;; elements. It must adjust positions of elements in the region based ;; on newer elements not in the region so as they may be correctly ;; applied in the current buffer. undo-make-selective-list ;; accomplishes this with its undo-deltas list of adjustments. An ;; example undo history from oldest to newest: ;; ;; buf pos: ;; 123456789 buffer-undo-list undo-deltas ;; --------- ---------------- ----------- ;; aaa (1 . 4) (1 . -3) ;; aaba (3 . 4) N/A (in region) ;; ccaaba (1 . 3) (1 . -2) ;; ccaabaddd (7 . 10) (7 . -3) ;; ccaabdd ("ad" . 6) (6 . 2) ;; ccaabaddd (6 . 8) (6 . -2) ;; | |<-- region: "caab", from 2 to 6 ;; ;; When the user starts a run of undos in region, ;; undo-make-selective-list is called to create the full list of in ;; region elements. Each element is adjusted forward chronologically ;; through undo-deltas to determine if it is in the region. ;; ;; In the above example, the insertion of "b" is (3 . 4) in the ;; buffer-undo-list. The undo-delta (1 . -2) causes (3 . 4) to become ;; (5 . 6). The next three undo-deltas cause no adjustment, so (5 ;; . 6) is assessed as in the region and placed in the selective list. ;; Notably, the end of region itself adjusts from "2 to 6" to "2 to 5" ;; due to the selected element. The "b" insertion is the only element ;; fully in the region, so in this example undo-make-selective-list ;; returns (nil (5 . 6)). ;; ;; The adjustment of the (7 . 10) insertion of "ddd" shows an edge ;; case. It is adjusted through the undo-deltas: ((6 . 2) (6 . -2)). ;; Normally an undo-delta of (6 . 2) would cause positions after 6 to ;; adjust by 2. However, they shouldn't adjust to less than 6, so (7 ;; . 10) adjusts to (6 . 8) due to the first undo delta. ;; ;; More interesting is how to adjust the "ddd" insertion due to the ;; next undo-delta: (6 . -2), corresponding to reinsertion of "ad". ;; If the reinsertion was a manual retyping of "ad", then the total ;; adjustment should be (7 . 10) -> (6 . 8) -> (8 . 10). However, if ;; the reinsertion was due to undo, one might expect the first "d" ;; character would again be a part of the "ddd" text, meaning its ;; total adjustment would be (7 . 10) -> (6 . 8) -> (7 . 10). ;; ;; undo-make-selective-list assumes in this situation that "ad" was a ;; new edit, even if it was inserted because of an undo. ;; Consequently, if the user undos in region "8 to 10" of the ;; "ccaabaddd" buffer, they could be surprised that it becomes ;; "ccaabad", as though the first "d" became detached from the ;; original "ddd" insertion. This quirk is a FIXME. (defun undo-make-selective-list (start end) "Return a list of undo elements for the region START to END. The elements come from `buffer-undo-list', but we keep only the elements inside this region, and discard those outside this region. The elements' positions are adjusted so as the returned list can be applied to the current buffer." (let ((ulist buffer-undo-list) ;; A list of position adjusted undo elements in the region. (selective-list (list nil)) ;; A list of undo-deltas for out of region undo elements. undo-deltas undo-elt) (while ulist (when undo-no-redo (while (gethash ulist undo-equiv-table) (setq ulist (gethash ulist undo-equiv-table)))) (setq undo-elt (car ulist)) (cond ((null undo-elt) ;; Don't put two nils together in the list (when (car selective-list) (push nil selective-list))) ((and (consp undo-elt) (eq (car undo-elt) t)) ;; This is a "was unmodified" element. Keep it ;; if we have kept everything thus far. (when (not undo-deltas) (push undo-elt selective-list))) ;; Skip over marker adjustments, instead relying ;; on finding them after (TEXT . POS) elements ((markerp (car-safe undo-elt)) nil) (t (let ((adjusted-undo-elt (undo-adjust-elt undo-elt undo-deltas))) (if (undo-elt-in-region adjusted-undo-elt start end) (progn (setq end (+ end (cdr (undo-delta adjusted-undo-elt)))) (push adjusted-undo-elt selective-list) ;; Keep (MARKER . ADJUSTMENT) if their (TEXT . POS) was ;; kept. primitive-undo may discard them later. (when (and (stringp (car-safe adjusted-undo-elt)) (integerp (cdr-safe adjusted-undo-elt))) (let ((list-i (cdr ulist))) (while (markerp (car-safe (car list-i))) (push (pop list-i) selective-list))))) (let ((delta (undo-delta undo-elt))) (when (/= 0 (cdr delta)) (push delta undo-deltas))))))) (pop ulist)) (nreverse selective-list))) (defun undo-elt-in-region (undo-elt start end) "Determine whether UNDO-ELT falls inside the region START ... END. If it crosses the edge, we return nil. Generally this function is not useful for determining whether (MARKER . ADJUSTMENT) undo elements are in the region, because markers can be arbitrarily relocated. Instead, pass the marker adjustment's corresponding (TEXT . POS) element." (cond ((integerp undo-elt) (and (>= undo-elt start) (<= undo-elt end))) ((eq undo-elt nil) t) ((atom undo-elt) nil) ((stringp (car undo-elt)) ;; (TEXT . POSITION) (and (>= (abs (cdr undo-elt)) start) (<= (abs (cdr undo-elt)) end))) ((and (consp undo-elt) (markerp (car undo-elt))) ;; (MARKER . ADJUSTMENT) (<= start (car undo-elt) end)) ((null (car undo-elt)) ;; (nil PROPERTY VALUE BEG . END) (let ((tail (nthcdr 3 undo-elt))) (and (>= (car tail) start) (<= (cdr tail) end)))) ((integerp (car undo-elt)) ;; (BEGIN . END) (and (>= (car undo-elt) start) (<= (cdr undo-elt) end))))) (defun undo-elt-crosses-region (undo-elt start end) "Test whether UNDO-ELT crosses one edge of that region START ... END. This assumes we have already decided that UNDO-ELT is not *inside* the region START...END." (declare (obsolete nil "25.1")) (cond ((atom undo-elt) nil) ((null (car undo-elt)) ;; (nil PROPERTY VALUE BEG . END) (let ((tail (nthcdr 3 undo-elt))) (and (< (car tail) end) (> (cdr tail) start)))) ((integerp (car undo-elt)) ;; (BEGIN . END) (and (< (car undo-elt) end) (> (cdr undo-elt) start))))) (defun undo-adjust-elt (elt deltas) "Return adjustment of undo element ELT by the undo DELTAS list." (pcase elt ;; POSITION ((pred integerp) (undo-adjust-pos elt deltas)) ;; (BEG . END) (`(,(and beg (pred integerp)) . ,(and end (pred integerp))) (undo-adjust-beg-end beg end deltas)) ;; (TEXT . POSITION) (`(,(and text (pred stringp)) . ,(and pos (pred integerp))) (cons text (* (if (< pos 0) -1 1) (undo-adjust-pos (abs pos) deltas)))) ;; (nil PROPERTY VALUE BEG . END) (`(nil . ,(or `(,prop ,val ,beg . ,end) pcase--dontcare)) `(nil ,prop ,val . ,(undo-adjust-beg-end beg end deltas))) ;; (apply DELTA START END FUN . ARGS) ;; FIXME ;; All others return same elt (_ elt))) ;; (BEG . END) can adjust to the same positions, commonly when an ;; insertion was undone and they are out of region, for example: ;; ;; buf pos: ;; 123456789 buffer-undo-list undo-deltas ;; --------- ---------------- ----------- ;; [...] ;; abbaa (2 . 4) (2 . -2) ;; aaa ("bb" . 2) (2 . 2) ;; [...] ;; ;; "bb" insertion (2 . 4) adjusts to (2 . 2) because of the subsequent ;; undo. Further adjustments to such an element should be the same as ;; for (TEXT . POSITION) elements. The options are: ;; ;; 1: POSITION adjusts using <= (use-< nil), resulting in behavior ;; analogous to marker insertion-type t. ;; ;; 2: POSITION adjusts using <, resulting in behavior analogous to ;; marker insertion-type nil. ;; ;; There was no strong reason to prefer one or the other, except that ;; the first is more consistent with prior undo in region behavior. (defun undo-adjust-beg-end (beg end deltas) "Return cons of adjustments to BEG and END by the undo DELTAS list." (let ((adj-beg (undo-adjust-pos beg deltas))) ;; Note: option 2 above would be like (cons (min ...) adj-end) (cons adj-beg (max adj-beg (undo-adjust-pos end deltas t))))) (defun undo-adjust-pos (pos deltas &optional use-<) "Return adjustment of POS by the undo DELTAS list, comparing with < or <= based on USE-<." (dolist (d deltas pos) (when (if use-< (< (car d) pos) (<= (car d) pos)) (setq pos ;; Don't allow pos to become less than the undo-delta ;; position. This edge case is described in the overview ;; comments. (max (car d) (- pos (cdr d))))))) ;; Return the first affected buffer position and the delta for an undo element ;; delta is defined as the change in subsequent buffer positions if we *did* ;; the undo. (defun undo-delta (undo-elt) (if (consp undo-elt) (cond ((stringp (car undo-elt)) ;; (TEXT . POSITION) (cons (abs (cdr undo-elt)) (length (car undo-elt)))) ((integerp (car undo-elt)) ;; (BEGIN . END) (cons (car undo-elt) (- (car undo-elt) (cdr undo-elt)))) (t '(0 . 0))) '(0 . 0))) ;;; Default undo-boundary addition ;; ;; This section adds a new undo-boundary at either after a command is ;; called or in some cases on a timer called after a change is made in ;; any buffer. (defvar-local undo-auto--last-boundary-cause nil "Describe the cause of the last undo-boundary. If `explicit', the last boundary was caused by an explicit call to `undo-boundary', that is one not called by the code in this section. If it is equal to `timer', then the last boundary was inserted by `undo-auto--boundary-timer'. If it is equal to `command', then the last boundary was inserted automatically after a command, that is by the code defined in this section. If it is equal to a list, then the last boundary was inserted by an amalgamating command. The car of the list is the number of times an amalgamating command has been called, and the cdr are the buffers that were changed during the last command.") (defvar undo-auto-current-boundary-timer nil "Current timer which will run `undo-auto--boundary-timer' or nil. If set to non-nil, this will effectively disable the timer.") (defvar undo-auto--this-command-amalgamating nil "Non-nil if `this-command' should be amalgamated. This variable is set to nil by `undo-auto--boundaries' and is set by `undo-auto-amalgamate'." ) (defun undo-auto--needs-boundary-p () "Return non-nil if `buffer-undo-list' needs a boundary at the start." (car-safe buffer-undo-list)) (defun undo-auto--last-boundary-amalgamating-number () "Return the number of amalgamating last commands or nil. Amalgamating commands are, by default, either `self-insert-command' and `delete-char', but can be any command that calls `undo-auto-amalgamate'." (car-safe undo-auto--last-boundary-cause)) (defun undo-auto--ensure-boundary (cause) "Add an `undo-boundary' to the current buffer if needed. REASON describes the reason that the boundary is being added; see `undo-auto--last-boundary' for more information." (when (and (undo-auto--needs-boundary-p)) (let ((last-amalgamating (undo-auto--last-boundary-amalgamating-number))) (undo-boundary) (setq undo-auto--last-boundary-cause (if (eq 'amalgamate cause) (cons (if last-amalgamating (1+ last-amalgamating) 0) undo-auto--undoably-changed-buffers) cause))))) (defun undo-auto--boundaries (cause) "Check recently changed buffers and add a boundary if necessary. REASON describes the reason that the boundary is being added; see `undo-last-boundary' for more information." ;; (Bug #23785) All commands should ensure that there is an undo ;; boundary whether they have changed the current buffer or not. (when (eq cause 'command) (add-to-list 'undo-auto--undoably-changed-buffers (current-buffer))) (dolist (b undo-auto--undoably-changed-buffers) (when (buffer-live-p b) (with-current-buffer b (undo-auto--ensure-boundary cause)))) (setq undo-auto--undoably-changed-buffers nil)) (defun undo-auto--boundary-timer () "Timer function run by `undo-auto-current-boundary-timer'." (setq undo-auto-current-boundary-timer nil) (undo-auto--boundaries 'timer)) (defun undo-auto--boundary-ensure-timer () "Ensure that the `undo-auto-current-boundary-timer' is set." (unless undo-auto-current-boundary-timer (setq undo-auto-current-boundary-timer (run-at-time 10 nil #'undo-auto--boundary-timer)))) (defvar undo-auto--undoably-changed-buffers nil "List of buffers that have changed recently. This list is maintained by `undo-auto--undoable-change' and `undo-auto--boundaries' and can be affected by changes to their default values.") (defun undo-auto--add-boundary () "Add an `undo-boundary' in appropriate buffers." (undo-auto--boundaries (let ((amal undo-auto--this-command-amalgamating)) (setq undo-auto--this-command-amalgamating nil) (if amal 'amalgamate 'command)))) (defun undo-auto-amalgamate () "Amalgamate undo if necessary. This function can be called before an amalgamating command. It removes the previous `undo-boundary' if a series of such calls have been made. By default `self-insert-command' and `delete-char' are the only amalgamating commands, although this function could be called by any command wishing to have this behavior." (let ((last-amalgamating-count (undo-auto--last-boundary-amalgamating-number))) (setq undo-auto--this-command-amalgamating t) (when last-amalgamating-count (if (and (< last-amalgamating-count 20) (eq this-command last-command)) ;; Amalgamate all buffers that have changed. (dolist (b (cdr undo-auto--last-boundary-cause)) (when (buffer-live-p b) (with-current-buffer b (when ;; The head of `buffer-undo-list' is nil. ;; `car-safe' doesn't work because ;; `buffer-undo-list' need not be a list! (and (listp buffer-undo-list) (not (car buffer-undo-list))) (setq buffer-undo-list (cdr buffer-undo-list)))))) (setq undo-auto--last-boundary-cause 0))))) (defun undo-auto--undoable-change () "Called after every undoable buffer change." (add-to-list 'undo-auto--undoably-changed-buffers (current-buffer)) (undo-auto--boundary-ensure-timer)) ;; End auto-boundary section (defun undo-amalgamate-change-group (handle) "Amalgamate changes in change-group since HANDLE. Remove all undo boundaries between the state of HANDLE and now. HANDLE is as returned by `prepare-change-group'." (dolist (elt handle) (with-current-buffer (car elt) (setq elt (cdr elt)) (when (consp buffer-undo-list) (let ((old-car (car-safe elt)) (old-cdr (cdr-safe elt))) (unwind-protect (progn ;; Temporarily truncate the undo log at ELT. (when (consp elt) (setcar elt t) (setcdr elt nil)) (when (or (null elt) ;The undo-log was empty. ;; `elt' is still in the log: normal case. (eq elt (last buffer-undo-list)) ;; `elt' is not in the log any more, but that's because ;; the log is "all new", so we should remove all ;; boundaries from it. (not (eq (last buffer-undo-list) (last old-cdr)))) (cl-callf (lambda (x) (delq nil x)) (if (car buffer-undo-list) buffer-undo-list ;; Preserve the undo-boundaries at either ends of the ;; change-groups. (cdr buffer-undo-list))))) ;; Reset the modified cons cell ELT to its original content. (when (consp elt) (setcar elt old-car) (setcdr elt old-cdr)))))))) (defcustom undo-ask-before-discard nil "If non-nil ask about discarding undo info for the current command. Normally, Emacs discards the undo info for the current command if it exceeds `undo-outer-limit'. But if you set this option non-nil, it asks in the echo area whether to discard the info. If you answer no, there is a slight risk that Emacs might crash, so only do it if you really want to undo the command. This option is mainly intended for debugging. You have to be careful if you use it for other purposes. Garbage collection is inhibited while the question is asked, meaning that Emacs might leak memory. So you should make sure that you do not wait excessively long before answering the question." :type 'boolean :group 'undo :version "22.1") (defvar undo-extra-outer-limit nil "If non-nil, an extra level of size that's ok in an undo item. We don't ask the user about truncating the undo list until the current item gets bigger than this amount. This variable only matters if `undo-ask-before-discard' is non-nil.") (make-variable-buffer-local 'undo-extra-outer-limit) ;; When the first undo batch in an undo list is longer than ;; undo-outer-limit, this function gets called to warn the user that ;; the undo info for the current command was discarded. Garbage ;; collection is inhibited around the call, so it had better not do a ;; lot of consing. (setq undo-outer-limit-function 'undo-outer-limit-truncate) (defun undo-outer-limit-truncate (size) (if undo-ask-before-discard (when (or (null undo-extra-outer-limit) (> size undo-extra-outer-limit)) ;; Don't ask the question again unless it gets even bigger. ;; This applies, in particular, if the user quits from the question. ;; Such a quit quits out of GC, but something else will call GC ;; again momentarily. It will call this function again, ;; but we don't want to ask the question again. (setq undo-extra-outer-limit (+ size 50000)) (if (let (use-dialog-box track-mouse executing-kbd-macro ) (yes-or-no-p (format-message "Buffer `%s' undo info is %d bytes long; discard it? " (buffer-name) size))) (progn (setq buffer-undo-list nil) (setq undo-extra-outer-limit nil) t) nil)) (display-warning '(undo discard-info) (concat (format-message "Buffer `%s' undo info was %d bytes long.\n" (buffer-name) size) "The undo info was discarded because it exceeded \ `undo-outer-limit'. This is normal if you executed a command that made a huge change to the buffer. In that case, to prevent similar problems in the future, set `undo-outer-limit' to a value that is large enough to cover the maximum size of normal changes you expect a single command to make, but not so large that it might exceed the maximum memory allotted to Emacs. If you did not execute any such command, the situation is probably due to a bug and you should report it. You can disable the popping up of this buffer by adding the entry \(undo discard-info) to the user option `warning-suppress-types', which is defined in the `warnings' library.\n") :warning) (setq buffer-undo-list nil) t)) (defcustom password-word-equivalents '("password" "passcode" "passphrase" "pass phrase" ; These are sorted according to the GNU en_US locale. "암호" ; ko "パスワード" ; ja "ପ୍ରବେଶ ସଙ୍କେତ" ; or "ពាក្យសម្ងាត់" ; km "adgangskode" ; da "contraseña" ; es "contrasenya" ; ca "geslo" ; sl "hasło" ; pl "heslo" ; cs, sk "iphasiwedi" ; zu "jelszó" ; hu "lösenord" ; sv "lozinka" ; hr, sr "mật khẩu" ; vi "mot de passe" ; fr "parola" ; tr "pasahitza" ; eu "passord" ; nb "passwort" ; de "pasvorto" ; eo "salasana" ; fi "senha" ; pt "slaptažodis" ; lt "wachtwoord" ; nl "كلمة السر" ; ar "ססמה" ; he "лозинка" ; sr "пароль" ; kk, ru, uk "गुप्तशब्द" ; mr "शब्दकूट" ; hi "પાસવર્ડ" ; gu "సంకేతపదము" ; te "ਪਾਸਵਰਡ" ; pa "ಗುಪ್ತಪದ" ; kn "கடவுச்சொல்" ; ta "അടയാളവാക്ക്" ; ml "গুপ্তশব্দ" ; as "পাসওয়ার্ড" ; bn_IN "රහස්පදය" ; si "密码" ; zh_CN "密碼" ; zh_TW ) "List of words equivalent to \"password\". This is used by Shell mode and other parts of Emacs to recognize password prompts, including prompts in languages other than English. Different case choices should not be assumed to be included; callers should bind `case-fold-search' to t." :type '(repeat string) :version "24.4" :group 'processes) (defvar shell-command-history nil "History list for some commands that read shell commands. Maximum length of the history list is determined by the value of `history-length', which see.") (defvar shell-command-switch (purecopy "-c") "Switch used to have the shell execute its command line argument.") (defvar shell-command-default-error-buffer nil "Buffer name for `shell-command' and `shell-command-on-region' error output. This buffer is used when `shell-command' or `shell-command-on-region' is run interactively. A value of nil means that output to stderr and stdout will be intermixed in the output stream.") (declare-function mailcap-file-default-commands "mailcap" (files)) (declare-function dired-get-filename "dired" (&optional localp no-error-if-not-filep)) (defun minibuffer-default-add-shell-commands () "Return a list of all commands associated with the current file. This function is used to add all related commands retrieved by `mailcap' to the end of the list of defaults just after the default value." (interactive) (let* ((filename (if (listp minibuffer-default) (car minibuffer-default) minibuffer-default)) (commands (and filename (require 'mailcap nil t) (mailcap-file-default-commands (list filename))))) (setq commands (mapcar (lambda (command) (concat command " " filename)) commands)) (if (listp minibuffer-default) (append minibuffer-default commands) (cons minibuffer-default commands)))) (declare-function shell-completion-vars "shell" ()) (defvar minibuffer-local-shell-command-map (let ((map (make-sparse-keymap))) (set-keymap-parent map minibuffer-local-map) (define-key map "\t" 'completion-at-point) map) "Keymap used for completing shell commands in minibuffer.") (defun read-shell-command (prompt &optional initial-contents hist &rest args) "Read a shell command from the minibuffer. The arguments are the same as the ones of `read-from-minibuffer', except READ and KEYMAP are missing and HIST defaults to `shell-command-history'." (require 'shell) (minibuffer-with-setup-hook (lambda () (shell-completion-vars) (set (make-local-variable 'minibuffer-default-add-function) 'minibuffer-default-add-shell-commands)) (apply 'read-from-minibuffer prompt initial-contents minibuffer-local-shell-command-map nil (or hist 'shell-command-history) args))) (defcustom async-shell-command-buffer 'confirm-new-buffer "What to do when the output buffer is used by another shell command. This option specifies how to resolve the conflict where a new command wants to direct its output to the buffer `*Async Shell Command*', but this buffer is already taken by another running shell command. The value `confirm-kill-process' is used to ask for confirmation before killing the already running process and running a new process in the same buffer, `confirm-new-buffer' for confirmation before running the command in a new buffer with a name other than the default buffer name, `new-buffer' for doing the same without confirmation, `confirm-rename-buffer' for confirmation before renaming the existing output buffer and running a new command in the default buffer, `rename-buffer' for doing the same without confirmation." :type '(choice (const :tag "Confirm killing of running command" confirm-kill-process) (const :tag "Confirm creation of a new buffer" confirm-new-buffer) (const :tag "Create a new buffer" new-buffer) (const :tag "Confirm renaming of existing buffer" confirm-rename-buffer) (const :tag "Rename the existing buffer" rename-buffer)) :group 'shell :version "24.3") (defcustom async-shell-command-display-buffer t "Whether to display the command buffer immediately. If t, display the buffer immediately; if nil, wait until there is output." :type '(choice (const :tag "Display buffer immediately" t) (const :tag "Display buffer on output" nil)) :group 'shell :version "26.1") (defun shell-command--save-pos-or-erase () "Store a buffer position or erase the buffer. See `shell-command-dont-erase-buffer'." (let ((sym shell-command-dont-erase-buffer) pos) (setq buffer-read-only nil) ;; Setting buffer-read-only to nil doesn't suffice ;; if some text has a non-nil read-only property, ;; which comint sometimes adds for prompts. (setq pos (cond ((eq sym 'save-point) (point)) ((eq sym 'beg-last-out) (point-max)) ((not sym) (let ((inhibit-read-only t)) (erase-buffer) nil)))) (when pos (goto-char (point-max)) (push (cons (current-buffer) pos) shell-command-saved-pos)))) (defun shell-command--set-point-after-cmd (&optional buffer) "Set point in BUFFER after command complete. BUFFER is the output buffer of the command; if nil, then defaults to the current BUFFER. Set point to the `cdr' of the element in `shell-command-saved-pos' whose `car' is BUFFER." (when shell-command-dont-erase-buffer (let* ((sym shell-command-dont-erase-buffer) (buf (or buffer (current-buffer))) (pos (alist-get buf shell-command-saved-pos))) (setq shell-command-saved-pos (assq-delete-all buf shell-command-saved-pos)) (when (buffer-live-p buf) (let ((win (car (get-buffer-window-list buf))) (pmax (with-current-buffer buf (point-max)))) (unless (and pos (memq sym '(save-point beg-last-out))) (setq pos pmax)) ;; Set point in the window displaying buf, if any; otherwise ;; display buf temporary in selected frame and set the point. (if win (set-window-point win pos) (save-window-excursion (let ((win (display-buffer buf '(nil (inhibit-switch-frame . t))))) (set-window-point win pos))))))))) (defun async-shell-command (command &optional output-buffer error-buffer) "Execute string COMMAND asynchronously in background. Like `shell-command', but adds `&' at the end of COMMAND to execute it asynchronously. The output appears in the buffer `*Async Shell Command*'. That buffer is in shell mode. You can configure `async-shell-command-buffer' to specify what to do when the `*Async Shell Command*' buffer is already taken by another running shell command. To run COMMAND without displaying the output in a window you can configure `display-buffer-alist' to use the action `display-buffer-no-window' for the buffer `*Async Shell Command*'. In Elisp, you will often be better served by calling `start-process' directly, since it offers more control and does not impose the use of a shell (with its need to quote arguments)." (interactive (list (read-shell-command "Async shell command: " nil nil (let ((filename (cond (buffer-file-name) ((eq major-mode 'dired-mode) (dired-get-filename nil t))))) (and filename (file-relative-name filename)))) current-prefix-arg shell-command-default-error-buffer)) (unless (string-match "&[ \t]*\\'" command) (setq command (concat command " &"))) (shell-command command output-buffer error-buffer)) (defun shell-command (command &optional output-buffer error-buffer) "Execute string COMMAND in inferior shell; display output, if any. With prefix argument, insert the COMMAND's output at point. Interactively, prompt for COMMAND in the minibuffer. If COMMAND ends in `&', execute it asynchronously. The output appears in the buffer `*Async Shell Command*'. That buffer is in shell mode. You can also use `async-shell-command' that automatically adds `&'. Otherwise, COMMAND is executed synchronously. The output appears in the buffer `*Shell Command Output*'. If the output is short enough to display in the echo area (which is determined by the variables `resize-mini-windows' and `max-mini-window-height'), it is shown there, but it is nonetheless available in buffer `*Shell Command Output*' even though that buffer is not automatically displayed. To specify a coding system for converting non-ASCII characters in the shell command output, use \\[universal-coding-system-argument] \ before this command. Noninteractive callers can specify coding systems by binding `coding-system-for-read' and `coding-system-for-write'. The optional second argument OUTPUT-BUFFER, if non-nil, says to put the output in some other buffer. If OUTPUT-BUFFER is a buffer or buffer name, erase that buffer and insert the output there; a non-nil value of `shell-command-dont-erase-buffer' prevents the buffer from being erased. If OUTPUT-BUFFER is not a buffer and not nil, insert the output in current buffer after point leaving mark after it. This cannot be done asynchronously. If the command terminates without error, but generates output, and you did not specify \"insert it in the current buffer\", the output can be displayed in the echo area or in its buffer. If the output is short enough to display in the echo area \(determined by the variable `max-mini-window-height' if `resize-mini-windows' is non-nil), it is shown there. Otherwise, the buffer containing the output is displayed. If there is output and an error, and you did not specify \"insert it in the current buffer\", a message about the error goes at the end of the output. If the optional third argument ERROR-BUFFER is non-nil, it is a buffer or buffer name to which to direct the command's standard error output. If it is nil, error output is mingled with regular output. In an interactive call, the variable `shell-command-default-error-buffer' specifies the value of ERROR-BUFFER. In Elisp, you will often be better served by calling `call-process' or `start-process' directly, since they offer more control and do not impose the use of a shell (with its need to quote arguments)." (interactive (list (read-shell-command "Shell command: " nil nil (let ((filename (cond (buffer-file-name) ((eq major-mode 'dired-mode) (dired-get-filename nil t))))) (and filename (file-relative-name filename)))) current-prefix-arg shell-command-default-error-buffer)) ;; Look for a handler in case default-directory is a remote file name. (let ((handler (find-file-name-handler (directory-file-name default-directory) 'shell-command))) (if handler (funcall handler 'shell-command command output-buffer error-buffer) (if (and output-buffer (not (or (bufferp output-buffer) (stringp output-buffer)))) ;; Output goes in current buffer. (let ((error-file (if error-buffer (make-temp-file (expand-file-name "scor" (or small-temporary-file-directory temporary-file-directory))) nil))) (barf-if-buffer-read-only) (push-mark nil t) ;; We do not use -f for csh; we will not support broken use of ;; .cshrcs. Even the BSD csh manual says to use ;; "if ($?prompt) exit" before things which are not useful ;; non-interactively. Besides, if someone wants their other ;; aliases for shell commands then they can still have them. (call-process shell-file-name nil (if error-file (list t error-file) t) nil shell-command-switch command) (when (and error-file (file-exists-p error-file)) (if (< 0 (nth 7 (file-attributes error-file))) (with-current-buffer (get-buffer-create error-buffer) (let ((pos-from-end (- (point-max) (point)))) (or (bobp) (insert "\f\n")) ;; Do no formatting while reading error file, ;; because that can run a shell command, and we ;; don't want that to cause an infinite recursion. (format-insert-file error-file nil) ;; Put point after the inserted errors. (goto-char (- (point-max) pos-from-end))) (display-buffer (current-buffer)))) (delete-file error-file)) ;; This is like exchange-point-and-mark, but doesn't ;; activate the mark. It is cleaner to avoid activation, ;; even though the command loop would deactivate the mark ;; because we inserted text. (goto-char (prog1 (mark t) (set-marker (mark-marker) (point) (current-buffer))))) ;; Output goes in a separate buffer. ;; Preserve the match data in case called from a program. ;; FIXME: It'd be ridiculous for an Elisp function to call ;; shell-command and assume that it won't mess the match-data! (save-match-data (if (string-match "[ \t]*&[ \t]*\\'" command) ;; Command ending with ampersand means asynchronous. (let* ((buffer (get-buffer-create (or output-buffer "*Async Shell Command*"))) (bname (buffer-name buffer)) (directory default-directory) proc) ;; Remove the ampersand. (setq command (substring command 0 (match-beginning 0))) ;; Ask the user what to do with already running process. (setq proc (get-buffer-process buffer)) (when proc (cond ((eq async-shell-command-buffer 'confirm-kill-process) ;; If will kill a process, query first. (if (yes-or-no-p "A command is running in the default buffer. Kill it? ") (kill-process proc) (error "Shell command in progress"))) ((eq async-shell-command-buffer 'confirm-new-buffer) ;; If will create a new buffer, query first. (if (yes-or-no-p "A command is running in the default buffer. Use a new buffer? ") (setq buffer (generate-new-buffer bname)) (error "Shell command in progress"))) ((eq async-shell-command-buffer 'new-buffer) ;; It will create a new buffer. (setq buffer (generate-new-buffer bname))) ((eq async-shell-command-buffer 'confirm-rename-buffer) ;; If will rename the buffer, query first. (if (yes-or-no-p "A command is running in the default buffer. Rename it? ") (progn (with-current-buffer buffer (rename-uniquely)) (setq buffer (get-buffer-create bname))) (error "Shell command in progress"))) ((eq async-shell-command-buffer 'rename-buffer) ;; It will rename the buffer. (with-current-buffer buffer (rename-uniquely)) (setq buffer (get-buffer-create bname))))) (with-current-buffer buffer (shell-command--save-pos-or-erase) (setq default-directory directory) (setq proc (start-process "Shell" buffer shell-file-name shell-command-switch command)) (setq mode-line-process '(":%s")) (require 'shell) (shell-mode) (set-process-sentinel proc 'shell-command-sentinel) ;; Use the comint filter for proper handling of ;; carriage motion (see comint-inhibit-carriage-motion). (set-process-filter proc 'comint-output-filter) (if async-shell-command-display-buffer ;; Display buffer immediately. (display-buffer buffer '(nil (allow-no-window . t))) ;; Defer displaying buffer until first process output. ;; Use disposable named advice so that the buffer is ;; displayed at most once per process lifetime. (let ((nonce (make-symbol "nonce"))) (add-function :before (process-filter proc) (lambda (proc _string) (let ((buf (process-buffer proc))) (when (buffer-live-p buf) (remove-function (process-filter proc) nonce) (display-buffer buf)))) `((name . ,nonce))))))) ;; Otherwise, command is executed synchronously. (shell-command-on-region (point) (point) command output-buffer nil error-buffer))))))) (defun display-message-or-buffer (message &optional buffer-name action frame) "Display MESSAGE in the echo area if possible, otherwise in a pop-up buffer. MESSAGE may be either a string or a buffer. A pop-up buffer is displayed using `display-buffer' if MESSAGE is too long for maximum height of the echo area, as defined by `max-mini-window-height' if `resize-mini-windows' is non-nil. Returns either the string shown in the echo area, or when a pop-up buffer is used, the window used to display it. If MESSAGE is a string, then the optional argument BUFFER-NAME is the name of the buffer used to display it in the case where a pop-up buffer is used, defaulting to `*Message*'. In the case where MESSAGE is a string and it is displayed in the echo area, it is not specified whether the contents are inserted into the buffer anyway. Optional arguments ACTION and FRAME are as for `display-buffer', and are only used if a pop-up buffer is displayed." (cond ((and (stringp message) (not (string-match "\n" message))) ;; Trivial case where we can use the echo area (message "%s" message)) ((and (stringp message) (= (string-match "\n" message) (1- (length message)))) ;; Trivial case where we can just remove single trailing newline (message "%s" (substring message 0 (1- (length message))))) (t ;; General case (with-current-buffer (if (bufferp message) message (get-buffer-create (or buffer-name "*Message*"))) (unless (bufferp message) (erase-buffer) (insert message)) (let ((lines (if (= (buffer-size) 0) 0 (count-screen-lines nil nil nil (minibuffer-window))))) (cond ((= lines 0)) ((and (or (<= lines 1) (<= lines (if resize-mini-windows (cond ((floatp max-mini-window-height) (* (frame-height) max-mini-window-height)) ((integerp max-mini-window-height) max-mini-window-height) (t 1)) 1))) ;; Don't use the echo area if the output buffer is ;; already displayed in the selected frame. (not (get-buffer-window (current-buffer)))) ;; Echo area (goto-char (point-max)) (when (bolp) (backward-char 1)) (message "%s" (buffer-substring (point-min) (point)))) (t ;; Buffer (goto-char (point-min)) (display-buffer (current-buffer) action frame)))))))) ;; We have a sentinel to prevent insertion of a termination message ;; in the buffer itself, and to set the point in the buffer when ;; `shell-command-dont-erase-buffer' is non-nil. (defun shell-command-sentinel (process signal) (when (memq (process-status process) '(exit signal)) (shell-command--set-point-after-cmd (process-buffer process)) (message "%s: %s." (car (cdr (cdr (process-command process)))) (substring signal 0 -1)))) (defun shell-command-on-region (start end command &optional output-buffer replace error-buffer display-error-buffer region-noncontiguous-p) "Execute string COMMAND in inferior shell with region as input. Normally display output (if any) in temp buffer `*Shell Command Output*'; Prefix arg means replace the region with it. Return the exit code of COMMAND. To specify a coding system for converting non-ASCII characters in the input and output to the shell command, use \\[universal-coding-system-argument] before this command. By default, the input (from the current buffer) is encoded using coding-system specified by `process-coding-system-alist', falling back to `default-process-coding-system' if no match for COMMAND is found in `process-coding-system-alist'. Noninteractive callers can specify coding systems by binding `coding-system-for-read' and `coding-system-for-write'. If the command generates output, the output may be displayed in the echo area or in a buffer. If the output is short enough to display in the echo area \(determined by the variable `max-mini-window-height' if `resize-mini-windows' is non-nil), it is shown there. Otherwise it is displayed in the buffer `*Shell Command Output*'. The output is available in that buffer in both cases. If there is output and an error, a message about the error appears at the end of the output. Optional fourth arg OUTPUT-BUFFER specifies where to put the command's output. If the value is a buffer or buffer name, erase that buffer and insert the output there; a non-nil value of `shell-command-dont-erase-buffer' prevent to erase the buffer. If the value is nil, use the buffer `*Shell Command Output*'. Any other non-nil value means to insert the output in the current buffer after START. Optional fifth arg REPLACE, if non-nil, means to insert the output in place of text from START to END, putting point and mark around it. Optional sixth arg ERROR-BUFFER, if non-nil, specifies a buffer or buffer name to which to direct the command's standard error output. If nil, error output is mingled with regular output. When called interactively, `shell-command-default-error-buffer' is used for ERROR-BUFFER. Optional seventh arg DISPLAY-ERROR-BUFFER, if non-nil, means to display the error buffer if there were any errors. When called interactively, this is t." (interactive (let (string) (unless (mark) (user-error "The mark is not set now, so there is no region")) ;; Do this before calling region-beginning ;; and region-end, in case subprocess output ;; relocates them while we are in the minibuffer. (setq string (read-shell-command "Shell command on region: ")) ;; call-interactively recognizes region-beginning and ;; region-end specially, leaving them in the history. (list (region-beginning) (region-end) string current-prefix-arg current-prefix-arg shell-command-default-error-buffer t (region-noncontiguous-p)))) (let ((error-file (if error-buffer (make-temp-file (expand-file-name "scor" (or small-temporary-file-directory temporary-file-directory))) nil)) exit-status) ;; Unless a single contiguous chunk is selected, operate on multiple chunks. (if region-noncontiguous-p (let ((input (concat (funcall region-extract-function 'delete) "\n")) output) (with-temp-buffer (insert input) (call-process-region (point-min) (point-max) shell-file-name t t nil shell-command-switch command) (setq output (split-string (buffer-string) "\n"))) (goto-char start) (funcall region-insert-function output)) (if (or replace (and output-buffer (not (or (bufferp output-buffer) (stringp output-buffer))))) ;; Replace specified region with output from command. (let ((swap (and replace (< start end)))) ;; Don't muck with mark unless REPLACE says we should. (goto-char start) (and replace (push-mark (point) 'nomsg)) (setq exit-status (call-shell-region start end command replace (if error-file (list t error-file) t))) ;; It is rude to delete a buffer which the command is not using. ;; (let ((shell-buffer (get-buffer "*Shell Command Output*"))) ;; (and shell-buffer (not (eq shell-buffer (current-buffer))) ;; (kill-buffer shell-buffer))) ;; Don't muck with mark unless REPLACE says we should. (and replace swap (exchange-point-and-mark))) ;; No prefix argument: put the output in a temp buffer, ;; replacing its entire contents. (let ((buffer (get-buffer-create (or output-buffer "*Shell Command Output*")))) (unwind-protect (if (and (eq buffer (current-buffer)) (or (not shell-command-dont-erase-buffer) (and (not (eq buffer (get-buffer "*Shell Command Output*"))) (not (region-active-p))))) ;; If the input is the same buffer as the output, ;; delete everything but the specified region, ;; then replace that region with the output. (progn (setq buffer-read-only nil) (delete-region (max start end) (point-max)) (delete-region (point-min) (min start end)) (setq exit-status (call-process-region (point-min) (point-max) shell-file-name t (if error-file (list t error-file) t) nil shell-command-switch command))) ;; Clear the output buffer, then run the command with ;; output there. (let ((directory default-directory)) (with-current-buffer buffer (if (not output-buffer) (setq default-directory directory)) (shell-command--save-pos-or-erase))) (setq exit-status (call-shell-region start end command nil (if error-file (list buffer error-file) buffer)))) ;; Report the output. (with-current-buffer buffer (setq mode-line-process (cond ((null exit-status) " - Error") ((stringp exit-status) (format " - Signal [%s]" exit-status)) ((not (equal 0 exit-status)) (format " - Exit [%d]" exit-status))))) (if (with-current-buffer buffer (> (point-max) (point-min))) ;; There's some output, display it (progn (display-message-or-buffer buffer) (shell-command--set-point-after-cmd buffer)) ;; No output; error? (let ((output (if (and error-file (< 0 (nth 7 (file-attributes error-file)))) (format "some error output%s" (if shell-command-default-error-buffer (format " to the \"%s\" buffer" shell-command-default-error-buffer) "")) "no output"))) (cond ((null exit-status) (message "(Shell command failed with error)")) ((equal 0 exit-status) (message "(Shell command succeeded with %s)" output)) ((stringp exit-status) (message "(Shell command killed by signal %s)" exit-status)) (t (message "(Shell command failed with code %d and %s)" exit-status output)))) ;; Don't kill: there might be useful info in the undo-log. ;; (kill-buffer buffer) ))))) (when (and error-file (file-exists-p error-file)) (if (< 0 (nth 7 (file-attributes error-file))) (with-current-buffer (get-buffer-create error-buffer) (let ((pos-from-end (- (point-max) (point)))) (or (bobp) (insert "\f\n")) ;; Do no formatting while reading error file, ;; because that can run a shell command, and we ;; don't want that to cause an infinite recursion. (format-insert-file error-file nil) ;; Put point after the inserted errors. (goto-char (- (point-max) pos-from-end))) (and display-error-buffer (display-buffer (current-buffer))))) (delete-file error-file)) exit-status)) (defun shell-command-to-string (command) "Execute shell command COMMAND and return its output as a string." (with-output-to-string (with-current-buffer standard-output (process-file shell-file-name nil t nil shell-command-switch command)))) (defun process-file (program &optional infile buffer display &rest args) "Process files synchronously in a separate process. Similar to `call-process', but may invoke a file handler based on `default-directory'. The current working directory of the subprocess is `default-directory'. File names in INFILE and BUFFER are handled normally, but file names in ARGS should be relative to `default-directory', as they are passed to the process verbatim. (This is a difference to `call-process' which does not support file handlers for INFILE and BUFFER.) Some file handlers might not support all variants, for example they might behave as if DISPLAY was nil, regardless of the actual value passed." (let ((fh (find-file-name-handler default-directory 'process-file)) lc stderr-file) (unwind-protect (if fh (apply fh 'process-file program infile buffer display args) (when infile (setq lc (file-local-copy infile))) (setq stderr-file (when (and (consp buffer) (stringp (cadr buffer))) (make-temp-file "emacs"))) (prog1 (apply 'call-process program (or lc infile) (if stderr-file (list (car buffer) stderr-file) buffer) display args) (when stderr-file (copy-file stderr-file (cadr buffer) t)))) (when stderr-file (delete-file stderr-file)) (when lc (delete-file lc))))) (defvar process-file-side-effects t "Whether a call of `process-file' changes remote files. By default, this variable is always set to t, meaning that a call of `process-file' could potentially change any file on a remote host. When set to nil, a file handler could optimize its behavior with respect to remote file attribute caching. You should only ever change this variable with a let-binding; never with `setq'.") (defun start-file-process (name buffer program &rest program-args) "Start a program in a subprocess. Return the process object for it. Similar to `start-process', but may invoke a file handler based on `default-directory'. See Info node `(elisp)Magic File Names'. This handler ought to run PROGRAM, perhaps on the local host, perhaps on a remote host that corresponds to `default-directory'. In the latter case, the local part of `default-directory' becomes the working directory of the process. PROGRAM and PROGRAM-ARGS might be file names. They are not objects of file handler invocation. File handlers might not support pty association, if PROGRAM is nil." (let ((fh (find-file-name-handler default-directory 'start-file-process))) (if fh (apply fh 'start-file-process name buffer program program-args) (apply 'start-process name buffer program program-args)))) ;;;; Process menu (defvar tabulated-list-format) (defvar tabulated-list-entries) (defvar tabulated-list-sort-key) (declare-function tabulated-list-init-header "tabulated-list" ()) (declare-function tabulated-list-print "tabulated-list" (&optional remember-pos update)) (defvar process-menu-query-only nil) (defvar process-menu-mode-map (let ((map (make-sparse-keymap))) (define-key map [?d] 'process-menu-delete-process) map)) (define-derived-mode process-menu-mode tabulated-list-mode "Process Menu" "Major mode for listing the processes called by Emacs." (setq tabulated-list-format [("Process" 15 t) ("PID" 7 t) ("Status" 7 t) ("Buffer" 15 t) ("TTY" 12 t) ("Command" 0 t)]) (make-local-variable 'process-menu-query-only) (setq tabulated-list-sort-key (cons "Process" nil)) (add-hook 'tabulated-list-revert-hook 'list-processes--refresh nil t)) (defun process-menu-delete-process () "Kill process at point in a `list-processes' buffer." (interactive) (let ((pos (point))) (delete-process (tabulated-list-get-id)) (revert-buffer) (goto-char (min pos (point-max))) (if (eobp) (forward-line -1) (beginning-of-line)))) (defun list-processes--refresh () "Recompute the list of processes for the Process List buffer. Also, delete any process that is exited or signaled." (setq tabulated-list-entries nil) (dolist (p (process-list)) (cond ((memq (process-status p) '(exit signal closed)) (delete-process p)) ((or (not process-menu-query-only) (process-query-on-exit-flag p)) (let* ((buf (process-buffer p)) (type (process-type p)) (pid (if (process-id p) (format "%d" (process-id p)) "--")) (name (process-name p)) (status (symbol-name (process-status p))) (buf-label (if (buffer-live-p buf) `(,(buffer-name buf) face link help-echo ,(format-message "Visit buffer `%s'" (buffer-name buf)) follow-link t process-buffer ,buf action process-menu-visit-buffer) "--")) (tty (or (process-tty-name p) "--")) (cmd (if (memq type '(network serial)) (let ((contact (process-contact p t))) (if (eq type 'network) (format "(%s %s)" (if (plist-get contact :type) "datagram" "network") (if (plist-get contact :server) (format "server on %s" (or (plist-get contact :host) (plist-get contact :local))) (format "connection to %s" (plist-get contact :host)))) (format "(serial port %s%s)" (or (plist-get contact :port) "?") (let ((speed (plist-get contact :speed))) (if speed (format " at %s b/s" speed) ""))))) (mapconcat 'identity (process-command p) " ")))) (push (list p (vector name pid status buf-label tty cmd)) tabulated-list-entries))))) (tabulated-list-init-header)) (defun process-menu-visit-buffer (button) (display-buffer (button-get button 'process-buffer))) (defun list-processes (&optional query-only buffer) "Display a list of all processes that are Emacs sub-processes. If optional argument QUERY-ONLY is non-nil, only processes with the query-on-exit flag set are listed. Any process listed as exited or signaled is actually eliminated after the listing is made. Optional argument BUFFER specifies a buffer to use, instead of \"*Process List*\". The return value is always nil. This function lists only processes that were launched by Emacs. To see other processes running on the system, use `list-system-processes'." (interactive) (or (fboundp 'process-list) (error "Asynchronous subprocesses are not supported on this system")) (unless (bufferp buffer) (setq buffer (get-buffer-create "*Process List*"))) (with-current-buffer buffer (process-menu-mode) (setq process-menu-query-only query-only) (list-processes--refresh) (tabulated-list-print)) (display-buffer buffer) nil) ;;;; Prefix commands (setq prefix-command--needs-update nil) (setq prefix-command--last-echo nil) (defun internal-echo-keystrokes-prefix () ;; BEWARE: Called directly from C code. ;; If the return value is non-nil, it means we are in the middle of ;; a command with prefix, such as a command invoked with prefix-arg. (if (not prefix-command--needs-update) prefix-command--last-echo (setq prefix-command--last-echo (let ((strs nil)) (run-hook-wrapped 'prefix-command-echo-keystrokes-functions (lambda (fun) (push (funcall fun) strs))) (setq strs (delq nil strs)) (when strs (mapconcat #'identity strs " ")))))) (defvar prefix-command-echo-keystrokes-functions nil "Abnormal hook which constructs the description of the current prefix state. Each function is called with no argument, should return a string or nil.") (defun prefix-command-update () "Update state of prefix commands. Call it whenever you change the \"prefix command state\"." (setq prefix-command--needs-update t)) (defvar prefix-command-preserve-state-hook nil "Normal hook run when a command needs to preserve the prefix.") (defun prefix-command-preserve-state () "Pass the current prefix command state to the next command. Should be called by all prefix commands. Runs `prefix-command-preserve-state-hook'." (run-hooks 'prefix-command-preserve-state-hook) ;; If the current command is a prefix command, we don't want the next (real) ;; command to have `last-command' set to, say, `universal-argument'. (setq this-command last-command) (setq real-this-command real-last-command) (prefix-command-update)) (defun reset-this-command-lengths () (declare (obsolete prefix-command-preserve-state "25.1")) nil) ;;;;; The main prefix command. ;; FIXME: Declaration of `prefix-arg' should be moved here!? (add-hook 'prefix-command-echo-keystrokes-functions #'universal-argument--description) (defun universal-argument--description () (when prefix-arg (concat "C-u" (pcase prefix-arg (`(-) " -") (`(,(and (pred integerp) n)) (let ((str "")) (while (and (> n 4) (= (mod n 4) 0)) (setq str (concat str " C-u")) (setq n (/ n 4))) (if (= n 4) str (format " %s" prefix-arg)))) (_ (format " %s" prefix-arg)))))) (add-hook 'prefix-command-preserve-state-hook #'universal-argument--preserve) (defun universal-argument--preserve () (setq prefix-arg current-prefix-arg)) (defvar universal-argument-map (let ((map (make-sparse-keymap)) (universal-argument-minus ;; For backward compatibility, minus with no modifiers is an ordinary ;; command if digits have already been entered. `(menu-item "" negative-argument :filter ,(lambda (cmd) (if (integerp prefix-arg) nil cmd))))) (define-key map [switch-frame] (lambda (e) (interactive "e") (handle-switch-frame e) (universal-argument--mode))) (define-key map [?\C-u] 'universal-argument-more) (define-key map [?-] universal-argument-minus) (define-key map [?0] 'digit-argument) (define-key map [?1] 'digit-argument) (define-key map [?2] 'digit-argument) (define-key map [?3] 'digit-argument) (define-key map [?4] 'digit-argument) (define-key map [?5] 'digit-argument) (define-key map [?6] 'digit-argument) (define-key map [?7] 'digit-argument) (define-key map [?8] 'digit-argument) (define-key map [?9] 'digit-argument) (define-key map [kp-0] 'digit-argument) (define-key map [kp-1] 'digit-argument) (define-key map [kp-2] 'digit-argument) (define-key map [kp-3] 'digit-argument) (define-key map [kp-4] 'digit-argument) (define-key map [kp-5] 'digit-argument) (define-key map [kp-6] 'digit-argument) (define-key map [kp-7] 'digit-argument) (define-key map [kp-8] 'digit-argument) (define-key map [kp-9] 'digit-argument) (define-key map [kp-subtract] universal-argument-minus) map) "Keymap used while processing \\[universal-argument].") (defun universal-argument--mode () (prefix-command-update) (set-transient-map universal-argument-map nil)) (defun universal-argument () "Begin a numeric argument for the following command. Digits or minus sign following \\[universal-argument] make up the numeric argument. \\[universal-argument] following the digits or minus sign ends the argument. \\[universal-argument] without digits or minus sign provides 4 as argument. Repeating \\[universal-argument] without digits or minus sign multiplies the argument by 4 each time. For some commands, just \\[universal-argument] by itself serves as a flag which is different in effect from any particular numeric argument. These commands include \\[set-mark-command] and \\[start-kbd-macro]." (interactive) (prefix-command-preserve-state) (setq prefix-arg (list 4)) (universal-argument--mode)) (defun universal-argument-more (arg) ;; A subsequent C-u means to multiply the factor by 4 if we've typed ;; nothing but C-u's; otherwise it means to terminate the prefix arg. (interactive "P") (prefix-command-preserve-state) (setq prefix-arg (if (consp arg) (list (* 4 (car arg))) (if (eq arg '-) (list -4) arg))) (when (consp prefix-arg) (universal-argument--mode))) (defun negative-argument (arg) "Begin a negative numeric argument for the next command. \\[universal-argument] following digits or minus sign ends the argument." (interactive "P") (prefix-command-preserve-state) (setq prefix-arg (cond ((integerp arg) (- arg)) ((eq arg '-) nil) (t '-))) (universal-argument--mode)) (defun digit-argument (arg) "Part of the numeric argument for the next command. \\[universal-argument] following digits or minus sign ends the argument." (interactive "P") (prefix-command-preserve-state) (let* ((char (if (integerp last-command-event) last-command-event (get last-command-event 'ascii-character))) (digit (- (logand char ?\177) ?0))) (setq prefix-arg (cond ((integerp arg) (+ (* arg 10) (if (< arg 0) (- digit) digit))) ((eq arg '-) ;; Treat -0 as just -, so that -01 will work. (if (zerop digit) '- (- digit))) (t digit)))) (universal-argument--mode)) (defvar filter-buffer-substring-functions nil "This variable is a wrapper hook around `buffer-substring--filter'. \(See `with-wrapper-hook' for details about wrapper hooks.)") (make-obsolete-variable 'filter-buffer-substring-functions 'filter-buffer-substring-function "24.4") (defvar filter-buffer-substring-function #'buffer-substring--filter "Function to perform the filtering in `filter-buffer-substring'. The function is called with the same 3 arguments (BEG END DELETE) that `filter-buffer-substring' received. It should return the buffer substring between BEG and END, after filtering. If DELETE is non-nil, it should delete the text between BEG and END from the buffer.") (defvar buffer-substring-filters nil "List of filter functions for `buffer-substring--filter'. Each function must accept a single argument, a string, and return a string. The buffer substring is passed to the first function in the list, and the return value of each function is passed to the next. As a special convention, point is set to the start of the buffer text being operated on (i.e., the first argument of `buffer-substring--filter') before these functions are called.") (make-obsolete-variable 'buffer-substring-filters 'filter-buffer-substring-function "24.1") (defun filter-buffer-substring (beg end &optional delete) "Return the buffer substring between BEG and END, after filtering. If DELETE is non-nil, delete the text between BEG and END from the buffer. This calls the function that `filter-buffer-substring-function' specifies \(passing the same three arguments that it received) to do the work, and returns whatever it does. The default function does no filtering, unless a hook has been set. Use `filter-buffer-substring' instead of `buffer-substring', `buffer-substring-no-properties', or `delete-and-extract-region' when you want to allow filtering to take place. For example, major or minor modes can use `filter-buffer-substring-function' to extract characters that are special to a buffer, and should not be copied into other buffers." (funcall filter-buffer-substring-function beg end delete)) (defun buffer-substring--filter (beg end &optional delete) "Default function to use for `filter-buffer-substring-function'. Its arguments and return value are as specified for `filter-buffer-substring'. Also respects the obsolete wrapper hook `filter-buffer-substring-functions' \(see `with-wrapper-hook' for details about wrapper hooks), and the abnormal hook `buffer-substring-filters'. No filtering is done unless a hook says to." (subr--with-wrapper-hook-no-warnings filter-buffer-substring-functions (beg end delete) (cond ((or delete buffer-substring-filters) (save-excursion (goto-char beg) (let ((string (if delete (delete-and-extract-region beg end) (buffer-substring beg end)))) (dolist (filter buffer-substring-filters) (setq string (funcall filter string))) string))) (t (buffer-substring beg end))))) ;;;; Window system cut and paste hooks. (defvar interprogram-cut-function #'gui-select-text "Function to call to make a killed region available to other programs. Most window systems provide a facility for cutting and pasting text between different programs, such as the clipboard on X and MS-Windows, or the pasteboard on Nextstep/Mac OS. This variable holds a function that Emacs calls whenever text is put in the kill ring, to make the new kill available to other programs. The function takes one argument, TEXT, which is a string containing the text which should be made available.") (defvar interprogram-paste-function #'gui-selection-value "Function to call to get text cut from other programs. Most window systems provide a facility for cutting and pasting text between different programs, such as the clipboard on X and MS-Windows, or the pasteboard on Nextstep/Mac OS. This variable holds a function that Emacs calls to obtain text that other programs have provided for pasting. The function is called with no arguments. If no other program has provided text to paste, the function should return nil (in which case the caller, usually `current-kill', should use the top of the Emacs kill ring). If another program has provided text to paste, the function should return that text as a string (in which case the caller should put this string in the kill ring as the latest kill). The function may also return a list of strings if the window system supports multiple selections. The first string will be used as the pasted text, but the other will be placed in the kill ring for easy access via `yank-pop'. Note that the function should return a string only if a program other than Emacs has provided a string for pasting; if Emacs provided the most recent string, the function should return nil. If it is difficult to tell whether Emacs or some other program provided the current string, it is probably good enough to return nil if the string is equal (according to `string=') to the last text Emacs provided.") ;;;; The kill ring data structure. (defvar kill-ring nil "List of killed text sequences. Since the kill ring is supposed to interact nicely with cut-and-paste facilities offered by window systems, use of this variable should interact nicely with `interprogram-cut-function' and `interprogram-paste-function'. The functions `kill-new', `kill-append', and `current-kill' are supposed to implement this interaction; you may want to use them instead of manipulating the kill ring directly.") (defcustom kill-ring-max 60 "Maximum length of kill ring before oldest elements are thrown away." :type 'integer :group 'killing) (defvar kill-ring-yank-pointer nil "The tail of the kill ring whose car is the last thing yanked.") (defcustom save-interprogram-paste-before-kill nil "Save existing clipboard text into kill ring before replacing it. A non-nil value ensures that Emacs kill operations do not irrevocably overwrite existing clipboard text by saving it to the `kill-ring' prior to the kill. Such text can subsequently be retrieved via \\[yank] \\[yank-pop]]." :type 'boolean :group 'killing :version "23.2") (defcustom kill-do-not-save-duplicates nil "Do not add a new string to `kill-ring' if it duplicates the last one. The comparison is done using `equal-including-properties'." :type 'boolean :group 'killing :version "23.2") (defun kill-new (string &optional replace) "Make STRING the latest kill in the kill ring. Set `kill-ring-yank-pointer' to point to it. If `interprogram-cut-function' is non-nil, apply it to STRING. Optional second argument REPLACE non-nil means that STRING will replace the front of the kill ring, rather than being added to the list. When `save-interprogram-paste-before-kill' and `interprogram-paste-function' are non-nil, save the interprogram paste string(s) into `kill-ring' before STRING. When the yank handler has a non-nil PARAM element, the original STRING argument is not used by `insert-for-yank'. However, since Lisp code may access and use elements from the kill ring directly, the STRING argument should still be a \"useful\" string for such uses." (unless (and kill-do-not-save-duplicates ;; Due to text properties such as 'yank-handler that ;; can alter the contents to yank, comparison using ;; `equal' is unsafe. (equal-including-properties string (car kill-ring))) (if (fboundp 'menu-bar-update-yank-menu) (menu-bar-update-yank-menu string (and replace (car kill-ring))))) (when save-interprogram-paste-before-kill (let ((interprogram-paste (and interprogram-paste-function (funcall interprogram-paste-function)))) (when interprogram-paste (dolist (s (if (listp interprogram-paste) (nreverse interprogram-paste) (list interprogram-paste))) (unless (and kill-do-not-save-duplicates (equal-including-properties s (car kill-ring))) (push s kill-ring)))))) (unless (and kill-do-not-save-duplicates (equal-including-properties string (car kill-ring))) (if (and replace kill-ring) (setcar kill-ring string) (push string kill-ring) (if (> (length kill-ring) kill-ring-max) (setcdr (nthcdr (1- kill-ring-max) kill-ring) nil)))) (setq kill-ring-yank-pointer kill-ring) (if interprogram-cut-function (funcall interprogram-cut-function string))) ;; It has been argued that this should work like `self-insert-command' ;; which merges insertions in `buffer-undo-list' in groups of 20 ;; (hard-coded in `undo-auto-amalgamate'). (defcustom kill-append-merge-undo nil "Amalgamate appending kills with the last kill for undo. When non-nil, appending or prepending text to the last kill makes \\[undo] restore both pieces of text simultaneously." :type 'boolean :group 'killing :version "25.1") (defun kill-append (string before-p) "Append STRING to the end of the latest kill in the kill ring. If BEFORE-P is non-nil, prepend STRING to the kill instead. If `interprogram-cut-function' is non-nil, call it with the resulting kill. If `kill-append-merge-undo' is non-nil, remove the last undo boundary in the current buffer." (let* ((cur (car kill-ring))) (kill-new (if before-p (concat string cur) (concat cur string)) (or (= (length cur) 0) (equal nil (get-text-property 0 'yank-handler cur)))) (when (and kill-append-merge-undo (not buffer-read-only)) (let ((prev buffer-undo-list) (next (cdr buffer-undo-list))) ;; find the next undo boundary (while (car next) (pop next) (pop prev)) ;; remove this undo boundary (when prev (setcdr prev (cdr next))))))) (defcustom yank-pop-change-selection nil "Whether rotating the kill ring changes the window system selection. If non-nil, whenever the kill ring is rotated (usually via the `yank-pop' command), Emacs also calls `interprogram-cut-function' to copy the new kill to the window system selection." :type 'boolean :group 'killing :version "23.1") (defun current-kill (n &optional do-not-move) "Rotate the yanking point by N places, and then return that kill. If N is zero and `interprogram-paste-function' is set to a function that returns a string or a list of strings, and if that function doesn't return nil, then that string (or list) is added to the front of the kill ring and the string (or first string in the list) is returned as the latest kill. If N is not zero, and if `yank-pop-change-selection' is non-nil, use `interprogram-cut-function' to transfer the kill at the new yank point into the window system selection. If optional arg DO-NOT-MOVE is non-nil, then don't actually move the yanking point; just return the Nth kill forward." (let ((interprogram-paste (and (= n 0) interprogram-paste-function (funcall interprogram-paste-function)))) (if interprogram-paste (progn ;; Disable the interprogram cut function when we add the new ;; text to the kill ring, so Emacs doesn't try to own the ;; selection, with identical text. (let ((interprogram-cut-function nil)) (if (listp interprogram-paste) (mapc 'kill-new (nreverse interprogram-paste)) (kill-new interprogram-paste))) (car kill-ring)) (or kill-ring (error "Kill ring is empty")) (let ((ARGth-kill-element (nthcdr (mod (- n (length kill-ring-yank-pointer)) (length kill-ring)) kill-ring))) (unless do-not-move (setq kill-ring-yank-pointer ARGth-kill-element) (when (and yank-pop-change-selection (> n 0) interprogram-cut-function) (funcall interprogram-cut-function (car ARGth-kill-element)))) (car ARGth-kill-element))))) ;;;; Commands for manipulating the kill ring. (defcustom kill-read-only-ok nil "Non-nil means don't signal an error for killing read-only text." :type 'boolean :group 'killing) (defun kill-region (beg end &optional region) "Kill (\"cut\") text between point and mark. This deletes the text from the buffer and saves it in the kill ring. The command \\[yank] can retrieve it from there. \(If you want to save the region without killing it, use \\[kill-ring-save].) If you want to append the killed region to the last killed text, use \\[append-next-kill] before \\[kill-region]. Any command that calls this function is a \"kill command\". If the previous command was also a kill command, the text killed this time appends to the text killed last time to make one entry in the kill ring. The killed text is filtered by `filter-buffer-substring' before it is saved in the kill ring, so the actual saved text might be different from what was killed. If the buffer is read-only, Emacs will beep and refrain from deleting the text, but put the text in the kill ring anyway. This means that you can use the killing commands to copy text from a read-only buffer. Lisp programs should use this function for killing text. (To delete text, use `delete-region'.) Supply two arguments, character positions BEG and END indicating the stretch of text to be killed. If the optional argument REGION is non-nil, the function ignores BEG and END, and kills the current region instead." ;; Pass mark first, then point, because the order matters when ;; calling `kill-append'. (interactive (list (mark) (point) 'region)) (unless (and beg end) (user-error "The mark is not set now, so there is no region")) (condition-case nil (let ((string (if region (funcall region-extract-function 'delete) (filter-buffer-substring beg end 'delete)))) (when string ;STRING is nil if BEG = END ;; Add that string to the kill ring, one way or another. (if (eq last-command 'kill-region) (kill-append string (< end beg)) (kill-new string))) (when (or string (eq last-command 'kill-region)) (setq this-command 'kill-region)) (setq deactivate-mark t) nil) ((buffer-read-only text-read-only) ;; The code above failed because the buffer, or some of the characters ;; in the region, are read-only. ;; We should beep, in case the user just isn't aware of this. ;; However, there's no harm in putting ;; the region's text in the kill ring, anyway. (copy-region-as-kill beg end region) ;; Set this-command now, so it will be set even if we get an error. (setq this-command 'kill-region) ;; This should barf, if appropriate, and give us the correct error. (if kill-read-only-ok (progn (message "Read only text copied to kill ring") nil) ;; Signal an error if the buffer is read-only. (barf-if-buffer-read-only) ;; If the buffer isn't read-only, the text is. (signal 'text-read-only (list (current-buffer))))))) ;; copy-region-as-kill no longer sets this-command, because it's confusing ;; to get two copies of the text when the user accidentally types M-w and ;; then corrects it with the intended C-w. (defun copy-region-as-kill (beg end &optional region) "Save the region as if killed, but don't kill it. In Transient Mark mode, deactivate the mark. If `interprogram-cut-function' is non-nil, also save the text for a window system cut and paste. The copied text is filtered by `filter-buffer-substring' before it is saved in the kill ring, so the actual saved text might be different from what was in the buffer. When called from Lisp, save in the kill ring the stretch of text between BEG and END, unless the optional argument REGION is non-nil, in which case ignore BEG and END, and save the current region instead. This command's old key binding has been given to `kill-ring-save'." ;; Pass mark first, then point, because the order matters when ;; calling `kill-append'. (interactive (list (mark) (point) (prefix-numeric-value current-prefix-arg))) (let ((str (if region (funcall region-extract-function nil) (filter-buffer-substring beg end)))) (if (eq last-command 'kill-region) (kill-append str (< end beg)) (kill-new str))) (setq deactivate-mark t) nil) (defun kill-ring-save (beg end &optional region) "Save the region as if killed, but don't kill it. In Transient Mark mode, deactivate the mark. If `interprogram-cut-function' is non-nil, also save the text for a window system cut and paste. If you want to append the killed line to the last killed text, use \\[append-next-kill] before \\[kill-ring-save]. The copied text is filtered by `filter-buffer-substring' before it is saved in the kill ring, so the actual saved text might be different from what was in the buffer. When called from Lisp, save in the kill ring the stretch of text between BEG and END, unless the optional argument REGION is non-nil, in which case ignore BEG and END, and save the current region instead. This command is similar to `copy-region-as-kill', except that it gives visual feedback indicating the extent of the region being copied." ;; Pass mark first, then point, because the order matters when ;; calling `kill-append'. (interactive (list (mark) (point) (prefix-numeric-value current-prefix-arg))) (copy-region-as-kill beg end region) ;; This use of called-interactively-p is correct because the code it ;; controls just gives the user visual feedback. (if (called-interactively-p 'interactive) (indicate-copied-region))) (defun indicate-copied-region (&optional message-len) "Indicate that the region text has been copied interactively. If the mark is visible in the selected window, blink the cursor between point and mark if there is currently no active region highlighting. If the mark lies outside the selected window, display an informative message containing a sample of the copied text. The optional argument MESSAGE-LEN, if non-nil, specifies the length of this sample text; it defaults to 40." (let ((mark (mark t)) (point (point)) ;; Inhibit quitting so we can make a quit here ;; look like a C-g typed as a command. (inhibit-quit t)) (if (pos-visible-in-window-p mark (selected-window)) ;; Swap point-and-mark quickly so as to show the region that ;; was selected. Don't do it if the region is highlighted. (unless (and (region-active-p) (face-background 'region)) ;; Swap point and mark. (set-marker (mark-marker) (point) (current-buffer)) (goto-char mark) (sit-for blink-matching-delay) ;; Swap back. (set-marker (mark-marker) mark (current-buffer)) (goto-char point) ;; If user quit, deactivate the mark ;; as C-g would as a command. (and quit-flag (region-active-p) (deactivate-mark))) (let ((len (min (abs (- mark point)) (or message-len 40)))) (if (< point mark) ;; Don't say "killed"; that is misleading. (message "Saved text until \"%s\"" (buffer-substring-no-properties (- mark len) mark)) (message "Saved text from \"%s\"" (buffer-substring-no-properties mark (+ mark len)))))))) (defun append-next-kill (&optional interactive) "Cause following command, if it kills, to add to previous kill. If the next command kills forward from point, the kill is appended to the previous killed text. If the command kills backward, the kill is prepended. Kill commands that act on the region, such as `kill-region', are regarded as killing forward if point is after mark, and killing backward if point is before mark. If the next command is not a kill command, `append-next-kill' has no effect. The argument is used for internal purposes; do not supply one." (interactive "p") ;; We don't use (interactive-p), since that breaks kbd macros. (if interactive (progn (setq this-command 'kill-region) (message "If the next command is a kill, it will append")) (setq last-command 'kill-region))) (defvar bidi-directional-controls-chars "\x202a-\x202e\x2066-\x2069" "Character set that matches bidirectional formatting control characters.") (defvar bidi-directional-non-controls-chars "^\x202a-\x202e\x2066-\x2069" "Character set that matches any character except bidirectional controls.") (defun squeeze-bidi-context-1 (from to category replacement) "A subroutine of `squeeze-bidi-context'. FROM and TO should be markers, CATEGORY and REPLACEMENT should be strings." (let ((pt (copy-marker from)) (limit (copy-marker to)) (old-pt 0) lim1) (setq lim1 limit) (goto-char pt) (while (< pt limit) (if (> pt old-pt) (move-marker lim1 (save-excursion ;; L and R categories include embedding and ;; override controls, but we don't want to ;; replace them, because that might change ;; the visual order. Likewise with PDF and ;; isolate controls. (+ pt (skip-chars-forward bidi-directional-non-controls-chars limit))))) ;; Replace any run of non-RTL characters by a single LRM. (if (null (re-search-forward category lim1 t)) ;; No more characters of CATEGORY, we are done. (setq pt limit) (replace-match replacement nil t) (move-marker pt (point))) (setq old-pt pt) ;; Skip directional controls, if any. (move-marker pt (+ pt (skip-chars-forward bidi-directional-controls-chars limit)))))) (defun squeeze-bidi-context (from to) "Replace characters between FROM and TO while keeping bidi context. This function replaces the region of text with as few characters as possible, while preserving the effect that region will have on bidirectional display before and after the region." (let ((start (set-marker (make-marker) (if (> from 0) from (+ (point-max) from)))) (end (set-marker (make-marker) to)) ;; This is for when they copy text with read-only text ;; properties. (inhibit-read-only t)) (if (null (marker-position end)) (setq end (point-max-marker))) ;; Replace each run of non-RTL characters with a single LRM. (squeeze-bidi-context-1 start end "\\CR+" "\x200e") ;; Replace each run of non-LTR characters with a single RLM. Note ;; that the \cR category includes both the Arabic Letter (AL) and ;; R characters; here we ignore the distinction between them, ;; because that distinction only affects Arabic Number (AN) ;; characters, which are weak and don't affect the reordering. (squeeze-bidi-context-1 start end "\\CL+" "\x200f"))) (defun line-substring-with-bidi-context (start end &optional no-properties) "Return buffer text between START and END with its bidi context. START and END are assumed to belong to the same physical line of buffer text. This function prepends and appends to the text between START and END bidi control characters that preserve the visual order of that text when it is inserted at some other place." (if (or (< start (point-min)) (> end (point-max))) (signal 'args-out-of-range (list (current-buffer) start end))) (let ((buf (current-buffer)) substr para-dir from to) (save-excursion (goto-char start) (setq para-dir (current-bidi-paragraph-direction)) (setq from (line-beginning-position) to (line-end-position)) (goto-char from) ;; If we don't have any mixed directional characters in the ;; entire line, we can just copy the substring without adding ;; any context. (if (or (looking-at-p "\\CR*$") (looking-at-p "\\CL*$")) (setq substr (if no-properties (buffer-substring-no-properties start end) (buffer-substring start end))) (setq substr (with-temp-buffer (if no-properties (insert-buffer-substring-no-properties buf from to) (insert-buffer-substring buf from to)) (squeeze-bidi-context 1 (1+ (- start from))) (squeeze-bidi-context (- end to) nil) (buffer-substring 1 (point-max))))) ;; Wrap the string in LRI/RLI..PDI pair to achieve 2 effects: ;; (1) force the string to have the same base embedding ;; direction as the paragraph direction at the source, no matter ;; what is the paragraph direction at destination; and (2) avoid ;; affecting the visual order of the surrounding text at ;; destination if there are characters of different ;; directionality there. (concat (if (eq para-dir 'left-to-right) "\x2066" "\x2067") substr "\x2069")))) (defun buffer-substring-with-bidi-context (start end &optional no-properties) "Return portion of current buffer between START and END with bidi context. This function works similar to `buffer-substring', but it prepends and appends to the text bidi directional control characters necessary to preserve the visual appearance of the text if it is inserted at another place. This is useful when the buffer substring includes bidirectional text and control characters that cause non-trivial reordering on display. If copied verbatim, such text can have a very different visual appearance, and can also change the visual appearance of the surrounding text at the destination of the copy. Optional argument NO-PROPERTIES, if non-nil, means copy the text without the text properties." (let (line-end substr) (if (or (< start (point-min)) (> end (point-max))) (signal 'args-out-of-range (list (current-buffer) start end))) (save-excursion (goto-char start) (setq line-end (min end (line-end-position))) (while (< start end) (setq substr (concat substr (if substr "\n" "") (line-substring-with-bidi-context start line-end no-properties))) (forward-line 1) (setq start (point)) (setq line-end (min end (line-end-position)))) substr))) ;; Yanking. (defcustom yank-handled-properties '((font-lock-face . yank-handle-font-lock-face-property) (category . yank-handle-category-property)) "List of special text property handling conditions for yanking. Each element should have the form (PROP . FUN), where PROP is a property symbol and FUN is a function. When the `yank' command inserts text into the buffer, it scans the inserted text for stretches of text that have `eq' values of the text property PROP; for each such stretch of text, FUN is called with three arguments: the property's value in that text, and the start and end positions of the text. This is done prior to removing the properties specified by `yank-excluded-properties'." :group 'killing :type '(repeat (cons (symbol :tag "property symbol") function)) :version "24.3") ;; This is actually used in subr.el but defcustom does not work there. (defcustom yank-excluded-properties '(category field follow-link fontified font-lock-face help-echo intangible invisible keymap local-map mouse-face read-only yank-handler) "Text properties to discard when yanking. The value should be a list of text properties to discard or t, which means to discard all text properties. See also `yank-handled-properties'." :type '(choice (const :tag "All" t) (repeat symbol)) :group 'killing :version "24.3") (defvar yank-window-start nil) (defvar yank-undo-function nil "If non-nil, function used by `yank-pop' to delete last stretch of yanked text. Function is called with two parameters, START and END corresponding to the value of the mark and point; it is guaranteed that START <= END. Normally set from the UNDO element of a yank-handler; see `insert-for-yank'.") (defun yank-pop (&optional arg) "Replace just-yanked stretch of killed text with a different stretch. This command is allowed only immediately after a `yank' or a `yank-pop'. At such a time, the region contains a stretch of reinserted previously-killed text. `yank-pop' deletes that text and inserts in its place a different stretch of killed text. With no argument, the previous kill is inserted. With argument N, insert the Nth previous kill. If N is negative, this is a more recent kill. The sequence of kills wraps around, so that after the oldest one comes the newest one. This command honors the `yank-handled-properties' and `yank-excluded-properties' variables, and the `yank-handler' text property, in the way that `yank' does." (interactive "*p") (if (not (eq last-command 'yank)) (user-error "Previous command was not a yank")) (setq this-command 'yank) (unless arg (setq arg 1)) (let ((inhibit-read-only t) (before (< (point) (mark t)))) (if before (funcall (or yank-undo-function 'delete-region) (point) (mark t)) (funcall (or yank-undo-function 'delete-region) (mark t) (point))) (setq yank-undo-function nil) (set-marker (mark-marker) (point) (current-buffer)) (insert-for-yank (current-kill arg)) ;; Set the window start back where it was in the yank command, ;; if possible. (set-window-start (selected-window) yank-window-start t) (if before ;; This is like exchange-point-and-mark, but doesn't activate the mark. ;; It is cleaner to avoid activation, even though the command ;; loop would deactivate the mark because we inserted text. (goto-char (prog1 (mark t) (set-marker (mark-marker) (point) (current-buffer)))))) nil) (defun yank (&optional arg) "Reinsert (\"paste\") the last stretch of killed text. More precisely, reinsert the most recent kill, which is the stretch of killed text most recently killed OR yanked. Put point at the end, and set mark at the beginning without activating it. With just \\[universal-argument] as argument, put point at beginning, and mark at end. With argument N, reinsert the Nth most recent kill. This command honors the `yank-handled-properties' and `yank-excluded-properties' variables, and the `yank-handler' text property, as described below. Properties listed in `yank-handled-properties' are processed, then those listed in `yank-excluded-properties' are discarded. If STRING has a non-nil `yank-handler' property anywhere, the normal insert behavior is altered, and instead, for each contiguous segment of STRING that has a given value of the `yank-handler' property, that value is used as follows: The value of a `yank-handler' property must be a list of one to four elements, of the form (FUNCTION PARAM NOEXCLUDE UNDO). FUNCTION, if non-nil, should be a function of one argument (the object to insert); FUNCTION is called instead of `insert'. PARAM, if present and non-nil, is passed to FUNCTION (to be handled in whatever way is appropriate; e.g. if FUNCTION is `yank-rectangle', PARAM may be a list of strings to insert as a rectangle). If PARAM is nil, then the current segment of STRING is used. If NOEXCLUDE is present and non-nil, the normal removal of `yank-excluded-properties' is not performed; instead FUNCTION is responsible for the removal. This may be necessary if FUNCTION adjusts point before or after inserting the object. UNDO, if present and non-nil, should be a function to be called by `yank-pop' to undo the insertion of the current PARAM. It is given two arguments, the start and end of the region. FUNCTION may set `yank-undo-function' to override UNDO. See also the command `yank-pop' (\\[yank-pop])." (interactive "*P") (setq yank-window-start (window-start)) ;; If we don't get all the way thru, make last-command indicate that ;; for the following command. (setq this-command t) (push-mark) (insert-for-yank (current-kill (cond ((listp arg) 0) ((eq arg '-) -2) (t (1- arg))))) (if (consp arg) ;; This is like exchange-point-and-mark, but doesn't activate the mark. ;; It is cleaner to avoid activation, even though the command ;; loop would deactivate the mark because we inserted text. (goto-char (prog1 (mark t) (set-marker (mark-marker) (point) (current-buffer))))) ;; If we do get all the way thru, make this-command indicate that. (if (eq this-command t) (setq this-command 'yank)) nil) (defun rotate-yank-pointer (arg) "Rotate the yanking point in the kill ring. With ARG, rotate that many kills forward (or backward, if negative)." (interactive "p") (current-kill arg)) ;; Some kill commands. ;; Internal subroutine of delete-char (defun kill-forward-chars (arg) (if (listp arg) (setq arg (car arg))) (if (eq arg '-) (setq arg -1)) (kill-region (point) (+ (point) arg))) ;; Internal subroutine of backward-delete-char (defun kill-backward-chars (arg) (if (listp arg) (setq arg (car arg))) (if (eq arg '-) (setq arg -1)) (kill-region (point) (- (point) arg))) (defcustom backward-delete-char-untabify-method 'untabify "The method for untabifying when deleting backward. Can be `untabify' -- turn a tab to many spaces, then delete one space; `hungry' -- delete all whitespace, both tabs and spaces; `all' -- delete all whitespace, including tabs, spaces and newlines; nil -- just delete one character." :type '(choice (const untabify) (const hungry) (const all) (const nil)) :version "20.3" :group 'killing) (defun backward-delete-char-untabify (arg &optional killp) "Delete characters backward, changing tabs into spaces. The exact behavior depends on `backward-delete-char-untabify-method'. Delete ARG chars, and kill (save in kill ring) if KILLP is non-nil. Interactively, ARG is the prefix arg (default 1) and KILLP is t if a prefix arg was specified." (interactive "*p\nP") (when (eq backward-delete-char-untabify-method 'untabify) (let ((count arg)) (save-excursion (while (and (> count 0) (not (bobp))) (if (= (preceding-char) ?\t) (let ((col (current-column))) (forward-char -1) (setq col (- col (current-column))) (insert-char ?\s col) (delete-char 1))) (forward-char -1) (setq count (1- count)))))) (let* ((skip (cond ((eq backward-delete-char-untabify-method 'hungry) " \t") ((eq backward-delete-char-untabify-method 'all) " \t\n\r"))) (n (if skip (let* ((oldpt (point)) (wh (- oldpt (save-excursion (skip-chars-backward skip) (constrain-to-field nil oldpt))))) (+ arg (if (zerop wh) 0 (1- wh)))) arg))) ;; Avoid warning about delete-backward-char (with-no-warnings (delete-backward-char n killp)))) (defun zap-to-char (arg char) "Kill up to and including ARGth occurrence of CHAR. Case is ignored if `case-fold-search' is non-nil in the current buffer. Goes backward if ARG is negative; error if CHAR not found." (interactive (list (prefix-numeric-value current-prefix-arg) (read-char "Zap to char: " t))) ;; Avoid "obsolete" warnings for translation-table-for-input. (with-no-warnings (if (char-table-p translation-table-for-input) (setq char (or (aref translation-table-for-input char) char)))) (kill-region (point) (progn (search-forward (char-to-string char) nil nil arg) (point)))) ;; kill-line and its subroutines. (defcustom kill-whole-line nil "If non-nil, `kill-line' with no arg at start of line kills the whole line." :type 'boolean :group 'killing) (defun kill-line (&optional arg) "Kill the rest of the current line; if no nonblanks there, kill thru newline. With prefix argument ARG, kill that many lines from point. Negative arguments kill lines backward. With zero argument, kills the text before point on the current line. When calling from a program, nil means \"no arg\", a number counts as a prefix arg. To kill a whole line, when point is not at the beginning, type \ \\[move-beginning-of-line] \\[kill-line] \\[kill-line]. If `show-trailing-whitespace' is non-nil, this command will just kill the rest of the current line, even if there are no nonblanks there. If option `kill-whole-line' is non-nil, then this command kills the whole line including its terminating newline, when used at the beginning of a line with no argument. As a consequence, you can always kill a whole line by typing \\[move-beginning-of-line] \\[kill-line]. If you want to append the killed line to the last killed text, use \\[append-next-kill] before \\[kill-line]. If the buffer is read-only, Emacs will beep and refrain from deleting the line, but put the line in the kill ring anyway. This means that you can use this command to copy text from a read-only buffer. \(If the variable `kill-read-only-ok' is non-nil, then this won't even beep.)" (interactive "P") (kill-region (point) ;; It is better to move point to the other end of the kill ;; before killing. That way, in a read-only buffer, point ;; moves across the text that is copied to the kill ring. ;; The choice has no effect on undo now that undo records ;; the value of point from before the command was run. (progn (if arg (forward-visible-line (prefix-numeric-value arg)) (if (eobp) (signal 'end-of-buffer nil)) (let ((end (save-excursion (end-of-visible-line) (point)))) (if (or (save-excursion ;; If trailing whitespace is visible, ;; don't treat it as nothing. (unless show-trailing-whitespace (skip-chars-forward " \t" end)) (= (point) end)) (and kill-whole-line (bolp))) (forward-visible-line 1) (goto-char end)))) (point)))) (defun kill-whole-line (&optional arg) "Kill current line. With prefix ARG, kill that many lines starting from the current line. If ARG is negative, kill backward. Also kill the preceding newline. \(This is meant to make \\[repeat] work well with negative arguments.) If ARG is zero, kill current line but exclude the trailing newline." (interactive "p") (or arg (setq arg 1)) (if (and (> arg 0) (eobp) (save-excursion (forward-visible-line 0) (eobp))) (signal 'end-of-buffer nil)) (if (and (< arg 0) (bobp) (save-excursion (end-of-visible-line) (bobp))) (signal 'beginning-of-buffer nil)) (unless (eq last-command 'kill-region) (kill-new "") (setq last-command 'kill-region)) (cond ((zerop arg) ;; We need to kill in two steps, because the previous command ;; could have been a kill command, in which case the text ;; before point needs to be prepended to the current kill ;; ring entry and the text after point appended. Also, we ;; need to use save-excursion to avoid copying the same text ;; twice to the kill ring in read-only buffers. (save-excursion (kill-region (point) (progn (forward-visible-line 0) (point)))) (kill-region (point) (progn (end-of-visible-line) (point)))) ((< arg 0) (save-excursion (kill-region (point) (progn (end-of-visible-line) (point)))) (kill-region (point) (progn (forward-visible-line (1+ arg)) (unless (bobp) (backward-char)) (point)))) (t (save-excursion (kill-region (point) (progn (forward-visible-line 0) (point)))) (kill-region (point) (progn (forward-visible-line arg) (point)))))) (defun forward-visible-line (arg) "Move forward by ARG lines, ignoring currently invisible newlines only. If ARG is negative, move backward -ARG lines. If ARG is zero, move to the beginning of the current line." (condition-case nil (if (> arg 0) (progn (while (> arg 0) (or (zerop (forward-line 1)) (signal 'end-of-buffer nil)) ;; If the newline we just skipped is invisible, ;; don't count it. (let ((prop (get-char-property (1- (point)) 'invisible))) (if (if (eq buffer-invisibility-spec t) prop (or (memq prop buffer-invisibility-spec) (assq prop buffer-invisibility-spec))) (setq arg (1+ arg)))) (setq arg (1- arg))) ;; If invisible text follows, and it is a number of complete lines, ;; skip it. (let ((opoint (point))) (while (and (not (eobp)) (let ((prop (get-char-property (point) 'invisible))) (if (eq buffer-invisibility-spec t) prop (or (memq prop buffer-invisibility-spec) (assq prop buffer-invisibility-spec))))) (goto-char (if (get-text-property (point) 'invisible) (or (next-single-property-change (point) 'invisible) (point-max)) (next-overlay-change (point))))) (unless (bolp) (goto-char opoint)))) (let ((first t)) (while (or first (<= arg 0)) (if first (beginning-of-line) (or (zerop (forward-line -1)) (signal 'beginning-of-buffer nil))) ;; If the newline we just moved to is invisible, ;; don't count it. (unless (bobp) (let ((prop (get-char-property (1- (point)) 'invisible))) (unless (if (eq buffer-invisibility-spec t) prop (or (memq prop buffer-invisibility-spec) (assq prop buffer-invisibility-spec))) (setq arg (1+ arg))))) (setq first nil)) ;; If invisible text follows, and it is a number of complete lines, ;; skip it. (let ((opoint (point))) (while (and (not (bobp)) (let ((prop (get-char-property (1- (point)) 'invisible))) (if (eq buffer-invisibility-spec t) prop (or (memq prop buffer-invisibility-spec) (assq prop buffer-invisibility-spec))))) (goto-char (if (get-text-property (1- (point)) 'invisible) (or (previous-single-property-change (point) 'invisible) (point-min)) (previous-overlay-change (point))))) (unless (bolp) (goto-char opoint))))) ((beginning-of-buffer end-of-buffer) nil))) (defun end-of-visible-line () "Move to end of current visible line." (end-of-line) ;; If the following character is currently invisible, ;; skip all characters with that same `invisible' property value, ;; then find the next newline. (while (and (not (eobp)) (save-excursion (skip-chars-forward "^\n") (let ((prop (get-char-property (point) 'invisible))) (if (eq buffer-invisibility-spec t) prop (or (memq prop buffer-invisibility-spec) (assq prop buffer-invisibility-spec)))))) (skip-chars-forward "^\n") (if (get-text-property (point) 'invisible) (goto-char (or (next-single-property-change (point) 'invisible) (point-max))) (goto-char (next-overlay-change (point)))) (end-of-line))) (defun kill-current-buffer () "Kill the current buffer. When called in the minibuffer, get out of the minibuffer using `abort-recursive-edit'. This is like `kill-this-buffer', but it doesn't have to be invoked via the menu bar, and pays no attention to the menu-bar's frame." (interactive) (let ((frame (selected-frame))) (if (and (frame-live-p frame) (not (window-minibuffer-p (frame-selected-window frame)))) (kill-buffer (current-buffer)) (abort-recursive-edit)))) (defun insert-buffer (buffer) "Insert after point the contents of BUFFER. Puts mark after the inserted text. BUFFER may be a buffer or a buffer name." (declare (interactive-only insert-buffer-substring)) (interactive (list (progn (barf-if-buffer-read-only) (read-buffer "Insert buffer: " (if (eq (selected-window) (next-window)) (other-buffer (current-buffer)) (window-buffer (next-window))) t)))) (push-mark (save-excursion (insert-buffer-substring (get-buffer buffer)) (point))) nil) (defun append-to-buffer (buffer start end) "Append to specified buffer the text of the region. It is inserted into that buffer before its point. When calling from a program, give three arguments: BUFFER (or buffer name), START and END. START and END specify the portion of the current buffer to be copied." (interactive (list (read-buffer "Append to buffer: " (other-buffer (current-buffer) t)) (region-beginning) (region-end))) (let* ((oldbuf (current-buffer)) (append-to (get-buffer-create buffer)) (windows (get-buffer-window-list append-to t t)) point) (save-excursion (with-current-buffer append-to (setq point (point)) (barf-if-buffer-read-only) (insert-buffer-substring oldbuf start end) (dolist (window windows) (when (= (window-point window) point) (set-window-point window (point)))))))) (defun prepend-to-buffer (buffer start end) "Prepend to specified buffer the text of the region. It is inserted into that buffer after its point. When calling from a program, give three arguments: BUFFER (or buffer name), START and END. START and END specify the portion of the current buffer to be copied." (interactive "BPrepend to buffer: \nr") (let ((oldbuf (current-buffer))) (with-current-buffer (get-buffer-create buffer) (barf-if-buffer-read-only) (save-excursion (insert-buffer-substring oldbuf start end))))) (defun copy-to-buffer (buffer start end) "Copy to specified buffer the text of the region. It is inserted into that buffer, replacing existing text there. When calling from a program, give three arguments: BUFFER (or buffer name), START and END. START and END specify the portion of the current buffer to be copied." (interactive "BCopy to buffer: \nr") (let ((oldbuf (current-buffer))) (with-current-buffer (get-buffer-create buffer) (barf-if-buffer-read-only) (erase-buffer) (save-excursion (insert-buffer-substring oldbuf start end))))) (define-error 'mark-inactive (purecopy "The mark is not active now")) (defvar activate-mark-hook nil "Hook run when the mark becomes active. It is also run at the end of a command, if the mark is active and it is possible that the region may have changed.") (defvar deactivate-mark-hook nil "Hook run when the mark becomes inactive.") (defun mark (&optional force) "Return this buffer's mark value as integer, or nil if never set. In Transient Mark mode, this function signals an error if the mark is not active. However, if `mark-even-if-inactive' is non-nil, or the argument FORCE is non-nil, it disregards whether the mark is active, and returns an integer or nil in the usual way. If you are using this in an editing command, you are most likely making a mistake; see the documentation of `set-mark'." (if (or force (not transient-mark-mode) mark-active mark-even-if-inactive) (marker-position (mark-marker)) (signal 'mark-inactive nil))) ;; Behind display-selections-p. (defun deactivate-mark (&optional force) "Deactivate the mark. If Transient Mark mode is disabled, this function normally does nothing; but if FORCE is non-nil, it deactivates the mark anyway. Deactivating the mark sets `mark-active' to nil, updates the primary selection according to `select-active-regions', and runs `deactivate-mark-hook'. If Transient Mark mode was temporarily enabled, reset the value of the variable `transient-mark-mode'; if this causes Transient Mark mode to be disabled, don't change `mark-active' to nil or run `deactivate-mark-hook'." (when (or (region-active-p) force) (when (and (if (eq select-active-regions 'only) (eq (car-safe transient-mark-mode) 'only) select-active-regions) (region-active-p) (display-selections-p)) ;; The var `saved-region-selection', if non-nil, is the text in ;; the region prior to the last command modifying the buffer. ;; Set the selection to that, or to the current region. (cond (saved-region-selection (if (gui-backend-selection-owner-p 'PRIMARY) (gui-set-selection 'PRIMARY saved-region-selection)) (setq saved-region-selection nil)) ;; If another program has acquired the selection, region ;; deactivation should not clobber it (Bug#11772). ((and (/= (region-beginning) (region-end)) (or (gui-backend-selection-owner-p 'PRIMARY) (null (gui-backend-selection-exists-p 'PRIMARY)))) (gui-set-selection 'PRIMARY (funcall region-extract-function nil))))) (when mark-active (force-mode-line-update)) ;Refresh toolbar (bug#16382). (cond ((eq (car-safe transient-mark-mode) 'only) (setq transient-mark-mode (cdr transient-mark-mode)) (if (eq transient-mark-mode (default-value 'transient-mark-mode)) (kill-local-variable 'transient-mark-mode))) ((eq transient-mark-mode 'lambda) (kill-local-variable 'transient-mark-mode))) (setq mark-active nil) (run-hooks 'deactivate-mark-hook) (redisplay--update-region-highlight (selected-window)))) (defun activate-mark (&optional no-tmm) "Activate the mark. If NO-TMM is non-nil, leave `transient-mark-mode' alone." (when (mark t) (unless (region-active-p) (force-mode-line-update) ;Refresh toolbar (bug#16382). (setq mark-active t) (unless (or transient-mark-mode no-tmm) (setq-local transient-mark-mode 'lambda)) (run-hooks 'activate-mark-hook)))) (defun set-mark (pos) "Set this buffer's mark to POS. Don't use this function! That is to say, don't use this function unless you want the user to see that the mark has moved, and you want the previous mark position to be lost. Normally, when a new mark is set, the old one should go on the stack. This is why most applications should use `push-mark', not `set-mark'. Novice Emacs Lisp programmers often try to use the mark for the wrong purposes. The mark saves a location for the user's convenience. Most editing commands should not alter the mark. To remember a location for internal use in the Lisp program, store it in a Lisp variable. Example: (let ((beg (point))) (forward-line 1) (delete-region beg (point)))." (if pos (progn (set-marker (mark-marker) pos (current-buffer)) (activate-mark 'no-tmm)) ;; Normally we never clear mark-active except in Transient Mark mode. ;; But when we actually clear out the mark value too, we must ;; clear mark-active in any mode. (deactivate-mark t) ;; `deactivate-mark' sometimes leaves mark-active non-nil, but ;; it should never be nil if the mark is nil. (setq mark-active nil) (set-marker (mark-marker) nil))) (defun save-mark-and-excursion--save () (cons (let ((mark (mark-marker))) (and (marker-position mark) (copy-marker mark))) mark-active)) (defun save-mark-and-excursion--restore (saved-mark-info) (let ((saved-mark (car saved-mark-info)) (omark (marker-position (mark-marker))) (nmark nil) (saved-mark-active (cdr saved-mark-info))) ;; Mark marker (if (null saved-mark) (set-marker (mark-marker) nil) (setf nmark (marker-position saved-mark)) (set-marker (mark-marker) nmark) (set-marker saved-mark nil)) ;; Mark active (let ((cur-mark-active mark-active)) (setq mark-active saved-mark-active) ;; If mark is active now, and either was not active or was at a ;; different place, run the activate hook. (if saved-mark-active (when (or (not cur-mark-active) (not (eq omark nmark))) (run-hooks 'activate-mark-hook)) ;; If mark has ceased to be active, run deactivate hook. (when cur-mark-active (run-hooks 'deactivate-mark-hook)))))) (defmacro save-mark-and-excursion (&rest body) "Like `save-excursion', but also save and restore the mark state. This macro does what `save-excursion' did before Emacs 25.1." (declare (indent 0) (debug t)) (let ((saved-marker-sym (make-symbol "saved-marker"))) `(let ((,saved-marker-sym (save-mark-and-excursion--save))) (unwind-protect (save-excursion ,@body) (save-mark-and-excursion--restore ,saved-marker-sym))))) (defcustom use-empty-active-region nil "Whether \"region-aware\" commands should act on empty regions. If nil, region-aware commands treat the empty region as inactive. If non-nil, region-aware commands treat the region as active as long as the mark is active, even if the region is empty. Region-aware commands are those that act on the region if it is active and Transient Mark mode is enabled, and on the text near point otherwise." :type 'boolean :version "23.1" :group 'editing-basics) (defun use-region-p () "Return t if the region is active and it is appropriate to act on it. This is used by commands that act specially on the region under Transient Mark mode. The return value is t if Transient Mark mode is enabled and the mark is active; furthermore, if `use-empty-active-region' is nil, the region must not be empty. Otherwise, the return value is nil. For some commands, it may be appropriate to ignore the value of `use-empty-active-region'; in that case, use `region-active-p'." (and (region-active-p) (or use-empty-active-region (> (region-end) (region-beginning))))) (defun region-active-p () "Return non-nil if Transient Mark mode is enabled and the mark is active. Some commands act specially on the region when Transient Mark mode is enabled. Usually, such commands should use `use-region-p' instead of this function, because `use-region-p' also checks the value of `use-empty-active-region'." (and transient-mark-mode mark-active ;; FIXME: Somehow we sometimes end up with mark-active non-nil but ;; without the mark being set (e.g. bug#17324). We really should fix ;; that problem, but in the mean time, let's make sure we don't say the ;; region is active when there's no mark. (progn (cl-assert (mark)) t))) (defun region-bounds () "Return the boundaries of the region as a pair of positions. Value is a list of cons cells of the form (START . END)." (funcall region-extract-function 'bounds)) (defun region-noncontiguous-p () "Return non-nil if the region contains several pieces. An example is a rectangular region handled as a list of separate contiguous regions for each line." (> (length (region-bounds)) 1)) (defvar redisplay-unhighlight-region-function (lambda (rol) (when (overlayp rol) (delete-overlay rol)))) (defvar redisplay-highlight-region-function (lambda (start end window rol) (if (not (overlayp rol)) (let ((nrol (make-overlay start end))) (funcall redisplay-unhighlight-region-function rol) (overlay-put nrol 'window window) (overlay-put nrol 'face 'region) ;; Normal priority so that a large region doesn't hide all the ;; overlays within it, but high secondary priority so that if it ;; ends/starts in the middle of a small overlay, that small overlay ;; won't hide the region's boundaries. (overlay-put nrol 'priority '(nil . 100)) nrol) (unless (and (eq (overlay-buffer rol) (current-buffer)) (eq (overlay-start rol) start) (eq (overlay-end rol) end)) (move-overlay rol start end (current-buffer))) rol))) (defun redisplay--update-region-highlight (window) (let ((rol (window-parameter window 'internal-region-overlay))) (if (not (and (region-active-p) (or highlight-nonselected-windows (eq window (selected-window)) (and (window-minibuffer-p) (eq window (minibuffer-selected-window)))))) (funcall redisplay-unhighlight-region-function rol) (let* ((pt (window-point window)) (mark (mark)) (start (min pt mark)) (end (max pt mark)) (new (funcall redisplay-highlight-region-function start end window rol))) (unless (equal new rol) (set-window-parameter window 'internal-region-overlay new)))))) (defvar pre-redisplay-functions (list #'redisplay--update-region-highlight) "Hook run just before redisplay. It is called in each window that is to be redisplayed. It takes one argument, which is the window that will be redisplayed. When run, the `current-buffer' is set to the buffer displayed in that window.") (defun redisplay--pre-redisplay-functions (windows) (with-demoted-errors "redisplay--pre-redisplay-functions: %S" (if (null windows) (with-current-buffer (window-buffer (selected-window)) (run-hook-with-args 'pre-redisplay-functions (selected-window))) (dolist (win (if (listp windows) windows (window-list-1 nil nil t))) (with-current-buffer (window-buffer win) (run-hook-with-args 'pre-redisplay-functions win)))))) (add-function :before pre-redisplay-function #'redisplay--pre-redisplay-functions) (defvar-local mark-ring nil "The list of former marks of the current buffer, most recent first.") (put 'mark-ring 'permanent-local t) (defcustom mark-ring-max 16 "Maximum size of mark ring. Start discarding off end if gets this big." :type 'integer :group 'editing-basics) (defvar global-mark-ring nil "The list of saved global marks, most recent first.") (defcustom global-mark-ring-max 16 "Maximum size of global mark ring. \ Start discarding off end if gets this big." :type 'integer :group 'editing-basics) (defun pop-to-mark-command () "Jump to mark, and pop a new position for mark off the ring. \(Does not affect global mark ring)." (interactive) (if (null (mark t)) (user-error "No mark set in this buffer") (if (= (point) (mark t)) (message "Mark popped")) (goto-char (mark t)) (pop-mark))) (defun push-mark-command (arg &optional nomsg) "Set mark at where point is. If no prefix ARG and mark is already set there, just activate it. Display `Mark set' unless the optional second arg NOMSG is non-nil." (interactive "P") (let ((mark (mark t))) (if (or arg (null mark) (/= mark (point))) (push-mark nil nomsg t) (activate-mark 'no-tmm) (unless nomsg (message "Mark activated"))))) (defcustom set-mark-command-repeat-pop nil "Non-nil means repeating \\[set-mark-command] after popping mark pops it again. That means that C-u \\[set-mark-command] \\[set-mark-command] will pop the mark twice, and C-u \\[set-mark-command] \\[set-mark-command] \\[set-mark-command] will pop the mark three times. A value of nil means \\[set-mark-command]'s behavior does not change after C-u \\[set-mark-command]." :type 'boolean :group 'editing-basics) (defun set-mark-command (arg) "Set the mark where point is, and activate it; or jump to the mark. Setting the mark also alters the region, which is the text between point and mark; this is the closest equivalent in Emacs to what some editors call the \"selection\". With no prefix argument, set the mark at point, and push the old mark position on local mark ring. Also push the new mark on global mark ring, if the previous mark was set in another buffer. When Transient Mark Mode is off, immediately repeating this command activates `transient-mark-mode' temporarily. With prefix argument (e.g., \\[universal-argument] \\[set-mark-command]), \ jump to the mark, and set the mark from position popped off the local mark ring (this does not affect the global mark ring). Use \\[pop-global-mark] to jump to a mark popped off the global mark ring (see `pop-global-mark'). If `set-mark-command-repeat-pop' is non-nil, repeating the \\[set-mark-command] command with no prefix argument pops the next position off the local (or global) mark ring and jumps there. With \\[universal-argument] \\[universal-argument] as prefix argument, unconditionally set mark where point is, even if `set-mark-command-repeat-pop' is non-nil. Novice Emacs Lisp programmers often try to use the mark for the wrong purposes. See the documentation of `set-mark' for more information." (interactive "P") (cond ((eq transient-mark-mode 'lambda) (kill-local-variable 'transient-mark-mode)) ((eq (car-safe transient-mark-mode) 'only) (deactivate-mark))) (cond ((and (consp arg) (> (prefix-numeric-value arg) 4)) (push-mark-command nil)) ((not (eq this-command 'set-mark-command)) (if arg (pop-to-mark-command) (push-mark-command t))) ((and set-mark-command-repeat-pop (eq last-command 'pop-global-mark) (not arg)) (setq this-command 'pop-global-mark) (pop-global-mark)) ((or (and set-mark-command-repeat-pop (eq last-command 'pop-to-mark-command)) arg) (setq this-command 'pop-to-mark-command) (pop-to-mark-command)) ((eq last-command 'set-mark-command) (if (region-active-p) (progn (deactivate-mark) (message "Mark deactivated")) (activate-mark) (message "Mark activated"))) (t (push-mark-command nil)))) (defun push-mark (&optional location nomsg activate) "Set mark at LOCATION (point, by default) and push old mark on mark ring. If the last global mark pushed was not in the current buffer, also push LOCATION on the global mark ring. Display `Mark set' unless the optional second arg NOMSG is non-nil. Novice Emacs Lisp programmers often try to use the mark for the wrong purposes. See the documentation of `set-mark' for more information. In Transient Mark mode, activate mark if optional third arg ACTIVATE non-nil." (unless (null (mark t)) (setq mark-ring (cons (copy-marker (mark-marker)) mark-ring)) (when (> (length mark-ring) mark-ring-max) (move-marker (car (nthcdr mark-ring-max mark-ring)) nil) (setcdr (nthcdr (1- mark-ring-max) mark-ring) nil))) (set-marker (mark-marker) (or location (point)) (current-buffer)) ;; Now push the mark on the global mark ring. (if (and global-mark-ring (eq (marker-buffer (car global-mark-ring)) (current-buffer))) ;; The last global mark pushed was in this same buffer. ;; Don't push another one. nil (setq global-mark-ring (cons (copy-marker (mark-marker)) global-mark-ring)) (when (> (length global-mark-ring) global-mark-ring-max) (move-marker (car (nthcdr global-mark-ring-max global-mark-ring)) nil) (setcdr (nthcdr (1- global-mark-ring-max) global-mark-ring) nil))) (or nomsg executing-kbd-macro (> (minibuffer-depth) 0) (message "Mark set")) (if (or activate (not transient-mark-mode)) (set-mark (mark t))) nil) (defun pop-mark () "Pop off mark ring into the buffer's actual mark. Does not set point. Does nothing if mark ring is empty." (when mark-ring (setq mark-ring (nconc mark-ring (list (copy-marker (mark-marker))))) (set-marker (mark-marker) (+ 0 (car mark-ring)) (current-buffer)) (move-marker (car mark-ring) nil) (if (null (mark t)) (ding)) (setq mark-ring (cdr mark-ring))) (deactivate-mark)) ;; The parser cannot handle a newline after def*. ;; This bug is already recorded in ;; parser-lisp.r/newline-between-tokens.b/ ;; (define-obsolete-function-alias ;; 'exchange-dot-and-mark 'exchange-point-and-mark "23.3") (define-obsolete-function-alias 'exchange-dot-and-mark 'exchange-point-and-mark "23.3") (defun exchange-point-and-mark (&optional arg) "Put the mark where point is now, and point where the mark is now. This command works even when the mark is not active, and it reactivates the mark. If Transient Mark mode is on, a prefix ARG deactivates the mark if it is active, and otherwise avoids reactivating it. If Transient Mark mode is off, a prefix ARG enables Transient Mark mode temporarily." (interactive "P") (let ((omark (mark t)) (temp-highlight (eq (car-safe transient-mark-mode) 'only))) (if (null omark) (user-error "No mark set in this buffer")) (set-mark (point)) (goto-char omark) (cond (temp-highlight (setq-local transient-mark-mode (cons 'only transient-mark-mode))) ((or (and arg (region-active-p)) ; (xor arg (not (region-active-p))) (not (or arg (region-active-p)))) (deactivate-mark)) (t (activate-mark))) nil)) (defcustom shift-select-mode t "When non-nil, shifted motion keys activate the mark momentarily. While the mark is activated in this way, any shift-translated point motion key extends the region, and if Transient Mark mode was off, it is temporarily turned on. Furthermore, the mark will be deactivated by any subsequent point motion key that was not shift-translated, or by any action that normally deactivates the mark in Transient Mark mode. See `this-command-keys-shift-translated' for the meaning of shift-translation." :type 'boolean :group 'editing-basics) (defun handle-shift-selection () "Activate/deactivate mark depending on invocation thru shift translation. This function is called by `call-interactively' when a command with a `^' character in its `interactive' spec is invoked, before running the command itself. If `shift-select-mode' is enabled and the command was invoked through shift translation, set the mark and activate the region temporarily, unless it was already set in this way. See `this-command-keys-shift-translated' for the meaning of shift translation. Otherwise, if the region has been activated temporarily, deactivate it, and restore the variable `transient-mark-mode' to its earlier value." (cond ((and shift-select-mode this-command-keys-shift-translated) (unless (and mark-active (eq (car-safe transient-mark-mode) 'only)) (setq-local transient-mark-mode (cons 'only (unless (eq transient-mark-mode 'lambda) transient-mark-mode))) (push-mark nil nil t))) ((eq (car-safe transient-mark-mode) 'only) (setq transient-mark-mode (cdr transient-mark-mode)) (if (eq transient-mark-mode (default-value 'transient-mark-mode)) (kill-local-variable 'transient-mark-mode)) (deactivate-mark)))) (define-minor-mode transient-mark-mode "Toggle Transient Mark mode. With a prefix argument ARG, enable Transient Mark mode if ARG is positive, and disable it otherwise. If called from Lisp, enable Transient Mark mode if ARG is omitted or nil. Transient Mark mode is a global minor mode. When enabled, the region is highlighted with the `region' face whenever the mark is active. The mark is \"deactivated\" by changing the buffer, and after certain other operations that set the mark but whose main purpose is something else--for example, incremental search, \\[beginning-of-buffer], and \\[end-of-buffer]. You can also deactivate the mark by typing \\[keyboard-quit] or \\[keyboard-escape-quit]. Many commands change their behavior when Transient Mark mode is in effect and the mark is active, by acting on the region instead of their usual default part of the buffer's text. Examples of such commands include \\[comment-dwim], \\[flush-lines], \\[keep-lines], \\[query-replace], \\[query-replace-regexp], \\[ispell], and \\[undo]. To see the documentation of commands which are sensitive to the Transient Mark mode, invoke \\[apropos-documentation] and type \"transient\" or \"mark.*active\" at the prompt." :global t ;; It's defined in C/cus-start, this stops the d-m-m macro defining it again. :variable (default-value 'transient-mark-mode)) (defvar widen-automatically t "Non-nil means it is ok for commands to call `widen' when they want to. Some commands will do this in order to go to positions outside the current accessible part of the buffer. If `widen-automatically' is nil, these commands will do something else as a fallback, and won't change the buffer bounds.") (defvar non-essential nil "Whether the currently executing code is performing an essential task. This variable should be non-nil only when running code which should not disturb the user. E.g. it can be used to prevent Tramp from prompting the user for a password when we are simply scanning a set of files in the background or displaying possible completions before the user even asked for it.") (defun pop-global-mark () "Pop off global mark ring and jump to the top location." (interactive) ;; Pop entries which refer to non-existent buffers. (while (and global-mark-ring (not (marker-buffer (car global-mark-ring)))) (setq global-mark-ring (cdr global-mark-ring))) (or global-mark-ring (error "No global mark set")) (let* ((marker (car global-mark-ring)) (buffer (marker-buffer marker)) (position (marker-position marker))) (setq global-mark-ring (nconc (cdr global-mark-ring) (list (car global-mark-ring)))) (set-buffer buffer) (or (and (>= position (point-min)) (<= position (point-max))) (if widen-automatically (widen) (error "Global mark position is outside accessible part of buffer"))) (goto-char position) (switch-to-buffer buffer))) (defcustom next-line-add-newlines nil "If non-nil, `next-line' inserts newline to avoid `end of buffer' error." :type 'boolean :version "21.1" :group 'editing-basics) (defun next-line (&optional arg try-vscroll) "Move cursor vertically down ARG lines. Interactively, vscroll tall lines if `auto-window-vscroll' is enabled. Non-interactively, use TRY-VSCROLL to control whether to vscroll tall lines: if either `auto-window-vscroll' or TRY-VSCROLL is nil, this function will not vscroll. ARG defaults to 1. If there is no character in the target line exactly under the current column, the cursor is positioned after the character in that line which spans this column, or at the end of the line if it is not long enough. If there is no line in the buffer after this one, behavior depends on the value of `next-line-add-newlines'. If non-nil, it inserts a newline character to create a line, and moves the cursor to that line. Otherwise it moves the cursor to the end of the buffer. If the variable `line-move-visual' is non-nil, this command moves by display lines. Otherwise, it moves by buffer lines, without taking variable-width characters or continued lines into account. See \\[next-logical-line] for a command that always moves by buffer lines. The command \\[set-goal-column] can be used to create a semipermanent goal column for this command. Then instead of trying to move exactly vertically (or as close as possible), this command moves to the specified goal column (or as close as possible). The goal column is stored in the variable `goal-column', which is nil when there is no goal column. Note that setting `goal-column' overrides `line-move-visual' and causes this command to move by buffer lines rather than by display lines." (declare (interactive-only forward-line)) (interactive "^p\np") (or arg (setq arg 1)) (if (and next-line-add-newlines (= arg 1)) (if (save-excursion (end-of-line) (eobp)) ;; When adding a newline, don't expand an abbrev. (let ((abbrev-mode nil)) (end-of-line) (insert (if use-hard-newlines hard-newline "\n"))) (line-move arg nil nil try-vscroll)) (if (called-interactively-p 'interactive) (condition-case err (line-move arg nil nil try-vscroll) ((beginning-of-buffer end-of-buffer) (signal (car err) (cdr err)))) (line-move arg nil nil try-vscroll))) nil) (defun previous-line (&optional arg try-vscroll) "Move cursor vertically up ARG lines. Interactively, vscroll tall lines if `auto-window-vscroll' is enabled. Non-interactively, use TRY-VSCROLL to control whether to vscroll tall lines: if either `auto-window-vscroll' or TRY-VSCROLL is nil, this function will not vscroll. ARG defaults to 1. If there is no character in the target line exactly over the current column, the cursor is positioned after the character in that line which spans this column, or at the end of the line if it is not long enough. If the variable `line-move-visual' is non-nil, this command moves by display lines. Otherwise, it moves by buffer lines, without taking variable-width characters or continued lines into account. See \\[previous-logical-line] for a command that always moves by buffer lines. The command \\[set-goal-column] can be used to create a semipermanent goal column for this command. Then instead of trying to move exactly vertically (or as close as possible), this command moves to the specified goal column (or as close as possible). The goal column is stored in the variable `goal-column', which is nil when there is no goal column. Note that setting `goal-column' overrides `line-move-visual' and causes this command to move by buffer lines rather than by display lines." (declare (interactive-only "use `forward-line' with negative argument instead.")) (interactive "^p\np") (or arg (setq arg 1)) (if (called-interactively-p 'interactive) (condition-case err (line-move (- arg) nil nil try-vscroll) ((beginning-of-buffer end-of-buffer) (signal (car err) (cdr err)))) (line-move (- arg) nil nil try-vscroll)) nil) (defcustom track-eol nil "Non-nil means vertical motion starting at end of line keeps to ends of lines. This means moving to the end of each line moved onto. The beginning of a blank line does not count as the end of a line. This has no effect when the variable `line-move-visual' is non-nil." :type 'boolean :group 'editing-basics) (defcustom goal-column nil "Semipermanent goal column for vertical motion, as set by \\[set-goal-column], or nil. A non-nil setting overrides the variable `line-move-visual', which see." :type '(choice integer (const :tag "None" nil)) :group 'editing-basics) (make-variable-buffer-local 'goal-column) (defvar temporary-goal-column 0 "Current goal column for vertical motion. It is the column where point was at the start of the current run of vertical motion commands. When moving by visual lines via the function `line-move-visual', it is a cons cell (COL . HSCROLL), where COL is the x-position, in pixels, divided by the default column width, and HSCROLL is the number of columns by which window is scrolled from left margin. When the `track-eol' feature is doing its job, the value is `most-positive-fixnum'.") (defvar last--line-number-width 0 "Last value of width used for displaying line numbers. Used internally by `line-move-visual'.") (defcustom line-move-ignore-invisible t "Non-nil means commands that move by lines ignore invisible newlines. When this option is non-nil, \\[next-line], \\[previous-line], \\[move-end-of-line], and \\[move-beginning-of-line] behave as if newlines that are invisible didn't exist, and count only visible newlines. Thus, moving across 2 newlines one of which is invisible will be counted as a one-line move. Also, a non-nil value causes invisible text to be ignored when counting columns for the purposes of keeping point in the same column by \\[next-line] and \\[previous-line]. Outline mode sets this." :type 'boolean :group 'editing-basics) (defcustom line-move-visual t "When non-nil, `line-move' moves point by visual lines. This movement is based on where the cursor is displayed on the screen, instead of relying on buffer contents alone. It takes into account variable-width characters and line continuation. If nil, `line-move' moves point by logical lines. A non-nil setting of `goal-column' overrides the value of this variable and forces movement by logical lines. A window that is horizontally scrolled also forces movement by logical lines." :type 'boolean :group 'editing-basics :version "23.1") ;; Only used if display-graphic-p. (declare-function font-info "font.c" (name &optional frame)) (defun default-font-height () "Return the height in pixels of the current buffer's default face font. If the default font is remapped (see `face-remapping-alist'), the function returns the height of the remapped face." (let ((default-font (face-font 'default))) (cond ((and (display-multi-font-p) ;; Avoid calling font-info if the frame's default font was ;; not changed since the frame was created. That's because ;; font-info is expensive for some fonts, see bug #14838. (not (string= (frame-parameter nil 'font) default-font))) (aref (font-info default-font) 3)) (t (frame-char-height))))) (defun default-font-width () "Return the width in pixels of the current buffer's default face font. If the default font is remapped (see `face-remapping-alist'), the function returns the width of the remapped face." (let ((default-font (face-font 'default))) (cond ((and (display-multi-font-p) ;; Avoid calling font-info if the frame's default font was ;; not changed since the frame was created. That's because ;; font-info is expensive for some fonts, see bug #14838. (not (string= (frame-parameter nil 'font) default-font))) (let* ((info (font-info (face-font 'default))) (width (aref info 11))) (if (> width 0) width (aref info 10)))) (t (frame-char-width))))) (defun default-line-height () "Return the pixel height of current buffer's default-face text line. The value includes `line-spacing', if any, defined for the buffer or the frame." (let ((dfh (default-font-height)) (lsp (if (display-graphic-p) (or line-spacing (default-value 'line-spacing) (frame-parameter nil 'line-spacing) 0) 0))) (if (floatp lsp) (setq lsp (truncate (* (frame-char-height) lsp)))) (+ dfh lsp))) (defun window-screen-lines () "Return the number of screen lines in the text area of the selected window. This is different from `window-text-height' in that this function counts lines in units of the height of the font used by the default face displayed in the window, not in units of the frame's default font, and also accounts for `line-spacing', if any, defined for the window's buffer or frame. The value is a floating-point number." (let ((edges (window-inside-pixel-edges)) (dlh (default-line-height))) (/ (float (- (nth 3 edges) (nth 1 edges))) dlh))) ;; Returns non-nil if partial move was done. (defun line-move-partial (arg noerror &optional _to-end) (if (< arg 0) ;; Move backward (up). ;; If already vscrolled, reduce vscroll (let ((vs (window-vscroll nil t)) (dlh (default-line-height))) (when (> vs dlh) (set-window-vscroll nil (- vs dlh) t))) ;; Move forward (down). (let* ((lh (window-line-height -1)) (rowh (car lh)) (vpos (nth 1 lh)) (ypos (nth 2 lh)) (rbot (nth 3 lh)) (this-lh (window-line-height)) (this-height (car this-lh)) (this-ypos (nth 2 this-lh)) (dlh (default-line-height)) (wslines (window-screen-lines)) (edges (window-inside-pixel-edges)) (winh (- (nth 3 edges) (nth 1 edges) 1)) py vs last-line) (if (> (mod wslines 1.0) 0.0) (setq wslines (round (+ wslines 0.5)))) (when (or (null lh) (>= rbot dlh) (<= ypos (- dlh)) (null this-lh) (<= this-ypos (- dlh))) (unless lh (let ((wend (pos-visible-in-window-p t nil t))) (setq rbot (nth 3 wend) rowh (nth 4 wend) vpos (nth 5 wend)))) (unless this-lh (let ((wstart (pos-visible-in-window-p nil nil t))) (setq this-ypos (nth 2 wstart) this-height (nth 4 wstart)))) (setq py (or (nth 1 this-lh) (let ((ppos (posn-at-point)) col-row) (setq col-row (posn-actual-col-row ppos)) (if col-row (- (cdr col-row) (window-vscroll)) (cdr (posn-col-row ppos)))))) ;; VPOS > 0 means the last line is only partially visible. ;; But if the part that is visible is at least as tall as the ;; default font, that means the line is actually fully ;; readable, and something like line-spacing is hidden. So in ;; that case we accept the last line in the window as still ;; visible, and consider the margin as starting one line ;; later. (if (and vpos (> vpos 0)) (if (and rowh (>= rowh (default-font-height)) (< rowh dlh)) (setq last-line (min (- wslines scroll-margin) vpos)) (setq last-line (min (- wslines scroll-margin 1) (1- vpos))))) (cond ;; If last line of window is fully visible, and vscrolling ;; more would make this line invisible, move forward. ((and (or (< (setq vs (window-vscroll nil t)) dlh) (null this-height) (<= this-height dlh)) (or (null rbot) (= rbot 0))) nil) ;; If cursor is not in the bottom scroll margin, and the ;; current line is not too tall, move forward. ((and (or (null this-height) (<= this-height winh)) vpos (> vpos 0) (< py last-line)) nil) ;; When already vscrolled, we vscroll some more if we can, ;; or clear vscroll and move forward at end of tall image. ((> vs 0) (when (or (and rbot (> rbot 0)) (and this-height (> this-height dlh))) (set-window-vscroll nil (+ vs dlh) t))) ;; If cursor just entered the bottom scroll margin, move forward, ;; but also optionally vscroll one line so redisplay won't recenter. ((and vpos (> vpos 0) (= py last-line)) ;; Don't vscroll if the partially-visible line at window ;; bottom is not too tall (a.k.a. "just one more text ;; line"): in that case, we do want redisplay to behave ;; normally, i.e. recenter or whatever. ;; ;; Note: ROWH + RBOT from the value returned by ;; pos-visible-in-window-p give the total height of the ;; partially-visible glyph row at the end of the window. As ;; we are dealing with floats, we disregard sub-pixel ;; discrepancies between that and DLH. (if (and rowh rbot (>= (- (+ rowh rbot) winh) 1)) (set-window-vscroll nil dlh t)) (line-move-1 arg noerror) t) ;; If there are lines above the last line, scroll-up one line. ((and vpos (> vpos 0)) (scroll-up 1) t) ;; Finally, start vscroll. (t (set-window-vscroll nil dlh t))))))) ;; This is like line-move-1 except that it also performs ;; vertical scrolling of tall images if appropriate. ;; That is not really a clean thing to do, since it mixes ;; scrolling with cursor motion. But so far we don't have ;; a cleaner solution to the problem of making C-n do something ;; useful given a tall image. (defun line-move (arg &optional noerror _to-end try-vscroll) "Move forward ARG lines. If NOERROR, don't signal an error if we can't move ARG lines. TO-END is unused. TRY-VSCROLL controls whether to vscroll tall lines: if either `auto-window-vscroll' or TRY-VSCROLL is nil, this function will not vscroll." (if noninteractive (line-move-1 arg noerror) (unless (and auto-window-vscroll try-vscroll ;; Only vscroll for single line moves (= (abs arg) 1) ;; Under scroll-conservatively, the display engine ;; does this better. (zerop scroll-conservatively) ;; But don't vscroll in a keyboard macro. (not defining-kbd-macro) (not executing-kbd-macro) (line-move-partial arg noerror)) (set-window-vscroll nil 0 t) (if (and line-move-visual ;; Display-based column are incompatible with goal-column. (not goal-column) ;; When the text in the window is scrolled to the left, ;; display-based motion doesn't make sense (because each ;; logical line occupies exactly one screen line). (not (> (window-hscroll) 0)) ;; Likewise when the text _was_ scrolled to the left ;; when the current run of vertical motion commands ;; started. (not (and (memq last-command `(next-line previous-line ,this-command)) auto-hscroll-mode (numberp temporary-goal-column) (>= temporary-goal-column (- (window-width) hscroll-margin))))) (prog1 (line-move-visual arg noerror) ;; If we moved into a tall line, set vscroll to make ;; scrolling through tall images more smooth. (let ((lh (line-pixel-height)) (edges (window-inside-pixel-edges)) (dlh (default-line-height)) winh) (setq winh (- (nth 3 edges) (nth 1 edges) 1)) (if (and (< arg 0) (< (point) (window-start)) (> lh winh)) (set-window-vscroll nil (- lh dlh) t)))) (line-move-1 arg noerror))))) ;; Display-based alternative to line-move-1. ;; Arg says how many lines to move. The value is t if we can move the ;; specified number of lines. (defun line-move-visual (arg &optional noerror) "Move ARG lines forward. If NOERROR, don't signal an error if we can't move that many lines." (let ((opoint (point)) (hscroll (window-hscroll)) (lnum-width (line-number-display-width t)) target-hscroll) ;; Check if the previous command was a line-motion command, or if ;; we were called from some other command. (if (and (consp temporary-goal-column) (memq last-command `(next-line previous-line ,this-command))) ;; If so, there's no need to reset `temporary-goal-column', ;; but we may need to hscroll. (progn (if (or (/= (cdr temporary-goal-column) hscroll) (> (cdr temporary-goal-column) 0)) (setq target-hscroll (cdr temporary-goal-column))) ;; Update the COLUMN part of temporary-goal-column if the ;; line-number display changed its width since the last ;; time. (setq temporary-goal-column (cons (+ (car temporary-goal-column) (/ (float (- lnum-width last--line-number-width)) (frame-char-width))) (cdr temporary-goal-column))) (setq last--line-number-width lnum-width)) ;; Otherwise, we should reset `temporary-goal-column'. (let ((posn (posn-at-point)) x-pos) (cond ;; Handle the `overflow-newline-into-fringe' case ;; (left-fringe is for the R2L case): ((memq (nth 1 posn) '(right-fringe left-fringe)) (setq temporary-goal-column (cons (window-width) hscroll))) ((car (posn-x-y posn)) (setq x-pos (car (posn-x-y posn))) ;; In R2L lines, the X pixel coordinate is measured from the ;; left edge of the window, but columns are still counted ;; from the logical-order beginning of the line, i.e. from ;; the right edge in this case. We need to adjust for that. (if (eq (current-bidi-paragraph-direction) 'right-to-left) (setq x-pos (- (window-body-width nil t) 1 x-pos))) (setq temporary-goal-column (cons (/ (float x-pos) (frame-char-width)) hscroll))) (executing-kbd-macro ;; When we move beyond the first/last character visible in ;; the window, posn-at-point will return nil, so we need to ;; approximate the goal column as below. (setq temporary-goal-column (mod (current-column) (window-text-width))))))) (if target-hscroll (set-window-hscroll (selected-window) target-hscroll)) ;; vertical-motion can move more than it was asked to if it moves ;; across display strings with newlines. We don't want to ring ;; the bell and announce beginning/end of buffer in that case. (or (and (or (and (>= arg 0) (>= (vertical-motion (cons (or goal-column (if (consp temporary-goal-column) (car temporary-goal-column) temporary-goal-column)) arg)) arg)) (and (< arg 0) (<= (vertical-motion (cons (or goal-column (if (consp temporary-goal-column) (car temporary-goal-column) temporary-goal-column)) arg)) arg))) (or (>= arg 0) (/= (point) opoint) ;; If the goal column lies on a display string, ;; `vertical-motion' advances the cursor to the end ;; of the string. For arg < 0, this can cause the ;; cursor to get stuck. (Bug#3020). (= (vertical-motion arg) arg))) (unless noerror (signal (if (< arg 0) 'beginning-of-buffer 'end-of-buffer) nil))))) ;; This is the guts of next-line and previous-line. ;; Arg says how many lines to move. ;; The value is t if we can move the specified number of lines. (defun line-move-1 (arg &optional noerror _to-end) ;; Don't run any point-motion hooks, and disregard intangibility, ;; for intermediate positions. (let ((inhibit-point-motion-hooks t) (opoint (point)) (orig-arg arg)) (if (consp temporary-goal-column) (setq temporary-goal-column (+ (car temporary-goal-column) (cdr temporary-goal-column)))) (unwind-protect (progn (if (not (memq last-command '(next-line previous-line))) (setq temporary-goal-column (if (and track-eol (eolp) ;; Don't count beg of empty line as end of line ;; unless we just did explicit end-of-line. (or (not (bolp)) (eq last-command 'move-end-of-line))) most-positive-fixnum (current-column)))) (if (not (or (integerp selective-display) line-move-ignore-invisible)) ;; Use just newline characters. ;; Set ARG to 0 if we move as many lines as requested. (or (if (> arg 0) (progn (if (> arg 1) (forward-line (1- arg))) ;; This way of moving forward ARG lines ;; verifies that we have a newline after the last one. ;; It doesn't get confused by intangible text. (end-of-line) (if (zerop (forward-line 1)) (setq arg 0))) (and (zerop (forward-line arg)) (bolp) (setq arg 0))) (unless noerror (signal (if (< arg 0) 'beginning-of-buffer 'end-of-buffer) nil))) ;; Move by arg lines, but ignore invisible ones. (let (done) (while (and (> arg 0) (not done)) ;; If the following character is currently invisible, ;; skip all characters with that same `invisible' property value. (while (and (not (eobp)) (invisible-p (point))) (goto-char (next-char-property-change (point)))) ;; Move a line. ;; We don't use `end-of-line', since we want to escape ;; from field boundaries occurring exactly at point. (goto-char (constrain-to-field (let ((inhibit-field-text-motion t)) (line-end-position)) (point) t t 'inhibit-line-move-field-capture)) ;; If there's no invisibility here, move over the newline. (cond ((eobp) (if (not noerror) (signal 'end-of-buffer nil) (setq done t))) ((and (> arg 1) ;; Use vertical-motion for last move (not (integerp selective-display)) (not (invisible-p (point)))) ;; We avoid vertical-motion when possible ;; because that has to fontify. (forward-line 1)) ;; Otherwise move a more sophisticated way. ((zerop (vertical-motion 1)) (if (not noerror) (signal 'end-of-buffer nil) (setq done t)))) (unless done (setq arg (1- arg)))) ;; The logic of this is the same as the loop above, ;; it just goes in the other direction. (while (and (< arg 0) (not done)) ;; For completely consistency with the forward-motion ;; case, we should call beginning-of-line here. ;; However, if point is inside a field and on a ;; continued line, the call to (vertical-motion -1) ;; below won't move us back far enough; then we return ;; to the same column in line-move-finish, and point ;; gets stuck -- cyd (forward-line 0) (cond ((bobp) (if (not noerror) (signal 'beginning-of-buffer nil) (setq done t))) ((and (< arg -1) ;; Use vertical-motion for last move (not (integerp selective-display)) (not (invisible-p (1- (point))))) (forward-line -1)) ((zerop (vertical-motion -1)) (if (not noerror) (signal 'beginning-of-buffer nil) (setq done t)))) (unless done (setq arg (1+ arg)) (while (and ;; Don't move over previous invis lines ;; if our target is the middle of this line. (or (zerop (or goal-column temporary-goal-column)) (< arg 0)) (not (bobp)) (invisible-p (1- (point)))) (goto-char (previous-char-property-change (point)))))))) ;; This is the value the function returns. (= arg 0)) (cond ((> arg 0) ;; If we did not move down as far as desired, at least go ;; to end of line. Be sure to call point-entered and ;; point-left-hooks. (let* ((npoint (prog1 (line-end-position) (goto-char opoint))) (inhibit-point-motion-hooks nil)) (goto-char npoint))) ((< arg 0) ;; If we did not move up as far as desired, ;; at least go to beginning of line. (let* ((npoint (prog1 (line-beginning-position) (goto-char opoint))) (inhibit-point-motion-hooks nil)) (goto-char npoint))) (t (line-move-finish (or goal-column temporary-goal-column) opoint (> orig-arg 0))))))) (defun line-move-finish (column opoint forward) (let ((repeat t)) (while repeat ;; Set REPEAT to t to repeat the whole thing. (setq repeat nil) (let (new (old (point)) (line-beg (line-beginning-position)) (line-end ;; Compute the end of the line ;; ignoring effectively invisible newlines. (save-excursion ;; Like end-of-line but ignores fields. (skip-chars-forward "^\n") (while (and (not (eobp)) (invisible-p (point))) (goto-char (next-char-property-change (point))) (skip-chars-forward "^\n")) (point)))) ;; Move to the desired column. (if (and line-move-visual (not (or truncate-lines truncate-partial-width-windows))) ;; Under line-move-visual, goal-column should be ;; interpreted in units of the frame's canonical character ;; width, which is exactly what vertical-motion does. (vertical-motion (cons column 0)) (line-move-to-column (truncate column))) ;; Corner case: suppose we start out in a field boundary in ;; the middle of a continued line. When we get to ;; line-move-finish, point is at the start of a new *screen* ;; line but the same text line; then line-move-to-column would ;; move us backwards. Test using C-n with point on the "x" in ;; (insert "a" (propertize "x" 'field t) (make-string 89 ?y)) (and forward (< (point) old) (goto-char old)) (setq new (point)) ;; Process intangibility within a line. ;; With inhibit-point-motion-hooks bound to nil, a call to ;; goto-char moves point past intangible text. ;; However, inhibit-point-motion-hooks controls both the ;; intangibility and the point-entered/point-left hooks. The ;; following hack avoids calling the point-* hooks ;; unnecessarily. Note that we move *forward* past intangible ;; text when the initial and final points are the same. (goto-char new) (let ((inhibit-point-motion-hooks nil)) (goto-char new) ;; If intangibility moves us to a different (later) place ;; in the same line, use that as the destination. (if (<= (point) line-end) (setq new (point)) ;; If that position is "too late", ;; try the previous allowable position. ;; See if it is ok. (backward-char) (if (if forward ;; If going forward, don't accept the previous ;; allowable position if it is before the target line. (< line-beg (point)) ;; If going backward, don't accept the previous ;; allowable position if it is still after the target line. (<= (point) line-end)) (setq new (point)) ;; As a last resort, use the end of the line. (setq new line-end)))) ;; Now move to the updated destination, processing fields ;; as well as intangibility. (goto-char opoint) (let ((inhibit-point-motion-hooks nil)) (goto-char ;; Ignore field boundaries if the initial and final ;; positions have the same `field' property, even if the ;; fields are non-contiguous. This seems to be "nicer" ;; behavior in many situations. (if (eq (get-char-property new 'field) (get-char-property opoint 'field)) new (constrain-to-field new opoint t t 'inhibit-line-move-field-capture)))) ;; If all this moved us to a different line, ;; retry everything within that new line. (when (or (< (point) line-beg) (> (point) line-end)) ;; Repeat the intangibility and field processing. (setq repeat t)))))) (defun line-move-to-column (col) "Try to find column COL, considering invisibility. This function works only in certain cases, because what we really need is for `move-to-column' and `current-column' to be able to ignore invisible text." (if (zerop col) (beginning-of-line) (move-to-column col)) (when (and line-move-ignore-invisible (not (bolp)) (invisible-p (1- (point)))) (let ((normal-location (point)) (normal-column (current-column))) ;; If the following character is currently invisible, ;; skip all characters with that same `invisible' property value. (while (and (not (eobp)) (invisible-p (point))) (goto-char (next-char-property-change (point)))) ;; Have we advanced to a larger column position? (if (> (current-column) normal-column) ;; We have made some progress towards the desired column. ;; See if we can make any further progress. (line-move-to-column (+ (current-column) (- col normal-column))) ;; Otherwise, go to the place we originally found ;; and move back over invisible text. ;; that will get us to the same place on the screen ;; but with a more reasonable buffer position. (goto-char normal-location) (let ((line-beg ;; We want the real line beginning, so it's consistent ;; with bolp below, otherwise we might infloop. (let ((inhibit-field-text-motion t)) (line-beginning-position)))) (while (and (not (bolp)) (invisible-p (1- (point)))) (goto-char (previous-char-property-change (point) line-beg)))))))) (defun move-end-of-line (arg) "Move point to end of current line as displayed. With argument ARG not nil or 1, move forward ARG - 1 lines first. If point reaches the beginning or end of buffer, it stops there. To ignore the effects of the `intangible' text or overlay property, bind `inhibit-point-motion-hooks' to t. If there is an image in the current line, this function disregards newlines that are part of the text on which the image rests." (interactive "^p") (or arg (setq arg 1)) (let (done) (while (not done) (let ((newpos (save-excursion (let ((goal-column 0) (line-move-visual nil)) (and (line-move arg t) ;; With bidi reordering, we may not be at bol, ;; so make sure we are. (skip-chars-backward "^\n") (not (bobp)) (progn (while (and (not (bobp)) (invisible-p (1- (point)))) (goto-char (previous-single-char-property-change (point) 'invisible))) (backward-char 1))) (point))))) (goto-char newpos) (if (and (> (point) newpos) (eq (preceding-char) ?\n)) (backward-char 1) (if (and (> (point) newpos) (not (eobp)) (not (eq (following-char) ?\n))) ;; If we skipped something intangible and now we're not ;; really at eol, keep going. (setq arg 1) (setq done t))))))) (defun move-beginning-of-line (arg) "Move point to beginning of current line as displayed. \(If there's an image in the line, this disregards newlines which are part of the text that the image rests on.) With argument ARG not nil or 1, move forward ARG - 1 lines first. If point reaches the beginning or end of buffer, it stops there. \(But if the buffer doesn't end in a newline, it stops at the beginning of the last line.) To ignore intangibility, bind `inhibit-point-motion-hooks' to t." (interactive "^p") (or arg (setq arg 1)) (let ((orig (point)) first-vis first-vis-field-value) ;; Move by lines, if ARG is not 1 (the default). (if (/= arg 1) (let ((line-move-visual nil)) (line-move (1- arg) t))) ;; Move to beginning-of-line, ignoring fields and invisible text. (skip-chars-backward "^\n") (while (and (not (bobp)) (invisible-p (1- (point)))) (goto-char (previous-char-property-change (point))) (skip-chars-backward "^\n")) ;; Now find first visible char in the line. (while (and (< (point) orig) (invisible-p (point))) (goto-char (next-char-property-change (point) orig))) (setq first-vis (point)) ;; See if fields would stop us from reaching FIRST-VIS. (setq first-vis-field-value (constrain-to-field first-vis orig (/= arg 1) t nil)) (goto-char (if (/= first-vis-field-value first-vis) ;; If yes, obey them. first-vis-field-value ;; Otherwise, move to START with attention to fields. ;; (It is possible that fields never matter in this case.) (constrain-to-field (point) orig (/= arg 1) t nil))))) ;; Many people have said they rarely use this feature, and often type ;; it by accident. Maybe it shouldn't even be on a key. (put 'set-goal-column 'disabled t) (defun set-goal-column (arg) "Set the current horizontal position as a goal for \\[next-line] and \\[previous-line]. Those commands will move to this position in the line moved to rather than trying to keep the same horizontal position. With a non-nil argument ARG, clears out the goal column so that \\[next-line] and \\[previous-line] resume vertical motion. The goal column is stored in the variable `goal-column'. This is a buffer-local setting." (interactive "P") (if arg (progn (setq goal-column nil) (message "No goal column")) (setq goal-column (current-column)) ;; The older method below can be erroneous if `set-goal-column' is bound ;; to a sequence containing % ;;(message (substitute-command-keys ;;"Goal column %d (use \\[set-goal-column] with an arg to unset it)") ;;goal-column) (message "%s" (concat (format "Goal column %d " goal-column) (substitute-command-keys "(use \\[set-goal-column] with an arg to unset it)"))) ) nil) ;;; Editing based on visual lines, as opposed to logical lines. (defun end-of-visual-line (&optional n) "Move point to end of current visual line. With argument N not nil or 1, move forward N - 1 visual lines first. If point reaches the beginning or end of buffer, it stops there. To ignore intangibility, bind `inhibit-point-motion-hooks' to t." (interactive "^p") (or n (setq n 1)) (if (/= n 1) (let ((line-move-visual t)) (line-move (1- n) t))) ;; Unlike `move-beginning-of-line', `move-end-of-line' doesn't ;; constrain to field boundaries, so we don't either. (vertical-motion (cons (window-width) 0))) (defun beginning-of-visual-line (&optional n) "Move point to beginning of current visual line. With argument N not nil or 1, move forward N - 1 visual lines first. If point reaches the beginning or end of buffer, it stops there. \(But if the buffer doesn't end in a newline, it stops at the beginning of the last visual line.) To ignore intangibility, bind `inhibit-point-motion-hooks' to t." (interactive "^p") (or n (setq n 1)) (let ((opoint (point))) (if (/= n 1) (let ((line-move-visual t)) (line-move (1- n) t))) (vertical-motion 0) ;; Constrain to field boundaries, like `move-beginning-of-line'. (goto-char (constrain-to-field (point) opoint (/= n 1))))) (defun kill-visual-line (&optional arg) "Kill the rest of the visual line. With prefix argument ARG, kill that many visual lines from point. If ARG is negative, kill visual lines backward. If ARG is zero, kill the text before point on the current visual line. If you want to append the killed line to the last killed text, use \\[append-next-kill] before \\[kill-line]. If the buffer is read-only, Emacs will beep and refrain from deleting the line, but put the line in the kill ring anyway. This means that you can use this command to copy text from a read-only buffer. \(If the variable `kill-read-only-ok' is non-nil, then this won't even beep.)" (interactive "P") ;; Like in `kill-line', it's better to move point to the other end ;; of the kill before killing. (let ((opoint (point)) (kill-whole-line (and kill-whole-line (bolp)))) (if arg (vertical-motion (prefix-numeric-value arg)) (end-of-visual-line 1) (if (= (point) opoint) (vertical-motion 1) ;; Skip any trailing whitespace at the end of the visual line. ;; We used to do this only if `show-trailing-whitespace' is ;; nil, but that's wrong; the correct thing would be to check ;; whether the trailing whitespace is highlighted. But, it's ;; OK to just do this unconditionally. (skip-chars-forward " \t"))) (kill-region opoint (if (and kill-whole-line (= (following-char) ?\n)) (1+ (point)) (point))))) (defun next-logical-line (&optional arg try-vscroll) "Move cursor vertically down ARG lines. This is identical to `next-line', except that it always moves by logical lines instead of visual lines, ignoring the value of the variable `line-move-visual'." (interactive "^p\np") (let ((line-move-visual nil)) (with-no-warnings (next-line arg try-vscroll)))) (defun previous-logical-line (&optional arg try-vscroll) "Move cursor vertically up ARG lines. This is identical to `previous-line', except that it always moves by logical lines instead of visual lines, ignoring the value of the variable `line-move-visual'." (interactive "^p\np") (let ((line-move-visual nil)) (with-no-warnings (previous-line arg try-vscroll)))) (defgroup visual-line nil "Editing based on visual lines." :group 'convenience :version "23.1") (defvar visual-line-mode-map (let ((map (make-sparse-keymap))) (define-key map [remap kill-line] 'kill-visual-line) (define-key map [remap move-beginning-of-line] 'beginning-of-visual-line) (define-key map [remap move-end-of-line] 'end-of-visual-line) ;; These keybindings interfere with xterm function keys. Are ;; there any other suitable bindings? ;; (define-key map "\M-[" 'previous-logical-line) ;; (define-key map "\M-]" 'next-logical-line) map)) (defcustom visual-line-fringe-indicators '(nil nil) "How fringe indicators are shown for wrapped lines in `visual-line-mode'. The value should be a list of the form (LEFT RIGHT), where LEFT and RIGHT are symbols representing the bitmaps to display, to indicate wrapped lines, in the left and right fringes respectively. See also `fringe-indicator-alist'. The default is not to display fringe indicators for wrapped lines. This variable does not affect fringe indicators displayed for other purposes." :type '(list (choice (const :tag "Hide left indicator" nil) (const :tag "Left curly arrow" left-curly-arrow) (symbol :tag "Other bitmap")) (choice (const :tag "Hide right indicator" nil) (const :tag "Right curly arrow" right-curly-arrow) (symbol :tag "Other bitmap"))) :set (lambda (symbol value) (dolist (buf (buffer-list)) (with-current-buffer buf (when (and (boundp 'visual-line-mode) (symbol-value 'visual-line-mode)) (setq fringe-indicator-alist (cons (cons 'continuation value) (assq-delete-all 'continuation (copy-tree fringe-indicator-alist))))))) (set-default symbol value))) (defvar visual-line--saved-state nil) (define-minor-mode visual-line-mode "Toggle visual line based editing (Visual Line mode) in the current buffer. Interactively, with a prefix argument, enable Visual Line mode if the prefix argument is positive, and disable it otherwise. If called from Lisp, toggle the mode if ARG is `toggle', disable the mode if ARG is a non-positive integer, and enable the mode otherwise \(including if ARG is omitted or nil or a positive integer). When Visual Line mode is enabled, `word-wrap' is turned on in this buffer, and simple editing commands are redefined to act on visual lines, not logical lines. See Info node `Visual Line Mode' for details." :keymap visual-line-mode-map :group 'visual-line :lighter " Wrap" (if visual-line-mode (progn (set (make-local-variable 'visual-line--saved-state) nil) ;; Save the local values of some variables, to be restored if ;; visual-line-mode is turned off. (dolist (var '(line-move-visual truncate-lines truncate-partial-width-windows word-wrap fringe-indicator-alist)) (if (local-variable-p var) (push (cons var (symbol-value var)) visual-line--saved-state))) (set (make-local-variable 'line-move-visual) t) (set (make-local-variable 'truncate-partial-width-windows) nil) (setq truncate-lines nil word-wrap t fringe-indicator-alist (cons (cons 'continuation visual-line-fringe-indicators) fringe-indicator-alist))) (kill-local-variable 'line-move-visual) (kill-local-variable 'word-wrap) (kill-local-variable 'truncate-lines) (kill-local-variable 'truncate-partial-width-windows) (kill-local-variable 'fringe-indicator-alist) (dolist (saved visual-line--saved-state) (set (make-local-variable (car saved)) (cdr saved))) (kill-local-variable 'visual-line--saved-state))) (defun turn-on-visual-line-mode () (visual-line-mode 1)) (define-globalized-minor-mode global-visual-line-mode visual-line-mode turn-on-visual-line-mode) (defun transpose-chars (arg) "Interchange characters around point, moving forward one character. With prefix arg ARG, effect is to take character before point and drag it forward past ARG other characters (backward if ARG negative). If no argument and at end of line, the previous two chars are exchanged." (interactive "*P") (when (and (null arg) (eolp) (not (bobp)) (not (get-text-property (1- (point)) 'read-only))) (forward-char -1)) (transpose-subr 'forward-char (prefix-numeric-value arg))) (defun transpose-words (arg) "Interchange words around point, leaving point at end of them. With prefix arg ARG, effect is to take word before or around point and drag it forward past ARG other words (backward if ARG negative). If ARG is zero, the words around or after point and around or after mark are interchanged." ;; FIXME: `foo a!nd bar' should transpose into `bar and foo'. (interactive "*p") (transpose-subr 'forward-word arg)) (defun transpose-sexps (arg) "Like \\[transpose-chars] (`transpose-chars'), but applies to sexps. Unlike `transpose-words', point must be between the two sexps and not in the middle of a sexp to be transposed. With non-zero prefix arg ARG, effect is to take the sexp before point and drag it forward past ARG other sexps (backward if ARG is negative). If ARG is zero, the sexps ending at or after point and at or after mark are interchanged." (interactive "*p") (transpose-subr (lambda (arg) ;; Here we should try to simulate the behavior of ;; (cons (progn (forward-sexp x) (point)) ;; (progn (forward-sexp (- x)) (point))) ;; Except that we don't want to rely on the second forward-sexp ;; putting us back to where we want to be, since forward-sexp-function ;; might do funny things like infix-precedence. (if (if (> arg 0) (looking-at "\\sw\\|\\s_") (and (not (bobp)) (save-excursion (forward-char -1) (looking-at "\\sw\\|\\s_")))) ;; Jumping over a symbol. We might be inside it, mind you. (progn (funcall (if (> arg 0) 'skip-syntax-backward 'skip-syntax-forward) "w_") (cons (save-excursion (forward-sexp arg) (point)) (point))) ;; Otherwise, we're between sexps. Take a step back before jumping ;; to make sure we'll obey the same precedence no matter which direction ;; we're going. (funcall (if (> arg 0) 'skip-syntax-backward 'skip-syntax-forward) " .") (cons (save-excursion (forward-sexp arg) (point)) (progn (while (or (forward-comment (if (> arg 0) 1 -1)) (not (zerop (funcall (if (> arg 0) 'skip-syntax-forward 'skip-syntax-backward) "."))))) (point))))) arg 'special)) (defun transpose-lines (arg) "Exchange current line and previous line, leaving point after both. With argument ARG, takes previous line and moves it past ARG lines. With argument 0, interchanges line point is in with line mark is in." (interactive "*p") (transpose-subr (function (lambda (arg) (if (> arg 0) (progn ;; Move forward over ARG lines, ;; but create newlines if necessary. (setq arg (forward-line arg)) (if (/= (preceding-char) ?\n) (setq arg (1+ arg))) (if (> arg 0) (newline arg))) (forward-line arg)))) arg)) ;; FIXME seems to leave point BEFORE the current object when ARG = 0, ;; which seems inconsistent with the ARG /= 0 case. ;; FIXME document SPECIAL. (defun transpose-subr (mover arg &optional special) "Subroutine to do the work of transposing objects. Works for lines, sentences, paragraphs, etc. MOVER is a function that moves forward by units of the given object (e.g. forward-sentence, forward-paragraph). If ARG is zero, exchanges the current object with the one containing mark. If ARG is an integer, moves the current object past ARG following (if ARG is positive) or preceding (if ARG is negative) objects, leaving point after the current object." (let ((aux (if special mover (lambda (x) (cons (progn (funcall mover x) (point)) (progn (funcall mover (- x)) (point)))))) pos1 pos2) (cond ((= arg 0) (save-excursion (setq pos1 (funcall aux 1)) (goto-char (or (mark) (error "No mark set in this buffer"))) (setq pos2 (funcall aux 1)) (transpose-subr-1 pos1 pos2)) (exchange-point-and-mark)) ((> arg 0) (setq pos1 (funcall aux -1)) (setq pos2 (funcall aux arg)) (transpose-subr-1 pos1 pos2) (goto-char (car pos2))) (t (setq pos1 (funcall aux -1)) (goto-char (car pos1)) (setq pos2 (funcall aux arg)) (transpose-subr-1 pos1 pos2) (goto-char (+ (car pos2) (- (cdr pos1) (car pos1)))))))) (defun transpose-subr-1 (pos1 pos2) (when (> (car pos1) (cdr pos1)) (setq pos1 (cons (cdr pos1) (car pos1)))) (when (> (car pos2) (cdr pos2)) (setq pos2 (cons (cdr pos2) (car pos2)))) (when (> (car pos1) (car pos2)) (let ((swap pos1)) (setq pos1 pos2 pos2 swap))) (if (> (cdr pos1) (car pos2)) (error "Don't have two things to transpose")) (atomic-change-group ;; This sequence of insertions attempts to preserve marker ;; positions at the start and end of the transposed objects. (let* ((word (buffer-substring (car pos2) (cdr pos2))) (len1 (- (cdr pos1) (car pos1))) (len2 (length word)) (boundary (make-marker))) (set-marker boundary (car pos2)) (goto-char (cdr pos1)) (insert-before-markers word) (setq word (delete-and-extract-region (car pos1) (+ (car pos1) len1))) (goto-char boundary) (insert word) (goto-char (+ boundary len1)) (delete-region (point) (+ (point) len2)) (set-marker boundary nil)))) (defun backward-word (&optional arg) "Move backward until encountering the beginning of a word. With argument ARG, do this that many times. If ARG is omitted or nil, move point backward one word. The word boundaries are normally determined by the buffer's syntax table and character script (according to `char-script-table'), but `find-word-boundary-function-table', such as set up by `subword-mode', can change that. If a Lisp program needs to move by words determined strictly by the syntax table, it should use `backward-word-strictly' instead. See Info node `(elisp) Word Motion' for details." (interactive "^p") (forward-word (- (or arg 1)))) (defun mark-word (&optional arg allow-extend) "Set mark ARG words away from point. The place mark goes is the same place \\[forward-word] would move to with the same argument. Interactively, if this command is repeated or (in Transient Mark mode) if the mark is active, it marks the next ARG words after the ones already marked." (interactive "P\np") (cond ((and allow-extend (or (and (eq last-command this-command) (mark t)) (region-active-p))) (setq arg (if arg (prefix-numeric-value arg) (if (< (mark) (point)) -1 1))) (set-mark (save-excursion (goto-char (mark)) (forward-word arg) (point)))) (t (push-mark (save-excursion (forward-word (prefix-numeric-value arg)) (point)) nil t)))) (defun kill-word (arg) "Kill characters forward until encountering the end of a word. With argument ARG, do this that many times." (interactive "p") (kill-region (point) (progn (forward-word arg) (point)))) (defun backward-kill-word (arg) "Kill characters backward until encountering the beginning of a word. With argument ARG, do this that many times." (interactive "p") (kill-word (- arg))) (defun current-word (&optional strict really-word) "Return the word at or near point, as a string. The return value includes no text properties. If optional arg STRICT is non-nil, return nil unless point is within or adjacent to a word, otherwise look for a word within point's line. If there is no word anywhere on point's line, the value is nil regardless of STRICT. By default, this function treats as a single word any sequence of characters that have either word or symbol syntax. If optional arg REALLY-WORD is non-nil, only characters of word syntax can constitute a word." (save-excursion (let* ((oldpoint (point)) (start (point)) (end (point)) (syntaxes (if really-word "w" "w_")) (not-syntaxes (concat "^" syntaxes))) (skip-syntax-backward syntaxes) (setq start (point)) (goto-char oldpoint) (skip-syntax-forward syntaxes) (setq end (point)) (when (and (eq start oldpoint) (eq end oldpoint) ;; Point is neither within nor adjacent to a word. (not strict)) ;; Look for preceding word in same line. (skip-syntax-backward not-syntaxes (line-beginning-position)) (if (bolp) ;; No preceding word in same line. ;; Look for following word in same line. (progn (skip-syntax-forward not-syntaxes (line-end-position)) (setq start (point)) (skip-syntax-forward syntaxes) (setq end (point))) (setq end (point)) (skip-syntax-backward syntaxes) (setq start (point)))) ;; If we found something nonempty, return it as a string. (unless (= start end) (buffer-substring-no-properties start end))))) (defcustom fill-prefix nil "String for filling to insert at front of new line, or nil for none." :type '(choice (const :tag "None" nil) string) :group 'fill) (make-variable-buffer-local 'fill-prefix) (put 'fill-prefix 'safe-local-variable 'string-or-null-p) (defcustom auto-fill-inhibit-regexp nil "Regexp to match lines which should not be auto-filled." :type '(choice (const :tag "None" nil) regexp) :group 'fill) (defun do-auto-fill () "The default value for `normal-auto-fill-function'. This is the default auto-fill function, some major modes use a different one. Returns t if it really did any work." (let (fc justify give-up (fill-prefix fill-prefix)) (if (or (not (setq justify (current-justification))) (null (setq fc (current-fill-column))) (and (eq justify 'left) (<= (current-column) fc)) (and auto-fill-inhibit-regexp (save-excursion (beginning-of-line) (looking-at auto-fill-inhibit-regexp)))) nil ;; Auto-filling not required (if (memq justify '(full center right)) (save-excursion (unjustify-current-line))) ;; Choose a fill-prefix automatically. (when (and adaptive-fill-mode (or (null fill-prefix) (string= fill-prefix ""))) (let ((prefix (fill-context-prefix (save-excursion (fill-forward-paragraph -1) (point)) (save-excursion (fill-forward-paragraph 1) (point))))) (and prefix (not (equal prefix "")) ;; Use auto-indentation rather than a guessed empty prefix. (not (and fill-indent-according-to-mode (string-match "\\`[ \t]*\\'" prefix))) (setq fill-prefix prefix)))) (while (and (not give-up) (> (current-column) fc)) ;; Determine where to split the line. (let ((fill-point (save-excursion (beginning-of-line) ;; Don't split earlier in the line than the length of the ;; fill prefix, since the resulting line would be longer. (when fill-prefix (move-to-column (string-width fill-prefix))) (let ((after-prefix (point))) (move-to-column (1+ fc)) (fill-move-to-break-point after-prefix) (point))))) ;; See whether the place we found is any good. (if (save-excursion (goto-char fill-point) (or (bolp) ;; There is no use breaking at end of line. (save-excursion (skip-chars-forward " ") (eolp)) ;; Don't split right after a comment starter ;; since we would just make another comment starter. (and comment-start-skip (let ((limit (point))) (beginning-of-line) (and (re-search-forward comment-start-skip limit t) (eq (point) limit)))))) ;; No good place to break => stop trying. (setq give-up t) ;; Ok, we have a useful place to break the line. Do it. (let ((prev-column (current-column))) ;; If point is at the fill-point, do not `save-excursion'. ;; Otherwise, if a comment prefix or fill-prefix is inserted, ;; point will end up before it rather than after it. (if (save-excursion (skip-chars-backward " \t") (= (point) fill-point)) (default-indent-new-line t) (save-excursion (goto-char fill-point) (default-indent-new-line t))) ;; Now do justification, if required (if (not (eq justify 'left)) (save-excursion (end-of-line 0) (justify-current-line justify nil t))) ;; If making the new line didn't reduce the hpos of ;; the end of the line, then give up now; ;; trying again will not help. (if (>= (current-column) prev-column) (setq give-up t)))))) ;; Justify last line. (justify-current-line justify t t) t))) (defvar comment-line-break-function 'comment-indent-new-line "Mode-specific function which line breaks and continues a comment. This function is called during auto-filling when a comment syntax is defined. The function should take a single optional argument, which is a flag indicating whether it should use soft newlines.") (defun default-indent-new-line (&optional soft) "Break line at point and indent. If a comment syntax is defined, call `comment-indent-new-line'. The inserted newline is marked hard if variable `use-hard-newlines' is true, unless optional argument SOFT is non-nil." (interactive) (if comment-start (funcall comment-line-break-function soft) ;; Insert the newline before removing empty space so that markers ;; get preserved better. (if soft (insert-and-inherit ?\n) (newline 1)) (save-excursion (forward-char -1) (delete-horizontal-space)) (delete-horizontal-space) (if (and fill-prefix (not adaptive-fill-mode)) ;; Blindly trust a non-adaptive fill-prefix. (progn (indent-to-left-margin) (insert-before-markers-and-inherit fill-prefix)) (cond ;; If there's an adaptive prefix, use it unless we're inside ;; a comment and the prefix is not a comment starter. (fill-prefix (indent-to-left-margin) (insert-and-inherit fill-prefix)) ;; If we're not inside a comment, just try to indent. (t (indent-according-to-mode)))))) (defun internal-auto-fill () "The function called by `self-insert-command' to perform auto-filling." (when (or (not comment-start) (not comment-auto-fill-only-comments) (nth 4 (syntax-ppss))) (funcall auto-fill-function))) (defvar normal-auto-fill-function 'do-auto-fill "The function to use for `auto-fill-function' if Auto Fill mode is turned on. Some major modes set this.") (put 'auto-fill-function :minor-mode-function 'auto-fill-mode) ;; `functions' and `hooks' are usually unsafe to set, but setting ;; auto-fill-function to nil in a file-local setting is safe and ;; can be useful to prevent auto-filling. (put 'auto-fill-function 'safe-local-variable 'null) (define-minor-mode auto-fill-mode "Toggle automatic line breaking (Auto Fill mode). Interactively, with a prefix argument, enable Auto Fill mode if the prefix argument is positive, and disable it otherwise. If called from Lisp, toggle the mode if ARG is `toggle', disable the mode if ARG is a non-positive integer, and enable the mode otherwise \(including if ARG is omitted or nil or a positive integer). When Auto Fill mode is enabled, inserting a space at a column beyond `current-fill-column' automatically breaks the line at a previous space. When `auto-fill-mode' is on, the `auto-fill-function' variable is non-nil. The value of `normal-auto-fill-function' specifies the function to use for `auto-fill-function' when turning Auto Fill mode on." :variable (auto-fill-function . (lambda (v) (setq auto-fill-function (if v normal-auto-fill-function))))) ;; This holds a document string used to document auto-fill-mode. (defun auto-fill-function () "Automatically break line at a previous space, in insertion of text." nil) (defun turn-on-auto-fill () "Unconditionally turn on Auto Fill mode." (auto-fill-mode 1)) (defun turn-off-auto-fill () "Unconditionally turn off Auto Fill mode." (auto-fill-mode -1)) (custom-add-option 'text-mode-hook 'turn-on-auto-fill) (defun set-fill-column (arg) "Set `fill-column' to specified argument. Use \\[universal-argument] followed by a number to specify a column. Just \\[universal-argument] as argument means to use the current column." (interactive (list (or current-prefix-arg ;; We used to use current-column silently, but C-x f is too easily ;; typed as a typo for C-x C-f, so we turned it into an error and ;; now an interactive prompt. (read-number "Set fill-column to: " (current-column))))) (if (consp arg) (setq arg (current-column))) (if (not (integerp arg)) ;; Disallow missing argument; it's probably a typo for C-x C-f. (error "set-fill-column requires an explicit argument") (message "Fill column set to %d (was %d)" arg fill-column) (setq fill-column arg))) (defun set-selective-display (arg) "Set `selective-display' to ARG; clear it if no arg. When the value of `selective-display' is a number > 0, lines whose indentation is >= that value are not displayed. The variable `selective-display' has a separate value for each buffer." (interactive "P") (if (eq selective-display t) (error "selective-display already in use for marked lines")) (let ((current-vpos (save-restriction (narrow-to-region (point-min) (point)) (goto-char (window-start)) (vertical-motion (window-height))))) (setq selective-display (and arg (prefix-numeric-value arg))) (recenter current-vpos)) (set-window-start (selected-window) (window-start)) (princ "selective-display set to " t) (prin1 selective-display t) (princ "." t)) (defvaralias 'indicate-unused-lines 'indicate-empty-lines) (defun toggle-truncate-lines (&optional arg) "Toggle truncating of long lines for the current buffer. When truncating is off, long lines are folded. With prefix argument ARG, truncate long lines if ARG is positive, otherwise fold them. Note that in side-by-side windows, this command has no effect if `truncate-partial-width-windows' is non-nil." (interactive "P") (setq truncate-lines (if (null arg) (not truncate-lines) (> (prefix-numeric-value arg) 0))) (force-mode-line-update) (unless truncate-lines (let ((buffer (current-buffer))) (walk-windows (lambda (window) (if (eq buffer (window-buffer window)) (set-window-hscroll window 0))) nil t))) (message "Truncate long lines %s" (if truncate-lines "enabled" "disabled"))) (defun toggle-word-wrap (&optional arg) "Toggle whether to use word-wrapping for continuation lines. With prefix argument ARG, wrap continuation lines at word boundaries if ARG is positive, otherwise wrap them at the right screen edge. This command toggles the value of `word-wrap'. It has no effect if long lines are truncated." (interactive "P") (setq word-wrap (if (null arg) (not word-wrap) (> (prefix-numeric-value arg) 0))) (force-mode-line-update) (message "Word wrapping %s" (if word-wrap "enabled" "disabled"))) (defvar overwrite-mode-textual (purecopy " Ovwrt") "The string displayed in the mode line when in overwrite mode.") (defvar overwrite-mode-binary (purecopy " Bin Ovwrt") "The string displayed in the mode line when in binary overwrite mode.") (define-minor-mode overwrite-mode "Toggle Overwrite mode. With a prefix argument ARG, enable Overwrite mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil. When Overwrite mode is enabled, printing characters typed in replace existing text on a one-for-one basis, rather than pushing it to the right. At the end of a line, such characters extend the line. Before a tab, such characters insert until the tab is filled in. \\[quoted-insert] still inserts characters in overwrite mode; this is supposed to make it easier to insert characters when necessary." :variable (overwrite-mode . (lambda (v) (setq overwrite-mode (if v 'overwrite-mode-textual))))) (define-minor-mode binary-overwrite-mode "Toggle Binary Overwrite mode. With a prefix argument ARG, enable Binary Overwrite mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil. When Binary Overwrite mode is enabled, printing characters typed in replace existing text. Newlines are not treated specially, so typing at the end of a line joins the line to the next, with the typed character between them. Typing before a tab character simply replaces the tab with the character typed. \\[quoted-insert] replaces the text at the cursor, just as ordinary typing characters do. Note that Binary Overwrite mode is not its own minor mode; it is a specialization of overwrite mode, entered by setting the `overwrite-mode' variable to `overwrite-mode-binary'." :variable (overwrite-mode . (lambda (v) (setq overwrite-mode (if v 'overwrite-mode-binary))))) (define-minor-mode line-number-mode "Toggle line number display in the mode line (Line Number mode). With a prefix argument ARG, enable Line Number mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil. Line numbers do not appear for very large buffers and buffers with very long lines; see variables `line-number-display-limit' and `line-number-display-limit-width'." :init-value t :global t :group 'mode-line) (define-minor-mode column-number-mode "Toggle column number display in the mode line (Column Number mode). With a prefix argument ARG, enable Column Number mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil." :global t :group 'mode-line) (define-minor-mode size-indication-mode "Toggle buffer size display in the mode line (Size Indication mode). With a prefix argument ARG, enable Size Indication mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil." :global t :group 'mode-line) (define-minor-mode auto-save-mode "Toggle auto-saving in the current buffer (Auto Save mode). With a prefix argument ARG, enable Auto Save mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil." :variable ((and buffer-auto-save-file-name ;; If auto-save is off because buffer has shrunk, ;; then toggling should turn it on. (>= buffer-saved-size 0)) . (lambda (val) (setq buffer-auto-save-file-name (cond ((null val) nil) ((and buffer-file-name auto-save-visited-file-name (not buffer-read-only)) buffer-file-name) (t (make-auto-save-file-name)))))) ;; If -1 was stored here, to temporarily turn off saving, ;; turn it back on. (and (< buffer-saved-size 0) (setq buffer-saved-size 0))) (defgroup paren-blinking nil "Blinking matching of parens and expressions." :prefix "blink-matching-" :group 'paren-matching) (defcustom blink-matching-paren t "Non-nil means show matching open-paren when close-paren is inserted. If t, highlight the paren. If `jump', briefly move cursor to its position. If `jump-offscreen', move cursor there even if the position is off screen. With any other non-nil value, the off-screen position of the opening paren will be shown in the echo area." :type '(choice (const :tag "Disable" nil) (const :tag "Highlight" t) (const :tag "Move cursor" jump) (const :tag "Move cursor, even if off screen" jump-offscreen)) :group 'paren-blinking) (defcustom blink-matching-paren-on-screen t "Non-nil means show matching open-paren when it is on screen. If nil, don't show it (but the open-paren can still be shown in the echo area when it is off screen). This variable has no effect if `blink-matching-paren' is nil. \(In that case, the open-paren is never shown.) It is also ignored if `show-paren-mode' is enabled." :type 'boolean :group 'paren-blinking) (defcustom blink-matching-paren-distance (* 100 1024) "If non-nil, maximum distance to search backwards for matching open-paren. If nil, search stops at the beginning of the accessible portion of the buffer." :version "23.2" ; 25->100k :type '(choice (const nil) integer) :group 'paren-blinking) (defcustom blink-matching-delay 1 "Time in seconds to delay after showing a matching paren." :type 'number :group 'paren-blinking) (defcustom blink-matching-paren-dont-ignore-comments nil "If nil, `blink-matching-paren' ignores comments. More precisely, when looking for the matching parenthesis, it skips the contents of comments that end before point." :type 'boolean :group 'paren-blinking) (defun blink-matching-check-mismatch (start end) "Return whether or not START...END are matching parens. END is the current point and START is the blink position. START might be nil if no matching starter was found. Returns non-nil if we find there is a mismatch." (let* ((end-syntax (syntax-after (1- end))) (matching-paren (and (consp end-syntax) (eq (syntax-class end-syntax) 5) (cdr end-syntax)))) ;; For self-matched chars like " and $, we can't know when they're ;; mismatched or unmatched, so we can only do it for parens. (when matching-paren (not (and start (or (eq (char-after start) matching-paren) ;; The cdr might hold a new paren-class info rather than ;; a matching-char info, in which case the two CDRs ;; should match. (eq matching-paren (cdr-safe (syntax-after start))))))))) (defvar blink-matching-check-function #'blink-matching-check-mismatch "Function to check parentheses mismatches. The function takes two arguments (START and END) where START is the position just before the opening token and END is the position right after. START can be nil, if it was not found. The function should return non-nil if the two tokens do not match.") (defvar blink-matching--overlay (let ((ol (make-overlay (point) (point) nil t))) (overlay-put ol 'face 'show-paren-match) (delete-overlay ol) ol) "Overlay used to highlight the matching paren.") (defun blink-matching-open () "Momentarily highlight the beginning of the sexp before point." (interactive) (when (and (not (bobp)) blink-matching-paren) (let* ((oldpos (point)) (message-log-max nil) ; Don't log messages about paren matching. (blinkpos (save-excursion (save-restriction (if blink-matching-paren-distance (narrow-to-region (max (minibuffer-prompt-end) ;(point-min) unless minibuf. (- (point) blink-matching-paren-distance)) oldpos)) (let ((parse-sexp-ignore-comments (and parse-sexp-ignore-comments (not blink-matching-paren-dont-ignore-comments)))) (condition-case () (progn (syntax-propertize (point)) (forward-sexp -1) ;; backward-sexp skips backward over prefix chars, ;; so move back to the matching paren. (while (and (< (point) (1- oldpos)) (let ((code (syntax-after (point)))) (or (eq (syntax-class code) 6) (eq (logand 1048576 (car code)) 1048576)))) (forward-char 1)) (point)) (error nil)))))) (mismatch (funcall blink-matching-check-function blinkpos oldpos))) (cond (mismatch (if blinkpos (if (minibufferp) (minibuffer-message "Mismatched parentheses") (message "Mismatched parentheses")) (if (minibufferp) (minibuffer-message "No matching parenthesis found") (message "No matching parenthesis found")))) ((not blinkpos) nil) ((or (eq blink-matching-paren 'jump-offscreen) (pos-visible-in-window-p blinkpos)) ;; Matching open within window, temporarily move to or highlight ;; char after blinkpos but only if `blink-matching-paren-on-screen' ;; is non-nil. (and blink-matching-paren-on-screen (not show-paren-mode) (if (memq blink-matching-paren '(jump jump-offscreen)) (save-excursion (goto-char blinkpos) (sit-for blink-matching-delay)) (unwind-protect (progn (move-overlay blink-matching--overlay blinkpos (1+ blinkpos) (current-buffer)) (sit-for blink-matching-delay)) (delete-overlay blink-matching--overlay))))) (t (let ((open-paren-line-string (save-excursion (goto-char blinkpos) ;; Show what precedes the open in its line, if anything. (cond ((save-excursion (skip-chars-backward " \t") (not (bolp))) (buffer-substring (line-beginning-position) (1+ blinkpos))) ;; Show what follows the open in its line, if anything. ((save-excursion (forward-char 1) (skip-chars-forward " \t") (not (eolp))) (buffer-substring blinkpos (line-end-position))) ;; Otherwise show the previous nonblank line, ;; if there is one. ((save-excursion (skip-chars-backward "\n \t") (not (bobp))) (concat (buffer-substring (progn (skip-chars-backward "\n \t") (line-beginning-position)) (progn (end-of-line) (skip-chars-backward " \t") (point))) ;; Replace the newline and other whitespace with `...'. "..." (buffer-substring blinkpos (1+ blinkpos)))) ;; There is nothing to show except the char itself. (t (buffer-substring blinkpos (1+ blinkpos))))))) (minibuffer-message "Matches %s" (substring-no-properties open-paren-line-string)))))))) (defvar blink-paren-function 'blink-matching-open "Function called, if non-nil, whenever a close parenthesis is inserted. More precisely, a char with closeparen syntax is self-inserted.") (defun blink-paren-post-self-insert-function () (when (and (eq (char-before) last-command-event) ; Sanity check. (memq (char-syntax last-command-event) '(?\) ?\$)) blink-paren-function (not executing-kbd-macro) (not noninteractive) ;; Verify an even number of quoting characters precede the close. ;; FIXME: Also check if this parenthesis closes a comment as ;; can happen in Pascal and SML. (= 1 (logand 1 (- (point) (save-excursion (forward-char -1) (skip-syntax-backward "/\\") (point)))))) (funcall blink-paren-function))) (put 'blink-paren-post-self-insert-function 'priority 100) (add-hook 'post-self-insert-hook #'blink-paren-post-self-insert-function ;; Most likely, this hook is nil, so this arg doesn't matter, ;; but I use it as a reminder that this function usually ;; likes to be run after others since it does ;; `sit-for'. That's also the reason it get a `priority' prop ;; of 100. 'append) ;; This executes C-g typed while Emacs is waiting for a command. ;; Quitting out of a program does not go through here; ;; that happens in the maybe_quit function at the C code level. (defun keyboard-quit () "Signal a `quit' condition. During execution of Lisp code, this character causes a quit directly. At top-level, as an editor command, this simply beeps." (interactive) ;; Avoid adding the region to the window selection. (setq saved-region-selection nil) (let (select-active-regions) (deactivate-mark)) (if (fboundp 'kmacro-keyboard-quit) (kmacro-keyboard-quit)) (when completion-in-region-mode (completion-in-region-mode -1)) ;; Force the next redisplay cycle to remove the "Def" indicator from ;; all the mode lines. (if defining-kbd-macro (force-mode-line-update t)) (setq defining-kbd-macro nil) (let ((debug-on-quit nil)) (signal 'quit nil))) (defvar buffer-quit-function nil "Function to call to \"quit\" the current buffer, or nil if none. \\[keyboard-escape-quit] calls this function when its more local actions \(such as canceling a prefix argument, minibuffer or region) do not apply.") (defun keyboard-escape-quit () "Exit the current \"mode\" (in a generalized sense of the word). This command can exit an interactive command such as `query-replace', can clear out a prefix argument or a region, can get out of the minibuffer or other recursive edit, cancel the use of the current buffer (for special-purpose buffers), or go back to just one window (by deleting all but the selected window)." (interactive) (cond ((eq last-command 'mode-exited) nil) ((region-active-p) (deactivate-mark)) ((> (minibuffer-depth) 0) (abort-recursive-edit)) (current-prefix-arg nil) ((> (recursion-depth) 0) (exit-recursive-edit)) (buffer-quit-function (funcall buffer-quit-function)) ((not (one-window-p t)) (delete-other-windows)) ((string-match "^ \\*" (buffer-name (current-buffer))) (bury-buffer)))) (defun play-sound-file (file &optional volume device) "Play sound stored in FILE. VOLUME and DEVICE correspond to the keywords of the sound specification for `play-sound'." (interactive "fPlay sound file: ") (let ((sound (list :file file))) (if volume (plist-put sound :volume volume)) (if device (plist-put sound :device device)) (push 'sound sound) (play-sound sound))) (defcustom read-mail-command 'rmail "Your preference for a mail reading package. This is used by some keybindings which support reading mail. See also `mail-user-agent' concerning sending mail." :type '(radio (function-item :tag "Rmail" :format "%t\n" rmail) (function-item :tag "Gnus" :format "%t\n" gnus) (function-item :tag "Emacs interface to MH" :format "%t\n" mh-rmail) (function :tag "Other")) :version "21.1" :group 'mail) (defcustom mail-user-agent 'message-user-agent "Your preference for a mail composition package. Various Emacs Lisp packages (e.g. Reporter) require you to compose an outgoing email message. This variable lets you specify which mail-sending package you prefer. Valid values include: `message-user-agent' -- use the Message package. See Info node `(message)'. `sendmail-user-agent' -- use the Mail package. See Info node `(emacs)Sending Mail'. `mh-e-user-agent' -- use the Emacs interface to the MH mail system. See Info node `(mh-e)'. `gnus-user-agent' -- like `message-user-agent', but with Gnus paraphernalia if Gnus is running, particularly the Gcc: header for archiving. Additional valid symbols may be available; check with the author of your package for details. The function should return non-nil if it succeeds. See also `read-mail-command' concerning reading mail." :type '(radio (function-item :tag "Message package" :format "%t\n" message-user-agent) (function-item :tag "Mail package" :format "%t\n" sendmail-user-agent) (function-item :tag "Emacs interface to MH" :format "%t\n" mh-e-user-agent) (function-item :tag "Message with full Gnus features" :format "%t\n" gnus-user-agent) (function :tag "Other")) :version "23.2" ; sendmail->message :group 'mail) (defcustom compose-mail-user-agent-warnings t "If non-nil, `compose-mail' warns about changes in `mail-user-agent'. If the value of `mail-user-agent' is the default, and the user appears to have customizations applying to the old default, `compose-mail' issues a warning." :type 'boolean :version "23.2" :group 'mail) (defun rfc822-goto-eoh () "If the buffer starts with a mail header, move point to the header's end. Otherwise, moves to `point-min'. The end of the header is the start of the next line, if there is one, else the end of the last line. This function obeys RFC822." (goto-char (point-min)) (when (re-search-forward "^\\([:\n]\\|[^: \t\n]+[ \t\n]\\)" nil 'move) (goto-char (match-beginning 0)))) ;; Used by Rmail (e.g., rmail-forward). (defvar mail-encode-mml nil "If non-nil, mail-user-agent's `sendfunc' command should mml-encode the outgoing message before sending it.") (defun compose-mail (&optional to subject other-headers continue switch-function yank-action send-actions return-action) "Start composing a mail message to send. This uses the user's chosen mail composition package as selected with the variable `mail-user-agent'. The optional arguments TO and SUBJECT specify recipients and the initial Subject field, respectively. OTHER-HEADERS is an alist specifying additional header fields. Elements look like (HEADER . VALUE) where both HEADER and VALUE are strings. CONTINUE, if non-nil, says to continue editing a message already being composed. Interactively, CONTINUE is the prefix argument. SWITCH-FUNCTION, if non-nil, is a function to use to switch to and display the buffer used for mail composition. YANK-ACTION, if non-nil, is an action to perform, if and when necessary, to insert the raw text of the message being replied to. It has the form (FUNCTION . ARGS). The user agent will apply FUNCTION to ARGS, to insert the raw text of the original message. \(The user agent will also run `mail-citation-hook', *after* the original text has been inserted in this way.) SEND-ACTIONS is a list of actions to call when the message is sent. Each action has the form (FUNCTION . ARGS). RETURN-ACTION, if non-nil, is an action for returning to the caller. It has the form (FUNCTION . ARGS). The function is called after the mail has been sent or put aside, and the mail buffer buried." (interactive (list nil nil nil current-prefix-arg)) ;; In Emacs 23.2, the default value of `mail-user-agent' changed ;; from sendmail-user-agent to message-user-agent. Some users may ;; encounter incompatibilities. This hack tries to detect problems ;; and warn about them. (and compose-mail-user-agent-warnings (eq mail-user-agent 'message-user-agent) (let (warn-vars) (dolist (var '(mail-mode-hook mail-send-hook mail-setup-hook mail-yank-hooks mail-archive-file-name mail-default-reply-to mail-mailing-lists mail-self-blind)) (and (boundp var) (symbol-value var) (push var warn-vars))) (when warn-vars (display-warning 'mail (format-message "\ The default mail mode is now Message mode. You have the following Mail mode variable%s customized: \n %s\n\nTo use Mail mode, set `mail-user-agent' to sendmail-user-agent. To disable this warning, set `compose-mail-user-agent-warnings' to nil." (if (> (length warn-vars) 1) "s" "") (mapconcat 'symbol-name warn-vars " ")))))) (let ((function (get mail-user-agent 'composefunc))) (funcall function to subject other-headers continue switch-function yank-action send-actions return-action))) (defun compose-mail-other-window (&optional to subject other-headers continue yank-action send-actions return-action) "Like \\[compose-mail], but edit the outgoing message in another window." (interactive (list nil nil nil current-prefix-arg)) (compose-mail to subject other-headers continue 'switch-to-buffer-other-window yank-action send-actions return-action)) (defun compose-mail-other-frame (&optional to subject other-headers continue yank-action send-actions return-action) "Like \\[compose-mail], but edit the outgoing message in another frame." (interactive (list nil nil nil current-prefix-arg)) (compose-mail to subject other-headers continue 'switch-to-buffer-other-frame yank-action send-actions return-action)) (defvar set-variable-value-history nil "History of values entered with `set-variable'. Maximum length of the history list is determined by the value of `history-length', which see.") (defun set-variable (variable value &optional make-local) "Set VARIABLE to VALUE. VALUE is a Lisp object. VARIABLE should be a user option variable name, a Lisp variable meant to be customized by users. You should enter VALUE in Lisp syntax, so if you want VALUE to be a string, you must surround it with doublequotes. VALUE is used literally, not evaluated. If VARIABLE has a `variable-interactive' property, that is used as if it were the arg to `interactive' (which see) to interactively read VALUE. If VARIABLE has been defined with `defcustom', then the type information in the definition is used to check that VALUE is valid. Note that this function is at heart equivalent to the basic `set' function. For a variable defined with `defcustom', it does not pay attention to any :set property that the variable might have (if you want that, use \\[customize-set-variable] instead). With a prefix argument, set VARIABLE to VALUE buffer-locally." (interactive (let* ((default-var (variable-at-point)) (var (if (custom-variable-p default-var) (read-variable (format "Set variable (default %s): " default-var) default-var) (read-variable "Set variable: "))) (minibuffer-help-form '(describe-variable var)) (prop (get var 'variable-interactive)) (obsolete (car (get var 'byte-obsolete-variable))) (prompt (format "Set %s %s to value: " var (cond ((local-variable-p var) "(buffer-local)") ((or current-prefix-arg (local-variable-if-set-p var)) "buffer-locally") (t "globally")))) (val (progn (when obsolete (message (concat "`%S' is obsolete; " (if (symbolp obsolete) "use `%S' instead" "%s")) var obsolete) (sit-for 3)) (if prop ;; Use VAR's `variable-interactive' property ;; as an interactive spec for prompting. (call-interactively `(lambda (arg) (interactive ,prop) arg)) (read-from-minibuffer prompt nil read-expression-map t 'set-variable-value-history (format "%S" (symbol-value var))))))) (list var val current-prefix-arg))) (and (custom-variable-p variable) (not (get variable 'custom-type)) (custom-load-symbol variable)) (let ((type (get variable 'custom-type))) (when type ;; Match with custom type. (require 'cus-edit) (setq type (widget-convert type)) (unless (widget-apply type :match value) (user-error "Value `%S' does not match type %S of %S" value (car type) variable)))) (if make-local (make-local-variable variable)) (set variable value) ;; Force a thorough redisplay for the case that the variable ;; has an effect on the display, like `tab-width' has. (force-mode-line-update)) ;; Define the major mode for lists of completions. (defvar completion-list-mode-map (let ((map (make-sparse-keymap))) (define-key map [mouse-2] 'choose-completion) (define-key map [follow-link] 'mouse-face) (define-key map [down-mouse-2] nil) (define-key map "\C-m" 'choose-completion) (define-key map "\e\e\e" 'delete-completion-window) (define-key map [left] 'previous-completion) (define-key map [right] 'next-completion) (define-key map [?\t] 'next-completion) (define-key map [backtab] 'previous-completion) (define-key map "q" 'quit-window) (define-key map "z" 'kill-current-buffer) map) "Local map for completion list buffers.") ;; Completion mode is suitable only for specially formatted data. (put 'completion-list-mode 'mode-class 'special) (defvar completion-reference-buffer nil "Record the buffer that was current when the completion list was requested. This is a local variable in the completion list buffer. Initial value is nil to avoid some compiler warnings.") (defvar completion-no-auto-exit nil "Non-nil means `choose-completion-string' should never exit the minibuffer. This also applies to other functions such as `choose-completion'.") (defvar completion-base-position nil "Position of the base of the text corresponding to the shown completions. This variable is used in the *Completions* buffers. Its value is a list of the form (START END) where START is the place where the completion should be inserted and END (if non-nil) is the end of the text to replace. If END is nil, point is used instead.") (defvar completion-list-insert-choice-function #'completion--replace "Function to use to insert the text chosen in *Completions*. Called with three arguments (BEG END TEXT), it should replace the text between BEG and END with TEXT. Expected to be set buffer-locally in the *Completions* buffer.") (defvar completion-base-size nil "Number of chars before point not involved in completion. This is a local variable in the completion list buffer. It refers to the chars in the minibuffer if completing in the minibuffer, or in `completion-reference-buffer' otherwise. Only characters in the field at point are included. If nil, Emacs determines which part of the tail end of the buffer's text is involved in completion by comparing the text directly.") (make-obsolete-variable 'completion-base-size 'completion-base-position "23.2") (defun delete-completion-window () "Delete the completion list window. Go to the window from which completion was requested." (interactive) (let ((buf completion-reference-buffer)) (if (one-window-p t) (if (window-dedicated-p) (delete-frame)) (delete-window (selected-window)) (if (get-buffer-window buf) (select-window (get-buffer-window buf)))))) (defun previous-completion (n) "Move to the previous item in the completion list." (interactive "p") (next-completion (- n))) (defun next-completion (n) "Move to the next item in the completion list. With prefix argument N, move N items (negative N means move backward)." (interactive "p") (let ((beg (point-min)) (end (point-max))) (while (and (> n 0) (not (eobp))) ;; If in a completion, move to the end of it. (when (get-text-property (point) 'mouse-face) (goto-char (next-single-property-change (point) 'mouse-face nil end))) ;; Move to start of next one. (unless (get-text-property (point) 'mouse-face) (goto-char (next-single-property-change (point) 'mouse-face nil end))) (setq n (1- n))) (while (and (< n 0) (not (bobp))) (let ((prop (get-text-property (1- (point)) 'mouse-face))) ;; If in a completion, move to the start of it. (when (and prop (eq prop (get-text-property (point) 'mouse-face))) (goto-char (previous-single-property-change (point) 'mouse-face nil beg))) ;; Move to end of the previous completion. (unless (or (bobp) (get-text-property (1- (point)) 'mouse-face)) (goto-char (previous-single-property-change (point) 'mouse-face nil beg))) ;; Move to the start of that one. (goto-char (previous-single-property-change (point) 'mouse-face nil beg)) (setq n (1+ n)))))) (defun choose-completion (&optional event) "Choose the completion at point. If EVENT, use EVENT's position to determine the starting position." (interactive (list last-nonmenu-event)) ;; In case this is run via the mouse, give temporary modes such as ;; isearch a chance to turn off. (run-hooks 'mouse-leave-buffer-hook) (with-current-buffer (window-buffer (posn-window (event-start event))) (let ((buffer completion-reference-buffer) (base-size completion-base-size) (base-position completion-base-position) (insert-function completion-list-insert-choice-function) (choice (save-excursion (goto-char (posn-point (event-start event))) (let (beg end) (cond ((and (not (eobp)) (get-text-property (point) 'mouse-face)) (setq end (point) beg (1+ (point)))) ((and (not (bobp)) (get-text-property (1- (point)) 'mouse-face)) (setq end (1- (point)) beg (point))) (t (error "No completion here"))) (setq beg (previous-single-property-change beg 'mouse-face)) (setq end (or (next-single-property-change end 'mouse-face) (point-max))) (buffer-substring-no-properties beg end))))) (unless (buffer-live-p buffer) (error "Destination buffer is dead")) (quit-window nil (posn-window (event-start event))) (with-current-buffer buffer (choose-completion-string choice buffer (or base-position (when base-size ;; Someone's using old completion code that doesn't know ;; about base-position yet. (list (+ base-size (field-beginning)))) ;; If all else fails, just guess. (list (choose-completion-guess-base-position choice))) insert-function))))) ;; Delete the longest partial match for STRING ;; that can be found before POINT. (defun choose-completion-guess-base-position (string) (save-excursion (let ((opoint (point)) len) ;; Try moving back by the length of the string. (goto-char (max (- (point) (length string)) (minibuffer-prompt-end))) ;; See how far back we were actually able to move. That is the ;; upper bound on how much we can match and delete. (setq len (- opoint (point))) (if completion-ignore-case (setq string (downcase string))) (while (and (> len 0) (let ((tail (buffer-substring (point) opoint))) (if completion-ignore-case (setq tail (downcase tail))) (not (string= tail (substring string 0 len))))) (setq len (1- len)) (forward-char 1)) (point)))) (defun choose-completion-delete-max-match (string) (declare (obsolete choose-completion-guess-base-position "23.2")) (delete-region (choose-completion-guess-base-position string) (point))) (defvar choose-completion-string-functions nil "Functions that may override the normal insertion of a completion choice. These functions are called in order with three arguments: CHOICE - the string to insert in the buffer, BUFFER - the buffer in which the choice should be inserted, BASE-POSITION - where to insert the completion. If a function in the list returns non-nil, that function is supposed to have inserted the CHOICE in the BUFFER, and possibly exited the minibuffer; no further functions will be called. If all functions in the list return nil, that means to use the default method of inserting the completion in BUFFER.") (defun choose-completion-string (choice &optional buffer base-position insert-function) "Switch to BUFFER and insert the completion choice CHOICE. BASE-POSITION says where to insert the completion. INSERT-FUNCTION says how to insert the completion and falls back on `completion-list-insert-choice-function' when nil." ;; If BUFFER is the minibuffer, exit the minibuffer ;; unless it is reading a file name and CHOICE is a directory, ;; or completion-no-auto-exit is non-nil. ;; Some older code may call us passing `base-size' instead of ;; `base-position'. It's difficult to make any use of `base-size', ;; so we just ignore it. (unless (consp base-position) (message "Obsolete `base-size' passed to choose-completion-string") (setq base-position nil)) (let* ((buffer (or buffer completion-reference-buffer)) (mini-p (minibufferp buffer))) ;; If BUFFER is a minibuffer, barf unless it's the currently ;; active minibuffer. (if (and mini-p (not (and (active-minibuffer-window) (equal buffer (window-buffer (active-minibuffer-window)))))) (error "Minibuffer is not active for completion") ;; Set buffer so buffer-local choose-completion-string-functions works. (set-buffer buffer) (unless (run-hook-with-args-until-success 'choose-completion-string-functions ;; The fourth arg used to be `mini-p' but was useless ;; (since minibufferp can be used on the `buffer' arg) ;; and indeed unused. The last used to be `base-size', so we ;; keep it to try and avoid breaking old code. choice buffer base-position nil) ;; This remove-text-properties should be unnecessary since `choice' ;; comes from buffer-substring-no-properties. ;;(remove-text-properties 0 (length choice) '(mouse-face nil) choice) ;; Insert the completion into the buffer where it was requested. (funcall (or insert-function completion-list-insert-choice-function) (or (car base-position) (point)) (or (cadr base-position) (point)) choice) ;; Update point in the window that BUFFER is showing in. (let ((window (get-buffer-window buffer t))) (set-window-point window (point))) ;; If completing for the minibuffer, exit it with this choice. (and (not completion-no-auto-exit) (minibufferp buffer) minibuffer-completion-table ;; If this is reading a file name, and the file name chosen ;; is a directory, don't exit the minibuffer. (let* ((result (buffer-substring (field-beginning) (point))) (bounds (completion-boundaries result minibuffer-completion-table minibuffer-completion-predicate ""))) (if (eq (car bounds) (length result)) ;; The completion chosen leads to a new set of completions ;; (e.g. it's a directory): don't exit the minibuffer yet. (let ((mini (active-minibuffer-window))) (select-window mini) (when minibuffer-auto-raise (raise-frame (window-frame mini)))) (exit-minibuffer)))))))) (define-derived-mode completion-list-mode nil "Completion List" "Major mode for buffers showing lists of possible completions. Type \\\\[choose-completion] in the completion list\ to select the completion near point. Or click to select one with the mouse. \\{completion-list-mode-map}" (set (make-local-variable 'completion-base-size) nil)) (defun completion-list-mode-finish () "Finish setup of the completions buffer. Called from `temp-buffer-show-hook'." (when (eq major-mode 'completion-list-mode) (setq buffer-read-only t))) (add-hook 'temp-buffer-show-hook 'completion-list-mode-finish) ;; Variables and faces used in `completion-setup-function'. (defcustom completion-show-help t "Non-nil means show help message in *Completions* buffer." :type 'boolean :version "22.1" :group 'completion) ;; This function goes in completion-setup-hook, so that it is called ;; after the text of the completion list buffer is written. (defun completion-setup-function () (let* ((mainbuf (current-buffer)) (base-dir ;; FIXME: This is a bad hack. We try to set the default-directory ;; in the *Completions* buffer so that the relative file names ;; displayed there can be treated as valid file names, independently ;; from the completion context. But this suffers from many problems: ;; - It's not clear when the completions are file names. With some ;; completion tables (e.g. bzr revision specs), the listed ;; completions can mix file names and other things. ;; - It doesn't pay attention to possible quoting. ;; - With fancy completion styles, the code below will not always ;; find the right base directory. (if minibuffer-completing-file-name (file-name-as-directory (expand-file-name (buffer-substring (minibuffer-prompt-end) (- (point) (or completion-base-size 0)))))))) (with-current-buffer standard-output (let ((base-size completion-base-size) ;Read before killing localvars. (base-position completion-base-position) (insert-fun completion-list-insert-choice-function)) (completion-list-mode) (set (make-local-variable 'completion-base-size) base-size) (set (make-local-variable 'completion-base-position) base-position) (set (make-local-variable 'completion-list-insert-choice-function) insert-fun)) (set (make-local-variable 'completion-reference-buffer) mainbuf) (if base-dir (setq default-directory base-dir)) ;; Maybe insert help string. (when completion-show-help (goto-char (point-min)) (if (display-mouse-p) (insert "Click on a completion to select it.\n")) (insert (substitute-command-keys "In this buffer, type \\[choose-completion] to \ select the completion near point.\n\n")))))) (add-hook 'completion-setup-hook 'completion-setup-function) (define-key minibuffer-local-completion-map [prior] 'switch-to-completions) (define-key minibuffer-local-completion-map "\M-v" 'switch-to-completions) (defun switch-to-completions () "Select the completion list window." (interactive) (let ((window (or (get-buffer-window "*Completions*" 0) ;; Make sure we have a completions window. (progn (minibuffer-completion-help) (get-buffer-window "*Completions*" 0))))) (when window (select-window window) ;; In the new buffer, go to the first completion. ;; FIXME: Perhaps this should be done in `minibuffer-completion-help'. (when (bobp) (next-completion 1))))) ;;; Support keyboard commands to turn on various modifiers. ;; These functions -- which are not commands -- each add one modifier ;; to the following event. (defun event-apply-alt-modifier (_ignore-prompt) "\\Add the Alt modifier to the following event. For example, type \\[event-apply-alt-modifier] & to enter Alt-&." (vector (event-apply-modifier (read-event) 'alt 22 "A-"))) (defun event-apply-super-modifier (_ignore-prompt) "\\Add the Super modifier to the following event. For example, type \\[event-apply-super-modifier] & to enter Super-&." (vector (event-apply-modifier (read-event) 'super 23 "s-"))) (defun event-apply-hyper-modifier (_ignore-prompt) "\\Add the Hyper modifier to the following event. For example, type \\[event-apply-hyper-modifier] & to enter Hyper-&." (vector (event-apply-modifier (read-event) 'hyper 24 "H-"))) (defun event-apply-shift-modifier (_ignore-prompt) "\\Add the Shift modifier to the following event. For example, type \\[event-apply-shift-modifier] & to enter Shift-&." (vector (event-apply-modifier (read-event) 'shift 25 "S-"))) (defun event-apply-control-modifier (_ignore-prompt) "\\Add the Ctrl modifier to the following event. For example, type \\[event-apply-control-modifier] & to enter Ctrl-&." (vector (event-apply-modifier (read-event) 'control 26 "C-"))) (defun event-apply-meta-modifier (_ignore-prompt) "\\Add the Meta modifier to the following event. For example, type \\[event-apply-meta-modifier] & to enter Meta-&." (vector (event-apply-modifier (read-event) 'meta 27 "M-"))) (defun event-apply-modifier (event symbol lshiftby prefix) "Apply a modifier flag to event EVENT. SYMBOL is the name of this modifier, as a symbol. LSHIFTBY is the numeric value of this modifier, in keyboard events. PREFIX is the string that represents this modifier in an event type symbol." (if (numberp event) (cond ((eq symbol 'control) (if (and (<= (downcase event) ?z) (>= (downcase event) ?a)) (- (downcase event) ?a -1) (if (and (<= (downcase event) ?Z) (>= (downcase event) ?A)) (- (downcase event) ?A -1) (logior (lsh 1 lshiftby) event)))) ((eq symbol 'shift) (if (and (<= (downcase event) ?z) (>= (downcase event) ?a)) (upcase event) (logior (lsh 1 lshiftby) event))) (t (logior (lsh 1 lshiftby) event))) (if (memq symbol (event-modifiers event)) event (let ((event-type (if (symbolp event) event (car event)))) (setq event-type (intern (concat prefix (symbol-name event-type)))) (if (symbolp event) event-type (cons event-type (cdr event))))))) (define-key function-key-map [?\C-x ?@ ?h] 'event-apply-hyper-modifier) (define-key function-key-map [?\C-x ?@ ?s] 'event-apply-super-modifier) (define-key function-key-map [?\C-x ?@ ?m] 'event-apply-meta-modifier) (define-key function-key-map [?\C-x ?@ ?a] 'event-apply-alt-modifier) (define-key function-key-map [?\C-x ?@ ?S] 'event-apply-shift-modifier) (define-key function-key-map [?\C-x ?@ ?c] 'event-apply-control-modifier) ;;;; Keypad support. ;; Make the keypad keys act like ordinary typing keys. If people add ;; bindings for the function key symbols, then those bindings will ;; override these, so this shouldn't interfere with any existing ;; bindings. ;; Also tell read-char how to handle these keys. (mapc (lambda (keypad-normal) (let ((keypad (nth 0 keypad-normal)) (normal (nth 1 keypad-normal))) (put keypad 'ascii-character normal) (define-key function-key-map (vector keypad) (vector normal)))) ;; See also kp-keys bound in bindings.el. '((kp-space ?\s) (kp-tab ?\t) (kp-enter ?\r) (kp-separator ?,) (kp-equal ?=) ;; Do the same for various keys that are represented as symbols under ;; GUIs but naturally correspond to characters. (backspace 127) (delete 127) (tab ?\t) (linefeed ?\n) (clear ?\C-l) (return ?\C-m) (escape ?\e) )) ;;;; ;;;; forking a twin copy of a buffer. ;;;; (defvar clone-buffer-hook nil "Normal hook to run in the new buffer at the end of `clone-buffer'.") (defvar clone-indirect-buffer-hook nil "Normal hook to run in the new buffer at the end of `clone-indirect-buffer'.") (defun clone-process (process &optional newname) "Create a twin copy of PROCESS. If NEWNAME is nil, it defaults to PROCESS' name; NEWNAME is modified by adding or incrementing at the end as necessary. If PROCESS is associated with a buffer, the new process will be associated with the current buffer instead. Returns nil if PROCESS has already terminated." (setq newname (or newname (process-name process))) (if (string-match "<[0-9]+>\\'" newname) (setq newname (substring newname 0 (match-beginning 0)))) (when (memq (process-status process) '(run stop open)) (let* ((process-connection-type (process-tty-name process)) (new-process (if (memq (process-status process) '(open)) (let ((args (process-contact process t))) (setq args (plist-put args :name newname)) (setq args (plist-put args :buffer (if (process-buffer process) (current-buffer)))) (apply 'make-network-process args)) (apply 'start-process newname (if (process-buffer process) (current-buffer)) (process-command process))))) (set-process-query-on-exit-flag new-process (process-query-on-exit-flag process)) (set-process-inherit-coding-system-flag new-process (process-inherit-coding-system-flag process)) (set-process-filter new-process (process-filter process)) (set-process-sentinel new-process (process-sentinel process)) (set-process-plist new-process (copy-sequence (process-plist process))) new-process))) ;; things to maybe add (currently partly covered by `funcall mode'): ;; - syntax-table ;; - overlays (defun clone-buffer (&optional newname display-flag) "Create and return a twin copy of the current buffer. Unlike an indirect buffer, the new buffer can be edited independently of the old one (if it is not read-only). NEWNAME is the name of the new buffer. It may be modified by adding or incrementing at the end as necessary to create a unique buffer name. If nil, it defaults to the name of the current buffer, with the proper suffix. If DISPLAY-FLAG is non-nil, the new buffer is shown with `pop-to-buffer'. Trying to clone a file-visiting buffer, or a buffer whose major mode symbol has a non-nil `no-clone' property, results in an error. Interactively, DISPLAY-FLAG is t and NEWNAME is the name of the current buffer with appropriate suffix. However, if a prefix argument is given, then the command prompts for NEWNAME in the minibuffer. This runs the normal hook `clone-buffer-hook' in the new buffer after it has been set up properly in other respects." (interactive (progn (if buffer-file-name (error "Cannot clone a file-visiting buffer")) (if (get major-mode 'no-clone) (error "Cannot clone a buffer in %s mode" mode-name)) (list (if current-prefix-arg (read-buffer "Name of new cloned buffer: " (current-buffer))) t))) (if buffer-file-name (error "Cannot clone a file-visiting buffer")) (if (get major-mode 'no-clone) (error "Cannot clone a buffer in %s mode" mode-name)) (setq newname (or newname (buffer-name))) (if (string-match "<[0-9]+>\\'" newname) (setq newname (substring newname 0 (match-beginning 0)))) (let ((buf (current-buffer)) (ptmin (point-min)) (ptmax (point-max)) (pt (point)) (mk (if mark-active (mark t))) (modified (buffer-modified-p)) (mode major-mode) (lvars (buffer-local-variables)) (process (get-buffer-process (current-buffer))) (new (generate-new-buffer (or newname (buffer-name))))) (save-restriction (widen) (with-current-buffer new (insert-buffer-substring buf))) (with-current-buffer new (narrow-to-region ptmin ptmax) (goto-char pt) (if mk (set-mark mk)) (set-buffer-modified-p modified) ;; Clone the old buffer's process, if any. (when process (clone-process process)) ;; Now set up the major mode. (funcall mode) ;; Set up other local variables. (mapc (lambda (v) (condition-case () ;in case var is read-only (if (symbolp v) (makunbound v) (set (make-local-variable (car v)) (cdr v))) (error nil))) lvars) ;; Run any hooks (typically set up by the major mode ;; for cloning to work properly). (run-hooks 'clone-buffer-hook)) (if display-flag ;; Presumably the current buffer is shown in the selected frame, so ;; we want to display the clone elsewhere. (let ((same-window-regexps nil) (same-window-buffer-names)) (pop-to-buffer new))) new)) (defun clone-indirect-buffer (newname display-flag &optional norecord) "Create an indirect buffer that is a twin copy of the current buffer. Give the indirect buffer name NEWNAME. Interactively, read NEWNAME from the minibuffer when invoked with a prefix arg. If NEWNAME is nil or if not called with a prefix arg, NEWNAME defaults to the current buffer's name. The name is modified by adding a `' suffix to it or by incrementing the N in an existing suffix. Trying to clone a buffer whose major mode symbol has a non-nil `no-clone-indirect' property results in an error. DISPLAY-FLAG non-nil means show the new buffer with `pop-to-buffer'. This is always done when called interactively. Optional third arg NORECORD non-nil means do not put this buffer at the front of the list of recently selected ones. Returns the newly created indirect buffer." (interactive (progn (if (get major-mode 'no-clone-indirect) (error "Cannot indirectly clone a buffer in %s mode" mode-name)) (list (if current-prefix-arg (read-buffer "Name of indirect buffer: " (current-buffer))) t))) (if (get major-mode 'no-clone-indirect) (error "Cannot indirectly clone a buffer in %s mode" mode-name)) (setq newname (or newname (buffer-name))) (if (string-match "<[0-9]+>\\'" newname) (setq newname (substring newname 0 (match-beginning 0)))) (let* ((name (generate-new-buffer-name newname)) (buffer (make-indirect-buffer (current-buffer) name t))) (with-current-buffer buffer (run-hooks 'clone-indirect-buffer-hook)) (when display-flag (pop-to-buffer buffer nil norecord)) buffer)) (defun clone-indirect-buffer-other-window (newname display-flag &optional norecord) "Like `clone-indirect-buffer' but display in another window." (interactive (progn (if (get major-mode 'no-clone-indirect) (error "Cannot indirectly clone a buffer in %s mode" mode-name)) (list (if current-prefix-arg (read-buffer "Name of indirect buffer: " (current-buffer))) t))) (let ((pop-up-windows t)) (clone-indirect-buffer newname display-flag norecord))) ;;; Handling of Backspace and Delete keys. (defcustom normal-erase-is-backspace 'maybe "Set the default behavior of the Delete and Backspace keys. If set to t, Delete key deletes forward and Backspace key deletes backward. If set to nil, both Delete and Backspace keys delete backward. If set to `maybe' (which is the default), Emacs automatically selects a behavior. On window systems, the behavior depends on the keyboard used. If the keyboard has both a Backspace key and a Delete key, and both are mapped to their usual meanings, the option's default value is set to t, so that Backspace can be used to delete backward, and Delete can be used to delete forward. If not running under a window system, customizing this option accomplishes a similar effect by mapping C-h, which is usually generated by the Backspace key, to DEL, and by mapping DEL to C-d via `keyboard-translate'. The former functionality of C-h is available on the F1 key. You should probably not use this setting if you don't have both Backspace, Delete and F1 keys. Setting this variable with setq doesn't take effect. Programmatically, call `normal-erase-is-backspace-mode' (which see) instead." :type '(choice (const :tag "Off" nil) (const :tag "Maybe" maybe) (other :tag "On" t)) :group 'editing-basics :version "21.1" :set (lambda (symbol value) ;; The fboundp is because of a problem with :set when ;; dumping Emacs. It doesn't really matter. (if (fboundp 'normal-erase-is-backspace-mode) (normal-erase-is-backspace-mode (or value 0)) (set-default symbol value)))) (defun normal-erase-is-backspace-setup-frame (&optional frame) "Set up `normal-erase-is-backspace-mode' on FRAME, if necessary." (unless frame (setq frame (selected-frame))) (with-selected-frame frame (unless (terminal-parameter nil 'normal-erase-is-backspace) (normal-erase-is-backspace-mode (if (if (eq normal-erase-is-backspace 'maybe) (and (not noninteractive) (or (memq system-type '(ms-dos windows-nt)) (memq window-system '(w32 ns)) (and (memq window-system '(x)) (fboundp 'x-backspace-delete-keys-p) (x-backspace-delete-keys-p)) ;; If the terminal Emacs is running on has erase char ;; set to ^H, use the Backspace key for deleting ;; backward, and the Delete key for deleting forward. (and (null window-system) (eq tty-erase-char ?\^H)))) normal-erase-is-backspace) 1 0))))) (define-minor-mode normal-erase-is-backspace-mode "Toggle the Erase and Delete mode of the Backspace and Delete keys. With a prefix argument ARG, enable this feature if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil. On window systems, when this mode is on, Delete is mapped to C-d and Backspace is mapped to DEL; when this mode is off, both Delete and Backspace are mapped to DEL. (The remapping goes via `local-function-key-map', so binding Delete or Backspace in the global or local keymap will override that.) In addition, on window systems, the bindings of C-Delete, M-Delete, C-M-Delete, C-Backspace, M-Backspace, and C-M-Backspace are changed in the global keymap in accordance with the functionality of Delete and Backspace. For example, if Delete is remapped to C-d, which deletes forward, C-Delete is bound to `kill-word', but if Delete is remapped to DEL, which deletes backward, C-Delete is bound to `backward-kill-word'. If not running on a window system, a similar effect is accomplished by remapping C-h (normally produced by the Backspace key) and DEL via `keyboard-translate': if this mode is on, C-h is mapped to DEL and DEL to C-d; if it's off, the keys are not remapped. When not running on a window system, and this mode is turned on, the former functionality of C-h is available on the F1 key. You should probably not turn on this mode on a text-only terminal if you don't have both Backspace, Delete and F1 keys. See also `normal-erase-is-backspace'." :variable ((eq (terminal-parameter nil 'normal-erase-is-backspace) 1) . (lambda (v) (setf (terminal-parameter nil 'normal-erase-is-backspace) (if v 1 0)))) (let ((enabled (eq 1 (terminal-parameter nil 'normal-erase-is-backspace)))) (cond ((or (memq window-system '(x w32 ns pc)) (memq system-type '(ms-dos windows-nt))) (let ((bindings `(([M-delete] [M-backspace]) ([C-M-delete] [C-M-backspace]) ([?\e C-delete] [?\e C-backspace])))) (if enabled (progn (define-key local-function-key-map [delete] [deletechar]) (define-key local-function-key-map [kp-delete] [deletechar]) (define-key local-function-key-map [backspace] [?\C-?]) (dolist (b bindings) ;; Not sure if input-decode-map is really right, but ;; keyboard-translate-table (used below) only works ;; for integer events, and key-translation-table is ;; global (like the global-map, used earlier). (define-key input-decode-map (car b) nil) (define-key input-decode-map (cadr b) nil))) (define-key local-function-key-map [delete] [?\C-?]) (define-key local-function-key-map [kp-delete] [?\C-?]) (define-key local-function-key-map [backspace] [?\C-?]) (dolist (b bindings) (define-key input-decode-map (car b) (cadr b)) (define-key input-decode-map (cadr b) (car b)))))) (t (if enabled (progn (keyboard-translate ?\C-h ?\C-?) (keyboard-translate ?\C-? ?\C-d)) (keyboard-translate ?\C-h ?\C-h) (keyboard-translate ?\C-? ?\C-?)))) (if (called-interactively-p 'interactive) (message "Delete key deletes %s" (if (eq 1 (terminal-parameter nil 'normal-erase-is-backspace)) "forward" "backward"))))) (defvar vis-mode-saved-buffer-invisibility-spec nil "Saved value of `buffer-invisibility-spec' when Visible mode is on.") (define-minor-mode read-only-mode "Change whether the current buffer is read-only. With prefix argument ARG, make the buffer read-only if ARG is positive, otherwise make it writable. If buffer is read-only and `view-read-only' is non-nil, enter view mode. Do not call this from a Lisp program unless you really intend to do the same thing as the \\[read-only-mode] command, including possibly enabling or disabling View mode. Also, note that this command works by setting the variable `buffer-read-only', which does not affect read-only regions caused by text properties. To ignore read-only status in a Lisp program (whether due to text properties or buffer state), bind `inhibit-read-only' temporarily to a non-nil value." :variable buffer-read-only (cond ((and (not buffer-read-only) view-mode) (View-exit-and-edit) (make-local-variable 'view-read-only) (setq view-read-only t)) ; Must leave view mode. ((and buffer-read-only view-read-only ;; If view-mode is already active, `view-mode-enter' is a nop. (not view-mode) (not (eq (get major-mode 'mode-class) 'special))) (view-mode-enter)))) (define-minor-mode visible-mode "Toggle making all invisible text temporarily visible (Visible mode). With a prefix argument ARG, enable Visible mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil. This mode works by saving the value of `buffer-invisibility-spec' and setting it to nil." :lighter " Vis" :group 'editing-basics (when (local-variable-p 'vis-mode-saved-buffer-invisibility-spec) (setq buffer-invisibility-spec vis-mode-saved-buffer-invisibility-spec) (kill-local-variable 'vis-mode-saved-buffer-invisibility-spec)) (when visible-mode (set (make-local-variable 'vis-mode-saved-buffer-invisibility-spec) buffer-invisibility-spec) (setq buffer-invisibility-spec nil))) (defvar messages-buffer-mode-map (let ((map (make-sparse-keymap))) (set-keymap-parent map special-mode-map) (define-key map "g" nil) ; nothing to revert map)) (define-derived-mode messages-buffer-mode special-mode "Messages" "Major mode used in the \"*Messages*\" buffer.") (defun messages-buffer () "Return the \"*Messages*\" buffer. If it does not exist, create and it switch it to `messages-buffer-mode'." (or (get-buffer "*Messages*") (with-current-buffer (get-buffer-create "*Messages*") (messages-buffer-mode) (current-buffer)))) ;; Minibuffer prompt stuff. ;;(defun minibuffer-prompt-modification (start end) ;; (error "You cannot modify the prompt")) ;; ;; ;;(defun minibuffer-prompt-insertion (start end) ;; (let ((inhibit-modification-hooks t)) ;; (delete-region start end) ;; ;; Discard undo information for the text insertion itself ;; ;; and for the text deletion.above. ;; (when (consp buffer-undo-list) ;; (setq buffer-undo-list (cddr buffer-undo-list))) ;; (message "You cannot modify the prompt"))) ;; ;; ;;(setq minibuffer-prompt-properties ;; (list 'modification-hooks '(minibuffer-prompt-modification) ;; 'insert-in-front-hooks '(minibuffer-prompt-insertion))) ;;;; Problematic external packages. ;; rms says this should be done by specifying symbols that define ;; versions together with bad values. This is therefore not as ;; flexible as it could be. See the thread: ;; https://lists.gnu.org/r/emacs-devel/2007-08/msg00300.html (defconst bad-packages-alist ;; Not sure exactly which semantic versions have problems. ;; Definitely 2.0pre3, probably all 2.0pre's before this. '((semantic semantic-version "\\`2\\.0pre[1-3]\\'" "The version of `semantic' loaded does not work in Emacs 22. It can cause constant high CPU load. Upgrade to at least Semantic 2.0pre4 (distributed with CEDET 1.0pre4).") ;; CUA-mode does not work with GNU Emacs version 22.1 and newer. ;; Except for version 1.2, all of the 1.x and 2.x version of cua-mode ;; provided the `CUA-mode' feature. Since this is no longer true, ;; we can warn the user if the `CUA-mode' feature is ever provided. (CUA-mode t nil "CUA-mode is now part of the standard GNU Emacs distribution, so you can now enable CUA via the Options menu or by customizing `cua-mode'. You have loaded an older version of CUA-mode which does not work correctly with this version of Emacs. You should remove the old version and use the one distributed with Emacs.")) "Alist of packages known to cause problems in this version of Emacs. Each element has the form (PACKAGE SYMBOL REGEXP STRING). PACKAGE is either a regular expression to match file names, or a symbol (a feature name), like for `with-eval-after-load'. SYMBOL is either the name of a string variable, or t. Upon loading PACKAGE, if SYMBOL is t or matches REGEXP, display a warning using STRING as the message.") (defun bad-package-check (package) "Run a check using the element from `bad-packages-alist' matching PACKAGE." (condition-case nil (let* ((list (assoc package bad-packages-alist)) (symbol (nth 1 list))) (and list (boundp symbol) (or (eq symbol t) (and (stringp (setq symbol (eval symbol))) (string-match-p (nth 2 list) symbol))) (display-warning package (nth 3 list) :warning))) (error nil))) (dolist (elem bad-packages-alist) (let ((pkg (car elem))) (with-eval-after-load pkg (bad-package-check pkg)))) ;;; Generic dispatcher commands ;; Macro `define-alternatives' is used to create generic commands. ;; Generic commands are these (like web, mail, news, encrypt, irc, etc.) ;; that can have different alternative implementations where choosing ;; among them is exclusively a matter of user preference. ;; (define-alternatives COMMAND) creates a new interactive command ;; M-x COMMAND and a customizable variable COMMAND-alternatives. ;; Typically, the user will not need to customize this variable; packages ;; wanting to add alternative implementations should use ;; ;; ;;;###autoload (push '("My impl name" . my-impl-symbol) COMMAND-alternatives (defmacro define-alternatives (command &rest customizations) "Define the new command `COMMAND'. The argument `COMMAND' should be a symbol. Running `M-x COMMAND RET' for the first time prompts for which alternative to use and records the selected command as a custom variable. Running `C-u M-x COMMAND RET' prompts again for an alternative and overwrites the previous choice. The variable `COMMAND-alternatives' contains an alist with alternative implementations of COMMAND. `define-alternatives' does not have any effect until this variable is set. CUSTOMIZATIONS, if non-nil, should be composed of alternating `defcustom' keywords and values to add to the declaration of `COMMAND-alternatives' (typically :group and :version)." (let* ((command-name (symbol-name command)) (varalt-name (concat command-name "-alternatives")) (varalt-sym (intern varalt-name)) (varimp-sym (intern (concat command-name "--implementation")))) `(progn (defcustom ,varalt-sym nil ,(format "Alist of alternative implementations for the `%s' command. Each entry must be a pair (ALTNAME . ALTFUN), where: ALTNAME - The name shown at user to describe the alternative implementation. ALTFUN - The function called to implement this alternative." command-name) :type '(alist :key-type string :value-type function) ,@customizations) (put ',varalt-sym 'definition-name ',command) (defvar ,varimp-sym nil "Internal use only.") (defun ,command (&optional arg) ,(format "Run generic command `%s'. If used for the first time, or with interactive ARG, ask the user which implementation to use for `%s'. The variable `%s' contains the list of implementations currently supported for this command." command-name command-name varalt-name) (interactive "P") (when (or arg (null ,varimp-sym)) (let ((val (completing-read ,(format-message "Select implementation for command `%s': " command-name) ,varalt-sym nil t))) (unless (string-equal val "") (when (null ,varimp-sym) (message "Use C-u M-x %s RET`to select another implementation" ,command-name) (sit-for 3)) (customize-save-variable ',varimp-sym (cdr (assoc-string val ,varalt-sym)))))) (if ,varimp-sym (call-interactively ,varimp-sym) (message "%s" ,(format-message "No implementation selected for command `%s'" command-name))))))) ;;; Functions for changing capitalization that Do What I Mean (defun upcase-dwim (arg) "Upcase words in the region, if active; if not, upcase word at point. If the region is active, this function calls `upcase-region'. Otherwise, it calls `upcase-word', with prefix argument passed to it to upcase ARG words." (interactive "*p") (if (use-region-p) (upcase-region (region-beginning) (region-end)) (upcase-word arg))) (defun downcase-dwim (arg) "Downcase words in the region, if active; if not, downcase word at point. If the region is active, this function calls `downcase-region'. Otherwise, it calls `downcase-word', with prefix argument passed to it to downcase ARG words." (interactive "*p") (if (use-region-p) (downcase-region (region-beginning) (region-end)) (downcase-word arg))) (defun capitalize-dwim (arg) "Capitalize words in the region, if active; if not, capitalize word at point. If the region is active, this function calls `capitalize-region'. Otherwise, it calls `capitalize-word', with prefix argument passed to it to capitalize ARG words." (interactive "*p") (if (use-region-p) (capitalize-region (region-beginning) (region-end)) (capitalize-word arg))) (provide 'simple) ;;; simple.el ends here ================================================ FILE: Units/parser-erlang.r/crash1.d/input.erl ================================================ % long directives used to possibly crash the parser % (and always make Valgrind angry) -some_extremely_loooong_directive -even_longer_might_crash_more_often_than_not_but_anyway_valgrind_would_not_be_hayyp_either_way ================================================ FILE: Units/parser-flex.r/as-first-token.d/expected.tags ================================================ f1 input.as /^function f1():void {}$/;" f ================================================ FILE: Units/parser-flex.r/as-first-token.d/input.as ================================================ function f1():void {} ================================================ FILE: Units/parser-flex.r/classes.d/args.ctags ================================================ --fields=+Z --extras=+q ================================================ FILE: Units/parser-flex.r/classes.d/expected.tags ================================================ C1 input.as /^ class C1 {$/;" c C1.m1 input.as /^ public function m1():Boolean { return 0; }$/;" m scope:class:C1 C2 input.as /^ class C2 extends C1 {}$/;" c C3 input.as /^ class C3 {}$/;" c C4 input.as /^ class C4 implements I1 {}$/;" c C5 input.as /^ class C5 extends C3 implements I1 {}$/;" c C6 input.as /^ class C6 extends C3 implements I1, I2 {}$/;" c C7 input.as /^ dynamic class C7{}$/;" c I1 input.as /^ interface I1 {}$/;" i I2 input.as /^ interface I2 {}$/;" i I3 input.as /^ interface I3 extends I1, I2 {}$/;" i I4 input.as /^ interface I4 extends I3 {}$/;" i m1 input.as /^ public function m1():Boolean { return 0; }$/;" m scope:class:C1 ================================================ FILE: Units/parser-flex.r/classes.d/input.as ================================================ package { class C1 { public function m1():Boolean { return 0; } } class C2 extends C1 {} class C3 {} interface I1 {} interface I2 {} interface I3 extends I1, I2 {} interface I4 extends I3 {} class C4 implements I1 {} class C5 extends C3 implements I1 {} class C6 extends C3 implements I1, I2 {} dynamic class C7{} } ================================================ FILE: Units/parser-flex.r/const.d/args.ctags ================================================ --kinds-flex=+l ================================================ FILE: Units/parser-flex.r/const.d/expected.tags ================================================ AlarmClock input.as /^public class AlarmClock {$/;" c MODE_AUDIO input.as /^ public static const MODE_AUDIO = 2;$/;" C class:AlarmClock MODE_BOTH input.as /^ public static const MODE_BOTH = 3;$/;" C class:AlarmClock MODE_VISUAL input.as /^ public static const MODE_VISUAL = 1;$/;" C class:AlarmClock mode input.as /^ private var mode = AlarmClock.MODE_AUDIO;$/;" l class:AlarmClock ================================================ FILE: Units/parser-flex.r/const.d/input.as ================================================ // https://www.oreilly.com/library/view/essential-actionscript-30/0596526946/ch04s02.html public class AlarmClock { public static const MODE_VISUAL = 1; public static const MODE_AUDIO = 2; public static const MODE_BOTH = 3; private var mode = AlarmClock.MODE_AUDIO; } ================================================ FILE: Units/parser-flex.r/const2.d/expected.tags ================================================ MIN_AGE input.as /^const MIN_AGE:int = 21;$/;" C product_array input.as /^const product_array:Array = new Array("Studio", "Dreamweaver", "Flash", "ColdFusion", "Contribut/;" C ================================================ FILE: Units/parser-flex.r/const2.d/input.as ================================================ // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/statements.html#const const MIN_AGE:int = 21; const product_array:Array = new Array("Studio", "Dreamweaver", "Flash", "ColdFusion", "Contribute", "Breeze"); product_array.push("Flex"); // array operations are allowed product_array = ["Other"]; // assignment is an error trace(product_array); ================================================ FILE: Units/parser-flex.r/flex_comment.mxml.d/expected.tags ================================================ ================================================ FILE: Units/parser-flex.r/flex_comment.mxml.d/input.mxml ================================================ ================================================ FILE: Units/parser-flex.r/flex_only_mxml.mxml.d/expected.tags ================================================ form_login_screen input.mxml /^ $/;" x mxtag:Form forms input.mxml /^ $/;" x mxtag:Array ls_bt_log_in_out input.mxml /^ $/;" x mxtag:Label ls_ti_passwd input.mxml /^ $/;" x mxtag:TextInput ls_ti_username input.mxml /^ $/;" x mxtag:TextInput myHTTPService input.mxml /^ id="myHTTPService"$/;" x mxtag:HTTPService viewstack1 input.mxml /^ ================================================ FILE: Units/parser-flex.r/flex_with_actionscript.mxml.d/expected.tags ================================================ ajaxData input.mxml /^ id="ajaxData"$/;" x mxtag:HTTPService dateToYYYYMMDD input.mxml /^ public function dateToYYYYMMDD(aDate:Date):String {$/;" f ================================================ FILE: Units/parser-flex.r/flex_with_actionscript.mxml.d/input.mxml ================================================ ================================================ FILE: Units/parser-flex.r/method-attributes.d/expected.tags ================================================ C input.as /^class C {$/;" c f1 input.as /^ public function f1():void {}$/;" m class:C f2 input.as /^ private function f2():void {}$/;" m class:C f3 input.as /^ protected function f3():void {}$/;" m class:C f4 input.as /^ internal function f4():void {}$/;" m class:C f5 input.as /^ public function f5():void {}$/;" m class:C f6 input.as /^ public override function f6():void {}$/;" m class:C f7 input.as /^ final function f7():void {}$/;" m class:C f8 input.as /^ native function f8():void {}$/;" m class:C ================================================ FILE: Units/parser-flex.r/method-attributes.d/input.as ================================================ /* Not sure it's really valid, but the goal is to check not choking on * attributes, so so long as it's valid attributes it's fine */ class C { public function f1():void {} private function f2():void {} protected function f3():void {} internal function f4():void {} public function f5():void {} public override function f6():void {} final function f7():void {} native function f8():void {} } ================================================ FILE: Units/parser-flex.r/packages.d/expected.tags ================================================ C1 input.as /^ class C1 {}$/;" c class:P3 P1 input.as /^package P1 {}$/;" P P2 input.as /^package P2 {$/;" P P3 input.as /^package P3 {$/;" P f1 input.as /^ function f1() {}$/;" f function:P2 qualified.test.pkg input.as /^package qualified.test . pkg {$/;" P ================================================ FILE: Units/parser-flex.r/packages.d/input.as ================================================ package P1 {} package P2 { function f1() {} } package P3 { class C1 {} } package qualified.test . pkg { } ================================================ FILE: Units/parser-flex.r/sampler.d/args.ctags ================================================ --kinds-flex=+l --fields=+rZ --extras=+r ================================================ FILE: Units/parser-flex.r/sampler.d/expected.tags ================================================ assert input.as /^ private function assert(e:Boolean, mess:String=null):void {$/;" m scope:class:sampleTypes roles:def b input.as /^ var b:Boolean = true$/;" l scope:class:sampleTypes roles:def cpuSamples input.as /^ var cpuSamples:Array=[];$/;" l scope:class:sampleTypes.sampleTypes roles:def delSamples input.as /^ var delSamples:Array=[];$/;" l scope:class:sampleTypes.sampleTypes roles:def dos input.as /^ var dos = DeleteObjectSample(s);$/;" l scope:class:sampleTypes.sampleTypes roles:def flash.display.Sprite input.as /^ import flash.display.Sprite$/;" I roles:import flash.sampler.* input.as /^ import flash.sampler.*$/;" I roles:import flash.system.* input.as /^ import flash.system.*$/;" I roles:import flash.utils.* input.as /^ import flash.utils.*$/;" I roles:import ids input.as /^ var ids:Array=[]$/;" l scope:class:sampleTypes.sampleTypes roles:def lastTime input.as /^ var lastTime:Number=0;$/;" l scope:class:sampleTypes.sampleTypes roles:def newSamples input.as /^ var newSamples:Array=[];$/;" l scope:class:sampleTypes.sampleTypes roles:def nos input.as /^ var nos = NewObjectSample(s);$/;" l scope:class:sampleTypes.sampleTypes roles:def sampleTypes input.as /^ public function sampleTypes() {$/;" m scope:class:sampleTypes roles:def sampleTypes input.as /^ public class sampleTypes extends Sprite$/;" c roles:def ================================================ FILE: Units/parser-flex.r/sampler.d/input.as ================================================ // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/sampler/Sample.html package { import flash.sampler.* import flash.system.* import flash.utils.* import flash.display.Sprite public class sampleTypes extends Sprite { var b:Boolean = true public function sampleTypes() { flash.sampler.startSampling(); for(var i:int=0;i<10000;i++) new Object(); var cpuSamples:Array=[]; var newSamples:Array=[]; var delSamples:Array=[]; var ids:Array=[] var lastTime:Number=0; for each(var s:Sample in getSamples()) { assert(s.time > 0); // positive assert(Math.floor(s.time) == s.time, s.time); // integral assert(s.time >= lastTime, s.time + ":" + lastTime); // ascending assert(s.stack == null || s.stack is Array) if(s.stack) { assert(s.stack[0] is StackFrame); assert(s.stack[0].name is String); } if(s is NewObjectSample) { var nos = NewObjectSample(s); assert(s.id > 0, s.id); assert(s.type is Class, getQualifiedClassName(s.type)); newSamples.push(s); ids[s.id] = "got one"; } else if(s is DeleteObjectSample) { var dos = DeleteObjectSample(s); delSamples.push(s); assert(ids[dos.id] == "got one"); } else if(s is Sample) cpuSamples.push(s); else { assert(false); } lastTime = s.time; } trace(b) trace(newSamples.length > 0) trace(cpuSamples.length > 0) trace(delSamples.length > 0) } private function assert(e:Boolean, mess:String=null):void { b = e && b; if(true && !e) { if(mess) trace(mess); trace(new Error().getStackTrace()); } } } } ================================================ FILE: Units/parser-forth.r/simple-forth.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-forth.r/simple-forth.d/expected.tags ================================================ DUMMY1 input.fth /^10 constant DUMMY1$/;" c DUMMY2 input.fth /^12 CONSTANT DUMMY2$/;" c dummy3 input.fth /^variable dummy3$/;" v dummy4 input.fth /^variable dummy4$/;" v dummy5 input.fth /^VARIABLE dummy5$/;" v fizz? input.fth /^: fizz? \\ a simple comment $/;" w buzz? input.fth /^: buzz? $/;" w fizz-buzz? input.fth /^: fizz-buzz? $/;" w do-fizz-buzz input.fth /^: do-fizz-buzz $/;" w ================================================ FILE: Units/parser-forth.r/simple-forth.d/input.fth ================================================ ( https://rosettacode.org/wiki/FizzBuzz#Forth / https://skilldrick.github.io/easyforth/ ) \ Works in gforth and other ANS forth. Other Forth may differ. 10 constant DUMMY1 12 CONSTANT DUMMY2 variable dummy3 variable dummy4 VARIABLE dummy5 11 dummy3 ! 13 dummy4 ! : fizz? \ a simple comment 3 mod 0 = dup if ." Fizz" then ; : buzz? 5 mod 0 = dup if ." Buzz" then ; : fizz-buzz? dup fizz? swap buzz? or invert ; : do-fizz-buzz 25 1 do cr i fizz-buzz? if i . then loop ; do-fizz-buzz cr quit \ bye ================================================ FILE: Units/parser-fortran.r/array-spec.f90.d/expected.tags ================================================ df_mb_data input.f90 /^ df_mb_data(/;" k type:df_type df_mb_time input.f90 /^ df_mb_time(/;" k type:df_type df_type input.f90 /^ TYPE df_type$/;" t module:inm_df df_wb_data input.f90 /^ df_mb_data(:,:), df_wb_data(/;" k type:df_type df_wb_time input.f90 /^ df_mb_time(:), df_wb_time(/;" k type:df_type inm_df input.f90 /^ MODULE inm_df$/;" m ================================================ FILE: Units/parser-fortran.r/array-spec.f90.d/input.f90 ================================================ MODULE inm_df IMPLICIT none SAVE TYPE df_type REAL(8), POINTER :: & df_mb_time(:), df_wb_time(:) REAL(4), POINTER :: & df_mb_data(:,:), df_wb_data(:,:) END TYPE END MODULE inm_df ================================================ FILE: Units/parser-fortran.r/array_spec.f90.d/expected.tags ================================================ Global_Variables input.f90 /^module Global_Variables$/;" m H input.f90 /^H /;" v module:Global_Variables H0 input.f90 /^H0(/;" v module:Global_Variables H1 input.f90 /^H1(/;" v module:Global_Variables H2 input.f90 /^H2(/;" v module:Global_Variables H3 input.f90 /^H3(/;" v module:Global_Variables H4 input.f90 /^H4(/;" v module:Global_Variables H5 input.f90 /^H5(/;" v module:Global_Variables ================================================ FILE: Units/parser-fortran.r/array_spec.f90.d/input.f90 ================================================ ! Bug reported by Jim Chen on 31 Dec 2002 module Global_Variables implicit none ! Example of array-spec in entity-decl real*8, save :: & H (NDIM, NDIM) = 0.D0, & H0(NDIM, NDIM), & H1(NDIM, NDIM) = 0.D0, & H2(NDIM, NDIM) = 0.D0, & H3(NDIM, NDIM) = 0.D0, & H4(NDIM, NDIM) = 0.D0, & H5(NDIM, NDIM) = 0.D0 end module Global_Variables ================================================ FILE: Units/parser-fortran.r/auto.f.d/expected.tags ================================================ AUTO_TEST input.f /^ program AUTO_TEST$/;" p D input.f /^ AUTOMATIC REAL P, D,/;" v program:AUTO_TEST P input.f /^ AUTOMATIC REAL P,/;" v program:AUTO_TEST Q input.f /^ AUTOMATIC REAL P, D, Q /;" v program:AUTO_TEST ================================================ FILE: Units/parser-fortran.r/auto.f.d/input.f ================================================ ! Provided by Brian Helsinki, 7 March 2003 program AUTO_TEST AUTOMATIC A, B, C AUTOMATIC REAL P, D, Q !IMPLICIT AUTOMATIC REAL (X-Z) END ================================================ FILE: Units/parser-fortran.r/bug565813.f90.d/expected.tags ================================================ N input.f90 /^ integer, parameter :: N /;" v module:ctags_bug bar input.f90 /^ integer :: bar$/;" k type:foo_t ctags_bug input.f90 /^module ctags_bug$/;" m foo_getbar input.f90 /^ integer function foo_getbar /;" f module:ctags_bug foo_set_bar input.f90 /^ pure subroutine foo_set_bar /;" s module:ctags_bug foo_setbar input.f90 /^ subroutine foo_setbar /;" s module:ctags_bug foo_t input.f90 /^ type :: foo_t$/;" t module:ctags_bug ================================================ FILE: Units/parser-fortran.r/bug565813.f90.d/input.f90 ================================================ module ctags_bug implicit none private save type :: foo_t integer :: bar end type foo_t integer, parameter :: N = 1000 public :: foo_t public :: foo_setbar public :: foo_set_bar public :: foo_getbar contains subroutine foo_setbar (f,b) type(foo_t), intent(out) :: f integer, intent(in) :: b f%bar = b end subroutine foo_setbar pure subroutine foo_set_bar (f,b) type(foo_t), intent(out) :: f integer, intent(in) :: b f%bar = b end subroutine foo_set_bar integer function foo_getbar (f) type(foo_t), intent(in) :: f foo_getbar = f%bar end function foo_getbar end module ctags_bug ================================================ FILE: Units/parser-fortran.r/bug620288.f.d/expected.tags ================================================ bar input.f /^ double precision function bar(/;" f foo input.f /^ integer function foo(/;" f ================================================ FILE: Units/parser-fortran.r/bug620288.f.d/input.f ================================================ C Bugs item #620288, was opened at 2002-10-08 08:15 C You can respond by visiting: C https://sourceforge.net/tracker/?func=detail&atid=106556&aid=620288&group_id=6556 C C Category: None C Group: None C Status: Open C Resolution: None C Priority: 5 C Submitted By: Nobody/Anonymous (nobody) C Assigned to: Nobody/Anonymous (nobody) C Summary: fortran function definition C C Initial Comment: C C System Information: C -------------- C ctags version: C Exuberant Ctags 5.3.1, Copyright (C) 1996-2002 Darren C Hiebert C Compiled: Sep 12 2002, 10:22:42 C Addresses: , C http://ctags.sourceforge.net C Optional compiled features: +wildcards, +regex C C Unix: C HP-UX B.11.00 A 9000/800 551726527 C -------------- C C Symptoms: C -------------- C I have a fortran file that has a single function. This C function has a C return type of double precision. I type $ctags bar.f . C This produces the expected C tags file. However, tags does not contain the function C definition. C C This does not occur when the same function's return C type has been changed to C a integer or character data return type. C -------------- C C C Examples in which I can repeat the experience with their C respective tags files: C -------------- C C C foo.f C -------------- integer function foo(a) integer a foo = a end C -------------- C C C tags C -------------- C !_TAG_FILE_FORMAT 2 /extended C format; --format=1 will not append ;" to lines/ C !_TAG_FILE_SORTED 1 C /0=unsorted, 1=sorted, 2=foldcase/ C !_TAG_PROGRAM_AUTHOR Darren Hiebert C /dhiebert@users.sourceforge.net/ C !_TAG_PROGRAM_NAME Exuberant Ctags // C !_TAG_PROGRAM_URL C http://ctags.sourceforge.net /official site/ C !_TAG_PROGRAM_VERSION 5.3.1 // C foo foo.f /^ integer function foo(/;" f C -------------- C C C C bar.f C --------------- double precision function bar(a) double precision a bar = a end C -------------- C C tags C --------------- C !_TAG_FILE_FORMAT 2 /extended C format; --format=1 will not append ;" to lines/ C !_TAG_FILE_SORTED 1 C /0=unsorted, 1=sorted, 2=foldcase/ C !_TAG_PROGRAM_AUTHOR Darren Hiebert C /dhiebert@users.sourceforge.net/ C !_TAG_PROGRAM_NAME Exuberant Ctags // C !_TAG_PROGRAM_URL C http://ctags.sourceforge.net /official site/ C !_TAG_PROGRAM_VERSION 5.3.1 // C --------------- ================================================ FILE: Units/parser-fortran.r/bug629.d/args.ctags ================================================ --language-force=Fortran ================================================ FILE: Units/parser-fortran.r/bug629.d/expected.tags ================================================ test_enumeration input.c /^enum test_enumeration /;" E ================================================ FILE: Units/parser-fortran.r/bug629.d/input.c ================================================ enum test_enumeration { ENUM_1 = 1, ENUM_2, ENUM_3 }; ================================================ FILE: Units/parser-fortran.r/bug670433.f90.d/README ================================================ This test has the truncation issue #333. ================================================ FILE: Units/parser-fortran.r/bug670433.f90.d/expected.tags ================================================ bar input.f90 /^ subroutine bar /;" s module:foobar f input.f90 /^ real function f(/;" f function:foo foo input.f90 /^ integer function foo /;" f module:foobar foobar input.f90 /^module foobar$/;" m ================================================ FILE: Units/parser-fortran.r/bug670433.f90.d/input.f90 ================================================ ! Bugs item #670443, was opened at 2003-01-18 22:44 ! You can respond by visiting: ! https://sourceforge.net/tracker/?func=detail&atid=106556&aid=670443&group_id=6556 ! ! Category: None ! Group: None ! Status: Open ! Resolution: None ! Priority: 5 ! Submitted By: Erik Edelmann (fanerier) ! Assigned to: Nobody/Anonymous (nobody) ! Summary: Fortran: Internal procedures causes trouble ! ! Initial Comment: ! If a function in a module has an internal procedure ! (after a CONTAINS-statement), everything in the module ! after the parent function will be skipped. I.e. in the ! attached file, the subroutine 'bar' will not be listed ! in the 'tags' file. Note that this problem arises only ! when the parent procedure is a function, if it is a ! subroutine everything works fine. module foobar contains integer function foo (i) contains real function f(x) end function f end function foo subroutine bar (n) end subroutine bar end module foobar ================================================ FILE: Units/parser-fortran.r/bug726712.f90.d/expected.tags ================================================ sub1 input.f90 /^ subroutine sub1(/;" s sub2 input.f90 /^ subroutine sub2(/;" s tagstest_ctrl input.f90 /^ subroutine tagstest_ctrl(/;" s ================================================ FILE: Units/parser-fortran.r/bug726712.f90.d/input.f90 ================================================ ! Bugs item #726712, was opened at 2003-04-24 08:36 ! Message generated for change (Comment added) made by schubidu ! You can respond by visiting: ! https://sourceforge.net/tracker/?func=detail&atid=106556&aid=726712&group_id=6556 ! ! Category: None ! Group: None ! Status: Open ! Resolution: None ! Priority: 5 ! Submitted By: sandra schrdter (schubidu) ! Assigned to: Darren Hiebert (dhiebert) ! Summary: ctags 5.5 and f90: "endsubroutine" not recognized ! ! Initial Comment: ! Dear Ctags'ers. :) ! ! First of all: good tool! :) I stumbled across ctags for ! my gvim6, wanted to use the nice plugin taglist. ! ! My System: HP-Unix and ctags 5.5 ! ! My problem is the following. The command: ! ! "ctags tagstest.f90" ! ! builds a tagsfile that lacks 1 of the declared 3 ! subroutines. ! The problem disappears when the declaration of the ! subroutine ends in "end subroutine" and not in ! "endsubroutine", although "endsubroutine" is correct ! Fortran90 syntax, AFAIK. ! ! Is there a chance to get this corrected? ! ! ! The example file tagstest.f90: subroutine tagstest_ctrl() real :: a a = 0.0 call sub1( a) call sub2( a) endsubroutine tagstest_ctrl subroutine sub1( a) real,intent( inout) ::a a = 1.1 endsubroutine sub1 subroutine sub2( a) real,intent( inout) ::a a = 2.2 endsubroutine sub2 ! ---------------------------------------------------------------------- ! ! Comment By: sandra schrdter (schubidu) ! Date: 2003-05-28 13:17 ! ! Message: ! Logged In: YES ! user_id=763447 ! ! I realized that there are also problems when a subroutine ! ends only with the keyword ! end ! ! The following subroutine is listed but cannot be selected ! (that is, the cursor won't go there) ! ! ---------------------------------------------------------------------- ================================================ FILE: Units/parser-fortran.r/bug726875.f90.d/expected.tags ================================================ coma input.f90 19;" c comb input.f90 22;" c comc input.f90 24;" c ================================================ FILE: Units/parser-fortran.r/bug726875.f90.d/input.f90 ================================================ ! Bugs item #726875, was opened at 2003-04-24 15:30 ! Message generated for change (Tracker Item Submitted) made by Item Submitter ! You can respond by visiting: ! https://sourceforge.net/tracker/?func=detail&atid=106556&aid=726875&group_id=6556 ! ! Category: None ! Group: None ! Status: Open ! Resolution: None ! Priority: 5 ! Submitted By: sandra schrdter (schubidu) ! Assigned to: Nobody/Anonymous (nobody) ! Summary: ctags 5.5 and f90: common and ! ! ! Initial Comment: ! ctags won't add a common-block definition to the tags ! file when the following occurs: common /coma/ a,b,!foobar + c,d common /comb/ e,f common /comc/ g,h ! The problem seems to be based on the fact that the ! comment "! foobar" is followed by a continuation line ! ("+" in column 6 shows that) ================================================ FILE: Units/parser-fortran.r/bug734933.f90.d/expected.tags ================================================ ADD_COMPONENTS input.f90 /^ SUBROUTINE ADD_COMPONENTS$/;" s module:MDCOMPONENTS COMP input.f90 /^ TYPE (COMPONENT), POINTER :: COMP$/;" v module:MDCOMPONENTS COMPONENT input.f90 /^ TYPE COMPONENT$/;" t module:MDCOMPONENTS COMPONENTS input.f90 /^ TYPE (COMPONENT_POINTER), DIMENSION(LIM_COMPONENTS) :: COMPONENTS, COMPONENTS_/;" v module:MDCOMPONENTS COMPONENTS_TMP input.f90 /^ TYPE (COMPONENT_POINTER), DIMENSION(LIM_COMPONENTS) :: COMPONENTS, COMPONENTS_TMP$/;" v module:MDCOMPONENTS COMPONENT_POINTER input.f90 /^ TYPE COMPONENT_POINTER /;" t module:MDCOMPONENTS COMP_TMP input.f90 /^ TYPE (COMPONENT_POINTER) :: COMP_TMP$/;" v module:MDCOMPONENTS LIM_COMPONENTS input.f90 /^ INTEGER (INT4), PARAMETER :: LIM_COMPONENTS /;" v module:MDCOMPONENTS MDCOMPONENTS input.f90 /^ MODULE MDCOMPONENTS$/;" m MEMDEALLOC input.f90 /^ INTERFACE MEMDEALLOC$/;" i module:MDCOMPONENTS NAME input.f90 /^ CHARACTER (LEN=30) :: NAME$/;" k type:COMPONENT NCOMP input.f90 /^ INTEGER (INT4) :: NUM_COMPONENTS = 0, NCOMP;/;" v module:MDCOMPONENTS NUM_COMPONENTS input.f90 /^ INTEGER (INT4) :: NUM_COMPONENTS /;" v module:MDCOMPONENTS NUM_PART input.f90 /^ INTEGER (INT4) :: NUM_PART$/;" k type:COMPONENT P input.f90 /^ TYPE (COMPONENT), POINTER :: P$/;" k type:COMPONENT_POINTER PART_LIST input.f90 /^ REAL (REAL8), DIMENSION(:), POINTER :: PART_LIST$/;" k type:COMPONENT ================================================ FILE: Units/parser-fortran.r/bug734933.f90.d/input.f90 ================================================ MODULE MDCOMPONENTS USE kindef USE memory IMPLICIT NONE SAVE INTEGER (INT4), PARAMETER :: LIM_COMPONENTS = 1000; INTEGER (INT4) :: NUM_COMPONENTS = 0, NCOMP; TYPE COMPONENT CHARACTER (LEN=30) :: NAME INTEGER (INT4) :: NUM_PART REAL (REAL8), DIMENSION(:), POINTER :: PART_LIST END TYPE TYPE COMPONENT_POINTER TYPE (COMPONENT), POINTER :: P END TYPE TYPE (COMPONENT), POINTER :: COMP TYPE (COMPONENT_POINTER) :: COMP_TMP TYPE (COMPONENT_POINTER), DIMENSION(LIM_COMPONENTS) :: COMPONENTS, COMPONENTS_TMP INTERFACE MEMDEALLOC MODULE PROCEDURE MEMDEALLOC_COMPONENTS_PTR END INTERFACE CONTAINS SUBROUTINE ADD_COMPONENTS NUM_COMPONENTS = NUM_COMPONENTS + 1 CALL MEMALLOC (COMPONENTS(NUM_COMPONENTS)%P, IDALL999) END SUBROUTINE ADD_COMPONENTS END MODULE MDCOMPONENTS ================================================ FILE: Units/parser-fortran.r/bug858165.f90.d/expected.tags ================================================ a input.f90 /^integer :: a, & !comment on variable a$/;" v program:test b input.f90 /^ b, & !comment on variable b$/;" v program:test c input.f90 /^ c, & !comment on variable c$/;" v program:test d input.f90 /^ d !comment on variable d$/;" v program:test test input.f90 /^program test$/;" p ================================================ FILE: Units/parser-fortran.r/bug858165.f90.d/input.f90 ================================================ ! Bugs item #858165, was opened at 2003-12-11 10:09 ! Message generated for change (Tracker Item Submitted) made by Item Submitter ! You can respond by visiting: ! https://sourceforge.net/tracker/?func=detail&atid=106556&aid=858165&group_id=6556 ! ! Category: None ! Group: None ! Status: Open ! Resolution: None ! Priority: 5 ! Submitted By: Blazej Krzeminski (blazk) ! Assigned to: Nobody/Anonymous (nobody) ! Summary: Fortran90: comment line after continuation character & ! ! Initial Comment: program test integer :: a, & !comment on variable a b, & !comment on variable b !more comment on variable b, CTAGS STOPS HERE c, & !comment on variable c d !comment on variable d end program test ! ctags will index program test, a,b but not c,d ================================================ FILE: Units/parser-fortran.r/bug877956.f90.d/args.ctags ================================================ --kinds-Fortran=v ================================================ FILE: Units/parser-fortran.r/bug877956.f90.d/expected.tags-x ================================================ c2 variable 25 input.f90 INTEGER :: cm1 =-1, c2 = 2 c2 variable 39 input.f90 INTEGER :: cm1 = -1, c2 = 2 cm1 variable 25 input.f90 INTEGER :: cm1 =-1, c2 = 2 cm1 variable 39 input.f90 INTEGER :: cm1 = -1, c2 = 2 ================================================ FILE: Units/parser-fortran.r/bug877956.f90.d/input.f90 ================================================ ! Bugs item #877956, was opened at 2004-01-15 17:59 ! Message generated for change (Tracker Item Submitted) made by Item Submitter ! You can respond by visiting: ! https://sourceforge.net/tracker/?func=detail&atid=106556&aid=877956&group_id=6556 ! ! Category: None ! Group: None ! Status: Open ! Resolution: None ! Priority: 5 ! Submitted By: Randy Hood (randy762) ! Assigned to: Nobody/Anonymous (nobody) ! Summary: Broken Fortran variable listing after =-1 ! ! Initial Comment: ! When I run ctags v5.5.2 on Redhat Linux 9 with the command ! ! ctags --kinds-Fortran=v -x test.f90 ! ! where test.f90 is ! ---------------------------------- PROGRAM test IMPLICIT NONE INTEGER :: cm1 =-1, c2 = 2 END PROGRAM test ! ------------------------------------- ! ! I only get this one line of output ! ! cm1 variable 4 test.f90 INTEGER :: cm1 =-1, c2 = 2 ! ! If I change one line of test.f90 so that it is now ! ---------------------------------------- PROGRAM test IMPLICIT NONE INTEGER :: cm1 = -1, c2 = 2 END PROGRAM test ! ----------------------------------------- ! and run the command ! ! ctags --kinds-Fortran=v -x test.f90 ! ! I get this correct output ! ! c2 variable 4 test.f90 INTEGER :: cm1 = -1, c2 = 2 ! cm1 variable 4 test.f90 INTEGER :: cm1 = -1, c2 = 2 ! ! ---------------------------------------------------------------------- ! You can respond by visiting: ! https://sourceforge.net/tracker/?func=detail&atid=106556&aid=877956&group_id=6556 ================================================ FILE: Units/parser-fortran.r/byte.f.d/expected.tags ================================================ A input.f /^ BYTE A,/;" v program:byte_test A1 input.f /^ BYTE A1,/;" v program:byte_test A2 input.f /^ BYTE A2 /;" v program:byte_test B input.f /^ BYTE A, B,/;" v program:byte_test B1 input.f /^ BYTE A1, B1,/;" v program:byte_test B2 input.f /^ BYTE A2 \/'x'\/, B2 /;" v program:byte_test C input.f /^ BYTE A, B, C /;" v program:byte_test C1 input.f /^ BYTE A1, B1, C1(/;" v program:byte_test C2 input.f /^ BYTE A2 \/'x'\/, B2 \/255\/, C2(/;" v program:byte_test byte_test input.f /^ program byte_test$/;" p ================================================ FILE: Units/parser-fortran.r/byte.f.d/input.f ================================================ ! Provided by Brian Helsinki, 7 March 2003 program byte_test BYTE A, B, C BYTE A1, B1, C1(10) BYTE A2 /'x'/, B2 /255/, C2(10) END ================================================ FILE: Units/parser-fortran.r/char-selector.f90.d/expected.tags ================================================ MXDDI input.f90 /^ INTEGER(4), PRIVATE, PARAMETER :: MXDDI=/;" v module:OUT_RD5 OUT_RD5 input.f90 /^ MODULE OUT_RD5$/;" m fpshape input.f90 /^ CHARACTER(1024) :: fpshape$/;" v module:OUT_RD5 fpshape2 input.f90 /^ CHARACTER*(1024) :: fpshape2$/;" v module:OUT_RD5 last input.f90 /^ INTEGER(4), PRIVATE :: last$/;" v module:OUT_RD5 list input.f90 /^ INTEGER(4), PRIVATE, DIMENSION (MXDDI+1) :: list$/;" v module:OUT_RD5 nout input.f90 /^ INTEGER(4), PRIVATE :: nout$/;" v module:OUT_RD5 temp input.f90 /^ CHARACTER*(MXPATHLNGTH) temp$/;" v module:OUT_RD5 titles input.f90 /^ CHARACTER*40 titles(/;" v module:OUT_RD5 units input.f90 /^ CHARACTER*12 units(/;" v module:OUT_RD5 ================================================ FILE: Units/parser-fortran.r/char-selector.f90.d/input.f90 ================================================ ! Test for bug in parsing of char-selector MODULE OUT_RD5 USE inmdmx IMPLICIT NONE SAVE CHARACTER*(MXPATHLNGTH) temp PRIVATE :: temp INTEGER(4), PRIVATE, PARAMETER :: MXDDI=45 CHARACTER*40 titles(MXDDI) PRIVATE :: titles CHARACTER*12 units(MXDDI) PRIVATE :: units INTEGER(4), PRIVATE, DIMENSION (MXDDI+1) :: list CHARACTER(1024) :: fpshape INTEGER(4), PRIVATE :: nout CHARACTER*(1024) :: fpshape2 INTEGER(4), PRIVATE :: last END MODULE OUT_RD5 ================================================ FILE: Units/parser-fortran.r/common-json.f.d/expected.tags-json ================================================ {"_type": "tag", "name": "common1", "path": "input.f", "pattern": "/^ COMMON \\/common1\\//", "kind": "common", "scope": "main", "scopeKind": "program"} {"_type": "tag", "name": "common2", "path": "input.f", "pattern": "/^ COMMON \\/common2\\//", "kind": "common", "scope": "main", "scopeKind": "program"} {"_type": "tag", "name": "common3", "path": "input.f", "pattern": "/^ COMMON \\/common2\\/ c2a (1:3), c2b \\/common3\\//", "kind": "common", "scope": "main", "scopeKind": "program"} {"_type": "tag", "name": "main", "path": "input.f", "pattern": "/^ PROGRAM main$/", "kind": "program"} ================================================ FILE: Units/parser-fortran.r/common-json.f.d/input.f ================================================ PROGRAM main COMMON /common1/ c1a, c1b COMMON /common2/ c2a (1:3), c2b /common3/ c3a, c3b END ================================================ FILE: Units/parser-fortran.r/common-xref.f.d/args.ctags ================================================ --_xformat=%-16N %-10K %4n %-16F %P ================================================ FILE: Units/parser-fortran.r/common-xref.f.d/expected.tags-x ================================================ common1 common 2 input.f /^ COMMON \/common1\// common2 common 3 input.f /^ COMMON \/common2\// common3 common 3 input.f /^ COMMON \/common2\/ c2a (1:3), c2b \/common3\// main program 1 input.f /^ PROGRAM main$/ ================================================ FILE: Units/parser-fortran.r/common-xref.f.d/input.f ================================================ PROGRAM main COMMON /common1/ c1a, c1b COMMON /common2/ c2a (1:3), c2b /common3/ c3a, c3b END ================================================ FILE: Units/parser-fortran.r/common.f.d/expected.tags ================================================ common1 input.f 2;" c program:main common2 input.f 3;" c program:main common3 input.f 3;" c program:main main input.f /^ PROGRAM main$/;" p ================================================ FILE: Units/parser-fortran.r/common.f.d/input.f ================================================ PROGRAM main COMMON /common1/ c1a, c1b COMMON /common2/ c2a (1:3), c2b /common3/ c3a, c3b END ================================================ FILE: Units/parser-fortran.r/continuation.f90.d/expected.tags ================================================ para_a input.f90 /^para_a, & ! para_a /;" v module:test para_b input.f90 /^para_b, & ! para_b /;" v module:test para_c input.f90 /^para_c ! para_c /;" v module:test test input.f90 /^module test$/;" m ================================================ FILE: Units/parser-fortran.r/continuation.f90.d/input.f90 ================================================ ! Problem reported by Jim on 7 Jul 2002 module test real*8 :: & para_a, & ! para_a is ... para_b, & ! para_b is ... para_c ! para_c is ... ================================================ FILE: Units/parser-fortran.r/debian_432872.f90.d/expected.tags ================================================ FOO input.f90 /^ subroutine FOO /;" s module:FOO FOO input.f90 /^module FOO$/;" m ================================================ FILE: Units/parser-fortran.r/debian_432872.f90.d/input.f90 ================================================ ! { dg-do compile } ! PR18923 segfault after subroutine name confusion. module FOO contains subroutine FOO ! { dg-error "conflicts with PROCEDURE" } character(len=selected_int_kind(0)) :: C ! { dg-error "data declaration statement" } end subroutine ! { dg-error "Expecting END MODULE statement" } end ! { dg-warning "CONTAINS statement without FUNCTION" } ================================================ FILE: Units/parser-fortran.r/dollars-in-names.d/args.ctags ================================================ --sort=no --kinds-Fortran=+L ================================================ FILE: Units/parser-fortran.r/dollars-in-names.d/expected.tags ================================================ name$ input.f /^ function name$(/;" f name$ input.f /^ integer name\$$/;" L function:name$ file: main input.f /^ program main$/;" p ret$ input.f /^ integer ret\$$/;" v program:main ================================================ FILE: Units/parser-fortran.r/dollars-in-names.d/input.f ================================================ C Taken from #4033 submitted by @navinp0304. function name$() integer name$ name$ = 42 end function program main integer ret$ ret$=name$() print *,ret$ end program ================================================ FILE: Units/parser-fortran.r/dollars-in-names.d/validator ================================================ fortran+dollar-ok ================================================ FILE: Units/parser-fortran.r/dopbl2.f.d/expected.tags ================================================ DOPBL2 input.f /^ DOUBLE PRECISION FUNCTION DOPBL2(/;" f ================================================ FILE: Units/parser-fortran.r/dopbl2.f.d/input.f ================================================ ! Bug reported by Brian Helinski on 4 Feb 2003 DOUBLE PRECISION FUNCTION DOPBL2( SUBNAM, M, N, KKL, KKU ) * * -- LAPACK timing routine (version 3.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * June 30, 1999 * * .. Scalar Arguments .. CHARACTER*6 SUBNAM INTEGER KKL, KKU, M, N * .. * * Purpose * ======= * * DOPBL2 computes an approximation of the number of floating point * operations used by a subroutine SUBNAM with the given values * of the parameters M, N, KL, and KU. * * This version counts operations for the Level 2 BLAS. * * Arguments * ========= * * SUBNAM (input) CHARACTER*6 * The name of the subroutine. * * M (input) INTEGER * The number of rows of the coefficient matrix. M >= 0. * * N (input) INTEGER * The number of columns of the coefficient matrix. * If the matrix is square (such as in a solve routine) then * N is the number of right hand sides. N >= 0. * * KKL (input) INTEGER * The lower band width of the coefficient matrix. * KL is set to max( 0, min( M-1, KKL ) ). * * KKU (input) INTEGER * The upper band width of the coefficient matrix. * KU is set to max( 0, min( N-1, KKU ) ). * * ===================================================================== * * .. Local Scalars .. CHARACTER C1 CHARACTER*2 C2 CHARACTER*3 C3 DOUBLE PRECISION ADDS, EK, EM, EN, KL, KU, MULTS * .. * .. External Functions .. LOGICAL LSAME, LSAMEN EXTERNAL LSAME, LSAMEN * .. * .. Intrinsic Functions .. INTRINSIC MAX, MIN * .. * .. Executable Statements .. * * Quick return if possible * IF( M.LE.0 .OR. .NOT.( LSAME( SUBNAM, 'S' ) .OR. LSAME( SUBNAM, $ 'D' ) .OR. LSAME( SUBNAM, 'C' ) .OR. LSAME( SUBNAM, 'Z' ) ) ) $ THEN DOPBL2 = 0 RETURN END IF * C1 = SUBNAM( 1: 1 ) C2 = SUBNAM( 2: 3 ) C3 = SUBNAM( 4: 6 ) MULTS = 0 ADDS = 0 KL = MAX( 0, MIN( M-1, KKL ) ) KU = MAX( 0, MIN( N-1, KKU ) ) EM = M EN = N EK = KL * * ------------------------------- * Matrix-vector multiply routines * ------------------------------- * IF( LSAMEN( 3, C3, 'MV ' ) ) THEN * IF( LSAMEN( 2, C2, 'GE' ) ) THEN * MULTS = EM*( EN+1.D0 ) ADDS = EM*EN * * Assume M <= N + KL and KL < M * N <= M + KU and KU < N * so that the zero sections are triangles. * ELSE IF( LSAMEN( 2, C2, 'GB' ) ) THEN * MULTS = EM*( EN+1.D0 ) - ( EM-1.D0-KL )*( EM-KL ) / 2.D0 - $ ( EN-1.D0-KU )*( EN-KU ) / 2.D0 ADDS = EM*( EN+1.D0 ) - ( EM-1.D0-KL )*( EM-KL ) / 2.D0 - $ ( EN-1.D0-KU )*( EN-KU ) / 2.D0 * ELSE IF( LSAMEN( 2, C2, 'SY' ) .OR. LSAMEN( 2, C2, 'SP' ) .OR. $ LSAMEN( 3, SUBNAM, 'CHE' ) .OR. $ LSAMEN( 3, SUBNAM, 'ZHE' ) .OR. $ LSAMEN( 3, SUBNAM, 'CHP' ) .OR. $ LSAMEN( 3, SUBNAM, 'ZHP' ) ) THEN * MULTS = EM*( EM+1.D0 ) ADDS = EM*EM * ELSE IF( LSAMEN( 2, C2, 'SB' ) .OR. $ LSAMEN( 3, SUBNAM, 'CHB' ) .OR. $ LSAMEN( 3, SUBNAM, 'ZHB' ) ) THEN * MULTS = EM*( EM+1.D0 ) - ( EM-1.D0-EK )*( EM-EK ) ADDS = EM*EM - ( EM-1.D0-EK )*( EM-EK ) * ELSE IF( LSAMEN( 2, C2, 'TR' ) .OR. LSAMEN( 2, C2, 'TP' ) ) $ THEN * MULTS = EM*( EM+1.D0 ) / 2.D0 ADDS = ( EM-1.D0 )*EM / 2.D0 * ELSE IF( LSAMEN( 2, C2, 'TB' ) ) THEN * MULTS = EM*( EM+1.D0 ) / 2.D0 - $ ( EM-EK-1.D0 )*( EM-EK ) / 2.D0 ADDS = ( EM-1.D0 )*EM / 2.D0 - $ ( EM-EK-1.D0 )*( EM-EK ) / 2.D0 * END IF * * --------------------- * Matrix solve routines * --------------------- * ELSE IF( LSAMEN( 3, C3, 'SV ' ) ) THEN * IF( LSAMEN( 2, C2, 'TR' ) .OR. LSAMEN( 2, C2, 'TP' ) ) THEN * MULTS = EM*( EM+1.D0 ) / 2.D0 ADDS = ( EM-1.D0 )*EM / 2.D0 * ELSE IF( LSAMEN( 2, C2, 'TB' ) ) THEN * MULTS = EM*( EM+1.D0 ) / 2.D0 - $ ( EM-EK-1.D0 )*( EM-EK ) / 2.D0 ADDS = ( EM-1.D0 )*EM / 2.D0 - $ ( EM-EK-1.D0 )*( EM-EK ) / 2.D0 * END IF * * ---------------- * Rank-one updates * ---------------- * ELSE IF( LSAMEN( 3, C3, 'R ' ) ) THEN * IF( LSAMEN( 3, SUBNAM, 'SGE' ) .OR. $ LSAMEN( 3, SUBNAM, 'DGE' ) ) THEN * MULTS = EM*EN + MIN( EM, EN ) ADDS = EM*EN * ELSE IF( LSAMEN( 2, C2, 'SY' ) .OR. LSAMEN( 2, C2, 'SP' ) .OR. $ LSAMEN( 3, SUBNAM, 'CHE' ) .OR. $ LSAMEN( 3, SUBNAM, 'CHP' ) .OR. $ LSAMEN( 3, SUBNAM, 'ZHE' ) .OR. $ LSAMEN( 3, SUBNAM, 'ZHP' ) ) THEN * MULTS = EM*( EM+1.D0 ) / 2.D0 + EM ADDS = EM*( EM+1.D0 ) / 2.D0 * END IF * ELSE IF( LSAMEN( 3, C3, 'RC ' ) .OR. LSAMEN( 3, C3, 'RU ' ) ) THEN * IF( LSAMEN( 3, SUBNAM, 'CGE' ) .OR. $ LSAMEN( 3, SUBNAM, 'ZGE' ) ) THEN * MULTS = EM*EN + MIN( EM, EN ) ADDS = EM*EN * END IF * * ---------------- * Rank-two updates * ---------------- * ELSE IF( LSAMEN( 3, C3, 'R2 ' ) ) THEN IF( LSAMEN( 2, C2, 'SY' ) .OR. LSAMEN( 2, C2, 'SP' ) .OR. $ LSAMEN( 3, SUBNAM, 'CHE' ) .OR. $ LSAMEN( 3, SUBNAM, 'CHP' ) .OR. $ LSAMEN( 3, SUBNAM, 'ZHE' ) .OR. $ LSAMEN( 3, SUBNAM, 'ZHP' ) ) THEN * MULTS = EM*( EM+1.D0 ) + 2.D0*EM ADDS = EM*( EM+1.D0 ) * END IF END IF * * ------------------------------------------------ * Compute the total number of operations. * For real and double precision routines, count * 1 for each multiply and 1 for each add. * For complex and complex*16 routines, count * 6 for each multiply and 2 for each add. * ------------------------------------------------ * IF( LSAME( C1, 'S' ) .OR. LSAME( C1, 'D' ) ) THEN * DOPBL2 = MULTS + ADDS * ELSE * DOPBL2 = 6*MULTS + 2*ADDS * END IF * RETURN * * End of DOPBL2 * END ================================================ FILE: Units/parser-fortran.r/fortran-abstract-implementation.d/args.ctags ================================================ --fields=+m ================================================ FILE: Units/parser-fortran.r/fortran-abstract-implementation.d/expected.tags ================================================ list_type input.f90 /^ type, abstract :: list_type$/;" t module:test_implementation implementation:abstract test_implementation input.f90 /^module test_implementation$/;" m ================================================ FILE: Units/parser-fortran.r/fortran-abstract-implementation.d/input.f90 ================================================ module test_implementation type, abstract :: list_type end type list_type end module test_implementation ================================================ FILE: Units/parser-fortran.r/fortran-abstract-interface.d/args.ctags ================================================ --kinds-Fortran=+PL ================================================ FILE: Units/parser-fortran.r/fortran-abstract-interface.d/expected.tags ================================================ __anonadfcf4320105 input.f90 /^ abstract interface$/;" i module:test add input.f90 /^ procedure(suba), deferred :: add$/;" M type:atype atype input.f90 /^ type, abstract :: atype$/;" t module:test b input.f90 /^ class(atype) :: self, b$/;" L prototype:suba file: btype input.f90 /^ type, abstract, extends(atype) :: btype$/;" t module:test c input.f90 /^ integer c,/;" L prototype:suba file: d input.f90 /^ integer c, d$/;" L prototype:suba file: self input.f90 /^ class(atype) :: self,/;" L prototype:suba file: suba input.f90 /^ subroutine suba(/;" P interface:__anonadfcf4320105 test input.f90 /^module test$/;" m ================================================ FILE: Units/parser-fortran.r/fortran-abstract-interface.d/input.f90 ================================================ module test type, abstract :: atype contains procedure(suba), deferred :: add end type type, abstract, extends(atype) :: btype end type abstract interface subroutine suba(self, b) use, intrinsic :: iso_c_binding import :: atype import btype implicit none integer c, d class(atype) :: self, b end subroutine end interface end module test ================================================ FILE: Units/parser-fortran.r/fortran-associate.d/expected.tags ================================================ a input.f90 /^ real :: a$/;" v module:with_associate do_other_stuff input.f90 /^ subroutine do_other_stuff(/;" s module:with_associate do_stuff input.f90 /^ function do_stuff(/;" f module:with_associate with_associate input.f90 /^module with_associate$/;" m ================================================ FILE: Units/parser-fortran.r/fortran-associate.d/input.f90 ================================================ module with_associate real :: a contains function do_stuff(a) result(c) real, intent(in) :: a associate (b => a) c = b end associate end function do_stuff subroutine do_other_stuff(a) real, intent(in out) :: a a = 2 * a end subroutine do_other_stuff end module with_associate ================================================ FILE: Units/parser-fortran.r/fortran-bind-c.d/args.ctags ================================================ --kinds-Fortran=+P ================================================ FILE: Units/parser-fortran.r/fortran-bind-c.d/expected.tags ================================================ __anon73f11bcd0105 input.f90 /^ interface$/;" i module:test_bind_c a input.f90 /^ real(c_double) :: a$/;" k type:atype atype input.f90 /^ type, bind(c) :: atype$/;" t module:test_bind_c global_flag input.f90 /^ integer(C_INT), bind(C, name="_MyProject_flags") :: global_flag$/;" v module:test_bind_c print_c input.f90 /^ subroutine print_c(/;" P interface:__anon73f11bcd0105 test_bind_c input.f90 /^module test_bind_c$/;" m ================================================ FILE: Units/parser-fortran.r/fortran-bind-c.d/input.f90 ================================================ ! See https://gcc.gnu.org/onlinedocs/gfortran/Interoperability-with-C.html module test_bind_c use iso_c_binding ! test derived type type, bind(c) :: atype real(c_double) :: a end type atype ! this is ! struct { ! double a; ! } atype; ! in C language ! test interoperable global variable integer(C_INT), bind(C, name="_MyProject_flags") :: global_flag ! test Interoperable Subroutines and Functions interface subroutine print_c(string) bind(C, name="print_C") use iso_c_binding, only: c_char character(kind=c_char) :: string(*) end subroutine print_c end interface end module test_bind_c ================================================ FILE: Units/parser-fortran.r/fortran-block.d/expected.tags ================================================ suba input.f90 /^ SUBROUTINE suba(/;" s module:test_block subb input.f90 /^ subroutine subb$/;" s module:test_block test_block input.f90 /^module test_block$/;" m ================================================ FILE: Units/parser-fortran.r/fortran-block.d/input.f90 ================================================ module test_block contains SUBROUTINE suba() INTEGER :: a a = 5 BLOCK INTEGER :: b b = a + 2 END BLOCK END SUBROUTINE subroutine subb end subroutine end module test_block ================================================ FILE: Units/parser-fortran.r/fortran-derived-type-params.d/args.ctags ================================================ --fields=+m ================================================ FILE: Units/parser-fortran.r/fortran-derived-type-params.d/expected.tags ================================================ Members input.f90 /^module Members$/;" m MySubroutine input.f90 /^ subroutine MySubroutine(/;" s module:Members coordinates input.f90 /^ REAL :: coordinates(/;" k type:general_point d input.f90 /^ INTEGER(selected_int_kind(12)), LEN :: d$/;" k type:humongous_matrix dim input.f90 /^ INTEGER, KIND :: dim$/;" k type:general_point element input.f90 /^ REAL(k) :: element(/;" k type:humongous_matrix general_point input.f90 /^ TYPE general_point(/;" t module:Members humongous_matrix input.f90 /^ TYPE humongous_matrix(/;" t module:Members k input.f90 /^ INTEGER, KIND :: k = ki/;" k type:humongous_matrix ================================================ FILE: Units/parser-fortran.r/fortran-derived-type-params.d/input.f90 ================================================ module Members implicit none TYPE humongous_matrix(k, d) !-- Derived-type parameters INTEGER, KIND :: k = kind(0.0) INTEGER(selected_int_kind(12)), LEN :: d REAL(k) :: element(d,d) END TYPE TYPE general_point(dim) INTEGER, KIND :: dim REAL :: coordinates(dim) END TYPE contains subroutine MySubroutine(arg) ! ... end subroutine MySubroutine end module Members ================================================ FILE: Units/parser-fortran.r/fortran-enum.d/expected.tags ================================================ Constants input.f90 /^module Constants$/;" m E_e input.f90 /^ real, parameter :: E_e /;" v module:Constants Named1 input.f90 /^ enum :: Named1$/;" E module:Constants Named2 input.f90 /^ enum Named2$/;" E module:Constants Named3 input.f90 /^ enum(8) Named3$/;" E module:Constants Named4 input.f90 /^ enum*8 Named4$/;" E module:Constants Named5 input.f90 /^ enum(8) :: Named5$/;" E module:Constants Named6 input.f90 /^ enum*8 :: Named6$/;" E module:Constants Named7 input.f90 /^ enum, bind(c) :: Named7$/;" E module:Constants __anoncfbded350103 input.f90 /^ enum, bind(c) ! unnamed 1$/;" E module:Constants __anoncfbded350203 input.f90 /^ enum ! unnamed 2$/;" E module:Constants a input.f90 /^ enumerator :: a,/;" N enum:__anoncfbded350203 b input.f90 /^ enumerator :: a, b,/;" N enum:__anoncfbded350203 black input.f90 /^ enumerator :: red =1, blue, black /;" N enum:__anoncfbded350103 blue input.f90 /^ enumerator :: red =1, blue,/;" N enum:__anoncfbded350103 bronze input.f90 /^ enumerator gold, silver, bronze$/;" N enum:__anoncfbded350103 c input.f90 /^ enumerator :: a, b, c$/;" N enum:__anoncfbded350203 gold input.f90 /^ enumerator gold,/;" N enum:__anoncfbded350103 hc input.f90 /^ real, parameter :: hc /;" v module:Constants lavender input.f90 /^ enumerator :: pink, lavender$/;" N enum:__anoncfbded350103 pi input.f90 /^ real, parameter :: pi /;" v module:Constants pink input.f90 /^ enumerator :: pink,/;" N enum:__anoncfbded350103 purple input.f90 /^ enumerator :: purple$/;" N enum:__anoncfbded350103 red input.f90 /^ enumerator :: red /;" N enum:__anoncfbded350103 silver input.f90 /^ enumerator gold, silver,/;" N enum:__anoncfbded350103 x1 input.f90 /^ enumerator :: x1,/;" N enum:Named1 x2 input.f90 /^ enumerator :: x2,/;" N enum:Named2 x3 input.f90 /^ enumerator :: x3,/;" N enum:Named3 x4 input.f90 /^ enumerator :: x4,/;" N enum:Named4 x5 input.f90 /^ enumerator :: x5,/;" N enum:Named5 x6 input.f90 /^ enumerator :: x6,/;" N enum:Named6 x7 input.f90 /^ enumerator :: x7,/;" N enum:Named7 y1 input.f90 /^ enumerator :: x1, y1,/;" N enum:Named1 y2 input.f90 /^ enumerator :: x2, y2,/;" N enum:Named2 y3 input.f90 /^ enumerator :: x3, y3,/;" N enum:Named3 y4 input.f90 /^ enumerator :: x4, y4,/;" N enum:Named4 y5 input.f90 /^ enumerator :: x5, y5,/;" N enum:Named5 y6 input.f90 /^ enumerator :: x6, y6,/;" N enum:Named6 y7 input.f90 /^ enumerator :: x7, y7,/;" N enum:Named7 yellow input.f90 /^ enumerator yellow$/;" N enum:__anoncfbded350103 z1 input.f90 /^ enumerator :: x1, y1, z1$/;" N enum:Named1 z2 input.f90 /^ enumerator :: x2, y2, z2$/;" N enum:Named2 z3 input.f90 /^ enumerator :: x3, y3, z3$/;" N enum:Named3 z4 input.f90 /^ enumerator :: x4, y4, z4$/;" N enum:Named4 z5 input.f90 /^ enumerator :: x5, y5, z5$/;" N enum:Named5 z6 input.f90 /^ enumerator :: x6, y6, z6$/;" N enum:Named6 z7 input.f90 /^ enumerator :: x7, y7, z7$/;" N enum:Named7 ================================================ FILE: Units/parser-fortran.r/fortran-enum.d/input.f90 ================================================ module Constants implicit none real, parameter :: pi = 4 * atan(1.0) real, parameter :: E_e = 510998.91013 ! we now have enumerators in F2003/8, for the sake of interop with C enum, bind(c) ! unnamed 1 enumerator :: red =1, blue, black =5 enumerator yellow enumerator gold, silver, bronze enumerator :: purple enumerator :: pink, lavender end enum enum ! unnamed 2 enumerator :: a, b, c end enum enum :: Named1 enumerator :: x1, y1, z1 end enum enum Named2 enumerator :: x2, y2, z2 end enum enum(8) Named3 enumerator :: x3, y3, z3 end enum enum*8 Named4 enumerator :: x4, y4, z4 end enum enum(8) :: Named5 enumerator :: x5, y5, z5 end enum enum*8 :: Named6 enumerator :: x6, y6, z6 end enum enum, bind(c) :: Named7 enumerator :: x7, y7, z7 end enum real, parameter :: hc = 12398.4193 public end module Constants ================================================ FILE: Units/parser-fortran.r/fortran-extends-qualifier.d/args.ctags ================================================ --fields=+i ================================================ FILE: Units/parser-fortran.r/fortran-extends-qualifier.d/expected.tags ================================================ color input.f90 /^ integer :: color$/;" k type:shape filled input.f90 /^ logical :: filled$/;" k type:shape length input.f90 /^ integer :: length$/;" k type:rectangle rectangle input.f90 /^ type, extends(shape) :: rectangle$/;" t module:test_extends inherits:shape shape input.f90 /^ type shape$/;" t module:test_extends test_extends input.f90 /^module test_extends$/;" m width input.f90 /^ integer :: width$/;" k type:rectangle x input.f90 /^ integer :: x$/;" k type:shape y input.f90 /^ integer :: y$/;" k type:shape ================================================ FILE: Units/parser-fortran.r/fortran-extends-qualifier.d/input.f90 ================================================ module test_extends type shape integer :: color logical :: filled integer :: x integer :: y end type shape type, extends(shape) :: rectangle integer :: length integer :: width end type rectangle end module test_extends ================================================ FILE: Units/parser-fortran.r/fortran-forall.d/expected.tags ================================================ a input.f90 /^ real :: a$/;" v module:with_forall sub_with_forall input.f90 /^ subroutine sub_with_forall(/;" s module:with_forall two input.f90 /^ function two(/;" f module:with_forall with_forall input.f90 /^module with_forall$/;" m ================================================ FILE: Units/parser-fortran.r/fortran-forall.d/input.f90 ================================================ ! a module that uses a forall block module with_forall real :: a contains subroutine sub_with_forall(x) real, intent(inout) :: x(:) integer :: i forall(i=1:size(x)) x(i) = 0.5**i end forall end subroutine sub_with_forall function two() result(res) real :: res res = 2.0 end function two end module with_forall ================================================ FILE: Units/parser-fortran.r/fortran-interface.d/args.ctags ================================================ --kinds-Fortran=+P ================================================ FILE: Units/parser-fortran.r/fortran-interface.d/expected.tags ================================================ + input.f90 /^ interface operator(+)/;" i module:test_interface __anon502b83b10105 input.f90 /^ interface ! anonymous interface$/;" i module:test_interface add input.f90 /^ type(atype) function add(/;" P module:test_interface atype input.f90 /^ type atype$/;" t module:test_interface get input.f90 /^ interface get$/;" i module:test_interface get_1d input.f90 /^ subroutine get_1d(/;" s module:test_interface get_2d input.f90 /^ subroutine get_2d(/;" s module:test_interface suba input.f90 /^ subroutine suba(/;" P interface:__anon502b83b10105 subb input.f90 /^ subroutine subb(/;" P interface:__anon502b83b10105 test_interface input.f90 /^module test_interface$/;" m ================================================ FILE: Units/parser-fortran.r/fortran-interface.d/input.f90 ================================================ module test_interface type atype end type atype ! operator overload interface operator(+) ! subprogram prototype type(atype) function add(a, b) import atype type(atype), intent(in) :: a, b end function add end interface operator(+) ! wrap subprogram prototypes interface ! anonymous interface subroutine suba() end subroutine suba subroutine subb() end subroutine subb end interface ! define generic subprograms interface get ! subprogram name list module procedure get_1d module procedure get_2d end interface get contains ! definition of subprograms subroutine get_1d(a) real a(:) end subroutine get_1d subroutine get_2d(a) real a(:, :) end subroutine get_2d end module test_interface ================================================ FILE: Units/parser-fortran.r/fortran-linkname.d/args.ctags ================================================ --sort=no --extras-Fortran={linkName} --fields=+{extras} ================================================ FILE: Units/parser-fortran.r/fortran-linkname.d/expected.tags ================================================ my_mod input.f /^ module my_mod$/;" m __anon9b9a88660103 input.f /^ enumerator :: my_constr = 1, my_second_constr = 4$/;" E module:my_mod extras:anonymous my_constr input.f /^ enumerator :: my_constr /;" N enum:__anon9b9a88660103 my_second_constr input.f /^ enumerator :: my_constr = 1, my_second_constr /;" N enum:__anon9b9a88660103 my_type input.f /^ type my_type$/;" t module:my_mod a input.f /^ integer a$/;" k type:my_type b input.f /^ integer b$/;" k type:my_type c input.f /^ integer c$/;" k type:my_type my_proc input.f /^ procedure :: my_proc /;" M type:my_type my_sequence_type input.f /^ type my_sequence_type$/;" t module:my_mod a input.f /^ integer a$/;" k type:my_sequence_type b input.f /^ integer b$/;" k type:my_sequence_type my_mod_type input.f /^ type(my_sequence_type) :: my_mod_type$/;" v module:my_mod my_mod_common input.f 23;" c module:my_mod my_mod_common_ input.f 23;" c module:my_mod extras:linkName my_func input.f /^ function my_func(/;" f module:my_mod my_func_ input.f /^ function my_func(x)$/;" f module:my_mod extras:linkName my_block input.f /^ block data my_block$/;" b my_block_ input.f /^ block data my_block$/;" b extras:linkName my_var input.f /^ integer my_var$/;" v blockData:my_block my_common input.f 40;" c blockData:my_block my_common_ input.f 40;" c blockData:my_block extras:linkName my_subr input.f /^ subroutine my_subr$/;" s my_subr_ input.f /^ subroutine my_subr$/;" s extras:linkName my_entry input.f /^ entry my_entry$/;" e subroutine:my_subr my_entry_ input.f /^ entry my_entry$/;" e subroutine:my_subr extras:linkName my_main input.f /^ program my_main$/;" p my_interface input.f /^ interface my_interface$/;" i program:my_main my_var input.f /^ integer my_var$/;" v program:my_main my_namelist input.f /^ namelist \/my_namelist\//;" n program:my_main my_conc_type input.f /^ type(my_type) :: my_conc_type$/;" v program:my_main my_common input.f 64;" c program:my_main my_common_ input.f 64;" c program:my_main extras:linkName ================================================ FILE: Units/parser-fortran.r/fortran-linkname.d/input.f ================================================ module my_mod enum, bind(c) enumerator :: my_constr = 1, my_second_constr = 4 end enum type my_type integer a integer b integer c contains procedure :: my_proc => my_func end type my_type type my_sequence_type sequence integer a integer b end type type(my_sequence_type) :: my_mod_type common /my_mod_common/ my_mod_type contains function my_func(x) class(my_type), intent(in) :: x my_func = x%a return my_func = 2 return end function my_func end module block data my_block integer my_var common /my_common/ my_var data my_var/123/ end subroutine my_subr use my_mod integer :: my_enum = my_constr print *, my_enum return entry my_entry print *, "an entry!" end subroutine my_subr program my_main use my_mod interface my_interface subroutine my_subr() end subroutine my_subr end interface integer my_var namelist /my_namelist/ my_var type(my_type) :: my_conc_type common /my_common/ my_var call my_subr() print *, my_conc_type%my_proc() end program my_main ================================================ FILE: Units/parser-fortran.r/fortran-method.d/args.ctags ================================================ --fields=+m ================================================ FILE: Units/parser-fortran.r/fortran-method.d/expected.tags ================================================ + input.f90 /^ generic :: operator(+)/;" M type:atype = input.f90 /^ generic :: assignment(=) =>/;" M type:atype add input.f90 /^ generic :: add => add_/;" M type:atype add_1d input.f90 /^ procedure, deferred :: add_1d,/;" M type:atype implementation:deferred add_2d input.f90 /^ procedure, deferred :: add_1d, add_2d,/;" M type:atype implementation:deferred add_3d input.f90 /^ procedure, deferred :: add_1d, add_2d, add_3d$/;" M type:atype implementation:deferred add_4d input.f90 /^ procedure, non_overridable :: add_4d$/;" M type:atype implementation:non_overridable atype input.f90 /^ type :: atype$/;" t module:test_method clean input.f90 /^ final clean$/;" M type:atype test_method input.f90 /^module test_method$/;" m ================================================ FILE: Units/parser-fortran.r/fortran-method.d/input.f90 ================================================ module test_method type :: atype contains generic :: add => add_1d, & add_2d, & add_3d generic :: operator(+) => add_1d, add_2d generic :: assignment(=) => assigns procedure, deferred :: add_1d, add_2d, add_3d procedure, non_overridable :: add_4d final clean end type atype end module test_method ================================================ FILE: Units/parser-fortran.r/fortran-pointer.d/expected.tags ================================================ Main input.f90 /^program Main$/;" p MyOtherProc input.f90 /^ MyOtherProc /;" v module:Test MyProc input.f90 /^ procedure(ProcOne), pointer :: MyProc /;" v module:Test ProcOne input.f90 /^ function ProcOne(/;" f module:Test ProcPointOne input.f90 /^ procedure(:), pointer :: ProcPointOne /;" v program:Main ProcPointTwo input.f90 /^ => null(), ProcPointTwo /;" v program:Main ProcTwo input.f90 /^ function ProcTwo(/;" f module:Test Test input.f90 /^module Test$/;" m myparameter input.f90 /^ real, parameter :: myparameter$/;" v module:Test variable input.f90 /^ real :: variable, variable_/;" v program:Main variable_three input.f90 /^ integer :: variable_three$/;" v program:Main variable_two input.f90 /^ real :: variable, variable_two$/;" v program:Main ================================================ FILE: Units/parser-fortran.r/fortran-pointer.d/input.f90 ================================================ module Test implicit none procedure(ProcOne), pointer :: MyProc => null(), & MyOtherProc => ProcTwo real, parameter :: myparameter contains function ProcOne(arg1, optformat) ! not relevant end function ProcOne function ProcTwo(arg1, optformat) ! not relevant end function ProcTwo end module Test program Main implicit none ! deliberately break up the line to make sure the tagparser doesn't choke on awkward cases procedure(:), pointer :: ProcPointOne & => null(), ProcPointTwo => & null() real :: variable, variable_two integer :: variable_three ProcPointOne => ProcTwo end program Main ================================================ FILE: Units/parser-fortran.r/fortran-procedure-qualifiers.d/expected.tags ================================================ add input.f90 /^ procedure, pass :: add$/;" M type:atype append input.f90 /^ procedure, pass(self) :: append$/;" M type:atype atype input.f90 /^ type atype$/;" t module:test list input.f90 /^ procedure, deferred :: list$/;" M type:atype print input.f90 /^ procedure, nopass :: print$/;" M type:atype test input.f90 /^module test$/;" m write input.f90 /^ procedure, non_overridable :: write$/;" M type:atype ================================================ FILE: Units/parser-fortran.r/fortran-procedure-qualifiers.d/input.f90 ================================================ module test type atype contains procedure, pass :: add procedure, pass(self) :: append procedure, nopass :: print procedure, non_overridable :: write procedure, deferred :: list end type atype end module test ================================================ FILE: Units/parser-fortran.r/fortran-procedure.d/expected.tags ================================================ a input.f90 /^ real :: a$/;" v module:proc_pointer my_pointer input.f90 /^ procedure(sub), pointer :: my_pointer$/;" v module:proc_pointer proc_pointer input.f90 /^module proc_pointer$/;" m sub input.f90 /^ subroutine sub(/;" s module:proc_pointer ================================================ FILE: Units/parser-fortran.r/fortran-procedure.d/input.f90 ================================================ ! a module that uses procedure pointer module proc_pointer real :: a procedure(sub), pointer :: my_pointer contains subroutine sub(x) real, intent(inout) :: x(:) integer :: i do i=1,size(x) x(i) = 0.5**i end do end subroutine sub end module proc_pointer ================================================ FILE: Units/parser-fortran.r/fortran-protected.d/expected.tags ================================================ i input.f90 /^ integer, public, protected :: i$/;" v module:test_implementation test_implementation input.f90 /^module test_implementation$/;" m ================================================ FILE: Units/parser-fortran.r/fortran-protected.d/input.f90 ================================================ module test_implementation integer, public, protected :: i end module test_implementation ================================================ FILE: Units/parser-fortran.r/fortran-signature.d/args.ctags ================================================ --fields=+S --kinds-Fortran=+LP ================================================ FILE: Units/parser-fortran.r/fortran-signature.d/expected.tags ================================================ __anon06616a720105 input.f90 /^ interface$/;" i module:test_signature a input.f90 /^ integer :: a$/;" L subroutine:fnb file: a input.f90 /^ integer a,/;" L subroutine:suba file: arg input.f90 /^ type(atype) :: arg$/;" L prototype:subb file: b input.f90 /^ integer a, b$/;" L subroutine:suba file: fna input.f90 /^ real function fna(/;" f module:test_signature fnb input.f90 /^ subroutine fnb$/;" s module:test_signature suba input.f90 /^ subroutine suba /;" s module:test_signature signature:(a, b) subb input.f90 /^ subroutine subb /;" P interface:__anon06616a720105 signature:(arg) test_signature input.f90 /^module test_signature$/;" m ================================================ FILE: Units/parser-fortran.r/fortran-signature.d/input.f90 ================================================ module test_signature interface subroutine subb (arg) type(atype) :: arg end subroutine end interface contains subroutine suba & (a, & ! comment b) integer a, b end subroutine real function fna() use, intrinsic :: iso_c_binding end function subroutine fnb integer :: a end subroutine end module test_signature ================================================ FILE: Units/parser-fortran.r/fortran-square-parens.d/expected.tags ================================================ Symmetry input.f90 /^ type Symmetry$/;" t module:squaretest assignee input.f90 /^ real, allocatable :: assignee[/;" v module:squaretest execute input.f90 /^ subroutine execute(/;" s module:squaretest invisible input.f90 /^ integer :: invisible$/;" v module:squaretest invisible_four input.f90 /^ integer :: invisible_four$/;" v module:squaretest invisible_three input.f90 /^ integer :: invisible_three$/;" v module:squaretest invisible_two input.f90 /^ integer :: invisible_two$/;" v module:squaretest iterations input.f90 /^ integer :: matrix(3,3), iterations$/;" k type:Symmetry main input.f90 /^program main$/;" p matrix input.f90 /^ integer :: matrix(/;" k type:Symmetry squaretest input.f90 /^module squaretest$/;" m state input.f90 /^ real, allocatable :: state(/;" v module:squaretest state_two input.f90 /^ real, intent(in), allocatable, dimension(:), codimension[:] :: state_two$/;" v module:squaretest symmetries input.f90 /^ type(Symmetry), parameter :: symmetries(/;" v module:squaretest ================================================ FILE: Units/parser-fortran.r/fortran-square-parens.d/input.f90 ================================================ module squaretest implicit none type Symmetry integer :: matrix(3,3), iterations end type Symmetry ! make sure F2003 '[]' arrays don't break the symbol list type(Symmetry), parameter :: symmetries(14) = & [ Symmetry(reshape([1,0,0, 0,1,0, 0,0,1], [3,3]),1), & Symmetry(reshape([1,0,0, 0,0,1, 0,-1,0],[3,3]),3), & Symmetry(reshape([0,0,-1, 0,1,0, 1,0,0], [3,3]),3) ] integer :: invisible ! make sure coarray syntax doesn't break the symbol list real, allocatable :: state(:)[:] integer :: invisible_two ! there are multiple ways to specify `dimension` and `codimension` ! a normal dimension and a codimension real, intent(in), allocatable, dimension(:), codimension[:] :: state_two integer :: invisible_three ! a 'normal' scalar (no '()'), but with a codimension '[]' real, allocatable :: assignee[:] integer :: invisible_four contains subroutine execute(state) real, intent(in) :: state(:)[:] end subroutine execute end module squaretest program main use module squaretest end program main ================================================ FILE: Units/parser-fortran.r/fortran-submodule.d/README ================================================ x, y are tagged because the submodule statement of example_sssmod is broken. Ctags makes garbage from garbage. ================================================ FILE: Units/parser-fortran.r/fortran-submodule.d/args.ctags ================================================ --sort=no --fields=+K{inherits} ================================================ FILE: Units/parser-fortran.r/fortran-submodule.d/expected.tags ================================================ example_smod input.f90 /^submodule (example_mod) example_smod$/;" submodule inherits:example_mod g input.f90 /^ module function g(/;" function submodule:example_smod example_ssmod input.f90 /^submodule (example_mod:example_smod) example_ssmod$/;" submodule inherits:example_mod:example_smod g2 input.f90 /^ module function g2(/;" function submodule:example_ssmod function input.f90 /^ module function /;" module x input.f90 /^ integer :: x,/;" variable module:function y input.f90 /^ integer :: x,y$/;" variable module:function ================================================ FILE: Units/parser-fortran.r/fortran-submodule.d/input.f90 ================================================ ! ! Derived from comment #1616 submitted by @cbcoutinho ! submodule (example_mod) example_smod contains module function g(x) result(y) integer :: x,y y = x * 2 end function g end submodule example_smod submodule (example_mod:example_smod) example_ssmod contains module function g2(x) result(y) integer :: x,y y = x * 2 end function g2 end submodule example_ssmod submodule (example_mod:example_smod:example_ssmod*broken*) example_sssmod contains module function g3(x) result(y) integer :: x,y y = x * 2 end function g3 end submodule example_sssmod ================================================ FILE: Units/parser-fortran.r/implied_program.f.d/expected.tags ================================================ i input.f /^ integer i$/;" v ================================================ FILE: Units/parser-fortran.r/implied_program.f.d/input.f ================================================ C Bug reported by Brian Helinski on 28 Feb 2003 ! implicit program main integer i i = 5 write(*,*) i end ================================================ FILE: Units/parser-fortran.r/initialization.f90.d/expected.tags ================================================ funcon input.f90 /^ MODULE funcon$/;" m imat input.f90 /^ imat=/;" v module:funcon imat6 input.f90 /^ imat6=/;" v module:funcon ================================================ FILE: Units/parser-fortran.r/initialization.f90.d/input.f90 ================================================ ! Tests for correct parsing of complicated initialization MODULE funcon IMPLICIT NONE REAL(8),DIMENSION(3,3),PARAMETER :: & imat= reshape((/1.d0,0.d0,0.d0, & 0.d0,1.d0,0.d0, & 0.d0,0.d0,1.d0/),(/3,3/)) REAL(8),DIMENSION(6,6),PARAMETER :: & imat6= reshape((/1.d0,0.d0,0.d0,0.d0,0.d0,0.d0, & 0.d0,1.d0,0.d0,0.d0,0.d0,0.d0, & 0.d0,0.d0,1.d0,0.d0,0.d0,0.d0, & 0.d0,0.d0,0.d0,1.d0,0.d0,0.d0, & 0.d0,0.d0,0.d0,0.d0,1.d0,0.d0, & 0.d0,0.d0,0.d0,0.d0,0.d0,1.d0/),(/6,6/)) END MODULE funcon ================================================ FILE: Units/parser-fortran.r/invalid_name.f90.d/expected.tags ================================================ Activity input.f90 /^ Integer(2) :: Activity$/;" k type:Detection_Record DR_Filename input.f90 /^ Character*1024 DR_Filename$/;" v module:TR_DetectionRecording DR_Lun input.f90 /^ Integer :: DR_Lun$/;" v module:TR_DetectionRecording Detection_Record input.f90 /^ Type Detection_Record$/;" t module:TR_DetectionRecording Face input.f90 /^ Integer(2) :: Face$/;" k type:Detection_Record TR_DetectionRecording input.f90 /^ Module TR_DetectionRecording$/;" m Type input.f90 /^ Integer(2) :: Type ! "Type"/;" k type:Detection_Record ================================================ FILE: Units/parser-fortran.r/invalid_name.f90.d/input.f90 ================================================ ! Test of parsing type with invalid name Module TR_DetectionRecording Implicit None Save Integer :: DR_Lun Character*1024 DR_Filename Type Detection_Record Integer(2) :: Activity Integer(2) :: Type ! "Type" not valid entity name Integer(2) :: Face End Type Detection_Record End Module TR_DetectionRecording ================================================ FILE: Units/parser-fortran.r/lanus.for.d/expected.tags ================================================ FAC010 input.for /^ character*5 FAC010 /;" v FEC010 input.for /^ character*6 FEC010 /;" v PER010 input.for /^ character*40 PER010 /;" v REM010 input.for /^ character*5 REM010 /;" v URE010 input.for /^ character*5 URE010 /;" v ================================================ FILE: Units/parser-fortran.r/lanus.for.d/input.for ================================================ * From jlanus@netscape.net Thu Jan 16 20:38:12 2003 * Date: Tue, 24 Sep 2002 12:20:07 -0400 * From: Juan Lanus * To: ctags-users@lists.sourceforge.net * Subject: [Ctags] seeking for help to set ctags to work with old FORTRAN * * Hi * * I'm trying to set ctags to work with some old FORTRAN 77 programs. * I'm in Windows 2000, vim 6.1 and exuberant ctags 5.3.1. * The programs are for VAX FORTRAN 77 as of 1988. Written with tabs and 132 columns line length. * * [...] * * What am I doing wrong? This is my first contact with tags files of any sort and I'm vexed. * * A sample .DES file is included at the bottom. * * TIA * * Juan Lanus * TECNOSOL * Argentina * * **************** ********************************************************************* * * * Sistema Personalizado - descripcion de registros - CGA - 1/12/89 * * * * De tablas generales PERTAB012 - tabla 010 * * * ********************************************************************* character*6 FEC010 !Fecha de Proceso aa/mm/dd character*5 URE010 !Ultimo Numero de Pedido character*5 REM010 !Ultimo Numero de Remito character*5 FAC010 !Ultimo Numero de Factura character*40 PER010 !Registro de Fecha equivalence (PER010(1:1) ,FEC010(1:1)) equivalence (PER010(7:7) ,URE010(1:1)) equivalence (PER010(12:12),REM010(1:1)) equivalence (PER010(17:17),FAC010(1:1)) ****************** Fin Registro de Fecha *********************************** ================================================ FILE: Units/parser-fortran.r/misc_types.f.d/expected.tags ================================================ INFOOBAR input.f /^ INTEGER INFOOBAR$/;" v program:specs M input.f /^ INTEGER M(/;" v program:specs specs input.f /^ program specs$/;" p ================================================ FILE: Units/parser-fortran.r/misc_types.f.d/input.f ================================================ ! Provided by Brian Helsinki, 7 March 2003 ! cexternal ! cglobal ! pexternal ! pglobal ! inline ! virtual ! volatile ! pascal program specs VIRTUAL M(10,10), Y(100) VOLATILE V, Z, MAT, /INI/ EXTERNAL ABS ! variations of external and global CEXTERNAL ABS1 ! not supported CGLOBAL ABS2 ! not supported PEXTERNAL ABS3 ! not supported $IF DEFINED(MAC_DEP) PASCAL EXTERNAL ABS3_var2 ! not supported $ENDIF PGLOBAL ABS4 INTEGER INFOOBAR INLINE (INFOOBAR=00000) ! not supported INTEGER M(5) DATA M/5*0/ CALL INFOOBAR(5,4) END ================================================ FILE: Units/parser-fortran.r/misc_types.f90.d/expected.tags ================================================ align_second_16 input.f90 /^ integer(2) :: align_second_16$/;" k type:my_struct base_type input.f90 /^ integer base_type$/;" v program:testalloc first_byte input.f90 /^ integer(1) :: first_byte$/;" k type:my_struct i input.f90 /^ integer i,/;" v program:testalloc i2 input.f90 /^ integer i2$/;" v program:testalloc i3 input.f90 /^ integer i3$/;" v program:testalloc i4 input.f90 /^ integer i4$/;" v program:testalloc i5 input.f90 /^ integer i5$/;" v program:testalloc i6 input.f90 /^ integer i6$/;" v program:testalloc i7 input.f90 /^ integer i7$/;" v program:testalloc i8 input.f90 /^ integer i8$/;" v program:testalloc list input.f90 /^ real, dimension (:), allocatable :: list /;" v program:testalloc my_struct input.f90 /^ structure \/my_struct\//;" t program:testalloc status input.f90 /^ integer i, status$/;" v program:testalloc testalloc input.f90 /^ program testalloc$/;" p the_struct input.f90 /^ record \/m_struct\/ the_struct /;" v program:testalloc ================================================ FILE: Units/parser-fortran.r/misc_types.f90.d/input.f90 ================================================ ! Provided by Brian Helsinki, 7 March 2003 program testalloc integer base_type automatic foobar_var ! automatic breaks parsing integer i2 static s_var ! static breaks parsing integer i3 volatile v_var ! volatile breaks var parsing integer i4 DLL_IMPORT foobar2 ! break var parsing DLL_EXPORT foobar ! breaks var parsing integer i5 common foobar_var, s_var, v_var integer i6 structure /my_struct/ integer(1) :: first_byte integer(1) :: %fill integer(2) :: align_second_16 end structure integer i7 record /m_struct/ the_struct ! break var parsing integer i8 real, dimension (:), allocatable :: list ! allocatable integer i, status i = 99 allocate (list(i), stat=status ) ! create array allocate list (1) = 1.2 deallocate (list) ! deallocate do i=1,100 j=i end do stop end ================================================ FILE: Units/parser-fortran.r/multi-input-fixed-then-free.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-fortran.r/multi-input-fixed-then-free.d/expected.tags ================================================ p1 input.f /^ program p1$/;" p s input.f /^ character*5 s$/;" v program:p1 r input.f /^ character*5 r$/;" v program:p1 s1 input-0.f90 /^subroutine s1$/;" s ================================================ FILE: Units/parser-fortran.r/multi-input-fixed-then-free.d/input-0.f90 ================================================ subroutine s1 real :: a,b,c,d if (a .eq. b .and. & c. eq. d) then a=0 endif end ================================================ FILE: Units/parser-fortran.r/multi-input-fixed-then-free.d/input.f ================================================ program p1 character*5 s c character*5 r r="abcde" end ================================================ FILE: Units/parser-fortran.r/multi-input-free-then-fixed.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-fortran.r/multi-input-free-then-fixed.d/expected.tags ================================================ s1 input.f90 /^subroutine s1$/;" s p1 input-0.f /^ program p1$/;" p s input-0.f /^ character*5 s$/;" v program:p1 r input-0.f /^ character*5 r$/;" v program:p1 ================================================ FILE: Units/parser-fortran.r/multi-input-free-then-fixed.d/input-0.f ================================================ program p1 character*5 s c character*5 r r="abcde" end ================================================ FILE: Units/parser-fortran.r/multi-input-free-then-fixed.d/input.f90 ================================================ subroutine s1 real :: a,b,c,d if (a .eq. b .and. & c. eq. d) then a=0 endif end ================================================ FILE: Units/parser-fortran.r/namelist.f.d/expected.tags ================================================ main input.f /^ PROGRAM main$/;" p namelist1 input.f /^ NAMELIST \/namelist1\//;" n program:main namelist2 input.f /^ NAMELIST \/namelist2\//;" n program:main namelist3 input.f /^ NAMELIST \/namelist2\/ n2a, n2b \/namelist3\//;" n program:main ================================================ FILE: Units/parser-fortran.r/namelist.f.d/input.f ================================================ PROGRAM main NAMELIST /namelist1/ n1a, n1b NAMELIST /namelist2/ n2a, n2b /namelist3/ n3a, n3b END ================================================ FILE: Units/parser-fortran.r/numlib.f90.d/args.ctags ================================================ --kinds-Fortran=+P ================================================ FILE: Units/parser-fortran.r/numlib.f90.d/expected.tags ================================================ __anon1963f93b0305 input.f90 /^ interface$/;" i module:numerical_libraries __anon1963f93b0405 input.f90 /^ interface$/;" i prototype:b2lsf a2ald input.f90 /^ subroutine a2ald /;" P interface:__anon1963f93b0305 b2lsf input.f90 /^ subroutine b2lsf /;" P interface:__anon1963f93b0305 fcn input.f90 /^ subroutine fcn(/;" P interface:__anon1963f93b0405 numerical_libraries input.f90 /^ module numerical_libraries$/;" m ================================================ FILE: Units/parser-fortran.r/numlib.f90.d/input.f90 ================================================ ! Bug reported by Brian Helinski on 4 Feb 2003 module numerical_libraries interface subroutine a2ald (nf, nl, y, nrf, indrf, nef, nfef, indef, conper, iprint& , model, aov, ems, vc, ldvc, ymeans, wk, iwk, c13ksp) integer, intent(in) :: nf integer, dimension(*), intent(in) :: nl real(kind(1e0)), dimension(*) :: y integer, intent(in) :: nrf integer, dimension(*), intent(in) :: indrf integer, intent(in) :: nef integer, dimension(*), intent(in) :: nfef integer, dimension(*), intent(in) :: indef real(kind(1e0)), intent(in) :: conper integer, intent(in) :: iprint integer, intent(in) :: model real(kind(1e0)), dimension(*), intent(in) :: aov real(kind(1e0)), dimension(*), intent(inout) :: ems real(kind(1e0)), dimension(ldvc,*), intent(inout) :: vc integer, intent(in) :: ldvc real(kind(1e0)), dimension(*), intent(in) :: ymeans real(kind(1e0)), dimension(*), intent(inout) :: wk integer, dimension(*), intent(in) :: iwk character (len = 13), dimension(*), intent(out) :: c13ksp end subroutine subroutine b2lsf (fcn, m, n, xguess, ibtype, xlb, xub, xscale, fscale& , iparam, rparam, x, fvec, fjac, ldfjac, wk, iwk) integer, intent(in) :: m integer, intent(in) :: n real(kind(1e0)), dimension(*) :: xguess integer, intent(in) :: ibtype real(kind(1e0)), dimension(*), intent(inout) :: xlb real(kind(1e0)), dimension(*), intent(inout) :: xub real(kind(1e0)), dimension(*) :: xscale real(kind(1e0)), dimension(*) :: fscale integer, dimension(*) :: iparam real(kind(1e0)), dimension(*) :: rparam real(kind(1e0)), dimension(*) :: x real(kind(1e0)), dimension(*) :: fvec real(kind(1e0)), dimension(*) :: fjac integer, intent(in) :: ldfjac real(kind(1e0)), dimension(*) :: wk integer, dimension(*) :: iwk interface subroutine fcn(m, n, x, f) integer, intent(in) :: m, n real(kind(1e0)), intent(in) :: x(*) real(kind(1e0)), intent(out) :: f(*) end subroutine end interface end subroutine END INTERFACE end module ================================================ FILE: Units/parser-fortran.r/pure_elem.f95.d/README ================================================ This test has the truncation issue #333. ================================================ FILE: Units/parser-fortran.r/pure_elem.f95.d/expected.tags ================================================ F input.f95 /^ PURE REAL FUNCTION F(x,y) ! pure broken returns 'PURE REAL FU/;" f elem_maxabs input.f95 /^ ELEMENTAL REAL FUNCTION elem_maxabs(/;" f pure_func input.f95 /^ PURE REAL FUNCTION pure_func(/;" f pure_maxabs2 input.f95 /^ PURE REAL FUNCTION pure_maxabs2(/;" f ================================================ FILE: Units/parser-fortran.r/pure_elem.f95.d/input.f95 ================================================ ! elemental ! !Pure procedures are procedures declared with the PURE keyword and which !satisfy certain constraints that ensure they have no side !effects. They can be used in specification expressions and !within FORALL constructs and statements. !Elemental procedures can be written in Fortran 95 using the ELEMENTAL !keyword. Elemental procedures are automatically ``pure''. !Example: PURE REAL FUNCTION pure_func(x,y) ! pure okay IMPLICIT NONE REAL, INTENT(IN) :: x, y pure_func = x*x + y*y + 2*x*y + ASIN(MIN(x/y,y/x)) END FUNCTION pure_func PURE REAL FUNCTION F(x,y) ! pure broken returns 'PURE REAL FU' IMPLICIT NONE REAL, INTENT(IN) :: x, y F = x*x + y*y + 2*x*y + ASIN(MIN(x/y,y/x)) END FUNCTION F ELEMENTAL REAL FUNCTION elem_maxabs(a,b) ! elemental broke IMPLICIT NONE REAL,INTENT(IN) :: a,b elem_maxabs = MAX(ABS(a),ABS(b)) END PURE REAL FUNCTION pure_maxabs2(a,b) ! pure okay IMPLICIT NONE REAL,INTENT(IN) :: a,b pure_maxabs2 = MAX(ABS(a),ABS(b)) END ================================================ FILE: Units/parser-fortran.r/recursive.f95.d/args.ctags ================================================ --kinds-Fortran=+P ================================================ FILE: Units/parser-fortran.r/recursive.f95.d/expected.tags ================================================ __anon8fb642160105 input.f95 /^ $/;" i module:approx __anon8fb642160205 input.f95 /^ $/;" i module:approx2 approx input.f95 /^ MODULE approx$/;" m approx2 input.f95 /^ MODULE approx2$/;" m arcsin input.f95 /^ recursive function arcsin /;" P interface:__anon8fb642160105 arcsin1 input.f95 /^ recursive function arcsin1 /;" P interface:__anon8fb642160105 arcsin2 input.f95 /^ double precision recursive function arcsin2 /;" P interface:__anon8fb642160105 arcsin3 input.f95 /^ recursive double precision function arcsin3 /;" P interface:__anon8fb642160105 as input.f95 /^ double precision recursive function as /;" P interface:__anon8fb642160205 as1 input.f95 /^ recursive double precision function as1 /;" P interface:__anon8fb642160205 as2 input.f95 /^ recursive function as2 /;" P interface:__anon8fb642160205 as3 input.f95 /^ recursive function as3 /;" P interface:__anon8fb642160205 parts input.f95 /^ integer :: parts$/;" v module:approx parts2 input.f95 /^ integer :: parts2$/;" v module:approx2 y input.f95 /^ double precision :: y$/;" v module:approx z input.f95 /^ double precision :: z$/;" v module:approx2 ================================================ FILE: Units/parser-fortran.r/recursive.f95.d/input.f95 ================================================ ! result/recursive broken MODULE approx interface recursive function arcsin (angle, terms) ! no result keyword double precision arcsin1 double precision angle integer terms end function arcsin recursive function arcsin1 (angle, terms) result (value) ! no explicit type double precision angle integer terms double precision value end function arcsin1 double precision recursive function arcsin2 (angle, terms) result (value) ! type + recurs double precision angle integer terms end function arcsin2 ! only this function seems to be found recursive double precision function arcsin3 (angle, terms) result (value ) ! recurs + type double precision angle integer terms end function arcsin3 end interface double precision :: y integer :: parts END MODULE MODULE approx2 interface double precision recursive function as (angle, terms) result (value) ! type + recurs double precision angle integer terms end function as recursive double precision function as1 (angle, terms) result (value ) ! recurs + type double precision angle integer terms end function as1 ! but now I can see this one recursive function as2 (angle, terms) ! no result keyword double precision arcsin1 double precision angle integer terms end function as2 ! .. and this one! recursive function as3 (angle, terms) result (value) ! no explicit type double precision angle integer terms double precision value end function as3 end interface double precision :: z integer :: parts2 END MODULE ================================================ FILE: Units/parser-fortran.r/reset-newline-state.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-fortran.r/reset-newline-state.d/expected.tags ================================================ mod1 input-1.f90 /^ MODULE mod1$/;" m var1 input-1.f90 /^ integer :: var1$/;" v module:mod1 mod2 input-2.f90 /^ MODULE mod2$/;" m var2 input-2.f90 /^ integer :: var2$/;" v module:mod2 ================================================ FILE: Units/parser-fortran.r/reset-newline-state.d/input-1.f90 ================================================ #include "in.fpp" MODULE mod1 implicit none integer :: var1 END MODULE mod1 ================================================ FILE: Units/parser-fortran.r/reset-newline-state.d/input-2.f90 ================================================ #include "in.fpp" MODULE mod2 implicit none integer :: var2 END MODULE ================================================ FILE: Units/parser-fortran.r/reset-newline-state.d/input.f90 ================================================ ! Dummy file ================================================ FILE: Units/parser-fortran.r/semicolon.f90.d/expected.tags ================================================ SEMI input.f90 /^ MODULE SEMI$/;" m VAR1 input.f90 /^ INTEGER (4) :: VAR1;/;" v module:SEMI VAR2 input.f90 /^ INTEGER (4) :: VAR1; INTEGER (4) VAR2$/;" v module:SEMI ================================================ FILE: Units/parser-fortran.r/semicolon.f90.d/input.f90 ================================================ MODULE SEMI INTEGER (4) :: VAR1; INTEGER (4) VAR2 END MODULE SEMI ================================================ FILE: Units/parser-fortran.r/stdcall.f.d/expected.tags ================================================ 20 input.f /^ 20 CONTINUE$/;" l file: 40 input.f /^ 40 CONTINUE$/;" l file: 60 input.f /^ 60 CONTINUE$/;" l file: 80 input.f /^ 80 CONTINUE$/;" l file: 99996 input.f /^99996 FORMAT (1X,F8.2,3F13.5)$/;" l file: 99997 input.f /^99997 FORMAT (1X,A,3F13.5)$/;" l file: 99998 input.f /^99998 FORMAT (1X,A,F7.3)$/;" l file: 99999 input.f /^99999 FORMAT (1X,A,D8.1)$/;" l file: 99999 input.f /^99999 FORMAT (1X,F8.2,3F13.5)$/;" l subroutine:OUT file: D02CJW input.f /^ DOUBLE PRECISION D02CJW,/;" v FCN input.f /^ STDCALL SUBROUTINE FCN(/;" s G input.f /^ DOUBLE PRECISION D02CJW, G,/;" v G input.f /^ STDCALL DOUBLE PRECISION FUNCTION G(T,Y) !CHANGE/;" f H input.f /^ DOUBLE PRECISION H,/;" v I input.f /^ INTEGER I, IFAIL/;" v IFAIL input.f /^ INTEGER I, IFAIL,/;" v IW input.f /^ INTEGER N, IW$/;" v J input.f /^ INTEGER I, IFAIL, J$/;" v K input.f /^ INTEGER K$/;" v N input.f /^ INTEGER N,/;" v NOUT input.f /^ INTEGER NOUT$/;" v OUT input.f /^ STDCALL SUBROUTINE OUT(/;" s PI input.f /^ DOUBLE PRECISION PI,/;" v RELABS input.f /^ CHARACTER RELABS*/;" v TOL input.f /^ DOUBLE PRECISION PI, TOL,/;" v W input.f /^ DOUBLE PRECISION W(IW)/;" v X input.f /^ DOUBLE PRECISION PI, TOL, X$/;" v X01AAF input.f /^ DOUBLE PRECISION D02CJW, G, X01AAF$/;" v XEND input.f /^ DOUBLE PRECISION H, XEND$/;" v Y input.f /^ DOUBLE PRECISION W(IW), Y(/;" v ================================================ FILE: Units/parser-fortran.r/stdcall.f.d/input.f ================================================ * Obtained from http://www.nag.com/local/nagping/np006a3.asp * D02CJF Example Program Text * Mark 14 Revised. NAG Copyright 1989. * .. Parameters .. CHARACTER RELABS*15 !NEW INTEGER NOUT PARAMETER (NOUT=6) INTEGER N, IW PARAMETER (N=3,IW=21*N+28) * .. Scalars in Common .. DOUBLE PRECISION H, XEND INTEGER K * .. Local Scalars .. DOUBLE PRECISION PI, TOL, X INTEGER I, IFAIL, J * .. Local Arrays .. DOUBLE PRECISION W(IW), Y(N) * .. External Functions .. DOUBLE PRECISION D02CJW, G, X01AAF STDCALL EXTERNAL D02CJW, G, X01AAF !CHANGE * .. External Subroutines .. STDCALL EXTERNAL D02CJF, D02CJX, FCN, OUT !CHANGE * .. Intrinsic Functions .. INTRINSIC DBLE * .. Common blocks .. COMMON XEND, H, K * .. Executable Statements .. WRITE (NOUT,*) 'D02CJF Example Program Results' RELABS = "Default" !NEW XEND = 10.0D0 PI = X01AAF(0.0D0) WRITE (NOUT,*) WRITE (NOUT,*) 'Case 1: intermediate output, root-finding' DO 20 J = 4, 5 TOL = 10.0D0**(-J) WRITE (NOUT,*) WRITE (NOUT,99999) ' Calculation with TOL =', TOL X = 0.0D0 Y(1) = 0.5D0 Y(2) = 0.5D0 Y(3) = PI/5.0D0 K = 4 H = (XEND-X)/DBLE(K+1) WRITE (NOUT,*) ' X Y(1) Y(2) Y(3)' IFAIL = 0 * CALL D02CJF(X,XEND,N,Y,FCN,TOL,VAL(LOC(RELABS)),VAL(7),OUT,G,W,!CHANGE + IFAIL) * WRITE (NOUT,99998) ' Root of Y(1) = 0.0 at', X WRITE (NOUT,99997) ' Solution is', (Y(I),I=1,N) 20 CONTINUE WRITE (NOUT,*) WRITE (NOUT,*) WRITE (NOUT,*) 'Case 2: no intermediate output, root-finding' DO 40 J = 4, 5 TOL = 10.0D0**(-J) WRITE (NOUT,*) WRITE (NOUT,99999) ' Calculation with TOL =', TOL X = 0.0D0 Y(1) = 0.5D0 Y(2) = 0.5D0 Y(3) = PI/5.0D0 IFAIL = 0 * CALL D02CJF(X,XEND,N,Y,FCN,TOL,VAL(LOC(RELABS)),VAL(7),D02CJX, !CHANGE + G,W,IFAIL) * WRITE (NOUT,99998) ' Root of Y(1) = 0.0 at', X WRITE (NOUT,99997) ' Solution is', (Y(I),I=1,N) 40 CONTINUE WRITE (NOUT,*) WRITE (NOUT,*) WRITE (NOUT,*) 'Case 3: intermediate output, no root-finding' DO 60 J = 4, 5 TOL = 10.0D0**(-J) WRITE (NOUT,*) WRITE (NOUT,99999) ' Calculation with TOL =', TOL X = 0.0D0 Y(1) = 0.5D0 Y(2) = 0.5D0 Y(3) = PI/5.0D0 K = 4 H = (XEND-X)/DBLE(K+1) WRITE (NOUT,*) ' X Y(1) Y(2) Y(3)' IFAIL = 0 * CALL D02CJF(X,XEND,N,Y,FCN,TOL,VAL(LOC(RELABS)),VAL(7),OUT, CHANGE + D02CJW,W,IFAIL) * 60 CONTINUE WRITE (NOUT,*) WRITE (NOUT,*) WRITE (NOUT,*) +'Case 4: no intermediate output, no root-finding ( integrate to XE +ND)' DO 80 J = 4, 5 TOL = 10.0D0**(-J) WRITE (NOUT,*) WRITE (NOUT,99999) ' Calculation with TOL =', TOL X = 0.0D0 Y(1) = 0.5D0 Y(2) = 0.5D0 Y(3) = PI/5.0D0 WRITE (NOUT,*) ' X Y(1) Y(2) Y(3)' WRITE (NOUT,99996) X, (Y(I),I=1,N) IFAIL = 0 * CALL D02CJF(X,XEND,N,Y,FCN,TOL,VAL(LOC(RELABS)),VAL(7),D02CJX, !CHANGE + D02CJW,W,IFAIL) * WRITE (NOUT,99996) X, (Y(I),I=1,N) 80 CONTINUE STOP * 99999 FORMAT (1X,A,D8.1) 99998 FORMAT (1X,A,F7.3) 99997 FORMAT (1X,A,3F13.5) 99996 FORMAT (1X,F8.2,3F13.5) END * STDCALL SUBROUTINE OUT(X,Y) !CHANGE * .. Parameters .. INTEGER NOUT PARAMETER (NOUT=6) INTEGER N PARAMETER (N=3) * .. Scalar Arguments .. DOUBLE PRECISION X * .. Array Arguments .. DOUBLE PRECISION Y(N) * .. Scalars in Common .. DOUBLE PRECISION H, XEND INTEGER I * .. Local Scalars .. INTEGER J * .. Intrinsic Functions .. INTRINSIC DBLE * .. Common blocks .. COMMON XEND, H, I * .. Executable Statements .. WRITE (NOUT,99999) X, (Y(J),J=1,N) X = XEND - DBLE(I)*H I = I - 1 RETURN * 99999 FORMAT (1X,F8.2,3F13.5) END * STDCALL SUBROUTINE FCN(T,Y,F) !CHANGE * .. Parameters .. INTEGER N PARAMETER (N=3) * .. Scalar Arguments .. DOUBLE PRECISION T * .. Array Arguments .. DOUBLE PRECISION F(N), Y(N) * .. Intrinsic Functions .. INTRINSIC COS, TAN * .. Executable Statements .. F(1) = TAN(Y(3)) F(2) = -0.032D0*TAN(Y(3))/Y(2) - 0.02D0*Y(2)/COS(Y(3)) F(3) = -0.032D0/Y(2)**2 RETURN END * STDCALL DOUBLE PRECISION FUNCTION G(T,Y) !CHANGE * .. Parameters .. INTEGER N PARAMETER (N=3) * .. Scalar Arguments .. DOUBLE PRECISION T * .. Array Arguments .. DOUBLE PRECISION Y(N) * .. Executable Statements .. G = Y(1) RETURN END ================================================ FILE: Units/parser-fortran.r/structure.f.d/expected.tags ================================================ __anon76fabc930106 input.f /^ structure level3a, level3b$/;" t type:nested a input.f /^ integer a$/;" k type:__anon76fabc930106 clouds input.f /^ character*20 clouds /;" k type:weather clouds input.f /^ character*20 clouds$/;" k type:weather day input.f /^ integer*1 month \/08\/, day /;" k type:weather day input.f /^ integer month, day,/;" k type:weather initialized_structure input.f /^ program initialized_structure$/;" p latest input.f /^ record \/weather\/ latest$/;" v program:initialized_structure latest input.f /^ record \/weather\/ latest$/;" v program:uninitialized_structure level2 input.f /^ structure \/nested\/ level2$/;" k type:top level3a input.f /^ structure level3a,/;" k type:nested level3b input.f /^ structure level3a, level3b$/;" k type:nested month input.f /^ integer*1 month /;" k type:weather month input.f /^ integer month,/;" k type:weather nested input.f /^ structure \/nested\//;" t type:top nested_structure input.f /^ program nested_structure$/;" p rainfall input.f /^ real rainfall /;" k type:weather rainfall input.f /^ real rainfall$/;" k type:weather top input.f /^ structure \/top\//;" t program:nested_structure uninitialized_structure input.f /^ program uninitialized_structure$/;" p weather input.f /^ structure \/weather\//;" t program:initialized_structure weather input.f /^ structure \/weather\//;" t program:uninitialized_structure year input.f /^ integer*1 month \/08\/, day \/10\/, year /;" k type:weather year input.f /^ integer month, day, year$/;" k type:weather ================================================ FILE: Units/parser-fortran.r/structure.f.d/input.f ================================================ program uninitialized_structure structure /weather/ integer month, day, year character*20 clouds real rainfall end structure record /weather/ latest end program initialized_structure structure /weather/ integer*1 month /08/, day /10/, year /89/ character*20 clouds /' overcast'/ real rainfall /3.12/ end structure record /weather/ latest print *, latest.month, latest.day, latest.year, + latest.clouds, latest.rainfall end program program nested_structure structure /top/ structure /nested/ level2 structure level3a, level3b integer a end structure end structure end structure end program ================================================ FILE: Units/parser-fortran.r/union.f.d/expected.tags ================================================ 10 input.f /^10 format (a)$/;" l program:writedate file: date input.f /^ character*6 date$/;" k type:start day input.f /^ character*2 day$/;" k type:start month input.f /^ character*2 month$/;" k type:start sdate input.f /^ record \/start\/ sdate$/;" v program:writedate start input.f /^ structure \/start\//;" t program:writedate writedate input.f /^ program writedate$/;" p year input.f /^ character*2 year$/;" k type:start ================================================ FILE: Units/parser-fortran.r/union.f.d/input.f ================================================ program writedate structure /start/ union map character*2 month character*2 day character*2 year end map map character*6 date end map end union end structure record /start/ sdate sdate.month = '08' sdate.day = '10' sdate.year = '89' write (*, 10) sdate.date 10 format (a) stop end ================================================ FILE: Units/parser-fortran.r/value.f.d/expected.tags ================================================ aa input.f /^ REAL aa$/;" v program:figure fig input.f /^ integer fig$/;" v program:figure figure input.f /^ program figure(/;" p ================================================ FILE: Units/parser-fortran.r/value.f.d/input.f ================================================ ! Provided by Brian Helsinki, 7 March 2003 program figure(aa) REAL aa VALUE aa ! not supported breaks fig; pass by value integer fig call fig2(aa) RETURN END ================================================ FILE: Units/parser-function-parameters.r/perl-fp-test.d/expected.tags ================================================ Jim::Butler input.pl /^package Jim::Butler;$/;" p my_function input.pl /^fun my_function() {}$/;" f my_method input.pl /^method my_method() {}$/;" m my_subroutine input.pl /^sub my_subroutine {}$/;" s ================================================ FILE: Units/parser-function-parameters.r/perl-fp-test.d/input.pl ================================================ package Jim::Butler; use Function::Parameters; method my_method() {} fun my_function() {} sub my_subroutine {} 1; ================================================ FILE: Units/parser-function-parameters.r/simple.d/args.ctags ================================================ --sort=no --fields=+lK ================================================ FILE: Units/parser-function-parameters.r/simple.d/expected.tags ================================================ foo input.pl /^fun foo($x, $y, $z = 5) {$/;" fun language:FunctionParameters bar input.pl /^method bar($label, $n) {$/;" method language:FunctionParameters create_point input.pl /^fun create_point(:$x, :$y, :$color) {$/;" fun language:FunctionParameters Derived input.pl /^package Derived {$/;" package language:Perl Derived input.pl /^package Derived {$/;" class language:Moose go_big input.pl /^ has 'go_big' => ($/;" attribute language:Moose class:Derived size input.pl /^ around size($x, $y) {$/;" wrapper language:Moose class:Derived wrapping:around Derived0 input-0.pl /^package Derived0 {$/;" package language:Perl Derived0 input-0.pl /^package Derived0 {$/;" class language:Moose go_big0 input-0.pl /^ has 'go_big0' => ($/;" attribute language:Moose class:Derived0 ================================================ FILE: Units/parser-function-parameters.r/simple.d/input-0.pl ================================================ package Derived0 { use Function::Parameters qw( :std ); use Moo; extends 'Base'; has 'go_big0' => ( is => 'ro', ); # "around" method with implicit $orig and $self around size0_dont_capture_me() { return $self->$orig() * 2 if $self->go_big; return $self->$orig(); } } ================================================ FILE: Units/parser-function-parameters.r/simple.d/input.pl ================================================ # Taken from https://metacpan.org/pod/Function::Parameters use Function::Parameters; # plain function fun foo($x, $y, $z = 5) { return $x + $y + $z; } print foo(1, 2), "\n"; # 8 # method with implicit $self method bar($label, $n) { return "$label: " . ($n * $self->scale); } # named arguments: order doesn't matter in the call fun create_point(:$x, :$y, :$color) { print "creating a $color point at ($x, $y)\n"; } create_point( color => "red", x => 10, y => 5, ); package Derived { use Function::Parameters qw( :std :modifiers ); use Moo; extends 'Base'; has 'go_big' => ( is => 'ro', ); # "around" method with implicit $orig and $self around size($x, $y) { return $self->$orig() * 2 if $self->go_big; return $self->$orig(); } } ================================================ FILE: Units/parser-fypp.r/cont.d/args.ctags ================================================ --extras=+g ================================================ FILE: Units/parser-fypp.r/cont.d/expected.tags ================================================ helloworld input.fy /^program helloworld$/;" p ================================================ FILE: Units/parser-fypp.r/cont.d/input.fy ================================================ #! Taken from https://fypp.readthedocs.io/en/stable/fypp.html#preprocessor-language @:assertEqual(size(coords, dim=2), & & size(atomtypes)) program helloworld print *, "Hello, world." end program helloworld ================================================ FILE: Units/parser-fypp.r/emptyline.d/README ================================================ input.fy caused a valgrind error. For running this test: $ make units LANGUAGES=Fypp VG=1 ================================================ FILE: Units/parser-fypp.r/emptyline.d/expected.tags ================================================ ================================================ FILE: Units/parser-fypp.r/emptyline.d/input.fy ================================================ #:for ind in range(repeat) #:endfor ================================================ FILE: Units/parser-fypp.r/first-if-area.d/args.ctags ================================================ --sort=no --extras=+g ================================================ FILE: Units/parser-fypp.r/first-if-area.d/expected.tags ================================================ STRU input.fy /^STRUCTURE \/STRU\//;" t X input.fy /^ INTEGER*4 X$/;" k type:STRU A0 input.fy /^ INTEGER*4 A0$/;" k type:STRU B0 input.fy /^ INTEGER*4 B0$/;" k type:STRU C input.fy /^ INTEGER*4 C$/;" k type:STRU B1 input.fy /^ INTEGER*4 B1$/;" k type:STRU A1 input.fy /^ INTEGER*4 A1$/;" k type:STRU Y input.fy /^ INTEGER*4 Y$/;" k type:STRU ================================================ FILE: Units/parser-fypp.r/first-if-area.d/input.fy ================================================ #! Taken from https://github.com/aradi/fypp STRUCTURE /STRU/ INTEGER*4 X #:if cA > 0 INTEGER*4 A0 #:if cB > 0 INTEGER*4 B0 #:if cC > 0 INTEGER*4 C #:elif cCELIF > 0 INTEGER*4 CELIF #:else INTEGER*4 CELSE #:endif INTEGER*4 B1 #:elif cBELIF > 0 INTEGER*4 BELIF #:else INTEGER*4 BELSE #:endif INTEGER*4 A1 #:elif cAELIF > 0 INTEGER*4 AELIF #:else INTEGER*4 AELSE #:endif INTEGER*4 Y END STRUCTURE ================================================ FILE: Units/parser-fypp.r/if-cont.d/args.ctags ================================================ --sort=no --extras=+g ================================================ FILE: Units/parser-fypp.r/if-cont.d/expected.tags ================================================ STRU input.fy /^STRUCTURE \/STRU\//;" t X input.fy /^ INTEGER*4 X$/;" k type:STRU A0 input.fy /^ INTEGER*4 A0$/;" k type:STRU B0 input.fy /^ INTEGER*4 B0$/;" k type:STRU C input.fy /^ INTEGER*4 C$/;" k type:STRU B1 input.fy /^ INTEGER*4 B1$/;" k type:STRU A1 input.fy /^ INTEGER*4 A1$/;" k type:STRU Y input.fy /^ INTEGER*4 Y$/;" k type:STRU ================================================ FILE: Units/parser-fypp.r/if-cont.d/input.fy ================================================ STRUCTURE /STRU/ INTEGER*4 X #:if cA > 0 & DEBUG > 0 & TRACE > 0 INTEGER*4 A0 #:if cB > 0 & DEBUG > 0 INTEGER*4 B0 #:if cC > 0 & DEBUG > 0 INTEGER*4 C #:elif cCELIF > 0 & DEBUG > 0 INTEGER*4 CELIF #:else INTEGER*4 CELSE #:endif INTEGER*4 B1 #:elif cBELIF > 0 & DEBUG > 0 INTEGER*4 BELIF #:else INTEGER*4 BELSE #:endif INTEGER*4 A1 #:elif cAELIF > 0 & DEBUG > 0 INTEGER*4 AELIF #:else INTEGER*4 AELSE #:endif INTEGER*4 Y END STRUCTURE ================================================ FILE: Units/parser-fypp.r/if-with-no-endif.d/expected.tags ================================================ foo input.fy /^#:def foo(cond) cond + 1$/;" m ================================================ FILE: Units/parser-fypp.r/if-with-no-endif.d/input.fy ================================================ #:if DEBUG #:def foo(cond) cond + 1 #! endif is not given. ================================================ FILE: Units/parser-fypp.r/run-alt-guest.d/args.ctags ================================================ --fields=+e # The next redundant options are for improve the test coverage. --param-Fypp.guest=Lisp --param-Fypp.guest=NONE --param-Fypp.guest=Java --extras=+g ================================================ FILE: Units/parser-fypp.r/run-alt-guest.d/expected.tags ================================================ A input.fy /^ A, \/\/ should be 'e', not 'f'$/;" e enum:e file: end:10 B input.fy /^ B(), \/\/ should be 'e', not 'm'$/;" e enum:e file: end:11 C input.fy /^ C(1), \/\/ should be 'e', not missing$/;" e enum:e file: end:12 D input.fy /^ D, \/\/ should be 'e', not 'f'$/;" e enum:e file: end:20 E input.fy /^ E(), \/\/ should be 'e', not 'm'$/;" e enum:e file: end:21 F input.fy /^ F(1), \/\/ should be 'e', not missing$/;" e enum:e file: end:22 debug_code input.fy /^#:def debug_code(code)$/;" m end:8 e input.fy /^ e() {}$/;" m class:e end:32 e input.fy /^ e(int x) {}$/;" m class:e end:31 e input.fy /^public enum e {$/;" g end:51 getShape input.fy /^ public final Shape getShape() {$/;" m class:e end:46 getString input.fy /^ public String getString() {$/;" m class:e end:41 repeat_code input.fy /^#:def repeat_code(code, repeat)$/;" m end:29 shape input.fy /^ public final Shape shape;$/;" f class:e end:35 string input.fy /^ public String string;$/;" f class:e end:34 twoKeywordsInARow input.fy /^ public final boolean twoKeywordsInARow;$/;" f class:e end:36 ================================================ FILE: Units/parser-fypp.r/run-alt-guest.d/input.fy ================================================ #! This test case is derived from #1810, a pull request submitted by @p-vitt #! and parser-java.r/enum.java.d/input.java #! Callable needs only string argument #:def debug_code(code) #:if DEBUG > 0 $:code #:endif #:enddef debug_code public enum e { A, // should be 'e', not 'f' B(), // should be 'e', not 'm' C(1), // should be 'e', not missing #! Pass code block as first positional argument #:call debug_code if (size(array) > 100) then print *, "DEBUG: spuriously large array"x end if #:endcall debug_code D, // should be 'e', not 'f' E(), // should be 'e', not 'm' F(1), // should be 'e', not missing ; #! Callable needs also non-string argument types #:def repeat_code(code, repeat) #:for ind in range(repeat) $:code #:endfor #:enddef repeat_code e(int x) {} e() {} public String string; public final Shape shape; public final boolean twoKeywordsInARow; #! fypp preprocessor comments here, and public String getString() { return string; } #! there public final Shape getShape() { return shape; } #! Pass code block as positional argument and 3 as keyword argument "repeat" #:call repeat_code(repeat=3) this will be repeated 3 times #:endcall repeat_code } ================================================ FILE: Units/parser-fypp.r/run-guest.d/args.ctags ================================================ --fields=+ne --extras=+g --kinds-Fortran=+P ================================================ FILE: Units/parser-fypp.r/run-guest.d/expected.tags ================================================ + input.fy /^ interface operator(+)/;" i line:31 module:test_interface __anonca2bcf340105 input.fy /^ interface ! anonymous interface$/;" i line:39 module:test_interface add input.fy /^ type(atype) function add(/;" P line:33 module:test_interface atype input.fy /^ type atype$/;" t line:28 module:test_interface debug_code input.fy /^#:def debug_code(code)$/;" m line:4 end:8 get input.fy /^ interface get$/;" i line:47 module:test_interface get_1d input.fy /^ subroutine get_1d(/;" s line:55 module:test_interface get_2d input.fy /^ subroutine get_2d(/;" s line:62 module:test_interface helloworld input.fy /^program helloworld$/;" p line:17 repeat_code input.fy /^#:def repeat_code(code, repeat)$/;" m line:23 end:27 suba input.fy /^ subroutine suba(/;" P line:40 interface:__anonca2bcf340105 subb input.fy /^ subroutine subb(/;" P line:42 interface:__anonca2bcf340105 test_interface input.fy /^module test_interface$/;" m line:21 ================================================ FILE: Units/parser-fypp.r/run-guest.d/input.fy ================================================ #! This test case is derived from #1810, a pull request submitted by @p-vitt #! and parser-fortran.r/fortran-interface.d/input.f90. #! Callable needs only string argument #:def debug_code(code) #:if DEBUG > 0 $:code #:endif #:enddef debug_code #! Pass code block as first positional argument #:call debug_code if (size(array) > 100) then print *, "DEBUG: spuriously large array" end if #:endcall debug_code program helloworld print *, "Hello, world." end program helloworld module test_interface #! Callable needs also non-string argument types #:def repeat_code(code, repeat) #:for ind in range(repeat) $:code #:endfor #:enddef repeat_code type atype end type atype ! operator overload interface operator(+) ! subprogram prototype type(atype) function add(a, b) import atype type(atype), intent(in) :: a, b end function add end interface operator(+) ! wrap subprogram prototypes interface ! anonymous interface subroutine suba() end subroutine suba subroutine subb() end subroutine subb end interface ! define generic subprograms #! fypp preprocessor comments here, and interface get #! there ! subprogram name list module procedure get_1d module procedure get_2d end interface get contains ! definition of subprograms subroutine get_1d(a) real a(:) end subroutine get_1d #! Pass code block as positional argument and 3 as keyword argument "repeat" #:call repeat_code(repeat=3) this will be repeated 3 times #:endcall repeat_code subroutine get_2d(a) real a(:, :) end subroutine get_2d end module test_interface ================================================ FILE: Units/parser-fypp.r/segv.d/README ================================================ This is a crash test. ================================================ FILE: Units/parser-fypp.r/segv.d/args.ctags ================================================ --extras=+g ================================================ FILE: Units/parser-fypp.r/segv.d/input.fy ================================================ #: ================================================ FILE: Units/parser-fypp.r/simple-fypp.d/args.ctags ================================================ --fields=+Sne ================================================ FILE: Units/parser-fypp.r/simple-fypp.d/expected.tags ================================================ assertTrue input.fy /^#:def assertTrue(cond)$/;" m line:2 signature:(cond) end:7 ================================================ FILE: Units/parser-fypp.r/simple-fypp.d/input.fy ================================================ #! This test case is taken from #1810, a pull request submitted by @p-vitt. #:def assertTrue(cond) if (.not. ${cond}$) then print *, "Assert failed" error stop end if #:enddef assertTrue ================================================ FILE: Units/parser-gdscript.r/broken-input.d/README ================================================ This is a crash test. ================================================ FILE: Units/parser-gdscript.r/broken-input.d/input.gd ================================================ @foo var ================================================ FILE: Units/parser-gdscript.r/class_name-extends-no-implicit-class.d/args.ctags ================================================ --sort=no --fields=+irKE --extras=+r --extras-GDScript=-{implicitClass} ================================================ FILE: Units/parser-gdscript.r/class_name-extends-no-implicit-class.d/expected.tags ================================================ Node input.gd /^class_name MyNode extends Node$/;" class roles:extended extras:reference MyNode input.gd /^class_name MyNode extends Node$/;" class inherits:Node roles:def ================================================ FILE: Units/parser-gdscript.r/class_name-extends-no-implicit-class.d/input.gd ================================================ class_name MyNode extends Node ================================================ FILE: Units/parser-gdscript.r/class_name-extends.d/args.ctags ================================================ --sort=no --fields=+irKE --extras=+r --extras-GDScript=+{implicitClass} ================================================ FILE: Units/parser-gdscript.r/class_name-extends.d/expected.tags ================================================ MyNode input.gd /^class_name MyNode extends Node$/;" class inherits:Node roles:def Node input.gd /^class_name MyNode extends Node$/;" class roles:extended extras:reference ================================================ FILE: Units/parser-gdscript.r/class_name-extends.d/input.gd ================================================ class_name MyNode extends Node ================================================ FILE: Units/parser-gdscript.r/inner-class.d/args.ctags ================================================ --sort=no --fields=+{inherits}{signature}{extras} --kinds-GDScript=-{local} --kinds-GDScript=-{parameter} --extras-GDScript=+{implicitClass} ================================================ FILE: Units/parser-gdscript.r/inner-class.d/expected.tags ================================================ anon_class_186e00360100 input.gd /^# Taken from godot-demo-projects\/networking\/webrtc_signaling\/server\/ws_webrtc_server.gd$/;" c inherits:Node extras:anonymous,implicitClass TIMEOUT input.gd /^const TIMEOUT = 1000 # Unresponsive clients times out after 1 sec$/;" C class:anon_class_186e00360100 SEAL_TIME input.gd /^const SEAL_TIME = 10000 # A sealed room will be closed after this time$/;" C class:anon_class_186e00360100 ALFNUM input.gd /^const ALFNUM = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"$/;" C class:anon_class_186e00360100 _alfnum input.gd /^var _alfnum = ALFNUM.to_ascii()$/;" v class:anon_class_186e00360100 rand input.gd /^var rand: RandomNumberGenerator = RandomNumberGenerator.new()$/;" v class:anon_class_186e00360100 typeref:typename:RandomNumberGenerator lobbies input.gd /^var lobbies: Dictionary = {}$/;" v class:anon_class_186e00360100 typeref:typename:Dictionary server input.gd /^var server: WebSocketServer = WebSocketServer.new()$/;" v class:anon_class_186e00360100 typeref:typename:WebSocketServer peers input.gd /^var peers: Dictionary = {}$/;" v class:anon_class_186e00360100 typeref:typename:Dictionary Peer input.gd /^class Peer extends Reference:$/;" c class:anon_class_186e00360100 inherits:Reference id input.gd /^ var id = -1$/;" v class:anon_class_186e00360100.Peer lobby input.gd /^ var lobby = ""$/;" v class:anon_class_186e00360100.Peer time input.gd /^ var time = OS.get_ticks_msec()$/;" v class:anon_class_186e00360100.Peer _init input.gd /^ func _init(peer_id):$/;" m class:anon_class_186e00360100.Peer signature:(peer_id) Lobby input.gd /^class Lobby extends Reference:$/;" c class:anon_class_186e00360100 inherits:Reference peers input.gd /^ var peers: Array = []$/;" v class:anon_class_186e00360100.Lobby typeref:typename:Array host input.gd /^ var host: int = -1$/;" v class:anon_class_186e00360100.Lobby typeref:typename:int sealed input.gd /^ var sealed: bool = false$/;" v class:anon_class_186e00360100.Lobby typeref:typename:bool time input.gd /^ var time = 0$/;" v class:anon_class_186e00360100.Lobby _init input.gd /^ func _init(host_id: int):$/;" m class:anon_class_186e00360100.Lobby signature:(host_id: int) join input.gd /^ func join(peer_id, server) -> bool:$/;" m class:anon_class_186e00360100.Lobby typeref:typename:bool signature:(peer_id, server) leave input.gd /^ func leave(peer_id, server) -> bool:$/;" m class:anon_class_186e00360100.Lobby typeref:typename:bool signature:(peer_id, server) seal input.gd /^ func seal(peer_id, server) -> bool:$/;" m class:anon_class_186e00360100.Lobby typeref:typename:bool signature:(peer_id, server) Circle2D input.gd /^class Circle2D:$/;" c class:anon_class_186e00360100 inherits:Node2D center input.gd /^ var center$/;" v class:anon_class_186e00360100.Circle2D radius input.gd /^ var radius$/;" v class:anon_class_186e00360100.Circle2D color input.gd /^ var color$/;" v class:anon_class_186e00360100.Circle2D _draw input.gd /^ func _draw():$/;" m class:anon_class_186e00360100.Circle2D signature:() _init input.gd /^func _init():$/;" m class:anon_class_186e00360100 signature:() ================================================ FILE: Units/parser-gdscript.r/inner-class.d/input.gd ================================================ # Taken from godot-demo-projects/networking/webrtc_signaling/server/ws_webrtc_server.gd # of https://github.com/godotengine/godot-demo-projects.git extends Node const TIMEOUT = 1000 # Unresponsive clients times out after 1 sec const SEAL_TIME = 10000 # A sealed room will be closed after this time const ALFNUM = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" var _alfnum = ALFNUM.to_ascii() var rand: RandomNumberGenerator = RandomNumberGenerator.new() var lobbies: Dictionary = {} var server: WebSocketServer = WebSocketServer.new() var peers: Dictionary = {} class Peer extends Reference: var id = -1 var lobby = "" var time = OS.get_ticks_msec() func _init(peer_id): id = peer_id class Lobby extends Reference: var peers: Array = [] var host: int = -1 var sealed: bool = false var time = 0 func _init(host_id: int): host = host_id func join(peer_id, server) -> bool: if sealed: return false if not server.has_peer(peer_id): return false var new_peer: WebSocketPeer = server.get_peer(peer_id) new_peer.put_packet(("I: %d\n" % (1 if peer_id == host else peer_id)).to_utf8()) for p in peers: if not server.has_peer(p): continue server.get_peer(p).put_packet(("N: %d\n" % peer_id).to_utf8()) new_peer.put_packet(("N: %d\n" % (1 if p == host else p)).to_utf8()) peers.push_back(peer_id) return true func leave(peer_id, server) -> bool: if not peers.has(peer_id): return false peers.erase(peer_id) var close = false if peer_id == host: # The room host disconnected, will disconnect all peers. close = true if sealed: return close # Notify other peers. for p in peers: if not server.has_peer(p): return close if close: # Disconnect peers. server.disconnect_peer(p) else: # Notify disconnection. server.get_peer(p).put_packet(("D: %d\n" % peer_id).to_utf8()) return close func seal(peer_id, server) -> bool: # Only host can seal the room. if host != peer_id: return false sealed = true for p in peers: server.get_peer(p).put_packet("S: \n".to_utf8()) time = OS.get_ticks_msec() return true # Taken from godot-demo-projects/2d/physics_tests/test.gd class Circle2D: extends Node2D var center var radius var color func _draw(): draw_circle(center, radius, color) func _init(): server.connect("data_received", self, "_on_data") server.connect("client_connected", self, "_peer_connected") server.connect("client_disconnected", self, "_peer_disconnected") # ... ================================================ FILE: Units/parser-gdscript.r/modifiers.d/args.ctags ================================================ --sort=no --kinds-GDScript=+zl --fields=+E --fields-GDScript={annotations} --extras-GDScript=+{implicitClass} ================================================ FILE: Units/parser-gdscript.r/modifiers.d/expected.tags ================================================ anon_class_025551790100 input.gd /^# Taken from godot-demo-projects\/3d\/voxel\/world\/chunk.gd$/;" c extras:anonymous,implicitClass _create_block_collider input.gd /^func _create_block_collider(block_sub_position):$/;" m class:anon_class_025551790100 block_sub_position input.gd /^func _create_block_collider(block_sub_position):$/;" z method:anon_class_025551790100._create_block_collider file: collider input.gd /^ var collider = CollisionShape.new()$/;" l method:anon_class_025551790100._create_block_collider file: calculate_block_uvs input.gd /^static func calculate_block_uvs(block_id):$/;" m class:anon_class_025551790100 annotations:static block_id input.gd /^static func calculate_block_uvs(block_id):$/;" z method:anon_class_025551790100.calculate_block_uvs file: row input.gd /^ var row = block_id \/ TEXTURE_SHEET_WIDTH$/;" l method:anon_class_025551790100.calculate_block_uvs file: col input.gd /^ var col = block_id % TEXTURE_SHEET_WIDTH$/;" l method:anon_class_025551790100.calculate_block_uvs file: id input.gd /^func id(a):$/;" m class:anon_class_025551790100 a input.gd /^func id(a):$/;" z method:anon_class_025551790100.id file: r input.gd /^remote func r(b):$/;" m class:anon_class_025551790100 annotations:remote b input.gd /^remote func r(b):$/;" z method:anon_class_025551790100.r file: x input.gd /^remote static func x(c):$/;" m class:anon_class_025551790100 annotations:remote,static c input.gd /^remote static func x(c):$/;" z method:anon_class_025551790100.x file: ================================================ FILE: Units/parser-gdscript.r/modifiers.d/input.gd ================================================ # Taken from godot-demo-projects/3d/voxel/world/chunk.gd func _create_block_collider(block_sub_position): var collider = CollisionShape.new() collider.shape = BoxShape.new() collider.shape.extents = Vector3.ONE / 2 collider.transform.origin = block_sub_position + Vector3.ONE / 2 add_child(collider) static func calculate_block_uvs(block_id): # This method only supports square texture sheets. var row = block_id / TEXTURE_SHEET_WIDTH var col = block_id % TEXTURE_SHEET_WIDTH return [ TEXTURE_TILE_SIZE * Vector2(col, row), TEXTURE_TILE_SIZE * Vector2(col, row + 1), TEXTURE_TILE_SIZE * Vector2(col + 1, row), TEXTURE_TILE_SIZE * Vector2(col + 1, row + 1), ] func id(a): return a remote func r(b): return b remote static func x(c): return c ================================================ FILE: Units/parser-gdscript.r/no-implicit-class.d/args.ctags ================================================ --sort=no --extras=+r --fields=+rEiS ================================================ FILE: Units/parser-gdscript.r/no-implicit-class.d/expected.tags ================================================ BaseClass input.gd /^extends BaseClass$/;" c roles:extended extras:reference MyClass input.gd /^class_name MyClass, "res:\/\/path\/to\/optional\/icon.svg"$/;" c roles:def a input.gd /^@export_range(start=0, end=100, step=1) var a = 5$/;" v roles:def annotations:export_range(start=0, end=100, step=1) s input.gd /^var s = "Hello"$/;" v roles:def annotations:export arr input.gd /^@onready var arr = [1, 2, 3]$/;" v roles:def annotations:onready dict input.gd /^var dict = {"key": "value", 2: 3}$/;" v roles:def typed_var input.gd /^var typed_var: int$/;" v typeref:typename:int roles:def inferred_type input.gd /^inferred_type\\$/;" v roles:def annotations:onready,export_multiline ANSWER input.gd /^const ANSWER = 42$/;" C roles:def THE_NAME input.gd /^const THE_NAME:String = "Charly"$/;" C typeref:typename:String roles:def anon_enum_84e343bf0104 input.gd /^enum {UNIT_NEUTRAL, UNIT_ENEMY, UNIT_ALL}$/;" g roles:def extras:anonymous UNIT_NEUTRAL input.gd /^enum {UNIT_NEUTRAL, UNIT_ENEMY, UNIT_ALL}$/;" e enum:anon_enum_84e343bf0104 file: roles:def UNIT_ENEMY input.gd /^enum {UNIT_NEUTRAL, UNIT_ENEMY, UNIT_ALL}$/;" e enum:anon_enum_84e343bf0104 file: roles:def UNIT_ALL input.gd /^enum {UNIT_NEUTRAL, UNIT_ENEMY, UNIT_ALL}$/;" e enum:anon_enum_84e343bf0104 file: roles:def Named input.gd /^enum Named {THING_1, THING_2, ANOTHER_THING=1}$/;" g roles:def THING_1 input.gd /^enum Named {THING_1, THING_2, ANOTHER_THING=1}$/;" e enum:Named file: roles:def THING_2 input.gd /^enum Named {THING_1, THING_2, ANOTHER_THING=1}$/;" e enum:Named file: roles:def ANOTHER_THING input.gd /^enum Named {THING_1, THING_2, ANOTHER_THING=1}$/;" e enum:Named file: roles:def v2 input.gd /^var v2 = Vector2(1, 2)$/;" v roles:def v3 input.gd /^var v3 = Vector3(1, 2, 3)$/;" v roles:def some_function input.gd /^func some_function(param1: Vector3, param2: int) -> int:$/;" m typeref:typename:int signature:(param1: Vector3, param2: int) roles:def annotations:master something input.gd /^func something(p1, p2):$/;" m signature:(p1, p2) roles:def annotations:puppet Something input.gd /^class Something:$/;" c inherits: roles:def a input.gd /^ var a = 10$/;" v class:Something roles:def _private_var input.gd /^ const _private_var:String = "hi\\n\\\\escape"$/;" C class:Something typeref:typename:String roles:def foooooooo input.gd /^ func foooooooo() -> String:$/;" m class:Something typeref:typename:String signature:() roles:def _init input.gd /^func _init():$/;" m signature:() roles:def ================================================ FILE: Units/parser-gdscript.r/no-implicit-class.d/input.gd ================================================ # Derived from https://docs.godotengine.org/en/latest/tutorials/scripting/gdscript/gdscript_basics.html # A file is a class but it has no name. The name is given only when # class_name is used. # Inheritance extends BaseClass # (optional) class definition with a custom icon class_name MyClass, "res://path/to/optional/icon.svg" # Member variables @export_range(start=0, end=100, step=1) var a = 5 @export var s = "Hello" @onready var arr = [1, 2, 3] var dict = {"key": "value", 2: 3} var typed_var: int @onready @export_multiline var\ inferred_type\ :=\ "String" # Constants const ANSWER = 42 const THE_NAME:String = "Charly" # Enums enum {UNIT_NEUTRAL, UNIT_ENEMY, UNIT_ALL} enum Named {THING_1, THING_2, ANOTHER_THING=1} # Built-in vector types var v2 = Vector2(1, 2) var v3 = Vector3(1, 2, 3) # Function @master func some_function(param1: Vector3, param2: int) -> int: var local_var = 5 if param1 < local_var: print(param1) elif param2 > 5: print(param2) elif param2 == 2: print(20) elif param2 <= 2: print((-20 % 3) / 5) else: print("Fail!") for i in range(20): print(i) while param2 != 0: param2 -= 1 var local_var2 = param1 + 3 return local_var2 # Functions override functions with the same name on the base/parent class. # If you still want to call them, use '.' (like 'super' in other languages). @puppet func something(p1, p2): .something(p1, p2) # Inner class class Something: var a = 10 const _private_var:String = "hi\n\\escape" func foooooooo() -> String: print(""" test\\ test""") return "" # Constructor func _init(): print("Constructed!") var lv = Something.new() print(lv.a) ================================================ FILE: Units/parser-gdscript.r/sample.d/args.ctags ================================================ --sort=no --extras=+r --fields=+rEiS --extras-GDScript=+{implicitClass} ================================================ FILE: Units/parser-gdscript.r/sample.d/expected.tags ================================================ MyClass input.gd /^class_name MyClass, "res:\/\/path\/to\/optional\/icon.svg"$/;" c inherits:BaseClass roles:def BaseClass input.gd /^extends BaseClass$/;" c roles:extended extras:reference a input.gd /^@export_range(start=0, end=100, step=1) var a = 5$/;" v class:MyClass roles:def annotations:export_range(start=0, end=100, step=1) s input.gd /^var s = "Hello"$/;" v class:MyClass roles:def annotations:export arr input.gd /^@onready var arr = [1, 2, 3]$/;" v class:MyClass roles:def annotations:onready dict input.gd /^var dict = {"key": "value", 2: 3}$/;" v class:MyClass roles:def typed_var input.gd /^var typed_var: int$/;" v class:MyClass typeref:typename:int roles:def inferred_type input.gd /^inferred_type\\$/;" v class:MyClass roles:def annotations:onready,export_multiline ANSWER input.gd /^const ANSWER = 42$/;" C class:MyClass roles:def THE_NAME input.gd /^const THE_NAME:String = "Charly"$/;" C class:MyClass typeref:typename:String roles:def anon_enum_e3cc11790204 input.gd /^enum {UNIT_NEUTRAL, UNIT_ENEMY, UNIT_ALL}$/;" g class:MyClass roles:def extras:anonymous UNIT_NEUTRAL input.gd /^enum {UNIT_NEUTRAL, UNIT_ENEMY, UNIT_ALL}$/;" e enum:MyClass.anon_enum_e3cc11790204 file: roles:def UNIT_ENEMY input.gd /^enum {UNIT_NEUTRAL, UNIT_ENEMY, UNIT_ALL}$/;" e enum:MyClass.anon_enum_e3cc11790204 file: roles:def UNIT_ALL input.gd /^enum {UNIT_NEUTRAL, UNIT_ENEMY, UNIT_ALL}$/;" e enum:MyClass.anon_enum_e3cc11790204 file: roles:def Named input.gd /^enum Named {THING_1, THING_2, ANOTHER_THING=1}$/;" g class:MyClass roles:def THING_1 input.gd /^enum Named {THING_1, THING_2, ANOTHER_THING=1}$/;" e enum:MyClass.Named file: roles:def THING_2 input.gd /^enum Named {THING_1, THING_2, ANOTHER_THING=1}$/;" e enum:MyClass.Named file: roles:def ANOTHER_THING input.gd /^enum Named {THING_1, THING_2, ANOTHER_THING=1}$/;" e enum:MyClass.Named file: roles:def v2 input.gd /^var v2 = Vector2(1, 2)$/;" v class:MyClass roles:def v3 input.gd /^var v3 = Vector3(1, 2, 3)$/;" v class:MyClass roles:def some_function input.gd /^func some_function(param1: Vector3, param2: int) -> int:$/;" m class:MyClass typeref:typename:int signature:(param1: Vector3, param2: int) roles:def annotations:master something input.gd /^func something(p1, p2):$/;" m class:MyClass signature:(p1, p2) roles:def annotations:puppet Something input.gd /^class Something:$/;" c class:MyClass inherits: roles:def a input.gd /^ var a = 10$/;" v class:MyClass.Something roles:def _private_var input.gd /^ const _private_var:String = "hi\\n\\\\escape"$/;" C class:MyClass.Something typeref:typename:String roles:def foooooooo input.gd /^ func foooooooo() -> String:$/;" m class:MyClass.Something typeref:typename:String signature:() roles:def _init input.gd /^func _init():$/;" m class:MyClass signature:() roles:def ================================================ FILE: Units/parser-gdscript.r/sample.d/input.gd ================================================ # Derived from https://docs.godotengine.org/en/latest/tutorials/scripting/gdscript/gdscript_basics.html # A file is a class! # Inheritance extends BaseClass # (optional) class definition with a custom icon class_name MyClass, "res://path/to/optional/icon.svg" # Member variables @export_range(start=0, end=100, step=1) var a = 5 @export var s = "Hello" @onready var arr = [1, 2, 3] var dict = {"key": "value", 2: 3} var typed_var: int @onready @export_multiline var\ inferred_type\ :=\ "String" # Constants const ANSWER = 42 const THE_NAME:String = "Charly" # Enums enum {UNIT_NEUTRAL, UNIT_ENEMY, UNIT_ALL} enum Named {THING_1, THING_2, ANOTHER_THING=1} # Built-in vector types var v2 = Vector2(1, 2) var v3 = Vector3(1, 2, 3) # Function @master func some_function(param1: Vector3, param2: int) -> int: var local_var = 5 if param1 < local_var: print(param1) elif param2 > 5: print(param2) elif param2 == 2: print(20) elif param2 <= 2: print((-20 % 3) / 5) else: print("Fail!") for i in range(20): print(i) while param2 != 0: param2 -= 1 var local_var2 = param1 + 3 return local_var2 # Functions override functions with the same name on the base/parent class. # If you still want to call them, use '.' (like 'super' in other languages). @puppet func something(p1, p2): .something(p1, p2) # Inner class class Something: var a = 10 const _private_var:String = "hi\n\\escape" func foooooooo() -> String: print(""" test\\ test""") return "" # Constructor func _init(): print("Constructed!") var lv = Something.new() print(lv.a) ================================================ FILE: Units/parser-gdscript.r/signal.d/args.ctags ================================================ --sort=no --fields=+SKiE --kinds-GDScript=+z --extras-GDScript=+{implicitClass} ================================================ FILE: Units/parser-gdscript.r/signal.d/expected.tags ================================================ anon_class_e8da5fd50100 input.gd /^extends Node$/;" class inherits:Node extras:anonymous,implicitClass finished input.gd /^signal finished(next_state_name)$/;" signal class:anon_class_e8da5fd50100 signature:(next_state_name) next_state_name input.gd /^signal finished(next_state_name)$/;" parameter signal:anon_class_e8da5fd50100.finished file: enter input.gd /^func enter():$/;" method class:anon_class_e8da5fd50100 signature:() exit input.gd /^func exit():$/;" method class:anon_class_e8da5fd50100 signature:() handle_input input.gd /^func handle_input(_event):$/;" method class:anon_class_e8da5fd50100 signature:(_event) _event input.gd /^func handle_input(_event):$/;" parameter method:anon_class_e8da5fd50100.handle_input file: update input.gd /^func update(_delta):$/;" method class:anon_class_e8da5fd50100 signature:(_delta) _delta input.gd /^func update(_delta):$/;" parameter method:anon_class_e8da5fd50100.update file: _on_animation_finished input.gd /^func _on_animation_finished(_anim_name):$/;" method class:anon_class_e8da5fd50100 signature:(_anim_name) _anim_name input.gd /^func _on_animation_finished(_anim_name):$/;" parameter method:anon_class_e8da5fd50100._on_animation_finished file: anon_class_88c08fb20100 input-0.gd /^signal start_game$/;" class extras:anonymous,implicitClass start_game input-0.gd /^signal start_game$/;" signal class:anon_class_88c08fb20100 C input-1.gd /^class_name C, "res:\/\/path\/to\/optional\/icon.svg"$/;" class inherits:B sdf input-1.gd /^signal sdf$/;" signal class:C s input-1.gd /^var s = "hello"$/;" variable class:C ================================================ FILE: Units/parser-gdscript.r/signal.d/input-0.gd ================================================ signal start_game ================================================ FILE: Units/parser-gdscript.r/signal.d/input-1.gd ================================================ extends B signal sdf class_name C, "res://path/to/optional/icon.svg" var s = "hello" ================================================ FILE: Units/parser-gdscript.r/signal.d/input.gd ================================================ extends Node # Base interface for all states: it doesn't do anything by itself, # but forces us to pass the right arguments to the methods below # and makes sure every State object had all of these methods. # warning-ignore:unused_signal signal finished(next_state_name) # Initialize the state. E.g. change the animation. func enter(): pass # Clean up the state. Reinitialize values like a timer. func exit(): pass func handle_input(_event): pass func update(_delta): pass func _on_animation_finished(_anim_name): pass ================================================ FILE: Units/parser-gemspec.r/simple-gemspec.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r ================================================ FILE: Units/parser-gemspec.r/simple-gemspec.d/expected.tags ================================================ rspec/core/version input.gemspec /^require "rspec\/core\/version"$/;" L roles:required rspec-core input.gemspec /^ s.name = "rspec-core"$/;" g roles:def rspec-support input.gemspec /^ s.add_runtime_dependency "rspec-support", "= #{RSpec::Core::Version::STRING}"$/;" g roles:runtimeDep rspec-support input.gemspec /^ s.add_runtime_dependency "rspec-support", "~> #{RSpec::Core::Version::STRING.split('.')[0..1/;" g roles:runtimeDep cucumber input.gemspec /^ s.add_development_dependency "cucumber", "~> 1.3"$/;" g roles:develDep minitest input.gemspec /^ s.add_development_dependency "minitest", "~> 5.3"$/;" g roles:develDep aruba input.gemspec /^ s.add_development_dependency %q{aruba}, "~> 0.14.9"$/;" g roles:develDep coderay input.gemspec /^ s.add_development_dependency %q[coderay], "~> 1.1.1"$/;" g roles:develDep mocha input.gemspec /^ s.add_development_dependency %q(mocha), "~> 0.13.0"$/;" g roles:develDep rr input.gemspec /^ s.add_development_dependency %q, "~> 1.0.4"$/;" g roles:develDep flexmock input.gemspec /^ s.add_development_dependency %q flexmock , "~> 0.9.0"$/;" g roles:develDep thread_order input.gemspec /^ s.add_development_dependency %q!thread_order!, "~> 1.1.0"$/;" g roles:develDep strange{name}(just){-}{-}{testing} input.gemspec /^ s.add_runtime_dependency %q{strange{name}(just){-}{-}{testing}}.freeze, [">= 1.2.4".freez/;" g roles:runtimeDep net-ssh input.gemspec /^ s.add_runtime_dependency("net-ssh", ">= 1.0.1")$/;" g roles:runtimeDep ed25519 input.gemspec /^ s.add_runtime_dependency(%q.freeze, [">= 1.2.4".freeze, "< 1.4".freeze])$/;" g roles:runtimeDep strangejust-for-testing input.gemspec /^ s.add_runtime_dependency(%qjust-for-testing>.freeze, [">= 1.2.4".freeze, "< 1.4"/;" g roles:runtimeDep katello/version input-0.gemspec /^require "katello\/version"$/;" L roles:required katello input-0.gemspec /^ gem.name = "katello"$/;" g roles:def rails input-0.gemspec /^ gem.add_dependency "rails"$/;" g roles:runtimeDep G1 input-1.gemspec /^ gem.name = %q!G1!$/;" g roles:def ================================================ FILE: Units/parser-gemspec.r/simple-gemspec.d/input-0.gemspec ================================================ # Derrived from katello/katello.gemspec $LOAD_PATH.push File.expand_path("../lib", __FILE__) # Maintain your gem's version: require "katello/version" # Describe your gem and declare its dependencies: Gem::Specification.new do |gem| gem.name = "katello" gem.version = Katello::VERSION gem.authors = ["N/A"] gem.email = ["katello-devel@redhat.com"] gem.homepage = "http://www.katello.org" gem.summary = "" gem.description = "Content and Subscription Management plugin for Foreman" gem.files = Dir["{app,vendor,lib,db,ca,config,locale}/**/*"] + ["LICENSE.txt", "README.md"] gem.files += Dir["engines/bastion_katello/{app,vendor,lib,config}/**/*"] gem.files += Dir["engines/bastion_katello/{README.md,bastion_katello.gemspec}"] gem.require_paths = ["lib"] # Core Dependencies gem.add_dependency "rails" # ... end ================================================ FILE: Units/parser-gemspec.r/simple-gemspec.d/input-1.gemspec ================================================ Gem::Specification.new do |gem| gem.name = %q!G1! # ... end ================================================ FILE: Units/parser-gemspec.r/simple-gemspec.d/input.gemspec ================================================ # Taken from rspec-core/rspec-core.gemspec # -*- encoding: utf-8 -*- $LOAD_PATH.unshift File.expand_path("../lib", __FILE__) require "rspec/core/version" Gem::Specification.new do |s| s.name = "rspec-core" s.version = RSpec::Core::Version::STRING s.platform = Gem::Platform::RUBY s.license = "MIT" s.authors = ["Steven Baker", "David Chelimsky", "Chad Humphries", "Myron Marston"] s.email = "rspec@googlegroups.com" s.homepage = "https://github.com/rspec/rspec-core" s.summary = "rspec-core-#{RSpec::Core::Version::STRING}" s.description = "BDD for Ruby. RSpec runner and example groups." s.metadata = { 'bug_tracker_uri' => 'https://github.com/rspec/rspec-core/issues', 'changelog_uri' => "https://github.com/rspec/rspec-core/blob/v#{s.version}/Changelog.md", 'documentation_uri' => 'https://rspec.info/documentation/', 'mailing_list_uri' => 'https://groups.google.com/forum/#!forum/rspec', 'source_code_uri' => 'https://github.com/rspec/rspec-core', } s.files = `git ls-files -- lib/*`.split("\n") s.files += %w[README.md LICENSE.md Changelog.md .yardopts .document] s.test_files = [] s.bindir = 'exe' s.executables = `git ls-files -- exe/*`.split("\n").map{ |f| File.basename(f) } s.rdoc_options = ["--charset=UTF-8"] s.require_path = "lib" s.required_ruby_version = '>= 1.8.7' private_key = File.expand_path('~/.gem/rspec-gem-private_key.pem') if File.exist?(private_key) s.signing_key = private_key s.cert_chain = [File.expand_path('~/.gem/rspec-gem-public_cert.pem')] end if RSpec::Core::Version::STRING =~ /[a-zA-Z]+/ # rspec-support is locked to our version when running pre,rc etc s.add_runtime_dependency "rspec-support", "= #{RSpec::Core::Version::STRING}" else # rspec-support must otherwise match our major/minor version s.add_runtime_dependency "rspec-support", "~> #{RSpec::Core::Version::STRING.split('.')[0..1].concat(['0']).join('.')}" end s.add_development_dependency "cucumber", "~> 1.3" s.add_development_dependency "minitest", "~> 5.3" s.add_development_dependency %q{aruba}, "~> 0.14.9" s.add_development_dependency %q[coderay], "~> 1.1.1" s.add_development_dependency %q(mocha), "~> 0.13.0" s.add_development_dependency %q, "~> 1.0.4" s.add_development_dependency %q flexmock , "~> 0.9.0" s.add_development_dependency %q!thread_order!, "~> 1.1.0" s.add_development_dependency %qadonttagmea, "~> 1.1.0" s.add_runtime_dependency %q{strange{name}(just){-}{-}{testing}}.freeze, [">= 1.2.4".freeze, "< 1.4".freeze] s.add_runtime_dependency("net-ssh", ">= 1.0.1") s.add_runtime_dependency(%q.freeze, [">= 1.2.4".freeze, "< 1.4".freeze]) s.add_runtime_dependency(%qjust-for-testing>.freeze, [">= 1.2.4".freeze, "< 1.4".freeze]) end ================================================ FILE: Units/parser-go.r/github-issue-2430.d/README ================================================ THis is a carsh test. Specifying --kinds-Go=f makes tags output empty. ================================================ FILE: Units/parser-go.r/github-issue-2430.d/args.ctags ================================================ --kinds-GO=f ================================================ FILE: Units/parser-go.r/github-issue-2430.d/expected.tags ================================================ main input.go /^func main() {$/;" f package:main ================================================ FILE: Units/parser-go.r/github-issue-2430.d/input.go ================================================ // Taken from an issue #2430 opened by @aleb package main type Interval struct { Start, Stop string } func main() { } ================================================ FILE: Units/parser-go.r/github-issue-2430.d/validator ================================================ go ================================================ FILE: Units/parser-go.r/go-anonmember.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-go.r/go-anonmember.d/expected.tags ================================================ X input.go /^type X struct {$/;" s T1 input.go /^ T1$/;" M struct:X typeref:typename:T1 T2 input.go /^ *T2$/;" M struct:X typeref:typename:*T2 T3 input.go /^ P.T3$/;" M struct:X typeref:typename:P.T3 T4 input.go /^ *P.T4$/;" M struct:X typeref:typename:*P.T4 age input.go /^ age T5$/;" m struct:X typeref:typename:T5 skill input.go /^ skill *T6$/;" m struct:X typeref:typename:*T6 address input.go /^ address, hometown T7$/;" m struct:X typeref:typename:T7 hometown input.go /^ address, hometown T7$/;" m struct:X typeref:typename:T7 natualLang input.go /^ natualLang,programmingLang *T8$/;" m struct:X typeref:typename:*T8 programmingLang input.go /^ natualLang,programmingLang *T8$/;" m struct:X typeref:typename:*T8 person input.go /^ person P.T9$/;" m struct:X typeref:typename:P.T9 parent input.go /^ parent *P.T10$/;" m struct:X typeref:typename:*P.T10 lang1 input.go /^ lang1, lang2 P.LANG$/;" m struct:X typeref:typename:P.LANG lang2 input.go /^ lang1, lang2 P.LANG$/;" m struct:X typeref:typename:P.LANG lang3 input.go /^ lang3, lang4 *P.LANG$/;" m struct:X typeref:typename:*P.LANG lang4 input.go /^ lang3, lang4 *P.LANG$/;" m struct:X typeref:typename:*P.LANG Q input.go /^ P.Q$/;" M struct:X typeref:typename:P.Q Q input.go /^ *P.Q$/;" M struct:X typeref:typename:*P.Q Y input.go /^type Y struct {$/;" s byte input.go /^ byte$/;" M struct:Y typeref:typename:byte b input.go /^ b byte$/;" m struct:Y typeref:typename:byte ss input.go /^ ss []string$/;" m struct:Y typeref:typename:[]string bss input.go /^ bss [][]byte$/;" m struct:Y typeref:typename:[][]byte f input.go /^ f func() error$/;" m struct:Y typeref:typename:func() error ifaces input.go /^ ifaces []interface{}$/;" m struct:Y typeref:typename:[]interface{} tags input.go /^ tags map[string]struct{}$/;" m struct:Y typeref:typename:map[string]struct{} notify input.go /^ notify chan<- struct{}$/;" m struct:Y typeref:typename:chan<- struct{} p input.go /^ p *struct {$/;" m struct:Y typeref:typename:*struct { x int; y int; z int; } ================================================ FILE: Units/parser-go.r/go-anonmember.d/input.go ================================================ type X struct { T1 *T2 P.T3 *P.T4 age T5 skill *T6 address, hometown T7 natualLang,programmingLang *T8 person P.T9 parent *P.T10 lang1, lang2 P.LANG lang3, lang4 *P.LANG P.Q *P.Q } type Y struct { byte b byte ss []string bss [][]byte f func() error ifaces []interface{} tags map[string]struct{} notify chan<- struct{} p *struct { x int y int z int } } ================================================ FILE: Units/parser-go.r/go-crash-issue-2220.d/args.ctags ================================================ --fields=nksSaf --file-scope=yes --sort=no --kinds-go=picsmtfv ================================================ FILE: Units/parser-go.r/go-crash-issue-2220.d/expected.tags ================================================ temp input.go /^package temp$/;" p line:2 ================================================ FILE: Units/parser-go.r/go-crash-issue-2220.d/input.go ================================================ // Taken fro #2220 reported by @epheien package temp type Symbol = int ================================================ FILE: Units/parser-go.r/go-crash-issue-2220.d/validator ================================================ go ================================================ FILE: Units/parser-go.r/go-dont-solve-type-for-underscore-var.d/expected.tags ================================================ main input.go /^func main () {$/;" f package:main main input.go /^package main$/;" p ================================================ FILE: Units/parser-go.r/go-dont-solve-type-for-underscore-var.d/input.go ================================================ package main var ( _ int = 1 ) func main () { } ================================================ FILE: Units/parser-go.r/go-dont-solve-type-for-underscore-var.d/validator ================================================ go ================================================ FILE: Units/parser-go.r/go-end-field-for-types.d/args.ctags ================================================ --sort=no --fields=+{end} ================================================ FILE: Units/parser-go.r/go-end-field-for-types.d/expected.tags ================================================ A input.go /^package A$/;" p Point input.go /^ Point struct {$/;" s package:A end:7 X input.go /^ X int$/;" m struct:A.Point typeref:typename:int Y input.go /^ Y int$/;" m struct:A.Point typeref:typename:int Point3D input.go /^ Point3D struct {$/;" s package:A end:12 X input.go /^ X int$/;" m struct:A.Point3D typeref:typename:int Y input.go /^ Y int$/;" m struct:A.Point3D typeref:typename:int Z input.go /^ Z int$/;" m struct:A.Point3D typeref:typename:int Range input.go /^type Range struct {$/;" s package:A end:18 start input.go /^ start int$/;" m struct:A.Range typeref:typename:int end input.go /^ end int$/;" m struct:A.Range typeref:typename:int s input.go /^var s, t =$/;" v package:A t input.go /^var s, t =$/;" v package:A ================================================ FILE: Units/parser-go.r/go-end-field-for-types.d/input.go ================================================ package A type ( Point struct { X int Y int } Point3D struct { X int Y int Z int } ) type Range struct { start int end int } var s, t = Point {X: 3, Y: 8}, Point {X: 3, Y: 8} ================================================ FILE: Units/parser-go.r/go-end-field-for-types.d/validator ================================================ go ================================================ FILE: Units/parser-go.r/go-funcs.d/args.ctags ================================================ --fields=+Se --kinds-Go=+R --fields-Go=+{receiver} ================================================ FILE: Units/parser-go.r/go-funcs.d/expected.tags ================================================ T input.go /^type T int$/;" t package:main typeref:typename:int end:19 f1 input.go /^func f1() {$/;" f package:main signature:() end:6 f2 input.go /^func f2(a int) {$/;" f package:main signature:(a int) end:9 f3 input.go /^func f3(a int) string {$/;" f package:main typeref:typename:string signature:(a int) end:13 f4 input.go /^func f4(a, b, c <-chan int, d, e, f string) (A, B, C int, D string) {$/;" f package:main typeref:typename:(A, B, C int, D string) signature:(a, b, c <-chan int, d, e, f string) end:17 f5 input.go /^func (t *T) f5(\/* comment *\/ a, \/*comment*\/ \/*comment*\/ b string, $/;" f type:main.T typeref:typename:(int, string) signature:(a, b string, c []int) end:24 receiver:t f6 input.go /^func (t *(T)) f6(r struct {a int `foo`; b string `bar`}) net.IP {$/;" f type:main.T typeref:typename:net.IP signature:(r struct {a int `foo`; b string `bar`}) end:28 receiver:t main input.go /^func main() {$/;" f package:main signature:() end:31 main input.go /^package main$/;" p t input.go /^func (t *(T)) f6(r struct {a int `foo`; b string `bar`}) net.IP {$/;" R func:main.T.f6 typeref:typename:T t input.go /^func (t *T) f5(\/* comment *\/ a, \/*comment*\/ \/*comment*\/ b string, $/;" R func:main.T.f5 typeref:typename:T ================================================ FILE: Units/parser-go.r/go-funcs.d/input.go ================================================ package main import "net" func f1() { } func f2(a int) { } func f3(a int) string { return "" } func f4(a, b, c <-chan int, d, e, f string) (A, B, C int, D string) { return 1, 2, 3, "" } type T int func (t *T) f5(/* comment */ a, /*comment*/ /*comment*/ b string, c []int) ( /* */ int, string ) { return 1, "" } func (t *(T)) f6(r struct {a int `foo`; b string `bar`}) net.IP { return net.IP{} } func main() { } ================================================ FILE: Units/parser-go.r/go-funcs.d/validator ================================================ go ================================================ FILE: Units/parser-go.r/go-goroutines.d/args.ctags ================================================ --fields=+S ================================================ FILE: Units/parser-go.r/go-goroutines.d/expected.tags ================================================ f input.go /^func f(from string) {$/;" f package:main signature:(from string) main input.go /^func main() {$/;" f package:main signature:() main input.go /^package main$/;" p ================================================ FILE: Units/parser-go.r/go-goroutines.d/input.go ================================================ /* https://gobyexample.com/goroutines * Copyright (C) Mark McGranaghan CC-BY 3.0 * https://github.com/mmcgrana/gobyexample#license */ // A _goroutine_ is a lightweight thread of execution. package main import "fmt" func f(from string) { for i := 0; i < 3; i++ { fmt.Println(from, ":", i) } } func main() { // Suppose we have a function call `f(s)`. Here's how // we'd call that in the usual way, running it // synchronously. f("direct") // To invoke this function in a goroutine, use // `go f(s)`. This new goroutine will execute // concurrently with the calling one. go f("goroutine") // You can also start a goroutine for an anonymous // function call. go func(msg string) { fmt.Println(msg) }("going") // Our two goroutines are running asynchronously in // separate goroutines now, so execution falls through // to here. This `Scanln` code requires we press a key // before the program exits. var input string fmt.Scanln(&input) fmt.Println("done") } ================================================ FILE: Units/parser-go.r/go-goroutines.d/validator ================================================ go ================================================ FILE: Units/parser-go.r/go-helloworld.d/args.ctags ================================================ --fields=+S ================================================ FILE: Units/parser-go.r/go-helloworld.d/expected.tags ================================================ main input.go /^func main() {$/;" f package:main signature:() main input.go /^package main$/;" p ================================================ FILE: Units/parser-go.r/go-helloworld.d/input.go ================================================ /* from https://gobyexample.com/hello-world * Copyright (C) Mark McGranaghan CC-BY 3.0 * https://github.com/mmcgrana/gobyexample#license */ package main import "fmt" func main() { fmt.Println("hello world") } ================================================ FILE: Units/parser-go.r/go-helloworld.d/validator ================================================ go ================================================ FILE: Units/parser-go.r/go-ignore-underscore-var.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-go.r/go-ignore-underscore-var.d/expected.tags ================================================ main input.go /^package main$/;" p F input.go /^func F() (int, int) {$/;" f package:main typeref:typename:(int, int) x0 input.go /^var x0, y0 = F()$/;" v package:main y0 input.go /^var x0, y0 = F()$/;" v package:main x input.go /^var x, _ = F()$/;" v package:main main input.go /^func main() {$/;" f package:main ================================================ FILE: Units/parser-go.r/go-ignore-underscore-var.d/input.go ================================================ package main func F() (int, int) { return 1, 2 } var x0, y0 = F() var x, _ = F() func main() { print (x) return } ================================================ FILE: Units/parser-go.r/go-ignore-underscore-var.d/validator ================================================ go ================================================ FILE: Units/parser-go.r/go-import.d/args.ctags ================================================ --fields=+rK --extras=+r --fields-Go=+{howImported} --sort=no ================================================ FILE: Units/parser-go.r/go-import.d/expected.tags ================================================ main input.go /^package main$/;" package roles:def fmt input.go /^import "fmt"$/;" package roles:imported main input.go /^func main() {$/;" func package:main roles:def main input-0.go /^package main$/;" package roles:def f input-0.go /^import f "fmt"$/;" packageName roles:def package:fmt fmt input-0.go /^import f "fmt"$/;" package roles:imported packageName:f main input-0.go /^func main() {$/;" func package:main roles:def main input-1.go /^package main$/;" package roles:def fmt input-1.go /^ "fmt"$/;" package roles:imported main input-1.go /^func main() {$/;" func package:main roles:def main input-2.go /^package main$/;" package roles:def f input-2.go /^ f "fmt"$/;" packageName roles:def package:fmt fmt input-2.go /^ f "fmt"$/;" package roles:imported packageName:f main input-2.go /^func main() {$/;" func package:main roles:def main input-3.go /^package main$/;" package roles:def time input-3.go /^ "time"$/;" package roles:imported fmt input-3.go /^ "fmt"$/;" package roles:imported main input-3.go /^func main() {$/;" func package:main roles:def main input-4.go /^package main$/;" package roles:def t input-4.go /^ t "time"$/;" packageName roles:def package:time time input-4.go /^ t "time"$/;" package roles:imported packageName:t fmt input-4.go /^ "fmt"$/;" package roles:imported main input-4.go /^func main() {$/;" func package:main roles:def main input-5.go /^package main$/;" package roles:def time input-5.go /^ "time"$/;" package roles:imported f input-5.go /^ f "fmt"$/;" packageName roles:def package:fmt fmt input-5.go /^ f "fmt"$/;" package roles:imported packageName:f main input-5.go /^func main() {$/;" func package:main roles:def main input-6.go /^package main$/;" package roles:def t input-6.go /^ t "time"$/;" packageName roles:def package:time time input-6.go /^ t "time"$/;" package roles:imported packageName:t f input-6.go /^ f "fmt"$/;" packageName roles:def package:fmt fmt input-6.go /^ f "fmt"$/;" package roles:imported packageName:f main input-6.go /^func main() {$/;" func package:main roles:def main input-7.go /^package main$/;" package roles:def fmt input-7.go /^ . "fmt"$/;" package roles:imported howImported:inline time input-7.go /^ _ "time"$/;" package roles:imported howImported:init main input-7.go /^func main() {$/;" func package:main roles:def ================================================ FILE: Units/parser-go.r/go-import.d/input-0.go ================================================ package main import f "fmt" func main() { f.Println("Hello, World!") } ================================================ FILE: Units/parser-go.r/go-import.d/input-1.go ================================================ package main import ( "fmt" ) func main() { fmt.Println("Hello, World!") } ================================================ FILE: Units/parser-go.r/go-import.d/input-2.go ================================================ package main import ( f "fmt" ) func main() { f.Println("Hello, World!") } ================================================ FILE: Units/parser-go.r/go-import.d/input-3.go ================================================ package main import ( "time" "fmt" ) func main() { fmt.Println("<%s> Hello, World!", t.Now(() } ================================================ FILE: Units/parser-go.r/go-import.d/input-4.go ================================================ package main import ( t "time" "fmt" ) func main() { fmt.Println("<%s> Hello, World!", t.Now(() } ================================================ FILE: Units/parser-go.r/go-import.d/input-5.go ================================================ package main import ( "time" f "fmt" ) func main() { f.Println("<%s> Hello, World!", time.Now(() } ================================================ FILE: Units/parser-go.r/go-import.d/input-6.go ================================================ package main import ( t "time" f "fmt" ) func main() { f.Println("<%s> Hello, World!", t.Now(() } ================================================ FILE: Units/parser-go.r/go-import.d/input-7.go ================================================ package main import ( . "fmt" _ "time" ) func main() { Println("Hello, World!") } ================================================ FILE: Units/parser-go.r/go-import.d/input.go ================================================ package main import "fmt" func main() { fmt.Println("Hello, World!") } ================================================ FILE: Units/parser-go.r/go-incomplete-func.d/input.go ================================================ func () ================================================ FILE: Units/parser-go.r/go-incomplete-input.d/args.ctags ================================================ --fields=+S ================================================ FILE: Units/parser-go.r/go-incomplete-input.d/input.go ================================================ var (a, ================================================ FILE: Units/parser-go.r/go-interface.d/README ================================================ File(s) under "src" directory is/are used as a test input for ctags. The file(s) is/are needed to compile "input.go". ================================================ FILE: Units/parser-go.r/go-interface.d/args.ctags ================================================ --sort=no --fields=+{typeref}{inherits}{signature}{scope}{kind}{end}K ================================================ FILE: Units/parser-go.r/go-interface.d/expected.tags ================================================ main input.go /^package main$/;" kind:package Buffer input.go /^type Buffer interface {$/;" kind:interface scope:package:main end:11 Locker input.go /^type Locker interface {$/;" kind:interface scope:package:main end:16 Lock input.go /^ Lock()$/;" kind:methodSpec scope:interface:main.Locker signature:() Unlock input.go /^ Unlock()$/;" kind:methodSpec scope:interface:main.Locker signature:() ReadWriter input.go /^type ReadWriter interface {$/;" kind:interface scope:package:main end:21 Read input.go /^ Read(b Buffer) bool$/;" kind:methodSpec scope:interface:main.ReadWriter typeref:typename:bool signature:(b Buffer) Write input.go /^ Write(b Buffer) bool$/;" kind:methodSpec scope:interface:main.ReadWriter typeref:typename:bool signature:(b Buffer) File input.go /^type File interface {$/;" kind:interface scope:package:main inherits:ReadWriter,Locker,ext.Processor end:29 Close input.go /^ Close()$/;" kind:methodSpec scope:interface:main.File signature:() ListAttr input.go /^ ListAttr() ([][]byte, error)$/;" kind:methodSpec scope:interface:main.File typeref:typename:([][]byte, error) signature:() main input.go /^func main () {$/;" kind:func scope:package:main signature:() end:32 ================================================ FILE: Units/parser-go.r/go-interface.d/input.go ================================================ // // Taken from https://golang.org/ref/spec#Interface_types // // GOPATH=$SOMEWHERE/ctags/Units/parser-go.r/go-interface.d go run $SOMEWHERE/ctags/Units/parser-go.r/go-interface.d/input.go // package main import "ext" type Buffer interface { } type Locker interface { Lock() Unlock() } type ReadWriter interface { Read(b Buffer) bool Write(b Buffer) bool } type File interface { ReadWriter // same as adding the methods of ReadWriter Locker // same as adding the methods of Locker ext.Processor Close() ListAttr() ([][]byte, error) } func main () { } ================================================ FILE: Units/parser-go.r/go-interface.d/src/ext/iface.go ================================================ package ext type Processor interface { } ================================================ FILE: Units/parser-go.r/go-op-less-than.d/args.ctags ================================================ --fields=+S ================================================ FILE: Units/parser-go.r/go-op-less-than.d/expected.tags ================================================ f1 input.go /^func f1(a int, b int) int {$/;" f package:test typeref:typename:int signature:(a int, b int) f2 input.go /^func f2(a int, b int) int {$/;" f package:test typeref:typename:int signature:(a int, b int) f3 input.go /^func f3() {}$/;" f package:test signature:() test input.go /^package test$/;" p ================================================ FILE: Units/parser-go.r/go-op-less-than.d/input.go ================================================ package test func f1(a int, b int) int { if a \n", p.X, p.Y) } func main() { p := &Point{X: 5, Y: 12} p.Render() } func (*Point) doNothing0() { } func (Point) doNothing1() { } func () wrongSyntax0() { } func (+) wrongSyntax1() { } func (a-) wrongSyntax2() { } func (brokenInput ================================================ FILE: Units/parser-go.r/go-timeouts.d/args.ctags ================================================ --fields=+S ================================================ FILE: Units/parser-go.r/go-timeouts.d/expected.tags ================================================ main input.go /^func main() {$/;" f package:main signature:() main input.go /^package main$/;" p ================================================ FILE: Units/parser-go.r/go-timeouts.d/input.go ================================================ /* from https://gobyexample.com/timeouts * Copyright (C) Mark McGranaghan CC-BY 3.0 * https://github.com/mmcgrana/gobyexample#license */ // _Timeouts_ are important for programs that connect to // external resources or that otherwise need to bound // execution time. Implementing timeouts in Go is easy and // elegant thanks to channels and `select`. package main import "time" import "fmt" func main() { // For our example, suppose we're executing an external // call that returns its result on a channel `c1` // after 2s. c1 := make(chan string, 1) go func() { time.Sleep(time.Second * 2) c1 <- "result 1" }() // Here's the `select` implementing a timeout. // `res := <-c1` awaits the result and `<-Time.After` // awaits a value to be sent after the timeout of // 1s. Since `select` proceeds with the first // receive that's ready, we'll take the timeout case // if the operation takes more than the allowed 1s. select { case res := <-c1: fmt.Println(res) case <-time.After(time.Second * 1): fmt.Println("timeout 1") } // If we allow a longer timeout of 3s, then the receive // from `c2` will succeed and we'll print the result. c2 := make(chan string, 1) go func() { time.Sleep(time.Second * 2) c2 <- "result 2" }() select { case res := <-c2: fmt.Println(res) case <-time.After(time.Second * 3): fmt.Println("timeout 2") } } // todo: cancellation? ================================================ FILE: Units/parser-go.r/go-timeouts.d/validator ================================================ go ================================================ FILE: Units/parser-go.r/go-torture.d/args.ctags ================================================ --fields=+Se ================================================ FILE: Units/parser-go.r/go-torture.d/expected.tags ================================================ A input.go /^const (A = iota;B;C;$/;" c package:main B input.go /^const (A = iota;B;C;$/;" c package:main C input.go /^const (A = iota;B;C;$/;" c package:main D input.go /^ D = iota << (1 + iota*2)$/;" c package:main E input.go /^ E$/;" c package:main F input.go /^ F=3.14*(1+2*3)\/34e7;I=1)$/;" c package:main G input.go /^const ignored int*\/const (G=6); var g int$/;" c package:main H input.go /^func (tt * T7) f4(a func () func ()) (func (), int) {return func (){}, 1};func f5(){};const H=1$/;" c package:main I input.go /^ F=3.14*(1+2*3)\/34e7;I=1)$/;" c package:main Reader input.go /^ Reader()$/;" n interface:main.T5 signature:() T1 input.go /^ T1 `annotation`$/;" M struct:main.T6 typeref:typename:T1 T1 input.go /^ T1 map[string]int$/;" t package:main typeref:typename:map[string]int end:6 T2 input.go /^ *T2$/;" M struct:main.T6 typeref:typename:*T2 T2 input.go /^ T2 <-chan float32$/;" t package:main typeref:typename:<-chan float32 end:7 T3 input.go /^ T3 chan []string$/;" t package:main typeref:typename:chan []string end:8 T4 input.go /^ T4 chan<- *[12]string$/;" t package:main typeref:typename:chan<- *[12]string end:9 T5 input.go /^ T5 interface {$/;" i package:main end:14 T6 input.go /^type T6 struct {$/;" s package:main end:24 T7 input.go /^type (T7 func (a struct{_ int; _ float32}, b int) (int, map[string]int);T8 float32)$/;" t package:main typeref:typename:func (a struct{_ int; _ float32}, b int) (int, map[string]int) end:31 T8 input.go /^type (T7 func (a struct{_ int; _ float32}, b int) (int, map[string]int);T8 float32)$/;" t package:main typeref:typename:float32 end:31 T9 input.go /^func f1() {};func f2() {};type\/*no newline here*\/T9 int\/*var ignored int$/;" t package:main typeref:typename:int end:39 Writer input.go /^ Writer()$/;" n interface:main.T5 signature:() _a input.go /^ _a, _b, _c, _d int$/;" m struct:main.T6 typeref:typename:int _b input.go /^ _a, _b, _c, _d int$/;" m struct:main.T6 typeref:typename:int _c input.go /^ _a, _b, _c, _d int$/;" m struct:main.T6 typeref:typename:int _d input.go /^ _a, _b, _c, _d int$/;" m struct:main.T6 typeref:typename:int _e input.go /^ _e float32$/;" m struct:main.T6 typeref:typename:float32 a input.go /^var (a, b, c int$/;" v package:main typeref:typename:int b input.go /^var (a, b, c int$/;" v package:main typeref:typename:int c input.go /^var (a, b, c int$/;" v package:main typeref:typename:int d input.go /^d T5$/;" v package:main typeref:interface:T5 e input.go /^e T4$/;" v package:main typeref:type:T4 f input.go /^f interface{})$/;" v package:main typeref:typename:interface{} f1 input.go /^func f1() {};func f2() {};type\/*no newline here*\/T9 int\/*var ignored int$/;" f package:main signature:() end:38 f2 input.go /^func f1() {};func f2() {};type\/*no newline here*\/T9 int\/*var ignored int$/;" f package:main signature:() end:38 f3 input.go /^func (t *T1) f3() (a, b int){$/;" f type:main.T1 typeref:typename:(a, b int) signature:() end:43 f4 input.go /^func (tt * T7) f4(a func () func ()) (func (), int) {return func (){}, 1};func f5(){};const H=1$/;" f type:main.T7 typeref:typename:(func (), int) signature:(a func () func ()) end:45 f5 input.go /^func (tt * T7) f4(a func () func ()) (func (), int) {return func (){}, 1};func f5(){};const H=1$/;" f package:main signature:() end:45 foo input.go /^ foo()$/;" n interface:main.T5 signature:() g input.go /^const ignored int*\/const (G=6); var g int$/;" v package:main typeref:typename:int h input.go /^}; var h int$/;" v package:main typeref:typename:int int input.go /^ int$/;" M struct:main.T6 typeref:typename:int main input.go /^func main() {$/;" f package:main signature:() end:50 main input.go /^package main$/;" p ================================================ FILE: Units/parser-go.r/go-torture.d/input.go ================================================ package main import "fmt" type ( T1 map[string]int T2 <-chan float32 T3 chan []string T4 chan<- *[12]string T5 interface { Reader() Writer() foo() } ) type T6 struct { _a, _b, _c, _d int int T1 `annotation` *T2 _e float32 //ignored int } const (A = iota;B;C; D = iota << (1 + iota*2) E F=3.14*(1+2*3)/34e7;I=1) type (T7 func (a struct{_ int; _ float32}, b int) (int, map[string]int);T8 float32) var (a, b, c int d T5 e T4 f interface{}) func f1() {};func f2() {};type/*no newline here*/T9 int/*var ignored int const ignored int*/const (G=6); var g int func (t *T1) f3() (a, b int){ return 1, 2 }; var h int func (tt * T7) f4(a func () func ()) (func (), int) {return func (){}, 1};func f5(){};const H=1 func main() { go func (){}() fmt.Println("Hello, 世界") } ================================================ FILE: Units/parser-go.r/go-torture.d/validator ================================================ go ================================================ FILE: Units/parser-go.r/go-type-aliases.d/args.ctags ================================================ --sort=no --fields=+e ================================================ FILE: Units/parser-go.r/go-type-aliases.d/expected.tags ================================================ main input.go /^package main$/;" p y input.go /^type y int$/;" t package:main typeref:typename:int end:4 T2 input.go /^type T2 int$/;" t package:main typeref:typename:int end:5 t input.go /^type t y$/;" t package:main typeref:typename:y end:7 T1 input.go /^type T1 = T2$/;" a package:main typeref:typename:T2 end:8 Name1 input.go /^type Name1 map[string]string$/;" t package:main typeref:typename:map[string]string end:9 Name2 input.go /^type Name2 map[string]string$/;" t package:main typeref:typename:map[string]string end:10 Alias input.go /^type Alias = map[string]string$/;" a package:main typeref:typename:map[string]string end:11 X input.go /^type X =$/;" a package:main typeref:typename:map [ string;] string end:16 main input.go /^func main() {$/;" f package:main end:20 ================================================ FILE: Units/parser-go.r/go-type-aliases.d/input.go ================================================ // Taken from https://go.googlesource.com/proposal/+/master/design/18130-type-alias.md package main type y int type T2 int type t y type T1 = T2 type Name1 map[string]string type Name2 map[string]string type Alias = map[string]string type X = map [ string ] string func main() { return; } ================================================ FILE: Units/parser-go.r/go-variadic-dots-broken.d/args.ctags ================================================ --sort=no --fields=+S ================================================ FILE: Units/parser-go.r/go-variadic-dots-broken.d/input.go ================================================ package main func f0(nums..int) { return } func f1(nums .. interface{}) { return } func f10(nums.. interface{}) { return } func f11(nums ..interface{}) { return } func f2(o int, nums ..int) { return } func f3(o int, nums.. /* .. */ int) { return } func f4(o int, p int) { } func main() { } ================================================ FILE: Units/parser-go.r/go-variadic-dots.d/args.ctags ================================================ --sort=no --fields=+S ================================================ FILE: Units/parser-go.r/go-variadic-dots.d/expected.tags ================================================ main input.go /^package main$/;" p f0 input.go /^func f0(nums...int) {$/;" f package:main signature:(nums ...int) f1 input.go /^func f1(nums ... interface{}) {$/;" f package:main signature:(nums ...interface{}) f10 input.go /^func f10(nums... interface{}) {$/;" f package:main signature:(nums ...interface{}) f11 input.go /^func f11(nums ...interface{}) {$/;" f package:main signature:(nums ...interface{}) f2 input.go /^func f2(o int, nums ...int) {$/;" f package:main signature:(o int, nums ...int) f3 input.go /^func f3(o int, nums... \/* ... *\/ int) {$/;" f package:main signature:(o int, nums ...int) f4 input.go /^func f4(o int, p int) {$/;" f package:main signature:(o int, p int) main input.go /^func main() {$/;" f package:main signature:() ================================================ FILE: Units/parser-go.r/go-variadic-dots.d/input.go ================================================ package main func f0(nums...int) { return } func f1(nums ... interface{}) { return } func f10(nums... interface{}) { return } func f11(nums ...interface{}) { return } func f2(o int, nums ...int) { return } func f3(o int, nums... /* ... */ int) { return } func f4(o int, p int) { } func main() { } ================================================ FILE: Units/parser-go.r/go-variadic-dots.d/validator ================================================ go ================================================ FILE: Units/parser-go.r/go-vars.d/args.ctags ================================================ --sort=no --fields=+t ================================================ FILE: Units/parser-go.r/go-vars.d/expected.tags ================================================ x input.go /^var x, y, z int$/;" v typeref:typename:int y input.go /^var x, y, z int$/;" v typeref:typename:int z input.go /^var x, y, z int$/;" v typeref:typename:int a input.go /^ a, b int$/;" v typeref:typename:int b input.go /^ a, b int$/;" v typeref:typename:int n input.go /^ n = 0$/;" v s input.go /^ s string$/;" v typeref:typename:string i input.go /^ i interface{}$/;" v typeref:typename:interface{} c input.go /^const c int$/;" c typeref:typename:int ================================================ FILE: Units/parser-go.r/go-vars.d/input.go ================================================ var x, y, z int var ( a, b int n = 0 s string i interface{} ) const c int ================================================ FILE: Units/parser-gperf.r/simple.d/args.ctags ================================================ --sort=no --extras=+rg ================================================ FILE: Units/parser-gperf.r/simple.d/expected.tags ================================================ resolved_gperf_hash input.perf /^%define hash-function-name resolved_gperf_hash$/;" h resolved_gperf_lookup input.perf /^%define lookup-function-name resolved_gperf_lookup$/;" l MyNameSpace::MyClass input.perf /^%define class-name MyNameSpace::MyClass$/;" c HUP input.perf /^HUP, 1$/;" k INT input.perf /^INT, 2$/;" k QUIT input.perf /^QUIT, 3$/;" k ILL input.perf /^ILL, 4$/;" k TRAP input.perf /^TRAP, 5$/;" k ABRT input.perf /^ABRT, 6$/;" k BUS input.perf /^BUS, 7$/;" k FPE input.perf /^FPE, 8$/;" k KILL input.perf /^KILL, 9$/;" k USR1 input.perf /^USR1, 10$/;" k SEGV input.perf /^SEGV, 11$/;" k USR2 input.perf /^USR2, 12$/;" k PIPE input.perf /^PIPE, 13$/;" k ALRM input.perf /^ALRM, 14$/;" k TERM input.perf /^TERM, 15$/;" k STKFLT input.perf /^STKFLT, 16$/;" k CHLD input.perf /^CHLD, 17$/;" k CONT input.perf /^CONT, 18$/;" k STOP input.perf /^STOP, 19$/;" k TSTP input.perf /^TSTP, 20$/;" k TTIN input.perf /^TTIN, 21$/;" k TTOU input.perf /^TTOU, 22$/;" k URG input.perf /^URG, 23$/;" k XCPU input.perf /^XCPU, 24$/;" k XFSZ input.perf /^XFSZ, 25$/;" k VTALRM input.perf /^VTALRM, 26$/;" k PROF input.perf /^PROF, 27$/;" k WINCH input.perf /^WINCH, 28$/;" k IO input.perf /^IO, 29$/;" k PWR input.perf /^PWR, 30$/;" k SYS input.perf /^SYS, 31$/;" k RTMIN input.perf /^RTMIN, 34$/;" k RTMIN+1 input.perf /^RTMIN+1, 35$/;" k RTMIN+2 input.perf /^RTMIN+2, 36$/;" k RTMIN+3 input.perf /^RTMIN+3, 37$/;" k RTMIN+4 input.perf /^RTMIN+4, 38$/;" k RTMIN+5 input.perf /^RTMIN+5, 39$/;" k RTMIN+6 input.perf /^RTMIN+6, 40$/;" k RTMIN+7 input.perf /^RTMIN+7, 41$/;" k RTMIN+8 input.perf /^RTMIN+8, 42$/;" k RTMIN+9 input.perf /^RTMIN+9, 43$/;" k RTMIN+10 input.perf /^RTMIN+10, 44$/;" k RTMIN+11 input.perf /^RTMIN+11, 45$/;" k RTMIN+12 input.perf /^RTMIN+12, 46$/;" k RTMIN+13 input.perf /^RTMIN+13, 47$/;" k RTMIN+14 input.perf /^RTMIN+14, 48$/;" k RTMIN+15 input.perf /^RTMIN+15, 49$/;" k RTMAX-14 input.perf /^RTMAX-14, 50$/;" k RTMAX-13 input.perf /^RTMAX-13, 51$/;" k RTMAX-12 input.perf /^RTMAX-12, 52$/;" k RTMAX-11 input.perf /^RTMAX-11, 53$/;" k RTMAX-10 input.perf /^RTMAX-10, 54$/;" k RTMAX-9 input.perf /^RTMAX-9, 55$/;" k RTMAX-8 input.perf /^RTMAX-8, 56$/;" k RTMAX-7 input.perf /^RTMAX-7, 57$/;" k RTMAX-6 input.perf /^RTMAX-6, 58$/;" k RTMAX-5 input.perf /^RTMAX-5, 59$/;" k RTMAX-4 input.perf /^RTMAX-4, 60$/;" k RTMAX-3 input.perf /^RTMAX-3, 61$/;" k RTMAX-2 input.perf /^RTMAX-2, 62$/;" k RTMAX-1 input.perf /^RTMAX-1, 63$/;" k RTMAX input.perf /^RTMAX, 64$/;" k _GNU_SOURCE input.perf /^#define _GNU_SOURCE$/;" d file: config.h input.perf /^#include /;" h stddef.h input.perf /^#include /;" h stdlib.h input.perf /^#include /;" h utils.h input.perf /^#include "utils.h"/;" h signal_s input.perf /^struct signal_s$/;" s file: name input.perf /^ int name;$/;" m struct:signal_s typeref:typename:int file: value input.perf /^ int value;$/;" m struct:signal_s typeref:typename:int file: sender_s input.perf /^ struct sender_s {$/;" s struct:signal_s file: pid input.perf /^ pid_t pid; \/*$/;" m struct:signal_s::sender_s typeref:typename:pid_t file: comm input.perf /^ char comm[16];$/;" m struct:signal_s::sender_s typeref:typename:char[16] file: sender input.perf /^ } sender;$/;" m struct:signal_s typeref:struct:signal_s::sender_s file: str2sig input.perf /^str2sig (const char *name)$/;" f typeref:typename:int kconf_id_hash input-0.gperf /^%define hash-function-name kconf_id_hash$/;" h kconf_id_lookup input-0.gperf /^%define lookup-function-name kconf_id_lookup$/;" l kconf_id_strings input-0.gperf /^%define string-pool-name kconf_id_strings$/;" s mainmenu input-0.gperf /^mainmenu, T_MAINMENU, TF_COMMAND$/;" k menu input-0.gperf /^menu, T_MENU, TF_COMMAND$/;" k EXPORT_SYMBOL input-1.perf /^EXPORT_SYMBOL, EXPORT_SYMBOL_KEYW$/;" k resword input-1.perf /^struct resword { const char *name; int token; }$/;" s file: name input-1.perf /^struct resword { const char *name; int token; }$/;" m struct:resword typeref:typename:const char * file: token input-1.perf /^struct resword { const char *name; int token; }$/;" m struct:resword typeref:typename:int file: ================================================ FILE: Units/parser-gperf.r/simple.d/input-0.gperf ================================================ /* Taken from https://kernel.googlesource.com/pub/scm/linux/kernel/git/konrad/xen/+/stable/for-linus-3.10-rc5-tag/scripts/kconfig/zconf.gperf */ %language=ANSI-C %define hash-function-name kconf_id_hash %define lookup-function-name kconf_id_lookup %define string-pool-name kconf_id_strings %compare-strncmp %enum %pic %struct-type struct kconf_id; static const struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); %% mainmenu, T_MAINMENU, TF_COMMAND menu, T_MENU, TF_COMMAND %% ================================================ FILE: Units/parser-gperf.r/simple.d/input-1.perf ================================================ /* Derrived from https://kernel.googlesource.com/pub/scm/linux/kernel/git/dhowells/linux-asm_system/+/refs/tags/v2.6.15-rc7/scripts/genksyms/keywords.gperf */ %{ %} struct resword { const char *name; int token; } %% EXPORT_SYMBOL, EXPORT_SYMBOL_KEYW ================================================ FILE: Units/parser-gperf.r/simple.d/input.perf ================================================ /* Derrived FROM crun-1.4.4/src/libcrun/signals.perf and systemd/src/resolve/resolved-gperf.gperf */ /* * crun - OCI runtime written in C * * Copyright (C) 2017, 2018, 2019 Giuseppe Scrivano * crun is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * crun is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with crun. If not, see . */ %{ #define _GNU_SOURCE #include #include #include #include "utils.h" %} struct signal_s { int name; int value; struct sender_s { pid_t pid; /* } %% */ char comm[16]; } sender; }; %null_strings %language=ANSI-C %define slot-name section_and_lvalue %define hash-function-name resolved_gperf_hash %define lookup-function-name resolved_gperf_lookup %define class-name MyNameSpace::MyClass %readonly-tables %omit-struct-type %struct-type %includes %% HUP, 1 INT, 2 QUIT, 3 ILL, 4 TRAP, 5 ABRT, 6 BUS, 7 FPE, 8 KILL, 9 USR1, 10 SEGV, 11 USR2, 12 PIPE, 13 #IGNOREME ALRM, 14 TERM, 15 STKFLT, 16 CHLD, 17 CONT, 18 STOP, 19 TSTP, 20 TTIN, 21 TTOU, 22 URG, 23 XCPU, 24 XFSZ, 25 VTALRM, 26 PROF, 27 WINCH, 28 IO, 29 PWR, 30 SYS, 31 RTMIN, 34 RTMIN+1, 35 RTMIN+2, 36 RTMIN+3, 37 RTMIN+4, 38 RTMIN+5, 39 RTMIN+6, 40 RTMIN+7, 41 RTMIN+8, 42 RTMIN+9, 43 RTMIN+10, 44 RTMIN+11, 45 RTMIN+12, 46 RTMIN+13, 47 RTMIN+14, 48 RTMIN+15, 49 RTMAX-14, 50 RTMAX-13, 51 RTMAX-12, 52 RTMAX-11, 53 RTMAX-10, 54 RTMAX-9, 55 RTMAX-8, 56 RTMAX-7, 57 RTMAX-6, 58 RTMAX-5, 59 RTMAX-4, 60 RTMAX-3, 61 RTMAX-2, 62 RTMAX-1, 63 RTMAX, 64 %% int str2sig (const char *name) { const struct signal_s *s; if (has_prefix (name, "SIG")) name += 3; s = libcrun_signal_in_word_set (name, strlen (name)); if (s == NULL) { long int value; errno = 0; value = strtol (name, NULL, 10); if (errno == 0) return value; errno = ENOENT; return -1; } return s->value; } ================================================ FILE: Units/parser-haskell.r/literate-haskell1.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-haskell.r/literate-haskell1.d/expected.tags ================================================ main input.lhs /^> main = do putStr "Enter a number: "$/;" f fact input.lhs /^> fact 0 = 1$/;" f fact input.lhs /^> fact n = n * fact (n-1)$/;" f ================================================ FILE: Units/parser-haskell.r/literate-haskell1.d/input.lhs ================================================ >Without space, this is just a comment This literate program prompts the user for a number and prints the factorial of that number: > main :: IO () > main = do putStr "Enter a number: " > l <- readLine > putStr "n!= " > print (fact (read l)) This is the factorial function. > fact :: Integer -> Integer > fact 0 = 1 > fact n = n * fact (n-1) ================================================ FILE: Units/parser-haskell.r/literate-haskell2.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-haskell.r/literate-haskell2.d/expected.tags ================================================ main input.lhs /^main = print [ (n, product [1..n]) | n <- [1..20]]$/;" f ================================================ FILE: Units/parser-haskell.r/literate-haskell2.d/input.lhs ================================================ \documentstyle{article} \begin{document} \section{Introduction} This is a trivial program that prints the first 20 factorials. \begin{code} main :: IO () main = print [ (n, product [1..n]) | n <- [1..20]] \end{code} \end{document} ================================================ FILE: Units/parser-haskell.r/multi-line-type-signature.d/README ================================================ Taken from #4013 submitted by Robin Palotai (@robinp). ================================================ FILE: Units/parser-haskell.r/multi-line-type-signature.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-haskell.r/multi-line-type-signature.d/expected.tags ================================================ Foo input.hs /^module Foo () where$/;" m thing input.hs /^thing x = pure x$/;" f ================================================ FILE: Units/parser-haskell.r/multi-line-type-signature.d/input.hs ================================================ module Foo () where thing :: App m => Int -> m Int thing x = pure x ================================================ FILE: Units/parser-haskell.r/simple-haskell.d/args.ctags ================================================ --sort=no ================================================ FILE: Units/parser-haskell.r/simple-haskell.d/expected.tags ================================================ Cards input.hs /^module Cards where$/;" m Int input.hs /^data Int = -2147483648 | -2147483647 | ... | -1 | 0 | 1 | 2 | ... | 2147483647$/;" t Fd input.hs /^newtype Fd = Fd CInt$/;" t Fd input.hs /^newtype Fd = Fd CInt$/;" c Bool input.hs /^data Bool $/;" t True input.hs /^ = True | False$/;" c False input.hs /^ = True | False$/;" c Name input.hs /^type Name = String$/;" t getSpareBuffer input.hs /^getSpareBuffer Handle__{haCharBuffer=ref, $/;" f add input.hs /^add x y = x + y$/;" f ================================================ FILE: Units/parser-haskell.r/simple-haskell.d/input.hs ================================================ module Cards where data Int = -2147483648 | -2147483647 | ... | -1 | 0 | 1 | 2 | ... | 2147483647 newtype Fd = Fd CInt data Bool = True | False type Name = String getSpareBuffer :: Handle__ -> IO (BufferMode, CharBuffer) getSpareBuffer Handle__{haCharBuffer=ref, haBuffers=spare_ref, haBufferMode=mode} = do case mode of NoBuffering -> return (mode, error "no buffer!") _ -> do bufs <- readIORef spare_ref buf <- readIORef ref case bufs of BufferListCons b rest -> do writeIORef spare_ref rest return ( mode, emptyBuffer b (bufSize buf) WriteBuffer) BufferListNil -> do new_buf <- newCharBuffer (bufSize buf) WriteBuffer return (mode, new_buf) {-| This is a docstring -} add :: Integer -> Integer -> Integer add x y = x + y ================================================ FILE: Units/parser-html.r/class-and-id.d/args.ctags ================================================ --sort=no --extras=+r --fields=+r ================================================ FILE: Units/parser-html.r/class-and-id.d/expected.tags ================================================ Home · Universal Ctags input.html /^ <\/title>$/;" j roles:def /public/css/poole.css input.html /^$/;" C roles:extFile /public/css/syntax.css input.html /^$/;" C roles:extFile /public/css/hyde.css input.html /^$/;" C roles:extFile http://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface input.html /^$/;" c roles:attribute sidebar input.html /^