profile
viewpoint
Masatake YAMATO masatake Red Hat Japan

lsof-org/lsof-linux 10

This repository is retired. Instead, visit "lsof" repository.

masatake/biwascheme 3

A practical Scheme interpreter writtern in JavaScript

masatake/debwatch 2

A tool getting the latest upstream version of tarbarll for given package name with using debian watch file

masatake/diff1 2

Taking diff between a given file with something its original

masatake/ctags 1

clone of official ctags repo with obj-c and css patches added

masatake/dot-d 1

A tool concatenating configuration snippets into one master configuration file

masatake/ansible-role-redhat_satellite6_installation 0

Ansible Automation of Red Hat Satellite 6 Installation

masatake/boblay 0

Making animation with a postscript program

startederikdw/psig

started time in 21 hours

issue commentuniversal-ctags/ctags

Python: generate typeref field for z/parameter tags based on type hint

i = 10
def func3 () -> 3 + i:
    return 0

This one is also valid. I wonder whether we should use "typename" as the 1st value for the typeref field or introduce something different like "typehint".

AmaiKinono

comment created time in a day

issue commentuniversal-ctags/ctags

Python: generate typeref field for z/parameter tags based on type hint

def func2 (a: str) -> "a string":
    return a

This is valid python code. In this case, I wonder how the typeref field of func2 should be.

AmaiKinono

comment created time in a day

issue commentuniversal-ctags/ctags

Python: generate typeref field for z/parameter tags based on type hint

I don't know whether this is a good example of expected output, since I'm not sure what's the best way to deal with generic type variables. Maybe the behavior on C++ programs could be a reference.

The example may be good. Without evaluating, ctags cannot recognize generic types.

from typing import Callable, TypeVar

T = TypeVar('T')


Recognize this is easy. ctags can recognize T easily. However, if the right side of expression where a type becomes complicated, we need evaluation that we will not do in ctags:

...
T = something ()
def func(a: str, b: Callable[[int, int], T]) -> T:
    pass

In C++, a generic type is declared in templated <class T,...>, so ctags doesn't need evaluation. In Python, I think we should not do more; "typeref:typename:Callable[[int, int], T]" may be enough.

AmaiKinono

comment created time in a day

issue commentuniversal-ctags/ctags

Extra tags for variables in function signatures?

  1. Is the parameter kind available whenever signature is also available?

No. Whether and how they are implemented are up to the parser.

I didn't find a way to inspect whether signature is available for a language quickly.

There is no good way to know that.

Conceptually, we can provide such information via --list-kinds-full or by introducing new option --info-kind-C=.

A kind fills a field. e.g. "function" kind fills its "signature" field.

However, for providing such information, we have to inspect all the existing parsers (after defining API for declaring relations between a kind and fields.)

  1. I tried this for python. Python now supports type hint, which makes the signatures look somewhat like in C. Maybe we could use that for the typeref field. I don't know if type hint is widely used in the real world, so maybe this is not worth it.

Could you open an issue for this topic?

AmaiKinono

comment created time in 2 days

issue closeduniversal-ctags/ctags

C: end field for struct variable

input.c:

