Skip to content

Commit ff17464

Browse files
committed
docs(man): add a page for Tcl parser
Signed-off-by: Masatake YAMATO <[email protected]>
1 parent 4f55b29 commit ff17464

File tree

4 files changed

+148
-0
lines changed

4 files changed

+148
-0
lines changed

docs/man-pages.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Man pages
2121
ctags-lang-python(7) <man/ctags-lang-python.7.rst>
2222
ctags-lang-r(7) <man/ctags-lang-r.7.rst>
2323
ctags-lang-sql(7) <man/ctags-lang-sql.7.rst>
24+
ctags-lang-tcl(7) <man/ctags-lang-tcl.7.rst>
2425
ctags-lang-verilog(7) <man/ctags-lang-verilog.7.rst>
2526

2627
readtags(1) <man/readtags.1.rst>

docs/man/ctags-lang-tcl.7.rst

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
.. _ctags-lang-tcl(7):
2+
3+
==============================================================
4+
ctags-lang-tcl
5+
==============================================================
6+
7+
Random notes about tagging tcl source code with Universal Ctags
8+
9+
:Version: 5.9.0
10+
:Manual group: Universal Ctags
11+
:Manual section: 7
12+
13+
SYNOPSIS
14+
--------
15+
| **ctags** ... --languages=+Tcl ...
16+
| **ctags** ... --language-force=Tcl ...
17+
| **ctags** ... --map-Tcl=+.tcl ...
18+
19+
DESCRIPTION
20+
-----------
21+
This man page gathers random notes about tagging tcl source code.
22+
23+
TAGGING language objects of OO Extensions
24+
-----------------------------------------
25+
26+
TclOO parser and ITcl parser are subparsers running on the Tcl parser.
27+
As the names of parsers show, they are for tagging language objects of
28+
object oriented programming extensions for the Tcl language.
29+
30+
A pattern, "namespace import oo" in an input file activates the TclOO
31+
parser. A pattern, "namespace import itcl" in an input file activates
32+
the ITcl parser.
33+
34+
There are cases that one of the OO extensions is used though neither
35+
pattern are appeared in an input file.
36+
37+
Consider the following input files:
38+
39+
"main.tcl"
40+
41+
.. code-block:: Tcl
42+
43+
package require Itcl
44+
namespace import itcl::*
45+
source input.tcl
46+
47+
"input.tcl"
48+
49+
.. code-block:: Tcl
50+
51+
class MyClass {
52+
public method foo {} {
53+
}
54+
}
55+
56+
The pattern for activating the ITcl parser is not appeared
57+
in "input.tcl" though "class" command is used. As a result,
58+
ctags cannot extract "MyClass".
59+
60+
The parameters `TclOO.forceUse=true|[false]` and
61+
`ITcl.forceuse=true|[false]` for handling this situation. With the
62+
parameter, you can force ctags to activate one of the subparsers.
63+
64+
You can use the parameters like ``--param-ITcl.forceuse=true``
65+
in a command-line.
66+
67+
Note that you can enable only one of ITcl parser or TclOO parser.
68+
Enabling both parsers with specifying the parameters can cause
69+
unexpected results.
70+
71+
SEE ALSO
72+
--------
73+
:ref:`ctags(1) <ctags(1)>`

man/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ GEN_IN_MAN_FILES = \
3030
ctags-lang-iPythonCell.7 \
3131
ctags-lang-julia.7 \
3232
ctags-lang-python.7 \
33+
ctags-lang-tcl.7 \
3334
ctags-lang-verilog.7 \
3435
ctags-lang-inko.7 \
3536
ctags-lang-r.7 \

man/ctags-lang-tcl.7.rst.in

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
.. _ctags-lang-tcl(7):
2+
3+
==============================================================
4+
ctags-lang-tcl
5+
==============================================================
6+
-------------------------------------------------------------------
7+
Random notes about tagging tcl source code with Universal Ctags
8+
-------------------------------------------------------------------
9+
:Version: @VERSION@
10+
:Manual group: Universal Ctags
11+
:Manual section: 7
12+
13+
SYNOPSIS
14+
--------
15+
| **@CTAGS_NAME_EXECUTABLE@** ... --languages=+Tcl ...
16+
| **@CTAGS_NAME_EXECUTABLE@** ... --language-force=Tcl ...
17+
| **@CTAGS_NAME_EXECUTABLE@** ... --map-Tcl=+.tcl ...
18+
19+
DESCRIPTION
20+
-----------
21+
This man page gathers random notes about tagging tcl source code.
22+
23+
TAGGING language objects of OO Extensions
24+
-----------------------------------------
25+
26+
TclOO parser and ITcl parser are subparsers running on the Tcl parser.
27+
As the names of parsers show, they are for tagging language objects of
28+
object oriented programming extensions for the Tcl language.
29+
30+
A pattern, "namespace import oo" in an input file activates the TclOO
31+
parser. A pattern, "namespace import itcl" in an input file activates
32+
the ITcl parser.
33+
34+
There are cases that one of the OO extensions is used though neither
35+
pattern are appeared in an input file.
36+
37+
Consider the following input files:
38+
39+
"main.tcl"
40+
41+
.. code-block:: Tcl
42+
43+
package require Itcl
44+
namespace import itcl::*
45+
source input.tcl
46+
47+
"input.tcl"
48+
49+
.. code-block:: Tcl
50+
51+
class MyClass {
52+
public method foo {} {
53+
}
54+
}
55+
56+
The pattern for activating the ITcl parser is not appeared
57+
in "input.tcl" though "class" command is used. As a result,
58+
ctags cannot extract "MyClass".
59+
60+
The parameters `TclOO.forceUse=true|[false]` and
61+
`ITcl.forceuse=true|[false]` for handling this situation. With the
62+
parameter, you can force ctags to activate one of the subparsers.
63+
64+
You can use the parameters like ``--param-ITcl.forceuse=true``
65+
in a command-line.
66+
67+
Note that you can enable only one of ITcl parser or TclOO parser.
68+
Enabling both parsers with specifying the parameters can cause
69+
unexpected results.
70+
71+
SEE ALSO
72+
--------
73+
ctags(1)

0 commit comments

Comments
 (0)