code wiki / _hdl_build / nx_pattern_emit4_demo.nx
nx_pattern_emit4_demo.nx source
↩ module page · 22 lines · 1126 B
1// nx_pattern_emit4_demo.nx -- the TEAM authoring PARSER_KAT + GOVERNOR cores (no Claude logic).
2// _pe_num = the registry-scan/claim-extract decimal parser. _pe_crawl = the polite-crawl governor with
3// the REAL pacing spec (1500ms min gap between same-host hits, 500ms backoff base doubling to an 8s cap).
4import "nx_pattern_emit4.nx"
5import "nx_syscalls.nx"
6const K_MAGIC_1500: i64 = 1500
7const K_MAGIC_8000: i64 = 8000
8
9func p4_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
10
11func main() -> i64 {
12 let a: i64 = pe4_author_parser("_pe_num" as *u8,
13 "runtime/_hdl_build/_pe_num.nx" as *u8,
14 "runtime/_hdl_build/_pe_num_test.nx" as *u8)
15 let b: i64 = pe4_author_governor("_pe_crawl" as *u8,
16 "runtime/_hdl_build/_pe_crawl.nx" as *u8,
17 "runtime/_hdl_build/_pe_crawl_test.nx" as *u8,
18 K_MAGIC_1500, 500, K_MAGIC_8000)
19 if a == 1 { if b == 1 { p4_w("TEAM AUTHORED CORES: _pe_num (parser) + _pe_crawl (governor 1500/500/8000) -- verify with Engineer\n" as *u8); sys_exit(0) } }
20 p4_w("author failed\n" as *u8); sys_exit(1)
21 return 1
22}