Seeding from the 1.2 tree.

This commit is contained in:
Dan Mashal
2013-01-01 03:00:55 -08:00
parent d8c87c4ded
commit 87b806a563
1424 changed files with 260320 additions and 0 deletions

36
dll/europa/cse476/gnode.h Normal file
View File

@@ -0,0 +1,36 @@
#ifndef _GNODE_H_
#define _GNODE_H_
#include <iostream.h>
class List;
void trim(char *text); // GOOD
// genericNode -- holds any lexical or phrase object
class genericNode {
public:
// constructor: pass it a string containing a lexical or phrase
// object in the format used in our lexicon.txt and grammar.txt
genericNode(char *obj); // GOOD
genericNode(char *word, List *features); // GOOD except feature doesn't copy
~genericNode();
friend ostream &operator<<(ostream &out_file, const genericNode &n); // GOOD
// GOOD: sort of.. this routine leaks memory because the lists for
// assignment it makes aren't properly deallocated upon unification failure
friend List *unify(genericNode &s, genericNode &g);
friend List *cmpFeatures(List &a, List &b);
List *lookupFeature(const char *name) const;
friend genericNode *substitute(genericNode *old, List *assign);
char *word(void); // GOOD
List *features(void);
private:
char *name;
List *featureList;
};
#endif