home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume11 / templates / part06 / pascal.tpl < prev    next >
Text File  |  1987-10-04  |  3KB  |  288 lines

  1. Template all Selection
  2. :begin
  3. program:
  4. constant:
  5. typedecl:
  6. type:
  7. variables:
  8. procedure:
  9. function:
  10. stmt:
  11. :end
  12.  
  13. Template program Sequence
  14. :begin
  15. program <textenter:name> (input, ouput);
  16. const
  17.    <constants>
  18. type
  19.    <types>
  20. var
  21.    <variables>
  22.  
  23. <procedures>
  24.  
  25.    begin { main program }
  26.       <stmtlist>
  27.    end.
  28. :end
  29.  
  30. Template constants Repetition
  31. :begin
  32.  
  33. <constant>
  34. :end
  35.  
  36. Template constant Sequence
  37. :begin
  38. <textenter:name> = <text:value>;
  39. :end
  40.  
  41. Template types Repetition
  42. :begin
  43.  
  44. <typedecl>
  45. :end
  46.  
  47. Template typedecl Sequence
  48. :begin
  49. <textenter:name> = <type>;
  50. :end
  51.  
  52. Template type Selection
  53. :begin
  54. array:
  55. boolean
  56. char
  57. file:
  58. integer
  59. pointer:
  60. range:
  61. real
  62. record:
  63. scalar:
  64. set:
  65. other:
  66. :end
  67.  
  68. Template array Sequence
  69. :begin
  70. array [<indexlist>] of <type>
  71. :end
  72.  
  73. Template indexlist Repetition
  74. :begin
  75. , <indextype>
  76. :end
  77.  
  78. Template indextype Selection
  79. :begin
  80. range:
  81. scalar:
  82. other:
  83. :end
  84.  
  85. Template file Sequence
  86. :begin
  87. file of <type>
  88. :end
  89.  
  90. Template pointer Sequence
  91. :begin
  92. ^<type>
  93. :end
  94.  
  95. Template range Sequence
  96. :begin
  97. <text:start> .. <text:stop>
  98. :end
  99.  
  100. Template record Sequence
  101. :begin
  102. record
  103.    <fieldlist>
  104. end
  105. :end
  106.  
  107. Template fieldlist Repetition
  108. :begin
  109. ;
  110. <field>
  111. :end
  112.  
  113. Template field Sequence
  114. :begin
  115. <textenter:name>: <type>
  116. :end
  117.  
  118. Template scalar Sequence
  119. :begin
  120. (<itemlist>)
  121. :end
  122.  
  123. Template itemlist Repetition
  124. :begin
  125. , <textenter:item>
  126. :end
  127.  
  128. Template set Sequence
  129. :begin
  130. set of <indextype>
  131. :end
  132.  
  133. Template other Sequence
  134. :begin
  135. <text>
  136. :end
  137.  
  138. Template variables Repetition
  139. :begin
  140.  
  141. <variable>
  142. :end
  143.  
  144. Template variable Sequence
  145. :begin
  146. <textenter:name>: <type>;
  147. :end
  148.  
  149. Template procedures Repetition
  150. :begin
  151.  
  152. <procfunc>
  153. :end
  154.  
  155. Template procfunc Selection
  156. :begin
  157. procedure:
  158. function:
  159. :end
  160.  
  161. Template procedure Sequence
  162. :begin
  163. {************************************************************}
  164.  
  165. procedure <textenter:name> (<args>);
  166. var
  167.    <variables>
  168. begin
  169.    <stmtlist>
  170. end; { <textenter:name> }
  171.  
  172. :end
  173.  
  174. Template function Sequence
  175. :begin
  176. {************************************************************}
  177.  
  178. function <textenter:name> (<args>): <type>;
  179. var
  180.    <variables>
  181. begin
  182.    <stmtlist>
  183. end; { <textenter:name> }
  184.  
  185. :end
  186.  
  187. Template args Repetition
  188. :begin
  189. ; <argdecl>
  190. :end
  191.  
  192. Template argdecl Sequence
  193. :begin
  194. var <textenter:id>: <type>
  195. :end
  196.  
  197. Template stmtlist Repetition
  198. :begin
  199.  
  200. <stmt>
  201. :end
  202.  
  203. Template stmt Selection
  204. :begin
  205. assignment:
  206. case:
  207. compound:
  208. for:
  209. if:
  210. repeat:
  211. while:
  212. with:
  213. :end
  214.  
  215. Template assignment Sequence
  216. :begin
  217. <text:variable> := <text:expression>;
  218. :end
  219.  
  220. Template case Sequence
  221. :begin
  222. case <text:expression> of
  223.    <caselist>
  224. end;
  225. :end
  226.  
  227. Template  caselist Repetition
  228. :begin
  229. ;
  230. <caseclause>
  231. :end
  232.  
  233. Template caseclause Sequence
  234. :begin
  235. <text:constant>: <stmt>
  236. :end
  237.  
  238. Template compound Sequence
  239. :begin
  240. begin
  241.    <stmtlist>
  242. end;
  243. :end
  244.  
  245. Template for Sequence
  246. :begin
  247. for <text:index> := <text:start> to <text:stop> do begin
  248.    <stmtlist>
  249. end; { for <text:index> }
  250. :end
  251.  
  252. Template if Sequence
  253. :begin
  254. if <text:ifcondition> then begin
  255.    <stmtlist>
  256. end else begin
  257.    <stmtlist>
  258. end; { if <text:ifcondition> }
  259. :end
  260.  
  261. Template repeat Sequence
  262. :begin
  263. repeat
  264.    <stmtlist>
  265. until <text:stop>;
  266. :end
  267.  
  268. Template while Sequence
  269. :begin
  270. while <text:whilecondition> do begin
  271.    <stmtlist>
  272. end; { while <text:whilecondition> }
  273. :end
  274.  
  275. Template with Sequence
  276. :begin
  277. with <text:idlist> do begin
  278.    <stmtlist>
  279. end; { with <text:idlist> }
  280. :end
  281.  
  282.  
  283. Local Variables:
  284. tpl-begin-template-definition:"^Template"
  285. tpl-begin-template-body:"^:begin"
  286. tpl-end-template-body:"^:end"
  287. end:
  288.