|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
Post be5 patches: Perl variablesAll, attached is a patch for be5 for perl variables highlighting:
http://svn.sourceforge.net/viewvc/colorer?view=rev&revision=847 should be applied for src/hrc/perl/ but can be also applied directly to hrc/base/perl* -- Igor [perl-vars.patch] Index: src/perl-vars.internal.hack.ent.hrc =================================================================== --- src/perl-vars.internal.hack.ent.hrc (revision 846) +++ src/perl-vars.internal.hack.ent.hrc (revision 847) @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="windows-1251"?> -<!-- -<entity name="var" value="[$@%*&]"/> -<entity name="var" value="[$@]"/> ---> - -<entity name="varl" value="%var;[\$\#]*"/> - -<entity name="name" value="([A-Za-z_'][\dA-Za-z_']*\b|::)" /> -<entity name="endbr" value="[\]\}]?#1(\s*[\{\[])?!"/> - - -<scheme name="vars"> - <block start="/(%varl;\s*\M\{ [^"]*\})/x" end="/%endbr;/" - scheme="perl:VarBrakEx" - region00="perl:Var" region01="def:PairStart" - /> - <block start="/%varl;%name;+\s*\M[\{\[] [^"]*[\]\}]/x" end="/%endbr;/" - scheme="perl:VarBrak" region00="perl:Var" - /> - <block start="/(->)?#2\s*\M[\{\[] [^"]*[\]\}]/x" end="/%endbr;/" - scheme="perl:VarBrak" - /> - <regexp match="/(&)?!%varl;%name;+/" region="perl:Var" priority="low"/> -</scheme> - Index: src/perl-vars.pkg.hrc =================================================================== --- src/perl-vars.pkg.hrc (revision 0) +++ src/perl-vars.pkg.hrc (revision 847) @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="windows-1251"?> +<!DOCTYPE hrc PUBLIC "-//Cail Lomecb//DTD Colorer HRC take5//EN" + "http://colorer.sf.net/2003/hrc.dtd"[ +<!ENTITY perl-vars-pkg SYSTEM "perl-vars.pkg.ent.hrc"> + +]> + +<hrc version="take5" xmlns="http://colorer.sf.net/2003/hrc" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd" + > + +<!-- hack for string interpolation vars - using XML entities --> + +<type name="perl-vars"> + <entity name="var" value="[$@%*&]"/> + + &perl-vars-pkg; +</type> + +<type name="perl-vars-ex"> + <entity name="var" value="[$@]"/> + + &perl-vars-pkg; +</type> + + +</hrc> \ No newline at end of file Index: src/perl-vars.ent.hrc =================================================================== --- src/perl-vars.ent.hrc (revision 846) +++ src/perl-vars.ent.hrc (revision 847) @@ -62,14 +62,14 @@ <scheme name="Vars"> <inherit scheme="BuildinVars"/> <inherit scheme="BuildinConst"/> - <inherit scheme="perl-vars.internal.hack:vars"/> + <inherit scheme="perl-vars:vars"/> </scheme> <scheme name="VarsEx"> <inherit scheme="BuildinVars"/> - <inherit scheme="perl-vars-ex.internal.hack:vars"/> + <inherit scheme="perl-vars-ex:vars"/> </scheme> <!--Conetnt Index: src/perl-vars.pkg.ent.hrc =================================================================== --- src/perl-vars.pkg.ent.hrc (revision 0) +++ src/perl-vars.pkg.ent.hrc (revision 847) @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="windows-1251"?> +<!-- +<entity name="var" value="[$@%*&]"/> +<entity name="var" value="[$@]"/> +--> + +<entity name="varl" value="%var;[\$\#]*"/> + +<entity name="name" value="([A-Za-z_'][\dA-Za-z_']*\b|::)" /> +<entity name="endbr" value="[\]\}]?#1(\s*[\{\[])?!"/> + + +<scheme name="vars"> + <block start="/(%varl;\s*\M\{ [^"]*\})/x" end="/%endbr;/" + scheme="perl:VarBrakEx" + region00="perl:Var" region01="def:PairStart" + /> + <block start="/%varl;%name;+\s*\M[\{\[] [^"]*[\]\}]/x" end="/%endbr;/" + scheme="perl:VarBrak" region00="perl:Var" + /> + <block start="/(->)?#2\s*\M[\{\[] [^"]*[\]\}]/x" end="/%endbr;/" + scheme="perl:VarBrak" + /> + <regexp match="/(&)?!%varl;%name;+/" region="perl:Var" priority="low"/> +</scheme> + Property changes on: src\perl-vars.pkg.ent.hrc ___________________________________________________________________ Name: svn:eol-style + native Name: svn:executable + * Name: svn:keywords + Author Date Id Revision Index: src/perl.hrc =================================================================== --- src/perl.hrc (revision 846) +++ src/perl.hrc (revision 847) @@ -2,8 +2,7 @@ <!DOCTYPE hrc PUBLIC "-//Cail Lomecb//DTD Colorer HRC take5//EN" "http://colorer.sf.net/2003/hrc.dtd"[ <!ENTITY perl-brackets SYSTEM "perl-brackets.ent.hrc"> -<!ENTITY perl-vars SYSTEM "perl-vars.ent.hrc"> -<!ENTITY perl-internal-hack SYSTEM "perl-vars.internal.hack.ent.hrc"> +<!ENTITY perl-vars SYSTEM "perl-vars.ent.hrc"> <!ENTITY perl-heredoc SYSTEM "perl-heredoc.ent.hrc"> <!ENTITY perl-keywords SYSTEM "perl-keywords.ent.hrc"> @@ -15,24 +14,14 @@ > -<!-- hack for string interpolation vars --> - -<package name="perl-vars.internal.hack"/> -<package name="perl-vars-ex.internal.hack"/> +<package name="perl-vars-ex"> + <location link="perl-vars.pkg.hrc"/> +</package> +<package name="perl-vars"> + <location link="perl-vars.pkg.hrc"/> +</package> -<type name="perl-vars.internal.hack"> - <entity name="var" value="[$@%*&]"/> - - &perl-internal-hack; -</type> -<type name="perl-vars-ex.internal.hack"> - <entity name="var" value="[$@]"/> - - &perl-internal-hack; -</type> - - <type name="perl"> <annotation> @@ -94,9 +83,6 @@ </appinfo> </annotation> - <!-- EE: namespase modifed, import not need. - import type="def"/ --> - <region name="String" parent="def:String"/> <region name="StringEdge" parent="regexp:SpecQuote"/> <region name="Comment" parent="def:Comment"/> @@ -123,7 +109,6 @@ <region name="DataOutline" parent="def:Outlined"/> <region name="PodOutline" parent="def:Outlined"/> - <!-- EE: new regions --> <region name="EvalText" parent="def:default"/> <region name="ReModif" parent="regexp:SpecArea"/> <region name="ReType" parent="Word"/><!-- StringEdge--> @@ -134,7 +119,7 @@ <region name="FormatDoc" parent="HereDoc"/> <region name="Warning" parent="def:DeprecatedKeyword"/> - <!-- EE Note: This region insert ` ` strings (system commands) + <!-- Note: This region insert ` ` strings (system commands) If you don't want it, change "def:Insertion" to "String" --> <region name="SystemExec" parent="def:Insertion"/> @@ -164,7 +149,7 @@ <regexp match="/\\['\\\/]/" region0="Slash"/> </scheme> - <!-- EE: New schemes: strings for blocks --> + <!-- New schemes: strings for blocks --> <scheme name="ClassString"> <inherit scheme="String"/> <inherit scheme="regexp:perl.string"/> @@ -194,7 +179,7 @@ <regexp match="/\\[^xX0-7]/" region0="Slash"/> </scheme> - <!-- EE: sprintf support - not conflict with hash now... --> + <!-- sprintf support - not conflict with hash now... --> <entity name="pfn" value="(?{Var}\d+\$)?"/> <entity name="sf" value="(\d+|(?{Symb}\*)%pfn;)"/> <scheme name="PrintfString"> @@ -230,7 +215,7 @@ <inherit scheme="SubstComment"/> </scheme> - <!--EE: regexps --> + <!-- regexps --> <scheme name="RegExpString"> <inherit scheme="regexp:perl.regexp"> <virtual scheme="regexp:string" subst-scheme="StringForRegExp"/> @@ -366,7 +351,7 @@ --> -<!-- EE: move ~ to separated block (s{}{/... - '/' no regexp ) --> +<!-- move ~ to separated block (s{}{/... - '/' no regexp ) --> <block start="/((\=|\! \~) | [^<\]\}\)\+\-\w\s\/] | (\bif) | (\bunless) | (\bsplit) | (\bor) | grep |^ ) @@ -386,16 +371,6 @@ region03="StringEdge" region04="def:PairStart" region10="StringEdge" region11="def:PairEnd" region12="ReModif"/> - <!-- EE!! cut here (begin) -> - <block start="/( [\=\!]\~ | - [^<\]\}\)\+\-\w\s\/] | - \bif | \bunless | \bsplit | ~ | ^) - \s* ((\/)) /x" - end="/(\y2[cmiogxes]*)/x" scheme="RegExpString" - region="String" region01="Symb" region02="StringEdge" - region03="def:PairStart" region10="StringEdge" region11="def:PairEnd"/> - <!- EE!! cut here (end) --> - <!-- formatted output --> <block start="/^\s* \m (format)\s*(\s\w*)\s*(\=) /x" end="/^(\.)/" scheme="FormatText" region="FormatDoc" @@ -424,7 +399,7 @@ <annotation><documentation> - cail: regexps + in reallity s'foo'bar' does no interpolation - but i thing this isn't so important :) currently this subst will not work in such cases: @@ -437,15 +412,12 @@ }ix; but i think this is real perversion :) - EE: next included scheme - was created by my script 'bracket.xml' + The next included scheme was created by my script 'bracket.xml' </documentation></annotation> <inherit scheme="bracket"/> - - <!-- operators --> <keywords region="Symb" worddiv="[\s\W\d]"> <word name="x"/> @@ -494,9 +466,9 @@ </keywords> <inherit scheme="Keywords"/> - <!-- EE: labels --> + <!-- labels --> <regexp match="/^\s*(\w+\:)\M(\s|$)/" region1="def:Label"/> -<!-- Timur: hack against Ada maniacs --> + <!-- Against Ada maniacs --> <regexp match="/\c(&|\w+)'[\w_']+\b/" region0="WordExt"/> </scheme> @@ -505,6 +477,7 @@ <!-- &perl-genkeywords--> </type> + </hrc> <!-- ***** BEGIN LICENSE BLOCK ***** - Version: MPL 1.1/GPL 2.0/LGPL 2.1 Index: build.xml =================================================================== --- build.xml (revision 846) +++ build.xml (revision 847) @@ -32,8 +32,8 @@ <target name="hrc.check"> <dependset> - <srcfilelist dir="${src}" files = "perl.hrc, *.ent.hrc"/> - <targetfilelist dir="${bin}" files="perl.hrc, *.ent.hrc" /> + <srcfilelist dir="${src}" files = "perl*.hrc"/> + <targetfilelist dir="${bin}" files="perl*.hrc" /> </dependset> </target> @@ -41,7 +41,7 @@ <target name="hrc" depends="hrc.check, bkt"> <copy todir='${bin}'> - <fileset dir='${src}' includes='perl.hrc, *.ent.hrc'/> + <fileset dir='${src}' includes='perl*.hrc'/> </copy> </target> ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ colorer-talks mailing list colorer-talks@... https://lists.sourceforge.net/lists/listinfo/colorer-talks |
| Free Forum Powered by Nabble | Forum Help |