Skip to content
PT

Static copy

Copied from docs/en/decisions/adp-005.md in https://github.com/poppy-team/aipo-lang (MIT). Pinned to revision ce47c4e070404fc41722ccd8e2b7b808b99062a8, blob 82147775b32e2c6c5124d464593a4e473a5fb215. The source repository remains canonical; this copy is refreshed through a sync pull request, not live.

ADP-005 — Parser Recursion Limits ​

  • Status: Approved & Implemented
  • Deciders: Poppy Team
  • Phase: Wave 1

Context ​

Recursive-descent parsers can suffer from stack overflows when encountering deeply nested syntactic inputs (such as ((((...10,000 parentheses...))))), crashing the host process with unhandled panics.


Decisions Taken ​

  1. The Aipo parser tracks an explicit recursion depth counter.
  2. The default threshold is fixed at 256 nesting levels.
  3. Exceeding this boundary aborts compilation gracefully with diagnostic AIPO_SYN_RECURSION_LIMIT_EXCEEDED without panicking in Rust.