Highlighting comments in ATLAS

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Forrest

Highlighting comments in ATLAS

Post by Forrest »

The language for which I am working on a .syn file denotes comments by having a C in column 1 only. The next $ whenever it is denotes the end of the comment.

I am using C=1 as the template (that seems to determine the options available) and I see keywords that seem to relate to the solution (see below) but I have not been able to make it work and I have tried many different possibilities.

It is a shame that such a powerful feature is not explained in help and I also cannot find the answer on the web site.
Interestingly I want to recommend this program to hundreds of programmers at a very large defense firm but it is like pulling teeth to find how to fully utilize the program.


C=1

[Syntax]
Namespace1 = 6
IgnoreCase = Yes
InitKeyWordChars =
KeyWordChars =
BracketChars = ()
OperatorChars =
PreprocStart =
SyntaxStart =
SyntaxEnd =
CommentStart =
CommentEnd =$
CommentStartAlt =
CommentEndAlt =$
SingleComment =C
SingleCommentCol =1
SingleCommentAlt =
SingleCommentColAlt =
StringStart ='
StringEnd ='
StringAlt =
StringEsc =
CharStart =
CharEnd =
CharEsc =
Steve Hodgson

Re: Highlighting comments in ATLAS

Post by Steve Hodgson »

I use TextPad to edit ATLAS files and maintain a rudimentary .syn file that picks up comments and some ATLAS key words.

One difference is that our style guide defines multi-line comments in addition to single line comments. This makes it easier to handle comments generally. You'll see the convention from the excerpt below.

Let me know if you want a copy of the syn file by email.

I too had problems getting syntax highlighting to work for ATLAS files initially. The issue was more related to the lack of a file extension for the ATLAS source files themselves.

Steve

C=1

[Syntax]
Namespace1 = 4
IgnoreCase = No
KeyWordLength =
BracketChars = ()
OperatorChars = -+*/<>!~%^&|=
PreprocStart =
SyntaxStart =
SyntaxEnd =
HexPrefix =
CommentStart = C****
CommentEnd = $
CommentStartAlt =
CommentEndAlt =
SingleComment = C
SingleCommentCol = 1
SingleCommentAlt =
SingleCommentColAlt =
SingleCommentEsc =
StringsSpanLines = Yes
StringStart =
StringEnd =
StringAlt =
StringEsc =
CharStart =
CharEnd =
CharEsc =
Post Reply