Hi,
Oops, it's my misunderstanding, sorry for disturbing you.
Thank you for letting me know that, I will change the default
configuration file gtags.conf for CentOS6.
Also thanks for adding the description onto the docuemnt.
Thanks,
kaicho
----- Original Message -----
>From: Shigio YAMAGUCHI <[email protected]>
>To: Yoshitaro Makise <[email protected]>
>Cc: "[email protected]" <[email protected]>
>Date: 2014/12/13, Sat 08:16
>Subject: Re: langmap for pygments-parser is case sensitive
>
>
>Hi,
>I have added the required version of pygments in
>the following file in the package.
>
>
>[plugin-factory/PLUGIN_HOWTO.pygments]
>> You need the following software:
>> ...
>> o Pygments python package 1.6 or later
> ============ ADDED
>
>
>Thanks,
>Shigio
>
>
>
>
>2014-12-12 22:58 GMT+09:00 Yoshitaro Makise <[email protected]>:
>Hi,
>>
>>> pygments.util.ClassNotFound: no lexer for alias 'awk' found
>>
>>This is the right behavior because Pygments 1.4 does not have 'awk' lexer.
>>
>>> It works fine if I change the rule name from "Awk" to "awk"(lower case) in
>>> gtags.conf.
>>
>>In this case actually pygments plugin skips processing the file,
>>because lower case langname is reserved for gtags's built-in parser.
>>
>>Thanks,
>>
>>
>>
>>2014-12-12 11:59 GMT+09:00 KAICHO <[email protected]>:
>>> Hi,
>>>
>>> gtags could fail to analyze a file even if there is a
>>>
>>> rule for the file in gtags.conf, as langmap/gtags_parser
>>> configuration in gtags.conf is case sensitive.
>>>
>>> Followings are the simple example, a.awk file can not be
>>> analyzed by gtags even if "Awk" rule is in gtags.conf.
>>> It works fine if I change the rule name from "Awk" to
>>> "awk"(lower case) in gtags.conf.
>>>
>>> # ls -al
>>> total 20
>>> drwxr-xr-x. 2 root root 4096 12月 11 18:31 2014 .
>>> drwxr-xr-x. 111 root root 12288 12月 11 18:31 2014 ..
>>> -rw-r--r--. 1 root root 0 12月 11 18:30 2014 a.awk
>>> -rw-r--r--. 1 root root 99 12月 11 18:30 2014 gtags.conf
>>>
>>> # cat gtags.conf
>>> default:\
>>> :langmap=Awk\:.awk.gawk.mawk:\
>>> :gtags_parser=Awk\:/usr/lib64/gtags/pygments-parser.la:
>>>
>>> # gtags -v --gtagsconf=./gtags.conf
>>> [Thu Dec 11 18:31:48 JST 2014] Gtags started.
>>> Using plug-in parser.
>>> [Thu Dec 11 18:31:48 JST 2014] Creating 'GTAGS' and 'GRTAGS'.
>>> [1] extracting tags of a.awk
>>> path = ./a.awk, lang = Awk, decided by suffix(.awk)
>>> Traceback (most recent call last):
>>> File "/usr/share/gtags/script/pygments_parser.py", line 240, in <module>
>>> main()
>>> File "/usr/share/gtags/script/pygments_parser.py", line 237, in main
>>> handle_requests(langmap, parser_options)
>>> File "/usr/share/gtags/script/pygments_parser.py", line 210, in
>>>handle_requests
>>> tags = parser.parse(path)
>>> File "/usr/share/gtags/script/pygments_parser.py", line 175, in parse
>>> ref_result = self.ref_parser.parse(path)
>>> File "/usr/share/gtags/script/pygments_parser.py", line 104, in parse
>>> lexer = self.get_lexer_by_langmap(path)
>>> File "/usr/share/gtags/script/pygments_parser.py", line 119, in
>>>get_lexer_by_langmap
>>> lexer = pygments.lexers.get_lexer_by_name(name)
>>> File "/usr/lib/python2.6/site-packages/pygments/lexers/__init__.py", line
>>>80, in get_lexer_by_name
>>> raise ClassNotFound('no lexer for alias %r found' % _alias)
>>> pygments.util.ClassNotFound: no lexer for alias 'awk' found
>>> gtags: unexpected EOF.
>>>
>>> I know this could be caused by pygments package issue.
>>> I use the package version 1.4 on CentOS 6(with python=2.6.6).
>>>
>>> # rpm -q python-pygments
>>> python-pygments-1.4-6.el6.noarch
>>> python-2.6.6-36.el6.x86_64
>>>
>>> If this is the issue caused by pygments, this is just for
>>> your information.
>>>
>>>
>>> Regards,
>>> kaicho
>>>
>>>
>>> _______________________________________________
>>> Bug-global mailing list
>>> [email protected]
>>> https://lists.gnu.org/mailman/listinfo/bug-global
>>>
>>
>>_______________________________________________
>>Bug-global mailing list
>>[email protected]
>>https://lists.gnu.org/mailman/listinfo/bug-global
>>
>
>
>--
>
>Shigio YAMAGUCHI <[email protected]>
>PGP fingerprint: D1CB 0B89 B346 4AB6 5663 C4B6 3CA5 BBB3 57BE DDA3
>
>_______________________________________________
>Bug-global mailing list
>[email protected]
>https://lists.gnu.org/mailman/listinfo/bug-global
>
>
>_______________________________________________
Bug-global mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-global