Skip to content

Commit

Permalink
Add man parser
Browse files Browse the repository at this point in the history
A Title and sections in *.[1-9] are tagged.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
  • Loading branch information
masatake committed Apr 28, 2016
1 parent aa75fda commit 0a9e78a
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions main/parsers.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
LispParser, \
LuaParser, \
M4Parser, \
ManParser, \
MakefileParser, \
MatLabParser, \
ObjcParser, \
Expand Down
1 change: 1 addition & 0 deletions makefiles/translator_input.mak
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ TRANSLATOR_INPUT = \
optlib/CoffeeScript.ctags \
optlib/ctags-optlib.ctags \
optlib/gdbinit.ctags \
optlib/man.ctags \
optlib/m4.ctags \
\
$(NULL)
38 changes: 38 additions & 0 deletions optlib/man.ctags
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#
#
# Copyright (c) 2016, Red Hat, Inc.
# Copyright (c) 2016, Masatake YAMATO
#
# Author: Masatake YAMATO <yamato@redhat.com>
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
#
#
--langdef=man
--languages=-man
--map-man=+.1
--map-man=+.2
--map-man=+.3
--map-man=+.4
--map-man=+.5
--map-man=+.6
--map-man=+.7
--map-man=+.8
--map-man=+.9
--regex-man=/^\.TH[[:space:]]{1,}"([^"]{1,})".*/\1/t,title,titles/{exclusive}{icase}{scope=push}
--regex-man=/^\.TH[[:space:]]{1,}([^[:space:]]{1,}).*/\1/t,title,titles/{exclusive}{icase}{scope=push}
--regex-man=/^\.SH[[:space:]]{1,}"([^"]{1,})".*/\1/s,section,sections/{exclusive}{icase}{scope=ref}
--regex-man=/^\.SH[[:space:]]{1,}([^[:space:]]{1,}).*/\1/s,section,sections/{exclusive}{icase}{scope=ref}
1 change: 1 addition & 0 deletions win32/ctags_vs2013.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
<ClCompile Include="..\optlib\m4.c" />
<ClCompile Include="..\main\main.c" />
<ClCompile Include="..\parsers\make.c" />
<ClCompile Include="..\optlib\man.c" />
<ClCompile Include="..\parsers\matlab.c" />
<ClCompile Include="..\parsers\objc.c" />
<ClCompile Include="..\parsers\ocaml.c" />
Expand Down
3 changes: 3 additions & 0 deletions win32/ctags_vs2013.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@
<ClCompile Include="..\parsers\make.c">
<Filter>Source Files\Parsers</Filter>
</ClCompile>
<ClCompile Include="..\parsers\man.c">
<Filter>Source Files\Parsers</Filter>
</ClCompile>
<ClCompile Include="..\parsers\matlab.c">
<Filter>Source Files\Parsers</Filter>
</ClCompile>
Expand Down

0 comments on commit 0a9e78a

Please sign in to comment.