[rkward-cvs] rkward/rkward r.xml,1.14,1.15
Thomas Friedrichsmeier
tfry at users.sourceforge.net
Tue Sep 12 16:06:23 UTC 2006
Update of /cvsroot/rkward/rkward/rkward
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv3292
Modified Files:
r.xml
Log Message:
Remove duplication using IncludeRules
Index: r.xml
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/r.xml,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** r.xml 12 Sep 2006 14:58:11 -0000 1.14
--- r.xml 12 Sep 2006 16:06:21 -0000 1.15
***************
*** 36,66 ****
<contexts>
<context attribute="Normal Text" lineEndContext="#stay" name="ctx0">
! <DetectChar attribute="String" context="string" char="""/>
! <keyword attribute="Control Structure" context="#stay" String="controls"/>
! <keyword attribute="Reserved Words" context="#stay" String="words"/>
! <Float attribute="Float" context="#stay"/>
! <Int attribute="Int" context="#stay"/>
! <RegExpr attribute="Keyword" context="#stay" String="[a-zA-Z_]+[a-zA-Z_\.0-9]*(?=[\s]*[(])"/>
! <RegExpr attribute="Keyword" context="#stay" String="\.[a-zA-Z_\.]+[a-zA-Z_\.0-9]*(?=[\s]*[(])"/>
! <RegExpr attribute="Keyword" context="parenthesis" String="\("/>
! <StringDetect attribute="Headline" context="Headline" String="##"/>
! <DetectChar attribute="Comment" context="Comment" char="#"/>
!
! <!-- The following three lines look worse than they are: If there are any other operators directly before or after -> and <-, this is a syntax error (expections: ->> and <<-) -->
! <RegExpr attribute="Error" context="#stay" String="([\+\-\*/\^\:\$~!&\|=>@^])([<]{1,2}\-|\-[>]{1,2})"/>
! <RegExpr attribute="Error" context="#stay" String="([<]{1,2}\-|\-[>]{1,2})([\+\-\*/\^\:\$~!&\|=<@])"/>
! <RegExpr attribute="Error" context="#stay" String="([<]{3}|[>]{3})"/>
! <RegExpr attribute="Assign" context="#stay" String="[<]{1,2}\-"/>
! <RegExpr attribute="Assign" context="#stay" String="\-[>]{1,2}"/>
! <!-- Much like above: Most other operators are forbidden around = -->
! <RegExpr attribute="Error" context="#stay" String="([\+\-\*/\^\:\$~&\|@^])="/>
! <RegExpr attribute="Error" context="#stay" String="=([\+\-\*/\^\:\$~!<>&\|@^])"/>
! <RegExpr attribute="Assign" context="#stay" String="=(?!=)"/>
! <!-- These operators are fine as long as they're followed by something else or end of line. Error otherwise -->
! <RegExpr attribute="Operator" context="#stay" String="(\+|\-|\*|/|<=|>=|={1,2}|\!=|\|{1,2}|&{1,2}|:{1,2}|\^|@|\$|~)((?!(\+|\-|\*|/|<=|>=|=|\!=|\||&|:|\^|@|\$|~))|$)"/>
! <RegExpr attribute="Error" context="#stay" String="(\+|\-|\*|/|<=|>=|={1,2}|\!=|\|{1,2}|&{1,2}|:{1,2}|\^|@|\$|~){2,}"/>
! <RegExpr attribute="Operator" context="#stay" String="%[^%]*%"/>
!
! <DetectChar attribute="Symbol" context="ctx0" char="{" beginRegion="Brace1" name="FoldingStart" />
<DetectChar attribute="Symbol" context="#pop" char="}" endRegion="Brace1" name="FoldingEnd" />
</context>
--- 36,41 ----
<contexts>
<context attribute="Normal Text" lineEndContext="#stay" name="ctx0">
! <IncludeRules context="CommonRules"/>
!
<DetectChar attribute="Symbol" context="#pop" char="}" endRegion="Brace1" name="FoldingEnd" />
</context>
***************
*** 70,74 ****
<DetectChar attribute="Keyword" context="#pop" char=")"/>
! <!-- The following are copied from the ctx0 context -->
<DetectChar attribute="String" context="string" char="""/>
<keyword attribute="Control Structure" context="#stay" String="controls"/>
--- 45,63 ----
<DetectChar attribute="Keyword" context="#pop" char=")"/>
! <RegExpr attribute="Identifier" context="#stay" String="[a-zA-Z_\.][0-9a-zA-Z_\.]*[\s]*=(?=[^=])"/>
!
! <IncludeRules context="CommonRules"/>
! </context>
!
! <context attribute="String" lineEndContext="#stay" name="string">
! <DetectChar attribute="String" context="#pop" char="""/>
! <HlCStringChar attribute="String Char" context="#stay"/>
! </context>
!
! <context attribute="Headline" lineEndContext="#pop" name="Headline"/>
! <context attribute="Comment" lineEndContext="#pop" name="Comment"/>
!
! <!-- This context is not really used, but contains the common rules -->
! <context name="CommonRules">
<DetectChar attribute="String" context="string" char="""/>
<keyword attribute="Control Structure" context="#stay" String="controls"/>
***************
*** 81,85 ****
<StringDetect attribute="Headline" context="Headline" String="##"/>
<DetectChar attribute="Comment" context="Comment" char="#"/>
!
<!-- The following three lines look worse than they are: If there are any other operators directly before or after -> and <-, this is a syntax error (expections: ->> and <<-) -->
<RegExpr attribute="Error" context="#stay" String="([\+\-\*/\^\:\$~!&\|=>@^])([<]{1,2}\-|\-[>]{1,2})"/>
--- 70,74 ----
<StringDetect attribute="Headline" context="Headline" String="##"/>
<DetectChar attribute="Comment" context="Comment" char="#"/>
!
<!-- The following three lines look worse than they are: If there are any other operators directly before or after -> and <-, this is a syntax error (expections: ->> and <<-) -->
<RegExpr attribute="Error" context="#stay" String="([\+\-\*/\^\:\$~!&\|=>@^])([<]{1,2}\-|\-[>]{1,2})"/>
***************
*** 91,114 ****
<RegExpr attribute="Error" context="#stay" String="([\+\-\*/\^\:\$~&\|@^])="/>
<RegExpr attribute="Error" context="#stay" String="=([\+\-\*/\^\:\$~!<>&\|@^])"/>
! <!-- no traditional assignment with "=" inside parentheses! See "Identifier below" -->
<!-- These operators are fine as long as they're followed by something else or end of line. Error otherwise -->
<RegExpr attribute="Operator" context="#stay" String="(\+|\-|\*|/|<=|>=|={1,2}|\!=|\|{1,2}|&{1,2}|:{1,2}|\^|@|\$|~)((?!(\+|\-|\*|/|<=|>=|=|\!=|\||&|:|\^|@|\$|~))|$)"/>
<RegExpr attribute="Error" context="#stay" String="(\+|\-|\*|/|<=|>=|={1,2}|\!=|\|{1,2}|&{1,2}|:{1,2}|\^|@|\$|~){2,}"/>
<RegExpr attribute="Operator" context="#stay" String="%[^%]*%"/>
!
<DetectChar attribute="Symbol" context="ctx0" char="{" beginRegion="Brace1" name="FoldingStart" />
- <!-- no need to define brace end here, as we've already jumped to ctx0 at the brace start -->
-
- <RegExpr attribute="Identifier" context="#stay" String="[a-zA-Z_\.][0-9a-zA-Z_\.]*[\s]*=(?=[^=])"/>
- </context>
-
- <context attribute="String" lineEndContext="#stay" name="string">
- <DetectChar attribute="String" context="#pop" char="""/>
- <HlCStringChar attribute="String Char" context="#stay"/>
</context>
-
- <context attribute="Headline" lineEndContext="#pop" name="Headline"/>
- <context attribute="Comment" lineEndContext="#pop" name="Comment"/>
-
</contexts>
--- 80,92 ----
<RegExpr attribute="Error" context="#stay" String="([\+\-\*/\^\:\$~&\|@^])="/>
<RegExpr attribute="Error" context="#stay" String="=([\+\-\*/\^\:\$~!<>&\|@^])"/>
! <RegExpr attribute="Assign" context="#stay" String="=(?!=)"/>
!
<!-- These operators are fine as long as they're followed by something else or end of line. Error otherwise -->
<RegExpr attribute="Operator" context="#stay" String="(\+|\-|\*|/|<=|>=|={1,2}|\!=|\|{1,2}|&{1,2}|:{1,2}|\^|@|\$|~)((?!(\+|\-|\*|/|<=|>=|=|\!=|\||&|:|\^|@|\$|~))|$)"/>
<RegExpr attribute="Error" context="#stay" String="(\+|\-|\*|/|<=|>=|={1,2}|\!=|\|{1,2}|&{1,2}|:{1,2}|\^|@|\$|~){2,}"/>
<RegExpr attribute="Operator" context="#stay" String="%[^%]*%"/>
!
<DetectChar attribute="Symbol" context="ctx0" char="{" beginRegion="Brace1" name="FoldingStart" />
</context>
</contexts>
More information about the rkward-tracker
mailing list