EC_NODE_RE_LEX_ADD(3)
π EC_NODE_RE_LEX_ADD(3) π
okay bestie, welcome to the Libecoli Programmer's Manual β this is the page for ec_node_re_lex_add, and yes it's a 3, so it's a library function, we're in C territory, hydrate and let's go π«Ά
β¨ NAME β¨
ec_node_re_lex_add β bestie, this is literally the function that adds a token pattern to a regex lexer node. that's the whole job. that's the assignment. slay π
πΈ SYNOPSIS πΈ
#include <ecoli/node_re_lex.h>
int ec_node_re_lex_add(
struct ec_node *gen_node, /* The regex lexer node. */
/*
* The regular expression pattern for matching tokens.
*/
const char *pattern,
/*
* If non-zero, include matched tokens in the output; if zero, discard
* them.
*/
int keep,
/*
* Optional attribute name to attach to matched tokens, or NULL.
*/
const char *attr_name
);
so you're passing in gen_node β that's the regex lexer node itself, the main character π β then pattern, which is the regular expression pattern used for matching tokens, then keep, and attr_name. four things. you got this fr fr.
π₯ RETURN VALUE π₯
0β success!! you ate, no crumbs, we love to see it β¨-1β error π anderrnois set, so go check it, the answer is in there, i promise
not me being dramatic but like β always check the return value, bestie. -1 is not a vibe, it's a warning π¨
π¦ SEE ALSO π¦
ec_node_re_lex(3)β the sibling page, the whole lexer node situation, go read it next, iykyk π
π COPYRIGHT π
Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.
and that's the whole page, periodt β¨ this was the libecoli manual, dated 2026-06-11 β mwah, take care of yourself, drink water, and may all your errnos be zero ππ¦πΈ
π¦ where this page comes from
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms