From 8745f421b4cf7e1d54c17a360d46fab889ca12cc Mon Sep 17 00:00:00 2001 From: _ov4 Date: Thu, 22 Oct 2026 15:33:17 +0000 Subject: feat(input)!: validate INPUT and read whole lines into STRING Scalar INPUT now reads one whitespace-delimited token through module-local IR helpers instead of scanf, then skips spaces and tabs and consumes one newline. INTEGER, REAL, BOOLEAN (TRUE or FALSE in any case) and CHAR are validated, and bad input or end of input is a runtime error. STRING INPUT reads the rest of the line. The unused scanf and REAL printf format globals are removed. Co-Authored-By: Claude Sonnet 5.5 --- AGENTS/ARCH/LAYOUT.md | 1 + 1 file changed, 1 insertion(+) (limited to 'AGENTS/ARCH/LAYOUT.md') diff --git a/AGENTS/ARCH/LAYOUT.md b/AGENTS/ARCH/LAYOUT.md index 805f1e1..dc8696e 100644 --- a/AGENTS/ARCH/LAYOUT.md +++ b/AGENTS/ARCH/LAYOUT.md @@ -12,6 +12,7 @@ | `include/cps/TemplateAST.h`, `lib/Parser/ParserTemplate.cc` | TEMPLATE declarations, type parameter packs and canonical template ids; call and pack parsing also uses ParserExpression.cc/ParserFunction.cc | | `lib/CodeGen/CodeGen.cc` | Initialization, symbols and main() compilation | | `lib/CodeGen/CallGen.cc` | Call-argument marshalling (`marshalCallArgs`, variadic arguments) and call resolution (`resolveCall`) | +| `lib/CodeGen/InputGen.cc` | INPUT token reader and validators for scalar targets, emitted as module-local IR helpers | | `lib/CodeGen/ExpressionGen.cc`, `StatementGen.cc`, `ControlFlowGen.cc` | Expression/statement dispatch and control-flow emission | | `lib/CodeGen/OperatorGen.cc`, `include/cps/Operator.h` | Exact global/member operator selection, calls and temporary receivers; shared operator spellings | | `lib/CodeGen/TemplateGen.cc`, `TemplateClone.h`, `TemplateClone.cc` | Template registry validation, cached function/class instantiation, structural type substitution, pack expansion and deferred bodies; call deduction/selection lives in CallGen.cc | -- cgit v1.3.1-4-g156e