TObject | +------TParser
InFiles
InFile
ActualInFile
ErrorCode
LineNum
ShowDt
ShowGRP
Html
Debug
GifsRoot
DelaParam
Apps
TParser
~TParser
Init
MakeAppColl
AddInFile
Parsing
NextInFile
make_ProcGroup
ShowData
WriteGRP
PUnsortedStrings InFiles
This collection holds name of input files.
char *InFile
Name of the actual input file.
TIndex ActualInFile
Index of actual input file in the collection.
int ErrorCode
Error code of parser.
long LineNum
Number of line where error has occured. Name of the file can be found in InFile field.
bool ShowDt
Data structures should be reported after parsing.
bool ShowGRP
GRP file should be generated after parsing.
bool Html
If this field is true the parser produces debugging information in HTML format. It is false by default.
bool Debug
If this field is true the parser produces debugging information during parsing. It is false by default.
char *GifsRoot
URL which defines directory where GIF pictures can be
found. For example:
"http://www.cpc.wmin.ac.uk/~drotos/gifs
". This parameter
is used when parser makes debugging information in HTML form.
char DealParam
Value of this filed specifies behavior of the parser when it finds redefinition of a parameter in a parameter group. If the value is 'a' it appends values to the excisting parameter, if the value is 'o' then it deletes old parameter and creates a new one, and if the value is 'e' (or other) then it aborts its operation and prints out an error message.
PprsAppColl Apps
Collection of applications.
TParser(void)
Constructor of the parser object class.
virtual ~TParser(void)
Destructor of the parser object class.
virtual int Init(void)
This method contains virtual method calls that should be done during constructing of the object, so it must be called immediately after parser object had been created.
virtual PprsAppColl MakeAppColl(void)
This method makes a collection to store applications. If you are going to use your own type of application collection you have to override this method.
void AddInFile(char
*FileName)
This method adds FileName file to the list of input files.
int Parsing(void)
This method parses every files on input file collection. Informations collected from files are merged together. Return value of this function is error code of the parser. It is 0 if files are parsed successfully.
bool NextInFile(void)
Used intenally by the parser.
virtual PprsProcGroup
make_ProcGroup(int type, char
*name, int id)
This method is used by the parser to make a new process
group object. Parameters are the parsed elements: type can be
tokPROCGROUP or tokFARM; name is the name of the process group
and id is a unique identification number in the GRP
file.
Reports
virtual void ShowData(FILE
*To)
This method produces a report about data structures built by the
parser in file To.
virtual void WriteGRP(FILE
*To)
This method writes parsed information to GRP file To.
Back to
Grapnel Compiler.