Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: config/ConfigParser.h
- Revision:
- 99:e369fc75c000
- Child:
- 101:dbcd3bc51758
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/config/ConfigParser.h Thu May 07 09:57:55 2015 +0000
@@ -0,0 +1,28 @@
+#ifndef CONFIGPARSER_H
+#define CONFIGPARSER_H
+#include "lex.h"
+#include "dict.h"
+
+class ConfigParser
+{
+public:
+ ConfigParser(Dict& d) : dict(d), parseOK(true) {}
+ virtual ~ConfigParser() {}
+ bool parse(const char*);
+protected:
+ void parseKey(Token&);
+ void parseAssignOp(Token&);
+ void parseValue(Token&);
+ void parseSemiColon(Token&);
+ void parseError(Token&);
+ void parseRecover(Token&);
+private:
+ typedef void (ConfigParser::*PtrParseFunc) (Token&);
+ Dict& dict;
+ bool parseOK;
+ PtrParseFunc ptrPF;
+ char key[MAX_KEY_LEN];
+ char value[MAX_VALUE_LEN];
+};
+
+#endif /* CONFIGPARSER_H */
\ No newline at end of file

Cumulocity