Files
helmetc/libxtools/cllexer_test.c
Олег Бородин 0c47735432 renaming
2025-10-12 08:12:00 +02:00

33 lines
619 B
C

/*
*
* Copyright 2023 Oleg Borodin <borodin@unix7.org>
*
*/
#include <string.h>
#include <stdbool.h>
#include <stdio.h>
#include <cllexer.h>
int main(int argc, char **argv) {
(void)argc;
(void)argv;
char* arg = "--qwerty=-num-12345";
cllexer_t lex;
cllexer_init(&lex, arg);
char token[1024];
int toktype = TOKEN_NULL;
int i = 0;
while (toktype != TOKEN_ENDF) {
toktype = cllexer_gettok(&lex, token);
printf("cllexer_gettok res: %d: %d [%s]\n", i, toktype, token);
i++;
}
return 0;
}