[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New TextPad syntax definitions file for occam



Those programming using occam (yes there are still a few left!) may find the
attached syntax definition file useful. Used with TextPad
(http://www.textpad.com), it allows you to see the source code in
multi-coloured gory glory. I have deliberately separated the structure
keywords (PAR, SEQ, ALT etc) from the rest of the keywords. You can
therefore give these particular prominence (e.g. white on blue) if you want
the structure to be so glaringly obvious, whilst most keywords would
naturally retain a more moderate appearance.

Sadly, TextPad doesn't (yet) support text folding, an omission that I have
already asked be rectified. :-)

Regards,
Rick

; Syntax file for Occam2.1 - contributed by Rick Beton.
; This version issued 16.10.2000

C=1

[Syntax]
Namespace1 = 6
IgnoreCase = No
InitKeyWordChars = A-Za-z.
KeyWordChars = A-Za-z0-9.
OperatorChars = ;:+*=-/\,?!&<>~
BracketChars = ()[]
PreprocStart = #
HexPrefix = #
SyntaxStart =
SyntaxEnd =
CommentStart =
CommentEnd =
CommentStartAlt = 
CommentEndAlt = 
SingleComment = --
SingleCommentCol =
StringsSpanLines = Yes
StringStart = "
StringEnd = "
StringAlt =
StringEsc = *
CharStart = '
CharEnd = '
CharEsc = *

; main keywords
[Keywords 1]
ALT
ASM
CASE
FUNCTION
IF
INLINE
PAR
PLACED
PRI
PROC
RESULT
SEQ
VALOF
WHILE

; main keywords
[Keywords 2]
AT
ELSE
FOR
FROM
IS
PLACE
PORT
PROTOCOL
SKIP
STOP
VAL

; type and conversion keywords
[Keywords 3]
AFTER
AND
ANY
BITAND
BITNOT
BITOR
BOOL
BYTE
BYTESIN
CHAN
DATA
FALSE
INT
INT32
INT16
INT64
MINUS
MOSTNEG
MOSTPOS
NOT
PLUS
OF
OFFSETOF
OR
PACKED
REAL32
REAL64
RECORD
REM
RESHAPES
RETYPES
ROUND
SIZE
TIMER
TIMES
TRUE
TRUNC
TYPE

; Occam3 and extensions to occam2.1
; (comment these out if you don't want them showing up)
[Keywords 4]
BUCKET
CLAIM
ENROLL
EVENT
FALL
FLUSH
GRANT
INITIAL
RESOURCE
SEMAPHORE
SHARED
SYNC

; arithmetic & trigonometric functions
[Keywords 5]
LONGADD
LONGSUB
ASHIFTRIGHT
ASHIFTLEFT
ROTATERIGHT
ROTATELEFT
LONGSUM
LONGDIFF
LONGPROD
LONGDIV
SHIFTLEFT
SHIFTRIGHT
NORMALISE
ABS
DABS
SCALEB
DSCALEB
COPYSIGN
DCOPYSIGN
SQRT
DSQRT
MINUSX
DMINUSX
NEXTAFTER
DNEXTAFTER
MULBY2
DMULBY2
DIVBY2
DDIVBY2
LOGB
DLOGB
ISNAN
DISNAN
NOTFINITE
DNOTFINITE
ORDERED
DORDERED
FLOATING.UNPACK
DFLOATING.UNPACK
ARGUMENT.REDUCE
DARGUMENT.REDUCE
FPINT
DFPINT
REAL32OP
REAL64OP
IEEE32OP
IEEE64OP
REAL32REM
REAL64REM
IEEE32REM
IEEE64REM
REAL32EQ
REAL64EQ
REAL32GT
REAL64GT
IEEECOMPARE
DIEEECOMPARE
ALOG
DALOG
ALOG10
DALOG10
EXP
DEXP
TAN
DTAN
SIN
DSIN
ASIN
DASIN
COS
DCOS
SINH
DSINH
COSH
DCOSH
TANH
DTANH
ATAN
DATAN
ATAN2
DATAN2
RAN
DRAN
POWER
DPOWER

; basic data conversion functions
[Keywords 6]
INTTOSTRING
INT16TOSTRING
INT32TOSTRING
INT64TOSTRING
STRINGTOINT
STRINGTOINT16
STRINGTOINT32
STRINGTOINT64
HEXTOSTRING
HEX16TOSTRING
HEX32TOSTRING
HEX64TOSTRING
STRINGTOHEX
STRINGTOHEX16
STRINGTOHEX32
STRINGTOHEX64
STRINGTOREAL32
STRINGTOREAL64
REAL32TOSTRING
REAL64TOSTRING
STRINGTOBOOL
BOOLTOSTRING
RESCHEDULE
ASSERT

[Preprocessor keywords]
#INCLUDE
#USE
#OPTION
#PRAGMA
#COMMENT

begin:vcard 
n:Beton;Richard
tel;pager:ICQ: 56840977
tel;cell:MSN/Hotmail: richardbeton@xxxxxxxxxxx
tel;fax:01794 833434
tel;work:01794 833458
x-mozilla-html:TRUE
url:http://www.beton.freeserve.co.uk/
org:Roke Manor Research Limited;Internet Technology & Networks
adr:;;Roke Manor: http://www.roke.co.uk/;;;SO51 0ZN;UK
version:2.1
email;internet:richard.beton@xxxxxxxxxx
title:Internet Consultant
note;quoted-printable:The information contained in this e-mail is confidential and must =0D=0Anot be passed to any third party without permission. This =0D=0Acommunication is for information only and shall not create =0D=0Aor change any contractual relationship. =0D=0A
fn:Rick Beton
end:vcard