Own fork of MbedSmartRestMain
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
util/lex.h@94:010b0f7a0a1a, 2015-04-22 (annotated)
- Committer:
- xinlei
- Date:
- Wed Apr 22 11:22:25 2015 +0000
- Revision:
- 94:010b0f7a0a1a
- Parent:
- 93:61d44636f020
- Child:
- 98:e369fc75c000
v2.1rc2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
xinlei | 93:61d44636f020 | 1 | #ifndef LEX_H |
xinlei | 93:61d44636f020 | 2 | #define LEX_H |
xinlei | 93:61d44636f020 | 3 | #include <stddef.h> |
xinlei | 93:61d44636f020 | 4 | |
xinlei | 93:61d44636f020 | 5 | struct Token |
xinlei | 93:61d44636f020 | 6 | { |
xinlei | 94:010b0f7a0a1a | 7 | enum TokType { |
xinlei | 93:61d44636f020 | 8 | INT, |
xinlei | 93:61d44636f020 | 9 | FLOAT, |
xinlei | 93:61d44636f020 | 10 | STRING, |
xinlei | 93:61d44636f020 | 11 | NONE, |
xinlei | 93:61d44636f020 | 12 | ERROR |
xinlei | 93:61d44636f020 | 13 | } type; |
xinlei | 93:61d44636f020 | 14 | const char *p; |
xinlei | 93:61d44636f020 | 15 | size_t len; |
xinlei | 93:61d44636f020 | 16 | }; |
xinlei | 93:61d44636f020 | 17 | |
xinlei | 93:61d44636f020 | 18 | const char* skipHTTPHeader(const char* p); |
xinlei | 93:61d44636f020 | 19 | const char* lex(const char*, Token&); |
xinlei | 93:61d44636f020 | 20 | size_t strncpyEscape(char*, const char*, size_t); |
xinlei | 93:61d44636f020 | 21 | |
xinlei | 93:61d44636f020 | 22 | #endif /* LEX_H */ |