home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / TEKST / SPIDER / ADA / ADA.SPI next >
Encoding:
Text File  |  1991-01-10  |  8.5 KB  |  279 lines

  1. # Copyright 1989 by Norman Ramsey, Odyssey Research Associates
  2. # To be used for research purposes only
  3. # For more information, see file COPYRIGHT in the parent directory
  4.  
  5. # Modified by Sylvester Fernandez
  6.  
  7. language Ada extension ada
  8.  
  9. at_sign @
  10.  
  11. module definition stmt use stmt
  12.  
  13. comment begin <dash-dash> end newline
  14. macros begin
  15. \def\commentbegin{{\tt -- }}
  16. macros end
  17.  
  18. line begin <dash-dash-"line"> end <"">
  19.  
  20. default translation <*> mathness yes
  21.  
  22. token identifier category math mathness maybe
  23. token number category math mathness yes
  24. token newline category ignore_scrap translation <> mathness maybe 
  25. token pseudo_semi translation <> category semi mathness maybe
  26.  
  27. macros begin
  28. \let\R\relax
  29. macros end
  30.  
  31. # Delimiters
  32. token & category binop translation <"\\amp">
  33. token ( category open 
  34. token ) category close 
  35. token * category binop
  36. token + category unorbinop
  37. token , category binop translation <",\\,"-opt-3>
  38. token - category unorbinop
  39. token . category binop
  40. token / category binop
  41. token : category binop 
  42. token ; category semi translation <";"-space-opt-2> 
  43. token < category binop
  44. token = category binop
  45. token > category binop
  46. token | category binop translation <"\\mid"> 
  47.  
  48. # Compound delimiters
  49.  
  50. token => category arrow translation <"\\AR">
  51. token .. category binop translation <"\\.{..}\\>">
  52. token ** category binop translation <"\\mathbin{**}">
  53. token := category binop translation <"\\mathbin{:=}">
  54. token /= translation <"\\I"> category binop 
  55. token >= translation <"\\G"> category binop 
  56. token <= translation <"\\L"> category binop 
  57. token << translation <"\\LL"> category openlabel 
  58. token >> translation <"\\GG"> category closelabel 
  59. token <> translation <"\\LG"> category math
  60.  
  61. # Hacks no ', and this becomes a binary op
  62. token ' category binop mathness no 
  63.  
  64. token # category math translation <"\\#"> 
  65.  
  66.  
  67.  
  68.  
  69. default mathness maybe translation <*>
  70.  
  71. reserved abort ilk math_like
  72. reserved abs ilk unop_like
  73. reserved accept ilk proc_like
  74. reserved access ilk math_like
  75. reserved all ilk math_like
  76. reserved and ilk and_like
  77. reserved array ilk math_like
  78. reserved at ilk at_like
  79. reserved begin ilk begin_like
  80. reserved body ilk math_like
  81. reserved case ilk case_like
  82. reserved constant ilk math_like
  83. reserved declare ilk decl_like
  84. reserved delay ilk math_like
  85. reserved delta ilk math_like
  86. reserved digits ilk math_like
  87. reserved do ilk do_like
  88. reserved else ilk else_like
  89. reserved elsif ilk elsif_like
  90. reserved end ilk end_like
  91. reserved entry ilk proc_like
  92. reserved exception ilk ex_like
  93. reserved exit ilk math_like
  94. reserved for ilk math_like
  95. reserved function ilk proc_like
  96. reserved generic ilk gen_like
  97. reserved goto ilk math_like
  98. reserved if ilk if_like
  99. reserved in ilk unorbinop_like
  100. reserved is ilk is_like 
  101. reserved limited ilk math_like
  102. reserved loop ilk loop_like
  103. reserved mod ilk binop_like
  104. reserved new ilk unop_like
  105. reserved not ilk unop_like
  106. reserved null ilk math_like
  107. reserved of ilk math_like
  108. reserved or ilk or_like
  109. reserved others ilk math_like
  110. reserved out ilk math_like
  111. reserved package ilk proc_like
  112. reserved pragma ilk math_like
  113. reserved private ilk private_like
  114. reserved procedure ilk proc_like
  115. reserved raise ilk math_like
  116. reserved range ilk math_like
  117. reserved record ilk record_like
  118. reserved rem ilk binop_like
  119. reserved renames ilk math_like
  120. reserved return ilk math_like
  121. reserved reverse ilk math_like
  122. reserved select ilk select_like
  123. reserved separate ilk separate_like
  124. reserved subtype ilk math_like
  125. reserved task ilk proc_like
  126. reserved terminate ilk math_like
  127. reserved then ilk then_like
  128. reserved type ilk math_like
  129. reserved use ilk math_like
  130. reserved when ilk when_like
  131. reserved while ilk math_like
  132. reserved with ilk with_like
  133. reserved xor ilk binop_like
  134.  
  135. ilk and_like translation <*> category and
  136. ilk at_like translation <*> category at
  137. ilk begin_like translation <*-indent> category beginning
  138. ilk binop_like translation <"\\"-space-*-"\\"-space> category binop
  139. ilk case_like translation <*> category case
  140. ilk decl_like translation <*-indent> category declaration
  141. ilk do_like translation <*> category do
  142. ilk else_like translation <*> category else
  143. ilk elsif_like translation <*> category elsif
  144. ilk end_like translation <*> category close
  145. ilk ex_like translation <*> category exception
  146. ilk gen_like translation <*-indent> category generic
  147. ilk if_like translation <*> category if
  148. ilk is_like translation <*> category is
  149. ilk loop_like translation <*> category loop
  150. ilk math_like translation <*> category math
  151. ilk or_like translation <*> category or
  152. ilk private_like translation <*> category private
  153. ilk proc_like translation <force-*> category proc
  154. ilk record_like translation <*> category record
  155. ilk select_like translation <*> category select
  156. ilk separate_like translation <*> category separate
  157. ilk then_like translation <*> category then
  158. ilk unop_like translation <*-"\\"-space> category unop
  159. ilk unorbinop_like translation <"\\"-space-*-"\\"-space> category resunorbinop
  160. ilk when_like translation <*> category when
  161. ilk with_like translation <*> category with
  162.  
  163.  
  164. # \MC means ``math close'' and sets \MS to ``math set''
  165. macros begin
  166. \def\MC{\ifmmode\global\let\MS$\else\global\let\MS\relax\fi\relax\MS}
  167. \def\LG{\mathord{<}\mathord{>}}
  168. \let\IG=\ignorespaces
  169. macros end
  170.  
  171.  
  172.  
  173. beginning <outdent-force> continuation <outdent-force> ending --> stmt
  174. beginning <outdent-force> ending --> stmt
  175. # beginning <force> (stmt|ignore_scrap) --> beginning
  176. beginning <force> stmt --> beginning
  177.  
  178. case <"\\"-space> math <"\\"-space> is <indent-force> --> beginning
  179.  
  180. close semi --> ending
  181. close <"\\"-space> ? semi --> ending
  182. close <"\\"-space> ? <"\\"-space> ? semi --> ending
  183.  
  184. continuation <force> stmt --> continuation
  185. continuation <outdent-force> continuation --> continuation
  186.  
  187.  
  188. declaration <outdent-force> beginning <outdent-force> continuation <outdent-force> ending --> stmt
  189. declaration <outdent-force> beginning <outdent-force> ending --> stmt
  190. declaration <outdent-force> ending --> stmt
  191. declaration <force> (declaration|stmt) --> declaration
  192.  
  193. else <indent-force> --> continuation
  194. elsif <"\\"-space> math <"\\"-space> then <indent-force> --> continuation
  195.  
  196. exception <indent-force> --> continuation
  197.  
  198. generic <outdent-force> declaration --> declaration
  199. generic <force> stmt --> generic
  200.  
  201. if <"\\"-space> math <"\\"-space> then --> ifthen
  202. ifthen <indent-force> stmt --> beginning
  203. ifthen <indent-force> <"\\"-space> math <"\\"-space> <outdent-force> else --> ifthen
  204. ifthen <indent-force> <"\\"-space> math <"\\"-space> <outdent-force> close <"\\"-space> if --> math
  205. ifthen <indent-force> <"\\"-space> math <"\\"-space> <outdent-force> elsif --> if
  206.  
  207.  
  208. is --> math
  209.  
  210. loop <indent-force> --> beginning
  211.  
  212. math [ <"\\"-space> and <"\\"-space> then <"\\"-space> ] --> math binop
  213. math [ <"\\"-space> and <"\\"-space> ] --> math binop
  214.  
  215. math (binop|unorbinop) math --> math
  216. math <"\\"-space> resunorbinop <"\\"-space>  math --> math
  217. (unorbinop|unop) math --> math
  218. resunorbinop <"\\"-space>  math --> math
  219. # This doesn't apply in Ada:  math unop --> math
  220.  
  221. math arrow --> math
  222. math <"\\"-space> at --> math
  223. math binop <"\\"-space> exception --> math
  224. math <"\\"-space> is --> math
  225. math <"\\"-space> loop --> loop
  226. math <"\\"-space> math --> math
  227. math [ <"\\"-space> or <"\\"-space> else <"\\"-space> ] --> math binop
  228. math [ <"\\"-space> or <"\\"-space> ] --> math binop
  229. math <"\\"-space> private --> math
  230. math <"\\"-space> separate --> math
  231. math <indent-force> stmt <outdent-force> --> stmt
  232. math terminator --> stmt
  233.  
  234. open close --> math
  235. open math close --> math
  236. open [ math semi ] --> open math
  237.  
  238. <force-backup> openlabel math closelabel <force> --> math
  239.  
  240. or <indent-force> --> continuation
  241.  
  242. private <indent-force> --> beginning
  243.  
  244. proc <"\\"-space> math <"\\"-space> is <"\\"-space> unop --> math
  245. proc <"\\"-space> math <"\\"-space> is <"\\"-space> separate --> math
  246. proc <"\\"-space> math <"\\"-space> is <indent-force> --> declaration
  247. proc <"\\"-space> math <"\\"-space> do <indent-force> --> beginning
  248. proc <"\\"-space> math terminator <force> --> declaration
  249.  
  250. #record <"\\"-space> at <"\\"-space> math terminator <indent-force> --> beginning
  251. record <indent-force> --> beginning
  252.  
  253. select <indent-force> --> beginning
  254.  
  255. semi --> terminator
  256.  
  257. separate math --> stmt
  258.  
  259. stmt <force> declaration --> declaration
  260.  
  261. stmt <force> stmt --> stmt
  262.  
  263. stmt <outdent-force> ending --> stmt
  264.  
  265. when <"\\"-space> math arrow <indent-force> --> whengroup
  266. [ when <"\\"-space> math ] terminator --> math terminator
  267. whengroup stmt <outdent-force> ending --> ending
  268. whengroup stmt <outdent-force> continuation --> continuation
  269. whengroup stmt <outdent-force> whengroup --> whengroup
  270.  
  271. with <"\\"-space> math --> math
  272. with <"\\"-space> proc <"\\"-space> math --> math
  273.  
  274. ? ignore_scrap --> #1
  275.  
  276. macros begin
  277. \let\AR=\Longrightarrow
  278. macros end
  279.