struct foo {
	int bar;
} v = {
	.bar = 1,
};
$ u-ctags --options=NONE --fields=+e -o - /tmp/foo.c
u-ctags: Notice: No options will be read from files or environment
bar	/tmp/foo.c	/^	int bar;$/;"	m	struct:foo	typeref:typename:int	file:	end:2
foo	/tmp/foo.c	/^struct foo {$/;"	s	file:	end:3
v	/tmp/foo.c	/^} v = {$/;"	v	typeref:struct:foo

The end field for v is not filled.

closed time in 2 days

masatake

issue commentuniversal-ctags/ctags

C: end field for struct variable

I withdraw this. I found this one is already fixed.

masatake

comment created time in 2 days

issue commentuniversal-ctags/ctags

C/C++: can not parse file named "ld.h" or "ld.c"

Fixed in #2605.

chongchai

comment created time in 6 days

delete branch masatake/ctags

delete branch : ldscript-fix-map-pattern

delete time in 6 days

push eventuniversal-ctags/ctags

Masatake YAMATO

commit sha 78befd79f1f2e9778fdf7f5b1636bcc7d34e4432

[SELF-INCOMPATIBLE]LdScript: use "ld.script" as an entry of map pattern instead of "ld.*" Close #2603. The original pattern "ld.*" matches "ld.c". As a result ld.c is parsed by LdScript parser unexpectedly. Originally, "ld.*" was introduced for arch/mips/boot/compressed/ld.script of linux. Replace "ld.*" with "ld.script" as a more strict pattern. Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

Masatake YAMATO

commit sha 3f0ea94c60552fc4983472f6e40e375357093364

Merge pull request #2605 from masatake/ldscript-fix-map-pattern [SELF-INCOMPATIBLE]LdScript: use "ld.script" as an entry of map pattern instead of "ld.*"

view details

push time in 6 days

PR merged universal-ctags/ctags

[SELF-INCOMPATIBLE]LdScript: use "ld.script" as an entry of map pattern instead of "ld.*"

Close #2603.

The original pattern "ld.*" matches "ld.c". As a result ld.c is parsed by LdScript parser unexpectedly.

Originally, "ld.*" was introduced for arch/mips/boot/compressed/ld.script of linux. Replace "ld.*" with "ld.script" as a more strict pattern.

Signed-off-by: Masatake YAMATO yamato@redhat.com

+5 -4

2 comments

2 changed files

masatake

pr closed time in 6 days

issue closeduniversal-ctags/ctags

C/C++: can not parse file named "ld.h" or "ld.c"

I find the ctags can't parse "ld.h" file. Is there any limits on file name?

My test follows:

ld.h

void test();

command: ctags.exe --output-format=json --langmap=c:+.inc --kinds-c=+plz --fields=+nie -o - D:\ld.h

result it gets empty result.

If rename the file ld.h to other name like a.h, I will get correct result.

closed time in 6 days

chongchai

issue commentuniversal-ctags/ctags

Extra tags for variables in function signatures?

z/parameter kind of C parser is for the purpose:

[jet@living]~/var/ctags% cat /tmp/foo.c
cat /tmp/foo.c
void func_1(int a, int b) {}
void func_2(int    a,   int  b) {}
void func_3 (int a,
             char *b[]) {}
[jet@living]~/var/ctags% ./ctags --kinds-C=+z -o - /tmp/foo.c
./ctags --kinds-C=+z -o - /tmp/foo.c
a	/tmp/foo.c	/^void func_1(int a, int b) {}$/;"	z	function:func_1	typeref:typename:int	file:
a	/tmp/foo.c	/^void func_2(int    a,   int  b) {}$/;"	z	function:func_2	typeref:typename:int	file:
a	/tmp/foo.c	/^void func_3 (int a,$/;"	z	function:func_3	typeref:typename:int	file:
b	/tmp/foo.c	/^             char *b[]) {}$/;"	z	function:func_3	typeref:typename:char * []	file:
b	/tmp/foo.c	/^void func_1(int a, int b) {}$/;"	z	function:func_1	typeref:typename:int	file:
b	/tmp/foo.c	/^void func_2(int    a,   int  b) {}$/;"	z	function:func_2	typeref:typename:int	file:
func_1	/tmp/foo.c	/^void func_1(int a, int b) {}$/;"	f	typeref:typename:void
func_2	/tmp/foo.c	/^void func_2(int    a,   int  b) {}$/;"	f	typeref:typename:void
func_3	/tmp/foo.c	/^void func_3 (int a,$/;"	f	typeref:typename:void

--list-kinds=C may help you to know more about C parser:

$ ./ctags --list-kinds-full=C
#LETTER NAME       ENABLED REFONLY NROLES MASTER DESCRIPTION
D       macroparam no      no      0      C      parameters inside macro definitions
L       label      no      no      0      C      goto labels
d       macro      yes     no      1      C      macro definitions
e       enumerator yes     no      0      C      enumerators (values inside an enumeration)
f       function   yes     no      0      C      function definitions
g       enum       yes     no      0      C      enumeration names
h       header     yes     yes     2      C      included header files
l       local      no      no      0      C      local variables
m       member     yes     no      0      C      struct, and union members
p       prototype  no      no      0      C      function prototypes
s       struct     yes     no      0      C      structure names
t       typedef    yes     no      0      C      typedefs
u       union      yes     no      0      C      union names
v       variable   yes     no      0      C      variable definitions
x       externvar  no      no      0      C      external and forward variable declarations
z       parameter  no      no      0      C      function parameters inside function definitions
AmaiKinono

comment created time in 6 days

PR opened universal-ctags/ctags

[SELF-INCOMPATIBLE]LdScript: use "ld.script" as an entry of map pattern instead of "ld.*"

Close #2603.

The original pattern "ld.*" matches "ld.c". As a result ld.c is parsed by LdScript parser unexpectedly.

Originally, "ld." was introduced for arch/mips/boot/compressed/ld.script of linux. Replace "ld." with "ld.script" as a more strict pattern.

Signed-off-by: Masatake YAMATO yamato@redhat.com

+5 -4

0 comment

2 changed files

pr created time in 6 days

push eventmasatake/ctags

Masatake YAMATO

commit sha 78befd79f1f2e9778fdf7f5b1636bcc7d34e4432

[SELF-INCOMPATIBLE]LdScript: use "ld.script" as an entry of map pattern instead of "ld.*" Close #2603. The original pattern "ld.*" matches "ld.c". As a result ld.c is parsed by LdScript parser unexpectedly. Originally, "ld.*" was introduced for arch/mips/boot/compressed/ld.script of linux. Replace "ld.*" with "ld.script" as a more strict pattern. Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

push time in 6 days

create barnchmasatake/ctags

branch : ldscript-fix-map-pattern

created branch time in 6 days

issue commentuniversal-ctags/ctags

C/C++: can not parse file named "ld.h" or "ld.c"

Thank you for reporting.

Please, try running ctags with adding --map-LdScript=-'(ld.*)' to the command line as a workaround.

$ ./ctags --list-maps=LdScript
LdScript *.lds.S ld.* *.lds *.scr *.ld *.ldi

It seems that the definition of the filename pattern map for LdScript parser is too aggressive. I will make a pull request for weakening the definition.

chongchai

comment created time in 7 days

issue commentuniversal-ctags/ctags

Struct range is wrong

Even if the input is valid as a C source file, ctags cannot handle C preprocessor conditions well. It is a fundamental limitation.

Lennon925

comment created time in 12 days

issue closeduniversal-ctags/ctags

Struct range is wrong

ctags version:ctags-2020-07-22_631690ad-x64

Code in test.c as follow:

typedef union {
  struct {
#if (BYTE1 == BYTE2) {
    int reserverd : 1;
  }
#else {
      int tx : 1;
    }
  } bits;
} MAC_CONTROL;

when using command "ctags.exe --output-format=json --langmap=c:+.inc --fields=+ne -o - D:\test.c" to parse, the results as follow:

{"_type": "tag", "name": "__anonb35aaf65030a", "path": "D:\test.c", "pattern": "/^typedef union {$/", "file": true, "line": 1, "kind": "union"} {"_type": "tag", "name": "__anonb35aaf650408", "path": "D:\test.c", "pattern": "/^ struct {$/", "file": true, "line": 2, "kind": "struct", "scope": "__anonb35aaf65030a", "scopeKind": "union", "end": 5} {"_type": "tag", "name": "reserverd", "path": "D:\test.c", "pattern": "/^ int reserverd : 1;$/", "file": true, "line": 4, "typeref": "typename:int:1", "kind": "member", "scope": "__anonb35aaf65030a::__anonb35aaf650408", "scopeKind": "struct", "end": 4}

the struct range is from line 2 to line 5. It’s wrong.

closed time in 14 days

Lennon925

issue commentuniversal-ctags/ctags

Struct range is wrong

The input is invalid as C code:

$ gcc -c /tmp/foo.c 2>/dev/null; echo $?
gcc -c /tmp/foo.c 2>/dev/null; echo $?
1

ctags is allowed to emit garbages from garbages.

Lennon925

comment created time in 14 days

delete branch masatake/miniascape-templates

delete branch : for-sat-6-7

delete time in 14 days

PR opened ssato/miniascape-templates

enhance: [satellite] use ID instead of UUID when adding a subscription to an activation key

When adding a subscription to an activation key, config.sh uses --subscription-id option of "hammer activation-key add-subscription" command.

Till satellite-6.6, --subscription-id can take either a value of "ID" column or a value of "UUID" column of the output of "hammer subscription list":

