EC_NODE_RE_LEX_ADD(3)

NAME
ec_node_re_lex_add - Add a token pattern to a regex lexer node.

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
);

RETURN VALUE

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

SEE ALSO

ec_node_re_lex(3)

COPYRIGHT

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