My settings for parsing Perl modules based on C++ icons.
<Language name="Perl" imagelistpath="C:\Program Files\Notepad++\plugins\config\C++.flb"> <CommList param1="#" param2="" /> <Group name="PACKAGE" subgroup="" icon="2" child="9" autoexp="4" matchcase="1" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg="\<package\s+" regexfunc="+" regexend="\>;" bodybegin="" bodyend="" sep="" /> </Group> <Group name="USE" subgroup="" icon="4" child="11" autoexp="4" matchcase="1" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg="\<use\s+" regexfunc="+" regexend="" bodybegin="" bodyend=";" sep="" /> </Group> <Group name="SUB" subgroup="" icon="6" child="12" autoexp="4" matchcase="1" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg="\<sub\s+" regexfunc='+\s***' regexend="" bodybegin="\{" bodyend="\}" sep="" /> </Group> </Language>
And small addition to parse Template::Toolkit files. Made in HTML parsing rules
<Language name="HTML" imagelistpath="C:\Program Files\Notepad++\plugins\config\C++.flb"> <CommList param1="#" param2="" /> <Group name="TT" subgroup="" icon="4" child="9" autoexp="4" matchcase="1" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg='\<PROCESS\s+"*' regexfunc="+" regexend="\>" bodybegin="" bodyend="\s" sep="" /> <Rules regexbeg="\<INCLUDE\s+" regexfunc="+" regexend="\>" bodybegin="" bodyend="\s" sep="" /> </Group> <Group name="CSS" subgroup="" icon="4" child="15" autoexp="4" matchcase="1" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg='<link\s.+\shref="' regexfunc="+" regexfunc='+' regexend="\s*\(.*\)" bodybegin="\{" bodyend="\}" sep=";" /> <Rules regexbeg="^\s*" regexfunc='+' regexend="\s*\s*function\s*\(*\)" bodybegin="\{" bodyend="\}" sep=";" /> <Rules regexbeg="^\s*var\s*" regexfunc='+' regexend="\s*\s*function\s*\(*\)" bodybegin="\{" bodyend="\}" sep=";" /> </Group> <Group name="MACRO" subgroup="" icon="7" child="14" autoexp="4" matchcase="1" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg="\<MACRO\s+" regexfunc="+" regexend="\>" bodybegin="+" bodyend="END" sep="" /> </Group> </Language>
I merged your perl rules with my "extended" perl rules. The main extensions are:
Own group for parsing variables (VAL)
Variables are used within their scope (each SUB has a subgroup VAL - showing local variables within the SUB)
Here it is:
<Language name="Perl" imagelistpath="C:\Programme\NotePad++\plugins\Config\C++.flb"> <CommList param1="#" param2="" /> <CommList param1="'" param2="'" /> <CommList param1='"' param2='"' /> <Group name="PACKAGE" subgroup="" icon="2" child="9" autoexp="4" matchcase="1" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg="\<package\s+" regexfunc="[\w_:]+" regexend="\>;" bodybegin="" bodyend="" sep="" /> </Group> <Group name="USE" subgroup="" icon="4" child="4" autoexp="0" matchcase="0" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg="use\s+constant\s+" regexfunc="[\w_:]+" regexend="[^\w_:]+" bodybegin="" bodyend="$" sep="" /> <Rules regexbeg="use\s+" regexfunc="[\w_:]+" regexend="[^\w_:]+" bodybegin="" bodyend="$" sep="" /> <Rules regexbeg="\<use\s+" regexfunc="[\w_:\s\(\)]+" regexend="" bodybegin="" bodyend=";" sep="" /> </Group> <Group name="VAL" subgroup="" icon="15" child="15" autoexp="0" matchcase="0" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg="my\s*\(" regexfunc="[$@\%\w,\s]*" regexend=".*[;=\)]" bodybegin="" bodyend="$" sep="\s*[,]+\s*" /> <Rules regexbeg="my\s*" regexfunc="[$@\%]\w*" regexend=".*[\(;=]" bodybegin="" bodyend="$" sep="" /> <Rules regexbeg="our\s*\(" regexfunc="[$@\%\w,\s]*" regexend=".*[;=\)]" bodybegin="" bodyend="$" sep="\s*[,]+\s*" /> <Rules regexbeg="our\s*" regexfunc="[$@\%]\w*" regexend=".*[\(;=]" bodybegin="" bodyend="$" sep="" /> </Group> <Group name="SUB" subgroup="VAL" icon="9" child="9" autoexp="4" matchcase="1" fendtobbeg="" bbegtobend="\{" keywords=""> <Rules regexbeg="\<sub\s+" regexfunc='[\w_]+\s*[\(\$\%\@\)]*[\w_\s\(\),'"\.\:]*' regexend="" bodybegin="\{" bodyend="\}" sep="" /> </Group> </Language>
I like it, thanks :)
would update:
<Rules regexbeg="my\s*\("
to
<Rules regexbeg="my\s*\(\s*"
to allow spaces after the '('. Same to
<Rules regexbeg="our\s*\(\s*"
… otherwise this rule set is great. Please include in default xml !!
Log in to post a comment.
My settings for parsing Perl modules based on C++ icons.
And small addition to parse Template::Toolkit files.
Made in HTML parsing rules
I merged your perl rules with my "extended" perl rules.
The main extensions are:
Own group for parsing variables (VAL)
Variables are used within their scope (each SUB has a subgroup VAL - showing local variables within the SUB)
Here it is:
I like it, thanks :)
would update:
to
to allow spaces after the '('.
Same to
…
otherwise this rule set is great. Please include in default xml !!