# hammer --csv subscription list
ID,UUID,Name,Type,Contract,Account,Support,Start Date,End Date,Quantity,Consumed
17,59b2d5c03...,Red Hat Ansible Automation Platform for Certified Cloud and Service Providers,...
8,f7fecdc74f...,Hat Certified Cloud and Service Provider Program Subscription, Full Support,...

Since satellite-6.7, it seems that --subscription-id takes only a value of "ID" column. Passing a value of "UUID" column, 59b2d5c03... in above example, causes an error.

config.sh of miniascape-templates specified the value of "UUID" column as the argument of --subscription-id. To avoid the error, this change makes config.sh specify the value of "ID" column, 17 in above example, instead.

Signed-off-by: Masatake YAMATO yamato@redhat.com

+4 -4

0 comment

1 changed file

pr created time in 14 days

push eventmasatake/miniascape-templates

Masatake YAMATO

commit sha ff9e1bcd1edcf2208a1ff682f45ba75da72ae8c0

enhance: [satellite] use ID instead of UUID when adding a subscription to an activation key When adding a subscription to an activation key, config.sh uses --subscription-id option of "hammer activation-key add-subscription" command. Till satellite-6.6, --subscription-id can take either a value of "ID" column or a value of "UUID" column of the output of "hammer subscription list": # hammer --csv subscription list ID,UUID,Name,Type,Contract,Account,Support,Start Date,End Date,Quantity,Consumed 17,59b2d5c03...,Red Hat Ansible Automation Platform for Certified Cloud and Service Providers,... 8,f7fecdc74f...,Hat Certified Cloud and Service Provider Program Subscription, Full Support,... Since satellite-6.7, it seems that --subscription-id takes only a value of "ID" column. Passing a value of "UUID" column, 59b2d5c03... in above example, causes an error. config.sh of miniascape-templates specified the value of "UUID" column as the argument of --subscription-id. To avoid the error, this change makes config.sh specify the value of "ID" column, 17 in above example, instead. Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

push time in 14 days

create barnchmasatake/miniascape-templates

branch : for-sat-6-7

created branch time in 14 days

startedamperser/proselint

started time in 14 days

push eventuniversal-ctags/ctags

Masatake YAMATO

commit sha 58efa7d111d00779b38f46ca39d246a3a0b545be

dsl: fix a typo in the help message for upcase Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

Masatake YAMATO

commit sha 165b47d2ef4c8e2fe60980ef92774a69a4b93ce8

readtags: add length operator Close #2599. Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

Masatake YAMATO

commit sha 631690adfe8f793e0062e3703589c1fc2dd3c28b

Merge pull request #2600 from masatake/readtags-length-op readtags: add length op

view details

push time in 14 days

delete branch masatake/ctags

delete branch : readtags-length-op

delete time in 14 days

PR merged universal-ctags/ctags

readtags: add length op

Close #2599.

+74 -1

2 comments

6 changed files

masatake

pr closed time in 14 days

issue closeduniversal-ctags/ctags

Readtags: sort by tag names in different ways?

If we run

$ readtags -S '(<> $name &name)' -p - hi

then all tags begin with "hi" are sorted by their names. The behavior is to sort by alphabetical order, but when doing auto-completion, it's preferred to sort by the length of the name first, then by alphabetical order.

In other words, when the user types "hi", he wants a completion list like this:

hi-zzz
hi-aaa-some-long-thing

rather than the opposite.

I'm not sure if this should be implemented by readtags, since if the client tool could query readtags for multiple times, it needs to remove the duplicates and sort them by itself, so it needs to implement a sorting algorithm anyway. Maybe the actual problem is: what's the purpose of the sorter expressions?

closed time in 14 days

AmaiKinono

startedstarboarder2001/ansible-docgen

started time in 15 days

startedkamichikoichi/kage-engine

started time in 16 days

issue openeduniversal-ctags/ctags

main,lregex: revise the way to using group numbers of regex matching

Inspired from #2598.

The lregex code uses group numbers of regex matching in many places. {mgroup=N} is one of them

I have found many issues about usage.

  • [ ] a default value should be given to mgroup. ...

created time in 16 days

issue commentuniversal-ctags/ctags

Readtags: sort by tag names in different ways?

length operator is added. With that, you can get the result you want with

-S '(<or> (<> (length $name) (length &name)) (<> $name &name))'

I wonder the result of the length operator should be cached.

AmaiKinono

comment created time in 16 days

PR opened universal-ctags/ctags

readtags: add length op

Close #2599.

+74 -1

0 comment

6 changed files

pr created time in 16 days

create barnchmasatake/ctags

branch : readtags-length-op

created branch time in 16 days

pull request commentuniversal-ctags/ctags

buildsys: fix a couple english spelling errors in configure.ac

Thank you!

ploxiln

comment created time in 18 days

push eventuniversal-ctags/ctags

Pierce Lopez

commit sha 34421e9632237eef1b42dacc23fc85ac3eeea923

buildsys: fix a couple english spelling errors in configure.ac introduced in 1293d03b1a38 (rbtree: introduce new ifdef condition HAVE_STATEMENT_EXPRESSION_EXT)

view details

Masatake YAMATO

commit sha e9fad9cf4be5a385d56d091d47d46426c057953b

Merge pull request #2597 from ploxiln/configure_typo_fix buildsys: fix a couple english spelling errors in configure.ac

view details

push time in 18 days

PR merged universal-ctags/ctags

buildsys: fix a couple english spelling errors in configure.ac

introduced in 1293d03b1a38 (rbtree: introduce new ifdef condition HAVE_STATEMENT_EXPRESSION_EXT)

+4 -4

2 comments

1 changed file

ploxiln

pr closed time in 18 days

issue commentuniversal-ctags/ctags

Multiline regexp matching issue

For simple cases, ctags should guess the proper value for mgroup. It will not be hard for me to implement the code for guessing.

akemrir

comment created time in 19 days

issue commentuniversal-ctags/ctags

Multiline regexp matching issue

mgroup must be specified.

Please, read https://docs.ctags.io/en/latest/optlib.html?highlight=mgroup#multiline-pattern-flags . In this case, you must add {mgroup=2}.

