Home | Documentation | Download | Platforms | Projects | Mailing Lists | Version History

- Main Page
- Classes
- Files
- Related Pages

# gml_parser.h

    00001 //==========================================================================
    00002 //
    00003 //   gml_parser.h
    00004 //
    00005 //==========================================================================
    00006 // $Id: gml_parser.h,v 1.7 2000/01/05 16:32:36 raitner Exp $
    00007
    00008 #ifndef GTL_GML_PARSER_H
    00009 #define GTL_GML_PARSER_H
    00010
    00011 #include <GTL/GTL.h>
    00012 #include <GTL/gml_scanner.h>
    00013
    00014 __GTL_BEGIN_NAMESPACE
    00015
    00019 union GTL_EXTERN GML_pair_val {
    00020     long integer;
    00021     double floating;
    00022     char* str;
    00023     struct GML_pair* list;
    00024 };
    00025
    00029 struct GTL_EXTERN GML_pair {
    00030     char* key;
    00031     GML_value kind;
    00032     union GML_pair_val value;
    00033     struct GML_pair* next;
    00034 };
    00035
    00039 struct GTL_EXTERN GML_list_elem {
    00040     char* key;
    00041     struct GML_list_elem* next;
    00042 };
    00043
    00047 struct GTL_EXTERN GML_stat {
    00048     struct GML_error err;
    00049     struct GML_list_elem* key_list;
    00050 };
    00051
    00052 /*
    00053  * returns list of KEY - VALUE pairs. Errors and a pointer to a list
    00054  * of key-names are returned in GML_stat. Previous information contained
    00055  * in GML_stat, i.e. the key_list, will be *lost*.
    00056  */
    00057
    00058 GTL_EXTERN GML_pair* GML_parser (FILE*, GML_stat*, int);
    00059
    00060 /*
    00061  * free memory used in a list of GML_pair
    00062  */
    00063
    00064 GTL_EXTERN void GML_free_list (GML_pair*, GML_list_elem*);
    00065
    00066
    00067 /*
    00068  * debugging
    00069  */
    00070
    00071 GTL_EXTERN void GML_print_list (GML_pair*, int);
    00072
    00073 __GTL_END_NAMESPACE
    00074
    00075 #endif // GTL_GML_PARSER_H
    00076
    00077 //--------------------------------------------------------------------------
    00078 //   end of file
    00079 //--------------------------------------------------------------------------

University of Passau - FMI - Theoretical Computer Science

Design © 2002, 2003 Marcus Raitner, University of Passau