From b95e2655915bfea00bbfe062019290673362fec5 Mon Sep 17 00:00:00 2001 From: Luis <42945842+ldiaz94@users.noreply.github.com> Date: Mon, 26 Oct 2026 17:21:49 +0000 Subject: [PATCH] Limits: statements, expressions and types nested stop at 256, the stack of values says its limit and ends the compile, a ninth type argument names its limit; tests and compiler.md --- diff --git a/doc/compiler.md b/doc/compiler.md index 0e1f50b..a7979b6 100644 --- a/doc/compiler.md +++ b/doc/compiler.md @@ -21,9 +21,9 @@ | `src/Sym.raz` | 815 | 652 | Types, objects, scopes, layout | | `src/Chunk.raz` | 364 | 280 | The compiled program: chunks, fixups, line notes | | `src/X64.raz` | 1,621 | 1,330 | The instruction encoder, jumps within a procedure, the assembler | -| `src/Gen.raz` | 2,841 | 1,987 | The stack machine, for x86-64: values, operations, checks, calls, frames | +| `src/Gen.raz` | 2,846 | 1,989 | The stack machine, for x86-64: values, operations, checks, calls, frames | | `src/Item.raz` | 2,553 | 2,051 | Items: types, constants, variables, operators, conversions, calls | -| `src/Parse.raz` | 4,816 | 4,098 | Declarations, statements, expressions, built-ins, recovery, warnings | +| `src/Parse.raz` | 4,835 | 4,116 | Declarations, statements, expressions, built-ins, recovery, warnings | | `src/Link.raz` | 408 | 316 | Tree shaking, layout, patching, the places | | `src/Elf.raz` | 450 | 356 | Static and dynamic ELF, symbol table, line numbers | | `src/Host.raz` | 103 | 52 | The system running the compiler | @@ -1961,7 +1961,7 @@ recovery point, `statement` or `declaration`, which looks at what came back. At the start of its construct it called `guard`, which notes in a `Recover` the scanner's state and the parser's (the scopes, gen's stack, -the loop, the deferred statements, `quiet`). On an error `restore` puts +the loop, the deferred statements, how deep it is nested, `quiet`). On an error `restore` puts the state back, the construct's first symbol current again, and `skipConstruct` reads past it, counting the words that open and close blocks. A symbol at the start of a line ends the skip: by the usual @@ -2533,6 +2533,35 @@ and so does a module with errors, after it. Two errors at the same place are told as one. Any error is status 1, and no executable is written. +- **Limits.** The least of the report's section 10, and what this + compiler takes. Past its own, each stops with an error that names the + limit (`tooMany`, `Parse.raz`); `test/err` has a program for each, + and `conform/run/Limit*.raz` holds the report's least. + + | | report's least | this compiler | + |---|---|---| + | statements, expressions and types nested | 63 levels of statements, 63 of parentheses and calls | 256 together (`MaxNest`) | + | values waiting in one expression | none given | 1,024 (`MaxStack`, `Gen.raz`) | + | chain of imports | 15 modules | 63 (`MaxPending`) | + | names declared together | 31 | 64 (`MaxNames`) | + | variables assigned together | 15 | 16 | + | elements in an array literal | 1,023 | 1,024 (`MaxElements`); a constant's has no limit of its own | + | labels in one `match` | 255 | 1,024 (`MaxLabels`) | + | deferred statements in force | 31 | 64 (`MaxDefers`) | + | type arguments to a generic module | 8 | 8 | + + `nest` is the parser's own depth, so that a deeply nested program + can't overflow the compiler's stack. It counts a statement, a factor + (an operand, a parenthesis, a call, `not`) and a type; `guard` notes + it and `restore` sets it back, as for the rest of the parser's + state. A level costs at most about 3 KiB of stack (an operand, which + goes through `factor`, `term`, `simpleExpr`, `relation`, `conjunct` + and `expression`; a statement about 1.5 KiB, a type less), so 256 + levels use under 1 MiB of the main thread's 8. The stack of values + is full before `MaxNest` when each level leaves several waiting, as a + call of many arguments does (63 nested calls of 15 arguments fit); + the compile then ends at once with the error, as the pops after it + would have no place to go. - **Warnings.** Of a declaration never used, or a variable only assigned (`warn`, `Parse.raz`): not of what is exported, a name that starts with `_`, an enumeration's names or a generic module's diff --git a/src/Gen.raz b/src/Gen.raz index 123528c..b0a1711 100644 --- a/src/Gen.raz +++ b/src/Gen.raz @@ -49,7 +49,9 @@ error back, so it is shown and the call goes on without doing what it could not (see newEntry and check): the compile ends with the message, and the parser's recovery makes the stack right again with - resetStack. endProc returns its error, for the parser to pass up. + resetStack. A full stack (newEntry) ends the compile at once: the pops + after it would go below the stack. endProc returns its error, for the + parser to pass up. What the parser sets, `inPlace`, has a setter, as the exported variables can't be set from outside. The seed's types lose their T @@ -195,6 +197,7 @@ end; const + MaxStack = 1024; (* values waiting in one expression: 63 nested calls of up to 15 arguments each *) StubNames: [8][]const U8 = ["check0", "check1", "check2", "check3", "check4", "check5", "check6", "check7"]; (* the registers of the stack: the value at depth d is in Regs[d mod NumRegs]. rax, rdx and rcx, which division and shifts need, and rsi @@ -205,7 +208,7 @@ IntRegs: [6]INT = [RDI, RSI, RDX, RCX, R8, R9]; var - stack: [256]Entry; + stack: [MaxStack]Entry; owner: [NumRegs]INT; (* the value in each register, or -1 *) frameTop, frameMax, permTop: I64; frameFix: INT; (* where the frame size is patched in *) @@ -432,12 +435,14 @@ return loaded(depth - 1); end; -(* A value on the stack's top. At the stack's last place it is shown as - an error and nothing is pushed: see the head of this unit. *) +(* A value on the stack's top. At the stack's last place the error is shown + and the compile ends there: with nothing pushed, the pops after it would + go below the stack. See the head of this unit. *) proc newEntry(k: Kind; loc: Loc; v: I64); begin if depth > LEN(stack) - 1 then - _ := Scan.mark("the expression is too deep"); + _ := Scan.mark(Diag.say("more than {} values waiting in one expression", [Fmt.int(MaxStack)])); + Diag.finish(); (* ends the compile: an error was counted *) return; end; stack[depth].k := k; diff --git a/src/Parse.raz b/src/Parse.raz index 013ef99..0064052 100644 --- a/src/Parse.raz +++ b/src/Parse.raz @@ -81,6 +81,7 @@ MaxFixes = 4096; (* addresses in one constant *) MaxPending = 64; (* modules being compiled at once *) MaxFors = 256; (* for loops of a procedure whose limit may go in a register *) + MaxNest = 256; (* statements, expressions and types nested; each level is a few recursive calls of the parser *) Suffixes: [4][]const U8 = [".linux-x86_64", ".linux", ".x86_64", ""]; var @@ -102,6 +103,7 @@ declExported: BOOL; (* the export mark of the declaration being read *) curLoop: PLoop; (* the innermost loop, or nil *) defers: [MaxDefers]INT; (* the defer statements in force, their code's addresses *) + nest: INT; (* statements, expressions and types being read, one inside the other *) numDefers: INT; deferring: BOOL; (* compiling a defer statement's statement *) directDefer: BOOL; (* ... as the statement itself, not in a list *) @@ -148,6 +150,7 @@ proc expression(var x: TItem; want: PType): ERROR; forward; proc parseType: (PType, ERROR); forward; +proc typeBody: (PType, ERROR); forward; proc statements: ERROR; forward; proc statement: ERROR; forward; @@ -206,6 +209,13 @@ proc tooMany(n: INT; what: []const U8): []const U8; begin return Diag.say("more than {} {}", [Fmt.int(n), Fmt.str(what)]); +end; + +(* The error for a statement or an expression nested too deep: the parser calls itself + for each level, so its depth is bounded to keep the stack well inside 8 MiB *) +proc tooDeep: ERROR; +begin + return Scan.mark(tooMany(MaxNest, "statements, expressions and types nested")); end; (* After an error at p: if a comment closed just before it, it most @@ -346,7 +356,7 @@ type Recover = record scan: Scan.State; - scopes, depth, pushed, numDefers: INT; + scopes, depth, pushed, numDefers, nest: INT; guards: INT; loop: PLoop; result: PType; @@ -357,7 +367,7 @@ begin Scan.saveScan(r.scan); r.guards := guards; - r.scopes := Sym.scopeDepth(); r.depth := Gen.depth; r.pushed := Gen.pushed; r.numDefers := numDefers; + r.scopes := Sym.scopeDepth(); r.depth := Gen.depth; r.pushed := Gen.pushed; r.numDefers := numDefers; r.nest := nest; r.loop := curLoop; r.result := curResult; r.deferring := deferring; r.directDefer := directDefer; r.quiet := Diag.quiet; INC(guards); @@ -379,7 +389,7 @@ Scan.setSkipping(true); Sym.cutScopes(r.scopes); Gen.resetStack(r.depth, r.pushed); - numDefers := r.numDefers; + numDefers := r.numDefers; nest := r.nest; curLoop := r.loop; curResult := r.result; deferring := r.deferring; directDefer := r.directDefer; inTypes := false; declExported := false; inExtern := false; making := false; @@ -913,7 +923,19 @@ return t, nil; end; +(* A type, read as typeBody does, counted as one more level of nesting, so that + a type of types of types ... can't overflow the stack *) proc parseType: (PType, ERROR); +var t: PType; err: ERROR; +begin + INC(nest); + if nest > MaxNest then return nil, tooDeep(); end; + t, err := typeBody(); + DEC(nest); + return t, err; +end; + +proc typeBody: (PType, ERROR); var t: PType; o: PObj; n: I64; vol: BOOL; start: Diag.Pos; begin start := Scan.tokPos(); @@ -1877,6 +1899,8 @@ proc factor(var x: TItem; want: PType): ERROR; var called, vol, several: BOOL; t: PType; start: INT; s: []const U8; begin + INC(nest); + if nest > MaxNest then return tooDeep(); end; several := passOn; passOn := false; start := Scan.tokStart(); @@ -1945,6 +1969,7 @@ | else: return expected("an expression"); end; x.pos := Scan.spanFromAt(start); + DEC(nest); return nil; end; @@ -2967,8 +2992,10 @@ begin m := Gen.tempMark(); guard(r); - err := oneStatement(); + INC(nest); + if nest > MaxNest then err := tooDeep(); else err := oneStatement(); end; if err = nil then + DEC(nest); skipped := false; else restore(r); @@ -4086,7 +4113,9 @@ begin Scan.next; repeat - if args.n >= 8 then return Scan.mark(say1("too many type arguments for {}", mname)); end; + if args.n >= LEN(args.o) then + return Scan.mark(tooMany(LEN(args.o), say1("type arguments to {}", mname))); + end; args.o[args.n] := nil; start := Scan.tokPos(); if Scan.tok = Scan.sIdent then diff --git a/test/err/DeclDeepImports.err b/test/err/DeclDeepImports.err new file mode 100644 index 0000000..076330a --- /dev/null +++ b/test/err/DeclDeepImports.err @@ -0,0 +1,4 @@ +test/err/mods/DeepChain64.raz:1:1: error: more than 64 imports nested deep + 1 | module DeepChain64; + | ^ +raz: 1 error diff --git a/test/err/DeclDeepImports.raz b/test/err/DeclDeepImports.raz new file mode 100644 index 0000000..d5319c6 --- /dev/null +++ b/test/err/DeclDeepImports.raz @@ -0,0 +1,7 @@ +(* A chain of 64 modules importing each the next: at most 63 (MaxPending). *) +module DeclDeepImports; +import Out; +import DeepChain01; +begin + Out.int(DeepChain01.depth()); Out.char('\n'); +end DeclDeepImports. diff --git a/test/err/DeclDeepTypes.err b/test/err/DeclDeepTypes.err new file mode 100644 index 0000000..e41e458 --- /dev/null +++ b/test/err/DeclDeepTypes.err @@ -0,0 +1,7 @@ +test/err/DeclDeepTypes.raz:4:257: error: more than 256 statements, expressions and types nested + 4 | ...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^INT; + | ^ +test/err/DeclDeepTypes.raz:3:9: error: expected "end", found "^" + 3 | type T = + | ^ +raz: 2 errors diff --git a/test/err/DeclDeepTypes.raz b/test/err/DeclDeepTypes.raz new file mode 100644 index 0000000..07d2683 --- /dev/null +++ b/test/err/DeclDeepTypes.raz @@ -0,0 +1,6 @@ +(* A pointer type nested past 256 (MaxNest). *) +module DeclDeepTypes; +type T = +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^INT; +var x: T; +begin end DeclDeepTypes. diff --git a/test/err/DeclManyTypeArgs.err b/test/err/DeclManyTypeArgs.err new file mode 100644 index 0000000..ec702c5 --- /dev/null +++ b/test/err/DeclManyTypeArgs.err @@ -0,0 +1,4 @@ +test/err/DeclManyTypeArgs.raz:4:62: error: more than 8 type arguments to ManyArgs + 4 | import M := ManyArgs(INT, INT, INT, INT, INT, INT, INT, INT, INT); + | ^^^ +raz: 1 error diff --git a/test/err/DeclManyTypeArgs.raz b/test/err/DeclManyTypeArgs.raz new file mode 100644 index 0000000..58869b5 --- /dev/null +++ b/test/err/DeclManyTypeArgs.raz @@ -0,0 +1,7 @@ +(* A ninth type argument: a module takes at most 8. *) +module DeclManyTypeArgs; +import Out; +import M := ManyArgs(INT, INT, INT, INT, INT, INT, INT, INT, INT); +begin + M.put(5); Out.int(M.get()); Out.char('\n'); +end DeclManyTypeArgs. diff --git a/test/err/StmtDeepExpr.err b/test/err/StmtDeepExpr.err new file mode 100644 index 0000000..a5b0f0c --- /dev/null +++ b/test/err/StmtDeepExpr.err @@ -0,0 +1,7 @@ +test/err/StmtDeepExpr.raz:8:265: error: more than 256 statements, expressions and types nested + 8 | ...(((((((((((((((((((((((((((((((((((((((((((((((((((1))))))))))))))))))))))))))))))))))))))))))))))))... + | ^ +test/err/StmtDeepExpr.raz:10:775: error: more than 256 statements, expressions and types nested + 10 | ...d(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(2))))))))))))))))))))))))))))))))))))))))))))))... + | ^^ +raz: 2 errors diff --git a/test/err/StmtDeepExpr.raz b/test/err/StmtDeepExpr.raz new file mode 100644 index 0000000..9c68e72 --- /dev/null +++ b/test/err/StmtDeepExpr.raz @@ -0,0 +1,12 @@ +(* Parentheses and calls nested past 256, with the statements around them (MaxNest). *) +module StmtDeepExpr; +import Out; +proc id(x: INT): INT; +begin return x; end; +var x: INT; +begin + x := ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((1)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + Out.int(x); Out.char('\n'); + x := id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(2)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + Out.int(x); Out.char('\n'); +end StmtDeepExpr. diff --git a/test/err/StmtDeepStmts.err b/test/err/StmtDeepStmts.err new file mode 100644 index 0000000..73180d2 --- /dev/null +++ b/test/err/StmtDeepStmts.err @@ -0,0 +1,4 @@ +test/err/StmtDeepStmts.raz:262:8: error: more than 256 statements, expressions and types nested + 262 | if true then + | ^^^^ +raz: 1 error diff --git a/test/err/StmtDeepStmts.raz b/test/err/StmtDeepStmts.raz new file mode 100644 index 0000000..75be9ae --- /dev/null +++ b/test/err/StmtDeepStmts.raz @@ -0,0 +1,521 @@ +(* Statements nested past 256 (MaxNest). *) +module StmtDeepStmts; +import Out; +proc p; +var x: INT; +begin + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + x := 7; Out.int(x); Out.char('\n'); + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; +begin p; end StmtDeepStmts. diff --git a/test/err/StmtManyLabels.err b/test/err/StmtManyLabels.err new file mode 100644 index 0000000..12490d7 --- /dev/null +++ b/test/err/StmtManyLabels.err @@ -0,0 +1,4 @@ +test/err/StmtManyLabels.raz:1032:7: error: more than 1024 labels in one match + 1032 | | 1025: Out.int(1025); + | ^^^^ +raz: 1 error diff --git a/test/err/StmtManyLabels.raz b/test/err/StmtManyLabels.raz new file mode 100644 index 0000000..e3a1f7b --- /dev/null +++ b/test/err/StmtManyLabels.raz @@ -0,0 +1,1036 @@ +(* One label more than the 1024 of a match (MaxLabels). *) +module StmtManyLabels; +import Out; +var x: INT; +begin + x := 1025; + match x of + | 1: Out.int(1); + | 2: Out.int(2); + | 3: Out.int(3); + | 4: Out.int(4); + | 5: Out.int(5); + | 6: Out.int(6); + | 7: Out.int(7); + | 8: Out.int(8); + | 9: Out.int(9); + | 10: Out.int(10); + | 11: Out.int(11); + | 12: Out.int(12); + | 13: Out.int(13); + | 14: Out.int(14); + | 15: Out.int(15); + | 16: Out.int(16); + | 17: Out.int(17); + | 18: Out.int(18); + | 19: Out.int(19); + | 20: Out.int(20); + | 21: Out.int(21); + | 22: Out.int(22); + | 23: Out.int(23); + | 24: Out.int(24); + | 25: Out.int(25); + | 26: Out.int(26); + | 27: Out.int(27); + | 28: Out.int(28); + | 29: Out.int(29); + | 30: Out.int(30); + | 31: Out.int(31); + | 32: Out.int(32); + | 33: Out.int(33); + | 34: Out.int(34); + | 35: Out.int(35); + | 36: Out.int(36); + | 37: Out.int(37); + | 38: Out.int(38); + | 39: Out.int(39); + | 40: Out.int(40); + | 41: Out.int(41); + | 42: Out.int(42); + | 43: Out.int(43); + | 44: Out.int(44); + | 45: Out.int(45); + | 46: Out.int(46); + | 47: Out.int(47); + | 48: Out.int(48); + | 49: Out.int(49); + | 50: Out.int(50); + | 51: Out.int(51); + | 52: Out.int(52); + | 53: Out.int(53); + | 54: Out.int(54); + | 55: Out.int(55); + | 56: Out.int(56); + | 57: Out.int(57); + | 58: Out.int(58); + | 59: Out.int(59); + | 60: Out.int(60); + | 61: Out.int(61); + | 62: Out.int(62); + | 63: Out.int(63); + | 64: Out.int(64); + | 65: Out.int(65); + | 66: Out.int(66); + | 67: Out.int(67); + | 68: Out.int(68); + | 69: Out.int(69); + | 70: Out.int(70); + | 71: Out.int(71); + | 72: Out.int(72); + | 73: Out.int(73); + | 74: Out.int(74); + | 75: Out.int(75); + | 76: Out.int(76); + | 77: Out.int(77); + | 78: Out.int(78); + | 79: Out.int(79); + | 80: Out.int(80); + | 81: Out.int(81); + | 82: Out.int(82); + | 83: Out.int(83); + | 84: Out.int(84); + | 85: Out.int(85); + | 86: Out.int(86); + | 87: Out.int(87); + | 88: Out.int(88); + | 89: Out.int(89); + | 90: Out.int(90); + | 91: Out.int(91); + | 92: Out.int(92); + | 93: Out.int(93); + | 94: Out.int(94); + | 95: Out.int(95); + | 96: Out.int(96); + | 97: Out.int(97); + | 98: Out.int(98); + | 99: Out.int(99); + | 100: Out.int(100); + | 101: Out.int(101); + | 102: Out.int(102); + | 103: Out.int(103); + | 104: Out.int(104); + | 105: Out.int(105); + | 106: Out.int(106); + | 107: Out.int(107); + | 108: Out.int(108); + | 109: Out.int(109); + | 110: Out.int(110); + | 111: Out.int(111); + | 112: Out.int(112); + | 113: Out.int(113); + | 114: Out.int(114); + | 115: Out.int(115); + | 116: Out.int(116); + | 117: Out.int(117); + | 118: Out.int(118); + | 119: Out.int(119); + | 120: Out.int(120); + | 121: Out.int(121); + | 122: Out.int(122); + | 123: Out.int(123); + | 124: Out.int(124); + | 125: Out.int(125); + | 126: Out.int(126); + | 127: Out.int(127); + | 128: Out.int(128); + | 129: Out.int(129); + | 130: Out.int(130); + | 131: Out.int(131); + | 132: Out.int(132); + | 133: Out.int(133); + | 134: Out.int(134); + | 135: Out.int(135); + | 136: Out.int(136); + | 137: Out.int(137); + | 138: Out.int(138); + | 139: Out.int(139); + | 140: Out.int(140); + | 141: Out.int(141); + | 142: Out.int(142); + | 143: Out.int(143); + | 144: Out.int(144); + | 145: Out.int(145); + | 146: Out.int(146); + | 147: Out.int(147); + | 148: Out.int(148); + | 149: Out.int(149); + | 150: Out.int(150); + | 151: Out.int(151); + | 152: Out.int(152); + | 153: Out.int(153); + | 154: Out.int(154); + | 155: Out.int(155); + | 156: Out.int(156); + | 157: Out.int(157); + | 158: Out.int(158); + | 159: Out.int(159); + | 160: Out.int(160); + | 161: Out.int(161); + | 162: Out.int(162); + | 163: Out.int(163); + | 164: Out.int(164); + | 165: Out.int(165); + | 166: Out.int(166); + | 167: Out.int(167); + | 168: Out.int(168); + | 169: Out.int(169); + | 170: Out.int(170); + | 171: Out.int(171); + | 172: Out.int(172); + | 173: Out.int(173); + | 174: Out.int(174); + | 175: Out.int(175); + | 176: Out.int(176); + | 177: Out.int(177); + | 178: Out.int(178); + | 179: Out.int(179); + | 180: Out.int(180); + | 181: Out.int(181); + | 182: Out.int(182); + | 183: Out.int(183); + | 184: Out.int(184); + | 185: Out.int(185); + | 186: Out.int(186); + | 187: Out.int(187); + | 188: Out.int(188); + | 189: Out.int(189); + | 190: Out.int(190); + | 191: Out.int(191); + | 192: Out.int(192); + | 193: Out.int(193); + | 194: Out.int(194); + | 195: Out.int(195); + | 196: Out.int(196); + | 197: Out.int(197); + | 198: Out.int(198); + | 199: Out.int(199); + | 200: Out.int(200); + | 201: Out.int(201); + | 202: Out.int(202); + | 203: Out.int(203); + | 204: Out.int(204); + | 205: Out.int(205); + | 206: Out.int(206); + | 207: Out.int(207); + | 208: Out.int(208); + | 209: Out.int(209); + | 210: Out.int(210); + | 211: Out.int(211); + | 212: Out.int(212); + | 213: Out.int(213); + | 214: Out.int(214); + | 215: Out.int(215); + | 216: Out.int(216); + | 217: Out.int(217); + | 218: Out.int(218); + | 219: Out.int(219); + | 220: Out.int(220); + | 221: Out.int(221); + | 222: Out.int(222); + | 223: Out.int(223); + | 224: Out.int(224); + | 225: Out.int(225); + | 226: Out.int(226); + | 227: Out.int(227); + | 228: Out.int(228); + | 229: Out.int(229); + | 230: Out.int(230); + | 231: Out.int(231); + | 232: Out.int(232); + | 233: Out.int(233); + | 234: Out.int(234); + | 235: Out.int(235); + | 236: Out.int(236); + | 237: Out.int(237); + | 238: Out.int(238); + | 239: Out.int(239); + | 240: Out.int(240); + | 241: Out.int(241); + | 242: Out.int(242); + | 243: Out.int(243); + | 244: Out.int(244); + | 245: Out.int(245); + | 246: Out.int(246); + | 247: Out.int(247); + | 248: Out.int(248); + | 249: Out.int(249); + | 250: Out.int(250); + | 251: Out.int(251); + | 252: Out.int(252); + | 253: Out.int(253); + | 254: Out.int(254); + | 255: Out.int(255); + | 256: Out.int(256); + | 257: Out.int(257); + | 258: Out.int(258); + | 259: Out.int(259); + | 260: Out.int(260); + | 261: Out.int(261); + | 262: Out.int(262); + | 263: Out.int(263); + | 264: Out.int(264); + | 265: Out.int(265); + | 266: Out.int(266); + | 267: Out.int(267); + | 268: Out.int(268); + | 269: Out.int(269); + | 270: Out.int(270); + | 271: Out.int(271); + | 272: Out.int(272); + | 273: Out.int(273); + | 274: Out.int(274); + | 275: Out.int(275); + | 276: Out.int(276); + | 277: Out.int(277); + | 278: Out.int(278); + | 279: Out.int(279); + | 280: Out.int(280); + | 281: Out.int(281); + | 282: Out.int(282); + | 283: Out.int(283); + | 284: Out.int(284); + | 285: Out.int(285); + | 286: Out.int(286); + | 287: Out.int(287); + | 288: Out.int(288); + | 289: Out.int(289); + | 290: Out.int(290); + | 291: Out.int(291); + | 292: Out.int(292); + | 293: Out.int(293); + | 294: Out.int(294); + | 295: Out.int(295); + | 296: Out.int(296); + | 297: Out.int(297); + | 298: Out.int(298); + | 299: Out.int(299); + | 300: Out.int(300); + | 301: Out.int(301); + | 302: Out.int(302); + | 303: Out.int(303); + | 304: Out.int(304); + | 305: Out.int(305); + | 306: Out.int(306); + | 307: Out.int(307); + | 308: Out.int(308); + | 309: Out.int(309); + | 310: Out.int(310); + | 311: Out.int(311); + | 312: Out.int(312); + | 313: Out.int(313); + | 314: Out.int(314); + | 315: Out.int(315); + | 316: Out.int(316); + | 317: Out.int(317); + | 318: Out.int(318); + | 319: Out.int(319); + | 320: Out.int(320); + | 321: Out.int(321); + | 322: Out.int(322); + | 323: Out.int(323); + | 324: Out.int(324); + | 325: Out.int(325); + | 326: Out.int(326); + | 327: Out.int(327); + | 328: Out.int(328); + | 329: Out.int(329); + | 330: Out.int(330); + | 331: Out.int(331); + | 332: Out.int(332); + | 333: Out.int(333); + | 334: Out.int(334); + | 335: Out.int(335); + | 336: Out.int(336); + | 337: Out.int(337); + | 338: Out.int(338); + | 339: Out.int(339); + | 340: Out.int(340); + | 341: Out.int(341); + | 342: Out.int(342); + | 343: Out.int(343); + | 344: Out.int(344); + | 345: Out.int(345); + | 346: Out.int(346); + | 347: Out.int(347); + | 348: Out.int(348); + | 349: Out.int(349); + | 350: Out.int(350); + | 351: Out.int(351); + | 352: Out.int(352); + | 353: Out.int(353); + | 354: Out.int(354); + | 355: Out.int(355); + | 356: Out.int(356); + | 357: Out.int(357); + | 358: Out.int(358); + | 359: Out.int(359); + | 360: Out.int(360); + | 361: Out.int(361); + | 362: Out.int(362); + | 363: Out.int(363); + | 364: Out.int(364); + | 365: Out.int(365); + | 366: Out.int(366); + | 367: Out.int(367); + | 368: Out.int(368); + | 369: Out.int(369); + | 370: Out.int(370); + | 371: Out.int(371); + | 372: Out.int(372); + | 373: Out.int(373); + | 374: Out.int(374); + | 375: Out.int(375); + | 376: Out.int(376); + | 377: Out.int(377); + | 378: Out.int(378); + | 379: Out.int(379); + | 380: Out.int(380); + | 381: Out.int(381); + | 382: Out.int(382); + | 383: Out.int(383); + | 384: Out.int(384); + | 385: Out.int(385); + | 386: Out.int(386); + | 387: Out.int(387); + | 388: Out.int(388); + | 389: Out.int(389); + | 390: Out.int(390); + | 391: Out.int(391); + | 392: Out.int(392); + | 393: Out.int(393); + | 394: Out.int(394); + | 395: Out.int(395); + | 396: Out.int(396); + | 397: Out.int(397); + | 398: Out.int(398); + | 399: Out.int(399); + | 400: Out.int(400); + | 401: Out.int(401); + | 402: Out.int(402); + | 403: Out.int(403); + | 404: Out.int(404); + | 405: Out.int(405); + | 406: Out.int(406); + | 407: Out.int(407); + | 408: Out.int(408); + | 409: Out.int(409); + | 410: Out.int(410); + | 411: Out.int(411); + | 412: Out.int(412); + | 413: Out.int(413); + | 414: Out.int(414); + | 415: Out.int(415); + | 416: Out.int(416); + | 417: Out.int(417); + | 418: Out.int(418); + | 419: Out.int(419); + | 420: Out.int(420); + | 421: Out.int(421); + | 422: Out.int(422); + | 423: Out.int(423); + | 424: Out.int(424); + | 425: Out.int(425); + | 426: Out.int(426); + | 427: Out.int(427); + | 428: Out.int(428); + | 429: Out.int(429); + | 430: Out.int(430); + | 431: Out.int(431); + | 432: Out.int(432); + | 433: Out.int(433); + | 434: Out.int(434); + | 435: Out.int(435); + | 436: Out.int(436); + | 437: Out.int(437); + | 438: Out.int(438); + | 439: Out.int(439); + | 440: Out.int(440); + | 441: Out.int(441); + | 442: Out.int(442); + | 443: Out.int(443); + | 444: Out.int(444); + | 445: Out.int(445); + | 446: Out.int(446); + | 447: Out.int(447); + | 448: Out.int(448); + | 449: Out.int(449); + | 450: Out.int(450); + | 451: Out.int(451); + | 452: Out.int(452); + | 453: Out.int(453); + | 454: Out.int(454); + | 455: Out.int(455); + | 456: Out.int(456); + | 457: Out.int(457); + | 458: Out.int(458); + | 459: Out.int(459); + | 460: Out.int(460); + | 461: Out.int(461); + | 462: Out.int(462); + | 463: Out.int(463); + | 464: Out.int(464); + | 465: Out.int(465); + | 466: Out.int(466); + | 467: Out.int(467); + | 468: Out.int(468); + | 469: Out.int(469); + | 470: Out.int(470); + | 471: Out.int(471); + | 472: Out.int(472); + | 473: Out.int(473); + | 474: Out.int(474); + | 475: Out.int(475); + | 476: Out.int(476); + | 477: Out.int(477); + | 478: Out.int(478); + | 479: Out.int(479); + | 480: Out.int(480); + | 481: Out.int(481); + | 482: Out.int(482); + | 483: Out.int(483); + | 484: Out.int(484); + | 485: Out.int(485); + | 486: Out.int(486); + | 487: Out.int(487); + | 488: Out.int(488); + | 489: Out.int(489); + | 490: Out.int(490); + | 491: Out.int(491); + | 492: Out.int(492); + | 493: Out.int(493); + | 494: Out.int(494); + | 495: Out.int(495); + | 496: Out.int(496); + | 497: Out.int(497); + | 498: Out.int(498); + | 499: Out.int(499); + | 500: Out.int(500); + | 501: Out.int(501); + | 502: Out.int(502); + | 503: Out.int(503); + | 504: Out.int(504); + | 505: Out.int(505); + | 506: Out.int(506); + | 507: Out.int(507); + | 508: Out.int(508); + | 509: Out.int(509); + | 510: Out.int(510); + | 511: Out.int(511); + | 512: Out.int(512); + | 513: Out.int(513); + | 514: Out.int(514); + | 515: Out.int(515); + | 516: Out.int(516); + | 517: Out.int(517); + | 518: Out.int(518); + | 519: Out.int(519); + | 520: Out.int(520); + | 521: Out.int(521); + | 522: Out.int(522); + | 523: Out.int(523); + | 524: Out.int(524); + | 525: Out.int(525); + | 526: Out.int(526); + | 527: Out.int(527); + | 528: Out.int(528); + | 529: Out.int(529); + | 530: Out.int(530); + | 531: Out.int(531); + | 532: Out.int(532); + | 533: Out.int(533); + | 534: Out.int(534); + | 535: Out.int(535); + | 536: Out.int(536); + | 537: Out.int(537); + | 538: Out.int(538); + | 539: Out.int(539); + | 540: Out.int(540); + | 541: Out.int(541); + | 542: Out.int(542); + | 543: Out.int(543); + | 544: Out.int(544); + | 545: Out.int(545); + | 546: Out.int(546); + | 547: Out.int(547); + | 548: Out.int(548); + | 549: Out.int(549); + | 550: Out.int(550); + | 551: Out.int(551); + | 552: Out.int(552); + | 553: Out.int(553); + | 554: Out.int(554); + | 555: Out.int(555); + | 556: Out.int(556); + | 557: Out.int(557); + | 558: Out.int(558); + | 559: Out.int(559); + | 560: Out.int(560); + | 561: Out.int(561); + | 562: Out.int(562); + | 563: Out.int(563); + | 564: Out.int(564); + | 565: Out.int(565); + | 566: Out.int(566); + | 567: Out.int(567); + | 568: Out.int(568); + | 569: Out.int(569); + | 570: Out.int(570); + | 571: Out.int(571); + | 572: Out.int(572); + | 573: Out.int(573); + | 574: Out.int(574); + | 575: Out.int(575); + | 576: Out.int(576); + | 577: Out.int(577); + | 578: Out.int(578); + | 579: Out.int(579); + | 580: Out.int(580); + | 581: Out.int(581); + | 582: Out.int(582); + | 583: Out.int(583); + | 584: Out.int(584); + | 585: Out.int(585); + | 586: Out.int(586); + | 587: Out.int(587); + | 588: Out.int(588); + | 589: Out.int(589); + | 590: Out.int(590); + | 591: Out.int(591); + | 592: Out.int(592); + | 593: Out.int(593); + | 594: Out.int(594); + | 595: Out.int(595); + | 596: Out.int(596); + | 597: Out.int(597); + | 598: Out.int(598); + | 599: Out.int(599); + | 600: Out.int(600); + | 601: Out.int(601); + | 602: Out.int(602); + | 603: Out.int(603); + | 604: Out.int(604); + | 605: Out.int(605); + | 606: Out.int(606); + | 607: Out.int(607); + | 608: Out.int(608); + | 609: Out.int(609); + | 610: Out.int(610); + | 611: Out.int(611); + | 612: Out.int(612); + | 613: Out.int(613); + | 614: Out.int(614); + | 615: Out.int(615); + | 616: Out.int(616); + | 617: Out.int(617); + | 618: Out.int(618); + | 619: Out.int(619); + | 620: Out.int(620); + | 621: Out.int(621); + | 622: Out.int(622); + | 623: Out.int(623); + | 624: Out.int(624); + | 625: Out.int(625); + | 626: Out.int(626); + | 627: Out.int(627); + | 628: Out.int(628); + | 629: Out.int(629); + | 630: Out.int(630); + | 631: Out.int(631); + | 632: Out.int(632); + | 633: Out.int(633); + | 634: Out.int(634); + | 635: Out.int(635); + | 636: Out.int(636); + | 637: Out.int(637); + | 638: Out.int(638); + | 639: Out.int(639); + | 640: Out.int(640); + | 641: Out.int(641); + | 642: Out.int(642); + | 643: Out.int(643); + | 644: Out.int(644); + | 645: Out.int(645); + | 646: Out.int(646); + | 647: Out.int(647); + | 648: Out.int(648); + | 649: Out.int(649); + | 650: Out.int(650); + | 651: Out.int(651); + | 652: Out.int(652); + | 653: Out.int(653); + | 654: Out.int(654); + | 655: Out.int(655); + | 656: Out.int(656); + | 657: Out.int(657); + | 658: Out.int(658); + | 659: Out.int(659); + | 660: Out.int(660); + | 661: Out.int(661); + | 662: Out.int(662); + | 663: Out.int(663); + | 664: Out.int(664); + | 665: Out.int(665); + | 666: Out.int(666); + | 667: Out.int(667); + | 668: Out.int(668); + | 669: Out.int(669); + | 670: Out.int(670); + | 671: Out.int(671); + | 672: Out.int(672); + | 673: Out.int(673); + | 674: Out.int(674); + | 675: Out.int(675); + | 676: Out.int(676); + | 677: Out.int(677); + | 678: Out.int(678); + | 679: Out.int(679); + | 680: Out.int(680); + | 681: Out.int(681); + | 682: Out.int(682); + | 683: Out.int(683); + | 684: Out.int(684); + | 685: Out.int(685); + | 686: Out.int(686); + | 687: Out.int(687); + | 688: Out.int(688); + | 689: Out.int(689); + | 690: Out.int(690); + | 691: Out.int(691); + | 692: Out.int(692); + | 693: Out.int(693); + | 694: Out.int(694); + | 695: Out.int(695); + | 696: Out.int(696); + | 697: Out.int(697); + | 698: Out.int(698); + | 699: Out.int(699); + | 700: Out.int(700); + | 701: Out.int(701); + | 702: Out.int(702); + | 703: Out.int(703); + | 704: Out.int(704); + | 705: Out.int(705); + | 706: Out.int(706); + | 707: Out.int(707); + | 708: Out.int(708); + | 709: Out.int(709); + | 710: Out.int(710); + | 711: Out.int(711); + | 712: Out.int(712); + | 713: Out.int(713); + | 714: Out.int(714); + | 715: Out.int(715); + | 716: Out.int(716); + | 717: Out.int(717); + | 718: Out.int(718); + | 719: Out.int(719); + | 720: Out.int(720); + | 721: Out.int(721); + | 722: Out.int(722); + | 723: Out.int(723); + | 724: Out.int(724); + | 725: Out.int(725); + | 726: Out.int(726); + | 727: Out.int(727); + | 728: Out.int(728); + | 729: Out.int(729); + | 730: Out.int(730); + | 731: Out.int(731); + | 732: Out.int(732); + | 733: Out.int(733); + | 734: Out.int(734); + | 735: Out.int(735); + | 736: Out.int(736); + | 737: Out.int(737); + | 738: Out.int(738); + | 739: Out.int(739); + | 740: Out.int(740); + | 741: Out.int(741); + | 742: Out.int(742); + | 743: Out.int(743); + | 744: Out.int(744); + | 745: Out.int(745); + | 746: Out.int(746); + | 747: Out.int(747); + | 748: Out.int(748); + | 749: Out.int(749); + | 750: Out.int(750); + | 751: Out.int(751); + | 752: Out.int(752); + | 753: Out.int(753); + | 754: Out.int(754); + | 755: Out.int(755); + | 756: Out.int(756); + | 757: Out.int(757); + | 758: Out.int(758); + | 759: Out.int(759); + | 760: Out.int(760); + | 761: Out.int(761); + | 762: Out.int(762); + | 763: Out.int(763); + | 764: Out.int(764); + | 765: Out.int(765); + | 766: Out.int(766); + | 767: Out.int(767); + | 768: Out.int(768); + | 769: Out.int(769); + | 770: Out.int(770); + | 771: Out.int(771); + | 772: Out.int(772); + | 773: Out.int(773); + | 774: Out.int(774); + | 775: Out.int(775); + | 776: Out.int(776); + | 777: Out.int(777); + | 778: Out.int(778); + | 779: Out.int(779); + | 780: Out.int(780); + | 781: Out.int(781); + | 782: Out.int(782); + | 783: Out.int(783); + | 784: Out.int(784); + | 785: Out.int(785); + | 786: Out.int(786); + | 787: Out.int(787); + | 788: Out.int(788); + | 789: Out.int(789); + | 790: Out.int(790); + | 791: Out.int(791); + | 792: Out.int(792); + | 793: Out.int(793); + | 794: Out.int(794); + | 795: Out.int(795); + | 796: Out.int(796); + | 797: Out.int(797); + | 798: Out.int(798); + | 799: Out.int(799); + | 800: Out.int(800); + | 801: Out.int(801); + | 802: Out.int(802); + | 803: Out.int(803); + | 804: Out.int(804); + | 805: Out.int(805); + | 806: Out.int(806); + | 807: Out.int(807); + | 808: Out.int(808); + | 809: Out.int(809); + | 810: Out.int(810); + | 811: Out.int(811); + | 812: Out.int(812); + | 813: Out.int(813); + | 814: Out.int(814); + | 815: Out.int(815); + | 816: Out.int(816); + | 817: Out.int(817); + | 818: Out.int(818); + | 819: Out.int(819); + | 820: Out.int(820); + | 821: Out.int(821); + | 822: Out.int(822); + | 823: Out.int(823); + | 824: Out.int(824); + | 825: Out.int(825); + | 826: Out.int(826); + | 827: Out.int(827); + | 828: Out.int(828); + | 829: Out.int(829); + | 830: Out.int(830); + | 831: Out.int(831); + | 832: Out.int(832); + | 833: Out.int(833); + | 834: Out.int(834); + | 835: Out.int(835); + | 836: Out.int(836); + | 837: Out.int(837); + | 838: Out.int(838); + | 839: Out.int(839); + | 840: Out.int(840); + | 841: Out.int(841); + | 842: Out.int(842); + | 843: Out.int(843); + | 844: Out.int(844); + | 845: Out.int(845); + | 846: Out.int(846); + | 847: Out.int(847); + | 848: Out.int(848); + | 849: Out.int(849); + | 850: Out.int(850); + | 851: Out.int(851); + | 852: Out.int(852); + | 853: Out.int(853); + | 854: Out.int(854); + | 855: Out.int(855); + | 856: Out.int(856); + | 857: Out.int(857); + | 858: Out.int(858); + | 859: Out.int(859); + | 860: Out.int(860); + | 861: Out.int(861); + | 862: Out.int(862); + | 863: Out.int(863); + | 864: Out.int(864); + | 865: Out.int(865); + | 866: Out.int(866); + | 867: Out.int(867); + | 868: Out.int(868); + | 869: Out.int(869); + | 870: Out.int(870); + | 871: Out.int(871); + | 872: Out.int(872); + | 873: Out.int(873); + | 874: Out.int(874); + | 875: Out.int(875); + | 876: Out.int(876); + | 877: Out.int(877); + | 878: Out.int(878); + | 879: Out.int(879); + | 880: Out.int(880); + | 881: Out.int(881); + | 882: Out.int(882); + | 883: Out.int(883); + | 884: Out.int(884); + | 885: Out.int(885); + | 886: Out.int(886); + | 887: Out.int(887); + | 888: Out.int(888); + | 889: Out.int(889); + | 890: Out.int(890); + | 891: Out.int(891); + | 892: Out.int(892); + | 893: Out.int(893); + | 894: Out.int(894); + | 895: Out.int(895); + | 896: Out.int(896); + | 897: Out.int(897); + | 898: Out.int(898); + | 899: Out.int(899); + | 900: Out.int(900); + | 901: Out.int(901); + | 902: Out.int(902); + | 903: Out.int(903); + | 904: Out.int(904); + | 905: Out.int(905); + | 906: Out.int(906); + | 907: Out.int(907); + | 908: Out.int(908); + | 909: Out.int(909); + | 910: Out.int(910); + | 911: Out.int(911); + | 912: Out.int(912); + | 913: Out.int(913); + | 914: Out.int(914); + | 915: Out.int(915); + | 916: Out.int(916); + | 917: Out.int(917); + | 918: Out.int(918); + | 919: Out.int(919); + | 920: Out.int(920); + | 921: Out.int(921); + | 922: Out.int(922); + | 923: Out.int(923); + | 924: Out.int(924); + | 925: Out.int(925); + | 926: Out.int(926); + | 927: Out.int(927); + | 928: Out.int(928); + | 929: Out.int(929); + | 930: Out.int(930); + | 931: Out.int(931); + | 932: Out.int(932); + | 933: Out.int(933); + | 934: Out.int(934); + | 935: Out.int(935); + | 936: Out.int(936); + | 937: Out.int(937); + | 938: Out.int(938); + | 939: Out.int(939); + | 940: Out.int(940); + | 941: Out.int(941); + | 942: Out.int(942); + | 943: Out.int(943); + | 944: Out.int(944); + | 945: Out.int(945); + | 946: Out.int(946); + | 947: Out.int(947); + | 948: Out.int(948); + | 949: Out.int(949); + | 950: Out.int(950); + | 951: Out.int(951); + | 952: Out.int(952); + | 953: Out.int(953); + | 954: Out.int(954); + | 955: Out.int(955); + | 956: Out.int(956); + | 957: Out.int(957); + | 958: Out.int(958); + | 959: Out.int(959); + | 960: Out.int(960); + | 961: Out.int(961); + | 962: Out.int(962); + | 963: Out.int(963); + | 964: Out.int(964); + | 965: Out.int(965); + | 966: Out.int(966); + | 967: Out.int(967); + | 968: Out.int(968); + | 969: Out.int(969); + | 970: Out.int(970); + | 971: Out.int(971); + | 972: Out.int(972); + | 973: Out.int(973); + | 974: Out.int(974); + | 975: Out.int(975); + | 976: Out.int(976); + | 977: Out.int(977); + | 978: Out.int(978); + | 979: Out.int(979); + | 980: Out.int(980); + | 981: Out.int(981); + | 982: Out.int(982); + | 983: Out.int(983); + | 984: Out.int(984); + | 985: Out.int(985); + | 986: Out.int(986); + | 987: Out.int(987); + | 988: Out.int(988); + | 989: Out.int(989); + | 990: Out.int(990); + | 991: Out.int(991); + | 992: Out.int(992); + | 993: Out.int(993); + | 994: Out.int(994); + | 995: Out.int(995); + | 996: Out.int(996); + | 997: Out.int(997); + | 998: Out.int(998); + | 999: Out.int(999); + | 1000: Out.int(1000); + | 1001: Out.int(1001); + | 1002: Out.int(1002); + | 1003: Out.int(1003); + | 1004: Out.int(1004); + | 1005: Out.int(1005); + | 1006: Out.int(1006); + | 1007: Out.int(1007); + | 1008: Out.int(1008); + | 1009: Out.int(1009); + | 1010: Out.int(1010); + | 1011: Out.int(1011); + | 1012: Out.int(1012); + | 1013: Out.int(1013); + | 1014: Out.int(1014); + | 1015: Out.int(1015); + | 1016: Out.int(1016); + | 1017: Out.int(1017); + | 1018: Out.int(1018); + | 1019: Out.int(1019); + | 1020: Out.int(1020); + | 1021: Out.int(1021); + | 1022: Out.int(1022); + | 1023: Out.int(1023); + | 1024: Out.int(1024); + | 1025: Out.int(1025); + | else: Out.int(0); + end; + Out.char('\n'); +end StmtManyLabels. diff --git a/test/err/StmtManyValues.err b/test/err/StmtManyValues.err new file mode 100644 index 0000000..9546ee2 --- /dev/null +++ b/test/err/StmtManyValues.err @@ -0,0 +1,4 @@ +test/err/StmtManyValues.raz:8:3377: error: more than 1024 values waiting in one expression + 8 | ...2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, 1))))))))))))... + | ^ +raz: 1 error diff --git a/test/err/StmtManyValues.raz b/test/err/StmtManyValues.raz new file mode 100644 index 0000000..5d51e35 --- /dev/null +++ b/test/err/StmtManyValues.raz @@ -0,0 +1,10 @@ +(* Nested calls of 8 arguments leave more than 1024 values waiting (MaxStack in Gen). *) +module StmtManyValues; +import Out; +proc f(a, b, c, d, e, f, g, h: INT): INT; +begin return a + h; end; +var x: INT; +begin + x := f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, f(1, 2, 3, 4, 5, 6, 7, 1)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + Out.int(x); Out.char('\n'); +end StmtManyValues. diff --git a/test/err/mods/DeepChain01.raz b/test/err/mods/DeepChain01.raz new file mode 100644 index 0000000..00c10c5 --- /dev/null +++ b/test/err/mods/DeepChain01.raz @@ -0,0 +1,5 @@ +module DeepChain01; +import N := DeepChain02; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain01. diff --git a/test/err/mods/DeepChain02.raz b/test/err/mods/DeepChain02.raz new file mode 100644 index 0000000..dd49d66 --- /dev/null +++ b/test/err/mods/DeepChain02.raz @@ -0,0 +1,5 @@ +module DeepChain02; +import N := DeepChain03; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain02. diff --git a/test/err/mods/DeepChain03.raz b/test/err/mods/DeepChain03.raz new file mode 100644 index 0000000..2ec4949 --- /dev/null +++ b/test/err/mods/DeepChain03.raz @@ -0,0 +1,5 @@ +module DeepChain03; +import N := DeepChain04; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain03. diff --git a/test/err/mods/DeepChain04.raz b/test/err/mods/DeepChain04.raz new file mode 100644 index 0000000..c6a1664 --- /dev/null +++ b/test/err/mods/DeepChain04.raz @@ -0,0 +1,5 @@ +module DeepChain04; +import N := DeepChain05; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain04. diff --git a/test/err/mods/DeepChain05.raz b/test/err/mods/DeepChain05.raz new file mode 100644 index 0000000..616f1d0 --- /dev/null +++ b/test/err/mods/DeepChain05.raz @@ -0,0 +1,5 @@ +module DeepChain05; +import N := DeepChain06; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain05. diff --git a/test/err/mods/DeepChain06.raz b/test/err/mods/DeepChain06.raz new file mode 100644 index 0000000..aa14016 --- /dev/null +++ b/test/err/mods/DeepChain06.raz @@ -0,0 +1,5 @@ +module DeepChain06; +import N := DeepChain07; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain06. diff --git a/test/err/mods/DeepChain07.raz b/test/err/mods/DeepChain07.raz new file mode 100644 index 0000000..ddaf2a5 --- /dev/null +++ b/test/err/mods/DeepChain07.raz @@ -0,0 +1,5 @@ +module DeepChain07; +import N := DeepChain08; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain07. diff --git a/test/err/mods/DeepChain08.raz b/test/err/mods/DeepChain08.raz new file mode 100644 index 0000000..b8a7452 --- /dev/null +++ b/test/err/mods/DeepChain08.raz @@ -0,0 +1,5 @@ +module DeepChain08; +import N := DeepChain09; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain08. diff --git a/test/err/mods/DeepChain09.raz b/test/err/mods/DeepChain09.raz new file mode 100644 index 0000000..6b807b4 --- /dev/null +++ b/test/err/mods/DeepChain09.raz @@ -0,0 +1,5 @@ +module DeepChain09; +import N := DeepChain10; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain09. diff --git a/test/err/mods/DeepChain10.raz b/test/err/mods/DeepChain10.raz new file mode 100644 index 0000000..25f46f6 --- /dev/null +++ b/test/err/mods/DeepChain10.raz @@ -0,0 +1,5 @@ +module DeepChain10; +import N := DeepChain11; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain10. diff --git a/test/err/mods/DeepChain11.raz b/test/err/mods/DeepChain11.raz new file mode 100644 index 0000000..06bb225 --- /dev/null +++ b/test/err/mods/DeepChain11.raz @@ -0,0 +1,5 @@ +module DeepChain11; +import N := DeepChain12; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain11. diff --git a/test/err/mods/DeepChain12.raz b/test/err/mods/DeepChain12.raz new file mode 100644 index 0000000..9b55167 --- /dev/null +++ b/test/err/mods/DeepChain12.raz @@ -0,0 +1,5 @@ +module DeepChain12; +import N := DeepChain13; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain12. diff --git a/test/err/mods/DeepChain13.raz b/test/err/mods/DeepChain13.raz new file mode 100644 index 0000000..5c8e3c0 --- /dev/null +++ b/test/err/mods/DeepChain13.raz @@ -0,0 +1,5 @@ +module DeepChain13; +import N := DeepChain14; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain13. diff --git a/test/err/mods/DeepChain14.raz b/test/err/mods/DeepChain14.raz new file mode 100644 index 0000000..b063c71 --- /dev/null +++ b/test/err/mods/DeepChain14.raz @@ -0,0 +1,5 @@ +module DeepChain14; +import N := DeepChain15; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain14. diff --git a/test/err/mods/DeepChain15.raz b/test/err/mods/DeepChain15.raz new file mode 100644 index 0000000..da31cbf --- /dev/null +++ b/test/err/mods/DeepChain15.raz @@ -0,0 +1,5 @@ +module DeepChain15; +import N := DeepChain16; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain15. diff --git a/test/err/mods/DeepChain16.raz b/test/err/mods/DeepChain16.raz new file mode 100644 index 0000000..cfcd1b8 --- /dev/null +++ b/test/err/mods/DeepChain16.raz @@ -0,0 +1,5 @@ +module DeepChain16; +import N := DeepChain17; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain16. diff --git a/test/err/mods/DeepChain17.raz b/test/err/mods/DeepChain17.raz new file mode 100644 index 0000000..c8cff00 --- /dev/null +++ b/test/err/mods/DeepChain17.raz @@ -0,0 +1,5 @@ +module DeepChain17; +import N := DeepChain18; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain17. diff --git a/test/err/mods/DeepChain18.raz b/test/err/mods/DeepChain18.raz new file mode 100644 index 0000000..58ff77d --- /dev/null +++ b/test/err/mods/DeepChain18.raz @@ -0,0 +1,5 @@ +module DeepChain18; +import N := DeepChain19; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain18. diff --git a/test/err/mods/DeepChain19.raz b/test/err/mods/DeepChain19.raz new file mode 100644 index 0000000..dd943e5 --- /dev/null +++ b/test/err/mods/DeepChain19.raz @@ -0,0 +1,5 @@ +module DeepChain19; +import N := DeepChain20; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain19. diff --git a/test/err/mods/DeepChain20.raz b/test/err/mods/DeepChain20.raz new file mode 100644 index 0000000..6fcd8ca --- /dev/null +++ b/test/err/mods/DeepChain20.raz @@ -0,0 +1,5 @@ +module DeepChain20; +import N := DeepChain21; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain20. diff --git a/test/err/mods/DeepChain21.raz b/test/err/mods/DeepChain21.raz new file mode 100644 index 0000000..a36281f --- /dev/null +++ b/test/err/mods/DeepChain21.raz @@ -0,0 +1,5 @@ +module DeepChain21; +import N := DeepChain22; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain21. diff --git a/test/err/mods/DeepChain22.raz b/test/err/mods/DeepChain22.raz new file mode 100644 index 0000000..2f17ef9 --- /dev/null +++ b/test/err/mods/DeepChain22.raz @@ -0,0 +1,5 @@ +module DeepChain22; +import N := DeepChain23; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain22. diff --git a/test/err/mods/DeepChain23.raz b/test/err/mods/DeepChain23.raz new file mode 100644 index 0000000..d35fc02 --- /dev/null +++ b/test/err/mods/DeepChain23.raz @@ -0,0 +1,5 @@ +module DeepChain23; +import N := DeepChain24; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain23. diff --git a/test/err/mods/DeepChain24.raz b/test/err/mods/DeepChain24.raz new file mode 100644 index 0000000..e4b3e8d --- /dev/null +++ b/test/err/mods/DeepChain24.raz @@ -0,0 +1,5 @@ +module DeepChain24; +import N := DeepChain25; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain24. diff --git a/test/err/mods/DeepChain25.raz b/test/err/mods/DeepChain25.raz new file mode 100644 index 0000000..244ac7b --- /dev/null +++ b/test/err/mods/DeepChain25.raz @@ -0,0 +1,5 @@ +module DeepChain25; +import N := DeepChain26; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain25. diff --git a/test/err/mods/DeepChain26.raz b/test/err/mods/DeepChain26.raz new file mode 100644 index 0000000..2dc2c35 --- /dev/null +++ b/test/err/mods/DeepChain26.raz @@ -0,0 +1,5 @@ +module DeepChain26; +import N := DeepChain27; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain26. diff --git a/test/err/mods/DeepChain27.raz b/test/err/mods/DeepChain27.raz new file mode 100644 index 0000000..5309f47 --- /dev/null +++ b/test/err/mods/DeepChain27.raz @@ -0,0 +1,5 @@ +module DeepChain27; +import N := DeepChain28; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain27. diff --git a/test/err/mods/DeepChain28.raz b/test/err/mods/DeepChain28.raz new file mode 100644 index 0000000..5982395 --- /dev/null +++ b/test/err/mods/DeepChain28.raz @@ -0,0 +1,5 @@ +module DeepChain28; +import N := DeepChain29; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain28. diff --git a/test/err/mods/DeepChain29.raz b/test/err/mods/DeepChain29.raz new file mode 100644 index 0000000..df1c944 --- /dev/null +++ b/test/err/mods/DeepChain29.raz @@ -0,0 +1,5 @@ +module DeepChain29; +import N := DeepChain30; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain29. diff --git a/test/err/mods/DeepChain30.raz b/test/err/mods/DeepChain30.raz new file mode 100644 index 0000000..236296d --- /dev/null +++ b/test/err/mods/DeepChain30.raz @@ -0,0 +1,5 @@ +module DeepChain30; +import N := DeepChain31; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain30. diff --git a/test/err/mods/DeepChain31.raz b/test/err/mods/DeepChain31.raz new file mode 100644 index 0000000..c82ac66 --- /dev/null +++ b/test/err/mods/DeepChain31.raz @@ -0,0 +1,5 @@ +module DeepChain31; +import N := DeepChain32; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain31. diff --git a/test/err/mods/DeepChain32.raz b/test/err/mods/DeepChain32.raz new file mode 100644 index 0000000..a715514 --- /dev/null +++ b/test/err/mods/DeepChain32.raz @@ -0,0 +1,5 @@ +module DeepChain32; +import N := DeepChain33; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain32. diff --git a/test/err/mods/DeepChain33.raz b/test/err/mods/DeepChain33.raz new file mode 100644 index 0000000..a3c24be --- /dev/null +++ b/test/err/mods/DeepChain33.raz @@ -0,0 +1,5 @@ +module DeepChain33; +import N := DeepChain34; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain33. diff --git a/test/err/mods/DeepChain34.raz b/test/err/mods/DeepChain34.raz new file mode 100644 index 0000000..3d2dc2d --- /dev/null +++ b/test/err/mods/DeepChain34.raz @@ -0,0 +1,5 @@ +module DeepChain34; +import N := DeepChain35; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain34. diff --git a/test/err/mods/DeepChain35.raz b/test/err/mods/DeepChain35.raz new file mode 100644 index 0000000..21450d7 --- /dev/null +++ b/test/err/mods/DeepChain35.raz @@ -0,0 +1,5 @@ +module DeepChain35; +import N := DeepChain36; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain35. diff --git a/test/err/mods/DeepChain36.raz b/test/err/mods/DeepChain36.raz new file mode 100644 index 0000000..f8c764b --- /dev/null +++ b/test/err/mods/DeepChain36.raz @@ -0,0 +1,5 @@ +module DeepChain36; +import N := DeepChain37; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain36. diff --git a/test/err/mods/DeepChain37.raz b/test/err/mods/DeepChain37.raz new file mode 100644 index 0000000..cf4aadd --- /dev/null +++ b/test/err/mods/DeepChain37.raz @@ -0,0 +1,5 @@ +module DeepChain37; +import N := DeepChain38; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain37. diff --git a/test/err/mods/DeepChain38.raz b/test/err/mods/DeepChain38.raz new file mode 100644 index 0000000..e8af10f --- /dev/null +++ b/test/err/mods/DeepChain38.raz @@ -0,0 +1,5 @@ +module DeepChain38; +import N := DeepChain39; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain38. diff --git a/test/err/mods/DeepChain39.raz b/test/err/mods/DeepChain39.raz new file mode 100644 index 0000000..cb291da --- /dev/null +++ b/test/err/mods/DeepChain39.raz @@ -0,0 +1,5 @@ +module DeepChain39; +import N := DeepChain40; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain39. diff --git a/test/err/mods/DeepChain40.raz b/test/err/mods/DeepChain40.raz new file mode 100644 index 0000000..a24a779 --- /dev/null +++ b/test/err/mods/DeepChain40.raz @@ -0,0 +1,5 @@ +module DeepChain40; +import N := DeepChain41; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain40. diff --git a/test/err/mods/DeepChain41.raz b/test/err/mods/DeepChain41.raz new file mode 100644 index 0000000..f342173 --- /dev/null +++ b/test/err/mods/DeepChain41.raz @@ -0,0 +1,5 @@ +module DeepChain41; +import N := DeepChain42; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain41. diff --git a/test/err/mods/DeepChain42.raz b/test/err/mods/DeepChain42.raz new file mode 100644 index 0000000..6c7fc7a --- /dev/null +++ b/test/err/mods/DeepChain42.raz @@ -0,0 +1,5 @@ +module DeepChain42; +import N := DeepChain43; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain42. diff --git a/test/err/mods/DeepChain43.raz b/test/err/mods/DeepChain43.raz new file mode 100644 index 0000000..6569e92 --- /dev/null +++ b/test/err/mods/DeepChain43.raz @@ -0,0 +1,5 @@ +module DeepChain43; +import N := DeepChain44; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain43. diff --git a/test/err/mods/DeepChain44.raz b/test/err/mods/DeepChain44.raz new file mode 100644 index 0000000..c89dd1d --- /dev/null +++ b/test/err/mods/DeepChain44.raz @@ -0,0 +1,5 @@ +module DeepChain44; +import N := DeepChain45; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain44. diff --git a/test/err/mods/DeepChain45.raz b/test/err/mods/DeepChain45.raz new file mode 100644 index 0000000..4288fe4 --- /dev/null +++ b/test/err/mods/DeepChain45.raz @@ -0,0 +1,5 @@ +module DeepChain45; +import N := DeepChain46; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain45. diff --git a/test/err/mods/DeepChain46.raz b/test/err/mods/DeepChain46.raz new file mode 100644 index 0000000..f8db81e --- /dev/null +++ b/test/err/mods/DeepChain46.raz @@ -0,0 +1,5 @@ +module DeepChain46; +import N := DeepChain47; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain46. diff --git a/test/err/mods/DeepChain47.raz b/test/err/mods/DeepChain47.raz new file mode 100644 index 0000000..4b6ccd8 --- /dev/null +++ b/test/err/mods/DeepChain47.raz @@ -0,0 +1,5 @@ +module DeepChain47; +import N := DeepChain48; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain47. diff --git a/test/err/mods/DeepChain48.raz b/test/err/mods/DeepChain48.raz new file mode 100644 index 0000000..cad6e0e --- /dev/null +++ b/test/err/mods/DeepChain48.raz @@ -0,0 +1,5 @@ +module DeepChain48; +import N := DeepChain49; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain48. diff --git a/test/err/mods/DeepChain49.raz b/test/err/mods/DeepChain49.raz new file mode 100644 index 0000000..d72af9b --- /dev/null +++ b/test/err/mods/DeepChain49.raz @@ -0,0 +1,5 @@ +module DeepChain49; +import N := DeepChain50; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain49. diff --git a/test/err/mods/DeepChain50.raz b/test/err/mods/DeepChain50.raz new file mode 100644 index 0000000..43591bc --- /dev/null +++ b/test/err/mods/DeepChain50.raz @@ -0,0 +1,5 @@ +module DeepChain50; +import N := DeepChain51; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain50. diff --git a/test/err/mods/DeepChain51.raz b/test/err/mods/DeepChain51.raz new file mode 100644 index 0000000..4320786 --- /dev/null +++ b/test/err/mods/DeepChain51.raz @@ -0,0 +1,5 @@ +module DeepChain51; +import N := DeepChain52; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain51. diff --git a/test/err/mods/DeepChain52.raz b/test/err/mods/DeepChain52.raz new file mode 100644 index 0000000..6f633ce --- /dev/null +++ b/test/err/mods/DeepChain52.raz @@ -0,0 +1,5 @@ +module DeepChain52; +import N := DeepChain53; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain52. diff --git a/test/err/mods/DeepChain53.raz b/test/err/mods/DeepChain53.raz new file mode 100644 index 0000000..442d6c2 --- /dev/null +++ b/test/err/mods/DeepChain53.raz @@ -0,0 +1,5 @@ +module DeepChain53; +import N := DeepChain54; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain53. diff --git a/test/err/mods/DeepChain54.raz b/test/err/mods/DeepChain54.raz new file mode 100644 index 0000000..2cc4b98 --- /dev/null +++ b/test/err/mods/DeepChain54.raz @@ -0,0 +1,5 @@ +module DeepChain54; +import N := DeepChain55; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain54. diff --git a/test/err/mods/DeepChain55.raz b/test/err/mods/DeepChain55.raz new file mode 100644 index 0000000..a337df5 --- /dev/null +++ b/test/err/mods/DeepChain55.raz @@ -0,0 +1,5 @@ +module DeepChain55; +import N := DeepChain56; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain55. diff --git a/test/err/mods/DeepChain56.raz b/test/err/mods/DeepChain56.raz new file mode 100644 index 0000000..e51322b --- /dev/null +++ b/test/err/mods/DeepChain56.raz @@ -0,0 +1,5 @@ +module DeepChain56; +import N := DeepChain57; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain56. diff --git a/test/err/mods/DeepChain57.raz b/test/err/mods/DeepChain57.raz new file mode 100644 index 0000000..bc96a39 --- /dev/null +++ b/test/err/mods/DeepChain57.raz @@ -0,0 +1,5 @@ +module DeepChain57; +import N := DeepChain58; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain57. diff --git a/test/err/mods/DeepChain58.raz b/test/err/mods/DeepChain58.raz new file mode 100644 index 0000000..d982069 --- /dev/null +++ b/test/err/mods/DeepChain58.raz @@ -0,0 +1,5 @@ +module DeepChain58; +import N := DeepChain59; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain58. diff --git a/test/err/mods/DeepChain59.raz b/test/err/mods/DeepChain59.raz new file mode 100644 index 0000000..3d614b9 --- /dev/null +++ b/test/err/mods/DeepChain59.raz @@ -0,0 +1,5 @@ +module DeepChain59; +import N := DeepChain60; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain59. diff --git a/test/err/mods/DeepChain60.raz b/test/err/mods/DeepChain60.raz new file mode 100644 index 0000000..82fc9d3 --- /dev/null +++ b/test/err/mods/DeepChain60.raz @@ -0,0 +1,5 @@ +module DeepChain60; +import N := DeepChain61; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain60. diff --git a/test/err/mods/DeepChain61.raz b/test/err/mods/DeepChain61.raz new file mode 100644 index 0000000..c226fb6 --- /dev/null +++ b/test/err/mods/DeepChain61.raz @@ -0,0 +1,5 @@ +module DeepChain61; +import N := DeepChain62; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain61. diff --git a/test/err/mods/DeepChain62.raz b/test/err/mods/DeepChain62.raz new file mode 100644 index 0000000..d09eeb1 --- /dev/null +++ b/test/err/mods/DeepChain62.raz @@ -0,0 +1,5 @@ +module DeepChain62; +import N := DeepChain63; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain62. diff --git a/test/err/mods/DeepChain63.raz b/test/err/mods/DeepChain63.raz new file mode 100644 index 0000000..1b3082d --- /dev/null +++ b/test/err/mods/DeepChain63.raz @@ -0,0 +1,5 @@ +module DeepChain63; +import N := DeepChain64; +proc depth*: INT; +begin return N.depth() + 1; end; +end DeepChain63. diff --git a/test/err/mods/DeepChain64.raz b/test/err/mods/DeepChain64.raz new file mode 100644 index 0000000..fab4f24 --- /dev/null +++ b/test/err/mods/DeepChain64.raz @@ -0,0 +1,4 @@ +module DeepChain64; +proc depth*: INT; +begin return 1; end; +end DeepChain64. diff --git a/test/err/mods/ManyArgs.raz b/test/err/mods/ManyArgs.raz new file mode 100644 index 0000000..c20a36d --- /dev/null +++ b/test/err/mods/ManyArgs.raz @@ -0,0 +1,6 @@ +module ManyArgs(T1, T2, T3, T4, T5, T6, T7, T8, T9); +var v: T1; +proc put*(x: T1); begin v := x; end; +proc get*: T1; +begin return v; end; +end ManyArgs. diff --git a/test/run/StmtNestExpr.expect b/test/run/StmtNestExpr.expect new file mode 100644 index 0000000..1191247 --- /dev/null +++ b/test/run/StmtNestExpr.expect @@ -0,0 +1,2 @@ +1 +2 diff --git a/test/run/StmtNestExpr.raz b/test/run/StmtNestExpr.raz new file mode 100644 index 0000000..4ab5a42 --- /dev/null +++ b/test/run/StmtNestExpr.raz @@ -0,0 +1,12 @@ +(* 254 parentheses and calls nested: with the statement and the number, 256 (MaxNest). *) +module StmtNestExpr; +import Out; +proc id(x: INT): INT; +begin return x; end; +var x: INT; +begin + x := ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((1)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + Out.int(x); Out.char('\n'); + x := id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(2)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + Out.int(x); Out.char('\n'); +end StmtNestExpr. diff --git a/test/run/StmtNestStmts.expect b/test/run/StmtNestStmts.expect new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/test/run/StmtNestStmts.expect @@ -0,0 +1 @@ +7 diff --git a/test/run/StmtNestStmts.raz b/test/run/StmtNestStmts.raz new file mode 100644 index 0000000..a436f0d --- /dev/null +++ b/test/run/StmtNestStmts.raz @@ -0,0 +1,517 @@ +(* 254 statements nested, and the ones in them: 256 (MaxNest). *) +module StmtNestStmts; +import Out; +proc p; +var x: INT; +begin + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + x := 7; Out.int(x); Out.char('\n'); + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; +begin p; end StmtNestStmts.