Questions about Syntax (.SYN) Files

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
Piz
Posts: 1
Joined: Wed Mar 19, 2008 9:48 pm

Questions about Syntax (.SYN) Files

Post by Piz »

Hi. This is my first post here. I did a search but couldn't find anything relevant. Three questions:

1. Apparently it's not documented, but the semicolon character appears to be a valid comment character for .SYN files. Is that correct? If so, are there rules about where comments can be included?

2. I want to use the semicolon as an operator character - does it have to be escaped? What's the escape character?

3. Is there a known problem in syntax highlighting with strings that span line breaks? I created a .SYN file with "StringsSpanLines = Yes" but the highlighting always ends at the first line break in a string.

I'm using TextPad 5.1.0.

Here's my .SYN file (note that the backslash in the "OperatorChars" line is intended to be an operator character):

Code: Select all

;TextPad keyword syntax file for Smart Game Format (SGF)

C=1

[Syntax]
Namespace1 = 6
IgnoreCase = No
BracketChars = ()
OperatorChars = :+-;\
PreprocStart =
SyntaxStart =
SyntaxEnd =
CommentStart =
CommentEnd =
CommentStartAlt =
CommentEndAlt =
SingleComment =
SingleCommentEsc =
StringsSpanLines = Yes
StringStart = [
StringEnd = ]
StringAlt =
StringEsc = \
CharStart =
CharEnd =
CharEsc =

[Keywords 1]
AB
AE
AN
AP
AR
AW
B
BL
BM
BR
BT
C
CA
CP
CR
DD
DM
DO
DT
EV
FF
FG
GB
GC
GM
GN
GW
HA
HO
IT
KM
KO
LB
LN
MA
MN
N
OB
ON
OT
OW
PB
PC
PL
PM
PW
RE
RO
RU
SL
SO
SQ
ST
SZ
TB
TE
TM
TR
TW
UC 
US
V
VW
W
WL
WR
WT
This is a small SGF file:

Code: Select all

(;GM[1]FF[4]CA[UTF-8]AP[CGoban:3]ST[2]
RU[Japanese]SZ[19]KM[0.00]
GN[Piz's Miscellaneous Collection]PW[White]PB[Black]CP[See http://senseis.xmp.net/?TsumegoLounge]GC[Piz's Miscellaneous Collection
By Michael Pizolato

This collection is an assortment of problems I gathered over time, from
games, other users, and elsewhere. I've included solutions where I've been
able to find them or figure them out. If anyone else contributed to the
solutions, I've noted that in the annotations.

The first place these problems were "published" was in the room I created on
KGS, the Tsumego Lounge (http://senseis.xmp.net/?TsumegoLounge). The
problems were viewed there by hundreds of players from KGS 30k to 7d, and
the feedback I got was invaluable for improving the collection. Many thanks to
all my "tsumego-ers!"

I hope this collection proves useful for improving your game.

Michael Pizolato
User "Piz" on KGS and IGS
2008.01.28

Except where noted, this set of solutions copyright (C)2008 by Michael
Pizolato. If you include this entire notice, you may freely distribute
UNMODIFIED AND COMPLETE copies of this collection. You may NOT
distribute partial copies of this collection.

If you have questions or comments, please contact Piz at KGS.
]SO[http://tsumego.tasuki.org/?page=tsumego]AN[Piz, and others as noted]US[Piz]C[Piz's Miscellaneous Collection

To use on KGS: select Options -> View Offline (keeps annotations) or Options -> Clone game in... (loses annotations).

For more info, see the Tsumego Lounge web site: http://senseis.xmp.net/?TsumegoLounge]
(;AW[ih][hi][ki][ik][kk]AB[jj]C[Piz's Miscellaneous Collection
Problem 1

Black to play and escape.

Problem courtesy of KGS user sozo91])
)
Thanks!

P.S. I've been a registered TextPad user for...well, it seems like forever. Doubt I'll ever found an editor I'll like better. :)
Post Reply