home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk1.iso / altsrc / articles / 10651 < prev    next >
Text File  |  1994-06-19  |  62KB  |  1,294 lines

  1. Path: wupost!cs.utexas.edu!howland.reston.ans.net!spool.mu.edu!nigel.msen.com!zib-berlin.de!news.th-darmstadt.de!news.uni-mainz.de!ag
  2. From: ag@MuwiInfa.Geschichte.Uni-Mainz.DE (Albert Graef)
  3. Newsgroups: alt.sources
  4. Subject: Q - applicative programming language V1.7 - part 14/19
  5. Followup-To: alt.sources.d
  6. Date: 14 Jun 1994 08:52:54 GMT
  7. Organization: Musikinformatik, JoGu-Uni Mainz
  8. Lines: 1281
  9. Distribution: world
  10. Message-ID: <2tjr56$398@bambi.zdv.uni-mainz.de>
  11. NNTP-Posting-Host: muwiinfa.geschichte.uni-mainz.de
  12.  
  13. Archive-name: q-1.7/part14
  14. Submitted-by: ag@muwiinfa.geschichte.uni-mainz.de
  15.  
  16. #!/bin/sh
  17. # this is q-1.7.shar.14 (part 14 of a multipart archive)
  18. # do not concatenate these parts, unpack them in order with /bin/sh
  19. # file q-1.7/qdoc.info continued
  20. #
  21. if test ! -r _shar_seq_.tmp; then
  22.     echo 'Please unpack part 1 first!'
  23.     exit 1
  24. fi
  25. (read Scheck
  26.  if test "$Scheck" != 14; then
  27.     echo Please unpack part "$Scheck" next!
  28.     exit 1
  29.  else
  30.     exit 0
  31.  fi
  32. ) < _shar_seq_.tmp || exit 1
  33. if test ! -f _shar_wnt_.tmp; then
  34.     echo 'x - still skipping q-1.7/qdoc.info'
  35. else
  36. echo 'x - continuing file q-1.7/qdoc.info'
  37. sed 's/^X//' << 'SHAR_EOF' >> 'q-1.7/qdoc.info' &&
  38. X     : <CR>
  39. X     ** fac 0  =>  1                        bingo! reduce `fac 0' to `1'
  40. X         fac 1  =>  1*fac (1-1)             return to the suspended rule
  41. X     : <CR>
  42. X     ** 1*1  =>  1
  43. X     ** fac 1  =>  1                        final reduction ...
  44. X     1                                      ... and the result printed by
  45. X                                            the interpreter
  46. X     =>
  47. X
  48. X
  49. XFile: qdoc.info,  Node: References,  Next: Index,  Prev: Debugging,  Up: Top
  50. X
  51. XReferences
  52. X**********
  53. X
  54. XH. Abelson and G.J. Sussman. `Structure and Interpretation of Computer
  55. XPrograms.' MIT Press, Cambridge, Mass., 1985.
  56. X
  57. XAdobe Systems Incorporated. `PostScript Language Reference Manual.
  58. XSecond Edition.' Addison-Wesley, Reading, Mass., 1990.
  59. X
  60. XR. Bird and P. Wadler. `Introduction to Functional Programming.'
  61. XPrentice Hall, New York, 1988.
  62. X
  63. XN. Dershowitz and J.-P. Jouannaud. Rewrite Systems. In J. van Leeuwen,
  64. Xeditor, `Handbook of Theoretical Computer Science. B: Formal Models and
  65. XSemantics,' pages 243-320. North-Holland, Amsterdam, 1990.
  66. X
  67. XAlbert Graef. Left-to-right tree pattern matching. In `Proceedings
  68. XRewriting Techniques and Applications '91,' LNCS 488, pages 323-334.
  69. XSpringer, Berlin, 1991.
  70. X
  71. XP. Henderson. `Functional Programming: Application and Implementation.'
  72. XPrentice Hall, New York, 1980.
  73. X
  74. XM.C. Henson. `Elements of Functional Languages.' Blackwell Scientific
  75. XPublications, Oxford, 1987.
  76. X
  77. XJ.W. Klop. Term rewriting systems. TR CS-R9073, Centrum voor Wiskunde en
  78. XInformatica, Amsterdam (NL), 1990.
  79. X
  80. XG. Marsaglia and A. Zaman. Florida State University Report
  81. XFSU-SCRI-87-50, 1987.
  82. X
  83. XR. Milner, M. Tofte and R. Harper. `The Definition of Standard ML.' MIT
  84. XPress, 1990.
  85. X
  86. XM.J. O'Donnell. `Equational Logic as a Programming Language.' MIT Press,
  87. XCambridge, Mass., 1985.
  88. X
  89. XG.L. Steele, Jr. and G.J. Sussman. Scheme: An interpreter for the
  90. Xextended lambda calculus. Memo 349, MIT Artificial Intelligence
  91. XLaboratory, 1975.
  92. X
  93. X
  94. XFile: qdoc.info,  Node: Index,  Prev: References,  Up: Top
  95. X
  96. XIndex
  97. X*****
  98. X
  99. X* Menu:
  100. X
  101. X* fcopy, tail-recursive implementation: File I/O.
  102. X* abort evaluation with halt:           Miscellaneous Functions.
  103. X* abs:                                  Standard Functions.
  104. X* abstract data type (ADT):             Using Type Guards.
  105. X* abstract type:                        Sub- and Supertypes.
  106. X* abstract type:                        Type Guards.
  107. X* acos:                                 Mathematical Functions.
  108. X* active rules:                         Performing Reductions on a Stack.
  109. X* added value scripts:                  The Standard Library.
  110. X* additional string functions:          Additional String Functions.
  111. X* and:                                  Logical Operators.
  112. X* append:                               Arrays.
  113. X* append:                               Standard Functions.
  114. X* applicable equation:                  Normal Forms and Reduction Strategy.
  115. X* application:                          Applications.
  116. X* applicative order evaluation:         Normal Forms and Reduction Strategy.
  117. X* apply:                                Standard Functions.
  118. X* applyq:                               Standard Functions.
  119. X* arc:                                  Path Construction.
  120. X* arct:                                 Path Construction.
  121. X* ARGS:                                 Variable Definitions.
  122. X* argument:                             Applications.
  123. X* argument list:                        Declarations and Variable Definitions.
  124. X* arithmetic operators:                 Arithmetic Operators.
  125. X* array:                                Arrays.
  126. X* Array:                                Arrays.
  127. X* array.q:                              Arrays.
  128. X* array2:                               Arrays.
  129. X* arrays:                               Arrays.
  130. X* asin:                                 Mathematical Functions.
  131. X* assert:                               Diagnostics and Error Messages.
  132. X* assert.q:                             Diagnostics and Error Messages.
  133. X* assertions:                           Diagnostics and Error Messages.
  134. X* associative arrays:                   Dictionaries.
  135. X* atan:                                 Numeric Functions.
  136. X* AVL tree:                             Sub- and Supertypes.
  137. X* bag:                                  Bags.
  138. X* Bag:                                  Bags.
  139. X* bag.q:                                Bags.
  140. X* bags:                                 Bags.
  141. X* basic expressions:                    Expressions.
  142. X* batch mode:                           Running Compiler and Interpreter.
  143. X* binary minus:                         Built-In Operators.
  144. X* binary search tree:                   Using Type Guards.
  145. X* binding clause:                       List Comprehensions.
  146. X* Bool:                                 Built-In Types.
  147. X* bounding box (EPSF):                  DSC and EPSF Comments.
  148. X* break:                                Miscellaneous Functions.
  149. X* breakpoint:                           Miscellaneous Functions.
  150. X* built-in constants:                   Constants and Variables.
  151. X* built-in equations:                   Normal Forms and Reduction Strategy.
  152. X* built-in special forms:               Built-In Special Forms.
  153. X* built-in types:                       Built-In Types.
  154. X* cat:                                  Standard Functions.
  155. X* cdr'ing down a list:                  Equations.
  156. X* character sequences:                  Constants and Variables.
  157. X* character sequences:                  Lexical Matters.
  158. X* charpath:                             Path Construction.
  159. X* chars:                                Additional String Functions.
  160. X* chr:                                  Conversion Functions.
  161. X* clip:                                 Clipping.
  162. X* clippath:                             Path Construction.
  163. X* clipping path:                        Overview of Graphics Operations.
  164. X* closepath:                            Path Construction.
  165. X* closing a file:                       File I/O.
  166. X* closing a path:                       Overview of Graphics Operations.
  167. X* code file:                            Running Compiler and Interpreter.
  168. X* Color:                                Graphics State.
  169. X* combinatorial calculus:               Higher-Order Functions.
  170. X* command:                              Pipes.
  171. X* command line arguments:               Running Compiler and Interpreter.
  172. X* comment:                              Lexical Matters.
  173. X* compiler:                             Running Compiler and Interpreter.
  174. X* complete evaluation:                  Logical Operators.
  175. X* compose:                              Standard Functions.
  176. X* compound expressions:                 Expressions.
  177. X* concrete type:                        Sub- and Supertypes.
  178. X* cond:                                 Other Special Forms.
  179. X* condition part:                       Equations.
  180. X* conditional clause:                   List Comprehensions.
  181. X* conditional equation:                 Equations.
  182. X* conditional expression:               Basic Concepts.
  183. X* conditional rule, application of:     Conditional Rules.
  184. X* cons:                                 Standard Functions.
  185. X* consq:                                Standard Functions.
  186. X* const:                                Declarations and Variable Definitions.
  187. X* constant symbol:                      Declarations and Variable Definitions.
  188. X* container data structures:            Standard Types.
  189. X* conversion functions:                 Conversion Functions.
  190. X* coordinate system:                    Coordinate System.
  191. X* copies:                               Miscellaneous Operations.
  192. X* copypage:                             Miscellaneous Operations.
  193. X* cos:                                  Numeric Functions.
  194. X* cosh:                                 Mathematical Functions.
  195. X* cst:                                  Standard Functions.
  196. X* currying:                             Applications.
  197. X* curveto:                              Path Construction.
  198. X* cyclic inclusion:                     Include Scripts.
  199. X* dash pattern:                         Graphics State.
  200. X* data structure:                       Using Type Guards.
  201. X* debugger:                             Debugging.
  202. X* debugger commands:                    Debugging.
  203. X* debugger session:                     Debugging.
  204. X* debugger, activation of:              Debugging.
  205. X* declarations:                         Declarations and Variable Definitions.
  206. X* declarations, consistency:            Declarations and Variable Definitions.
  207. X* def:                                  Variable Definitions.
  208. X* default case:                         Equations.
  209. X* default declaration:                  Declarations and Variable Definitions.
  210. X* defer:                                Other Special Forms.
  211. X* delete:                               Dictionaries.
  212. X* delete:                               Sets.
  213. X* diagnostics:                          Diagnostics and Error Messages.
  214. X* dict:                                 Dictionaries.
  215. X* Dict:                                 Dictionaries.
  216. X* dict.q:                               Dictionaries.
  217. X* dictionaries:                         Dictionaries.
  218. X* digit sequence:                       Lexical Matters.
  219. X* disambiguating rules:                 Normal Forms and Reduction Strategy.
  220. X* disjunctive normal form:              Built-In Special Forms.
  221. X* div:                                  Arithmetic Operators.
  222. X* division by zero:                     Definitions and Expression Evaluation.
  223. X* do:                                   Standard Functions.
  224. X* document structuring conventions:     DSC and EPSF Comments.
  225. X* domain:                               Applications.
  226. X* double quotes:                        Lexical Matters.
  227. X* drawing:                              Overview of Graphics Operations.
  228. X* driver program:                       Running Compiler and Interpreter.
  229. X* drop:                                 Standard Functions.
  230. X* dropwhile:                            Standard Functions.
  231. X* DSC:                                  DSC and EPSF Comments.
  232. X* e:                                    Mathematical Functions.
  233. X* each:                                 Standard Functions.
  234. X* empty list:                           Constants and Variables.
  235. X* empty qualifier:                      Equations.
  236. X* empty tuple:                          Constants and Variables.
  237. X* emptybag:                             Bags.
  238. X* emptydict:                            Dictionaries.
  239. X* emptyheap:                            Heaps.
  240. X* emptyset:                             Sets.
  241. X* encapsulated PostScript:              DSC and EPSF Comments.
  242. X* environment file:                     Variable Definitions.
  243. X* environment variables:                Environment Variables.
  244. X* eoclip:                               Clipping.
  245. X* eof:                                  I/O Functions.
  246. X* eofill:                               Painting.
  247. X* EPSF:                                 DSC and EPSF Comments.
  248. X* eq:                                   Standard Functions.
  249. X* equality operator, on left-hand side of equation: Equations.
  250. X* equality, container data structures:  Standard Types.
  251. X* equality, lists:                      Standard Functions.
  252. X* equality, streams:                    Streams.
  253. X* equality, truth values:               Standard Functions.
  254. X* equality, tuples:                     Standard Functions.
  255. X* equation:                             Equations.
  256. X* erasepage:                            Miscellaneous Operations.
  257. X* ERROR:                                Variable Definitions.
  258. X* error:                                Diagnostics and Error Messages.
  259. X* error conditions:                     Error Handling.
  260. X* error message printing:               Diagnostics and Error Messages.
  261. X* error.q:                              Diagnostics and Error Messages.
  262. X* escape sequences:                     Lexical Matters.
  263. X* escape sequences, in filenames:       Scripts.
  264. X* evaluation stack:                     Performing Reductions on a Stack.
  265. X* exception:                            Normal Forms and Reduction Strategy.
  266. X* exist:                                Standard Functions.
  267. X* exists:                               File I/O.
  268. X* exit interpreter with quit:           Miscellaneous Functions.
  269. X* exp:                                  Numeric Functions.
  270. X* exponential function:                 Numeric Functions.
  271. X* expression:                           Expressions.
  272. X* expression predicates:                Expression Predicates.
  273. X* expression value:                     Normal Forms and Reduction Strategy.
  274. X* fac:                                  Writing a Script.
  275. X* factorial function:                   Writing a Script.
  276. X* factorial function, tail-recursive implementation: Tail Recursion.
  277. X* fcopy:                                File I/O.
  278. X* feof:                                 I/O Functions.
  279. X* fib:                                  Equations.
  280. X* Fibonacci function:                   Equations.
  281. X* Fibonacci function, tail-recursive implementation: Tail Recursion.
  282. X* File:                                 Built-In Types.
  283. X* file I/O:                             File I/O.
  284. X* file object:                          File I/O.
  285. X* file object, unparsing:               File I/O.
  286. X* filename:                             File I/O.
  287. X* fill:                                 Painting.
  288. X* filling:                              Overview of Graphics Operations.
  289. X* filter:                               Standard Functions.
  290. X* finite streams:                       Special Constructors.
  291. X* first:                                Dictionaries.
  292. X* first:                                Sets.
  293. X* first:                                Heaps.
  294. X* first:                                Arrays.
  295. X* float:                                Mathematical Functions.
  296. X* Float:                                Built-In Types.
  297. X* floating point format string:         Environment Variables.
  298. X* floating point number:                Constants and Variables.
  299. X* flushpage:                            Miscellaneous Operations.
  300. X* FLUSHPAGE:                            Overview of Graphics Operations.
  301. X* fmod:                                 Mathematical Functions.
  302. X* foldl:                                Standard Functions.
  303. X* foldl1:                               Standard Functions.
  304. X* foldr:                                Standard Functions.
  305. X* foldr1:                               Standard Functions.
  306. X* font:                                 Graphics State.
  307. X* fopen:                                File I/O.
  308. X* fopen:                                I/O Functions.
  309. X* force:                                Other Special Forms.
  310. X* formal parameters:                    Equations.
  311. X* formal parameters:                    Constants and Variables.
  312. X* frac:                                 Conversion Functions.
  313. X* fread:                                I/O Functions.
  314. X* freadc:                               I/O Functions.
  315. X* freadq:                               I/O Functions.
  316. X* freads:                               I/O Functions.
  317. X* free variable:                        Free Variables.
  318. X* free variable symbol:                 Declarations and Variable Definitions.
  319. X* fst:                                  Standard Functions.
  320. X* function:                             Applications.
  321. X* function symbol:                      Lexical Matters.
  322. X* fwrite:                               I/O Functions.
  323. X* fwritec:                              I/O Functions.
  324. X* fwriteq:                              I/O Functions.
  325. X* fwrites:                              I/O Functions.
  326. X* genlist:                              Standard Functions.
  327. X* genstream:                            Streams.
  328. X* Ghostscript:                          Graphics.
  329. X* GRAPHICS:                             Graphics.
  330. X* graphics:                             Graphics.
  331. X* graphics state:                       Overview of Graphics Operations.
  332. X* graphics.q:                           Graphics.
  333. X* grestore:                             Graphics State.
  334. X* gsave:                                Graphics State.
  335. X* halt:                                 Miscellaneous Functions.
  336. X* hd:                                   Standard Functions.
  337. X* header:                               Declarations and Variable Definitions.
  338. X* heap:                                 Heaps.
  339. X* Heap:                                 Heaps.
  340. X* heap.q:                               Heaps.
  341. X* heaps:                                Heaps.
  342. X* hidden constructors:                  Type Guards.
  343. X* hiding implementation details:        Using Type Guards.
  344. X* higher-order functions:               Higher-Order Functions.
  345. X* I/O functions:                        I/O Functions.
  346. X* id:                                   Standard Functions.
  347. X* identifier:                           Lexical Matters.
  348. X* include:                              Scripts.
  349. X* include directive:                    Scripts.
  350. X* infix operator symbols:               Expressions.
  351. X* information hiding:                   Using Type Guards.
  352. X* inheritance:                          Sub- and Supertypes.
  353. X* init:                                 Standard Functions.
  354. X* INPUT:                                Variable Definitions.
  355. X* input and output:                     I/O Functions.
  356. X* insert:                               Dictionaries.
  357. X* insert:                               Sets.
  358. X* insert:                               Heaps.
  359. X* insert:                               Arrays.
  360. X* int:                                  Conversion Functions.
  361. X* Int:                                  Built-In Types.
  362. X* integer:                              Constants and Variables.
  363. X* interactive mode:                     Running Compiler and Interpreter.
  364. X* interpreter:                          Running Compiler and Interpreter.
  365. X* interrupt key:                        Error Handling.
  366. X* ints:                                 Streams.
  367. X* isapp:                                Expression Predicates.
  368. X* isarray:                              Arrays.
  369. X* isbag:                                Bags.
  370. X* isbool:                               Expression Predicates.
  371. X* ischar:                               Expression Predicates.
  372. X* iscons:                               Expression Predicates.
  373. X* isconst:                              Miscellaneous Functions.
  374. X* isdef:                                Miscellaneous Functions.
  375. X* isdict:                               Dictionaries.
  376. X* isempty:                              Dictionaries.
  377. X* isempty:                              Sets.
  378. X* isempty:                              Heaps.
  379. X* isempty:                              Arrays.
  380. X* isfile:                               Expression Predicates.
  381. X* isfloat:                              Expression Predicates.
  382. X* isfun:                                Miscellaneous Functions.
  383. X* isheap:                               Heaps.
  384. X* isint:                                Expression Predicates.
  385. X* ismember:                             Dictionaries.
  386. X* ismember:                             Sets.
  387. X* isnum:                                Expression Predicates.
  388. X* ispair:                               Expression Predicates.
  389. X* isset:                                Sets.
  390. X* isspecial:                            Miscellaneous Functions.
  391. X* isstr:                                Expression Predicates.
  392. X* isstream:                             Streams.
  393. X* issym:                                Expression Predicates.
  394. X* isvar:                                Miscellaneous Functions.
  395. X* iterative algorithm:                  Tail Recursion.
  396. X* join:                                 Additional String Functions.
  397. X* keys:                                 Dictionaries.
  398. X* lambda:                               Lambda Calculus.
  399. X* lambda calculus:                      Lambda Calculus.
  400. X* lambda calculus:                      Higher-Order Functions.
  401. X* lambda, with side-effects:            Lambda Calculus.
  402. X* lambda, with special forms:           Lambda Calculus.
  403. X* lambda.q:                             Lambda Calculus.
  404. X* last:                                 Dictionaries.
  405. X* last:                                 Sets.
  406. X* last:                                 Arrays.
  407. X* last:                                 Standard Functions.
  408. X* left-hand side:                       Equations.
  409. X* leftmost-innermost evaluation:        Normal Forms and Reduction Strategy.
  410. X* leftsect:                             Miscellaneous Functions.
  411. X* leftsect:                             Built-In Special Forms.
  412. X* lex.q:                                Lexicographic List Ordering.
  413. X* lexicographic ordering, lists:        Lexicographic List Ordering.
  414. X* lexicographic ordering, strings:      Relational Operators.
  415. X* lexicographic ordering, tuples:       Lexicographic List Ordering.
  416. X* lg:                                   Mathematical Functions.
  417. X* library scripts:                      Include Scripts.
  418. X* lineto:                               Path Construction.
  419. X* list:                                 Streams.
  420. X* List:                                 Built-In Types.
  421. X* list:                                 Lists and Tuples.
  422. X* list comprehensions:                  List Comprehensions.
  423. X* list concatenation:                   String and List Operations.
  424. X* list operators:                       String and List Operations.
  425. X* list.q:                               List Comprehensions.
  426. X* listof:                               List Comprehensions.
  427. X* literal expression:                   The Special Form Quote.
  428. X* ln:                                   Numeric Functions.
  429. X* log:                                  Mathematical Functions.
  430. X* logarithm:                            Numeric Functions.
  431. X* logical operators:                    Logical Operators.
  432. X* ls:                                   Pipes.
  433. X* map:                                  Standard Functions.
  434. X* math.q:                               Mathematical Functions.
  435. X* mathematical functions:               Numeric Functions.
  436. X* mathematical functions (math.q):      Mathematical Functions.
  437. X* max:                                  Standard Functions.
  438. X* members:                              Dictionaries.
  439. X* members:                              Sets.
  440. X* members:                              Heaps.
  441. X* members:                              Arrays.
  442. X* members2:                             Arrays.
  443. X* mergesort:                            Sorting Algorithms.
  444. X* min:                                  Standard Functions.
  445. X* mkarray:                              Arrays.
  446. X* mkarray2:                             Arrays.
  447. X* mkdict:                               Dictionaries.
  448. X* mklist:                               Standard Functions.
  449. X* mkstream:                             Streams.
  450. X* mod:                                  Arithmetic Operators.
  451. X* mode argument (fopen):                File I/O.
  452. X* mode argument (popen):                Pipes.
  453. X* modifier:                             Declarations and Variable Definitions.
  454. X* module dependencies:                  Include Scripts.
  455. X* more:                                 Pipes.
  456. X* moveto:                               Path Construction.
  457. X* msort:                                Sorting Algorithms.
  458. X* multi-line mode:                      Running Compiler and Interpreter.
  459. X* multiple declarations:                Declarations and Variable Definitions.
  460. X* multisets:                            Bags.
  461. X* name clashes:                         Private Symbols.
  462. X* narc:                                 Path Construction.
  463. X* negative numbers:                     Built-In Operators.
  464. X* neq:                                  Standard Functions.
  465. X* nested includes:                      Include Scripts.
  466. X* nested lists:                         Lists and Tuples.
  467. X* nested tuples:                        Lists and Tuples.
  468. X* newline character:                    Lexical Matters.
  469. X* newpath:                              Path Construction.
  470. X* Newton's algorithm:                   Writing a Script.
  471. X* non-linear equation:                  Non-Linear Equations and Syntactic Equality.
  472. X* normal form:                          Normal Forms and Reduction Strategy.
  473. X* not:                                  Logical Operators.
  474. X* null character:                       Constants and Variables.
  475. X* Num:                                  Built-In Types.
  476. X* numeric constants:                    Lexical Matters.
  477. X* numeric constants, range and precision: Constants and Variables.
  478. X* numeric functions:                    Numeric Functions.
  479. X* object file:                          Scripts.
  480. X* operator associativity:               Built-In Operators.
  481. X* operator precedence:                  Built-In Operators.
  482. X* operator symbols:                     Built-In Operators.
  483. X* operator, as prefix function:         Built-In Operators.
  484. X* operators, on left-hand side of equation: Equations.
  485. X* options, compiler and interpreter:    Running Compiler and Interpreter.
  486. X* or:                                   Logical Operators.
  487. X* ord:                                  Conversion Functions.
  488. X* otherwise:                            Equations.
  489. X* OUTPUT:                               Variable Definitions.
  490. X* overlapping equations:                Include Scripts.
  491. X* overloading logical operations:       Built-In Special Forms.
  492. X* page description:                     Graphics.
  493. X* painting:                             Overview of Graphics Operations.
  494. X* pair:                                 Standard Functions.
  495. X* pairq:                                Standard Functions.
  496. X* parsing expressions:                  Conversion Functions.
  497. X* path:                                 Overview of Graphics Operations.
  498. X* pattern:                              Equations.
  499. X* pi:                                   Mathematical Functions.
  500. X* pipe:                                 Pipes.
  501. X* plain.q:                              Using the Interpreter.
  502. X* point unit:                           Coordinate System.
  503. X* polymorphic operation:                Sub- and Supertypes.
  504. X* pop:                                  Standard Functions.
  505. X* popen:                                I/O Functions.
  506. X* pos:                                  String Functions.
  507. X* position, in string:                  String Functions.
  508. X* PostScript:                           Graphics.
  509. X* prd:                                  Standard Functions.
  510. X* predefined type symbols:              Type Guards.
  511. X* predefined type symbols:              Declarations and Variable Definitions.
  512. X* prefix operator symbols:              Expressions.
  513. X* primitive operation:                  Normal Forms and Reduction Strategy.
  514. X* priority queues:                      Heaps.
  515. X* private:                              Declarations and Variable Definitions.
  516. X* private constructors:                 Using Type Guards.
  517. X* private constructors:                 Declarations and Variable Definitions.
  518. X* private namespace:                    Private Symbols.
  519. X* private symbol:                       Private Symbols.
  520. X* private symbol:                       Declarations and Variable Definitions.
  521. X* private symbols, notation:            Private Symbols.
  522. X* prompt string:                        Environment Variables.
  523. X* ps:                                   Miscellaneous Operations.
  524. X* psfile:                               Miscellaneous Operations.
  525. X* psheader:                             Miscellaneous Operations.
  526. X* psstr:                                Miscellaneous Operations.
  527. X* public:                               Declarations and Variable Definitions.
  528. X* public symbol:                        Private Symbols.
  529. X* public symbol:                        Declarations and Variable Definitions.
  530. X* public symbols, redeclared private:   Private Symbols.
  531. X* push:                                 Standard Functions.
  532. X* q:                                    Running Compiler and Interpreter.
  533. X* Q code:                               Using Q.
  534. X* q.env:                                Variable Definitions.
  535. X* q.out:                                Running Compiler and Interpreter.
  536. X* qc:                                   Running Compiler and Interpreter.
  537. X* QFS:                                  Environment Variables.
  538. X* qi:                                   Running Compiler and Interpreter.
  539. X* QPATH:                                Environment Variables.
  540. X* QPS:                                  Environment Variables.
  541. X* qsort:                                Sorting Algorithms.
  542. X* qualifier:                            Equations.
  543. X* quasiquote:                           Other Special Forms.
  544. X* quicksort:                            Sorting Algorithms.
  545. X* quit:                                 Miscellaneous Functions.
  546. X* quote:                                Miscellaneous Functions.
  547. X* quote:                                The Special Form Quote.
  548. X* quoted expression:                    The Special Form Quote.
  549. X* random:                               Numeric Functions.
  550. X* random numbers:                       Numeric Functions.
  551. X* range:                                Standard Functions.
  552. X* range:                                Applications.
  553. X* rcurveto:                             Path Construction.
  554. X* read:                                 I/O Functions.
  555. X* readc:                                I/O Functions.
  556. X* readq:                                I/O Functions.
  557. X* reads:                                I/O Functions.
  558. X* reciprocal function:                  Sections.
  559. X* recursive definition:                 Tail Recursion.
  560. X* recursive evaluation:                 Performing Reductions on a Stack.
  561. X* recursive lambdas:                    Lambda Calculus.
  562. X* redex:                                Normal Forms and Reduction Strategy.
  563. X* reduction:                            Normal Forms and Reduction Strategy.
  564. X* reduction stack:                      Performing Reductions on a Stack.
  565. X* reduction strategy:                   Normal Forms and Reduction Strategy.
  566. X* reductions, tracing of:               Debugging.
  567. X* relational operators:                 Relational Operators.
  568. X* repeat:                               Standard Functions.
  569. X* reserved words:                       Lexical Matters.
  570. X* restorematrix:                        Graphics State.
  571. X* reverse:                              Standard Functions.
  572. X* rewriting model:                      Performing Reductions on a Stack.
  573. X* right-hand side:                      Equations.
  574. X* rightsect:                            Miscellaneous Functions.
  575. X* rightsect:                            Built-In Special Forms.
  576. X* rlineto:                              Path Construction.
  577. X* rmfirst:                              Dictionaries.
  578. X* rmfirst:                              Sets.
  579. X* rmfirst:                              Heaps.
  580. X* rmfirst:                              Arrays.
  581. X* rmlast:                               Dictionaries.
  582. X* rmlast:                               Sets.
  583. X* rmlast:                               Arrays.
  584. X* rmoveto:                              Path Construction.
  585. X* rotate:                               Graphics State.
  586. X* round:                                Conversion Functions.
  587. X* rule:                                 Equations.
  588. X* runtime error:                        Error Handling.
  589. X* savematrix:                           Graphics State.
  590. X* scale:                                Graphics State.
  591. X* scaling factor:                       Lexical Matters.
  592. X* scan:                                 Standard Functions.
  593. X* scan1:                                Standard Functions.
  594. X* scope:                                Declarations and Variable Definitions.
  595. X* scope, symbol in type declaration:    Declarations and Variable Definitions.
  596. X* scope-modifier prefix:                Declarations and Variable Definitions.
  597. X* script:                               Scripts.
  598. X* search path:                          Environment Variables.
  599. X* search tree operations:               Using Type Guards.
  600. X* section:                              Sections.
  601. X* sections, implementation:             Built-In Special Forms.
  602. X* seed:                                 Numeric Functions.
  603. X* separate compilation:                 Include Scripts.
  604. X* sequence operator:                    The Sequence Operator.
  605. X* sequence operator, used with I/O operations: Terminal I/O.
  606. X* set:                                  Sets.
  607. X* Set:                                  Sets.
  608. X* set breakpoints with break:           Miscellaneous Functions.
  609. X* set.q:                                Sets.
  610. X* set/bag comparison:                   Standard Types.
  611. X* set/bag difference:                   Standard Types.
  612. X* set/bag intersection:                 Standard Types.
  613. X* set/bag union:                        Standard Types.
  614. X* setcmykcolor:                         Graphics State.
  615. X* setcolor:                             Graphics State.
  616. X* setdash:                              Graphics State.
  617. X* setfont:                              Graphics State.
  618. X* setgray:                              Graphics State.
  619. X* sethsbcolor:                          Graphics State.
  620. X* setlinecap:                           Graphics State.
  621. X* setlinejoin:                          Graphics State.
  622. X* setlinewidth:                         Graphics State.
  623. X* setrgbcolor:                          Graphics State.
  624. X* sets:                                 Sets.
  625. X* sgn:                                  Standard Functions.
  626. X* short circuit evaluation:             Logical Operators.
  627. X* short-circuit mode:                   Built-In Special Forms.
  628. X* show:                                 Painting.
  629. X* showerr:                              Diagnostics and Error Messages.
  630. X* showpage:                             Miscellaneous Operations.
  631. X* side-effects, in I/O operations:      I/O Functions.
  632. X* sieve of Erathosthenes:               Streams.
  633. X* sin:                                  Numeric Functions.
  634. X* sinh:                                 Mathematical Functions.
  635. X* size operator:                        String and List Operations.
  636. X* size operator, container data structures: Standard Types.
  637. X* snd:                                  Standard Functions.
  638. X* sort.q:                               Sorting Algorithms.
  639. X* sorting algorithms:                   Sorting Algorithms.
  640. X* special:                              Declarations and Variable Definitions.
  641. X* special argument:                     Basic Concepts.
  642. X* special case rule:                    Normal Forms and Reduction Strategy.
  643. X* special constructor:                  Special Constructors.
  644. X* special form:                         Special Forms.
  645. X* special.q:                            Other Special Forms.
  646. X* splice:                               Other Special Forms.
  647. X* split:                                Additional String Functions.
  648. X* sqrt:                                 Numeric Functions.
  649. X* square root:                          Numeric Functions.
  650. X* standard error device:                Variable Definitions.
  651. X* standard functions:                   Standard Functions.
  652. X* standard input/output devices:        Variable Definitions.
  653. X* standard library scripts:             The Standard Library.
  654. X* standard types:                       Standard Types.
  655. X* state variables:                      Tail Recursion.
  656. X* std.q:                                The Standard Library.
  657. X* stdlib.q:                             Standard Functions.
  658. X* stdm.q:                               The Standard Library.
  659. X* stdtypes.q:                           Standard Types.
  660. X* str:                                  Conversion Functions.
  661. X* strcat:                               Additional String Functions.
  662. X* stream:                               Streams.
  663. X* Stream:                               Streams.
  664. X* stream:                               Special Constructors.
  665. X* stream comprehensions:                Streams.
  666. X* stream.q:                             Streams.
  667. X* streamcat:                            Streams.
  668. X* streamof:                             Streams.
  669. X* streamp:                              Streams.
  670. X* streams:                              Streams.
  671. X* streams, overloaded list operations:  Streams.
  672. X* String:                               Built-In Types.
  673. X* string:                               Constants and Variables.
  674. X* string comparison:                    Relational Operators.
  675. X* string concatenation:                 String and List Operations.
  676. X* string constants:                     Lexical Matters.
  677. X* string functions:                     String Functions.
  678. X* string functions (string.q):          Additional String Functions.
  679. X* string operators:                     String and List Operations.
  680. X* string.q:                             Additional String Functions.
  681. X* stroke:                               Painting.
  682. X* strq:                                 Conversion Functions.
  683. X* subpath:                              Overview of Graphics Operations.
  684. X* subscript operator:                   String and List Operations.
  685. X* substr:                               String Functions.
  686. X* subtype:                              Sub- and Supertypes.
  687. X* sum:                                  Standard Functions.
  688. X* supertype:                            Sub- and Supertypes.
  689. X* syntactic equality:                   Non-Linear Equations and Syntactic Equality.
  690. X* syntactic identity:                   Non-Linear Equations and Syntactic Equality.
  691. X* tab character:                        Lexical Matters.
  692. X* tail recursion:                       Tail Recursion.
  693. X* tail recursion optimization:          Tail Recursion.
  694. X* tail reduction:                       Tail Recursion.
  695. X* tail-recursive programming:           Tail Recursion.
  696. X* take:                                 Standard Functions.
  697. X* takewhile:                            Standard Functions.
  698. X* tan:                                  Mathematical Functions.
  699. X* tanh:                                 Mathematical Functions.
  700. X* terminal I/O:                         Terminal I/O.
  701. X* terminal input:                       Terminal I/O.
  702. X* terminal output:                      Terminal I/O.
  703. X* text output (graphics):               Overview of Graphics Operations.
  704. X* tl:                                   Standard Functions.
  705. X* top:                                  Standard Functions.
  706. X* translate:                            Graphics State.
  707. X* trigonometric functions:              Numeric Functions.
  708. X* trunc:                                Conversion Functions.
  709. X* truth values:                         Constants and Variables.
  710. X* tuple:                                Lists and Tuples.
  711. X* tuples and parenthesized expressions: Built-In Operators.
  712. X* type:                                 Types.
  713. X* type declaration:                     Using Type Guards.
  714. X* type declaration:                     Declarations and Variable Definitions.
  715. X* type guard:                           Types.
  716. X* type guard:                           Type Guards.
  717. X* type hierarchy:                       Type Guards.
  718. X* type identifier:                      Declarations and Variable Definitions.
  719. X* type.q:                               Expression Predicates.
  720. X* unary minus:                          Built-In Operators.
  721. X* undef:                                Variable Definitions.
  722. X* unit length:                          Coordinate System.
  723. X* universal quantification:             Equations.
  724. X* unparsing expressions:                Conversion Functions.
  725. X* until:                                Standard Functions.
  726. X* unzip:                                Standard Functions.
  727. X* update:                               Dictionaries.
  728. X* update:                               Arrays.
  729. X* update2:                              Arrays.
  730. X* val:                                  Conversion Functions.
  731. X* valq:                                 Conversion Functions.
  732. X* vals:                                 Dictionaries.
  733. X* value:                                Standard Functions.
  734. X* var:                                  Declarations and Variable Definitions.
  735. X* variable binding (listof):            List Comprehensions.
  736. X* variable bindings:                    Performing Reductions on a Stack.
  737. X* variable definition:                  Declarations and Variable Definitions.
  738. X* variable definition, command line:    Variable Definitions.
  739. X* variable symbol:                      Lexical Matters.
  740. X* variable, as constant value:          Free Variables.
  741. X* variable, multiple occurrence on left-hand side: Non-Linear Equations and Syntactic Equality.
  742. X* variadic functions:                   Applications.
  743. X* warning messages:                     Include Scripts.
  744. X* write:                                I/O Functions.
  745. X* writec:                               I/O Functions.
  746. X* writeq:                               I/O Functions.
  747. X* writes:                               I/O Functions.
  748. X* zip:                                  Standard Functions.
  749. X* \":                                   Lexical Matters.
  750. X* \0:                                   Constants and Variables.
  751. X* \b:                                   Lexical Matters.
  752. X* \f:                                   Lexical Matters.
  753. X* \n:                                   Lexical Matters.
  754. X* \r:                                   Lexical Matters.
  755. X* \t:                                   Lexical Matters.
  756. X* \\:                                   Lexical Matters.
  757. X
  758. X
  759. X
  760. XTag Table:
  761. XNode: Top1369
  762. XNode: Introduction1928
  763. XNode: Getting Started10669
  764. XNode: Using the Interpreter11644
  765. XNode: Using the Standard Library14502
  766. XNode: Writing a Script18615
  767. XNode: Definitions and Expression Evaluation20803
  768. XNode: Runtime Errors25342
  769. XNode: Lexical Matters27421
  770. XNode: Declarations and Variable Definitions31544
  771. XNode: Expressions39187
  772. XNode: Constants and Variables41599
  773. XNode: Applications43996
  774. XNode: Lists and Tuples48942
  775. XNode: Built-In Operators51983
  776. XNode: Arithmetic Operators54994
  777. XNode: Relational Operators56062
  778. XNode: Logical Operators57806
  779. XNode: String and List Operations59159
  780. XNode: The Sequence Operator60147
  781. XNode: Sections60845
  782. XNode: Equations and Expression Evaluation62192
  783. XNode: Equations63647
  784. XNode: Higher-Order Functions69266
  785. XNode: Non-Linear Equations and Syntactic Equality72253
  786. XNode: Free Variables74982
  787. XNode: Type Guards76799
  788. XNode: Normal Forms and Reduction Strategy80430
  789. XNode: Conditional Rules88656
  790. XNode: Performing Reductions on a Stack90231
  791. XNode: Tail Recursion96463
  792. XNode: Error Handling101649
  793. XNode: Scripts103378
  794. XNode: Include Scripts105382
  795. XNode: Private Symbols108280
  796. XNode: Types110483
  797. XNode: Using Type Guards111138
  798. XNode: Built-In Types117133
  799. XNode: Sub- and Supertypes119119
  800. XNode: Special Forms124725
  801. XNode: Basic Concepts125538
  802. XNode: Form of Special Declarations130062
  803. XNode: Special Constructors130971
  804. XNode: Built-In Special Forms133226
  805. XNode: The Special Form Quote137060
  806. XNode: Built-In Functions138196
  807. XNode: Numeric Functions138862
  808. XNode: String Functions140021
  809. XNode: Conversion Functions141146
  810. XNode: I/O Functions142840
  811. XNode: Terminal I/O144029
  812. XNode: File I/O147081
  813. XNode: Pipes150606
  814. XNode: Miscellaneous Functions152629
  815. XNode: The Standard Library155035
  816. XNode: Standard Functions157400
  817. XNode: Additional String Functions160891
  818. XNode: Expression Predicates161601
  819. XNode: Sorting Algorithms162415
  820. XNode: Standard Types163033
  821. XNode: Arrays164045
  822. XNode: Heaps165333
  823. XNode: Sets166558
  824. XNode: Bags167579
  825. XNode: Dictionaries168074
  826. XNode: Lambda Calculus169597
  827. XNode: List Comprehensions170846
  828. XNode: Streams172442
  829. XNode: Other Special Forms175201
  830. XNode: Mathematical Functions176952
  831. XNode: Graphics177546
  832. XNode: Coordinate System179904
  833. XNode: Overview of Graphics Operations180567
  834. XNode: Path Construction186667
  835. XNode: Painting188808
  836. XNode: Clipping189468
  837. XNode: Graphics State189954
  838. XNode: Miscellaneous Operations193400
  839. XNode: DSC and EPSF Comments195077
  840. XNode: Lexicographic List Ordering197234
  841. XNode: Diagnostics and Error Messages197673
  842. XNode: Q Language Grammar198488
  843. XNode: Using Q202307
  844. XNode: Running Compiler and Interpreter203554
  845. XNode: Variable Definitions210984
  846. XNode: Running Scripts from the Shell214329
  847. XNode: Environment Variables215393
  848. XNode: Debugging216887
  849. XNode: References220725
  850. XNode: Index222257
  851. X
  852. XEnd Tag Table
  853. SHAR_EOF
  854. echo 'File q-1.7/qdoc.info is complete' &&
  855. chmod 0644 q-1.7/qdoc.info ||
  856. echo 'restore of q-1.7/qdoc.info failed'
  857. Wc_c="`wc -c < 'q-1.7/qdoc.info'`"
  858. test 264239 -eq "$Wc_c" ||
  859.     echo 'q-1.7/qdoc.info: original size 264239, current size' "$Wc_c"
  860. rm -f _shar_wnt_.tmp
  861. fi
  862. # ============= q-1.7/texinfo.tex ==============
  863. if test -f 'q-1.7/texinfo.tex' -a X"$1" != X"-c"; then
  864.     echo 'x - skipping q-1.7/texinfo.tex (File already exists)'
  865.     rm -f _shar_wnt_.tmp
  866. else
  867. > _shar_wnt_.tmp
  868. echo 'x - extracting q-1.7/texinfo.tex (Text)'
  869. sed 's/^X//' << 'SHAR_EOF' > 'q-1.7/texinfo.tex' &&
  870. X%% TeX macros to handle texinfo files
  871. X
  872. X%   Copyright (C) 1985, 86, 88, 90, 91, 92, 1993 Free Software Foundation, Inc.
  873. X
  874. X%This texinfo.tex file is free software; you can redistribute it and/or
  875. X%modify it under the terms of the GNU General Public License as
  876. X%published by the Free Software Foundation; either version 2, or (at
  877. X%your option) any later version.
  878. X
  879. X%This texinfo.tex file is distributed in the hope that it will be
  880. X%useful, but WITHOUT ANY WARRANTY; without even the implied warranty
  881. X%of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  882. X%General Public License for more details.
  883. X
  884. X%You should have received a copy of the GNU General Public License
  885. X%along with this texinfo.tex file; see the file COPYING.  If not, write
  886. X%to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
  887. X%USA.
  888. X
  889. X
  890. X%In other words, you are welcome to use, share and improve this program.
  891. X%You are forbidden to forbid anyone else to use, share and improve
  892. X%what you give them.   Help stamp out software-hoarding!
  893. X
  894. X\def\texinfoversion{2.115}
  895. X\message{Loading texinfo package [Version \texinfoversion]:}
  896. X
  897. X% Print the version number if in a .fmt file.
  898. X\everyjob{\message{[Texinfo version \texinfoversion]}\message{}}
  899. X
  900. X% Save some parts of plain tex whose names we will redefine.
  901. X
  902. X\let\ptexlbrace=\{
  903. X\let\ptexrbrace=\}
  904. X\let\ptexdots=\dots
  905. X\let\ptexdot=\.
  906. X\let\ptexstar=\*
  907. X\let\ptexend=\end
  908. X\let\ptexbullet=\bullet
  909. X\let\ptexb=\b
  910. X\let\ptexc=\c
  911. X\let\ptexi=\i
  912. X\let\ptext=\t
  913. X\let\ptexl=\l
  914. X\let\ptexL=\L
  915. X
  916. X\def\tie{\penalty 10000\ }     % Save plain tex definition of ~.
  917. X
  918. X\message{Basics,}
  919. X\chardef\other=12
  920. X
  921. X% If this character appears in an error message or help string, it
  922. X% starts a new line in the output.
  923. X\newlinechar = `^^J
  924. X
  925. X% Ignore a token.
  926. X%
  927. X\def\gobble#1{}
  928. X
  929. X\hyphenation{ap-pen-dix}
  930. X\hyphenation{mini-buf-fer mini-buf-fers}
  931. X\hyphenation{eshell}
  932. X
  933. X% Margin to add to right of even pages, to left of odd pages.
  934. X\newdimen \bindingoffset  \bindingoffset=0pt
  935. X\newdimen \normaloffset   \normaloffset=\hoffset
  936. X\newdimen\pagewidth \newdimen\pageheight
  937. X\pagewidth=\hsize \pageheight=\vsize
  938. X
  939. X% Sometimes it is convenient to have everything in the transcript file
  940. X% and nothing on the terminal.  We don't just call \tracingall here,
  941. X% since that produces some useless output on the terminal.
  942. X%
  943. X\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
  944. X\def\loggingall{\tracingcommands2 \tracingstats2
  945. X   \tracingpages1 \tracingoutput1 \tracinglostchars1
  946. X   \tracingmacros2 \tracingparagraphs1 \tracingrestores1
  947. X   \showboxbreadth\maxdimen\showboxdepth\maxdimen
  948. X}%
  949. X
  950. X%---------------------Begin change-----------------------
  951. X%
  952. X%%%% For @cropmarks command.
  953. X% Dimensions to add cropmarks at corners Added by P. A. MacKay, 12 Nov. 1986
  954. X%
  955. X\newdimen\cornerlong \newdimen\cornerthick
  956. X\newdimen \topandbottommargin
  957. X\newdimen \outerhsize \newdimen \outervsize
  958. X\cornerlong=1pc\cornerthick=.3pt    % These set size of cropmarks
  959. X\outerhsize=7in
  960. X%\outervsize=9.5in
  961. X% Alternative @smallbook page size is 9.25in
  962. X\outervsize=9.25in
  963. X\topandbottommargin=.75in
  964. X%
  965. X%---------------------End change-----------------------
  966. X
  967. X% \onepageout takes a vbox as an argument.  Note that \pagecontents
  968. X% does insertions itself, but you have to call it yourself.
  969. X\chardef\PAGE=255  \output={\onepageout{\pagecontents\PAGE}}
  970. X\def\onepageout#1{\hoffset=\normaloffset
  971. X\ifodd\pageno  \advance\hoffset by \bindingoffset
  972. X\else \advance\hoffset by -\bindingoffset\fi
  973. X{\escapechar=`\\\relax % makes sure backslash is used in output files.
  974. X\shipout\vbox{{\let\hsize=\pagewidth \makeheadline} \pagebody{#1}%
  975. X{\let\hsize=\pagewidth \makefootline}}}%
  976. X\advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
  977. X
  978. X%%%% For @cropmarks command %%%%
  979. X
  980. X% Here is a modification of the main output routine for Near East Publications
  981. X% This provides right-angle cropmarks at all four corners.
  982. X% The contents of the page are centerlined into the cropmarks,
  983. X% and any desired binding offset is added as an \hskip on either
  984. X% site of the centerlined box.  (P. A. MacKay, 12 November, 1986)
  985. X%
  986. X\def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up
  987. X{\escapechar=`\\\relax % makes sure backslash is used in output files.
  988. X         \shipout
  989. X         \vbox to \outervsize{\hsize=\outerhsize
  990. X                 \vbox{\line{\ewtop\hfill\ewtop}}
  991. X                 \nointerlineskip
  992. X                 \line{\vbox{\moveleft\cornerthick\nstop}
  993. X                       \hfill
  994. X                       \vbox{\moveright\cornerthick\nstop}}
  995. X                 \vskip \topandbottommargin
  996. X                 \centerline{\ifodd\pageno\hskip\bindingoffset\fi
  997. X            \vbox{
  998. X            {\let\hsize=\pagewidth \makeheadline}
  999. X            \pagebody{#1}
  1000. X            {\let\hsize=\pagewidth \makefootline}}
  1001. X            \ifodd\pageno\else\hskip\bindingoffset\fi}
  1002. X         \vskip \topandbottommargin plus1fill minus1fill
  1003. X                 \boxmaxdepth\cornerthick
  1004. X                 \line{\vbox{\moveleft\cornerthick\nsbot}
  1005. X                       \hfill
  1006. X                       \vbox{\moveright\cornerthick\nsbot}}
  1007. X                 \nointerlineskip
  1008. X                 \vbox{\line{\ewbot\hfill\ewbot}}
  1009. X    }}
  1010. X  \advancepageno
  1011. X  \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
  1012. X%
  1013. X% Do @cropmarks to get crop marks
  1014. X\def\cropmarks{\let\onepageout=\croppageout }
  1015. X
  1016. X\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
  1017. X{\catcode`\@ =11
  1018. X\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
  1019. X\dimen@=\dp#1 \unvbox#1
  1020. X\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
  1021. X\ifr@ggedbottom \kern-\dimen@ \vfil \fi}
  1022. X}
  1023. X
  1024. X%
  1025. X% Here are the rules for the cropmarks.  Note that they are
  1026. X% offset so that the space between them is truly \outerhsize or \outervsize
  1027. X% (P. A. MacKay, 12 November, 1986)
  1028. X%
  1029. X\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
  1030. X\def\nstop{\vbox
  1031. X  {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
  1032. X\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
  1033. X\def\nsbot{\vbox
  1034. X  {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
  1035. X
  1036. X% Parse an argument, then pass it to #1.  The argument is the rest of
  1037. X% the input line (except we remove a trailing comment).  #1 should be a
  1038. X% macro which expects an ordinary undelimited TeX argument.
  1039. X%
  1040. X\def\parsearg#1{%
  1041. X  \let\next = #1%
  1042. X  \begingroup
  1043. X    \obeylines
  1044. X    \futurelet\temp\parseargx
  1045. X}
  1046. X
  1047. X% If the next token is an obeyed space (from an @example environment or
  1048. X% the like), remove it and recurse.  Otherwise, we're done.
  1049. X\def\parseargx{%
  1050. X  % \obeyedspace is defined far below, after the definition of \sepspaces.
  1051. X  \ifx\obeyedspace\temp
  1052. X    \expandafter\parseargdiscardspace
  1053. X  \else
  1054. X    \expandafter\parseargline
  1055. X  \fi
  1056. X}
  1057. X
  1058. X% Remove a single space (as the delimiter token to the macro call).
  1059. X{\obeyspaces %
  1060. X \gdef\parseargdiscardspace {\futurelet\temp\parseargx}}
  1061. X
  1062. X{\obeylines %
  1063. X  \gdef\parseargline#1^^M{%
  1064. X    \endgroup % End of the group started in \parsearg.
  1065. X    %
  1066. X    % First remove any @c comment, then any @comment.
  1067. X    % Result of each macro is put in \toks0.
  1068. X    \argremovec #1\c\relax %
  1069. X    \expandafter\argremovecomment \the\toks0 \comment\relax %
  1070. X    %
  1071. X    % Call the caller's macro, saved as \next in \parsearg.
  1072. X    \expandafter\next\expandafter{\the\toks0}%
  1073. X  }%
  1074. X}
  1075. X
  1076. X% Since all \c{,omment} does is throw away the argument, we can let TeX
  1077. X% do that for us.  The \relax here is matched by the \relax in the call
  1078. X% in \parseargline; it could be more or less anything, its purpose is
  1079. X% just to delimit the argument to the \c.
  1080. X\def\argremovec#1\c#2\relax{\toks0 = {#1}}
  1081. X\def\argremovecomment#1\comment#2\relax{\toks0 = {#1}}
  1082. X
  1083. X% \argremovec{,omment} might leave us with trailing spaces, though; e.g.,
  1084. X%    @end itemize  @c foo
  1085. X% will have two active spaces as part of the argument with the
  1086. X% `itemize'.  Here we remove all active spaces from #1, and assign the
  1087. X% result to \toks0.
  1088. X%
  1089. X% This loses if there are any *other* active characters besides spaces
  1090. X% in the argument -- _ ^ +, for example -- since they get expanded.
  1091. X% Fortunately, Texinfo does not define any such commands.  (If it ever
  1092. X% does, the catcode of the characters in questionwill have to be changed
  1093. X% here.)  But this means we cannot call \removeactivespaces as part of
  1094. X% \argremovec{,omment}, since @c uses \parsearg, and thus the argument
  1095. X% that \parsearg gets might well have any character at all in it.
  1096. X%
  1097. X\def\removeactivespaces#1{%
  1098. X  \begingroup
  1099. X    \ignoreactivespaces
  1100. X    \edef\temp{#1}%
  1101. X    \global\toks0 = \expandafter{\temp}%
  1102. X  \endgroup
  1103. X}
  1104. X
  1105. X% Change the active space to expand to nothing.
  1106. X%
  1107. X\begingroup
  1108. X  \obeyspaces
  1109. X  \gdef\ignoreactivespaces{\obeyspaces\let =\empty}
  1110. X\endgroup
  1111. X
  1112. X
  1113. X\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
  1114. X
  1115. X%% These are used to keep @begin/@end levels from running away
  1116. X%% Call \inENV within environments (after a \begingroup)
  1117. X\newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi}
  1118. X\def\ENVcheck{%
  1119. X\ifENV\errmessage{Still within an environment.  Type Return to continue.}
  1120. X\endgroup\fi} % This is not perfect, but it should reduce lossage
  1121. X
  1122. X% @begin foo  is the same as @foo, for now.
  1123. X\newhelp\EMsimple{Type <Return> to continue.}
  1124. X
  1125. X\outer\def\begin{\parsearg\beginxxx}
  1126. X
  1127. X\def\beginxxx #1{%
  1128. X\expandafter\ifx\csname #1\endcsname\relax
  1129. X{\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else
  1130. X\csname #1\endcsname\fi}
  1131. X
  1132. X% @end foo executes the definition of \Efoo.
  1133. X%
  1134. X\def\end{\parsearg\endxxx}
  1135. X\def\endxxx #1{%
  1136. X  \removeactivespaces{#1}%
  1137. X  \edef\endthing{\the\toks0}%
  1138. X  %
  1139. X  \expandafter\ifx\csname E\endthing\endcsname\relax
  1140. X    \expandafter\ifx\csname \endthing\endcsname\relax
  1141. X      % There's no \foo, i.e., no ``environment'' foo.
  1142. X      \errhelp = \EMsimple
  1143. X      \errmessage{Undefined command `@end \endthing'}%
  1144. X    \else
  1145. X      \unmatchedenderror\endthing
  1146. X    \fi
  1147. X  \else
  1148. X    % Everything's ok; the right environment has been started.
  1149. X    \csname E\endthing\endcsname
  1150. X  \fi
  1151. X}
  1152. X
  1153. X% There is an environment #1, but it hasn't been started.  Give an error.
  1154. X%
  1155. X\def\unmatchedenderror#1{%
  1156. X  \errhelp = \EMsimple
  1157. X  \errmessage{This `@end #1' doesn't have a matching `@#1'}%
  1158. X}
  1159. X
  1160. X% Define the control sequence \E#1 to give an unmatched @end error.
  1161. X%
  1162. X\def\defineunmatchedend#1{%
  1163. X  \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}%
  1164. X}
  1165. X
  1166. X
  1167. X% Single-spacing is done by various environments (specifically, in
  1168. X% \nonfillstart and \quotations).
  1169. X\newskip\singlespaceskip \singlespaceskip = \baselineskip
  1170. X\def\singlespace{%
  1171. X% Why was this kern here?  It messes up equalizing space above and below
  1172. X% environments.  --karl, 6may93
  1173. X%{\advance \baselineskip by -\singlespaceskip
  1174. X%\kern \baselineskip}%
  1175. X\baselineskip=\singlespaceskip
  1176. X}
  1177. X
  1178. X%% Simple single-character @ commands
  1179. X
  1180. X% @@ prints an @
  1181. X% Kludge this until the fonts are right (grr).
  1182. X\def\@{{\tt \char '100}}
  1183. X
  1184. X% This is turned off because it was never documented
  1185. X% and you can use @w{...} around a quote to suppress ligatures.
  1186. X%% Define @` and @' to be the same as ` and '
  1187. X%% but suppressing ligatures.
  1188. X%\def\`{{`}}
  1189. X%\def\'{{'}}
  1190. X
  1191. X% Used to generate quoted braces.
  1192. X
  1193. X\def\mylbrace {{\tt \char '173}}
  1194. X\def\myrbrace {{\tt \char '175}}
  1195. X\let\{=\mylbrace
  1196. X\let\}=\myrbrace
  1197. X
  1198. X% @: forces normal size whitespace following.
  1199. X\def\:{\spacefactor=1000 }
  1200. X
  1201. X% @* forces a line break.
  1202. X\def\*{\hfil\break\hbox{}\ignorespaces}
  1203. X
  1204. X% @. is an end-of-sentence period.
  1205. X\def\.{.\spacefactor=3000 }
  1206. X
  1207. X% @w prevents a word break.  Without the \leavevmode, @w at the
  1208. X% beginning of a paragraph, when TeX is still in vertical mode, would
  1209. X% produce a whole line of output instead of starting the paragraph.
  1210. X\def\w#1{\leavevmode\hbox{#1}}
  1211. X
  1212. X% @group ... @end group forces ... to be all on one page, by enclosing
  1213. X% it in a TeX vbox.  We use \vtop instead of \vbox to construct the box
  1214. X% to keep its height that of a normal line.  According to the rules for
  1215. X% \topskip (p.114 of the TeXbook), the glue inserted is
  1216. X% max (\topskip - \ht (first item), 0).  If that height is large,
  1217. X% therefore, no glue is inserted, and the space between the headline and
  1218. X% the text is small, which looks bad.
  1219. X%
  1220. X\def\group{\begingroup
  1221. X  \ifnum\catcode13=\active \else
  1222. X    \errhelp = \groupinvalidhelp
  1223. X    \errmessage{@group invalid in context where filling is enabled}%
  1224. X  \fi
  1225. X  %
  1226. X  % The \vtop we start below produces a box with normal height and large
  1227. X  % depth; thus, TeX puts \baselineskip glue before it, and (when the
  1228. X  % next line of text is done) \lineskip glue after it.  (See p.82 of
  1229. X  % the TeXbook.)  Thus, space below is not quite equal to space
  1230. X  % above.  But it's pretty close.
  1231. X  \def\Egroup{%
  1232. X    \egroup           % End the \vtop.
  1233. X    \endgroup         % End the \group.
  1234. X  }%
  1235. X  %
  1236. X  \vtop\bgroup
  1237. X    % We have to put a strut on the last line in case the @group is in
  1238. X    % the midst of an example, rather than completely enclosing it.
  1239. X    % Otherwise, the interline space between the last line of the group
  1240. X    % and the first line afterwards is too small.  But we can't put the
  1241. X    % strut in \Egroup, since there it would be on a line by itself.
  1242. X    % Hence this just inserts a strut at the beginning of each line.
  1243. X    \everypar = {\strut}%
  1244. X    %
  1245. X    % Since we have a strut on every line, we don't need any of TeX's
  1246. X    % normal interline spacing.
  1247. X    \offinterlineskip
  1248. X    %
  1249. X    % OK, but now we have to do something about blank
  1250. X    % lines in the input in @example-like environments, which normally
  1251. X    % just turn into \lisppar, which will insert no space now that we've
  1252. X    % turned off the interline space.  Simplest is to make them be an
  1253. X    % empty paragraph.
  1254. X    \ifx\par\lisppar
  1255. X      \edef\par{\leavevmode \par}%
  1256. X      %
  1257. X      % Reset ^^M's definition to new definition of \par.
  1258. X      \obeylines
  1259. X    \fi
  1260. X    %
  1261. X    % We do @comment here in case we are called inside an environment,
  1262. X    % such as @example, where each end-of-line in the input causes an
  1263. X    % end-of-line in the output.  We don't want the end-of-line after
  1264. X    % the `@group' to put extra space in the output.  Since @group
  1265. X    % should appear on a line by itself (according to the Texinfo
  1266. X    % manual), we don't worry about eating any user text.
  1267. X    \comment
  1268. X}
  1269. X%
  1270. X% TeX puts in an \escapechar (i.e., `@') at the beginning of the help
  1271. X% message, so this ends up printing `@group can only ...'.
  1272. X%
  1273. X\newhelp\groupinvalidhelp{%
  1274. Xgroup can only be used in environments such as @example,^^J%
  1275. Xwhere each line of input produces a line of output.}
  1276. X
  1277. X% @need space-in-mils
  1278. X% forces a page break if there is not space-in-mils remaining.
  1279. X
  1280. X\newdimen\mil  \mil=0.001in
  1281. X
  1282. X\def\need{\parsearg\needx}
  1283. X
  1284. X% Old definition--didn't work.
  1285. X%\def\needx #1{\par %
  1286. SHAR_EOF
  1287. true || echo 'restore of q-1.7/texinfo.tex failed'
  1288. fi
  1289. echo 'End of  part 14'
  1290. echo 'File q-1.7/texinfo.tex is continued in part 15'
  1291. echo 15 > _shar_seq_.tmp
  1292. exit 0
  1293.  
  1294.