Comments

Top  Previous  Next

Scripts > Token definitions > Predefined tokens > Comments

 

The following predefined tokens can be inserted in a project by a pop-up menu.

 

They describe comments of different programming languages. Frequently they are use as parts of the ignorable characters. In this case they neither need nor can be used inside of the productions.

 

 

LC:        //[^\n]*(\n|\z)

 

Line comment, beginning with \"//\" and extending till the end of the line or end of file.

 

 

BC_CPP:        /\*[^*]*\*+([^/*][^*]*\*+)*/

 

Block comment (C++-style), beginning with "/*" and ending with "*/". Inside of block comments sequences of '*' are permitted, e.g..: /********/. It's difficult to understand the construction of this expression. It is derived in the book: J.E.F. Friedl:Regular expressions. ("[^/*]" here represents special.)

 

 

 

BC_PAS:        \(\*[^*]*\*+([^)*][^*]*\*+)*\)

 

Block comment (Pascal-style), beginning with "(*" and ending with "*)". Inside of block comments sequences of '*' are permitted, e.g..: (********)

 

 

BC_HTML:        <!--([^-]|-+[^->]|->)*-+->

 

HTML/XML block comment, beginning with "<!--" and ending with "-->".

 



This page belongs to the TextTransformer Documentation

Home  Content  German