$ u-ctags --options=NONE -o - --kinddef-JavaScript=E,Export,Exports --mline-regex-JavaScript='/\s*export (const|var|let) \{\s*([, [:alpha:]\n]+)\}/\2/E/{mgroup=2}' /tmp/input.js 
<E,Export,Exports --mline-regex-JavaScript='/\s*export (const|var|let) \{\s*([, [:alpha:]\n]+)\}/\2/E/{mgroup=2}' /tmp/input.js 
u-ctags: Notice: No options will be read from files or environment
u-ctags: Warning: ignoring null tag in /tmp/input.js(line: 11)
u-ctags: Warning: ignoring null tag in /tmp/input.js(line: 12)
u-ctags: Warning: ignoring null tag in /tmp/input.js(line: 13)
u-ctags: Warning: ignoring null tag in /tmp/input.js(line: 18)
Comp06	/tmp/input.js	/^const Comp06 = createGlobalStyle`$/;"	C
cancelConst,\n  undoCancel	/tmp/input.js	/^  cancelConst,$/;"	E
profileReducer	/tmp/input.js	/^export const profileReducer = ProfileSlice.reducer;$/;"	C
resetState	/tmp/input.js	/^export const { resetState } = 20; \/\/ exp12, exp13$/;"	E
selectProfile	/tmp/input.js	/^export const selectProfile = (state) => state.profile.data;$/;"	C
setProfileBasicData	/tmp/input.js	/^export const { setProfileBasicData } = ProfileSlice.actions;$/;"	E
setProfileExtension, setupIx	/tmp/input.js	/^export const { setProfileExtension, setupIx } = ProfileSlice.actions;$/;"	E
setupProfile,\n  disableWhite	/tmp/input.js	/^  setupProfile,$/;"	E
akemrir

comment created time in 19 days

startedkazu-yamamoto/Mew

started time in 19 days

pull request commentlsof-org/lsof

[freebsd] fix post r363214

Please, don't forget to update 00DIST for the change.

lrosenman

comment created time in 20 days

push eventuniversal-ctags/ctags

Masatake YAMATO

commit sha d686f5960bf10e151b7efd974be42bd5a95c0d92

buildsys: remove unused code from configure.ac Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

Masatake YAMATO

commit sha aac61932044b0cb8d89a4e09309b231c3fab5022

Merge pull request #2595 from masatake/unused-code-in-cofingure-ac buildsys: remove unused code from configure.ac

view details

push time in 24 days

PR merged universal-ctags/ctags

buildsys: remove unused code from configure.ac

Signed-off-by: Masatake YAMATO yamato@redhat.com

+0 -32

2 comments

1 changed file

masatake

pr closed time in 24 days

push eventuniversal-ctags/ctags

Masatake YAMATO

commit sha 750ebcec75bfca0d9bf0ddf958a1616cf76779c8

vim: fill signature fields Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

Masatake YAMATO

commit sha 124dc60779787fb8527405a69c0454fd6d16df34

Merge pull request #2594 from masatake/vim-signature vim: fill signature fields

view details

push time in 24 days

PR merged universal-ctags/ctags

vim: fill signature fields

Signed-off-by: Masatake YAMATO yamato@redhat.com

+227 -1

5 comments

4 changed files

masatake

pr closed time in 24 days

push eventuniversal-ctags/ctags

Masatake YAMATO

commit sha af6edb60d921247669ce99e0449eaa7dc51d7e5a

main: make the error message about --_roledef option more user friendly Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

Masatake YAMATO

commit sha 4f4bbb50c05135849c7eccbd805436347cd1d674

main: add helper functions to get kindIndex from its letter and long name Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

Masatake YAMATO

commit sha 751c4167716ae276d70886733601fc3b32933668

main: use char type for rerepsenting a kind letter passed to getKindForLetter() int type was used. Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

Masatake YAMATO

commit sha 7afdb11cfeb3d2153b9d91a8306fbf018225b91c

main: introduce enableRole function Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

Masatake YAMATO

commit sha d28420018abf5e02d9638dc4cfeedd5d9aa5c174

main: introduce --roles-<LANG>:<KIND>= option to enable/disable roles Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

Masatake YAMATO

commit sha 888548c0360f5a400447b38e9b9d7f75b7ac247d

Tmain: add cases for testing --roles-<LANG>.<KIND> option Redundant duplicated lines were spotted by @k-takata. Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

Masatake YAMATO

commit sha 2de4ce3a016e888a70c9cc281fd009a3cd70dd3f

docs(man,web): write about --roles-<LANG>.<KIND> option Reviewed-by: @jwhitley Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

Masatake YAMATO

commit sha 79799bd449d1dc230d632a2612dac2374e66d2b7

Merge pull request #2579 from masatake/enabling-disabling-roles main: --roles-<LANG>.<KIND>, an option for enabling disabling roles

view details

push time in a month

PR merged universal-ctags/ctags

main: --roles-<LANG>.<KIND>, an option for enabling disabling roles

Introduces --roles-<LANG>.<KIND>=[+|-]roles option.

There was no way to disable roles though all roles are enabled when defining. With growing the number of roles, we may need the way to turn off (and on) the rules.

+1398 -15

4 comments

14 changed files

masatake

pr closed time in a month

Pull request review commentuniversal-ctags/ctags

main: --roles-<LANG>.<KIND>, an option for enabling disabling roles

+# Copyright: 2020 Masatake YAMATO+# License: GPL-2+CTAGS=$1++CTAGS=$1

Fixed. thank you.

masatake

comment created time in a month

issue openeduniversal-ctags/ctags

update option formats/notations about roles

  • align the form of --_roledef-<LANG>=kind.role,desc to that of --roles-<LANG>.<KIND>: --_roledef-<LANG>.<KIND>=role,deck.

  • align the form of --_param-<LANG>:param=value to that of --roles-<LANG>.<KIND>: --_param-<LANG>.param=value.

  • update optlibc2c to handle --roles-<LANG>.<KIND> option.

Originally posted by @masatake in https://github.com/universal-ctags/ctags/pull/2579#issuecomment-650606913

created time in a month

push eventmasatake/ctags

Masatake YAMATO

commit sha 2de4ce3a016e888a70c9cc281fd009a3cd70dd3f

docs(man,web): write about --roles-<LANG>.<KIND> option Reviewed-by: @jwhitley Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

push time in a month

push eventmasatake/ctags

Masatake YAMATO

commit sha 5ed230b0a09952c0ffde7d68f0ffbceed9ab5f29

PHP: fill the typeref field for variable kind tags appeared as class properties See https://www.php.net/manual/en/migration74.new-features.php#migration74.new-features.core.typed-properties Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

Masatake YAMATO

commit sha 3526ccb54c608a979f9510c2aceece42440afbb0

Varlink: fix a typo in a function name (s/Varlik/Varlink/g) Suggested by @k-takata.

view details

Masatake YAMATO

commit sha d1c4b9a7b062efb35acc34428914f302319d14a6

Squashed 'misc/packcc/' changes from 8fad6d2f..03402b79 03402b79 Merge pull request #4 from universal-ctags/introduce--i-option e2f11828 Introduce -i option for putting an #include directive earlier 3fb1a196 Add .editorconfig git-subtree-dir: misc/packcc git-subtree-split: 03402b79505dc0024f90d5bebfd7e5d3fb62da9a

view details

Masatake YAMATO

commit sha 97cd6a9032fa78611002f75ba08baec84657bc86

Merge commit 'd1c4b9a7b062efb35acc34428914f302319d14a6' into fix-github-issue-2564

view details

Masatake YAMATO

commit sha a32041010874e250c714a9e580169f6a94f0aada

buildsys,Varlink: use -i option of packcc to include general.h earlier Close #2564. This fix is based on the investigation taken by @k-takata.

view details

Masatake YAMATO

commit sha ba01295d71214a647c75f10cc2cbf82c81cb9639

circleci: test on 32bit arch (ubuntu20_32bit) Initially, this change is for reproducing the issue #2564. The steps for reproducing are reported by @k-takata. On the architecture, we run only parser-varlink category of units target for focusing on solving #2564.

view details

Masatake YAMATO

commit sha 93e3c7363b7bcb0041f3143f6dd078b258073960

add an editorconfig entry for misc/packcc/packcc.c Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

Masatake YAMATO

commit sha ae32548d5b387a57a9415fd5100ef33c5d880638

Merge pull request #2578 from masatake/i386 Fix #2564 (was: circleci: test on 32bit arch)

view details

Masatake YAMATO

commit sha fe3f312a1b6a3955e159cb07a0ad6fd8b2824e2f

Merge pull request #2577 from masatake/php-typed-props PHP: fill the typeref field for variable kind tags appeared as class properties

view details

K.Takata

commit sha b8a4d244a06b8cb7efe4530e3d582f0fc84024a0

docs,man: Fix codeblocks

view details

K.Takata

commit sha 20e934e31195ae67f92a674051682402b044896a

Merge pull request #2583 from k-takata/docs-codeblock docs,man: Fix codeblocks

view details

Masatake YAMATO

commit sha af6edb60d921247669ce99e0449eaa7dc51d7e5a

main: make the error message about --_roledef option more user friendly Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

Masatake YAMATO

commit sha 4f4bbb50c05135849c7eccbd805436347cd1d674

main: add helper functions to get kindIndex from its letter and long name Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

Masatake YAMATO

commit sha 751c4167716ae276d70886733601fc3b32933668

main: use char type for rerepsenting a kind letter passed to getKindForLetter() int type was used. Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

Masatake YAMATO

commit sha 7afdb11cfeb3d2153b9d91a8306fbf018225b91c

main: introduce enableRole function Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

Masatake YAMATO

commit sha d28420018abf5e02d9638dc4cfeedd5d9aa5c174

main: introduce --roles-<LANG>:<KIND>= option to enable/disable roles Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

Masatake YAMATO

commit sha 888548c0360f5a400447b38e9b9d7f75b7ac247d

Tmain: add cases for testing --roles-<LANG>.<KIND> option Redundant duplicated lines were spotted by @k-takata. Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

Masatake YAMATO

commit sha bdcea8e3dbbd1555cce45c9028efd7ace239dbd4

docs(man,web): write about --roles-<LANG>.<KIND> option Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

push time in a month

issue commentuniversal-ctags/ctags

Release plans ?

@jwhitley, thank you very much.

vladak

comment created time in a month

push eventmasatake/ctags

Masatake YAMATO

commit sha 750ebcec75bfca0d9bf0ddf958a1616cf76779c8

vim: fill signature fields Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

push time in a month

pull request commentuniversal-ctags/ctags

vim: fill signature fields

@lacygoill, thank you. I will update the change as you wrote.

masatake

comment created time in a month

PR opened universal-ctags/ctags

buildsys: remove unused code from configure.ac

Signed-off-by: Masatake YAMATO yamato@redhat.com

+0 -32

0 comment

1 changed file

pr created time in a month

create barnchmasatake/ctags

branch : unused-code-in-cofingure-ac

created branch time in a month

pull request commentuniversal-ctags/ctags

vim: fill signature fields

@lacygoill (and/or other people who knows vim script well), I'm trying to fill "signature:" field of function kinds.

I have a question.

function! s:GetTokensFromLine(line, string_continuation, atom_continuation,
                             \tabstop)
...

I wonder what is \ of \tabstop.

My code gathers \ as a part of the signature like:

 s:GetTokensFromLine	input.vim	/^function! s:GetTokensFromLine(line, string_continuation, atom_continuation,$/;"	f	signature:(line, string_continuation, atom_continuation,\\tabstop)

Do you think I should include \ as part of the signature field?

masatake

comment created time in a month

PR opened universal-ctags/ctags

vim: fill signature fields

Signed-off-by: Masatake YAMATO yamato@redhat.com

+209 -1

0 comment

4 changed files

pr created time in a month

push eventmasatake/ctags

Masatake YAMATO

commit sha fb7d913f5c8c83caac060d1d1d7818e532846e5a

vim: fill signature fields Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

push time in a month

create barnchmasatake/ctags

branch : vim-signature

created branch time in a month

issue commentuniversal-ctags/ctags

[LOOKING FOR VOLUNTEERS] Language consultants/advisers

@lacygoill, thank you.

masatake

comment created time in a month

pull request commentuniversal-ctags/ctags

vim: support ":const" command which sets constants

Thank you.

lacygoill

comment created time in a month

push eventuniversal-ctags/ctags

lacygoill

commit sha b92362f2e16cca81b171608d06850056089a992f

vim: support ":const" command which sets constants

view details

Masatake YAMATO

commit sha b9afa00f052a998a27ff1094a8108d0d6bc899f7

Merge pull request #2593 from lacygoill/vim-const vim: support ":const" command which sets constants

view details

push time in a month

PR merged universal-ctags/ctags

vim: support ":const" command which sets constants

This PR tries to add support for the Vim command :const. The latter is used in Vimscript to set a constant.


I did not try to create a new C function to parse the command because:

  1. that's above my level
  2. I don't think it's necessary. In Vim, :const is equivalent to :let followed by :lockvar; it's just a variable whose value is locked so that it can't change.

:const can be shortened into :cons, which is why I wrote 4 and not 5 here:

else if (wordMatchLen (line, "let", 3) || wordMatchLen (line, "const", 4))
                                                                       ^

I added a simple test consisting of an input file and an expected output tags file. I made sure all the Vim tests passed:

make units LANGUAGES=Vim
+12 -4

6 comments

3 changed files

lacygoill

pr closed time in a month

Pull request review commentuniversal-ctags/ctags

vim: support ":const" command which sets constants

 static bool parseVimLine (const unsigned char *line, int infunction) 		parseAutogroup (skipWord (line)); 	} -	else if (wordMatchLen (line, "let", 3))+	else if (wordMatchLen (line, "let", 3) || wordMatchLen (line, "const", 4)) 	{-		parseLet (skipWord (line), infunction);+		parseVariableOrConstant (skipWord (line), infunction, K_VARIABLE);+	}+	else if (wordMatchLen (line, "const", 4))+	{+		parseVariableOrConstant (skipWord (line), infunction, K_CONST); 	}-

Removng this empty line is not needed to support "const".

lacygoill

comment created time in a month

Pull request review commentuniversal-ctags/ctags

vim: support ":const" command which sets constants

 static bool parseVimLine (const unsigned char *line, int infunction) 		parseAutogroup (skipWord (line)); 	} -	else if (wordMatchLen (line, "let", 3))+	else if (wordMatchLen (line, "let", 3) || wordMatchLen (line, "const", 4))

Mathcing "const" is not needed here.

lacygoill

comment created time in a month

pull request commentuniversal-ctags/ctags

vim: support ":const" command which sets constants

I think ideal behavior is:

[jet@living]~/var/ctags% cat input.vim
cat input.vim
const s:CONSTANT = 42
[jet@living]~/var/ctags% ./ctags --list-kinds=Vim
./ctags --list-kinds=Vim
a  autocommand groups
c  user-defined commands
f  function definitions
m  maps
v  variable definitions
n  vimball filename
C  constant definitions
[jet@living]~/var/ctags% ./ctags -o - input.vim
./ctags -o - input.vim
s:CONSTANT	input.vim	/^const s:CONSTANT = 42$/;"	C

The change we need is for above result:

diff --git a/parsers/vim.c b/parsers/vim.c
index 0bdd1802..7ee767b6 100644
--- a/parsers/vim.c
+++ b/parsers/vim.c
@@ -46,7 +46,8 @@ typedef enum {
 	K_FUNCTION,
 	K_MAP,
 	K_VARIABLE,
-	K_FILENAME
+	K_FILENAME,
+	K_CONST,
 } vimKind;
 
 static kindDefinition VimKinds [] = {
@@ -56,6 +57,7 @@ static kindDefinition VimKinds [] = {
 	{ true,  'm', "map",      "maps" },
 	{ true,  'v', "variable", "variable definitions" },
 	{ true,  'n', "filename", "vimball filename" },
+	{ true,  'C', "constant", "constant definitions" },
 };
 
 /*
@@ -432,7 +434,7 @@ cleanUp:
 	return cmdProcessed;
 }
 
-static void parseLet (const unsigned char *line, int infunction)
+static void parseVariableOrConstant (const unsigned char *line, int infunction, int kindIndex)
 {
 	vString *name = vStringNew ();
 
@@ -482,7 +484,7 @@ static void parseLet (const unsigned char *line, int infunction)
 			vStringPut (name, (int) *cp);
 			++cp;
 		} while (isalnum ((int) *cp) || *cp == '_' || *cp == '#' || *cp == ':' || *cp == '$');
-		makeSimpleTag (name, K_VARIABLE);
+		makeSimpleTag (name, kindIndex);
 		vStringClear (name);
 	}
 
@@ -596,9 +598,12 @@ static bool parseVimLine (const unsigned char *line, int infunction)
 
 	else if (wordMatchLen (line, "let", 3))
 	{
-		parseLet (skipWord (line), infunction);
+		parseVariableOrConstant (skipWord (line), infunction, K_VARIABLE);
+	}
+	else if (wordMatchLen (line, "const", 4))
+	{
+		parseVariableOrConstant (skipWord (line), infunction, K_CONST);
 	}
-
 	return readNextLine;
 }

However, I don't know well about vim script. So, I would like to hear your comments.

lacygoill

comment created time in a month

pull request commentuniversal-ctags/ctags

vim: support ":const" command which sets constants

that's above my level

I will asisst you. So the level is not a matter for us.

We know ctags. You know vim script. I know C. Your knowledge about vim script is very important. See also https://github.com/universal-ctags/ctags/issues/2494.

You reuse the code for handling "let". However, as far as my short study, let is for defining variables. I think tagging a language object defined with :const as a variable is not good idea. Instead, I think it should be tagged as a constant.

const s:CONSTANT = 42

=>

s:CONSTANT	input.vim	/^const s:CONSTANT = 42$/;"	v

Here v means a variable. I don't think s:CONSTANT is not a vairable. How do you think?

lacygoill

comment created time in a month

issue closeduniversal-ctags/ctags

Universal Ctags doesn't generate tags for html

Generates tags for all other files: JS, Python, markdown, etc.

Universal Ctags 0.0.0(30cd8e0), Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Mar 17 2020, 14:12:37
  URL: https://ctags.io/
  Optional compiled features: +wildcards, +regex, +iconv, +option-directory, +xpath, +case-insensitive-filenames, +packcc

closed time in a month

nerdfiles

delete branch universal-ctags/ctags

delete branch : masatake-patch-2

delete time in a month

push eventuniversal-ctags/ctags

Masatake YAMATO

commit sha 2a45704cf06f39fe116748e26e68d8e814035512

buildsys: utilize GitHub action for testing with valgrind Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

push time in a month

issue commentuniversal-ctags/ctags

Universal Ctags doesn't generate tags for html

See https://github.com/universal-ctags/ctags#differences about ~/.ctags.d and ~/.ctags.

nerdfiles

comment created time in a month

issue commentuniversal-ctags/ctags

Universal Ctags doesn't generate tags for html

So it might be that I'm registering this issue in the wrong repository... Do you mean I can close this issue?

nerdfiles

comment created time in a month

issue commentuniversal-ctags/ctags

Release plans ?

How do you do? I believe you are healthy.

Could you review man/ctags.1.rst.in in https://github.com/universal-ctags/ctags/pull/2579/commits/36aa4a333263b6654b94f8fa14ade3843444c1c5#diff-0f58ec26841e4489a3d0a370f50797c0 of #2579 (especially in English grammar aspect)?

I explained --roles-<LANG>.<KIND> option. If you think I should add more examples, let me know.

vladak

comment created time in a month

pull request commentuniversal-ctags/ctags

vim: support new ":def" functions of vim9

Thank you for your contribution. I'm waiting for the patch for :const:-)

lacygoill

comment created time in a month

push eventuniversal-ctags/ctags

lacygoill

commit sha 81a8999004b5b2f17f9bade1656ee761d448692d

vim: support new ":def" functions of vim9 (#2590) (@masatake added the expected.tags file.)

view details

push time in a month

PR merged universal-ctags/ctags

vim: support new ":def" functions of vim9

This PR tries to add support for the new :def functions introduced in Vim9. See issue #2589 for more information.

I briefly tested the patch, and it seems to work. That is now ctags(1) correctly generates tags for :def functions.

But I don't know if it's really correct; I don't know C.

If it is correct, I think I could also add support for constants defined with the :const keyword.

+5 -2

3 comments

3 changed files

lacygoill

pr closed time in a month

pull request commentuniversal-ctags/ctags

vim: support new ":def" functions of vim9

@lacygoill, please look at https://github.com/universal-ctags/ctags/pull/2590/commits/1a44f70566389d0c5ef405eb99ba40a756b52ff3 .

A test case consists of two files: an input file and an expected output file. You prepared only an input file. The expected output is so obvious. So I added it.

When adding code for :const, please include both files for new code to your commit.

lacygoill

comment created time in a month

push eventuniversal-ctags/ctags

Masatake YAMATO

commit sha 33d6f04e247354cdc1fc8eb43ba1fc88e3bde2db

buildsys: utilize GitHub action for testing with valgrind Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

push time in a month

push eventuniversal-ctags/ctags

Masatake YAMATO

commit sha 3a058e2d22f740a5a1e8b1bff18bfa7575e57c97

buildsys: utilize GitHub action for testing with valgrind Signed-off-by: Masatake YAMATO <yamato@redhat.com>

view details

push time in a month

push eventlacygoill/ctags

Masatake YAMATO

commit sha 1a44f70566389d0c5ef405eb99ba40a756b52ff3

fixup! vim: support new ":def" functions of vim9 Added expected.tags.

view details

push time in a month

pull request commentuniversal-ctags/ctags

docs(man): Fix typos in man

Thank you!

standby24x7

comment created time in a month

push eventuniversal-ctags/ctags

Masanari Iida

commit sha c71475d3ec31a6bd2c1f8a13bcad42f9f0028781

docs(man): Fix typos in man Fix spelling typos in ctags-client-tools.7.rst, ctags.1.rst, readtags.1.rst, ctags-client-tools.7.in ctags.1.rst.in and readtags.1.rst.in.

view details

Masatake YAMATO

commit sha edfd087efdc7dfd616e4e6ee71485ded97035154

Merge pull request #2591 from standby24x7/fix-typo-readtags docs(man): Fix typos in man

view details

push time in a month

PR merged universal-ctags/ctags

docs(man): Fix typos in man

Fix spelling typos in ctags-client-tools.7.rst, ctags.1.rst, readtags.1.rst, ctags-client-tools.7.in ctags.1.rst.in and readtags.1.rst.in.

+10 -10

3 comments

6 changed files

standby24x7

pr closed time in a month

issue commentuniversal-ctags/ctags

Universal Ctags doesn't generate tags for html

It isn't reproduced:

[jet@living]~/var/ctags% cat input.html
cat input.html
<html>
  <body>
    <h1>Understanding basic concepts in ctags</h1>
  </body>
</html>
[jet@living]~/var/ctags% ./ctags --quiet --options=NONE -o - input.html
./ctags --quiet --options=NONE -o - input.html
Understanding basic concepts in ctags	input.html	/^    <h1>Understanding basic concepts in ctags<\/h1>$/;"	h

What kind of input do you give to ctags? What kind of command line do you use?

nerdfiles

comment created time in a month

pull request commentuniversal-ctags/ctags

buildsys: utilize GitHub action for testing with valgrind

It takes ten minutes to run make units VG=1. Not so bad.

masatake

comment created time in a month

Pull request review commentuniversal-ctags/ctags

buildsys: utilize GitHub action for testing with valgrind

+name: C/C++ CI++on:+  push:+    branches: [ master ]+  pull_request:+    branches: [ master ]++jobs:+  build:++    runs-on: ubuntu-latest++    steps:+    - uses: actions/checkout@v2+    - name: install tools and libraries+      run: sudo apt-get install valgrind pkg-config automake bash+    - name: autogen.sh+      run: ./autogen.sh+    - name: configure+      run: ./configure --enable-debugging+    - name: make+      run: make+    - name: make units+      run: make units VG=1+    - name: make distcheck

distcheck should be done somewhere else.

masatake

comment created time in a month

Pull request review commentuniversal-ctags/ctags

buildsys: utilize GitHub action for testing with valgrind

+name: C/C++ CI++on:+  push:+    branches: [ master ]+  pull_request:+    branches: [ master ]++jobs:+  build:++    runs-on: ubuntu-latest++    steps:+    - uses: actions/checkout@v2+    - name: install tools and libraries+      run: sudo apt-get install valgrind pkg-config automake bash

more libraries should be here.

masatake

comment created time in a month

create barnchuniversal-ctags/ctags

branch : masatake-patch-2

created branch time in a month

startedhuwdp/Flash-Matrix

started time in a month

issue commentuniversal-ctags/homebrew-universal-ctags

Installation fails on Mac os

As far as reading https://github.com/universal-ctags/homebrew-universal-ctags/blob/faaef55ab7b513529e06d454d49d973ede007151/universal-ctags.rb#L8, pkg-config must be available. autogen.sh also verifies the availability of pkg-config command.

However, as @k-takata wrote, missing pkg-config is a well-known reason for "configure.ac:129: error: possibly undefined macro: AC_DEFINE". e.g. https://stackoverflow.com/questions/20089579/error-ac-define-is-not-found-to-autoreconf-force-install

bIgBV

comment created time in a month

pull request commentuniversal-ctags/ctags

CXX: Avoid accessing token after it has been destroyed

Thank you!

pragmaware

comment created time in a month

pull request commentlsof-org/lsof

Fix tests for large inode-numbers (i >= 2^32).

Sorry to be late. I didn't notice your reply. I will take a look into your comment.

hvpeteet

comment created time in a month

PR closed universal-ctags/ctags

Reviewers
Cxx: don't access to the token object destroyed already

Close #2554.

When parsing typeref statement (in cxxParserExtractTypedef()), the last token of g_cxx.pTokenChain is destroyed.

cxxParserParseEnumStructClassOrUnionFullDeclarationTrailer() accessed g_cxx.pToken after calling cxxParserExtractTypedef().

In the above context, the g_cxx.pTokenChain and the last of g_cxx.pTokenChain point a same token object.

For the input:

typedef struct
{
  int*n;
} S;

valgrind reports this as:

==10895== Memcheck, a memory error detector
==10895== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==10895== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==10895== Command: ./ctags/ctags f.c
==10895==
==10895== Invalid read of size 4
==10895==    at 0x430317: cxxParserParseEnumStructClassOrUnionFullDeclarationTrailer (cxx_parser.c:575)
==10895==    by 0x4310E0: cxxParserParseClassStructOrUnionInternal (cxx_parser.c:1348)
==10895==    by 0x431131: cxxParserParseClassStructOrUnion (cxx_parser.c:1374)
==10895==    by 0x431F88: cxxParserParseBlockInternal (cxx_parser_block.c:402)
==10895==    by 0x432536: cxxParserParseBlock (cxx_parser_block.c:770)
==10895==    by 0x431736: cxxParserMain (cxx_parser.c:1861)
==10895==    by 0x4317D5: cxxCParserMain (cxx_parser.c:1890)
==10895==    by 0x40F9B0: createTagsForFile (parse.c:3337)
==10895==    by 0x40FE8B: createTagsWithFallback1 (parse.c:3457)
==10895==    by 0x40FFEE: createTagsWithFallback (parse.c:3543)
==10895==    by 0x410573: parseMio (parse.c:3704)
==10895==    by 0x4106A4: parseFileWithMio (parse.c:3750)
==10895==  Address 0x528bd20 is 0 bytes inside a block of size 88 free'd
==10895==    at 0x4C320DC: free (vg_replace_malloc.c:540)
==10895==    by 0x41600F: eFree (routines.c:255)
==10895==    by 0x43A7CC: deleteToken (cxx_token.c:40)
==10895==    by 0x43A8D9: cxxTokenDestroy (cxx_token.c:92)
==10895==    by 0x43760B: cxxParserExtractTypedef (cxx_parser_typedef.c:185)
==10895==    by 0x4302F9: cxxParserParseEnumStructClassOrUnionFullDeclarationTrailer (cxx_parser.c:560)
==10895==    by 0x4310E0: cxxParserParseClassStructOrUnionInternal (cxx_parser.c:1348)
==10895==    by 0x431131: cxxParserParseClassStructOrUnion (cxx_parser.c:1374)
==10895==    by 0x431F88: cxxParserParseBlockInternal (cxx_parser_block.c:402)
==10895==    by 0x432536: cxxParserParseBlock (cxx_parser_block.c:770)
==10895==    by 0x431736: cxxParserMain (cxx_parser.c:1861)
==10895==    by 0x4317D5: cxxCParserMain (cxx_parser.c:1890)
==10895==  Block was alloc'd at
==10895==    at 0x4C30EDB: malloc (vg_replace_malloc.c:309)
==10895==    by 0x415F29: eMalloc (routines.c:220)
==10895==    by 0x43A78A: createToken (cxx_token.c:30)
==10895==    by 0x49DF4B: objPoolGet (objpool.c:65)
==10895==    by 0x43A885: cxxTokenCreate (cxx_token.c:78)
==10895==    by 0x4366AA: cxxParserParseNextToken (cxx_parser_tokenizer.c:1234)
==10895==    by 0x42FEC9: cxxParserParseAndCondenseSubchainsUpToOneOf (cxx_parser.c:304)
==10895==    by 0x42FF0C: cxxParserParseUpToOneOf (cxx_parser.c:332)
==10895==    by 0x43014A: cxxParserParseEnumStructClassOrUnionFullDeclarationTrailer (cxx_parser.c:497)
==10895==    by 0x4310E0: cxxParserParseClassStructOrUnionInternal (cxx_parser.c:1348)
==10895==    by 0x431131: cxxParserParseClassStructOrUnion (cxx_parser.c:1374)
==10895==    by 0x431F88: cxxParserParseBlockInternal (cxx_parser_block.c:402)
==10895==
==10895==
==10895== HEAP SUMMARY:
==10895==     in use at exit: 0 bytes in 0 blocks
==10895==   total heap usage: 4,886 allocs, 4,886 frees, 248,039 bytes allocated
==10895==
==10895== All heap blocks were freed -- no leaks are possible
==10895==
==10895== For lists of detected and suppressed errors, rerun with: -s
==10895== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

g_cxx.pTokenChain should not be accessed after calling cxxParserExtractTypedef() and before calling cxxParserParseNextToken().

Signed-off-by: Masatake YAMATO yamato@redhat.com

+45 -13

5 comments

4 changed files

masatake

pr closed time in a month

issue commentuniversal-ctags/homebrew-universal-ctags

Installation fails on Mac os

Have the same issue on Mac

I think the issues are not the same. @bIgBV's one and @miranska's one are failed at ./configure. However, @CliveK's one is failed at ./autogen.sh.

@KazuakiM, could you consider adding depends_on "libtool" => :build to universal-ctags.rb ?

In this March, I introduced a library called libreadtags.so to u-ctags. For building libreadtags.so, libtool is needed. Missing libtool may cause the failure of running ./autogen.sh as reported by @CliveK.

bIgBV

comment created time in a month

pull request commentuniversal-ctags/ctags

Cxx: don't access to the token object destroyed already

@pragmaware, how are you? I believe you and your family are healthy.

I would like you to review this one because this is so critical.

masatake

comment created time in a month

issue commentuniversal-ctags/ctags

varlink tests fail on 32-bit arches (i586 and armh)

Thank you very much.

vt-alt

comment created time in a month

more