[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What suffixes are supported/for what languages

From: Shigio Yamaguchi
Subject: Re: What suffixes are supported/for what languages
Date: Thu, 10 May 2001 07:56:55 +0900

> A parser bound to each suffix - just like the 'else if ( suffix )
> parser' tree hardcoded in gctags/gctags.c that i modified by hand
> to add new suffixes for an existing parser.
> maybe you could start by adding a command that would display the
> built in bindings of suffix to parser?
> you would have an internal default list used if there were no
> related entries in the .global config and a command like
> 'gtags --config suffix-per-parser' would print out:
> parse_C : c;
> parse_C++ : C,H,cc,cpp,hpp,cxx;
> parse_detect_C_C++ : h;
> parse_Java : jar;
> or something like this, just make it easy to parse for machines
> and humans.

Anyway, we must modify parser by hand, because all ctags style parser,
including gctags, decide language type by suffix. (Some parser may have
its own config file. In that case, we must modify the file instead.)
If a parser doesn't understand suffix '.msg', the parser can do nothing
about a file 'xxx.msg'.

So, I understand that your suggestion is to treat multi parser.
In current GLOBAL, we can do it like this:

        GTAGS=multi_parser %:\

for file in $*; do
        case $file in
        *.c)    parser=parse_C;;
        *.h)    parser=parse_detect_C_C++;;
        *.jar)  parser=parse_Java;;
        *)      ...;;
        $parser $file

Isn't it enough?
Shigio Yamaguchi - Tama Communications Corporation
Mail: address@hidden, (Spare mail: address@hidden)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]