summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-04-15build: Enable warning and debug CFLAGSJohnny Richard
After enabling the warning flags, the compiler was firing the following warnings: warning: implicit declaration of function ‘strdup’; did you mean ‘strcmp’? [-Wimplicit-function-declaration] token->value = strdup("("); ^~~~~~ strcmp warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] token->value = strdup("("); ^ In order to fix these warnings above, I have decided to replace *strdup* and *strndup* by *strcpy* and *strncpy* functions. Signed-off-by: Johnny Richard <johnny@johnnyrichard.com>
2023-04-14build: Add clear target to MakefileJohnny Richard
Signed-off-by: Johnny Richard <johnny@johnnyrichard.com>
2023-04-14lexer: Extract lexer.c and lexer.h from pipa.cJohnny Richard
Signed-off-by: Johnny Richard <johnny@johnnyrichard.com>
2023-04-14build: Move *.c to src folderJohnny Richard
We want to have different folders for src and objs files. Signed-off-by: Johnny Richard <johnny@johnnyrichard.com>
2023-04-14cli: Create a function to print tokensCarlos Maniero
This logic was inside the main function Signed-off-by: Carlos Maniero <carlosmaniero@gmail.com>
2023-04-14cli: Add missing LF on print_usageCarlos Maniero
Signed-off-by: Carlos Maniero <carlosmaniero@gmail.com>
2023-04-14lexer: Fix string format warningCarlos Maniero
warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=] Signed-off-by: Carlos Maniero <carlosmaniero@gmail.com>
2023-04-13Create inital project structure + lexerJohnny Richard
Signed-off-by: Johnny Richard <johnny@johnnyrichard.com>