/*********************************************************************************** * File: negative.h * Created: 6 JA 2000 * Modified 12 JA 2000 * Author: Jeff Jenkins, R. DeArmond * * This file contains negative structs and array declaration for the lexicon, and * the prototypes for all of the functions specific to prepositions, to be used with the * grammars one through eight. The functions are used to manipulate the prepositions in * an array of prepositions, which represents the preposition portion of a lexicon. * * The current implementation, using an array to store the lexical entries for each * type of word is adequate for now, but if the lexicon is to be allowed to grow to * any size, this will have to change. In that case, the lexicon will have to be * used in the file, and file access performed whenever the lexicon is to be used. * Currently, a maximum number of prepositions (MAX_prepositions = 32) is imposed so that the * array can be declared. ***********************************************************************************/ #ifndef negative_H #define negative_H #include "verb.h" #include "dummy_verb.h" /*********************************************************************************** * internal defines ***********************************************************************************/ #define STRING_SIZE 16 #define MAXLINE 64 #define MAX_NEGATIVES 4 //extern int plural; //extern char quant[STRING_SIZE]; /*********************************************************************************** * internal data structures ***********************************************************************************/ /*********************************************************************************** * The negative struct must be defined so that file access can be performed when reading * and writing to the actual lexicon file. If the size of this struct were to change * after students have already started to create their lexicons (ie in later * versions of the grammars), their lexicons would be useless, since the new version * would be reading the wrong length struct. As a result, a few extra spaces are left * for additional features if they need to be added at a later date. If a new feature * is needed, the 'extra's in the struct only need to be renamed to that new * feature's name. lexicons created with older versions will still work, with the * new feature being blank. ***********************************************************************************/ /*********************************************************************************** * the negative phrase (complementizer phrase) ***********************************************************************************/ struct neg_struct { int neg_cat; int neg; int neg_strong; int neg_overt_comp; char neg_cat_form[STRING_SIZE]; char neg_form[STRING_SIZE]; }; /*********************************************************************************** * an array of mood_struct. * at start-up, the moodwords in the lexicon file are read into this array. All * manipulation of the lexicon is done through the arrays. At program close (and at * various times during execution) the arrays are written to the file. ***********************************************************************************/ extern struct neg_struct neg_list[MAX_NEGATIVES]; /*********************************************************************************** * the current number of prepositions in mood. This is read from and written to the * lexicon header. ***********************************************************************************/ extern int negatives; extern int neg; #endif