code wiki / (root) / nx_glob.nx

nx_glob.nx

buildroot/runtime/nx_glob.nx

8109 B221 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_glob.nx -- POSIX-style glob pattern matching. Used by toolchain CLI wrappers that take "*.nx", "tests/*.s", "runtime/nx_dwarf_*.nx" arguments. Today each tool that wants glob support either calls out to a shell or implements its own matcher. This module provides a single canonical matcher. Supported syntax (POSIX subset): * match zero or more chars (NEVER crosses '/') ? match exactly one char [abc] character class [a-z] character range [^abc] negated class \\x literal escape Out of scope: ** (recursive wildcard) {a,b,c} brace expansion ~ home-dir expansion Matcher is recursive (textbook NFA-style); for the pattern lengths real CLIs use (< 100 chars) the depth is fine.

dependencies 1 imports · 0 importers

syscalls.nx nx_glob.nx

imports: syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main nx_glob_match nx_glob_match ↻ nx_glob_match_class

structs

none

consts

none

functions

36func nx_glob_match_class(pat: *u8, i: i64, ch: i64, matched_out: *i64) -> i64
called by 1: nx_glob_match
80func nx_glob_match(pat: *u8, text: *u8) -> i64
154func main() -> i64
calls 1: nx_glob_match