at work
This commit is contained in:
31
clib/cllexer.h
Normal file
31
clib/cllexer.h
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
#ifndef CLLEXER_H_QWERTY
|
||||
#define CLLEXER_H_QWERTY
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct {
|
||||
int context;
|
||||
char letter;
|
||||
int tokpos;
|
||||
bool rewind;
|
||||
char* argstr;
|
||||
int arglen;
|
||||
int argpos;
|
||||
bool screen;
|
||||
} cllexer_t;
|
||||
|
||||
|
||||
#define CLLEXTOK_UNDEF 0
|
||||
#define CLLEXTOK_KEY 1
|
||||
#define CLLEXTOK_WORD 2
|
||||
#define CLLEXTOK_SPACE 3
|
||||
#define CLLEXTOK_SEP 4
|
||||
#define CLLEXTOK_END 5
|
||||
|
||||
void cllexer_init(cllexer_t* lexer);
|
||||
void cllexer_reset(cllexer_t* lexer, char* argstr);
|
||||
int cllexer_gettoken(cllexer_t* lexer, char* token);
|
||||
void cllexer_destroy(cllexer_t* lexer);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user