current parser version ready for breaking..

This commit is contained in:
Mthandazo Ndhlovu
2019-04-26 13:37:32 +02:00
parent 9a386b315b
commit 6ad8cd2d95
9 changed files with 47 additions and 17 deletions

View File

@@ -6,7 +6,7 @@
/* By: mndhlovu <mndhlovu@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/20 15:24:51 by mndhlovu #+# #+# */
/* Updated: 2019/04/26 11:58:52 by mndhlovu ### ########.fr */
/* Updated: 2019/04/26 13:05:45 by mndhlovu ### ########.fr */
/* */
/* ************************************************************************** */
@@ -78,8 +78,8 @@ int lm_parser(t_syntax *synt, t_lmdata *ldata,
int index;
index = 0;
while (ft_getline(&raw) > 0)
{
while (ft_getline(&raw) > 0 && raw[0] != '\0')
{
ft_printf("%s\n", raw);
if (!(lm_get_ant_(index, ldata, synt, raw)) && index == 0)
{
@@ -95,6 +95,7 @@ int lm_parser(t_syntax *synt, t_lmdata *ldata,
ft_strdel(&raw);
index++;
}
ft_printf("final raw: %s\n", raw);
ft_strdel(&raw);
ft_putchar('\n');
return (1);