Normed: rest of parser/static

This commit is contained in:
Maieul BOYER 2024-04-28 19:21:34 +02:00
parent df5cc636b5
commit 9c60e63fb9
No known key found for this signature in database
9 changed files with 155 additions and 88 deletions

View file

@ -3,10 +3,10 @@
/* ::: :::::::: */
/* state_helper.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/28 18:39:26 by rparodi #+# #+# */
/* Updated: 2024/04/28 18:59:41 by rparodi ### ########.fr */
/* Updated: 2024/04/28 19:10:20 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
@ -56,48 +56,3 @@ bool lex_helper_s521(t_lexer *lexer, t_lexer_state *s)
return (lex_advance(593, lexer, s));
return (false);
}
bool lex_helper_s522(t_lexer *lexer, t_lexer_state *s)
{
if (s->lookahead == '<')
return (lex_advance(613, lexer, s));
if (s->lookahead == '>')
return (lex_advance(618, lexer, s));
if (s->lookahead == '\\')
return (lex_skip(543, lexer, s));
if (s->lookahead == '`')
return (lex_advance(855, lexer, s));
if (s->lookahead == '|')
return (lex_advance(593, lexer, s));
return (false);
}
bool lex_helper_s86(t_lexer *lexer, t_lexer_state *s)
{
if (s->lookahead == '>')
return (lex_advance(618, lexer, s));
if (s->lookahead == '\\')
return (lex_skip(379, lexer, s));
if (s->lookahead == '`')
return (lex_advance(510, lexer, s));
if (s->lookahead == 'e')
return (lex_advance(514, lexer, s));
if (s->lookahead == '|')
return (lex_advance(593, lexer, s));
return (false);
}
bool lex_helper_s87(t_lexer *lexer, t_lexer_state *s)
{
if (s->lookahead == '>')
return (lex_advance(618, lexer, s));
if (s->lookahead == '\\')
return (lex_skip(380, lexer, s));
if (s->lookahead == '`')
return (lex_advance(510, lexer, s));
if (s->lookahead == 'e')
return (lex_advance(514, lexer, s));
if (s->lookahead == '|')
return (lex_advance(593, lexer, s));
return (false);
}

View file

@ -0,0 +1,58 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* state_helper2.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/28 19:09:30 by maiboyer #+# #+# */
/* Updated: 2024/04/28 19:10:30 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "./lex_normal_funcs.h"
bool lex_helper_s522(t_lexer *lexer, t_lexer_state *s)
{
if (s->lookahead == '<')
return (lex_advance(613, lexer, s));
if (s->lookahead == '>')
return (lex_advance(618, lexer, s));
if (s->lookahead == '\\')
return (lex_skip(543, lexer, s));
if (s->lookahead == '`')
return (lex_advance(855, lexer, s));
if (s->lookahead == '|')
return (lex_advance(593, lexer, s));
return (false);
}
bool lex_helper_s86(t_lexer *lexer, t_lexer_state *s)
{
if (s->lookahead == '>')
return (lex_advance(618, lexer, s));
if (s->lookahead == '\\')
return (lex_skip(379, lexer, s));
if (s->lookahead == '`')
return (lex_advance(510, lexer, s));
if (s->lookahead == 'e')
return (lex_advance(514, lexer, s));
if (s->lookahead == '|')
return (lex_advance(593, lexer, s));
return (false);
}
bool lex_helper_s87(t_lexer *lexer, t_lexer_state *s)
{
if (s->lookahead == '>')
return (lex_advance(618, lexer, s));
if (s->lookahead == '\\')
return (lex_skip(380, lexer, s));
if (s->lookahead == '`')
return (lex_advance(510, lexer, s));
if (s->lookahead == 'e')
return (lex_advance(514, lexer, s));
if (s->lookahead == '|')
return (lex_advance(593, lexer, s));
return (false);
}