Menu

[9a052e]: / syntax / rexx.jsf  Maximize  Restore  History

Download this file

82 lines (69 with data), 1.1 kB

# JOE syntax highlight file for REXX

=Idle
=Bad		bold red
=Comment 	green
=Constant 	cyan
=Escape 	bold cyan
=Keyword 	bold

:idle Idle
	*			idle
	"\""			dquote recolor=-1
	"'"			squote recolor=-1
	"a-zA-Z.!?@_0-9"	symbol buffer
	"/"			idle call=.maybe_comment()

:symbol Idle
	*			idle noeat istrings
	"address"	kw
	"arg"		kw
	"call"		kw
	"do"		kw
	"drop"		kw
	"exit"		kw
	"if"		kw
	"interpret"	kw
	"iterate"	kw
	"leave"		kw
	"nop"		kw
	"numeric"	kw
	"options"	kw
	"parse"		kw
	"procedure"	kw
	"pull"		kw
	"push"		kw
	"queue"		kw
	"return"	kw
	"say"		kw
	"select"	kw
	"signal"	kw
	"trace"		kw
	"upper"		kw
	"then"		kw
	"end"		kw
	"else"		kw
	"when"		kw
	"otherwise"	kw
done
	"a-zA-Z.!?@_0-9"	symbol

:kw Keyword
	*		idle noeat

:squote Constant
	*	squote
	"'"	idle

:dquote Constant
	*	dquote
	"\""	idle

#
# Subroutine to parse recursive /* */ comments
#

.subr maybe_comment

:maybe_comment Idle
	*		maybe_comment return noeat
	"*"		comment recolor=-2

:comment Comment
	*	comment
	"*"	maybe_done
	"/"	comment call=.maybe_comment()

:maybe_done Comment
	*	comment noeat
	"/"	comment	return

.end
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.