Crinit -- Configurable Rootfs Init
lexers.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: MIT
6 #ifndef __LEXERS_H__
7 #define __LEXERS_H__
8 
9 #include <stdbool.h>
10 
14 typedef enum crinitTokenType_t {
27 
35 extern const char crinitEscMap[128];
36 
54 crinitTokenType_t crinitArgvLex(const char **s, const char **mbegin, const char **mend, bool dq);
70 crinitTokenType_t crinitEscLex(const char **s, const char **mbegin, const char **mend);
71 
91 int crinitMatchQuotedConfig(const char *s, const char **mbegin, const char **mend);
92 
118 crinitTokenType_t crinitEnvVarOuterLex(const char **s, const char **mbegin, const char **mend);
138 crinitTokenType_t crinitEnvVarInnerLex(const char **s, const char **mbegin, const char **mend);
139 
140 #endif /* __LEXERS_H__ */
crinitTokenType_t crinitEnvVarInnerLex(const char **s, const char **mbegin, const char **mend)
const char crinitEscMap[128]
crinitTokenType_t crinitEnvVarOuterLex(const char **s, const char **mbegin, const char **mend)
crinitTokenType_t
Definition: lexers.h:14
@ CRINIT_TK_ERR
Lexer error.
Definition: lexers.h:15
@ CRINIT_TK_ENVKEY
Environment key encountered (crinitEnvVarOuterLex())
Definition: lexers.h:17
@ CRINIT_TK_ESCX
Hexadecimal escape sequence encountered (crinitEnvVarInnerLex())
Definition: lexers.h:22
@ CRINIT_TK_CPY
Single character to copy encountered (crinitEnvVarInnerLex())
Definition: lexers.h:23
@ CRINIT_TK_UQSTR
Unquoted string encountered (crinitArgvLex())
Definition: lexers.h:25
@ CRINIT_TK_ENVVAL
Environment value encountered (crinitEnvVarOuterLex())
Definition: lexers.h:18
@ CRINIT_TK_ESC
Regular escape sequence encountered (crinitEnvVarInnerLex())
Definition: lexers.h:21
@ CRINIT_TK_END
End-of-string encountered.
Definition: lexers.h:16
@ CRINIT_TK_VAR
Variable reference encountered (crinitEnvVarInnerLex())
Definition: lexers.h:20
@ CRINIT_TK_DQSTR
Double-quoted string encountered (crinitArgvLex())
Definition: lexers.h:24
@ CRINIT_TK_WSPC
Whitespace encountered (crinitEnvVarOuterLex())
Definition: lexers.h:19
crinitTokenType_t crinitArgvLex(const char **s, const char **mbegin, const char **mend, bool dq)
int crinitMatchQuotedConfig(const char *s, const char **mbegin, const char **mend)
crinitTokenType_t crinitEscLex(const char **s, const char **mbegin, const char **mend)