a68s.1 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  1. .TH A68S 1 "Version 2.2a Jul 15 1987"
  2. .SH NAME
  3. a68s, indent68 \- ALGOL 68S compiler
  4. .SH SYNOPSIS
  5. .B a68s
  6. .IR arguments
  7. .PP
  8. .BR ack (etc)
  9. .IR arguments
  10. .PP
  11. .B indent68
  12. .IR filename
  13. .SH DESCRIPTION
  14. ALGOL68S source files should have the extension `.8'.
  15. .LP
  16. .I a68s
  17. accepts the same flags and conventions as
  18. .I ack
  19. (q.v.). Thus 'a68s -o
  20. .I prog
  21. .IR prog .8'
  22. will compile the source in file
  23. .IR prog .8,
  24. producing executable binary in
  25. .IR prog
  26. and a program listing in
  27. .IR prog .8.lst.
  28. .IP
  29. WARNING. Although the
  30. .I ack
  31. system will have produced the usual intermediate files with suffices .k, .m and .o
  32. (and you may even stop the compilation at these intermediate stages if you wish),
  33. do not try to include other files (whether ending in .8 or in .anything else)
  34. as the present compiler has no facilities for separate or
  35. mixed-language compilation. Hopefully, this will be rectified some day.
  36. .IP
  37. If the source file starts with a digit, it will be assumed that every line
  38. starts with a line number (but the sequencing is not checked). These line
  39. numbers will then appear on the .lst file,
  40. and will be used in diagnostic messages.
  41. .LP
  42. `indent68'
  43. will read the given
  44. .IR filename
  45. which is expected to be an ALGOL 68 program.
  46. A correctly indented form of the same program is sent to the standard output.
  47. Note that, unlike more elaborate prettyprinters, it confines itself to
  48. inserting or removing blanks at the beginnings of lines (although it does
  49. insist upon a space after each
  50. .BR go-on-symbol
  51. .RI ( ; )
  52. and after a starting
  53. .BR brief-comment-symbol
  54. .RI ( # ).
  55. It is particularly intended for indenting programs that place their
  56. .BR go-on-symbols
  57. at the start of the line (i.e. before the next
  58. .BR statement
  59. rather than after the last one), but it will produce an acceptable
  60. indentation of any program.
  61. .SH LANGUAGE
  62. The language implemented is the official sublanguage of ALGOL 68 (usually
  63. known as ALGOL 68S), as defined in [1] (see also Appendix 4 of [2]). The only
  64. features of ALGOL 68S not implemented are binary transput and
  65. .IR "stand back channel" .
  66. On the other hand, in addition to the official features of ALGOL 68S, the
  67. .B heap-generator
  68. (but not the
  69. .BR sample-heap-generator )
  70. is implemented. WARNING. The garbage collector is of the "access count"
  71. variety, and it will therefore not collect circular lists which may become
  72. inaccessible (however, circular lists constructed from
  73. .BR local-generators
  74. are collected correctly on range exit).
  75. .PP
  76. The hardware representation is the official one ([3]), except for the absence
  77. of reserved-word stropping.
  78. .PP
  79. The principal limitations with respect to full ALGOL 68 are therefore as
  80. follows.
  81. .TP
  82. 1.
  83. All defining occurences must precede their applied occurrences (except for
  84. .BR labels ).
  85. .TP
  86. 2.
  87. No
  88. .IR UNION s
  89. or
  90. .BR conformity-clauses
  91. or
  92. .IR EMPTY .
  93. .TP
  94. 3.
  95. No
  96. .IR FLEX
  97. (but
  98. .IR STRING
  99. is OK) and no
  100. .BR vacuums .
  101. .TP
  102. 4.
  103. Structures may not contain arrays, and
  104. .B 'row-of-row-of'
  105. modes are not permitted (as opposed to
  106. .B 'row-row-of'
  107. modes which are OK).
  108. .TP
  109. 5.
  110. No
  111. .BR parallel-clauses
  112. or
  113. .BR void-collateral-clauses
  114. (but
  115. .BR displays
  116. are OK).
  117. .TP
  118. 6.
  119. No formatted transput.
  120. .TP
  121. 7.
  122. .IR GOTO
  123. (or
  124. .IR GO
  125. .IR TO )
  126. may not be omitted in a
  127. .BR jump .
  128. .TP
  129. 8.
  130. No procedured jumps.
  131. .TP
  132. 9.
  133. Existing
  134. .BR operators
  135. (notably the
  136. .BR standard-prelude
  137. ones) may not be redefined (nor may their priorities be altered).
  138. .TP
  139. 10.
  140. Restricted
  141. .BR standard-prelude .
  142. The following is a complete list of the standard
  143. .BR indicators
  144. available.
  145. .IP
  146. .IR "maxint, maxreal, smallreal, pi, maxabschar"
  147. .br
  148. .IR "sqrt, exp, ln, nextrandom, random"
  149. .br
  150. .IR "cos, arccos, sin, arcsin, tan, arctan"
  151. .br
  152. .IR "bitspack, bytespack"
  153. .br
  154. .IR "standin channel, standout channel, "
  155. .IR "standin, standout"
  156. .br
  157. .IR "open, establish, associate, close"
  158. .br
  159. .IR "put, print, write, get, read"
  160. .br
  161. .IR "space, newline, newpage, set, reset"
  162. .br
  163. .IR "on logical file end, "
  164. .IR "on physical file end, on page end"
  165. .br
  166. .IR "on line end, maketerm"
  167. .br
  168. .IR "chan, char number, line number, page number"
  169. .br
  170. .IR "whole, fixed, float"
  171. .br
  172. .IR "stop"
  173. .br
  174. .IR "REPR, BIN, ENTIER, ROUND, ODD, SIGN, ABS, "
  175. .IR "LWB, UPB"
  176. .br
  177. .IR "RE, IM, ARG, CONJ"
  178. .br
  179. .IR "NOT, AND, OR, OVER, MOD, SHL, SHR, I"
  180. .br
  181. .IR "+ , - , * , / , % , %* , ^ , ** , +*"
  182. .br
  183. .IR "EQ, NE, GE, GT, LE, LT"
  184. .br
  185. .IR "= , /= , >= , > , <= , <"
  186. .br
  187. .IR "PLUSAB, MINUSAB, TIMESAB, DIVAB, OVERAB, "
  188. .IR "MODAB, PLUSTO"
  189. .br
  190. .IR "+:= , -:= , *:= , /:= , %:= , %*:= , +=:"
  191. .PP
  192. .SH PRAGMATS
  193. The following
  194. .BR pragmats
  195. are provided:
  196. .PD 0
  197. .IP
  198. .TP 17
  199. .IR "PR UPPER PR"
  200. (enable upper-case stropping)
  201. .TP
  202. .IR "PR POINT PR"
  203. (disable upper-case stropping)
  204. .br
  205. Note that point stropping always works (with either case of word).
  206. The essential difference with upper-case stropping is that upper-case words are
  207. assumed to be stropped whether a point is present or not. Thus it is always
  208. possible to write
  209. .IR ".PR UPPER .PR" ,
  210. which will be recognised whatever the previous stropping regime.
  211. .TP
  212. .IR "PR LIST PR"
  213. (turn listing on)
  214. .TP
  215. .IR "PR NOLIST PR"
  216. (turn listing off)
  217. .br
  218. listings are sent to the .lst file.
  219. .TP
  220. .IR "PR PAGE PR"
  221. (start a new page on the .lst file)
  222. .TP
  223. .IR "PR WARN PR"
  224. (include compile-time warning messages)
  225. .TP
  226. .IR "PR NOWARN PR"
  227. (omit compile-time warning messages)
  228. .PD
  229. .PP
  230. The words within a
  231. .BR pragmat
  232. may be in either upper or lower case, and one
  233. .BR pragmat
  234. may contain several such words, separated by commas, as in the following
  235. example which shows the default states.
  236. .IP
  237. .IR "PR UPPER, LIST, WARN PR"
  238. .SH DIAGNOSTICS
  239. The compile-time error messages are self-explanatory.
  240. They can be divided into 3 categories:
  241. .RS
  242. .br
  243. Lexcical errors (the offending lexeme is simply ignored)
  244. .br
  245. Syntactic errors (text up to the next
  246. .RI ' ; '
  247. or
  248. .RI ' ) ',
  249. etc. is ignored)
  250. .br
  251. Semantic errors.
  252. .RE
  253. .br
  254. After the first syntactic error, further checking for semantic errors is
  255. inhibited.
  256. .LP
  257. On the .lst file,
  258. a row of "=" indicates parts of the text that have been ignored.
  259. A "1" under a particular symbol indicates the point where an error was detected
  260. (a "2" indicates that 2 errors were found there). An "S" ("C", "P") is printed
  261. in the margin wherever a new line of source text starts within a
  262. .BR string-denotation
  263. .RB ( comment ,
  264. .BR pragmat ).
  265. Thus mismatched delimiters for these things will readily stand out.
  266. .LP
  267. A run-time error message is followed by a print out of the stack, giving the
  268. line number in each active procedure. For each procedure, the active
  269. .BR ranges
  270. are printed, starting from the innermost and finishing with the outermost.
  271. Within each range, the values ascribed to all identifiers and operators
  272. (apart from some manifest values) are listed in the order in which they were
  273. declared in the
  274. .BR range .
  275. Names are printed as a "#" followed by a number. Not much significance should
  276. be attached to these numbers except to note that the same name will always be
  277. printed as the same number. At the end of each range, the value of any active
  278. loop counter
  279. .RI ( .FOR )
  280. together with its increment and target
  281. .RI ( .BY
  282. and
  283. .IR .TO )
  284. will be printed.
  285. .SH ENVIRONMENT ENQUIRIES
  286. The following figures apply primarily to machines with a wordsize of 32 bits.
  287. Figures for 16-bit machines are given in parentheses where appropriate.
  288. .DS
  289. .IP
  290. .IR "max int"
  291. = 2147483647 (32767)
  292. .br
  293. .IR "max real"
  294. = 1.701411733192600E+38 (on the VAX)
  295. .br
  296. .IR "small real"
  297. = 3.469446951953614E-18 (on the VAX)
  298. .br
  299. .IR "bits width"
  300. = 32 (16)
  301. .br
  302. .IR "bytes width"
  303. = 4 (2)
  304. .br
  305. .IR "max abs char"
  306. = 127
  307. .br
  308. .IR "null character"
  309. = NULL
  310. .RI ( REPR(0) )
  311. .br
  312. .IR "int lengths" ,
  313. .IR "int shorths" ,
  314. .IR "real lengths" ,
  315. .IR "real shorths" ,
  316. .br
  317. .IR "bits lengths" ,
  318. .IR "bits shorths" ,
  319. .br
  320. .IR "bytes lengths" ,
  321. .IR "bytes shorths"
  322. .br
  323. all = 1
  324. .br
  325. .IR "int width"
  326. = 10 (5)
  327. .br
  328. .IR "real width"
  329. = 16
  330. .br
  331. .IR "exp width"
  332. = 3
  333. .br
  334. .IR "error character"
  335. = *
  336. .br
  337. .IR "flip"
  338. = T
  339. .br
  340. .IR "flop"
  341. = F
  342. .br
  343. On
  344. .IR "stand in channel" :
  345. .RS
  346. .br
  347. .RS
  348. .IR "get possible" ,
  349. .IR "reset possible"
  350. .RE
  351. .br
  352. On
  353. .IR "stand out channel" :
  354. .br
  355. .RS
  356. .IR "put possible" ,
  357. .IR "reset possible" ,
  358. .IR "compressible" ,
  359. .br
  360. .IR "estab possible"
  361. .RE
  362. .br
  363. On associated files:
  364. .br
  365. .RS
  366. .IR "get possible" ,
  367. .IR "put possiblle" ,
  368. .IR "set possible" ,
  369. .br
  370. .IR "reset possible"
  371. .DE
  372. .SH FILES
  373. .ta \w'/EMDISTR/lib/a68/a68s.out 'u
  374. .PD 0
  375. ~em/bin/a68s
  376. .br
  377. ~em/bin/indent68
  378. .br
  379. ~em/lib/em_a68s?? - the compiler
  380. .br
  381. ~em/lib/em_a68s_init?? - compiler initialization
  382. .br
  383. ~em/mach/lib/MACH/tail_a68s - runtime library
  384. .br
  385. ~em/lang/a68s/a68s.1 - this manual
  386. .SH BUGS
  387. There is no
  388. .IR REAL
  389. arithmetic on the SUNs.
  390. .LP
  391. Excessive static nesting (especially with
  392. .IR ELIF s
  393. or
  394. .IR CASE s
  395. with many alternatives) can exceed certain stack spaces in the compiler.
  396. .LP
  397. Dimensions of arrays are limited to 8.
  398. .LP
  399. .SH SEE ALSO
  400. .TP
  401. ack(I)
  402. .SH REFERENCES
  403. .TP
  404. [1]
  405. P. G. Hibbard,
  406. .IR "A Sublanguage of ALGOL 68" ,
  407. SIGPLAN Notices Vol. 12, No. 5, May 1977.
  408. .TP
  409. [2]
  410. C. H. Lindsey and S. G. van der Meulen,
  411. .IR "Informal Introduction to ALGOL 68" ,
  412. North Holland.
  413. .TP
  414. [3]
  415. Wilfred J. Hansen and Hendrik Boom,
  416. .IR "The Report on the Standard Hardware"
  417. .IR "Representation for ALGOL 68" ,
  418. SIGPLAN Notices Vol. 12, No. 5, May 1977.