ecoli_node_re_lex(3)

πŸ“¦
version 0.11.3 Β· 2 versions
, in epel 9

πŸ¦‹ NAME πŸ¦‹

Okay so this is the ecoli_node_re_lex(3) page from Libecoli, bestie β€” it's literally a regex lexer node situation.

ecoli_node_re_lex - Regex lexer node

  • A lexer node using regular expressions for tokenization.

✨ SYNOPSIS ✨

struct ec_node * ec_node_re_lex (const char *id, struct ec_node *child)
int ec_node_re_lex_add (struct ec_node *gen_node, const char *pattern,
    int keep, const char *attr_name)

πŸ’– Detailed Description πŸ’–

A lexer node using regular expressions for tokenization. That's the whole vibe, no cap.

🧚 Configuration Schema 🧚

schema re_lex {
    list patterns  {
        description "The list of patterns elements.";

        dict  {
            description "A pattern element.";

            string pattern  {
                description "The pattern to match.";
            }
            bool keep  {
                description "Whether to keep or drop the string matching the regular expression.";
            }
            string attr  {
                description "The optional attribute name to attach.";
            }
        }
    }
    node child  {
        description "The child node.";
    }
}

πŸŽ€ Function Documentation πŸŽ€

πŸ’œ struct ec_node* ec_node_re_lex (const char * id, struct ec_node * child) πŸ’œ

Create a regex-based lexer node. Iconic behavior, honestly.

This node tokenizes the input using regular expressions added with ec_node_re_lex_add() and passes the resulting tokens to the child node.

Parameters:

  • id β€” The node identifier.
  • child β€” The child node. It is consumed and will be freed when the parent is freed, or immediately on error.

Returns:

  • The node, or NULL on error (errno is set).

🌸 int ec_node_re_lex_add (struct ec_node * gen_node, const char * pattern, int keep, const char * attr_name) 🌸

Add a token pattern to a regex lexer node. Slay.

Parameters:

  • gen_node β€” The regex lexer node.
  • pattern β€” The regular expression pattern for matching tokens.
  • keep β€” If non-zero, include matched tokens in the output; if zero, discard them.
  • attr_name β€” Optional attribute name to attach to matched tokens, or NULL.

Returns:

  • 0 on success, -1 on error (errno is set).

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Libecoli from the source code. Fr fr, the robots wrote this one.


🫢 That's the whole page, bestie. Libecoli, Version 0.11.3, dated Thu Apr 9 2026 β€” byeee! πŸ’…βœ¨
πŸ“¦ where this page comes from