confgen

Config parser generator
git clone git://git.finwo.net/app/confgen
Log | Files | Refs | LICENSE

confgen.hcl (470B)


      1 name = "pmlag_conf"
      2 
      3 # This would generate the following C .h file, and accompanying .c file
      4 #
      5 # struct pmlag_conf_state {
      6 #   struct confgen_buffer *input;
      7 # };
      8 #
      9 # struct pmlag_conf {
     10 #   char *name;
     11 # };
     12 #
     13 #
     14 # struct pmlag_conf_state * pmlag_conf_start(); # <-- alloc buffer, etc
     15 # void                      pmlag_conf_update(struct pmlag_conf_state *state, const char *src, size_t len);
     16 # struct pmlag_conf       * pmlag_conf_digest(struct pmlag_conf_state *state);