EC_PARSE(3)

πŸ’– EC_PARSE(3) πŸ’–

hey bestie!! welcome to the libecoli programmer's manual, page for ec_parse ✨ β€” yes that's the manual name, no I will not be boring about it. this is the one that takes your lil string and yeets it through a grammar tree. let's GO πŸ¦‹


🌸 NAME 🌸

ec_parse β€” parse a string using a grammar tree. that's it. that's the whole job. πŸ’…


✨ SYNOPSIS ✨

#include <ecoli/parse.h>

struct ec_pnode * ec_parse(
    const struct ec_node   *node,  /* The grammar node. */
    const char             *str    /* The input string. */
);

look at her. she's so simple. she's so iconic. πŸ‘‘


πŸŽ€ DESCRIPTION πŸŽ€

okay so lowkey this is equivalent to calling ec_parse_strvec() on the same node, but with a string vector that contains only the argument string str. that's the whole vibe β€” one string in, one call, no extra steps. fr fr. 🌈


🫢 RETURN VALUE 🫢

you get back a parsing tree ✨ … or NULL on error, in which case errno is set. (not me manifesting a parse tree πŸ™ˆ just check for NULL, bestie, please.)

πŸ’€ heads up: NULL means error. always check. no cap.

πŸ”₯ SEE ALSO πŸ”₯

the whole girl group, together, as one πŸ’œ:


Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.


and that's the page!! mwah πŸ’‹ this was libecoli's manual, dated 2026-06-11, page EC_PARSE(3) β€” go parse something gorgeous, bestie πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from