Page 1 of 1

Syntax Highlighting for Comments, in need of Help

Posted: Wed Jan 12, 2005 2:11 pm
by berndt_dm
My problem is with the following features in the .syn files.

SingleComment = C
SingleCommentCol = 1

It works fine for the following cases

C This is a comment
C****** This is a comment *******

However, does not work in the following case

C000010 This line is a comment

Unfortunately, the for a comment to be started it must have a line number. The first two cases would be used such as below and would be more a visual aid to the programmer rather than actual interpretted code.

C000015
C******************
C* This is a comment *
C******************$

I could use the above format for future development but I'm working with code already in place and it would be an major undertaking to change all the code to the above format. Most of the code is in the following format.

C000020 This is a comment$

So it appears to work if the comment indicator is followed by a blank space or special characters, such as '*' but not when followed by numbers or text for that matter.

Any suggestions on a workaround or is this a bug of some sort?

Re: Syntax Highlighting for Comments, in need of Help

Posted: Fri Jan 14, 2005 8:07 am
by SteveH
Hmmm, looks very like ATLAS to me.

I can't really add much to this other than I've tried this and had exactly the same problem. My syntax definition file copes with multi-line comments and single line ones but I also have a problem when a line number follows the single comment string.

From the documentation on the syntax definition files, I would have expected this to work unless I am missing something.

Cheers,

Steve

Posted: Fri Jan 14, 2005 9:16 am
by LetzRoll
so set the flag to C0 (that's a zero) instead of C.

Posted: Fri Jan 14, 2005 9:23 am
by SteveH
It won't always be a zero though.

Cheers,

Steve

Posted: Fri Jan 14, 2005 9:33 am
by LetzRoll
first: try assigning the value 'leading' to SingleCommentCol.

second: rtfm.

Posted: Fri Jan 14, 2005 9:40 am
by SteveH
Did that work for you because it didn't here?

Steve

Posted: Fri Jan 14, 2005 11:09 am
by berndt_dm
Hmmm, looks very like ATLAS to me
You are correct Steve it is ATLAS. Good eye.
so set the flag to C0 (that's a zero) instead of C.
Even if all the line numbers started with C0 this wouldn't work because you run into the same problem if something trails the C0, i.e.

C000010 comment $

This wouldn't work because 00010 trails C0 and we run into the same problem again.

first: try assigning the value 'leading' to SingleCommentCol.

second: rtfm.
I tried the first suggestion with no luck. I'm getting the same result.

-d

Posted: Tue Jan 18, 2005 1:48 pm
by usbobbie
I'm having the same problem with Keywords. If a Keyword is followed by any character other than a space it does not get color-coded. I mention this in my post at http://www.textpad.info/forum/viewtopic.php?t=6101.

I've looked everywhere but cannot find an answer. Since nobody has replied to my post, I'm assuming that it cannot be done??? :?

Posted: Fri Feb 11, 2005 1:13 pm
by berndt_dm
bump

Using ATLAS here

Posted: Fri Feb 11, 2005 6:22 pm
by randomwanderer
I have similar concern, want, problem... Been programming in ATLAS for years. Now on project with CASS test station using essentailly ATLAS 416.
Anyone doing something similar?
Forrest in Orlando, FL