Official reference client implementation for Cumulocity SmartREST on u-blox C027.

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Vincent Wochnik

config/ConfigParser.h

Committer:
xinlei
Date:
2016-08-08
Revision:
139:f8ab852e83e7
Parent:
101:dbcd3bc51758

File content as of revision 139:f8ab852e83e7:

#ifndef CONFIGPARSER_H
#define CONFIGPARSER_H
#include "lex.h"
#include "dict.h"

class ConfigParser
{
public:
        Dict dict;
public:
        ConfigParser() : dict(), parseOK(true) {}
        virtual ~ConfigParser() {}
        bool parse(const char*);
protected:
        typedef void (ConfigParser::*PtrParseFunc) (Token&);
        void parseKey(Token&);
        void parseAssignOp(Token&);
        void parseValue(Token&);
        void parseSemiColon(Token&);
        void parseError(Token&);
        void parseRecover(Token&);
private:
        bool parseOK;
        PtrParseFunc ptrPF;
        char key[MAX_KEY_LEN];
        char value[MAX_VALUE_LEN];
};

#endif /* CONFIGPARSER_H */