#-------------------------------------------------------------------------------
#
#	Name    : PHP
#	Purpose : StrongED mode file for PHP files
#	Author  :  Alex Waugh (alex@alexwaugh.com)
#	Licence : Freeware
#	Version : 0.03, 01-12-03
#
#-------------------------------------------------------------------------------


HelpPath	PHP,


ID_FirstChar	A-Za-z_
ID_Middle	A-Za-z_0-9
#ID_LastChar

Search
	_phpfunc	[_spct] "function" _spct   @0 { AD | "_" }+ @9
	_endofphp	@0 * @9 ("?>" | "%>")
	_endofline	@0 * (.>) @9
	_endofcomment	_endofphp | _endofline
	_endofhtmltag	* ">"
End


SyntaxOptions
	SingleQuote	Yes
	DoubleQuote	Yes
	QuoteChar	\
	QuoteQuote	No
	SplitString	Yes
	HexPrefix	0x
End

SyntaxComment 1
	Type		Multiline
	StartWith	/*
	EndWith		*/
End

SyntaxComment 2
	Type		Multiline
	StartWith	<!--
	EndWith		-->
End


#More comments
SyntaxWords Group1 NoCase EndOfExpr _endofcomment
	//
	#
End

#HTML tags
SyntaxWords Group2 case EndOfExpr _endofhtmltag
	<
End

#Changes between HTML and PHP
SyntaxWords Group3 NoCase EndAlways
	<? ?>
	<?php
	<% %>
End

#Variables
SyntaxWords Group4 NoCase EndOfId
	$
End

#Language constructs
SyntaxWords Group5 NoCase StartSpace
	if else elseif endif
	do while endwhile
	for endfor
	break continue return
	switch endswitch case default
	echo
End

SyntaxWords Group6 StartSpace NoCase
	function
	require
	include
	require_once
	include_once
End

KeyList
	^F1	SetTmp() BroadcastURL("http://www.php.net/manual/en/function.<Tmp$Word>.php")
End

Functions

	Key	F2
	Menu	List of functions F2
	Icon	LoF
	Select	ListOfFound (_phpfunc,Text,Align,Line,Case)
	Help	Click to generate list of all functions.

	Key 	PgUp
	Icon	up
	Select	GotoPrev (_phpfunc,Text,Line,Case)
	Help	Click to go to previous function

	Key 	PgDown
	Icon	down
	Select	GotoNext (_phpfunc,Text,Line,Case)
	Help	Click to go to next function

	Key	F10
	Menu	Save & Run      F10
	Icon	Run
	Select	SetTmp() SaveDClick ("<tmp$path>.<tmp$leaf>")
	Help	Click to save text and run.

End

Shortcuts
	w.	while (\@) {\n\i	\@\n\i}
	d.	do {\n\i	\@\n\i} while ()
	f.	for (\@;\@;\@) {\n\i	\@\n\i}

End

