[rkward-cvs] SF.net SVN: rkward: [753] trunk/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Thu Sep 21 10:56:34 UTC 2006
Revision: 753
http://svn.sourceforge.net/rkward/?rev=753&view=rev
Author: tfry
Date: 2006-09-21 03:56:29 -0700 (Thu, 21 Sep 2006)
Log Message:
-----------
Some small refinements to the console highlighting
Modified Paths:
--------------
trunk/rkward/TODO
trunk/rkward/rkward/rkward.xml
Modified: trunk/rkward/TODO
===================================================================
--- trunk/rkward/TODO 2006-09-20 15:23:57 UTC (rev 752)
+++ trunk/rkward/TODO 2006-09-21 10:56:29 UTC (rev 753)
@@ -16,7 +16,6 @@
Compilation / technical
- Incorporate FreeBSD patches http://www.freshports.org/math/rkward/files.php?message_id=200609172111.k8HLBiob081349@repoman.freebsd.org
- - move to subversion
UI-stuff
"First-run wizard"
@@ -99,6 +98,7 @@
- help pages
- script files
- auto-restore when loading Workspace
+ - Probably a new class is called for, that keeps track of open and detached windows. Some simplifications may then be possible in RKEditorManager and DetachedWindowContainer.
- error-handling/raising in .rk.do.call
- I've changed the simple RInterface::issueCommand (QString, ...) command to return a pointer to the RCommand created. This will allow for lots of small cleanups. Do them.
- well, on second thought, it might be better to rely more on RCommand::id () instead of pointers. Why? The id is unique (until integer overflow). The pointer may be reused after a delete -> potential problem when trying to cancel command which is actually already deleted (and potentially other cases)
Modified: trunk/rkward/rkward/rkward.xml
===================================================================
--- trunk/rkward/rkward/rkward.xml 2006-09-20 15:23:57 UTC (rev 752)
+++ trunk/rkward/rkward/rkward.xml 2006-09-21 10:56:29 UTC (rev 753)
@@ -33,8 +33,8 @@
</list>
<contexts>
- <!-- This context dispatches to the two main contexts output or command -->
- <context attribute="Prompt" lineEndContext="#stay" name="ctxbase">
+ <!-- This context dispatches to the two main contexts output or command. Anything that does not match one of the rules is an error (you may get this, if a closing brace '}' pops out of a command context) -->
+ <context attribute="Error" lineEndContext="#stay" name="ctxbase">
<RegExpr attribute="Prompt" context="command" String="^> " beginRegion="command"/>
<RegExpr attribute="Normal Text" context="output" String="^([^>\+]|$)" lookAhead="true"/>
</context>
@@ -48,6 +48,7 @@
<context attribute="Normal Text" lineEndContext="#stay" name="command">
<IncludeRules context="CommandContinuationCheck"/>
<IncludeRules context="CommonRules"/>
+ <DetectChar attribute="Symbol" context="#pop" char="}" />
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="parenthesis">
@@ -57,6 +58,7 @@
<RegExpr attribute="Identifier" context="#stay" String="[a-zA-Z_\.][0-9a-zA-Z_\.]*[\s]*=(?=([^=]|$))"/>
<IncludeRules context="CommonRules"/>
+ <DetectChar attribute="Error" context="#stay" char="}" />
</context>
<context attribute="String" lineEndContext="#stay" name="string">
@@ -70,10 +72,10 @@
<!-- 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">
- <!-- This should pop us back into ctxbase, which will then take us to the next command -->
- <RegExpr attribute="Prompt" context="#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop" String="^> " lookAhead="true" endRegion="command"/>
- <!-- This should pop us back into ctxbase, which will then most likely take us to output -->
- <RegExpr attribute="Normal Text" context="#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop#pop" String="^([^\+]|$)" lookAhead="true"/>
+ <!-- Since this rule is included in every (relevant) context, this will unwind the entire context stack back to ctxbase. -->
+ <RegExpr attribute="Prompt" context="#pop" String="^> " lookAhead="true" endRegion="command"/>
+ <!-- See above -->
+ <RegExpr attribute="Normal Text" context="#pop" String="^([^\+]|$)" lookAhead="true"/>
<RegExpr attribute="Prompt" context="#stay" String="^\+ "/>
</context>
@@ -105,6 +107,9 @@
<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="%[^%]*%"/>
+
+ <!-- Contrary to the normal R Script highlighting, we don't start a region here, but we do go into a command sub-context -->
+ <DetectChar attribute="Symbol" context="command" char="{" />
</context>
</contexts>
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