code wiki / (root) / nx_grammar.nx

nx_grammar.nx

buildroot/runtime/nx_grammar.nx

4547 B127 linesdepth 1pulls 1 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_grammar.nx -- WRITING arc, rung W-R2g: MECHANICAL grammar checks. Content-agnostic, deterministic, dictionary-FREE. Honest scope: these are the mechanical checks an editor catches by pattern, NOT full ML/Grammarly-class grammar -- dictionary spell-check + suggestion ranking is a later sub-arc. This fills the lone honest gap in the W-EXC-1 census with a real, exact organ. Checks (out[], filled by gr_check): out[0] = doubled words -- the same word twice in a row ("the the") out[1] = a/an misuse -- "a" before a vowel, or "an" before a consonant (letter heuristic; a/e/i/o/u are vowels, not y/h) out[2] = cap-after-period -- a lowercase word right after . ! or ? returns the total error count. Pure integer, NO syscalls. Reuses nx_writecraft for char classification (DRY). license_tier: ORIGINAL module: nishi-core.write.grammar depends: nishi-core.write.craft capability: WRITE_MECHANICAL_GRAMMAR

dependencies 1 imports · 1 importers

nx_writecraft.nx nx_grammar.nx nx_grammar_gate.nx

imports: nx_writecraft.nx

imported by: nx_grammar_gate.nx

structs

none

consts

none

functions

23func gr_is_art_vowel(c: i64) -> i64
called by 1: gr_check calls 1: wc_lower
34func gr_eq_lit(t: *u8, a: i64, b: i64, lit: *u8) -> i64
called by 1: gr_check calls 1: wc_lower
48func gr_words_eq(t: *u8, a1: i64, b1: i64, a2: i64, b2: i64) -> i64
called by 1: gr_check calls 1: wc_lower
58func gr_check(t: *u8, n: i64, out: *i64) -> i64