Files
helmetc/libxtools/cllexer_test.c
Олег Бородин dfd504328d work in progess
2025-10-16 16:09:55 +02:00

35 lines
638 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("test cllexer_gettok res: %d: %d [%s]\n", i, toktype, token);
i++;
}
return 0;
}