home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / Software / TemaCD / SuperIDE / Super.exe / _SETUP.1 / EMailScript.lng < prev    next >
Text File  |  1998-08-24  |  7KB  |  166 lines

  1. /*
  2.  * TSyntaxMemoParser Script
  3.  * ------------------------
  4.  *
  5.  * Author  :          David Brock
  6.  * Date    :          October 21 1997
  7.  * Language:          e-mail
  8.  *
  9.  * ------------------------------------
  10.  *
  11.  * Revisions
  12.  *   02-11-97      Added et_PREVIOUS style to allow highlighting of
  13.  *                 previous, previous... messages differently. Altered
  14.  *                 et_ORIGINAL to reside in %%words section. Now
  15.  *                 clearly starts at beginning of line as per text.
  16.  */
  17.  
  18.  
  19. //--------------------------------------------------------------------------------------------------------------------
  20. //
  21. //
  22. //
  23. // Macro definitions. Parameters may be specified and the replacement text terminates with the end of
  24. // line (watch trailing blanks).
  25. //
  26. #define pt_DEFAULT                  0
  27. #define et_WEB                      1
  28. #define et_MAIL                     2
  29. #define et_ORIGINAL                 3
  30. #define et_PREVIOUS                 4
  31.  
  32. #define _all_chars_                 '[\x00-\xFF]'
  33. #define _dont_care_                 _all_chars_
  34. #define _DEFAULT_BACKGROUND         clWhite
  35. #define _DEFAULT_FOREGROUND         clBlack
  36.  
  37. #define _NO_GUTTER                  0
  38.  
  39. #define ss_START                    0
  40. #define ss_ORIGINAL                 1
  41.  
  42. //--------------------------------------------------------------------------------------------------------------------
  43. //
  44. // %%language section
  45. //
  46. // Header section. Describes the textual name of the language, case sensitivity and options used by the language.
  47. //
  48. %%language
  49. Name                      = 'e-mail'
  50. Case                      = __INSENSITIVE
  51. Options                   = __DEFAULT_OPTIONS + __OPT_WORDWRAP + __OPT_WRAP_OVERRIDE     // Turn on word wrap & word-wrap override
  52. WordWrapColumn            = 72
  53. Gutter                    = _NO_GUTTER
  54. Anchor                    = _DEFAULT_START_ANCHOR
  55. WrapOverride              = '>:|'
  56. ExampleText               = 'From: David Brock <dbrock@cqm.co.uk>\n\
  57.                             \To  : All\n\
  58.                             \Re  : TSyntaxMemo\n\
  59.                             \------------------------------------\n\
  60.                             \>Can I have more Info please.\n\
  61.                             \Download from http://users.colloquium.com.uk/~dbrock/syned.zip\n'
  62.  
  63. EditableStyles              ('Original message', et_ORIGINAL),
  64.                             ('Previous messages',et_PREVIOUS),
  65.                             ('Mail address',     et_MAIL),
  66.                             ('Web address',      et_WEB),
  67.                             ('Default',          pt_DEFAULT)
  68.  
  69.  
  70.  
  71.  
  72. //--------------------------------------------------------------------------------------------------------------------
  73. //
  74. // %%words section
  75. //
  76. //
  77. %%words
  78. 'http://'               _dont_care_                 et_WEB       [ss_START ss_ORIGINAL]
  79. 'www.'                  _dont_care_                 et_WEB       [ss_START ss_ORIGINAL]
  80. 'ftp://'                _dont_care_                 et_WEB       [ss_START ss_ORIGINAL]
  81. 'ftp.'                  _dont_care_                 et_WEB       [ss_START ss_ORIGINAL]
  82. ':'                     _dont_care_                 et_ORIGINAL
  83. '>'                     _dont_care_                 et_ORIGINAL
  84. '|'                     _dont_care_                 et_ORIGINAL
  85. '>>'                    _dont_care_                 et_PREVIOUS
  86. '>:'                    _dont_care_                 et_PREVIOUS
  87. '>|'                    _dont_care_                 et_PREVIOUS
  88. '::'                    _dont_care_                 et_PREVIOUS
  89. ':|'                    _dont_care_                 et_PREVIOUS
  90. ':>'                    _dont_care_                 et_PREVIOUS
  91. '||'                    _dont_care_                 et_PREVIOUS
  92. '|:'                    _dont_care_                 et_PREVIOUS
  93. '|>'                    _dont_care_                 et_PREVIOUS
  94. '\n:'                   _dont_care_                 et_ORIGINAL
  95. '\n>'                   _dont_care_                 et_ORIGINAL
  96. '\n|'                   _dont_care_                 et_ORIGINAL
  97. '\n>>'                  _dont_care_                 et_PREVIOUS
  98. '\n>:'                  _dont_care_                 et_PREVIOUS
  99. '\n>|'                  _dont_care_                 et_PREVIOUS
  100. '\n::'                  _dont_care_                 et_PREVIOUS
  101. '\n:|'                  _dont_care_                 et_PREVIOUS
  102. '\n:>'                  _dont_care_                 et_PREVIOUS
  103. '\n||'                  _dont_care_                 et_PREVIOUS
  104. '\n|:'                  _dont_care_                 et_PREVIOUS
  105. '\n|>'                  _dont_care_                 et_PREVIOUS
  106.  
  107. //--------------------------------------------------------------------------------------------------------------------
  108. //
  109. // %%handler section
  110. //
  111. //  For e-mail we must recognise WEB URLs that have started with 'http://' or whatever is present in the %%words
  112. //  section for et_WEB. The entire matching process is dealt with in the _WEB_CHAR predefined character function.
  113. //  _WEB_CHAR actually matches an entire URL tail and returns true/false for success/failure. Hence we can specify
  114. //  that _all_chars_ may follow and be discarded.
  115. //
  116. //
  117. %%handler
  118. et_WEB                  _WEB_CHAR                  _all_chars_  _discard_
  119. et_ORIGINAL             _ORIGINAL_CHAR             _all_chars_  _discard_
  120. et_PREVIOUS             _ORIGINAL_CHAR             _all_chars_  _discard_
  121.  
  122. //--------------------------------------------------------------------------------------------------------------------
  123. //
  124. // %%tokens section
  125. //
  126. //  E-Mail addresses are handled by a pre-defined token function that only recognises items when an '@' is present.
  127. //
  128. //  Original text lines must be dealt with here, the pre-defined function _ORIGINAL_CHAR correctly identifies
  129. //  lines that are suitable for original text and gobbles all characters on the line.
  130. //
  131. %%tokens
  132. et_MAIL                 __STD_MAIL_URL                                                             [ss_START ss_ORIGINAL]
  133.  
  134. //--------------------------------------------------------------------------------------------------------------------
  135. //
  136. // %%effects section
  137. //
  138. //  Specifying et_MAIL and et_WEB as 'hotspot' will cause the cursor change and hover/click events to be generated
  139. //  for these lexemes.
  140. //
  141. %%effects
  142. pt_DEFAULT              []  _DEFAULT_FOREGROUND _DEFAULT_BACKGROUND
  143. et_MAIL                 []  clBlue              _DEFAULT_BACKGROUND 'hotspot'
  144. et_WEB                  []  clRed               _DEFAULT_BACKGROUND 'hotspot'
  145. et_ORIGINAL             []  clGreen             _DEFAULT_BACKGROUND
  146. et_PREVIOUS             []  clSilver            _DEFAULT_BACKGROUND
  147.  
  148.  
  149. //--------------------------------------------------------------------------------------------------------------------
  150. //
  151. // %%map section
  152. //
  153. // Normally the %%map table consists of identical value entries.
  154. //
  155. %%map
  156. et_MAIL                 et_MAIL
  157. et_WEB                  et_WEB
  158. et_ORIGINAL             et_ORIGINAL
  159. et_PREVIOUS             et_PREVIOUS
  160.  
  161. %%containers
  162. et_ORIGINAL             (+[ss_ORIGINAL] -[ss_START])
  163. et_PREVIOUS             (+[ss_ORIGINAL] -[ss_START])
  164.  
  165.  
  166.