home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / Apps / DevTools / RTFSyntax / RTFSyntax.app / English.lproj / RTFSyntax.nib / data.nib (.txt) < prev   
Encoding:
NeXT TypedStream Data  |  1994-01-05  |  13.3 KB  |  224 lines

  1. streamtyped
  2. IBObjectData
  3. Object
  4. CustomObject
  5. Application
  6. MenuCell
  7. ButtonCell
  8. ActionCell
  9. Suggestion...
  10.     Helvetica
  11. Matrix
  12. Control
  13.     Responder
  14. @:@iiii
  15. Info Panel...
  16. Preferences...
  17. Help...
  18. ff@@#::s
  19. Paste
  20. Delete
  21. MenuTemplate
  22. *@*@ccc
  23.     RTFSyntax
  24. submenuAction:
  25. NXImage
  26. NXmenuArrow
  27. Configuration
  28. Open...
  29. Save As...
  30. Revert to Saved
  31. Close
  32. Format
  33. [10@]
  34. Font Panel...
  35. Italic
  36.     Underline
  37. Superscript
  38.     Subscript
  39. Unscript
  40.     Colors...
  41.     Copy Font
  42. Paste Font
  43. Align Left
  44. Center
  45. Align Right
  46. Show Ruler
  47. Copy Ruler
  48. Paste Ruler
  49. Windows
  50. Arrange in Front
  51. Miniaturize Window
  52. Close Window
  53. Configuration...
  54. Services
  55. Find Panel...
  56.     Find Next
  57. Find Previous
  58. Enter Selection
  59. Jump to Selection
  60. Spelling...
  61. Check Spelling
  62. Select All
  63. ClipView
  64. ScrollView
  65. Previous
  66. NextR
  67. InsertR
  68. FormCell
  69. Item number:R
  70. Number of items:R
  71. Field:R
  72. ciifffcfffs
  73. [119c]{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
  74. \margl40
  75. \margr40
  76. \f0\b0\i0\ulnone\ql\fs24\fi0\li0\gray0\fc0\cf0\up0\dn0 
  77. NXCursor
  78. NXibeam
  79. Scroller
  80. _doScroller:
  81. @@@ffst
  82.     TextField
  83. TextFieldCell
  84. Unmatched
  85. Sample Text:R
  86. NXColorWell
  87. Unmatched 
  88. Text color:R
  89. Syntax ItemR
  90. Matched
  91. Sample Text:R
  92. Matched 
  93. Text color:R
  94. [168c]{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
  95. \margl40
  96. \margr40
  97. \pard\tx533\tx1067\tx1601\tx2135\tx2668\tx3202\tx3736\tx4270\tx4803\tx5337\f0\b0\i0\ulnone\fs24\fc0\cf0 
  98. Regular Expression:R
  99. {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
  100. \margl40
  101. \margr40
  102. \f0\b0\i0\ulnone\ql\fs24\fi0\li0\gray0\fc0\cf0\up0\dn0 
  103. [4509c]{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
  104. \margl40
  105. \margr40
  106. {\colortbl;\red0\green126\blue0;\red255\green0\blue0;\red0\green0\blue255;\red0\green255\blue0;\red255\green0\blue255;\red0\green0\blue0;}
  107. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f0\b\i0\ulnone\qc\fs48\gray291\fc1\cf1 RTFSyntax
  108. \b0\gray0\fc0\cf0 \
  109. \fs32\gray300\fc2\cf2 by
  110. \gray0\fc0\cf0 \
  111. \gray108\fc3\cf3 Ross Cutler\
  112. \gray587\fc4\cf4 rgc@cs.umd.edu\
  113. \gray409\fc5\cf5 1-6-94\
  114. \gray108\fc3\cf3 \
  115. \b\ql\gray0\fc6\cf6 Introduction
  116. \b0\gray108\fc3\cf3 \
  117. \b\gray291\fc1\cf1 RTFSyntax
  118. \b0\gray0\fc6\cf6  is an application for programmers that provides a service to color syntax highlight rich text.  By color syntax highlighting, I mean automatically changing the color and font of the selected rich text using regular expressions previously defined in 
  119. \b\gray291\fc1\cf1 RTFSyntax
  120. \b0\gray0\fc6\cf6 .  For example, you can use this program to make all of your Objective-C comments appear in red Helvetica 12-point italics.  Because you define what you want colored using regular expression, you can completely customize how your RTF code looks.\
  121. \b Motivation
  122. \b0 \
  123. With NEXTSTEP 3.2, Edit and cc(1) now support RTF.  You can utilize RTF in your source files by creating links from one file to another, and also by changing the fonts and colors to make the code easier to read.  This program automates the latter.  \
  124. \b Usage
  125. \b0 \
  126. To use 
  127. \b\gray291\fc1\cf1 RTFSyntax
  128. \b0\gray0\fc6\cf6 , you must first specify a default configuration file in the preferences.  A configuration file contains a list of regular expressions and the corresponding font and color you wish to use for the matching text.  A sample configuration file 
  129. \i Objective-C.syntax
  130. \i0  is provided with this program.  However, you can create your own easily enough by using the Configuration window.  The usage is very straightforward, and the only thing that needs commenting is the regular expression syntax.\
  131. GNU's regex (version 0.12) is used to do the regular expression matching.  The syntax used is extended POSIX, with the "." character matching anything but newline.  For ease of entering the regular expression, the newline character is ignored; it can be entered using "\\n" as you'd expect.  Note that non-matching lists (e.g. [^a]) do not match newlines.  Please see the GNU regex documentation (included as the file 
  132. \i regex.dvi
  133. \i0 ) for further information about the extended POSIX syntax.\
  134. To use 
  135. \b\gray291\fc1\cf1 RTFSyntax
  136. \b0\gray0\fc6\cf6 , simply highlight the RTF text you which to color and select the "Color Syntax" service (Command-`).  Note that you do not have to color the entire file at once; for speed reasons, you probably should only color the text that needs coloring.  Also, in Edit, make sure you convert an ASCII file to RTF (Command-R) before you use 
  137. \b\gray291\fc1\cf1 RTFSyntax
  138. \b0\gray0\fc6\cf6 .\
  139. \b Comments\
  140. \b0 If two regular expressions find matches that intersect, the match that occurs earliest in the file is used.  If they both start at the same offset in the file, then the longer one is used.\
  141. Unfortunately, IB cannot parse RTF header files.  This should be fixed in the next release of NS.\
  142. \gray291\fc1\cf1 RTFSyntax
  143. \b0\gray0\fc6\cf6  was implemented using the Text class to highlight text.  Though this is very clean and was easy to do, it does have significant overhead.  For large source files (~1000 lines), it can take about 60 seconds to highlight the entire file (using 
  144. \i Objective-C.syntax
  145. \i0  on a ALR Pentium computer).  I found that about 70% of the program's CPU time was being used in 4 lines of Text method calls.  The other 30% was taken up by calls to regexec().\
  146. \b Future Directions\
  147. \b0 The obvious enhancement to 
  148. \b\gray291\fc1\cf1 RTFSyntax
  149. \b0\gray0\fc6\cf6  would be increased speed.  One could make it at least twice as fast by not using the Text class and modifying the RTF code directly.  Also, for fixed regular expressions, compiled code generated from lex(1) could be used (ack!).  I provide the source for anyone who wishes to do this.  \
  150. Ideally, Edit would have instantaneous color syntax highlighting.  Possibly one could subclass the Text class to provide this feature, and then graft that subclass into Edit.  Please let me know if you have any ideas on how to go about doing this.\
  151. \b Legal Stuff
  152. \b0 \
  153. \b\gray291\fc1\cf1 RTFSyntax
  154. \b0\gray0\fc6\cf6  is released under the GNU General Public License.\
  155. WindowTemplate
  156. iiii***@s@
  157. Window
  158. Button
  159. Default configuration:R
  160. Set...R
  161. FontManager
  162. Preferences
  163. Panel
  164. Controller
  165. File's Owner(
  166. MainMenu(
  167. Font Manager((
  168. [57@]
  169. IBControlConnector
  170. IBConnector
  171. hide:
  172. terminate:
  173. alignSelLeft:
  174. alignSelCenter:
  175. alignSelRight:
  176. copyRuler:
  177. pasteRuler:
  178. toggleRuler:
  179. orderFrontFontPanel:
  180. superscript:
  181. subscript:
  182.     unscript:
  183.     copyFont:
  184. pasteFont:
  185. underline:
  186. addFontTrait:
  187. performMiniaturize:
  188. performClose:
  189. arrangeInFront:
  190. previousItem:
  191.     nextItem:
  192. deleteItem:
  193. insertItem:
  194. newConfiguration:
  195. openConfiguration:
  196. saveConfiguration:
  197. saveAsConfiguration:
  198. makeKeyAndOrderFront:
  199. IBOutletConnector
  200. delegate
  201. configurationWindow
  202. preferenceWindow
  203. defaultConfiguration
  204. itemNumber
  205. numberOfItems
  206. copy:
  207. paste:
  208. selectAll:
  209. delete:
  210. showGuessPanel:
  211. checkSpelling:
  212. revertToSavedConfiguration:
  213. setDefaultConfigurationName:
  214. regularExpression
  215. unmatchedSampleText
  216. setUnmatchedColor:
  217. setMatchedColor:
  218. matchedSampleText
  219. matchedColorWell
  220. unmatchedColorWell
  221. suggestion:
  222. orderFrontColorPanel:
  223.     showInfo:
  224.