init parser
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
#include "computorv1.h"
|
||||
#include "libft.h"
|
||||
#include "lexer.h"
|
||||
#include "errors.h"
|
||||
#include <stdio.h> // tmp for float debug
|
||||
|
||||
void remove_spaces(char *s)
|
||||
{
|
||||
@@ -63,7 +59,11 @@ int main(int ac, char **av)
|
||||
ft_putchar('\n'); // debug
|
||||
|
||||
token tokens[arg_len];
|
||||
lexerize(input, tokens);
|
||||
int token_count = lexerize(input, tokens);
|
||||
|
||||
ft_putstr("-> token_count : "); // debug
|
||||
ft_putnbr(token_count); // debug
|
||||
ft_putchar('\n'); // debug
|
||||
|
||||
// tmp debug output
|
||||
ft_putchar('\n'); // debug
|
||||
@@ -105,6 +105,15 @@ int main(int ac, char **av)
|
||||
}
|
||||
i++;
|
||||
}
|
||||
ft_putchar('\n'); // debug
|
||||
// END tmp debug output
|
||||
|
||||
term terms[token_count / 2];
|
||||
int term_count = parse(tokens, terms);
|
||||
|
||||
ft_putstr("-> term_count : "); // debug
|
||||
ft_putnbr(term_count); // debug
|
||||
ft_putchar('\n'); // debug
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user