← board

feature: PXX Basic — own free-form BASIC dialect (real demo target, not an esoteric probe)

What this is, and how it's different from the esoteric-probe category

Not part of [[feature-esoteric-frontend-probes]] — that category is explicitly capped at "skeleton only, stop at trivial, success = bug found or clean pass, never chase usability." PXX Basic is the opposite intent: an actual, finished, fun, demo-worthy dialect that's ours to shape however we want, no spec to match, no BASIC standard body to satisfy. Same spirit as Nil-Python (PXX's own take on a Python-like surface, not CPython-compatible) — BASIC gets the same treatment.

What already exists (confirmed by reading the tree, not assumed)

compiler/blexer.inc (249 lines) + compiler/bparser.inc (378 lines) already implement a real, already-blended dialect:

Docs already mention it exists: docs/targets/cross-languages.md lists .bas as "BASIC, experimental" in the frontend-by-suffix table — but nothing beyond that one line, and no progress ticket existed for it until this one.

What's blocking it right now

[[bug-basic-goto-gosub-halts-program]] — GOTO/GOSUB are lexed straight to tkHalt (stub/placeholder token reuse, looks unfinished rather than intentional), so any program using classic line-numbered control flow silently halts instead of running. This has to land first — it's not a "make it nicer" gap, it's "half the dialect doesn't execute."

Scope ideas (not committed, brainstorm-tier — refine when picked up)

Acceptance (loose — this is a demo/fun target, not a strict spec)

test/test_basic_comprehensive.bas runs end-to-end and prints everything it claims to (currently silently truncates after ~1 line, see the blocking bug). Beyond that: "is it a fun demo" is the real bar, not a formal conformance suite — no BASIC standard to satisfy, by design.

Log