Crinit -- Configurable Rootfs Init
Loading...
Searching...
No Matches
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
27
35extern const char crinitEscMap[128];
36
54crinitTokenType_t crinitArgvLex(const char **s, const char **mbegin, const char **mend, bool dq);
70crinitTokenType_t crinitEscLex(const char **s, const char **mbegin, const char **mend);
71
91int crinitMatchQuotedConfig(const char *s, const char **mbegin, const char **mend);
92
118crinitTokenType_t crinitEnvVarOuterLex(const char **s, const char **mbegin, const char **mend);
138crinitTokenType_t crinitEnvVarInnerLex(const char **s, const char **mbegin, const char **mend);
139
154crinitTokenType_t crinitKernelCmdlineLex(const char **s, const char **keyBegin, const char **keyEnd,
155 const char **valBegin, const char **valEnd);
156
157#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)
crinitTokenType_t crinitKernelCmdlineLex(const char **s, const char **keyBegin, const char **keyEnd, const char **valBegin, const char **valEnd)
int crinitMatchQuotedConfig(const char *s, const char **mbegin, const char **mend)
crinitTokenType_t crinitEscLex(const char **s, const char **mbegin, const char **mend)