LeftHookRoll
An HTTP/1.0 compliant web server, as specified by RFC1945
Loading...
Searching...
No Matches
ConfigParser.hpp File Reference

Parses a webserv.conf file and produces a vector of ServerConf objects. More...

#include <string>
#include <vector>
#include "ServerConf.hpp"
#include "FatalExceptions.hpp"
Include dependency graph for ConfigParser.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ConfigParser
 
class  ConfigParser::ConfigException
 

Detailed Description

Parses a webserv.conf file and produces a vector of ServerConf objects.

Uses a simple two-pass approach:

  1. Tokenize the raw file content.
  2. Walk the token stream to populate ServerConf / LocationConf data structures.

Throws ConfigParser::ConfigException (a FatalException subclass) on any syntax or semantic error so the caller can exit cleanly via the normal fatal-exception handler.

Definition in file ConfigParser.hpp.