code wiki / (root) / nx_klipper_gcode_validator_test.nx

nx_klipper_gcode_validator_test.nx

buildroot/runtime/nx_klipper_gcode_validator_test.nx

3994 B109 linesdepth 13pulls 31 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_klipper_gcode_validator_test.nx -- exercise the Klipper grammar validator + verify the slicer's emitted G-code passes. Closed-form invariants: (a) Empty input -> BAD_INPUT (b) Single valid line "G1 X10 Y20 E0.5 F1500\n" -> OK (c) Comment line ";LAYER 5\n" -> OK (d) Line missing command number "G\n" -> BAD_LINE (e) Line with control char "G1\x01X10\n" -> BAD_CONTROL_CHAR (f) Line with negative feedrate "G1 F-100\n" -> BAD_FEEDRATE (g) Line with zero feedrate "G1 F0\n" -> BAD_FEEDRATE (h) Line with bad parameter "G1 q10\n" (lowercase letter) -> BAD_PARAM (i) Real emitted G-code from the slicer passes expect_exit: 0 license_tier: ORIGINAL

dependencies 7 imports · 0 importers

nx_syscalls.nx nx_mesh.nx nx_machine_graph.nx nx_material_profile.nx nx_gcode_emit.nx nx_slice_pipeline.nx nx_klipper_gcode_validator.nx nx_klipper_gcode_validator_tes

imports: nx_syscalls.nxnx_mesh.nxnx_machine_graph.nxnx_material_profile.nxnx_gcode_emit.nxnx_slice_pipeline.nxnx_klipper_gcode_validator.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap nx_klipper_gcode_validate kgv_validate_line kgv_is_upper kgv_is_digit put_str nx_machine_graph_qidi_xmax nx_machine_graph_alloc sys_mmap ↻ nx_material_profile_generi nx_material_profile_alloc sys_mmap ↻ nx_mesh_make_cube nx_mesh_alloc sys_mmap ↻ nx_mesh_set_vertex nx_mesh_set_uv nx_mesh_set_triangle nx_gemit_new sys_mmap ↻ nx_gcex_filament_xsect_q14 nx_muldiv_i64 nx_i128_alloc nx_i128_mul_i64 nx_i128_mul_u64 nx_i128_neg nx_i128_div_i64 nx_i128_is_neg nx_i128_neg ↻ nx_i128_udiv_u64 nx_gemit_preamble nx_gemit_cstr nx_gemit_byte nx_gemit_int sys_mmap ↻ nx_int_to_decimal nx_fmt_reverse nx_gemit_bytes nx_gemit_byte ↻

structs

none

consts

none

functions

26func put_str(dst: *u8, src: *u8) -> i64
called by 1: main
35func main() -> i64