Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199201.adf » January92 » !AWJan92/Goodies/AllAtC/Work/h/lexical

!AWJan92/Goodies/AllAtC/Work/h/lexical

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199201.adf » January92
Filename: !AWJan92/Goodies/AllAtC/Work/h/lexical
Read OK:
File size: 028E bytes
Load address: 0000
Exec address: 0000
File contents
/*  Lexical Functions Header File.        */
/*  Archimedes World, October 1991.       */

/*  Header files required.     */

#include <stdio.h>


/* Constant Definitions.       */

#define STRLEN 16
#define NULL    0
#define FALSE   0
#define TRUE   !FALSE         /* i.e. Not false.  */


/* Variable type definitions.  */

typedef char string[STRLEN+1];
typedef struct word_struct *word;


/* Function declarations.      */

extern void ToUpperCase( char *word );
extern void ToLowerCase( char *word );
extern int  GetWord( char *buffer, int length, FILE *stream );
extern void StoreWord( char *str, word *list );
extern void ListWords( word list );

00000000  2f 2a 20 20 4c 65 78 69  63 61 6c 20 46 75 6e 63  |/*  Lexical Func|
00000010  74 69 6f 6e 73 20 48 65  61 64 65 72 20 46 69 6c  |tions Header Fil|
00000020  65 2e 20 20 20 20 20 20  20 20 2a 2f 0a 2f 2a 20  |e.        */./* |
00000030  20 41 72 63 68 69 6d 65  64 65 73 20 57 6f 72 6c  | Archimedes Worl|
00000040  64 2c 20 4f 63 74 6f 62  65 72 20 31 39 39 31 2e  |d, October 1991.|
00000050  20 20 20 20 20 20 20 2a  2f 0a 0a 2f 2a 20 20 48  |       */../*  H|
00000060  65 61 64 65 72 20 66 69  6c 65 73 20 72 65 71 75  |eader files requ|
00000070  69 72 65 64 2e 20 20 20  20 20 2a 2f 0a 0a 23 69  |ired.     */..#i|
00000080  6e 63 6c 75 64 65 20 3c  73 74 64 69 6f 2e 68 3e  |nclude <stdio.h>|
00000090  0a 0a 0a 2f 2a 20 43 6f  6e 73 74 61 6e 74 20 44  |.../* Constant D|
000000a0  65 66 69 6e 69 74 69 6f  6e 73 2e 20 20 20 20 20  |efinitions.     |
000000b0  20 20 2a 2f 0a 0a 23 64  65 66 69 6e 65 20 53 54  |  */..#define ST|
000000c0  52 4c 45 4e 20 31 36 0a  23 64 65 66 69 6e 65 20  |RLEN 16.#define |
000000d0  4e 55 4c 4c 20 20 20 20  30 0a 23 64 65 66 69 6e  |NULL    0.#defin|
000000e0  65 20 46 41 4c 53 45 20  20 20 30 0a 23 64 65 66  |e FALSE   0.#def|
000000f0  69 6e 65 20 54 52 55 45  20 20 20 21 46 41 4c 53  |ine TRUE   !FALS|
00000100  45 20 20 20 20 20 20 20  20 20 2f 2a 20 69 2e 65  |E         /* i.e|
00000110  2e 20 4e 6f 74 20 66 61  6c 73 65 2e 20 20 2a 2f  |. Not false.  */|
00000120  0a 0a 0a 2f 2a 20 56 61  72 69 61 62 6c 65 20 74  |.../* Variable t|
00000130  79 70 65 20 64 65 66 69  6e 69 74 69 6f 6e 73 2e  |ype definitions.|
00000140  20 20 2a 2f 0a 0a 74 79  70 65 64 65 66 20 63 68  |  */..typedef ch|
00000150  61 72 20 73 74 72 69 6e  67 5b 53 54 52 4c 45 4e  |ar string[STRLEN|
00000160  2b 31 5d 3b 0a 74 79 70  65 64 65 66 20 73 74 72  |+1];.typedef str|
00000170  75 63 74 20 77 6f 72 64  5f 73 74 72 75 63 74 20  |uct word_struct |
00000180  2a 77 6f 72 64 3b 0a 0a  0a 2f 2a 20 46 75 6e 63  |*word;.../* Func|
00000190  74 69 6f 6e 20 64 65 63  6c 61 72 61 74 69 6f 6e  |tion declaration|
000001a0  73 2e 20 20 20 20 20 20  2a 2f 0a 0a 65 78 74 65  |s.      */..exte|
000001b0  72 6e 20 76 6f 69 64 20  54 6f 55 70 70 65 72 43  |rn void ToUpperC|
000001c0  61 73 65 28 20 63 68 61  72 20 2a 77 6f 72 64 20  |ase( char *word |
000001d0  29 3b 0a 65 78 74 65 72  6e 20 76 6f 69 64 20 54  |);.extern void T|
000001e0  6f 4c 6f 77 65 72 43 61  73 65 28 20 63 68 61 72  |oLowerCase( char|
000001f0  20 2a 77 6f 72 64 20 29  3b 0a 65 78 74 65 72 6e  | *word );.extern|
00000200  20 69 6e 74 20 20 47 65  74 57 6f 72 64 28 20 63  | int  GetWord( c|
00000210  68 61 72 20 2a 62 75 66  66 65 72 2c 20 69 6e 74  |har *buffer, int|
00000220  20 6c 65 6e 67 74 68 2c  20 46 49 4c 45 20 2a 73  | length, FILE *s|
00000230  74 72 65 61 6d 20 29 3b  0a 65 78 74 65 72 6e 20  |tream );.extern |
00000240  76 6f 69 64 20 53 74 6f  72 65 57 6f 72 64 28 20  |void StoreWord( |
00000250  63 68 61 72 20 2a 73 74  72 2c 20 77 6f 72 64 20  |char *str, word |
00000260  2a 6c 69 73 74 20 29 3b  0a 65 78 74 65 72 6e 20  |*list );.extern |
00000270  76 6f 69 64 20 4c 69 73  74 57 6f 72 64 73 28 20  |void ListWords( |
00000280  77 6f 72 64 20 6c 69 73  74 20 29 3b 0a 0a        |word list );..|
0000028e