nx_glsl_tokdiff_gate.nx
buildroot/runtime/nx_glsl_tokdiff_gate.nx
about
nx_glsl_tokdiff_gate.nx -- referee for THE SHADER TOKEN RULER (nx_glsl_tok_lib), driven IN-PROCESS over planted
strings, both directions: every normalisation the ruler claims (whitespace, comments, numeric spelling, compound
assignment over ident / swizzle / index lvalues -- and, since S12c-2, THE CANONICAL FORM: precedence re-parenthesisation,
multi-declarator splitting, brace insertion, else-if nesting, counted-loop lowering, comparison inversion under not) must
read IDENTICAL, and every real difference (an operator, a constant, an identifier, an extra token, a parenthesis that
CHANGES precedence) must read DIFFERS naming the first differing token index -- plus the tokenizer's own arithmetic on a
string whose token count is known by hand, an unreadable input REFUSED by name, and the real subject (the hand MVS on the
board) canonicalising to itself with parentheses ADDED. Every number asserted AND emitted.
STATEMENT fixtures are wrapped in braces: module scope is copied token for token by design (a function HEADER `float
hsh(float s)` is `IDENT IDENT (` and must not be read as a declaration), so a statement-level normalisation is only
reachable inside a block -- exactly where every statement of a real shader lives. The first run of this gate measured that
(T9/T10/T12/T13 read DIFFERS at module scope, 35/40): the fixtures were wrong, the ruler was not.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 2 imports · 0 importers
imports: nx_glsl_tok_lib.nxnx_gate_verdict.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 17 | const C_TILDE: i64 = 126 |
functions
| 19 | func g_diff(a: *u8, b: *u8, r: *i64) -> i64 { return gt_diff(a, gt_slen(a), b, gt_slen(b), r) } |
| 20 | func g_cdiff(a: *u8, b: *u8, r: *i64) -> i64 { return gt_diff_canon(a, gt_slen(a), b, gt_slen(b), r) } |
| 23 | func g_bang(s: *u8) -> *u8 calls 1: gt_slen |
| 37 | func main() -> i64 calls 1: gv_ctr |