rizin/doc
Anton Kochkov 689bafb7a4
Rewrite the RzNum parser and calculator on tree-sitter (#4326)
Replace the hand-written parser in calc.c with a tree-sitter grammar
(subprojects/rizin-math-parser) and a typed evaluator. The old parser
could only ever produce a ut64 and folded anything it failed to read to
0, which left callers unable to tell a failed expression from one that
evaluated to zero.

Expressions now evaluate to an RzNumValue, a tagged union over ut64,
double, RzBitVector, arbitrary-precision integer and arbitrary-precision
decimal, carrying an RzNumError rather than signalling failure as 0.
Literals keep the width they were written with (5u8, 0xffu128, any width
from 1 to 65536), results that outgrow 64 bits promote to a big number on
their own, and a parse error, division by zero or unresolved identifier
reaches the caller.

rz_num_math() is deprecated. rz_num_math_ut64() keeps its exact behaviour
for callers that want a ut64, and rz_num_math_value() exposes the typed
result. rz_core_math() adds the RzCore-backed form used by the % command,
with rz_core_math_ut64() deprecated alongside it. rz-ax routes through the
typed API, so it prints values at full precision, reports errors on stderr
and exits non-zero. rz_il_lift_num() converts an expression to an
RzILOpPure, so a numeric argument can be lifted instead of pre-evaluated.

Legacy input still works: trailing base suffixes (101b, 35o, 212t), the
trailing-'h' hex form and the k/m/g scale suffixes are all accepted and
warn once, pointing at the 0b/0o/0t prefixes. doc/math.md documents the
language and doc/math-il-lift.md the lift; the grammar, the evaluator,
rz-ax and the % command are covered by unit and db tests.
2026-07-24 02:57:27 +08:00
..
examples add RISC-V 32-bit env to CI (#6109) 2026-04-14 15:39:39 +08:00
img Update contact information of Rot127. (#5522) 2025-11-10 17:15:15 +00:00
asm_strings.md Document allowed macro usage. (#6060) 2026-03-22 11:46:14 +00:00
avr.md Remove old bash-based rz-pm (#3360) 2023-02-07 18:26:38 +08:00
calling-conventions.md Remove make leftovers (#1598) 2021-09-06 01:41:51 +02:00
crosscompile.md Delete some unneded documentation (#59) 2020-10-30 16:06:38 +01:00
debug-internals.md doc: fix various typos and documentation issues (#5771) 2026-01-10 21:33:54 +08:00
debug.md Fix old math commands (#3828) 2023-09-14 08:53:25 +08:00
esil.md Fix English in docs files and updated/removed some tips (#3299) 2023-01-17 19:49:38 +01:00
fortunes.fun fortune.fun: morse code radare2 -> rizin (#6565) 2026-06-27 16:49:02 +00:00
fortunes.tips librz/config: merge graph.offset into asm.offset (#5596) 2025-12-10 14:52:21 +08:00
gdb.md doc: fix various typos and documentation issues (#5771) 2026-01-10 21:33:54 +08:00
hud Fix old math commands (#3828) 2023-09-14 08:53:25 +08:00
math-il-lift.md Rewrite the RzNum parser and calculator on tree-sitter (#4326) 2026-07-24 02:57:27 +08:00
math.md Rewrite the RzNum parser and calculator on tree-sitter (#4326) 2026-07-24 02:57:27 +08:00
PACKAGERS.md blake2 hash support (#5995) 2026-03-06 22:17:59 +08:00
pf.md Add pf commands autocomplete (#6445) 2026-06-02 13:44:07 +08:00
register_profile.md Document the register profile in its own file. (#4575) 2024-07-30 22:40:48 +08:00
release-template.md doc: add release issue template (#3386) 2023-03-10 08:39:55 +00:00
RELEASE.md doc: add release issue template (#3386) 2023-03-10 08:39:55 +00:00
rzil.md [RzIL] Rewrite RzAnalysisRzil as RzAnalysisILVM with config 2022-01-17 16:50:40 +01:00
rzshell.md doc: fix various typos and documentation issues (#5771) 2026-01-10 21:33:54 +08:00
siol.md doc: fix various typos and documentation issues (#5771) 2026-01-10 21:33:54 +08:00
windbg.md Delete some unneded documentation (#59) 2020-10-30 16:06:38 +01:00