Create own Tags

Discussion Forums discussion Create own Tags

This topic contains 0 voices and has 5 replies.

Viewing 6 posts - 1 through 6 (of 6 total)
Author Posts
Author Posts
July 29, 2011 at 5:09 pm #5393



how can i create my own Tags for BASCOM language.

Like this:

For C++ this function still exist.

Thanks for your help


August 1, 2011 at 11:45 am #17951


Meanwhile i have found the

“taggersctagsadditionalLanguages.conf” .

Is there anywere a Syntax-Sample?

I got *.inc files (Basic BASCOM-AVR Code) and i want to use them with the Visual Basic Scheme the Syntax-highlighting still works, but the cTAG function not.

Who can Help me with my Problem…

Thank for your Help


August 11, 2011 at 11:40 am #17952


I’ve used the below syntax in previous version. Haven’t tested in current PN.

In additionalLanguages.conf you have to add:





* langname is your language name

* ext is an extension for the language

* regexp is PCRE regular expression

* replacement is a replacement string in withch you will probably want to use “1″ to insert phrase you caught in regexp.

* type-short, type-long are types of caught tags eg. “f” and “Function” for functions

This is what I’ve used for ActionScript:


--regex-acscript=/(^|[ t])function[ t]+(w+)[ t]*(/2/f,Function/

--regex-acscript=/(^|[ t])([A-Za-z0-9_.]+)[ t]*=[ t]*function[ t]*(/2/f,Function/

In additionalSupportedSchemes.ini I had to add:


f = 1

August 12, 2011 at 8:38 am #17953


Hi Nux,

thanks for your hint.

Meanwhile i understand the way to implement my own cTAGs in PN,

but the PCRE syntax is a little bit confusing.

For example:

I want to tag every line with

- 0 or more blanks at the beging

- folowed by a regular Charakter

- and ended by a “:”

I want to use this to tag a label.

I tryed like this:

–regex-vb=/^ *[A-Za-z](.*):$/1/l,Label/

This works but the first charakter of the Tag will be truncated.

In the cTAGs-tree a “abel” is added.

How to solve this problem?

To bypass the first problem i used the following expression:


Now all “:” ending lines will be listed.

The problem, also “case xx:” commands will be listet.

How to except charakters/words.

I want to except the word “case”

You use 2 option what does this mean?

Also t and w+

Do you have a good description for PCRE syntax.

Thanks for your Help

Greets from Hamburg


August 12, 2011 at 9:43 am #17954


Have a look at:

If you want to catch lines that only contains: “[optional whitespace][letters]:”

Then the regexp would be:

^[ t]*([a-z]+)$

In replacement string “2″ is the content form the second pair of parentheses (“1″ from the first and so on). Note that in JavaScript (linked above) different syntax is used in replacement string (“$1″, “$2″…). Other then that it should be the same.

August 12, 2011 at 12:28 pm #17955


Hi Nux,

it works, now only real Labels (Label:) will be listet!

I think you forgot the “:” :-)

I have modifyed the expression as follows:

–regex-vb=/^[t ]*(w+):$/1/l,Label/

Now all Lines that:

- Start with a TAB or a BLANK,

- followed by a Word that only contains

A-Z or a-z or 0-9 or a “_”,

- and finaly ends with a “:”

will be listed.

Thanks for your Help again!

Later i will study your link.

Wish you a great day


Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.