[rkward-cvs] rkward/rkward rkward.xml,1.4,1.5

Thomas Friedrichsmeier tfry at users.sourceforge.net
Tue Sep 12 16:37:42 UTC 2006


Update of /cvsroot/rkward/rkward/rkward
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15868

Modified Files:
	rkward.xml 
Log Message:
Port changes in r.xml, common mechanism for continuation detection

Index: rkward.xml
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkward.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** rkward.xml	12 Sep 2006 15:48:59 -0000	1.4
--- rkward.xml	12 Sep 2006 16:37:40 -0000	1.5
***************
*** 39,77 ****
  			<RegExpr attribute="Normal Text" context="output" String="^." lookAhead="true"/>
  
! 			<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="%[^%]*%"/>
  		</context>
  
  
! 		<context attribute="In Parenthesis" lineEndContext="#stay" name="parenthesis">
  			<Detect2Chars attribute="Normal Text" context="#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop" firstNonSpace="true" char=">" char1=" " lookAhead="true"/>
  			<Detect2Chars attribute="Normal Text" context="#stay" firstNonSpace="true" char="+" char1=" "/>
! 			<LineContinue attribute="Boolean" context="#stay"/>
! 			<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"/>
--- 39,76 ----
  			<RegExpr attribute="Normal Text" context="output" String="^." lookAhead="true"/>
  
! 			<IncludeRules context="CommonRules"/>
! 		</context>
! 
! 		<context attribute="In Parenthesis" lineEndContext="#stay" name="parenthesis">
! 			<IncludeRules context="CommandContinuationCheck"/>
! 			<LineContinue attribute="Boolean" context="#stay"/>
! 			<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">
! 			<IncludeRules context="CommandContinuationCheck"/>
! 			<DetectChar attribute="String" context="#pop" char="""/>
! 			<HlCStringChar attribute="String Char" context="#stay"/>
  		</context>
  
+ 		
+ 		<context attribute="Output" lineEndContext="#stay" name="output">
+ 			<Detect2Chars attribute="Normal Text" context="#pop" lookAhead="true" firstNonSpace="true" char=">" char1=" "/>
+ 		</context>
+ 		<context attribute="Headline" lineEndContext="#pop" name="Headline"/>
+ 		<context attribute="Comment" lineEndContext="#pop" name="Comment"/>
  
! 		<!-- This context is not really used, but meant to be included. It checks whether a new line is a continuation of a command. If so, it eats the "+ " at the line start. Else it tries to pop back to the top level -->
! 		<context attribute="Normal Text" name="CommandContinuationCheck">
  			<Detect2Chars attribute="Normal Text" context="#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop" firstNonSpace="true" char=">" char1=" " lookAhead="true"/>
  			<Detect2Chars attribute="Normal Text" context="#stay" firstNonSpace="true" char="+" char1=" "/>
! 		</context>
  
! 		<!-- 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"/>
***************
*** 94,118 ****
  			<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="%[^%]*%"/>
- 
- 			<RegExpr attribute="Identifier" context="#stay" String="[a-zA-Z_\.][0-9a-zA-Z_\.]*[\s]*=(?=[^=])"/>
- 		</context>
- 
- 		<context attribute="String" lineEndContext="#stay" name="string">
- 			<Detect2Chars attribute="Normal Text" context="#pop#pop" firstNonSpace="true" char=">" char1=" " lookAhead="true"/>
- 			<Detect2Chars attribute="Normal Text" context="#stay" firstNonSpace="true" char="+" char1=" "/>
- 			<DetectChar attribute="String" context="#pop" char="""/>
- 			<HlCStringChar attribute="String Char" context="#stay"/>
  		</context>
  
- 		<context attribute="Output" lineEndContext="#stay" name="output">
- 			<Detect2Chars attribute="Normal Text" context="#pop" lookAhead="true" firstNonSpace="true" char=">" char1=" "/>
- 		</context>
- 		<context attribute="Headline" lineEndContext="#pop" name="Headline"/>
- 		<context attribute="Comment" lineEndContext="#pop" name="Comment"/>
  	</contexts>
  
--- 93,104 ----
  			<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="%[^%]*%"/>
  		</context>
  
  	</contexts>
  





More information about the rkward-tracker mailing list