#-------------------------------------------------------------------------------
#
#	Name    : MkDrawf
#	Purpose : Display MkDrawf scripts
#	Author  :  StrongED Developers
#	Licence : Freeware
#	Version : 1.00, 14-11-2025
#
#-------------------------------------------------------------------------------
# Changes:
#-------------------------------------------------------------------------------
# 15-11-25 FG initial version (created using the v3.10 MkDrawf manual)
#-------------------------------------------------------------------------------


ID_FirstChar A-Za-z
ID_Middle A-Za-z_0-9

Search
	macro		{'A-Za-z_0-9'} @9 {" "} "["
	object		@9 {" "} "{"
End

SyntaxOptions
	SingleQuote	Yes
	DoubleQuote	Yes
	QuoteQuote	No
	SplitString	No
	HexPrefix	0x
	Numbers		int
	Functions	None
End

SyntaxComment 1
	CommentType	OneLine
	StartWhere	Anywhere
	StartWith	#
End

# global variables
SyntaxWords Group1 EndOfID
	$
End

# Macro parameters
SyntaxWords Group2 EndOfID
	%
End

# Macro names
SyntaxWords Group3 NoCase EndOfExpr2 macro
	a b c d e f g h i j k l m
	n o p q r s t u v w x y z
End

# Object types
SyntaxWords Group4 NoCase EndOfExpr2 object
	FontTable
	Group
	Header
	JPEG
	Options
	Path
	Sprite
	Tagged
	Text
	TextArea
	TextColumn
	XfSprite
	XfText
End

# Object items
SyntaxWords Group5 NoCase EndAlways
	Arc
	Background
	Bevelled
	BoundingBox
	Butt
	CapLength
	CapWidth
	CentreAt
	CentreIn
	Close
	ClosedCurve
	ClosedLine
	Colour
	Column
	Creator
	Curve
	Dash
	DPI
	Ellips
	EndCap
	EvenOdd
	FillColour
	Font
	FromFile
	HCentreIn
	HCentreOn
	Identifier
	Line
	Matrix
	Mitred
	Move
	Name
	NonZero
	Offset
	OutlineColour
	Pattern
	RCurve
	Rectangle
	RightToLeft
	RLine
	RMove
	Round
	Side
	Size
	Square
	StartAt
	StartCap
	Style
	" Text"
	Triangular
	Version
	Virtual
	Width
	WindingRule
	XText
End

# Definitions
SyntaxWords Group6 NoCase EndAlways
	Define
	Set
End

# Options
SyntaxWords Group7 NoCase EndAlways
#	AutoAdjust
#	Divisions
#	Grid
#	Inches
#	Isometric
#	Landscape
#	Limits
#	Lock
#	Mode
#	NonDefault
#	NoToolbox
#	PaperSize
#	Ratio
#	Shown
#	Spacing
#	UndoSize
#	Zoom
End

# Conditionals
SyntaxWords Group8 NoCase EndAlways
	IfExistsHere
	IfExists
	IfEqual
	IfLess
	Else
	EndIf
End

# Iteration
SyntaxWords Group9 NoCase EndAlways
	Do
	For
	From
	" In"
	Step
	To
End

# Arithmetic
SyntaxWords Group10 NoCase EndAlways
	Abs
	Ceiling
	Floor
	Sign

	Arccos
	Arcsin
	Arctan
	Arctan2
	Cos
	Sin
	Tan
	Sqrt
	Random
	ToThe

	Over
	Plus
	Minus
	Times
End

# File inclusion
SyntaxWords Group11 NoCase EndAlways
	Include
End

# Text stuff
SyntaxWords Group12 NoCase EndAlways
	Append
	GSTrans
	Num2Str
	Str2Num
End

# Named colours
SyntaxWords Group13 NoCase EndAlways
	none
	transparent
# Simple colours
	black
	white
	red
	green
	blue
# Wimp colours
	wimp_darkblue
	wimp_yellow  
	wimp_lightgreen
	wimp_red     
	wimp_beige   
	wimp_darkgreen
	wimp_orange  
	wimp_lightblue
End

# Units
SyntaxWords Group14 NoCase EndAlways
	cm
	in
	pt
	os
	sp
	mm
#
	Unit
	Units
# predefined vars
	$Centimetres
	$Inches
	$Millimetres
	$OSUnits
	$Points
	$ScaledPoints
End

