[rkward-cvs] SF.net SVN: rkward: [998] trunk/rkward/rkward/syntax

tfry at users.sourceforge.net tfry at users.sourceforge.net
Thu Dec 7 14:53:56 UTC 2006


Revision: 998
          http://svn.sourceforge.net/rkward/?rev=998&view=rev
Author:   tfry
Date:     2006-12-07 06:53:56 -0800 (Thu, 07 Dec 2006)

Log Message:
-----------
Also detect backquotes

Modified Paths:
--------------
    trunk/rkward/rkward/syntax/r-syntax-test.R
    trunk/rkward/rkward/syntax/r.xml
    trunk/rkward/rkward/syntax/rkward.xml

Modified: trunk/rkward/rkward/syntax/r-syntax-test.R
===================================================================
--- trunk/rkward/rkward/syntax/r-syntax-test.R	2006-12-07 14:44:52 UTC (rev 997)
+++ trunk/rkward/rkward/syntax/r-syntax-test.R	2006-12-07 14:53:56 UTC (rev 998)
@@ -45,6 +45,11 @@
 
 x <- 1
 print ("hi", quote=(x==1))
+
+# quotes:
 cat ("normal quote", 'single quoted', "with escapes \"\'", 'with escapes 2 \'\"')
+`backquoted symbol name` <- 1
+"backquoted symbol name"	# This will print the string
+`backquoted symbol name`	# This will print the value (1)
 
 cat( "\nNo Errors!\n" )

Modified: trunk/rkward/rkward/syntax/r.xml
===================================================================
--- trunk/rkward/rkward/syntax/r.xml	2006-12-07 14:44:52 UTC (rev 997)
+++ trunk/rkward/rkward/syntax/r.xml	2006-12-07 14:53:56 UTC (rev 998)
@@ -63,6 +63,11 @@
 			<DetectChar attribute="String" context="#pop" char="'"/>
 			<HlCStringChar attribute="String Char" context="#stay"/>
 		</context>
+		
+		<context attribute="Identifier" lineEndContext="#stay" name="backquotedsymbol">
+			<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"/>
@@ -71,6 +76,7 @@
 		<context name="CommonRules" lineEndContext="#stay" attribute="Normal Text" >
 			<DetectChar attribute="String" context="string" char="""/>
 			<DetectChar attribute="String" context="string" char="'"/>
+			<DetectChar attribute="String" context="backquotedsymbol" char="`"/>
 			<keyword attribute="Control Structure" context="#stay" String="controls"/>
 			<keyword attribute="Reserved Words" context="#stay" String="words"/>
 			<Float attribute="Float" context="#stay"/>

Modified: trunk/rkward/rkward/syntax/rkward.xml
===================================================================
--- trunk/rkward/rkward/syntax/rkward.xml	2006-12-07 14:44:52 UTC (rev 997)
+++ trunk/rkward/rkward/syntax/rkward.xml	2006-12-07 14:53:56 UTC (rev 998)
@@ -77,6 +77,11 @@
 			<HlCStringChar attribute="String Char" context="#stay"/>
 		</context>
 
+		<context attribute="Identifier" lineEndContext="#stay" name="backquotedsymbol">
+			<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"/>
 
@@ -93,6 +98,7 @@
 		<context attribute="Normal Text" name="CommonRules" lineEndContext="#stay">
 			<DetectChar attribute="String" context="string" char="""/>
 			<DetectChar attribute="String" context="string" char="'"/>
+			<DetectChar attribute="String" context="backquotedsymbol" char="`"/>
 			<keyword attribute="Control Structure" context="#stay" String="controls"/>
 			<keyword attribute="Reserved Words" context="#stay" String="words"/>
 			<Float attribute="Float" context="#stay"/>


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list