parsers.h
Go to the documentation of this file.
83 int parseExampleObject(FILE* fp, char** error, Object* o, Model* m, struct StringVector* seenObjects);
113 void parseAttrValue(FILE* fp, char** error, Model* m, attrType type, Attribute* attr, unsigned int position, struct StringVector* seenObjects);
Structure that contains the type and the values of the attribute depending on type.
Definition: model-type.h:20
int parseExampleObject(FILE *fp, char **error, Object *o, Model *m, struct StringVector *seenObjects)
Parse an object (only its properties. The name must already be known)
Definition: parsers.c:264
Interval * parseAttrTypeInterval(FILE *fp, char **error)
Tries to parse an interval.
Definition: parsers.c:612
int getRelationPosition(const char *rel, Model *m)
Returns the position at which can be found a relation (by name)
Definition: parsers.c:336
unsigned int getNextExample(FILE *f)
Get the type of the next example (example or counter-example). Stop reading at the end of the example...
Definition: parsers.c:133
Enum * parseAttrTypeEnum(FILE *fp, char **error)
Tries to parse an enumeration.
Definition: parsers.c:697
void readFileSpaces(FILE *fp, char const *set)
Reads a file from the current position and reads while characters are in the set. Stops on the last o...
Definition: parsers.c:824
char * getIncludeFile(char const *pathname, size_t *pos)
Get the pathname to the config file included at the begening of an example file.
Definition: parsers.c:10
int isValidAttrChar(char c, unsigned int first)
Check whether the character is allowed in an attribute name or not.
Definition: parsers.c:816
int parseExample(FILE *fp, char **error, Example *ex, Model *m)
Parse an example or a counterexample.
Definition: parsers.c:161
Structure that contains the examples and counter-examples of the parsed example file.
Definition: examples.h:20
int parseConfigLine(FILE *fp, char **error, Model *out)
Tries to parse the line as a config file attribute definition. If the line is empty, continues to read until it finds a line.
Definition: parsers.c:449
int getAttributePosition(const char *attr, Model *m)
Returns the position at which can be found an attribute (by name)
Definition: parsers.c:326
Contains the attributes and relations definitions found in the model file.
Definition: model.h:20
Examples * loadExampleFile(char const *pathname, Model *model, size_t startPos)
Loads the example file given and generate the Example object that represents its content.
Definition: parsers.c:71
void readTil(FILE *fp, char const *set)
Reads a file from the current position and reads until it finds a character in the set...
Definition: parsers.c:844
Model * loadConfigFile(char const *pathname)
Loads the config file given anf the generate the Model object that represents its content...
Definition: parsers.c:422
Tree * parseAttrTypeTree(FILE *fp, char **error, int *index, int indent)
Tries to parse a tree.
Definition: parsers.c:737
ModelType * parseAttrType(FILE *fp, char **error)
Tries to parse the attribute's value definition at the current position in the file (may read more th...
Definition: parsers.c:544
char * parseAttrName(FILE *fp, char **error)
Tries to parse the attribute name at the current position in the file (spaces & tabs are ommited) ...
Definition: parsers.c:516
void parseAttrValue(FILE *fp, char **error, Model *m, attrType type, Attribute *attr, unsigned int position, struct StringVector *seenObjects)
Parse the attribute's value and populate the Attribute object accordingly.
Definition: parsers.c:346