How to add tcl support in Source Insight?
Author: Weiwei (fangvv at gmail dot com)
I use Source Insight (SI) to analyze the source code of NS-2. Unfortunately, I found it didn't support tcl/tk parsing in default application settings. So I tried to add the support to the tcl/tk code for SI.
First, choose Options->Preferences->Languages, add a new language called "TCL Language". Double click that new defined language line to edit its settings. In the opened "TCL Language Properties" dialogue , add "#" in the "Comments and Ranges" tab; click "keywords" button in the "Options" tab, add the tcl/tk keywords, you can just import the keywords from predefined files , the syntax is like the following:
elseif, Keyword
SYNTAX: the_keyword+", Keyword" [Return]
I add the keywords as those defined in Editplus tcl/tk user file. You can email me (fangvv at gmail dot com) to get my exported keywords list.
Then, choose Options->Document Options. In the opened dialogue, add a new type called "TCL Source File", the filter is :*.tcl. Remember to select the "Include when adding to projects" to make tcl file imported into your source code in SI next time. Choose the Language as "TCL Language" you defined in the above step, you can try to verify it by clicking the button "Language..".
After that, Re-import your NS-2 source code and check if the tcl files have been imported into the analysis project.
Any problem, email me:) | |