├── README.md
├── solution
├── CCI
│ ├── Mono
│ │ ├── System.Compiler.Framework.dll
│ │ ├── System.Compiler.Runtime.dll
│ │ └── System.Compiler.dll
│ └── Windows
│ │ ├── System.Compiler.Framework.dll
│ │ ├── System.Compiler.Runtime.dll
│ │ └── System.Compiler.dll
├── CommandLine
│ ├── ETH.Zonnon.CommandLineCompiler.csproj
│ └── Main.cs
├── Compiler
│ ├── ASTChecker.cs
│ ├── ASTVisitor.cs
│ ├── ASTtoXML.cs
│ ├── Analyzer.cs
│ ├── AssemblyInfo.cs
│ ├── Attributes.cs
│ ├── Compiler.cs
│ ├── Compute
│ │ ├── AssignmentConverter.cs
│ │ ├── ComputeKernelTemplates.Designer.cs
│ │ ├── ComputeKernelTemplates.resx
│ │ ├── ComputeType.cs
│ │ ├── ConversionHelper.cs
│ │ ├── ExpressionConverter.cs
│ │ ├── ExpressionVisitor.cs
│ │ ├── Extensions.cs
│ │ ├── KernelRegistry.cs
│ │ ├── Kernels
│ │ │ ├── ElementWiseCopy.c
│ │ │ ├── ElementWiseCopy_indexer.c
│ │ │ ├── LU.c
│ │ │ ├── LeftDivision.c
│ │ │ ├── LeftLUDivision.c
│ │ │ ├── MatrixExponent.c
│ │ │ ├── MatrixMatrixMultiplication.c
│ │ │ ├── MatrixTranspose.c
│ │ │ ├── MatrixVectorMultiplication.c
│ │ │ ├── Reduction.c
│ │ │ ├── VectorMatrixMultiplication.c
│ │ │ ├── all.c
│ │ │ ├── any.c
│ │ │ ├── apply.c
│ │ │ ├── apply_indexer.c
│ │ │ ├── pps1.c
│ │ │ └── pps2.c
│ │ ├── MethodConverter.cs
│ │ ├── NodeHelper.cs
│ │ ├── OperationRegistry.cs
│ │ └── Structs.cs
│ ├── ContextN.cs
│ ├── ETH.Zonnon.csproj
│ ├── Error.cs
│ ├── ErrorMessages.ResX
│ ├── InterimKey.snk
│ ├── LanguageService.cs
│ ├── Lexem.cs
│ ├── List.cs
│ ├── ListN.cs
│ ├── MathGenerator.cs
│ ├── Options.cs
│ ├── ParserN.cs
│ ├── Protocol.cs
│ ├── Recovery.cs
│ ├── Registration.cs
│ ├── ReportN.cs
│ ├── SC.cs
│ ├── SCFG.cs
│ ├── Scaner.cs
│ ├── StandardN.cs
│ ├── SysInfo.cs
│ ├── Table.cs
│ ├── Test.cs
│ ├── Test1.cs
│ ├── Tests.cs
│ ├── TreeN.cs
│ ├── TreeNUtil.cs
│ └── zcversion.cs
├── Tester
│ ├── Tester.cs
│ ├── Tester.csproj
│ ├── run-mono.cmd
│ ├── run-win.cmd
│ └── testinfo.txt
├── Zonnon.RTL
│ ├── AssemblyInfo.cs
│ ├── Attributes.cs
│ ├── ColSPA.cs
│ ├── Compute
│ │ ├── Codelet.cs
│ │ ├── ComputeDevice.cs
│ │ ├── ComputeHelper.cs
│ │ ├── ComputeManager.cs
│ │ ├── Data.cs
│ │ ├── DependencyManager.cs
│ │ ├── DeviceMemorySpace.cs
│ │ ├── KernelManager.cs
│ │ ├── Mutex.cs
│ │ └── Task.cs
│ ├── InterimKey.snk
│ ├── OpenCL.Wrapper
│ │ ├── Buffer.cs
│ │ ├── BufferFlags.cs
│ │ ├── CommandExecutionStatus.cs
│ │ ├── CommandProfilingInfo.cs
│ │ ├── CommandQueue.cs
│ │ ├── CommandQueueFlags.cs
│ │ ├── CompiledProgram.cs
│ │ ├── Context.cs
│ │ ├── ContextProperty.cs
│ │ ├── Device.cs
│ │ ├── DeviceInfo.cs
│ │ ├── DeviceType.cs
│ │ ├── EventInfo.cs
│ │ ├── EventObject.cs
│ │ ├── GetInfoArrayCache.cs
│ │ ├── GetInfoCallback.cs
│ │ ├── GetInfoStringCache.cs
│ │ ├── GetInfoStructCache.cs
│ │ ├── Helpers.cs
│ │ ├── Kernel.cs
│ │ ├── NativeMethods.cs
│ │ ├── OpenCLBoolean.cs
│ │ ├── OpenCLException.cs
│ │ ├── Platform.cs
│ │ ├── ProgramBuildInfo.cs
│ │ └── ReturnCode.cs
│ ├── RTL.cs
│ ├── RowSPA.cs
│ ├── SPA.cs
│ ├── SparseMatrix.cs
│ ├── SparseVector.cs
│ ├── Zonnon Key Pair.sn
│ └── Zonnon.RTL.csproj
├── Zonnon.sln
├── Zonnon.suo
└── Zonnon.v11.suo
└── testsuite
├── 03-Program-constructs-and-their-relations
├── T01-x.znn
├── T02-c.znn
├── T03-c.znn
├── T04-c.znn
├── T05-x.znn
├── T06-x.znn
├── T07-x.znn
├── T08-x.znn
├── T09-x.znn
├── T10-x.znn
├── T11-x.znn
├── T12-x.znn
├── T13-x.znn
├── T14-x.znn
├── T15-x.znn
├── T16-x.znn
├── T17-t.znn
├── T18-t.znn
├── T19-x.znn
├── T20-t.znn
├── T21-x.znn
├── T22-x.znn
├── T23-x.znn
├── T24-x.znn
├── T25-x.znn
├── T26-c.znn
├── T27-x.znn
├── T28-t.znn
├── T29-x.znn
├── T30-c.znn
├── T31-x.znn
├── T32-x.znn
├── T33-x.znn
├── T34-x.znn
├── T35-x.znn
├── T36-x.znn
├── T37-x.znn
├── T38-c.znn
├── T39-x.znn
├── T40-x.znn
├── T41-x.znn
├── T42-x.znn
├── T43-x.znn
├── T44-x.znn
├── T45-x.znn
├── T46-x.znn
├── T47-x.znn
├── T48-x.znn
├── t49-t.znn
└── t50-t.znn
├── 04-Language-Symbols-and-Identifiers
├── 01-Vocabulary-and-Representation
│ ├── T05-x.znn
│ └── T06-x.znn
├── 02-Identifiers
│ ├── T01-x.znn
│ ├── T02-c.znn
│ └── T03-x.znn
├── 04-Numeric-Constants
│ ├── T01-t.znn
│ ├── T02-t.znn
│ ├── T03-t.znn
│ ├── T04-x.znn
│ ├── T05-t.znn
│ ├── T06-t.znn
│ └── T07-x.znn
├── 05-Character-Constants
│ ├── T01-t.znn
│ ├── T02-t.znn
│ ├── T03-t.znn
│ ├── T04-t.znn
│ ├── T05-t.znn
│ ├── T06-t.znn
│ ├── t07-t.znn
│ └── t08-t.znn
└── 08-Comments
│ ├── T01-t.znn
│ ├── T02-t.znn
│ ├── T03-x.znn
│ └── t04-t.znn
├── 05-Declarations
├── 01-Identifier-Declarations-and-Scope-Rules
│ ├── T01-t.znn
│ ├── T02-x.znn
│ └── T03-x.znn
├── 02-Constant-Declarations
│ ├── T01-t.znn
│ ├── T02-t.znn
│ ├── T03-t.znn
│ ├── T04-t.znn
│ ├── T05-t.znn
│ ├── T06-c.znn
│ ├── T06-t.znn
│ ├── T07-t.znn
│ └── t08-t.znn
├── 03-Type-Declarations
│ ├── 01-Basic-Types
│ │ ├── A-BOOLEAN
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-t.znn
│ │ │ ├── T04-x.znn
│ │ │ ├── T05-x.znn
│ │ │ └── T06-t.znn
│ │ ├── B-CHAR
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-x.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-x.znn
│ │ │ ├── T06-t.znn
│ │ │ ├── T07-t.znn
│ │ │ └── T08-t.znn
│ │ ├── C-INTEGER
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.exe
│ │ │ ├── T02-t.pdb
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-x.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-x.znn
│ │ │ ├── T06-t.znn
│ │ │ ├── T07-t.znn
│ │ │ ├── T08-t.znn
│ │ │ └── T09-t.znn
│ │ ├── D-REAL
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-x.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-x.znn
│ │ │ ├── T06-t.znn
│ │ │ └── T09-x.znn
│ │ ├── E-SET
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-x.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-x.znn
│ │ │ ├── T06-t.znn
│ │ │ ├── T07-x.znn
│ │ │ ├── T08-x.znn
│ │ │ └── T09-x.znn
│ │ ├── G-OBJECT
│ │ │ └── T01-t.znn
│ │ ├── H-Cardinal
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-x.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-x.znn
│ │ │ ├── T06-t.znn
│ │ │ ├── T07-t.znn
│ │ │ ├── T08-t.znn
│ │ │ ├── T09-t.znn
│ │ │ └── T10-x.znn
│ │ └── T01-x.znn
│ ├── 02-Enumeration-Types
│ │ ├── T01-x.znn
│ │ ├── T02-c.znn
│ │ ├── T03-c.znn
│ │ ├── T04-t.znn
│ │ ├── T05-t.znn
│ │ ├── T06-t.znn
│ │ └── T07-t.znn
│ ├── 03-Array-Types
│ │ ├── 01-Static-arrays
│ │ │ ├── T01-x.znn
│ │ │ ├── T02-x.znn
│ │ │ ├── T03-t.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-t.znn
│ │ │ ├── T06-t.znn
│ │ │ ├── T07-x.znn
│ │ │ ├── T08-t.znn
│ │ │ ├── T09-x.znn
│ │ │ ├── T10-t.znn
│ │ │ ├── T11-t.znn
│ │ │ ├── T12-t.znn
│ │ │ ├── T13-t.znn
│ │ │ ├── T14-t.znn
│ │ │ ├── T15-x.znn
│ │ │ ├── T16-t.znn
│ │ │ ├── T17-x.znn
│ │ │ └── T18-c.znn
│ │ ├── 02-Dynamic-arrays
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-t.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-t.znn
│ │ │ ├── T07-t.znn
│ │ │ ├── T08-t.znn
│ │ │ ├── T09-t.znn
│ │ │ ├── T10-t.znn
│ │ │ ├── T11-t.znn
│ │ │ ├── T12-t.znn
│ │ │ ├── T13-x.znn
│ │ │ ├── T14-t.znn
│ │ │ ├── T15-t.znn
│ │ │ ├── T16-t.znn
│ │ │ ├── T17-x.znn
│ │ │ ├── T18-t.znn
│ │ │ ├── T19-t.znn
│ │ │ └── T20-t.znn
│ │ ├── T01-x.znn
│ │ ├── T02-x.znn
│ │ ├── T03-x.znn
│ │ ├── T04-c.znn
│ │ ├── T05-c.znn
│ │ ├── T06-x.znn
│ │ ├── T07-x.znn
│ │ ├── T08-x.znn
│ │ ├── T09-x.znn
│ │ ├── T10-x.znn
│ │ ├── T11-x.znn
│ │ ├── T12-x.znn
│ │ ├── T13-c.znn
│ │ ├── T14-c.znn
│ │ ├── T15-t.znn
│ │ ├── T16-t.znn
│ │ └── T17-t.znn
│ ├── 04-The-String-type
│ │ ├── T01-t.znn
│ │ ├── T02-t.znn
│ │ ├── T03-t.znn
│ │ ├── T04-t.znn
│ │ ├── T05-t.znn
│ │ ├── T06-t.znn
│ │ ├── T07-x.znn
│ │ ├── T09-t.znn
│ │ ├── T10-x.znn
│ │ ├── T11-t.znn
│ │ ├── T12-t.znn
│ │ ├── T13-t.znn
│ │ ├── T14-t.znn
│ │ ├── T15-t.znn
│ │ ├── T16-t.znn
│ │ ├── T17-t.znn
│ │ ├── T18-t.znn
│ │ ├── T19-t.znn
│ │ ├── T20-t.znn
│ │ ├── T21-t.znn
│ │ ├── T22-t.znn
│ │ ├── T23-t.znn
│ │ ├── T24-t.znn
│ │ ├── T25-t.znn
│ │ └── T26-t.znn
│ ├── 05-Object-Types
│ │ ├── T01-x.znn
│ │ ├── T02-x.znn
│ │ ├── T03-x.znn
│ │ ├── T04-t.znn
│ │ ├── T05-t.znn
│ │ ├── T06-t.znn
│ │ └── T07-t.znn
│ ├── 06-Record-Types
│ │ ├── T01-x.znn
│ │ ├── T02-x.znn
│ │ ├── T03-x.znn
│ │ ├── T04-t.znn
│ │ ├── T05-t.znn
│ │ ├── T06-t.znn
│ │ ├── T07-t.znn
│ │ └── T08-t.znn
│ ├── 07-Postulated-Interface-Types
│ │ ├── T01-t.znn
│ │ ├── T02-t.znn
│ │ ├── T03-t.znn
│ │ ├── T04-t.znn
│ │ ├── T05-x.znn
│ │ ├── T06-x.znn
│ │ ├── T07-x.znn
│ │ ├── T09-t.znn
│ │ ├── T10-t.znn
│ │ ├── T11-t.znn
│ │ ├── T12-t.znn
│ │ ├── T13-x.znn
│ │ ├── T14-x.znn
│ │ └── T15-x.znn
│ ├── 08-Procedure-Types
│ │ ├── T01-t.znn
│ │ ├── T02-t.znn
│ │ ├── T03-x.znn
│ │ ├── T04-x.znn
│ │ ├── T05-x.znn
│ │ ├── T06-x.znn
│ │ ├── T07-x.znn
│ │ ├── T08-t.znn
│ │ ├── T09-x.znn
│ │ ├── T10-x.znn
│ │ ├── T11-t.znn
│ │ ├── T12-t.znn
│ │ ├── T13-t.znn
│ │ ├── T14-t.znn
│ │ ├── T15-t.znn
│ │ ├── T16-t.znn
│ │ ├── T17-t.znn
│ │ ├── T18-t.znn
│ │ ├── T19-t.znn
│ │ └── T20-t.znn
│ ├── 09-Converting-between-Types
│ │ ├── T01-t.znn
│ │ ├── T02-x.znn
│ │ ├── T03-t.znn
│ │ ├── T04-t.znn
│ │ ├── T05-t.znn
│ │ ├── T06-t.znn
│ │ ├── T07-t.znn
│ │ ├── T08-t.znn
│ │ ├── T09-t.znn
│ │ ├── T10-t.znn
│ │ ├── T11-t.znn
│ │ ├── T12-t.znn
│ │ ├── T13-t.znn
│ │ ├── T14-t.znn
│ │ ├── T15-t.znn
│ │ ├── T16-t.znn
│ │ ├── T18-t.znn
│ │ └── T19-t.znn
│ ├── T01-x.znn
│ ├── T02-x.znn
│ ├── T03-x.znn
│ ├── T04-c.znn
│ ├── T05-c.znn
│ ├── T06-x.znn
│ ├── T07-x.znn
│ ├── T08-x.znn
│ ├── T09-x.znn
│ ├── T10-x.znn
│ ├── T11-x.znn
│ ├── T12-x.znn
│ ├── T13-c.znn
│ ├── T14-c.znn
│ ├── T15-c.znn
│ ├── T16-c.znn
│ └── T17-x.znn
└── 04-Variable-Declarations
│ ├── A-Interface-Type
│ ├── T01-x.znn
│ ├── T02-x.znn
│ ├── T03-c.znn
│ └── T04-c.znn
│ ├── B-Enumeration-Type
│ ├── T01-c.znn
│ ├── T02-c.znn
│ ├── T03-c.znn
│ ├── T04-c.znn
│ └── T05-x.znn
│ ├── C-Object-Type
│ ├── T01-c.znn
│ ├── T02-c.znn
│ ├── T03-c.znn
│ ├── T04-c.znn
│ ├── T05-c.znn
│ ├── T06-c.znn
│ ├── T07-c.znn
│ └── T08-c.znn
│ ├── D-Array-Type
│ ├── T01-t.znn
│ ├── T02-x.znn
│ └── T03-t.znn
│ ├── T01-x.znn
│ ├── T02-x.znn
│ ├── T03-x.znn
│ ├── T04-c.znn
│ ├── T05-c.znn
│ ├── T06-x.znn
│ ├── T07-x.znn
│ ├── T08-x.znn
│ ├── T09-x.znn
│ ├── T10-x.znn
│ ├── T11-x.znn
│ ├── T12-x.znn
│ ├── T13-x.znn
│ └── T14-c.znn
├── 06-Expressions
├── 01-Operands-and-Designators
│ ├── 0A-Instance-SELF
│ │ ├── T01-x.znn
│ │ ├── T02-t.znn
│ │ ├── T03-t.znn
│ │ ├── T04-t.znn
│ │ ├── T05-t.znn
│ │ ├── T06-x.znn
│ │ ├── T07-t.znn
│ │ ├── T08-t.znn
│ │ ├── T09-t.znn
│ │ ├── T10-t.znn
│ │ ├── T11-x.znn
│ │ ├── T12-t.znn
│ │ └── T13-t.znn
│ └── 0B-Instance is instance name
│ │ ├── T01-x.znn
│ │ ├── T02-x.znn
│ │ ├── T03-x.znn
│ │ ├── T04-x.znn
│ │ ├── T05-t.znn
│ │ ├── T06-t.znn
│ │ ├── T07-x.znn
│ │ ├── T08-x.znn
│ │ ├── T09-x.znn
│ │ ├── T10-x.znn
│ │ ├── T11-t.znn
│ │ ├── T12-t.znn
│ │ ├── T13-t.znn
│ │ ├── T14-t.znn
│ │ ├── T15-x.znn
│ │ ├── T16-x.znn
│ │ ├── T17-x.znn
│ │ ├── T18-x.znn
│ │ ├── T19-t.znn
│ │ ├── T20-t.znn
│ │ ├── T21-x.znn
│ │ ├── T22-x.znn
│ │ ├── T23-x.znn
│ │ ├── T24-x.znn
│ │ ├── T25-x.znn
│ │ ├── T26-x.znn
│ │ ├── T27-x.znn
│ │ ├── T28-x.znn
│ │ ├── T29-t.znn
│ │ ├── T30-t.znn
│ │ ├── T31-t.znn
│ │ └── T32-t.znn
├── 02-Predefined-Operators
│ ├── 01-Logical-Operators
│ │ ├── A-OR-operator
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-t.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-t.znn
│ │ │ ├── T06-t.znn
│ │ │ ├── T07-t.znn
│ │ │ └── T08-t.znn
│ │ ├── B-AND-operator
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-t.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-t.znn
│ │ │ ├── T06-t.znn
│ │ │ ├── T07-t.znn
│ │ │ └── T08-t.znn
│ │ ├── C-Negation
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-t.znn
│ │ │ └── T04-t.znn
│ │ ├── D-Precedence
│ │ │ └── T01-t.znn
│ │ ├── E-Object-Variable
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-x.znn
│ │ │ ├── T04-x.znn
│ │ │ ├── T05-x.znn
│ │ │ └── T06-x.znn
│ │ ├── F-Object-Array-Element
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-x.znn
│ │ │ ├── T04-x.znn
│ │ │ ├── T05-x.znn
│ │ │ └── T06-x.znn
│ │ └── G-Object-Function
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-x.znn
│ │ │ ├── T04-x.znn
│ │ │ ├── T05-x.znn
│ │ │ └── T06-x.znn
│ ├── 02-Arithmetic-Operators
│ │ ├── A-Precedence
│ │ │ └── T01-t.znn
│ │ ├── B-Constants
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-t.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-t.znn
│ │ │ ├── T06-t.znn
│ │ │ └── T07-t.znn
│ │ ├── C-Variables
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-t.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-t.znn
│ │ │ ├── T06-t.znn
│ │ │ ├── T07-t.znn
│ │ │ └── T08-t.znn
│ │ ├── D-Object-Variable
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-x.znn
│ │ │ ├── T04-x.znn
│ │ │ ├── T05-x.znn
│ │ │ └── T06-x.znn
│ │ ├── E-Object-Array-Element
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-x.znn
│ │ │ ├── T04-x.znn
│ │ │ ├── T05-x.znn
│ │ │ └── T06-x.znn
│ │ ├── F-Object-Function
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-x.znn
│ │ │ ├── T04-x.znn
│ │ │ ├── T05-x.znn
│ │ │ └── T06-x.znn
│ │ ├── G-Monadic
│ │ │ ├── T01-t.znn
│ │ │ └── T02-t.znn
│ │ ├── T01-x.znn
│ │ ├── T03-x.znn
│ │ ├── T04-t.znn
│ │ ├── T05-t.znn
│ │ └── T06-t.znn
│ ├── 03-Set-Operators
│ │ ├── A-Constants
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-t.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-t.znn
│ │ │ ├── T06-t.znn
│ │ │ ├── T07-t.znn
│ │ │ ├── T08-t.znn
│ │ │ ├── T09-t.znn
│ │ │ └── T10-t.znn
│ │ ├── B-Variables
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-t.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-t.znn
│ │ │ ├── T06-t.znn
│ │ │ ├── T07-t.znn
│ │ │ ├── T08-t.znn
│ │ │ ├── T09-t.znn
│ │ │ ├── T10-x.znn
│ │ │ ├── T11-x.znn
│ │ │ └── T12-x.znn
│ │ └── C-Predefined-Functions
│ │ │ ├── T01-t.znn
│ │ │ └── T02-t.znn
│ ├── 04-Relations
│ │ ├── A-Integer-Constant
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-t.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-t.znn
│ │ │ ├── T06-t.znn
│ │ │ ├── T07-t.znn
│ │ │ ├── T08-t.znn
│ │ │ ├── T09-t.znn
│ │ │ ├── T10-t.znn
│ │ │ ├── T11-t.znn
│ │ │ ├── T12-t.znn
│ │ │ ├── T13-t.znn
│ │ │ └── T14-t.znn
│ │ ├── B-Integer-Variable
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-t.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-t.znn
│ │ │ ├── T06-t.znn
│ │ │ ├── T07-t.znn
│ │ │ ├── T08-t.znn
│ │ │ ├── T09-t.znn
│ │ │ ├── T10-t.znn
│ │ │ ├── T11-t.znn
│ │ │ ├── T12-t.znn
│ │ │ ├── T13-t.znn
│ │ │ └── T14-t.znn
│ │ ├── C-Real-Constant
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-t.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-t.znn
│ │ │ ├── T06-t.znn
│ │ │ ├── T07-t.znn
│ │ │ ├── T08-t.znn
│ │ │ ├── T09-t.znn
│ │ │ ├── T10-t.znn
│ │ │ ├── T11-t.znn
│ │ │ ├── T12-t.znn
│ │ │ ├── T13-t.znn
│ │ │ └── T14-t.znn
│ │ ├── D-Real-Variable
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-t.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-t.znn
│ │ │ ├── T06-t.znn
│ │ │ ├── T07-t.znn
│ │ │ ├── T08-t.znn
│ │ │ ├── T09-t.znn
│ │ │ ├── T10-t.znn
│ │ │ ├── T11-t.znn
│ │ │ ├── T12-t.znn
│ │ │ ├── T13-t.znn
│ │ │ ├── T14-t.znn
│ │ │ └── T15-x.znn
│ │ ├── E-Character-Constants
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-t.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-t.znn
│ │ │ ├── T06-t.znn
│ │ │ ├── T07-t.znn
│ │ │ ├── T08-t.znn
│ │ │ ├── T09-t.znn
│ │ │ ├── T10-t.znn
│ │ │ ├── T11-t.znn
│ │ │ ├── T12-t.znn
│ │ │ ├── T13-t.znn
│ │ │ └── T14-t.znn
│ │ ├── F-Character-Variables
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-t.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-t.znn
│ │ │ ├── T06-t.znn
│ │ │ ├── T07-t.znn
│ │ │ ├── T08-t.znn
│ │ │ ├── T09-t.znn
│ │ │ ├── T10-t.znn
│ │ │ ├── T11-t.znn
│ │ │ ├── T12-t.znn
│ │ │ ├── T13-t.znn
│ │ │ └── T14-t.znn
│ │ ├── G-Object-Variable
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-x.znn
│ │ │ └── T04-x.znn
│ │ ├── H-Object-Array-Element
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-x.znn
│ │ │ └── T04-x.znn
│ │ ├── I-Object-Function
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-x.znn
│ │ │ └── T04-x.znn
│ │ ├── J-IMPLEMENTS-Operator
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-t.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-t.znn
│ │ │ ├── T06-t.znn
│ │ │ ├── T07-t.znn
│ │ │ ├── T08-t.znn
│ │ │ └── T09-x.znn
│ │ └── K-IS-Operator
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-t.znn
│ │ │ ├── T03-t.znn
│ │ │ ├── T04-t.znn
│ │ │ └── T05-x.znn
│ └── T01-x.znn
├── 03-User-Defined-Operators-and-Operator-Declarations
│ ├── 01-New-Operators
│ │ ├── T01-t.znn
│ │ └── T02-x.znn
│ ├── 02-Basic-Operators-that-can-be-overloaded
│ │ ├── T01-x.znn
│ │ ├── T02-x.znn
│ │ ├── T03-t.znn
│ │ ├── T04-x.znn
│ │ ├── T05-t.znn
│ │ ├── T05-x.znn
│ │ ├── T06-t.znn
│ │ ├── T07-t.znn
│ │ ├── T08-t.znn
│ │ └── T09-x.znn
│ ├── 03-New-Operator-Declarations
│ │ ├── A-Unary-Operator
│ │ │ └── T01-x.znn
│ │ ├── B-Binary-Operator
│ │ │ ├── T01-t.znn
│ │ │ └── T02-t.znn
│ │ ├── C-Assignment
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-x.znn
│ │ │ ├── T03-x.znn
│ │ │ ├── T04-x.znn
│ │ │ └── T05-t.znn
│ │ ├── T01-t.znn
│ │ ├── T02-t.znn
│ │ ├── T03-t.znn
│ │ ├── T04-x.znn
│ │ ├── T05-x.znn
│ │ └── T06-x.znn
│ ├── 04-Rules-governing-overloading
│ │ └── T01-t.znn
│ └── T01-t.znn
└── 04-Converting
│ ├── t01-t.znn
│ └── t02-x.znn
├── 07-Statement
├── 01-Assignments
│ ├── T01-t.znn
│ ├── T02-t.znn
│ ├── T03-x.znn
│ ├── T04-x.znn
│ ├── T05-x.znn
│ ├── T06-x.znn
│ ├── T07-t.znn
│ ├── T08-x.znn
│ ├── T09-x.znn
│ ├── T10-x.znn
│ ├── T11-t.znn
│ ├── T12-t.znn
│ ├── T13-x.znn
│ ├── T15-t.znn
│ └── t14-t.znn
├── 02-Procedure-Calls
│ ├── T01-x.znn
│ ├── T02-x.znn
│ ├── T03-x.znn
│ ├── T04-x.znn
│ ├── T05-t.znn
│ ├── T06-t.znn
│ ├── T07-t.znn
│ ├── T08-t.znn
│ ├── T09-t.znn
│ ├── T10-t.znn
│ ├── T12-t.znn
│ ├── T16-t.znn
│ ├── T17-t.znn
│ ├── T18-t.znn
│ ├── T19-t.znn
│ ├── T20-t.znn
│ ├── T21-t.znn
│ ├── T22-t.znn
│ └── T23-t.znn
├── 03-IF-Statements
│ ├── T01-t.znn
│ ├── T02-t.znn
│ ├── T03-t.znn
│ ├── T04-t.znn
│ ├── T05-t.znn
│ ├── T06-x.znn
│ ├── T07-x.znn
│ ├── T08-x.znn
│ └── T09-x.znn
├── 04-CASE-Statements
│ ├── T01-t.znn
│ ├── T02-t.znn
│ ├── T03-t.znn
│ ├── T04-t.znn
│ ├── T05-t.znn
│ ├── T06-t.znn
│ ├── T07-x.znn
│ ├── T08-x.znn
│ ├── T09-x.znn
│ ├── T10-t.znn
│ ├── T11-t.znn
│ ├── T12-x.znn
│ ├── T13-t.znn
│ └── T14-t.znn
├── 05-WHILE-Statements
│ ├── T01-t.znn
│ ├── T02-t.znn
│ ├── T03-t.znn
│ ├── T04-x.znn
│ └── T05-x.znn
├── 06-REPEAT-Statements
│ ├── T01-t.znn
│ ├── T02-t.znn
│ ├── T03-x.znn
│ └── T04-x.znn
├── 07-FOR-Statements
│ ├── T01-t.znn
│ ├── T02-t.znn
│ ├── T03-t.znn
│ ├── T04-x.znn
│ ├── T05-x.znn
│ ├── T06-x.znn
│ ├── T07-t.znn
│ ├── T08-t.znn
│ ├── T09-t.znn
│ ├── T10-t.znn
│ ├── T11-x.znn
│ ├── T12-x.znn
│ ├── T13-x.znn
│ ├── T14-x.znn
│ ├── T15-x.znn
│ ├── T16-x.znn
│ └── T17-x.znn
├── 08-LOOP-Statements
│ ├── T01-t.znn
│ └── T02-t.znn
├── 09-RETURN-Statements
│ ├── T01-x.znn
│ ├── T02-x.znn
│ ├── T03-t.znn
│ ├── T04-t.znn
│ ├── T05-t.znn
│ ├── T06-t.znn
│ └── T07-x.znn
├── 10-Block-Statements-and-Exception-Handling
│ ├── T01-t.znn
│ ├── T02-t.znn
│ ├── T03-t.znn
│ ├── T05-t.znn
│ ├── T06-t.znn
│ ├── T07-t.znn
│ ├── T08-t.znn
│ └── T09-t.znn
├── 11-AWAIT-statements
│ └── t01-t.znn
├── 12-Protocol
│ ├── T01-t.znn
│ └── t02-t.znn
└── 13-Activity
│ └── T01-t.znn
├── 08-Procedure-Declarations-and-Formal-Parameters
├── 01-Procedure-Modifiers
│ ├── 0A-PUBLIC-PRIVATE
│ │ ├── T01-x.znn
│ │ ├── T02-x.znn
│ │ ├── T03-t.znn
│ │ └── T04-x.znn
│ └── 0B-SEALED
│ │ ├── T01-x.znn
│ │ ├── T02-t.znn
│ │ ├── T03-t.znn
│ │ └── T04-t.znn
├── 02-Properties
│ ├── T01-t.znn
│ ├── T02-t.znn
│ ├── T03-x.znn
│ ├── T04-c.znn
│ ├── T05-x.znn
│ ├── T06-x.znn
│ ├── T07-x.znn
│ ├── T08-x.znn
│ ├── T09-x.znn
│ ├── T10-x.znn
│ ├── T11-x.znn
│ ├── T12-x.znn
│ ├── T13-x.znn
│ ├── T14-x.znn
│ ├── T15-x.znn
│ ├── T16-x.znn
│ ├── T17-x.znn
│ ├── T18-x.znn
│ ├── T19-x.znn
│ ├── T20-t.znn
│ ├── T21-c.znn
│ └── T22-x.znn
├── 03-Overloading
│ ├── t01-t.znn
│ ├── t02-t.znn
│ └── t03-t.znn
├── 0A-VAR-parameter
│ ├── T01-x.znn
│ ├── T02-x.znn
│ ├── T04-t.znn
│ ├── T05-t.znn
│ └── T06-t.znn
├── 0B-Function
│ ├── T01-x.znn
│ ├── T02-x.znn
│ ├── T03-x.znn
│ ├── T04-x.znn
│ ├── T05-x.znn
│ ├── T06-x.znn
│ ├── T07-x.znn
│ ├── T08-c.znn
│ ├── T09-x.znn
│ ├── T11-t.znn
│ └── t10-t.znn
├── 0C-IMPLEMENTS
│ ├── T01-t.znn
│ ├── T02-x.znn
│ ├── T03-x.znn
│ └── T04-x.znn
├── 0D-Delegates
│ └── t01-t.znn
├── T01-x.znn
├── T02-x.znn
├── T03-x.znn
├── T04-x.znn
├── T05-x.znn
├── T06-x.znn
├── T07-x.znn
├── T08-x.znn
├── T09-x.znn
├── T10-t.znn
├── T11-t.znn
├── T12-x.znn
├── T13-x.znn
├── T14-x.znn
├── T15-x.znn
├── T16-t.znn
├── T17-t.znn
├── T18-t.znn
├── T19-t.znn
├── T20-t.znn
├── T21-x.znn
├── T22-x.znn
├── T23-t.znn
└── T24-x.znn
├── 09-Activities-Behavior-And-Interaction
├── 1-The-Granularity-of-Concurrency
│ ├── T01-t.znn
│ ├── t02-t.znn
│ ├── t03-t.znn
│ ├── t09-t.znn
│ ├── t10-t.znn
│ ├── t11-t.znn
│ ├── t12-t.znn
│ ├── t13-t.znn
│ ├── t14-t.znn
│ ├── t15-t.znn
│ ├── t16-t.znn
│ ├── t17-t.znn
│ ├── t20-t.znn
│ └── t21-t.znn
├── 2-Protocol-Controlled-and-Activities
│ ├── T01-t.znn
│ ├── T04-t.znn
│ ├── t02-t.znn
│ ├── t03-t.znn
│ ├── t05-t.znn
│ ├── t06-t.znn
│ ├── t11-t.znn
│ ├── t12-t.znn
│ ├── t13-t.znn
│ ├── t14-t.znn
│ ├── t15-t.znn
│ ├── t16-t.znn
│ ├── t17-t.znn
│ ├── t18-t.znn
│ ├── t19-t.znn
│ ├── t20-t.znn
│ ├── t21-t.znn
│ ├── t22-t.znn
│ ├── t23-t.znn
│ └── t24-t.znn
├── 3-Barrier-Controlled-Activities
│ ├── t18-t.znn
│ └── t19-t.znn
└── 4-Protected-Objects-and-Modules
│ ├── t06-t.znn
│ ├── t07-t.znn
│ ├── t08-x.znn
│ ├── t09-t.znn
│ └── t10-x.znn
├── 10-Program-Units
├── 01-MODULE
│ ├── A-ModuleName
│ │ ├── T01-x.znn
│ │ ├── T02-x.znn
│ │ ├── T03-x.znn
│ │ ├── T04-x.znn
│ │ └── T05-x.znn
│ ├── B-IMPLEMENTS
│ │ ├── T01-c.znn
│ │ ├── T02-x.znn
│ │ ├── T03-x.znn
│ │ ├── T04-x.znn
│ │ └── T05-x.znn
│ ├── C-IMPORTS
│ │ ├── T01-c.znn
│ │ ├── T02-c.znn
│ │ ├── T03-c.znn
│ │ ├── T04-c.znn
│ │ ├── T05-c.znn
│ │ ├── T06-c.znn
│ │ ├── T07-x.znn
│ │ ├── T08-x.znn
│ │ ├── T09-x.znn
│ │ ├── T10-x.znn
│ │ ├── T11-x.znn
│ │ ├── T12-t.znn
│ │ └── T13-t.znn
│ ├── D-IMPORT-AS
│ │ ├── T01-t.znn
│ │ ├── T02-t.znn
│ │ ├── T03-t.znn
│ │ ├── T04-t.znn
│ │ ├── T05-t.znn
│ │ ├── T06-x.znn
│ │ ├── T07-x.znn
│ │ ├── T08-x.znn
│ │ └── T09-t.znn
│ ├── E-Visibility
│ │ ├── T01-t.znn
│ │ ├── T02-t.znn
│ │ ├── T04-x.znn
│ │ ├── T05-t.znn
│ │ └── T06-t.znn
│ └── F-Init
│ │ └── t01-t.znn
├── 02-OBJECT
│ ├── A-ObjectName
│ │ ├── T01-x.znn
│ │ ├── T02-x.znn
│ │ ├── T03-x.znn
│ │ ├── T04-x.znn
│ │ └── T05-x.znn
│ ├── B-IMPLEMENTS
│ │ ├── T01-t.znn
│ │ ├── T02-t.znn
│ │ ├── T04-x.znn
│ │ ├── T05-x.znn
│ │ ├── T07-t.znn
│ │ ├── T08-t.znn
│ │ ├── T10-x.znn
│ │ ├── T11-x.znn
│ │ ├── T12-t.znn
│ │ ├── T15-t.znn
│ │ ├── T16-t.znn
│ │ ├── T17-t.znn
│ │ ├── T18-t.znn
│ │ ├── T19-t.znn
│ │ ├── T20-t.znn
│ │ ├── T21-t.znn
│ │ └── t0055-t.znn
│ ├── C-Parameters
│ │ ├── T01-t.znn
│ │ ├── T02-x.znn
│ │ ├── T03-x.znn
│ │ ├── T04-t.znn
│ │ ├── T05-x.znn
│ │ ├── T06-x.znn
│ │ ├── T07-x.znn
│ │ ├── T08-x.znn
│ │ ├── T09-x.znn
│ │ ├── T10-x.znn
│ │ ├── T11-x.znn
│ │ ├── T12-t.znn
│ │ ├── T13-t.znn
│ │ ├── T14-t.znn
│ │ ├── T15-t.znn
│ │ ├── T16-t.znn
│ │ └── T17-t.znn
│ ├── D-Visibility
│ │ ├── T01-t.znn
│ │ ├── T02-t.znn
│ │ ├── T03-x.znn
│ │ ├── T04-x.znn
│ │ ├── T05-t.znn
│ │ ├── T06-t.znn
│ │ └── t0063-x.znn
│ ├── E-Import
│ │ ├── T01-T.znn
│ │ ├── T02-T.znn
│ │ ├── T03-t.znn
│ │ └── T04-t.znn
│ ├── T01-t.znn
│ ├── T02-t.znn
│ ├── T03-t.znn
│ ├── T04-t.znn
│ ├── T05-t.znn
│ └── T06-t.znn
├── 03-DEFINITION
│ ├── A-DefinitionName
│ │ ├── T01-x.znn
│ │ ├── T02-x.znn
│ │ ├── T03-x.znn
│ │ ├── T04-x.znn
│ │ └── T05-x.znn
│ ├── B-REFINES
│ │ ├── T01-x.znn
│ │ ├── T02-x.znn
│ │ ├── T03-t.znn
│ │ ├── T04-t.znn
│ │ ├── T05-x.znn
│ │ ├── T06-c.znn
│ │ ├── T07-c.znn
│ │ ├── T08-x.znn
│ │ ├── T09-x.znn
│ │ ├── T10-x.znn
│ │ ├── T11-x.znn
│ │ ├── T12-x.znn
│ │ ├── T13-x.znn
│ │ ├── T14-t.znn
│ │ ├── T15-t.znn
│ │ ├── T16-t.znn
│ │ ├── T17-t.znn
│ │ ├── T18-t.znn
│ │ └── T19-t.znn
│ ├── C-Visibility
│ │ ├── T01-t.znn
│ │ ├── T02-t.znn
│ │ ├── T03-x.znn
│ │ ├── T04-t.znn
│ │ ├── T05-t.znn
│ │ └── T06-t.znn
│ ├── T01-t.znn
│ ├── T02-t.znn
│ ├── T03-t.znn
│ ├── T04-t.znn
│ ├── T05-t.znn
│ ├── T06-t.znn
│ ├── T07-t.znn
│ ├── T08-t.znn
│ ├── T09-t.znn
│ ├── T10-t.znn
│ ├── T11-t.znn
│ ├── T12-t.znn
│ ├── T13-x.znn
│ ├── T14-t.znn
│ ├── T15-t.znn
│ ├── T16-c.znn
│ ├── T17-c.znn
│ ├── T18-x.znn
│ └── T19-t.znn
└── 04-IMPLEMENTATION
│ ├── T01-c.znn
│ ├── T02-c.znn
│ ├── T03-t.znn
│ ├── T04-t.znn
│ ├── T05-t.znn
│ ├── T06-t.znn
│ ├── T07-t.znn
│ ├── T08-t.znn
│ ├── T09-t.znn
│ ├── T10-t.znn
│ ├── T11-t.znn
│ ├── T12-t.znn
│ ├── T13-t.znn
│ ├── T14-t.znn
│ ├── T15-t.znn
│ ├── T16-t.znn
│ ├── T17-t.znn
│ ├── T18-t.znn
│ ├── T19-t.znn
│ ├── T20-t.znn
│ ├── T21-t.znn
│ ├── T22-t.znn
│ ├── T23-x.znn
│ ├── T25-t.znn
│ ├── T27-t.znn
│ ├── T28-t.znn
│ ├── T29-t.znn
│ └── t26-x.znn
├── 11-Reflection
└── T01-t.znn
├── 13-Predefined-Procedures
├── T01-t.znn
├── T02-t.znn
├── T03-t.znn
├── T04-t.znn
├── T05-t.znn
├── T06-t.znn
├── T07-t.znn
├── T08-t.znn
├── T09-t.znn
├── T10-t.znn
├── T11-t.znn
├── T12-t.znn
├── T13-t.znn
├── T14-t.znn
├── T15-t.znn
├── T16-t.znn
├── T17-t.znn
├── T18-t.znn
├── T19-t.znn
├── T20-t.znn
├── T21-t.znn
├── T22-t.znn
├── T23-t.znn
├── T24-t.znn
├── T25-t.znn
├── T26-t.znn
├── T27-t.znn
├── T28-t.znn
├── T29-t.znn
├── T30-t.znn
├── T31-t.znn
├── T32-t.znn
├── T33-t.znn
├── T34-t.znn
├── T35-t.znn
├── T36-t.znn
└── T37-t.znn
├── 14-Interoperability
├── 01-Between-Zonnon-Dlls
│ ├── Definition.sln
│ ├── Library
│ │ ├── Library.znnproj
│ │ ├── bin
│ │ │ └── debug
│ │ │ │ ├── Library.dll
│ │ │ │ └── Library.pdb
│ │ ├── data.znn
│ │ └── queues.znn
│ ├── Use
│ │ ├── Use.znnproj
│ │ ├── bin
│ │ │ └── debug
│ │ │ │ ├── Library.dll
│ │ │ │ ├── Library.pdb
│ │ │ │ ├── Use.exe
│ │ │ │ ├── Use.pdb
│ │ │ │ ├── UserLibrary.dll
│ │ │ │ └── UserLibrary.pdb
│ │ └── testBuffers.znn
│ └── test.ts
├── 02-Definition-From-Dll
│ ├── Library.sln
│ ├── Library.suo
│ ├── Library
│ │ ├── Library.znn
│ │ └── Library.znnproj
│ ├── Use
│ │ ├── Use.znn
│ │ ├── Use.znnproj
│ │ └── bin
│ │ │ └── debug
│ │ │ ├── Library.dll
│ │ │ ├── Library.pdb
│ │ │ ├── Use.exe
│ │ │ ├── Use.pdb
│ │ │ ├── UserLibrary.dll
│ │ │ └── UserLibrary.pdb
│ ├── UserLibrary
│ │ ├── UserLibrary.znn
│ │ ├── UserLibrary.znnproj
│ │ └── bin
│ │ │ └── debug
│ │ │ ├── Library.dll
│ │ │ ├── Library.pdb
│ │ │ ├── UserLibrary.dll
│ │ │ └── UserLibrary.pdb
│ └── test.ts
└── 03-Use-Of-Externals
│ ├── T01-T.znn
│ └── test.ts
├── 15-Examples
├── 01-Book
│ ├── Chapter1
│ │ ├── example_1_1.znn
│ │ ├── example_1_11_2.znn
│ │ ├── example_1_12_2.znn
│ │ ├── example_1_12_3.znn
│ │ ├── example_1_2.znn
│ │ ├── example_1_3.znn
│ │ └── example_1_7_0.znn
│ ├── Chapter2
│ │ ├── example_2_1.znn
│ │ ├── example_2_10.znn
│ │ ├── example_2_11.znn
│ │ ├── example_2_11b.znn
│ │ ├── example_2_12.znn
│ │ ├── example_2_13.znn
│ │ ├── example_2_14.znn
│ │ ├── example_2_15.znn
│ │ ├── example_2_16.znn
│ │ ├── example_2_17.znn
│ │ ├── example_2_2.znn
│ │ ├── example_2_3.znn
│ │ ├── example_2_4.znn
│ │ ├── example_2_5.znn
│ │ ├── example_2_6.znn
│ │ ├── example_2_8.znn
│ │ └── example_2_9.znn
│ ├── Chapter3
│ │ ├── example_3_1.znn
│ │ ├── example_3_2.znn
│ │ ├── example_3_3.znn
│ │ ├── example_3_4.znn
│ │ ├── example_3_5.znn
│ │ ├── example_3_6.in
│ │ ├── example_3_6.znn
│ │ ├── example_3_7.in
│ │ └── example_3_7.znn
│ ├── Chapter4
│ │ ├── example_4_1.znn
│ │ ├── example_4_2.znn
│ │ ├── example_4_3.znn
│ │ ├── example_4_4.in
│ │ ├── example_4_4.znn
│ │ ├── example_4_5.znn
│ │ ├── example_4_5_2.znn
│ │ ├── example_4_6.znn
│ │ └── example_4_7.znn
│ ├── Chapter5
│ │ └── example_5_1.znn
│ └── dirinfo.info
├── 02-Concurrency
│ ├── cycle_buffer_example.znn
│ ├── dining_philosophers.znn
│ ├── dirinfo.info
│ ├── parallel_tree_walk.znn
│ ├── pqsort.znn
│ ├── protocol.znn
│ ├── readers_and_wrters.znn
│ └── sleeping_barber.znn
├── 03-Lectures
│ ├── Sample03_Zonnon
│ │ └── Rain.znn
│ ├── Sample04_Zonnon
│ │ ├── Library_r2x.znn
│ │ ├── Limit.znn
│ │ ├── Median.znn
│ │ ├── library.txt
│ │ ├── library1.txt
│ │ └── library2.txt
│ ├── Sample05_Zonnon
│ │ ├── Decoder.znn
│ │ ├── Merge.znn
│ │ ├── Scanner.znn
│ │ └── Sherlock_r2x.znn
│ ├── Sample06_Zonnon
│ │ ├── ml06_1.znn
│ │ ├── ml06_2
│ │ │ ├── Hilbert.znn
│ │ │ └── source
│ │ │ │ ├── Turtle.znn
│ │ │ │ └── XYDrawing.znn
│ │ ├── ml06_3.znn
│ │ └── ml06_4.znn
│ ├── Sample07_Zonnon
│ │ ├── ml071.znn
│ │ ├── ml072.znn
│ │ └── vbz.txt
│ ├── Sample08_Zonnon
│ │ ├── ml08_1.znn
│ │ └── ml08_2.znn
│ ├── Sample09_Zonnon
│ │ ├── ml09_1a.znn
│ │ └── ml09_1b.znn
│ ├── Sample10_Zonnon
│ │ └── ml10.znn
│ ├── Sample11_Zonnon
│ │ ├── HowToUseSimpleGraphics.znn
│ │ ├── HowToUseTextParser.znn
│ │ ├── RandomHeight.znn
│ │ ├── info.txt
│ │ ├── ml11_2.znn
│ │ └── source
│ │ │ ├── SimpleGraphics.znn
│ │ │ ├── TextParser.znn
│ │ │ └── XYDrawing.znn
│ ├── Sample12_Zonnon
│ │ ├── DAG.znn
│ │ └── Folding.znn
│ └── dirinfo.info
├── 04-ZonnonIntro
│ ├── Example_1.znn
│ ├── Example_2.znn
│ ├── case.znn
│ ├── character.znn
│ ├── darray.znn
│ ├── dirinfo.info
│ ├── ex610a.znn
│ ├── for.znn
│ ├── function_funct.znn
│ ├── if.znn
│ ├── integer.znn
│ ├── loop.znn
│ ├── module.znn
│ ├── procedure.znn
│ ├── puzzle.znn
│ ├── reference.znn
│ ├── repeat.znn
│ ├── sqrt.znn
│ ├── stack.znn
│ └── time.znn
└── tets.ts
├── 16-Regression
├── 001
│ ├── collectionList_v00.znn
│ ├── info.txt
│ └── tests.ts
├── 002
│ ├── info.txt
│ ├── procedureType.zip
│ └── tests.ts
├── 003
│ ├── newtonRaphson.znn
│ ├── source
│ │ ├── ccm
│ │ │ ├── math.znn
│ │ │ ├── quadTensors2.znn
│ │ │ ├── scalars.znn
│ │ │ ├── tensors2.znn
│ │ │ ├── units.znn
│ │ │ └── vectors2.znn
│ │ ├── core
│ │ │ ├── .dolphinview
│ │ │ ├── arrays.znn
│ │ │ ├── boolean.znn
│ │ │ ├── dataFiles.znn
│ │ │ ├── linearAlgebra.znn
│ │ │ ├── log.znn
│ │ │ ├── math.znn
│ │ │ ├── matrices.znn
│ │ │ ├── numbers.znn
│ │ │ ├── series.znn
│ │ │ └── textFiles.znn
│ │ ├── data
│ │ │ ├── data.znn
│ │ │ ├── keys.znn
│ │ │ ├── lists.znn
│ │ │ ├── queues.znn
│ │ │ ├── stacks.znn
│ │ │ └── trees.znn
│ │ └── math
│ │ │ ├── .dolphinview
│ │ │ ├── derivatives.znn
│ │ │ ├── distributions.znn
│ │ │ ├── integrals.znn
│ │ │ ├── interpolation.znn
│ │ │ ├── newtonRaphson.znn
│ │ │ └── rungeKutta.znn
│ ├── test
│ │ ├── ccm
│ │ │ ├── testQuadTensors.znn
│ │ │ ├── testScalars.znn
│ │ │ ├── testTensors.znn
│ │ │ ├── testUnits.znn
│ │ │ └── testVectors.znn
│ │ ├── core
│ │ │ ├── testArrays.znn
│ │ │ ├── testFiles.znn
│ │ │ ├── testLinearAlgebra.znn
│ │ │ ├── testLog.znn
│ │ │ ├── testMath.znn
│ │ │ ├── testMatrices.znn
│ │ │ └── testNumbers.znn
│ │ ├── data
│ │ │ └── testDataStructures.znn
│ │ └── math
│ │ │ ├── testDerivatives.znn
│ │ │ ├── testDerivativesOld.znn
│ │ │ ├── testDistributions.znn
│ │ │ ├── testIntegrals.znn
│ │ │ ├── testMarquardt.znn
│ │ │ ├── testProcedureFunctions.znn
│ │ │ └── testRungeKutta.znn
│ ├── testMarquardt.znn
│ └── tests.ts
├── 004
│ ├── problem.txt
│ ├── status.txt
│ └── t01-t.znn
├── 005
│ ├── problem.txt
│ └── status.txt
├── 006
│ ├── problem.txt
│ └── status.txt
├── 007
│ ├── 0001.znn
│ ├── 0002.znn
│ ├── 0003.znn
│ ├── 0004.znn
│ ├── 0005.znn
│ ├── 0006.znn
│ ├── 0010.znn
│ ├── 0011.znn
│ ├── 1.ts
│ ├── TypeCast2.znn
│ └── qformurs.znn
├── 008
│ └── problem.txt
└── tests.ts
├── 17-Math-Extensions
├── 2-Array definition
│ ├── T01-t.znn
│ ├── T02-x.znn
│ ├── T03-x.znn
│ ├── T04-x.znn
│ ├── T05-t.znn
│ ├── T06-x.znn
│ ├── T07-t.znn
│ ├── T08-x.znn
│ ├── T09-x.znn
│ ├── T10-t.znn
│ ├── T11-x.znn
│ ├── T12-x.znn
│ ├── T13-x.znn
│ ├── T14-x.znn
│ └── T15-x.znn
├── 3-Indices
│ ├── T01-t.znn
│ ├── T02-t.znn
│ ├── T03-t.znn
│ ├── T04-t.znn
│ ├── T05-t.znn
│ ├── T06-t.znn
│ ├── T07-t.znn
│ ├── T08-x.znn
│ ├── T09-t.znn
│ ├── T10-x.znn
│ ├── T11-t.znn
│ ├── T12-t.znn
│ ├── T13-t.znn
│ ├── T14-x.znn
│ ├── T15-t.znn
│ ├── T16-t.znn
│ ├── T17-t.znn
│ ├── T18-t.znn
│ ├── T19-t.znn
│ ├── T20-t.znn
│ ├── T21-t.znn
│ ├── T22-x.znn
│ ├── T23-t.znn
│ ├── T24-t.znn
│ ├── T25-t.znn
│ ├── T26-t.znn
│ ├── T27-x.znn
│ ├── T28-x.znn
│ ├── T29-x.znn
│ ├── T30-x.znn
│ ├── T31-t.znn
│ ├── T32-t.znn
│ ├── T33-t.znn
│ ├── T34-t.znn
│ └── T35-t.znn
├── 4-Operators
│ ├── 1-Operators-Common
│ │ ├── 1-Assignment
│ │ │ ├── Copy (2) of T02-x.znn
│ │ │ ├── Copy (2) of T03-x.znn
│ │ │ ├── Copy (2) of T04-x.znn
│ │ │ ├── Copy (2) of T05-x.znn
│ │ │ ├── Copy (2) of T06-t.znn
│ │ │ ├── Copy (2) of T07-x.znn
│ │ │ ├── Copy (2) of T08-t.znn
│ │ │ ├── Copy (2) of T09-t.znn
│ │ │ ├── Copy (2) of T10-x.znn
│ │ │ ├── Copy (2) of T11-x.znn
│ │ │ ├── Copy (2) of T12-t.znn
│ │ │ ├── Copy (2) of T13-x.znn
│ │ │ ├── Copy (2) of T14-x.znn
│ │ │ ├── Copy (2) of T15-t.znn
│ │ │ ├── Copy of T02-x.znn
│ │ │ ├── Copy of T03-x.znn
│ │ │ ├── Copy of T04-x.znn
│ │ │ ├── Copy of T05-x.znn
│ │ │ ├── Copy of T06-t.znn
│ │ │ ├── Copy of T07-x.znn
│ │ │ ├── Copy of T08-t.znn
│ │ │ ├── Copy of T09-t.znn
│ │ │ ├── Copy of T10-x.znn
│ │ │ ├── Copy of T11-x.znn
│ │ │ ├── Copy of T12-t.znn
│ │ │ ├── Copy of T13-x.znn
│ │ │ ├── Copy of T14-x.znn
│ │ │ ├── Copy of T15-t.znn
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-x.znn
│ │ │ ├── T03-x.znn
│ │ │ ├── T04-x.znn
│ │ │ ├── T05-x.znn
│ │ │ ├── T06-t.znn
│ │ │ ├── T07-x.znn
│ │ │ ├── T08-t.znn
│ │ │ ├── T09-t.znn
│ │ │ ├── T10-x.znn
│ │ │ ├── T11-x.znn
│ │ │ ├── T12-t.znn
│ │ │ ├── T13-x.znn
│ │ │ ├── T14-x.znn
│ │ │ ├── T15-t.znn
│ │ │ ├── T16-t.znn
│ │ │ ├── T17-t.znn
│ │ │ ├── T18-t.znn
│ │ │ ├── T19-t.znn
│ │ │ ├── T20-t.znn
│ │ │ ├── T21-t.znn
│ │ │ └── T22-t.znn
│ │ ├── 2-Unary
│ │ │ ├── T01-t.znn
│ │ │ ├── T02-x.znn
│ │ │ ├── T03-x.znn
│ │ │ ├── T04-t.znn
│ │ │ ├── T05-x.znn
│ │ │ ├── T06-t.znn
│ │ │ ├── T07-t.znn
│ │ │ ├── T08-t.znn
│ │ │ ├── T09-t.znn
│ │ │ ├── T10-x.znn
│ │ │ ├── T11-t.znn
│ │ │ ├── T12-x.znn
│ │ │ ├── T13-t.znn
│ │ │ ├── T14-t.znn
│ │ │ ├── T15-t.znn
│ │ │ ├── T16-t.znn
│ │ │ ├── T17-t.znn
│ │ │ ├── T18-t.znn
│ │ │ └── T19-t.znn
│ │ ├── 3-Binary
│ │ │ ├── T001-t.znn
│ │ │ ├── T002-t.znn
│ │ │ ├── T003-t.znn
│ │ │ ├── T004-t.znn
│ │ │ ├── T005-t.znn
│ │ │ ├── T006-t.znn
│ │ │ ├── T007-t.znn
│ │ │ ├── T008-t.znn
│ │ │ ├── T009-t.znn
│ │ │ ├── T010-t.znn
│ │ │ ├── T011-t.znn
│ │ │ ├── T012-t.znn
│ │ │ ├── T013-x.znn
│ │ │ ├── T014-x.znn
│ │ │ ├── T015-x.znn
│ │ │ ├── T016-t.znn
│ │ │ ├── T017-t.znn
│ │ │ ├── T018-t.znn
│ │ │ ├── T019-t.znn
│ │ │ ├── T020-t.znn
│ │ │ ├── T021-t.znn
│ │ │ ├── T022-t.znn
│ │ │ ├── T023-x.znn
│ │ │ ├── T024-x.znn
│ │ │ ├── T025-x.znn
│ │ │ ├── T026-x.znn
│ │ │ ├── T027-t.znn
│ │ │ ├── T028-t.znn
│ │ │ ├── T029-t.znn
│ │ │ ├── T030-t.znn
│ │ │ ├── T031-t.znn
│ │ │ ├── T032-t.znn
│ │ │ ├── T033-t.znn
│ │ │ ├── T034-t.znn
│ │ │ ├── T035-t.znn
│ │ │ ├── T036-t.znn
│ │ │ ├── T037-t.znn
│ │ │ ├── T038-t.znn
│ │ │ ├── T039-x.znn
│ │ │ ├── T040-x.znn
│ │ │ ├── T041-x.znn
│ │ │ ├── T042-t.znn
│ │ │ ├── T043-t.znn
│ │ │ ├── T044-t.znn
│ │ │ ├── T045-t.znn
│ │ │ ├── T046-t.znn
│ │ │ ├── T047-t.znn
│ │ │ ├── T048-x.znn
│ │ │ ├── T049-x.znn
│ │ │ ├── T050-x.znn
│ │ │ ├── T051-x.znn
│ │ │ ├── T052-x.znn
│ │ │ ├── T053-x.znn
│ │ │ ├── T054-x.znn
│ │ │ ├── T055-t.znn
│ │ │ ├── T056-t.znn
│ │ │ ├── T057-t.znn
│ │ │ ├── T058-t.znn
│ │ │ ├── T059-t.znn
│ │ │ ├── T060-t.znn
│ │ │ ├── T061-t.znn
│ │ │ ├── T062-t.znn
│ │ │ ├── T063-t.znn
│ │ │ ├── T064-t.znn
│ │ │ ├── T065-t.znn
│ │ │ ├── T066-t.znn
│ │ │ ├── T067-t.znn
│ │ │ ├── T068-t.znn
│ │ │ ├── T069-t.znn
│ │ │ ├── T070-t.znn
│ │ │ ├── T071-t.znn
│ │ │ ├── T072-t.znn
│ │ │ ├── T073-t.znn
│ │ │ ├── T074-t.znn
│ │ │ ├── T075-t.znn
│ │ │ ├── T076-t.znn
│ │ │ ├── T077-t.znn
│ │ │ ├── T078-t.znn
│ │ │ ├── T079-t.znn
│ │ │ ├── T080-t.znn
│ │ │ ├── T081-t.znn
│ │ │ ├── T082-t.znn
│ │ │ ├── T083-t.znn
│ │ │ ├── T084-t.znn
│ │ │ ├── T085-t.znn
│ │ │ ├── T086-t.znn
│ │ │ ├── T087-t.znn
│ │ │ ├── T088-t.znn
│ │ │ ├── T089-t.znn
│ │ │ ├── T090-t.znn
│ │ │ ├── T091-t.znn
│ │ │ ├── T092-t.znn
│ │ │ ├── T093-t.znn
│ │ │ ├── T094-t.znn
│ │ │ ├── T095-t.znn
│ │ │ ├── T096-t.znn
│ │ │ ├── T097-t.znn
│ │ │ ├── T098-t.znn
│ │ │ ├── T099-t.znn
│ │ │ ├── T100-t.znn
│ │ │ ├── T101-t.znn
│ │ │ ├── T102-t.znn
│ │ │ ├── T103-t.znn
│ │ │ ├── T104-t.znn
│ │ │ ├── T105-t.znn
│ │ │ ├── T106-t.znn
│ │ │ ├── T107-t.znn
│ │ │ ├── T108-t.znn
│ │ │ ├── T109-t.znn
│ │ │ ├── T110-t.znn
│ │ │ ├── T111-t.znn
│ │ │ ├── T112-t.znn
│ │ │ ├── T113-t.znn
│ │ │ ├── T114-t.znn
│ │ │ ├── T115-t.znn
│ │ │ ├── T116-t.znn
│ │ │ ├── T117-t.znn
│ │ │ ├── T118-t.znn
│ │ │ ├── T119-t.znn
│ │ │ ├── T120-t.znn
│ │ │ ├── T121-t.znn
│ │ │ ├── T122-t.znn
│ │ │ ├── T123-t.znn
│ │ │ ├── T124-t.znn
│ │ │ ├── T125-t.znn
│ │ │ ├── T126-t.znn
│ │ │ ├── T127-t.znn
│ │ │ ├── T128-t.znn
│ │ │ ├── T129-t.znn
│ │ │ ├── T130-t.znn
│ │ │ └── T131-t.znn
│ │ └── 4-Mixed
│ │ │ └── T01-t.znn
│ └── 2-Operators-Matrix
│ │ ├── T01-t.znn
│ │ ├── T02-t.znn
│ │ ├── T03-t.znn
│ │ ├── T04-t.znn
│ │ ├── T05-t.znn
│ │ ├── T06-t.znn
│ │ ├── T07-t.znn
│ │ ├── T08-t.znn
│ │ ├── T09-t.znn
│ │ ├── T10-t.znn
│ │ ├── T11-t.znn
│ │ ├── T12-t.znn
│ │ ├── T13-t.znn
│ │ ├── T14-t.znn
│ │ ├── T15-t.znn
│ │ ├── T16-t.znn
│ │ ├── T17-t.znn
│ │ ├── T18-t.znn
│ │ ├── T19-t.znn
│ │ ├── T20-t.znn
│ │ ├── T21-t.znn
│ │ ├── T22-t.znn
│ │ ├── T23-t.znn
│ │ ├── T24-x.znn
│ │ ├── T25-t.znn
│ │ ├── T26-t.znn
│ │ ├── T27-t.znn
│ │ ├── T28-t.znn
│ │ ├── T29-t.znn
│ │ ├── T30-t.znn
│ │ ├── T31-t.znn
│ │ ├── T32-t.znn
│ │ ├── T33-t.znn
│ │ ├── T34-t.znn
│ │ ├── T35-t.znn
│ │ ├── T36-t.znn
│ │ ├── T37-t.znn
│ │ ├── T38-t.znn
│ │ ├── T39-t.znn
│ │ ├── T40-t.znn
│ │ ├── T41-t.znn
│ │ ├── T42-t.znn
│ │ ├── T43-t.znn
│ │ ├── T44-t.znn
│ │ ├── T45-t.znn
│ │ ├── T46-t.znn
│ │ ├── T47-x.znn
│ │ ├── T48-t.znn
│ │ ├── T49-t.znn
│ │ ├── T50-t.znn
│ │ ├── T51-t.znn
│ │ ├── T52-t.znn
│ │ ├── T53-t.znn
│ │ ├── T54-t.znn
│ │ ├── T55-t.znn
│ │ ├── T56-t.znn
│ │ ├── T57-t.znn
│ │ └── T58-t.znn
├── 5-Functions
│ ├── T01-t.znn
│ ├── T02-t.znn
│ ├── T03-t.znn
│ ├── T04-t.znn
│ ├── T05-t.znn
│ ├── T06-t.znn
│ ├── T07-t.znn
│ ├── T08-t.znn
│ ├── T09-t.znn
│ ├── T10-t.znn
│ ├── T11-t.znn
│ ├── T12-t.znn
│ ├── T13-t.znn
│ ├── T14-t.znn
│ ├── T15-x.znn
│ ├── T16-x.znn
│ ├── T17-x.znn
│ ├── T18-t.znn
│ ├── T19-t.znn
│ ├── T20-t.znn
│ ├── T21-t.znn
│ ├── T22-t.znn
│ ├── T23-t.znn
│ ├── T24-t.znn
│ ├── T25-t.znn
│ ├── T26-t.znn
│ ├── T27-x.znn
│ ├── T28-x.znn
│ ├── T29-x.znn
│ ├── T30-t.znn
│ ├── T31-t.znn
│ ├── T32-t.znn
│ ├── T33-t.znn
│ ├── T34-x.znn
│ ├── T35-x.znn
│ └── T36-t.znn
├── 6-Overloaded Operators
│ ├── T01-t.znn
│ ├── T02-t.znn
│ ├── T03-t.znn
│ ├── T04-t.znn
│ ├── T05-t.znn
│ ├── T06-t.znn
│ ├── T07-t.znn
│ ├── T08-t.znn
│ ├── T09-t.znn
│ ├── T10-t.znn
│ ├── T11-t.znn
│ ├── T12-t.znn
│ ├── T13-t.znn
│ ├── T14-t.znn
│ ├── T15-t.znn
│ ├── T16-t.znn
│ ├── T17-t.znn
│ ├── T18-t.znn
│ ├── T19-t.znn
│ ├── T20-t.znn
│ ├── T21-t.znn
│ ├── T22-t.znn
│ ├── T23-t.znn
│ ├── T24-t.znn
│ ├── T25-t.znn
│ ├── T26-t.znn
│ ├── T27-t.znn
│ ├── T28-t.znn
│ ├── T29-t.znn
│ ├── T30-t.znn
│ ├── T31-t.znn
│ ├── T32-t.znn
│ ├── T33-x.znn
│ ├── T34-x.znn
│ ├── T35-x.znn
│ ├── T36-x.znn
│ ├── T37-x.znn
│ ├── T38-x.znn
│ ├── T39-x.znn
│ ├── T40-x.znn
│ ├── T41-x.znn
│ ├── T42-t.znn
│ ├── T43-t.znn
│ ├── T44-t.znn
│ ├── T45-t.znn
│ ├── T46-t.znn
│ ├── T47-t.znn
│ ├── T48-t.znn
│ ├── T49-t.znn
│ ├── T50-t.znn
│ ├── T51-t.znn
│ ├── T52-t.znn
│ ├── T53-t.znn
│ ├── T54-t.znn
│ ├── T55-t.znn
│ ├── T56-t.znn
│ └── T57-t.znn
├── 7-Sparse
│ ├── T01-t.znn
│ ├── T02-x.znn
│ ├── T03-x.znn
│ ├── T04-x.znn
│ ├── T05-x.znn
│ ├── T06-t.znn
│ ├── T07-x.znn
│ ├── T08-x.znn
│ ├── T09-t.znn
│ ├── T10-t.znn
│ ├── T11-t.znn
│ ├── T12-t.znn
│ ├── T13-x.znn
│ ├── T14-t.znn
│ ├── T15-t.znn
│ ├── T16-t.znn
│ ├── T17-t.znn
│ ├── T18-x.znn
│ ├── T19-t.znn
│ ├── T20-t.znn
│ ├── T21-t.znn
│ ├── T22-t.znn
│ ├── T23-t.znn
│ ├── T24-t.znn
│ ├── T25-t.znn
│ ├── T26-t.znn
│ └── T27-t.znn
├── Compatibility
│ ├── T01-t.znn
│ ├── T02-t.znn
│ ├── T03-x.znn
│ ├── T04-x.znn
│ ├── T05-x.znn
│ └── T06-t.znn
└── Examples
│ ├── BiConjugateGradMethod-t.znn
│ ├── Lorenz3D-c.znn
│ ├── ModifSimplexMethod-c.znn
│ ├── SaddlePoint-c.znn
│ ├── Strassen-t.znn
│ └── filter-c.znn
└── readme.txt
/solution/CCI/Mono/System.Compiler.Framework.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/solution/CCI/Mono/System.Compiler.Framework.dll
--------------------------------------------------------------------------------
/solution/CCI/Mono/System.Compiler.Runtime.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/solution/CCI/Mono/System.Compiler.Runtime.dll
--------------------------------------------------------------------------------
/solution/CCI/Mono/System.Compiler.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/solution/CCI/Mono/System.Compiler.dll
--------------------------------------------------------------------------------
/solution/CCI/Windows/System.Compiler.Framework.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/solution/CCI/Windows/System.Compiler.Framework.dll
--------------------------------------------------------------------------------
/solution/CCI/Windows/System.Compiler.Runtime.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/solution/CCI/Windows/System.Compiler.Runtime.dll
--------------------------------------------------------------------------------
/solution/CCI/Windows/System.Compiler.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/solution/CCI/Windows/System.Compiler.dll
--------------------------------------------------------------------------------
/solution/Compiler/Compute/Kernels/ElementWiseCopy.c:
--------------------------------------------------------------------------------
1 | /* element wise copy
2 | * {target} = {resultExpression}
3 | */
4 | kernel void Kernel(
5 | ulong count{arguments}
6 | )
7 | {
8 | ulong index = get_local_id(0);
9 |
10 | #define Access(arr) arr[index]
11 | {target} = {resultExpression};
12 | #undef Access
13 | }
14 |
--------------------------------------------------------------------------------
/solution/Compiler/InterimKey.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/solution/Compiler/InterimKey.snk
--------------------------------------------------------------------------------
/solution/Compiler/Scaner.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/solution/Compiler/Scaner.cs
--------------------------------------------------------------------------------
/solution/Compiler/Test1.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace AAA
3 | {
4 | using Console = System.Console;
5 | public class Test1
6 | {
7 | public Test1()
8 | {
9 | }
10 | }
11 | }
12 |
13 | namespace AAA
14 | {
15 | using Console = System.Console;
16 | using N = System.Compiler;
17 | public class Test2
18 | {
19 | public Test2()
20 | {
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/solution/Compiler/TreeN.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/solution/Compiler/TreeN.cs
--------------------------------------------------------------------------------
/solution/Tester/run-mono.cmd:
--------------------------------------------------------------------------------
1 | if exist test.txt del test.txt
2 | call "C:\Program Files (x86)\Mono-2.10.9\bin\setmonopath.bat"
3 | IF exist ..\..\temp ( del /Q ..\..\temp\*.* ) ELSE ( mkdir ..\..\temp)
4 | mono bin\ROTORrelease\Tester.exe /testdir:..\..\testsuite /binarydir:..\..\temp
5 | copy ..\..\temp\Log*.xml Log*.xml
6 | del /Q ..\..\temp\*.*
7 | if exist test.txt del test.txt
8 | if exist 1.txt del 1.txt
--------------------------------------------------------------------------------
/solution/Tester/run-win.cmd:
--------------------------------------------------------------------------------
1 | if exist test.txt del test.txt
2 | IF exist ..\..\temp ( del /Q ..\..\temp\*.* ) ELSE ( mkdir ..\..\temp)
3 | bin\2008Release\Tester.exe /testdir:..\..\testsuite /binarydir:..\..\temp
4 | copy ..\..\temp\Log*.xml Log*.xml
5 | del /Q ..\..\temp\*.*
6 | if exist test.txt del test.txt
7 | if exist 1.txt del 1.txt
--------------------------------------------------------------------------------
/solution/Tester/testinfo.txt:
--------------------------------------------------------------------------------
1 | PASSED - overall positive decision about the test
2 | NOT PASSED - overall negative decision about the test
3 | SUCCESS - compilation / execution successful
4 | ERROR - compilation failed with normal syntax or semantic error
5 | ABORT - compilation failed because of an internal compiler error
6 | NOT RUN - the test was not / not supposed to be executed
7 | FAIL - execution failed
8 |
--------------------------------------------------------------------------------
/solution/Zonnon.RTL/InterimKey.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/solution/Zonnon.RTL/InterimKey.snk
--------------------------------------------------------------------------------
/solution/Zonnon.RTL/Zonnon Key Pair.sn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/solution/Zonnon.RTL/Zonnon Key Pair.sn
--------------------------------------------------------------------------------
/solution/Zonnon.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/solution/Zonnon.suo
--------------------------------------------------------------------------------
/solution/Zonnon.v11.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/solution/Zonnon.v11.suo
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T01-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Negative test: module contains module.
5 | *)
6 | module A;
7 | module B;
8 | end B;
9 | end A.
10 |
11 | module Main;
12 | begin
13 | halt(0);
14 | end Main.
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T02-c.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Positive test: module contains definition.
5 | *)
6 | module A;
7 | definition B;
8 | end B;
9 | end A.
10 |
11 | module Main;
12 | begin
13 | halt(1);
14 | end Main.
15 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T03-c.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Positive test: module contains object.
5 | *)
6 | module A;
7 | type B = object
8 | end B;
9 | end A.
10 |
11 | module Main;
12 | begin
13 | halt(1);
14 | end Main.
15 |
16 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T04-c.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Positive test: module contains implementation.
5 | *)
6 | module A;
7 | definition B;
8 | end B;
9 |
10 | implementation B;
11 | end B;
12 | end A.
13 |
14 | module Main;
15 | begin
16 | halt(1);
17 | end Main.
18 |
19 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T05-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Negative test: definition contains module.
5 | *)
6 | definition A;
7 | module B;
8 | end B;
9 | end A.
10 |
11 | module Main;
12 | begin
13 | halt(0);
14 | end Main.
15 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T06-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Negative test: definition contains definition.
5 | *)
6 | definition A;
7 | definition B;
8 | end B;
9 | end A.
10 |
11 | module Main;
12 | begin
13 | halt(0);
14 | end Main.
15 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T07-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Negative test: definition contains object.
5 | *)
6 | definition A;
7 | object B;
8 | end B;
9 | end A.
10 |
11 | module Main;
12 | begin
13 | halt(0);
14 | end Main.
15 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T08-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Negative test: definition contains implementation.
5 | *)
6 | definition B;
7 | end B.
8 |
9 | definition A;
10 | implementation B;
11 | end B;
12 | end A.
13 |
14 | module Main;
15 | begin
16 | halt(0);
17 | end Main.
18 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T09-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Negative test: object contains module.
5 | *)
6 | object A;
7 | module B;
8 | end B;
9 | end A.
10 |
11 | module Main;
12 | begin
13 | halt(0);
14 | end Main.
15 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T10-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Negative test: object contains definition.
5 | *)
6 | object A;
7 | definition B;
8 | end B;
9 | end A.
10 |
11 | module Main;
12 | begin
13 | halt(0);
14 | end Main.
15 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T11-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Negative test: object contains implementation.
5 | *)
6 | definition B;
7 | end B.
8 |
9 | object A;
10 | implementation B;
11 | end B;
12 | end A.
13 |
14 | module Main;
15 | begin
16 | halt(0);
17 | end Main.
18 |
19 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T12-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Negative test: object contains object.
5 | *)
6 | object A;
7 | object B;
8 | end B;
9 | end A.
10 |
11 | module Main;
12 | begin
13 | halt(0);
14 | end Main.
15 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T13-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Negative test: implementation contains module.
5 | *)
6 | definition A;
7 | end A.
8 |
9 | implementation A;
10 | module B;
11 | end B;
12 | end A.
13 |
14 | module Main;
15 | begin
16 | halt(0);
17 | end Main.
18 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T14-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Negative test: implementation contains module.
5 | *)
6 | definition A;
7 | end A.
8 |
9 | implementation A;
10 | definition B;
11 | end B;
12 | end A.
13 |
14 | module Main;
15 | begin
16 | halt(0);
17 | end Main.
18 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T15-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Negative test: implementation contains module.
5 | *)
6 | definition A;
7 | end A.
8 |
9 | implementation A;
10 | object B;
11 | end B;
12 | end A.
13 |
14 | module Main;
15 | begin
16 | halt(0);
17 | end Main.
18 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T16-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Negative test: implementation contains module.
5 | *)
6 | definition A;
7 | end A.
8 |
9 | definition B;
10 | end B.
11 |
12 | implementation A;
13 | implementation B;
14 | end B;
15 | end A.
16 |
17 | module Main;
18 | begin
19 | halt(0);
20 | end Main.
21 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T18-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Positive test: module implements definition.
5 | *)
6 | definition A;
7 | end A.
8 |
9 | module B implements C, A;
10 | end B.
11 |
12 | definition C;
13 | end C.
14 |
15 | module Main;
16 | begin
17 | halt(1);
18 | end Main.
19 |
20 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T19-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Negative test: module implements object.
5 | *)
6 | object A;
7 | end A.
8 |
9 | module B implements C, A;
10 | end B.
11 |
12 | object C;
13 | end C.
14 |
15 | module Main;
16 | begin
17 | halt(0);
18 | end Main.
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T21-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Negative test: definition implements module.
5 | *)
6 | module A;
7 | end A.
8 |
9 | definition B implements C, A;
10 | end B.
11 |
12 | module C;
13 | end C.
14 |
15 | module Main;
16 | begin
17 | halt(0);
18 | end Main.
19 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T22-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Negative test: definition implements definition.
5 | *)
6 | definition A;
7 | end A.
8 |
9 | definition B implements C, A;
10 | end B.
11 |
12 | definition C;
13 | end C.
14 |
15 | module Main;
16 | begin
17 | halt(0);
18 | end Main.
19 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T23-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Negative test: definition implements object.
5 | *)
6 | object A;
7 | end A.
8 |
9 | definition B implements C, A;
10 | end B.
11 |
12 | object C;
13 | end C.
14 |
15 | module Main;
16 | begin
17 | halt(0);
18 | end Main.
19 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T25-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Negative test: object implements module.
5 | *)
6 | module A;
7 | end A.
8 |
9 | object B implements C, A;
10 | end B.
11 |
12 | module C;
13 | end C.
14 |
15 | module Main;
16 | begin
17 | halt(0);
18 | end Main.
19 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T26-c.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Positive test: object implements definition.
5 | *)
6 | definition A;
7 | end A.
8 |
9 | object B implements C, A;
10 | end B.
11 |
12 | definition C;
13 | end C.
14 |
15 | module Main;
16 | begin
17 | halt(1);
18 | end Main.
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/testsuite/03-Program-constructs-and-their-relations/T27-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 2. Program Constructs and their Relations.
3 | *
4 | * Negative test: object implements object.
5 | *)
6 | object A;
7 | end A.
8 |
9 | object B implements C, A;
10 | end B.
11 |
12 | object C;
13 | end C.
14 |
15 | module Main;
16 | begin
17 | halt(0);
18 | end Main.
19 |
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/01-Vocabulary-and-Representation/T05-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * Russian symbol O in the keyword module.
3 | *)
4 | MDULE A;
5 | end A;
6 |
7 | module Main;
8 | begin
9 | halt(0);
10 | end Main.
11 |
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/01-Vocabulary-and-Representation/T06-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * Russian symbol A in the module A name.
3 | *)
4 | module ?;
5 | end ?.
6 |
7 | module Main;
8 | begin
9 | halt(0);
10 | end Main.
11 |
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/02-Identifiers/T01-x.znn:
--------------------------------------------------------------------------------
1 | (*
2 | 4. Language symbols and identifiers.
3 | 4.2 Identifiers
4 | Negative test: the wrong identifier 1etter.
5 | *)
6 | module Main;
7 | var 1etter : char;
8 |
9 | begin
10 | halt(0);
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/02-Identifiers/T02-c.znn:
--------------------------------------------------------------------------------
1 | (*
2 | 4. Language symbols and identifiers.
3 | 4.2 Identifiers
4 | Positive test: the underline symbol _ in identifier _1_e_t_t_e_r_.
5 | *)
6 | module Main;
7 | var _1_e_t_t_e_r_ : char;
8 |
9 | begin
10 | halt(1);
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/02-Identifiers/T03-x.znn:
--------------------------------------------------------------------------------
1 | (*
2 | 4. Language symbols and identifiers.
3 | 4.2 Identifiers
4 | Negative test: the minus symbol - in identifier l-e-t-t-e-r.
5 | *)
6 | module Main;
7 | var l-e-t-t-e-r : char;
8 |
9 | begin
10 | halt(0);
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/04-Numeric-Constants/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 4. Language symbols and identifiers.
3 | * 4.4. Numeric Constants
4 | *
5 | * Positive test: hexadecimal constant compiling with default width.
6 | *)
7 | module Main;
8 | begin
9 | if 0DH = 13
10 | then halt(1) else halt(0) end;
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/04-Numeric-Constants/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 4. Language symbols and identifiers.
3 | * 4.4. Numeric Constants
4 | *
5 | * Positive test: hexadecimal constant compiling with {8} width.
6 | *)
7 | module Main;
8 | begin
9 | if 0DH {8} = 13
10 | then halt(1) else halt(0) end;
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/04-Numeric-Constants/T03-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 4. Language symbols and identifiers.
3 | * 4.4. Numeric Constants
4 | *
5 | * Positive test: wrong constant width.
6 | *)
7 | module Main;
8 | var i : integer;
9 | begin
10 | i := 0DH { 24 };
11 | halt(1);
12 | end Main.
13 |
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/04-Numeric-Constants/T04-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 4. Language symbols and identifiers.
3 | * 4.4. Numeric Constants
4 | *
5 | * Negative test: incompatible assignment constant width.
6 | *)
7 | module Main;
8 | var i : integer { 8 };
9 | begin
10 | i := 0DH { 16 };
11 | halt(0);
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/04-Numeric-Constants/T05-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 4. Language symbols and identifiers.
3 | * 4.4. Numeric Constants
4 | *
5 | * Positive test: real numbers comparison.
6 | *)
7 | module Main;
8 | var r : real;
9 | begin
10 | if 4.567E8 = 456700000
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/04-Numeric-Constants/T06-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 4. Language symbols and identifiers.
3 | * 4.4. Numeric Constants
4 | *
5 | * Positive test: real numbers comparison.
6 | *)
7 | module Main;
8 | var r : real;
9 | begin
10 | if 1.5 = 1.5
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/04-Numeric-Constants/T07-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 4. Language symbols and identifiers.
3 | * 4.4. Numeric Constants
4 | *
5 | * Negative test: incompatible assignment.
6 | *)
7 | module Main;
8 | var r : real { 32 };
9 | begin
10 | r := 1234.56 { 80 };
11 | halt(0);
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/05-Character-Constants/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 4. Language symbols and identifiers.
3 | * 4.5. Character Constants
4 | *
5 | * Positive test: compare two character with different presentation.
6 | *)
7 | module Main;
8 | begin
9 | if "a" = 'a'
10 | then halt(1) else halt(0) end;
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/05-Character-Constants/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 4. Language symbols and identifiers.
3 | * 4.5. Character Constants
4 | *
5 | * Positive test: compare two character with different presentation.
6 | *)
7 | module Main;
8 | begin
9 | if " " = 20X
10 | then halt(1) else halt(0) end;
11 | end Main.
12 |
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/05-Character-Constants/T03-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 4. Language symbols and identifiers.
3 | * 4.5. Character Constants
4 | *
5 | * Positive test: compare two character with different presentation.
6 | *)
7 | module Main;
8 | begin
9 | if ' ' = 20X
10 | then halt(1) else halt(0) end;
11 | end Main.
12 |
13 |
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/05-Character-Constants/T04-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 4. Language symbols and identifiers.
3 | * 4.5. Character Constants
4 | *
5 | * Positive test: compare character variable and constant.
6 | *)
7 | module Main;
8 | var c : char;
9 | begin
10 | c := 20X;
11 | if c = 20X
12 | then halt(1) else halt(0) end;
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/05-Character-Constants/T05-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 4. Language symbols and identifiers.
3 | * 4.5. Character Constants
4 | *
5 | * Positive test: compare character variable and constant.
6 | *)
7 | module Main;
8 | var c : char;
9 | begin
10 | c := 20X;
11 | if c = ' '
12 | then halt(1) else halt(0) end;
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/05-Character-Constants/T06-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 4. Language symbols and identifiers.
3 | * 4.5. Character Constants
4 | *
5 | * Positive test: compare character variable and constant.
6 | *)
7 | module Main;
8 | var c : char;
9 | begin
10 | c := 20X;
11 | if c = " "
12 | then halt(1) else halt(0) end;
13 | end Main.
14 |
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/08-Comments/T01-t.znn:
--------------------------------------------------------------------------------
1 | (*
2 | 4. Language symbols and identifiers.
3 | 4.8 Comments
4 | *)
5 | module Main;
6 | begin
7 | (*
8 | s := \\\\"(* *)\\\\";
9 | *)
10 | halt(1)
11 | end Main.
12 |
13 |
14 |
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/08-Comments/T02-t.znn:
--------------------------------------------------------------------------------
1 | (*
2 | 4. Language symbols and identifiers.
3 | 4.8 Comments
4 | (* This is nested comment
5 | module Main;
6 | begin
7 | halt(0);
8 | end Main.
9 | *)
10 | *)
11 | module Main;
12 | begin
13 | halt(1);
14 | end Main.
--------------------------------------------------------------------------------
/testsuite/04-Language-Symbols-and-Identifiers/08-Comments/T03-x.znn:
--------------------------------------------------------------------------------
1 | (*
2 | 4. Language symbols and identifiers.
3 | 4.8 Comments
4 | (* This is nested comment
5 | module Main;
6 | begin
7 | halt(0);
8 | end Main.
9 | *)
10 | is not closed comment after nested comment!
11 | module Main;
12 | begin
13 | halt(1);
14 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/01-Identifier-Declarations-and-Scope-Rules/T03-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.1. Identifier Declarations and Scope Rules.
4 | *
5 | * Negative test: the type A and variable A have same name.
6 | *
7 | *)
8 | module Main;
9 | type A = ( one, two );
10 |
11 | var A : integer;
12 | begin
13 | halt(0);
14 | end Main.
15 |
16 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/02-Constant-Declarations/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.2. Constant Declarations.
4 | *
5 | * Simple positive test for constant value.
6 | *
7 | *)
8 | module Main;
9 | const N = 10;
10 | begin
11 | if N = 10
12 | then halt(1) else halt(0) end;
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/02-Constant-Declarations/T04-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.2. Constant Declarations.
4 | *
5 | * Positive test on constant expression.
6 | * set type constant value was used.
7 | *
8 | *)
9 | module Main;
10 | const fullSet = { min(set) .. max(set) };
11 | begin
12 | halt(1);
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/02-Constant-Declarations/T05-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.2. Constant Declarations.
4 | *
5 | * Positive test: wrong limits of full set constant.
6 | *
7 | *)
8 | module Main;
9 | const fullSet = { max(set) .. min(set) };
10 | begin
11 | halt(1);
12 | end Main.
13 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/02-Constant-Declarations/T06-c.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.2. Constant Declarations.
4 | *
5 | * Positive test: set constant.
6 | *)
7 | module Main;
8 | const opCodeMask = { 0..3 };
9 | begin
10 | halt(1);
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/02-Constant-Declarations/T06-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.2. Constant Declarations.
4 | *
5 | * Positive test: set constant.
6 | *)
7 | module Main;
8 | const opCodeMask = { 0..3 };
9 | begin
10 | if 1 in opCodeMask
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/02-Constant-Declarations/T07-t.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 |
3 | const N = 10000;
4 |
5 | var
6 | i : integer;
7 | s : string;
8 | begin
9 | i := N-1;
10 | (*
11 | write("N-1 = "); writeln(N-1);
12 | write("i = "); writeln(i);
13 | readln(s);
14 | *)
15 | if i = 9999
16 | then halt(1) else halt(0) end;
17 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/02-Constant-Declarations/t08-t.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 | const
3 | inside=true;
4 | outside=false;
5 |
6 | var
7 | res: boolean;
8 | begin
9 | res := inside; (* error *)
10 | writeln(res);
11 | writeln(inside);
12 | res := outside;
13 | writeln(res);
14 | writeln(outside);
15 | if res = inside then
16 | halt(0)
17 | else
18 | halt(1)
19 | end
20 | end Main.
21 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/01-Basic-Types/A-BOOLEAN/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.1. Basic types.
5 | * A-boolean
6 | *
7 | * Positive test: true value assignment for boolean variable.
8 | *)
9 | module Main;
10 | var
11 | b : boolean;
12 | begin
13 | b := true;
14 |
15 | if b
16 | then halt(1) else halt(0) end;
17 | end Main.
18 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/01-Basic-Types/A-BOOLEAN/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.1. Basic types.
5 | * A-boolean
6 | *
7 | * Positive test: false value assignment for boolean variable.
8 | *)
9 | module Main;
10 | var
11 | b : boolean;
12 | begin
13 | b := false;
14 |
15 | if b
16 | then halt(0) else halt(1) end;
17 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/01-Basic-Types/A-BOOLEAN/T03-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.1. Basic types.
5 | * A-boolean
6 | *
7 | * Positive test: wrong boolean type width.
8 | * Warning from compiler.
9 | *)
10 | module Main;
11 | var
12 | b : boolean {1};
13 | begin
14 | halt(1);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/01-Basic-Types/A-BOOLEAN/T04-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.1. Basic types.
5 | * A-boolean
6 | *
7 | * Negative test: assignment integer type value to boolean variable.
8 | *)
9 | module Main;
10 | var
11 | b : boolean;
12 | begin
13 | b := 1;
14 | halt(0);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/01-Basic-Types/B-CHAR/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.1. Basic types.
5 | * char type
6 | *
7 | * Positive test: char value assignment.
8 | *)
9 | module Main;
10 | var c : char;
11 | begin
12 | c := 'c';
13 |
14 | if c = 'c'
15 | then halt(1) else halt(0) end;
16 | end Main.
17 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/01-Basic-Types/B-CHAR/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.1. Basic types.
5 | * char type
6 | *
7 | * Positive test: wrong char type width.
8 | * Warning from compiler.
9 | *)
10 | module Main;
11 | var c : char { 64 };
12 | begin
13 | halt(1);
14 | end Main.
15 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/01-Basic-Types/C-INTEGER/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.1. Basic types.
5 | * integer type
6 | *
7 | * Positive test: integer value assignment.
8 | *)
9 | module Main;
10 | var i : integer ;
11 | begin
12 | i := 1;
13 |
14 | if i = 1
15 | then halt(1) else halt(0) end;
16 | end Main.
17 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/01-Basic-Types/C-INTEGER/T02-t.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/05-Declarations/03-Type-Declarations/01-Basic-Types/C-INTEGER/T02-t.exe
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/01-Basic-Types/C-INTEGER/T02-t.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/05-Declarations/03-Type-Declarations/01-Basic-Types/C-INTEGER/T02-t.pdb
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/01-Basic-Types/C-INTEGER/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.1. Basic types.
5 | * integer type
6 | *
7 | * Positive test: wrong integer type width.
8 | * Warning from compiler.
9 | *)
10 | module Main;
11 | var i1 : integer { 24 };
12 | var i2 : integer { 128 };
13 | begin
14 | halt(1);
15 | end Main.
16 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/01-Basic-Types/D-REAL/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.1. Basic types.
5 | * real type
6 | *
7 | * Positive test: real value assignment to real variable.
8 | *)
9 | module Main;
10 | var r : real ;
11 | begin
12 | r := 1.28;
13 |
14 | if r = 1.28
15 | then halt(1) else halt(0) end;
16 | end Main.
17 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/01-Basic-Types/E-SET/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.1. Basic types.
5 | * set type
6 | *
7 | * Positive test: set value assignment for set variable.
8 | *)
9 | module Main;
10 | var s : set ;
11 | begin
12 | s := { 1 };
13 |
14 | if 1 in s
15 | then halt(1) else halt(0) end;
16 | end Main.
17 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/01-Basic-Types/E-SET/T06-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.1. Basic types.
5 | * set type
6 | *
7 | * Positive test: set minimum value is more then set maximum value.
8 | * This is empty set.
9 | *)
10 | module Main;
11 | var s : set;
12 | begin
13 | s := { max(set) .. min(set) };
14 |
15 | halt(1);
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/01-Basic-Types/H-Cardinal/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.1. Basic types.
5 | * cardinal type
6 | *
7 | * Positive test: cardinal value assignment.
8 | *)
9 | module Main;
10 | var i : cardinal;
11 | begin
12 | i := 1;
13 |
14 | if i = 1
15 | then halt(1) else halt(0) end;
16 | end Main.
17 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/01-Basic-Types/H-Cardinal/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.1. Basic types.
5 | * cardinal type
6 | *
7 | * Positive test: wrong cardinal type width.
8 | * Warning from compiler.
9 | *)
10 | module Main;
11 | var i1 : cardinal{ 24 };
12 | var i2 : cardinal{ 128 };
13 | begin
14 | halt(1);
15 | end Main.
16 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/01-Basic-Types/H-Cardinal/T10-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * Cardinal.
5 | * cardinal type
6 | *
7 | * Negative test: cardinal value assignment.
8 | *)
9 | module Main;
10 | var i : cardinal;
11 | begin
12 | i := -1;
13 |
14 | if i = -1
15 | then halt(0) else halt(1) end;
16 | end Main.
17 |
18 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/01-Basic-Types/T01-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | *
5 | * Negative test: incorrect type declaration.
6 | *)
7 | module Main;
8 | const N = 100;
9 |
10 | type b = N / 3;
11 | begin
12 | halt(0);
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/02-Enumeration-Types/T01-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.2. Enumeration types.
5 | *
6 | * Positive test: the enumeration A is declared without its elements.
7 | *)
8 | module Main;
9 | type C = ();
10 | begin
11 | halt(0);
12 | end Main.
13 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/03-Array-Types/01-Static-arrays/T02-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 6.3.1. Static arrays
5 | *
6 | * Negative test: null array length.
7 | *)
8 | module A;
9 | type T = array 0 of boolean;
10 | end A.
11 |
12 | module Main;
13 | begin
14 | halt(0);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/03-Array-Types/01-Static-arrays/T15-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.4. String type.
5 | *
6 | * Negative test: Real constant in array length.
7 | *)
8 | module A;
9 | type T = array N - 101.1 of real;
10 |
11 | const N = 100;
12 | end A.
13 |
14 | module Main;
15 | begin
16 | halt(0);
17 | end Main.
18 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/03-Array-Types/01-Static-arrays/T17-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.4. String type.
5 | *
6 | * Negative test: array of objects.
7 | *)
8 | module Main;
9 | var a : array 8,8 of integer;
10 | var b : array 2,8 of integer;
11 | begin
12 | a := b;
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/03-Array-Types/T01-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.4. String type.
5 | *
6 | * Negative test: not declared type name for array element.
7 | *)
8 | module A;
9 | type T = array 1 of B;
10 | end A.
11 |
12 | module Main;
13 | begin
14 | halt(0);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/03-Array-Types/T06-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.4. String type.
5 | *
6 | * Negative test: the not declared name B is used as type name for type T.
7 | *)
8 | module A;
9 | import B;
10 | type T = array 1 of B;
11 | end A.
12 |
13 | module Main;
14 | begin
15 | halt(0);
16 | end Main.
17 |
18 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/04-The-String-type/T07-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 6.3.4. String type.
5 | *
6 | * Negative test: assign string constant to array of char.
7 | *)
8 | module Main;
9 | var s : array 2 of char;
10 | begin
11 | s := " ";
12 | end Main.
13 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/04-The-String-type/T10-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 6.3.4. String type.
5 | *
6 | * Negative test: assign string constant to integer.
7 | *)
8 | module Main;
9 | var i : integer;
10 | begin
11 | i := "";
12 | end Main.
13 |
14 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/04-The-String-type/T12-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 6.3.4. String type.
5 | *
6 | * Positive test: string constants not equality
7 | *)
8 | module Main;
9 | begin
10 | if "AA" # "A"
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/04-The-String-type/T13-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 6.3.4. String type.
5 | *
6 | * Positive test: equvivalence string constants
7 | *)
8 | module Main;
9 | begin
10 | if "AB" = "AB"
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/04-The-String-type/T14-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 6.3.4. String type.
5 | *
6 | * Positive test: string constants equality
7 | *)
8 | module Main;
9 | begin
10 | if "ABC" >= "AB"
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/04-The-String-type/T15-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 6.3.4. String type.
5 | *
6 | * Positive test: string constants comparison
7 | *)
8 | module Main;
9 | begin
10 | if "ABC" >= "AB"
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/04-The-String-type/T16-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 6.3.4. String type.
5 | *
6 | * Positive test: string constants comparison
7 | *)
8 | module Main;
9 | begin
10 | if "ABC" <= "AB"
11 | then halt(0) else halt(1) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/04-The-String-type/T17-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 6.3.4. String type.
5 | *
6 | * Positive test: string constants comparison
7 | *)
8 | module Main;
9 | begin
10 | if "ABC" < "AB"
11 | then halt(0) else halt(1) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/04-The-String-type/T18-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 6.3.4. String type.
5 | *
6 | * Positive test: string constants comparison
7 | *)
8 | module Main;
9 | begin
10 | if "ABC" > "AB"
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/04-The-String-type/T19-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 6.3.4. String type.
5 | *
6 | * Positive test: string constant and variable comparison
7 | *)
8 | module Main;
9 | var s : string;
10 | begin
11 | s := "ABC";
12 | if s > "AB"
13 | then halt(1) else halt(0) end;
14 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/04-The-String-type/T20-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 6.3.4. String type.
5 | *
6 | * Positive test: string constants not equality
7 | *)
8 | module Main;
9 | var s1, s2 : string;
10 | begin
11 | s1 := "A";
12 | s2 := "AA";
13 |
14 | if s1 # s2
15 | then halt(1) else halt(0) end;
16 | end Main.
17 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/04-The-String-type/T21-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 6.3.4. String type.
5 | *
6 | * Positive test: string variables not equality
7 | *)
8 | module Main;
9 | var s1, s2 : string;
10 | begin
11 | s1 := "A";
12 | s2 := "AA";
13 |
14 | if s1 # s2
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/04-The-String-type/T22-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 6.3.4. String type.
5 | *
6 | * Positive test: string constants not equality
7 | *)
8 | module Main;
9 | var s1, s2 : string;
10 | begin
11 | s1 := "A";
12 | s2 := "AA";
13 |
14 | if s1 = s2
15 | then halt(0) else halt(1) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/04-The-String-type/T23-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 6.3.4. String type.
5 | *
6 | * Positive test: string constants equality
7 | *)
8 | module Main;
9 | var s1, s2 : string;
10 |
11 | begin
12 | s1 := "ABC";
13 | s2 := "AA";
14 |
15 | if s1 >= s2
16 | then halt(1) else halt(0) end;
17 | end Main.
18 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/04-The-String-type/T24-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 6.3.4. String type.
5 | *
6 | * Positive test: string constants equality
7 | *)
8 | module Main;
9 | var s1, s2 : string;
10 |
11 | begin
12 | s1 := "ABC";
13 | s2 := "AA";
14 |
15 | if s1 <= s2
16 | then halt(0) else halt(1) end;
17 | end Main.
18 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/04-The-String-type/T25-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 6.3.4. String type.
5 | *
6 | * Positive test: string constants equality
7 | *)
8 | module Main;
9 | var s1, s2 : string;
10 |
11 | begin
12 | s1 := "ABC";
13 | s2 := "AA";
14 |
15 | if s1 < s2
16 | then halt(0) else halt(1) end;
17 | end Main.
18 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/04-The-String-type/T26-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 6.3.4. String type.
5 | *
6 | * Positive test: string constants equality
7 | *)
8 | module Main;
9 | var s1, s2 : string;
10 |
11 | begin
12 | s1 := "ABC";
13 | s2 := "AA";
14 |
15 | if s1 > s2
16 | then halt(1) else halt(0) end;
17 | end Main.
18 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/05-Object-Types/T01-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3.6 Postulated interface type.
4 | * 6.3.5. Value object (RECord).
5 | *
6 | * Negative test: value object can not have parameters.
7 | *)
8 | object { value } A(i : integer);
9 | begin
10 | end A.
11 |
12 | module Main;
13 | begin
14 | halt(0);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/05-Object-Types/T02-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3.6 Postulated interface type.
4 | * 6.3.5. Value object (RECord).
5 | *
6 | * Negative test: an object without modifiers is value object.
7 | * It can not have parameters also.
8 | *)
9 | object A(i : integer);
10 | begin
11 | end A.
12 |
13 | module Main;
14 | begin
15 | halt(0);
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/05-Object-Types/T03-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3.6 Postulated interface type.
4 | * 6.3.5. Value object (RECord).
5 | *
6 | * Negative test: it is imposible to use object name for assignment.
7 | *)
8 | object { value } A;
9 | begin
10 | A := 1;
11 | end A.
12 |
13 | module Main;
14 | begin
15 | halt(0);
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/05-Object-Types/T07-t.znn:
--------------------------------------------------------------------------------
1 | object {ref, public} TreeNode;
2 | var {public}
3 | left, right : TreeNode;
4 | end TreeNode.
5 |
6 | module Main;
7 | begin
8 | halt(1);
9 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/06-Record-Types/T01-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3.6 Postulated interface type.
4 | * 6.3.5. Value object (RECord).
5 | *
6 | * Negative test: value object can not have parameters.
7 | *)
8 | object { value } A(i : integer);
9 | begin
10 | end A.
11 |
12 | module Main;
13 | begin
14 | halt(0);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/06-Record-Types/T02-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3.6 Postulated interface type.
4 | * 6.3.5. Value object (RECord).
5 | *
6 | * Negative test: an object without modifiers is value object.
7 | * It can not have parameters also.
8 | *)
9 | object A(i : integer);
10 | begin
11 | end A.
12 |
13 | module Main;
14 | begin
15 | halt(0);
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/06-Record-Types/T03-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3.6 Postulated interface type.
4 | * 6.3.5. Value object (RECord).
5 | *
6 | * Negative test: it is imposible to use object name for assignment.
7 | *)
8 | object { value } A;
9 | begin
10 | A := 1;
11 | end A.
12 |
13 | module Main;
14 | begin
15 | halt(0);
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/08-Procedure-Types/T14-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.7. Procedure types.
5 | *
6 | * Positive test: parameter name is used in procedure type.
7 | * Warning from compiler.
8 | *)
9 | module Main;
10 | type PT = procedure(i : integer) : integer;
11 |
12 | var pt : PT;
13 | begin
14 | halt(1);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/09-Converting-between-Types/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.8. Casting between types
5 | *
6 | * Positive test: object casting to its intrinsic type.
7 | *)
8 | module Main;
9 | var t, i : integer;
10 | begin
11 | if t is integer
12 | then i := integer(t);
13 | end;
14 |
15 | halt(1);
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/09-Converting-between-Types/T02-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.8. Casting between types
5 | *
6 | * Negative test: object casting to its non-intrinsic type.
7 | *)
8 | module Main;
9 | var
10 | i : integer;
11 | r : real;
12 | begin
13 | i := 10;
14 | r := i { real }; (* Not valid. *)
15 | halt(0);
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/09-Converting-between-Types/T05-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.8. Casting between types
5 | *
6 | * Positive test: casting from integer to charater.
7 | *)
8 | module Main;
9 | begin
10 | if (char(65) = 'A') & (char(49) = '1')
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/09-Converting-between-Types/T06-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.8. Casting between types
5 | *
6 | * Positive test: casting from character to integer.
7 | *)
8 | module Main;
9 | begin
10 | if (integer('A') = 65) & (integer('1') = 49)
11 | then halt(1) else halt(0) end;
12 | end Main.
13 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/09-Converting-between-Types/T07-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.8. Casting between types
5 | *
6 | * Positive test: casting from real to integer.
7 | *)
8 | module Main;
9 | var i : integer;
10 | begin
11 | i := integer(3.14);
12 |
13 | if i = 3
14 | then halt(1) else halt(0) end;
15 | end Main.
16 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/09-Converting-between-Types/T08-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.8. Casting between types
5 | *
6 | * Positive test: casting from real to integer.
7 | *)
8 | module Main;
9 | var i : integer;
10 | begin
11 | i := integer(-3.14);
12 |
13 | if i = -3
14 | then halt(1) else halt(0) end;
15 | end Main.
16 |
17 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/09-Converting-between-Types/T09-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.8. Casting between types
5 | *
6 | * Positive test: casting from integer to real.
7 | *)
8 | module Main;
9 | var r : real;
10 | begin
11 | r := real(3);
12 |
13 | if r = 3.0
14 | then halt(1) else halt(0) end;
15 | end Main.
16 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/09-Converting-between-Types/T10-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | * 5.3.8. Casting between types
5 | *
6 | * Positive test: casting from integer{32} to real{32}.
7 | *)
8 | module Main;
9 | var r : real { 32 };
10 | begin
11 | r := real(3, 32);
12 |
13 | if r = 3.0
14 | then halt(1) else halt(0) end;
15 | end Main.
16 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/T01-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | *
5 | * Negative test: not declared type name of type T.
6 | *)
7 | module A;
8 | type T = B;
9 | end A.
10 |
11 | module Main;
12 | begin
13 | halt(0);
14 | end Main.
15 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/T02-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | *
5 | * Negative test: the variable name B is used as type name of type T.
6 | * The variable is declared before it is used.
7 | *)
8 | module A;
9 | var B : integer;
10 | type T = B;
11 | end A.
12 |
13 | module Main;
14 | begin
15 | halt(0);
16 | end Main.
17 |
18 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/T03-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | *
5 | * Negative test: the variable name B is used as type name of type T.
6 | * The variable is declared after it is used.
7 | *)
8 | module A;
9 | type T = B;
10 | var B : integer;
11 | end A.
12 |
13 | module Main;
14 | begin
15 | halt(0);
16 | end Main.
17 |
18 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/T04-c.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | *
5 | * Positive test: the object name B is used as type name of type T.
6 | * The object is declared after it is used.
7 | *)
8 | module A;
9 | type T = B;
10 |
11 | type B = object
12 | end B;
13 | end A.
14 |
15 | module Main;
16 | begin
17 | halt(1);
18 | end Main.
19 |
20 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/T05-c.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | *
5 | * Positive test: the object name B is used as type name of type T.
6 | * The object is declared before it is used.
7 | *)
8 | module A;
9 | type B = object
10 | end B;
11 |
12 | type T = B;
13 | end A.
14 |
15 | module Main;
16 | begin
17 | halt(1);
18 | end Main.
19 |
20 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/T06-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | *
5 | * Negative test: the not declared name B is used as type name for type T.
6 | *)
7 | module A;
8 | import B;
9 |
10 | type {public}
11 | T = B;
12 | end A.
13 |
14 | module Main;
15 | begin
16 | halt(0);
17 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/T07-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | *
5 | * Negative test: the element C is absent in object B.
6 | *)
7 | module A;
8 | import B.C;
9 |
10 | type {public}
11 | T = B.C;
12 | end A.
13 |
14 | object B;
15 | end B.
16 |
17 | module Main;
18 | begin
19 | halt(0);
20 | end Main.
21 |
22 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/T08-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 5.3. Type declaration.
4 | *
5 | * Negative test: the element C is absent in object B.
6 | *)
7 | object B;
8 | end B.
9 |
10 | module A;
11 | import B.C;
12 |
13 | type {public}
14 | T = B.C;
15 | end A.
16 |
17 | module Main;
18 | begin
19 | halt(0);
20 | end Main.
21 |
22 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/03-Type-Declarations/T17-x.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 |
3 | var
4 | a : a;
5 | begin
6 | halt(0);
7 | end Main.
8 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/04-Variable-Declarations/T01-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 6.4. Variable declaration.
4 | *
5 | * Negative test: not declared type of variable X.
6 | *)
7 | module A;
8 | var X : B;
9 | end A.
10 |
11 | module Main;
12 | begin
13 | halt(0);
14 | end Main.
15 |
16 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/04-Variable-Declarations/T03-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 6.4. Variable declaration.
4 | *
5 | * Negative test: the definition B name is used as variable type.
6 | * The definition B is declared after it is used.
7 | *)
8 | module A;
9 | var X : B;
10 |
11 | definition B;
12 | end B;
13 | end A.
14 |
15 | module Main;
16 | begin
17 | halt(0);
18 | end Main.
19 |
20 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/04-Variable-Declarations/T04-c.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 6.4. Variable declaration.
4 | *
5 | * Positive test: the object B name is used as variable type.
6 | * The object B is declared before it is used.
7 | *)
8 | module A;
9 | type B = object
10 | end B;
11 |
12 | var X : B;
13 | end A.
14 |
15 | module Main;
16 | begin
17 | halt(1);
18 | end Main.
19 |
20 |
--------------------------------------------------------------------------------
/testsuite/05-Declarations/04-Variable-Declarations/T05-c.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 6.4. Variable declaration.
4 | *
5 | * Positive test: the object B name is used as variable type.
6 | * The object B is declared after it is used.
7 | *)
8 | module A;
9 | var X : B;
10 |
11 | type B = object
12 | end B;
13 | end A.
14 |
15 | module Main;
16 | begin
17 | halt(1);
18 | end Main.
--------------------------------------------------------------------------------
/testsuite/05-Declarations/04-Variable-Declarations/T06-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 5. Declarations.
3 | * 6.4. Variable declaration.
4 | *
5 | * Negative test: the imported name B is not declared.
6 | *)
7 | module A;
8 | import B;
9 |
10 | var X : B;
11 | end A.
12 |
13 | module Main;
14 | begin
15 | halt(0);
16 | end Main.
17 |
18 |
19 |
--------------------------------------------------------------------------------
/testsuite/06-Expressions/01-Operands-and-Designators/0A-Instance-SELF/T01-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.1. Operands
4 | * A. Instance = self
5 | *
6 | * Negative test: access to variable that does not exist.
7 | *)
8 | object A;
9 | var i : integer;
10 | begin
11 | self.x := 1;
12 | i := self.x;
13 | end A.
14 |
15 | module Main;
16 | begin
17 | halt(0);
18 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/01-Operands-and-Designators/0A-Instance-SELF/T06-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.1. Operands
4 | * A. Instance = self
5 | *
6 | * Negative test: access to array element that does not exist.
7 | *)
8 | object A;
9 | var i : integer;
10 | begin
11 | self.x[0] := 1;
12 | i := self.x[0];
13 | end A.
14 |
15 | module Main;
16 | begin
17 | halt(0);
18 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/01-Operands-and-Designators/0A-Instance-SELF/T11-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.1. Operands
4 | * A. Instance = self
5 | *
6 | * Negative test: call of procedure that does not exist.
7 | *)
8 | object A;
9 | var i : integer;
10 | begin
11 | self.x();
12 | i := self.x();
13 | end A.
14 |
15 | module Main;
16 | begin
17 | halt(0);
18 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/01-Logical-Operators/A-OR-operator/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.2. Logical Operators
5 | * A. or operator.
6 | *
7 | * Positive test: true or true
8 | *)
9 | module Main;
10 | begin
11 | if true or true
12 | then halt(1) else halt(0) end;
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/01-Logical-Operators/A-OR-operator/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.2. Logical Operators
5 | * A. or operator.
6 | *
7 | * Positive test: true or false
8 | *)
9 | module Main;
10 | begin
11 | if true or false
12 | then halt(1) else halt(0) end;
13 | end Main.
14 |
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/01-Logical-Operators/A-OR-operator/T03-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.2. Logical Operators
5 | * A. or operator.
6 | *
7 | * Positive test: false or true
8 | *)
9 | module Main;
10 | begin
11 | if false or true
12 | then halt(1) else halt(0) end;
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/01-Logical-Operators/A-OR-operator/T04-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.2. Logical Operators
5 | * A. or operator.
6 | *
7 | * Positive test: false or false
8 | *)
9 | module Main;
10 | begin
11 | if false or false
12 | then halt(0) else halt(1) end;
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/01-Logical-Operators/B-AND-operator/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.2. Logical Operators
5 | * B. AND operator.
6 | *
7 | * Positive test: true & true
8 | *)
9 | module Main;
10 | begin
11 | if true & true
12 | then halt(1) else halt(0) end;
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/01-Logical-Operators/B-AND-operator/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.2. Logical Operators
5 | * B. AND operator.
6 | *
7 | * Positive test: true & false
8 | *)
9 | module Main;
10 | begin
11 | if true & false
12 | then halt(0) else halt(1) end;
13 | end Main.
14 |
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/01-Logical-Operators/B-AND-operator/T03-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.2. Logical Operators
5 | * B. AND operator.
6 | *
7 | * Positive test: false & true
8 | *)
9 | module Main;
10 | begin
11 | if false & true
12 | then halt(0) else halt(1) end;
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/01-Logical-Operators/B-AND-operator/T04-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.2. Logical Operators
5 | * B. AND operator.
6 | *
7 | * Positive test: false & false
8 | *)
9 | module Main;
10 | begin
11 | if false & false
12 | then halt(0) else halt(1) end;
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/01-Logical-Operators/C-Negation/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.2. Logical Operators.
5 | * C. ~ (negation) operator.
6 | *
7 | * Positive test: ~ true
8 | *)
9 | module Main;
10 | begin
11 | if ~true
12 | then halt(0) else halt(1) end;
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/01-Logical-Operators/C-Negation/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.2. Logical Operators.
5 | * C. ~ (negation) operator.
6 | *
7 | * Positive test: ~ true
8 | *)
9 | module Main;
10 | begin
11 | if ~false
12 | then halt(1) else halt(0) end;
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/02-Arithmetic-Operators/B-Constants/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.3. Arithmetic Operators
5 | *
6 | * Positive test: 5 + 2
7 | *)
8 | module Main;
9 | begin
10 | if 5 + 2 = 7
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/02-Arithmetic-Operators/B-Constants/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.3. Arithmetic Operators
5 | *
6 | * Positive test: 5 - 2
7 | *)
8 | module Main;
9 | begin
10 | if 5 - 2 = 3
11 | then halt(1) else halt(0) end;
12 | end Main.
13 |
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/02-Arithmetic-Operators/B-Constants/T03-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.3. Arithmetic Operators
5 | *
6 | * Positive test: 5 * 2
7 | *)
8 | module Main;
9 | begin
10 | if 5 * 2 = 10
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/02-Arithmetic-Operators/B-Constants/T04-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.3. Arithmetic Operators
5 | *
6 | * Positive test: 5 / 2
7 | *)
8 | module Main;
9 | begin
10 | if 5 / 2 = 2.5
11 | then halt(1) else halt(0) end;
12 | end Main.
13 |
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/02-Arithmetic-Operators/B-Constants/T05-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.3. Arithmetic Operators
5 | *
6 | * Positive test: 5 div 3
7 | *)
8 | module Main;
9 | begin
10 | if 5 div 3 = 1
11 | then halt(1) else halt(0) end;
12 | end Main.
13 |
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/02-Arithmetic-Operators/B-Constants/T06-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.3. Arithmetic Operators
5 | *
6 | * Positive test: 5 div 3 = 2
7 | *)
8 | module Main;
9 | begin
10 | if 5 mod 3 = 2
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/02-Arithmetic-Operators/B-Constants/T07-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.3. Arithmetic Operators
5 | *
6 | * Positive test: -5 div 2 = -3
7 | *)
8 | module Main;
9 | begin
10 | if -5 div 2 = -3
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/02-Arithmetic-Operators/C-Variables/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.3. Arithmetic Operators
5 | *
6 | * Positive test: 5 + 2 with variables
7 | *)
8 | module Main;
9 | var a, b : integer;
10 | begin
11 | a := 5;
12 | b := 2;
13 |
14 | if a + b = 7
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/02-Arithmetic-Operators/C-Variables/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.3. Arithmetic Operators
5 | *
6 | * Positive test: 5 - 2 with variables
7 | *)
8 | module Main;
9 | var a, b : integer;
10 | begin
11 | a := 5;
12 | b := 2;
13 |
14 | if a - b = 3
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/02-Arithmetic-Operators/C-Variables/T03-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.3. Arithmetic Operators
5 | *
6 | * Positive test: 5 * 2 with variables
7 | *)
8 | module Main;
9 | var a, b : integer;
10 | begin
11 | a := 5;
12 | b := 2;
13 |
14 | if a * b = 10
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/02-Arithmetic-Operators/C-Variables/T04-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.3. Arithmetic Operators
5 | *
6 | * Positive test: 5 / 2 with variables
7 | *)
8 | module Main;
9 | var a, b : integer;
10 | begin
11 | a := 5;
12 | b := 2;
13 |
14 | if a / b = 2.5
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/02-Arithmetic-Operators/C-Variables/T06-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.3. Arithmetic Operators
5 | *
6 | * Positive test: 5 mod 2 with variables
7 | *)
8 | module Main;
9 | var a, b : integer;
10 | begin
11 | a := 5;
12 | b := 3;
13 |
14 | if a mod b = 2
15 | then halt(1) else halt(0) end;
16 | end Main.
17 |
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/02-Arithmetic-Operators/G-Monadic/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.3. Arithmetic Operators
5 | *
6 | * Positive test: monadic -
7 | *)
8 | module Main;
9 | var i : integer;
10 | begin
11 | i := 1;
12 | i := -i;
13 |
14 | if i = -1
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/02-Arithmetic-Operators/G-Monadic/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.3. Arithmetic Operators
5 | *
6 | * Positive test: plus -
7 | *)
8 | module Main;
9 | var i : integer;
10 | begin
11 | i := 1;
12 | i := +i;
13 |
14 | if i = 1
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/02-Arithmetic-Operators/T01-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.3. Arithmetic Operators
5 | *
6 | * Negative test: devision to real zero constant must not be compiled.
7 | *)
8 | module Main;
9 | var r : real;
10 | begin
11 | r := 1.0 / 0.0;
12 | halt(0);
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/02-Arithmetic-Operators/T03-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.3. Arithmetic Operators
5 | *
6 | * Negative test: devision to integer zero constant must not be compiled.
7 | *)
8 | module Main;
9 | var i : real;
10 | begin
11 | i := 1 / 0;
12 | halt(0);
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/02-Arithmetic-Operators/T05-t.znn:
--------------------------------------------------------------------------------
1 | module {public} Main;
2 |
3 | import
4 | System.Double as Double;
5 |
6 | var {public}
7 | x : Double;
8 | begin
9 | x:= 10.0;
10 | x := - x;
11 | if x = -10.0 then halt(1) else halt(0) end
12 | end Main.
13 |
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/03-Set-Operators/A-Constants/T07-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.4. Set Operators.
5 | *
6 | * Positive test: set equivalence.
7 | * Set is presented as constant.
8 | *)
9 | module Main;
10 | begin
11 | if { 1, 2 } = { 1, 2 }
12 | then halt(1) else halt(0) end;
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/03-Set-Operators/A-Constants/T08-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.4. Set Operators.
5 | *
6 | * Positive test: set equivalence.
7 | * Set is presented as constant.
8 | *)
9 | module Main;
10 | begin
11 | if { 1, 2, 3 } # { 1, 2 }
12 | then halt(1) else halt(0) end;
13 | end Main.
14 |
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/03-Set-Operators/B-Variables/T07-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.4. Set Operators.
5 | *
6 | * Positive test: set equivalence.
7 | *)
8 | module Main;
9 | var s1, s2 : set;
10 | begin
11 | s1 := { 1, 2 };
12 | s2 := { 1, 2 };
13 |
14 | if s1 = s2
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/03-Set-Operators/B-Variables/T08-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.4. Set Operators.
5 | *
6 | * Positive test: set not equivalence.
7 | *)
8 | module Main;
9 | var s1, s2 : set;
10 | begin
11 | s1 := { 1, 2 };
12 | s2 := { 1, 2, 3 };
13 |
14 | if s1 # s2
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/A-Integer-Constant/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: < operator.
7 | *)
8 | module Main;
9 | begin
10 | if 1 < 2 then halt(1) else halt(0) end;
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/A-Integer-Constant/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: < operator.
7 | *)
8 | module Main;
9 | begin
10 | if 2 < 1 then halt(0) else halt(1) end;
11 | end Main.
12 |
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/A-Integer-Constant/T03-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: > operator.
7 | *)
8 | module Main;
9 | begin
10 | if 2 > 1 then halt(1) else halt(0) end;
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/A-Integer-Constant/T04-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: > operator.
7 | *)
8 | module Main;
9 | begin
10 | if 1 > 2 then halt(0) else halt(1) end;
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/A-Integer-Constant/T05-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: >= operator.
7 | *)
8 | module Main;
9 | begin
10 | if 1 >= 1 then halt(1) else halt(0) end;
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/A-Integer-Constant/T06-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: >= operator.
7 | *)
8 | module Main;
9 | begin
10 | if 2 >= 1 then halt(1) else halt(0) end;
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/A-Integer-Constant/T07-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: >= operator.
7 | *)
8 | module Main;
9 | begin
10 | if 1 >= 2 then halt(0) else halt(1) end;
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/A-Integer-Constant/T08-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: <= operator.
7 | *)
8 | module Main;
9 | begin
10 | if 1 <= 1 then halt(1) else halt(0) end;
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/A-Integer-Constant/T09-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: <= operator.
7 | *)
8 | module Main;
9 | begin
10 | if 1 <= 2 then halt(1) else halt(0) end;
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/A-Integer-Constant/T10-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: <= operator.
7 | *)
8 | module Main;
9 | begin
10 | if 2 <= 1 then halt(0) else halt(1) end;
11 | end Main.
12 |
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/A-Integer-Constant/T11-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: = operator.
7 | *)
8 | module Main;
9 | begin
10 | if 2 = 2 then halt(1) else halt(0) end;
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/A-Integer-Constant/T12-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: = operator.
7 | *)
8 | module Main;
9 | begin
10 | if 2 = 3 then halt(0) else halt(1) end;
11 | end Main.
12 |
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/A-Integer-Constant/T13-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: # operator.
7 | *)
8 | module Main;
9 | begin
10 | if 2 # 2 then halt(0) else halt(1) end;
11 | end Main.
12 |
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/A-Integer-Constant/T14-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: # operator.
7 | *)
8 | module Main;
9 | begin
10 | if 2 # 3 then halt(1) else halt(0) end;
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/B-Integer-Variable/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: < operator.
7 | *)
8 | module Main;
9 | var x, y : integer;
10 | begin
11 | x := 1;
12 | y := 2;
13 |
14 | if x < y
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/B-Integer-Variable/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: < operator.
7 | *)
8 | module Main;
9 | var x, y : integer;
10 | begin
11 | x := 1;
12 | y := 2;
13 |
14 | if y < x
15 | then halt(0) else halt(1) end;
16 | end Main.
17 |
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/B-Integer-Variable/T03-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: > operator.
7 | *)
8 | module Main;
9 | var x, y : integer;
10 | begin
11 | x := 1;
12 | y := 2;
13 |
14 | if y > x
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/B-Integer-Variable/T04-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: > operator.
7 | *)
8 | module Main;
9 | var x, y : integer;
10 | begin
11 | x := 1;
12 | y := 2;
13 |
14 | if x > y
15 | then halt(0) else halt(1) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/B-Integer-Variable/T05-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: >= operator.
7 | *)
8 | module Main;
9 | var x, y : integer;
10 | begin
11 | x := 1;
12 | y := 2;
13 |
14 | if y >= x
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/B-Integer-Variable/T06-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: >= operator.
7 | *)
8 | module Main;
9 | var x, y : integer;
10 | begin
11 | x := 1;
12 | y := 2;
13 |
14 | if y >= x
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/B-Integer-Variable/T07-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: >= operator.
7 | *)
8 | module Main;
9 | var x, y : integer;
10 | begin
11 | x := 1;
12 | y := 2;
13 |
14 | if x >= y
15 | then halt(0) else halt(1) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/B-Integer-Variable/T08-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: <= operator.
7 | *)
8 | module Main;
9 | var x, y : integer;
10 | begin
11 | x := 2;
12 | y := 1;
13 |
14 | if y <= x
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/B-Integer-Variable/T09-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: <= operator.
7 | *)
8 | module Main;
9 | var x, y : integer;
10 | begin
11 | x := 1;
12 | y := 2;
13 |
14 | if x <= y
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/B-Integer-Variable/T10-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: <= operator.
7 | *)
8 | module Main;
9 | var x, y : integer;
10 | begin
11 | x := 1;
12 | y := 2;
13 |
14 | if y <= x
15 | then halt(0) else halt(1) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/B-Integer-Variable/T11-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: = operator for integer variables.
7 | *)
8 | module Main;
9 | var x, y : integer;
10 | begin
11 | x := 1;
12 | y := 2;
13 |
14 | if y = x
15 | then halt(0) else halt(1) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/B-Integer-Variable/T12-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: = operator for integer variables.
7 | *)
8 | module Main;
9 | var x, y : real;
10 | begin
11 | x := 1.0;
12 | y := 1.0;
13 |
14 | if y = x
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/B-Integer-Variable/T13-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: # operator for integer variables.
7 | *)
8 | module Main;
9 | var x, y : real;
10 | begin
11 | x := real(1);
12 | y := real(2);
13 |
14 | if y # x
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/B-Integer-Variable/T14-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: # operator for integervariables.
7 | *)
8 | module Main;
9 | var x, y : real;
10 | begin
11 | x := real(2);
12 | y := real(2);
13 |
14 | if y # x
15 | then halt(0) else halt(1) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/C-Real-Constant/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: < operator.
7 | *)
8 | module Main;
9 | begin
10 | if 1.5 < 2.3
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/C-Real-Constant/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: < operator.
7 | *)
8 | module Main;
9 | begin
10 | if 2.4 < 1.6
11 | then halt(0) else halt(1) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/C-Real-Constant/T03-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: > operator.
7 | *)
8 | module Main;
9 | begin
10 | if 2.3 > 1.7
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/C-Real-Constant/T04-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: > operator.
7 | *)
8 | module Main;
9 | begin
10 | if 1.1 > 2.2
11 | then halt(0) else halt(1) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/C-Real-Constant/T05-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: >= operator.
7 | *)
8 | module Main;
9 | begin
10 | if 1.1 >= 1.1
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/C-Real-Constant/T06-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: >= operator.
7 | *)
8 | module Main;
9 | begin
10 | if 2.7 >= 1.6
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/C-Real-Constant/T07-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: >= operator.
7 | *)
8 | module Main;
9 | begin
10 | if 1.3 >= 2.4
11 | then halt(0) else halt(1) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/C-Real-Constant/T08-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: <= operator.
7 | *)
8 |
9 | module Main;
10 | begin
11 | if 1.2 <= 1.2
12 | then halt(1) else halt(0) end;
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/C-Real-Constant/T09-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: <= operator.
7 | *)
8 | module Main;
9 | begin
10 | if 1.4 <= 2.4
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/C-Real-Constant/T10-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: <= operator.
7 | *)
8 | module Main;
9 | begin
10 | if 2.4 <= 2.1
11 | then halt(0) else halt(1) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/C-Real-Constant/T11-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: = operator.
7 | *)
8 | module Main;
9 | begin
10 | if 2.4 = 2.4
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/C-Real-Constant/T12-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: = operator.
7 | *)
8 | module Main;
9 | begin
10 | if 2.4 = 2.5
11 | then halt(0) else halt(1) end;
12 | end Main.
13 |
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/C-Real-Constant/T13-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: # operator.
7 | *)
8 | module Main;
9 | begin
10 | if 2.4 # 2.4
11 | then halt(0) else halt(1) end;
12 | end Main.
13 |
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/C-Real-Constant/T14-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: # operator.
7 | *)
8 | module Main;
9 | begin
10 | if 2.4 # 2.5
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/D-Real-Variable/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: < operator for real variables.
7 | *)
8 | module Main;
9 | var x, y : real;
10 | begin
11 | x := 1.5;
12 | y := 2.3;
13 |
14 | if x < y
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/D-Real-Variable/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: < operator for real variables.
7 | *)
8 | module Main;
9 | var x, y : real;
10 | begin
11 | x := 1.0;
12 | y := 2.0;
13 |
14 | if y < x
15 | then halt(0) else halt(1) end;
16 | end Main.
17 |
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/D-Real-Variable/T03-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: > operator for real variables.
7 | *)
8 | module Main;
9 | var x, y : real;
10 | begin
11 | x := 1.1;
12 | y := 2.2;
13 |
14 | if y > x
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/D-Real-Variable/T04-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: > operator.
7 | *)
8 | module Main;
9 | var x, y : real;
10 | begin
11 | x := 1.0;
12 | y := 2.0;
13 |
14 | if x > y
15 | then halt(0) else halt(1) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/D-Real-Variable/T05-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: >= operator for real variables.
7 | *)
8 | module Main;
9 | var x, y : real;
10 | begin
11 | x := 1.0;
12 | y := 2.0;
13 |
14 | if x >= x
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/D-Real-Variable/T06-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: >= operator for real variables.
7 | *)
8 | module Main;
9 | var x, y : real;
10 | begin
11 | x := 1.0;
12 | y := 2.0;
13 |
14 | if y >= x
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/D-Real-Variable/T07-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: >= operator.
7 | *)
8 | module Main;
9 | var x, y : real;
10 | begin
11 | x := 1.99;
12 | y := 2.99;
13 |
14 | if x >= y
15 | then halt(0) else halt(1) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/D-Real-Variable/T08-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: <= operator for real variables.
7 | *)
8 | module Main;
9 | var x, y : real;
10 | begin
11 | x := 1.5;
12 | y := 2.6;
13 |
14 | if x <= x
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/D-Real-Variable/T09-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: <= operator.
7 | *)
8 | module Main;
9 | var x, y : real;
10 | begin
11 | x := 1.111;
12 | y := 2.222;
13 |
14 | if x <= y
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/D-Real-Variable/T10-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: <= operator for real variables.
7 | *)
8 | module Main;
9 | var x, y : real;
10 | begin
11 | x := 1.999;
12 | y := 2.999;
13 |
14 | if y <= x
15 | then halt(0) else halt(1) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/D-Real-Variable/T11-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: = operator for real variables.
7 | *)
8 | module Main;
9 | var x, y : real;
10 | begin
11 | x := 1.999;
12 | y := 2.999;
13 |
14 | if y = x
15 | then halt(0) else halt(1) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/D-Real-Variable/T12-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: = operator for real variables.
7 | *)
8 | module Main;
9 | var x, y : real;
10 | begin
11 | x := 1.999;
12 | y := 1.999;
13 |
14 | if y = x
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/D-Real-Variable/T13-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: # operator for real variables.
7 | *)
8 | module Main;
9 | var x, y : real;
10 | begin
11 | x := 1.999;
12 | y := 2.999;
13 |
14 | if y # x
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/D-Real-Variable/T14-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: # operator for real variables.
7 | *)
8 | module Main;
9 | var x, y : real;
10 | begin
11 | x := 2.999;
12 | y := 2.999;
13 |
14 | if y # x
15 | then halt(0) else halt(1) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/D-Real-Variable/T15-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Negative test: integer assignment to real.
7 | *)
8 | module Main;
9 | var x : real;
10 | begin
11 | x := 2;
12 | halt(0);
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/E-Character-Constants/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: < operator for character constants.
7 | *)
8 | module Main;
9 | begin
10 | if '0' < '1'
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/E-Character-Constants/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: < operator for character constants.
7 | *)
8 | module Main;
9 | begin
10 | if '2' < '1'
11 | then halt(0) else halt(1) end;
12 | end Main.
13 |
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/E-Character-Constants/T03-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: > operator for character constants.
7 | *)
8 | module Main;
9 | begin
10 | if '2' > '1'
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/E-Character-Constants/T04-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: > operator.
7 | *)
8 | module Main;
9 | begin
10 | if '1' > '2'
11 | then halt(0) else halt(1) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/E-Character-Constants/T05-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: >= operator for character constants.
7 | *)
8 | module Main;
9 | begin
10 | if '1' >= '1'
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/E-Character-Constants/T06-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: >= operator for character constants.
7 | *)
8 | module Main;
9 | begin
10 | if '2' >= '1'
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/E-Character-Constants/T07-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: >= operator for character constants.
7 | *)
8 | module Main;
9 | begin
10 | if '1' >= '2'
11 | then halt(0) else halt(1) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/E-Character-Constants/T08-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: <= operator.
7 | *)
8 | module Main;
9 | begin
10 | if '1' <= '1' then halt(1) else halt(0) end;
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/E-Character-Constants/T09-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: <= operator.
7 | *)
8 | module Main;
9 | begin
10 | if '1' <= '2'
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/E-Character-Constants/T10-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: <= operator.
7 | *)
8 | module Main;
9 | begin
10 | if '2' <= '1'
11 | then halt(0) else halt(1) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/E-Character-Constants/T11-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: = operator for character constants.
7 | *)
8 | module Main;
9 | begin
10 | if '2' = '1'
11 | then halt(0) else halt(1) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/E-Character-Constants/T12-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: = operator for character constants.
7 | *)
8 | module Main;
9 | begin
10 | if '1' = '1'
11 | then halt(1) else halt(0) end;
12 | end Main.
13 |
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/E-Character-Constants/T13-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: # operator for character constants.
7 | *)
8 | module Main;
9 | begin
10 | if '1' # '2'
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/06-Expressions/02-Predefined-Operators/04-Relations/E-Character-Constants/T14-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.2. Predefined Operators.
4 | * 6.2.5. Relation Operators.
5 | *
6 | * Positive test: # operator for character constants.
7 | *)
8 | module Main;
9 | begin
10 | if '1' # '1'
11 | then halt(0) else halt(1) end;
12 | end Main.
13 |
--------------------------------------------------------------------------------
/testsuite/06-Expressions/04-Converting/t02-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 6. Expression.
3 | * 6.4. Converting
4 | *
5 | * Negative test: Types 'real{32}' and 'real{64}' are not assignment compatible
6 | *
7 | *)
8 |
9 | module Main;
10 |
11 | var a: real{32}; b: real{64};
12 | begin
13 | a:=b;
14 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/01-Assignments/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.1. Assignments
4 | *
5 | * Simplest assignment test.
6 | *)
7 | module Main;
8 | var
9 | x : integer;
10 | begin
11 | x := 2;
12 |
13 | if x = 2
14 | then halt(1) else halt(0) end;
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/01-Assignments/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.1. Assignments
4 | *
5 | * Positive text: Te and Tv are the same type.
6 | *)
7 | module Main;
8 | type T = ( one, two );
9 | var e1, e2 : T;
10 | begin
11 | e1 := T.one;
12 | e2 := T.two;
13 | e1 := e2;
14 |
15 | if e1 = T.two
16 | then halt(1) else halt(0) end;
17 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/01-Assignments/T03-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.1. Assignments
4 | *
5 | * Negative text: Te and Tv are incompatible types.
6 | *)
7 | module Main;
8 | type Tv = (one, two);
9 | type Te = (one, two);
10 |
11 | var
12 | v : Tv;
13 | e : Te;
14 | begin
15 | v := Tv.one;
16 | e := Te.one;
17 | e := v;
18 | halt(0);
19 | end Main.
20 |
--------------------------------------------------------------------------------
/testsuite/07-Statement/01-Assignments/T04-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.1. Assignments
4 | *
5 | * Negative text: Te and Tv are incompatible types.
6 | *)
7 | module Main;
8 | var
9 | v : integer {8};
10 | e : integer {32};
11 | begin
12 | e := 3;
13 | v := e;
14 | halt(0);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/01-Assignments/T05-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.1. Assignments
4 | *
5 | * Negative text: Te and Tv are incompatible types.
6 | *)
7 | module Main;
8 | var v : integer { 8 };
9 | e : integer { 32 };
10 | begin
11 | e := 3;
12 | v := e;
13 | halt(0);
14 | end Main.
15 |
--------------------------------------------------------------------------------
/testsuite/07-Statement/01-Assignments/T06-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.1. Assignments
4 | *
5 | * Negative text: Te and Tv are incompatible types families.
6 | *)
7 | module Main;
8 | var
9 | v : integer;
10 | e : real;
11 | begin
12 | e := 3;
13 | v := e;
14 | halt(0);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/01-Assignments/T07-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.1. Assignments
4 | *
5 | * Positive text: nil assignment to procedure type variable.
6 | *)
7 | module Main;
8 | type PT = procedure (integer) : integer;
9 | var v : PT;
10 | begin
11 | v := nil;
12 |
13 | if v = nil
14 | then halt(1) else halt(0) end;
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/01-Assignments/T08-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.1. Assignments
4 | *
5 | * Negative text: long string assignment to character array variable.
6 | *)
7 | module Main;
8 | var s : array 3 of char;
9 | begin
10 | s := "123";
11 | halt(0);
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/01-Assignments/T09-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.1. Assignments
4 | *
5 | * Negative text: too long string assignment to character array.
6 | *)
7 | module Main;
8 | var s : array 3 of char;
9 | begin
10 | s := "1234567890";
11 | halt(0);
12 | end Main.
13 |
--------------------------------------------------------------------------------
/testsuite/07-Statement/01-Assignments/T10-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.1. Assignments
4 | *
5 | * Negative test: short string assignment to character array variable.
6 | *)
7 | module Main;
8 | var s : array 3 of char;
9 | begin
10 | s := "12";
11 | halt(0);
12 | end Main.
13 |
14 |
--------------------------------------------------------------------------------
/testsuite/07-Statement/01-Assignments/T12-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.1. Assignments
4 | *
5 | * Positive text: nil assignment to procedure type variable.
6 | *)
7 | module Main;
8 | type PT = procedure (integer) : integer;
9 |
10 | procedure p(i : real) : integer;
11 | begin
12 | return 3
13 | end p;
14 |
15 | var pv : PT;
16 | begin
17 | pv := nil;
18 | halt(1);
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/01-Assignments/T13-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.1. Assignments
4 | *
5 | * Negative text: char assignment to integer.
6 | *)
7 | module Main;
8 | var c : char;
9 | i : integer;
10 | begin
11 | (* c := 'a'; *)
12 | c := i;
13 | halt(0);
14 | end Main.
15 |
--------------------------------------------------------------------------------
/testsuite/07-Statement/01-Assignments/T15-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.1. Assignments
4 | *
5 | * Positive text: casting of external type to its base type
6 | *)
7 |
8 | module Main;
9 | import System.IO as IO;
10 | var f : IO.Stream;
11 | begin
12 | f := IO.File.Open("test.txt", IO.FileMode.Create);
13 | halt(1);
14 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/01-Assignments/t14-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.1. Assignments
4 | *
5 | * Positive text: nil assignment to procedure type variable.
6 | *)
7 |
8 | module {public} Main;
9 | var r : real;
10 | begin
11 | r := 1.2;
12 | writeln("r = " + string(r));
13 | halt(1)
14 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/02-Procedure-Calls/T01-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.2. Procedure call.
4 | *
5 | * Negative test: value and variable parameters are missed.
6 | *)
7 | module Main;
8 | procedure p(var j : integer; i : integer);
9 | begin
10 | j := i + 1;
11 | end p;
12 |
13 | var p1, p2 : integer;
14 | begin
15 | p1 := 1;
16 | p2 := 2;
17 | p(4, p1);
18 | halt(0);
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/02-Procedure-Calls/T02-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.2. Procedure call.
4 | *
5 | * Negative test: parameter count is more then need.
6 | *)
7 | module Main;
8 | procedure p(var j : integer; i : integer);
9 | begin
10 | j := i + 1;
11 | end p;
12 |
13 | var p1, p2 : integer;
14 | begin
15 | p1 := 1;
16 | p2 := 2;
17 | p(4, p1, p2);
18 | halt(0);
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/02-Procedure-Calls/T03-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.2. Procedure call.
4 | *
5 | * Negative test: parameter count is less then is need.
6 | *)
7 | module Main;
8 | procedure p(var j : integer; i : integer);
9 | begin
10 | j := i + 1;
11 | end p;
12 |
13 | var p1, p2 : integer;
14 | begin
15 | p1 := 1;
16 | p2 := 2;
17 | p(4);
18 | halt(0);
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/02-Procedure-Calls/T04-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.2. Procedure call.
4 | *
5 | * Negative test: parameter count is less then need.
6 | *)
7 | module Main;
8 | procedure p(var j : integer; i : integer);
9 | begin
10 | j := i + 1;
11 | end p;
12 |
13 | var p1, p2 : integer;
14 | begin
15 | p1 := 1;
16 | p2 := 2;
17 | p(p1);
18 |
19 | halt(0);
20 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/02-Procedure-Calls/T23-t.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 | import System.Math as Math;
3 | var a: real;
4 |
5 | begin
6 | a:=Math.Sin(2.3);
7 | halt(1);
8 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/03-IF-Statements/T03-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.3. if statement.
4 | *
5 | * Positive test: the else is true.
6 | *)
7 | module Main;
8 | var i, j : integer;
9 | begin
10 | i := 3;
11 | j := 2;
12 |
13 | if i = 1 then j := 3;
14 | elsif i = 2 then j := 4;
15 | else j := 5;
16 | end;
17 |
18 | if j = 5
19 | then halt(1) else halt(0) end;
20 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/03-IF-Statements/T04-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.3. if statement.
4 | *
5 | * Positive test: the else absent, no conditions are true.
6 | *)
7 | module Main;
8 | var i, j : integer;
9 | begin
10 | i := 3;
11 | j := 2;
12 |
13 | if i = 1 then j := 3;
14 | elsif i = 2 then j := 4;
15 | end;
16 |
17 | if j = 2
18 | then halt(1) else halt(0) end;
19 | end Main.
20 |
--------------------------------------------------------------------------------
/testsuite/07-Statement/03-IF-Statements/T06-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.3. if statement.
4 | *
5 | * Negative test: not logical expression in the first condition.
6 | *)
7 | module Main;
8 | var i, j : integer;
9 | begin
10 | i := 1;
11 | j := 2;
12 |
13 | if i + j then j := 3;
14 | elsif i = 1 then j := 4;
15 | else j := 5;
16 | end;
17 |
18 | halt(0);
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/03-IF-Statements/T07-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.3. if statement.
4 | *
5 | * Negative test: not logical expression in the second condition.
6 | *)
7 | module Main;
8 | var i, j : integer;
9 | begin
10 | i := 1;
11 | j := 2;
12 |
13 | if i = 1 then j := 3;
14 | elsif i + j then j := 4;
15 | else j := 5;
16 | end;
17 |
18 | halt(0);
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/03-IF-Statements/T08-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.3. if statement.
4 | *
5 | * Negative test: not declared variable k in IF clause.
6 | *)
7 | module Main;
8 | var j : integer;
9 | begin
10 | if k then j := 3;
11 | elsif l then j := 4;
12 | else j := 5;
13 | end;
14 |
15 | halt(0)
16 | end Main.
17 |
--------------------------------------------------------------------------------
/testsuite/07-Statement/03-IF-Statements/T09-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.3. if statement.
4 | *
5 | * Negative test: condition is missing
6 | *)
7 |
8 | module Main;
9 | var x: real;
10 | i: integer;
11 | begin
12 |
13 | if then
14 | writeln("1.");
15 | end;
16 |
17 | end Main.
18 |
--------------------------------------------------------------------------------
/testsuite/07-Statement/04-CASE-Statements/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.4. CASE statement.
4 | *
5 | * Positive test: first label contains obtained value.
6 | *)
7 | module Main;
8 | var i, j : integer;
9 | begin
10 | i := 1;
11 | j := 2;
12 |
13 | case i + j of
14 | 3 : j := 3;
15 | | 4 : j := 4;
16 | end;
17 |
18 | if j = 3
19 | then halt(1) else halt(0) end;
20 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/04-CASE-Statements/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.4. CASE statement.
4 | *
5 | * Positive test: second label contains obtained value.
6 | *)
7 | module Main;
8 | var i, j : integer;
9 | begin
10 | i := 2;
11 | j := 2;
12 |
13 | case i + j of
14 | 3 : j := 3;
15 | | 4 : j := 4;
16 | end;
17 |
18 | if j = 4
19 | then halt(1) else halt(0) end;
20 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/04-CASE-Statements/T07-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.4. CASE statement.
4 | *
5 | * Negative test: wrong kind of case expression.
6 | *)
7 | module Main;
8 | type E = ( one, two );
9 |
10 | var e : E;
11 | j : integer;
12 | begin
13 | j := 2;
14 |
15 | case j = 2 of
16 | E.one : j := 3;
17 | | E.two : j := 4;
18 | end;
19 |
20 | halt(0);
21 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/04-CASE-Statements/T09-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.4. CASE statement.
4 | *
5 | * Negative test: not constant expression in the label.
6 | *)
7 | module Main;
8 | var i, j : integer;
9 | begin
10 | i := 1;
11 | j := 2;
12 |
13 | case j of
14 | i + j : j := 3;
15 | | 4 : j := 4;
16 | end;
17 |
18 | halt(0);
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/05-WHILE-Statements/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.5. WHILE statement.
4 | *
5 | * Positive test: while condition is false.
6 | *)
7 | module Main;
8 | var i, j : integer;
9 | begin
10 | i := 10;
11 | j := 3;
12 |
13 | while i > 10 do
14 | i := i - 1;
15 | j := j - 1;
16 | end;
17 |
18 | if j = 3 then halt(1) else halt(0) end;
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/05-WHILE-Statements/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.5. WHILE statement.
4 | *
5 | * Positive test: while statement is executed once.
6 | *)
7 | module Main;
8 | var i, j : integer;
9 | begin
10 | i := 3;
11 | j := 3;
12 |
13 | while i # 4 do
14 | i := i + 1;
15 | j := j + 1;
16 | end;
17 |
18 | if j = 4 then halt(1) else halt(0) end;
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/05-WHILE-Statements/T03-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.5. WHILE statement.
4 | *
5 | * Positive test: while statement is executed two times.
6 | *)
7 | module Main;
8 | var i, j : integer;
9 | begin
10 | i := 3;
11 | j := 3;
12 |
13 | while i # 5 do
14 | i := i + 1;
15 | j := j + 1;
16 | end;
17 |
18 | if j = 5 then halt(1) else halt(0) end;
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/05-WHILE-Statements/T04-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.5. WHILE statement.
4 | *
5 | * Negative test: not logical expression in while condition.
6 | *)
7 | module Main;
8 | var i, j : integer;
9 | begin
10 | i := 3;
11 | j := 3;
12 |
13 | while i + 5 do
14 | i := i + 1;
15 | j := j + 1;
16 | end;
17 |
18 | halt(0);
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/05-WHILE-Statements/T05-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.5. WHILE statement.
4 | *
5 | * Negative test: not declared variable in WHILE clause.
6 | *)
7 | module Main;
8 | var i : integer;
9 | begin
10 | while j do
11 | i := 0
12 | end;
13 |
14 | halt(0)
15 | end Main.
16 |
--------------------------------------------------------------------------------
/testsuite/07-Statement/06-REPEAT-Statements/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.6. REPEAT statement.
4 | *
5 | * Positive test: repeat statement executed once.
6 | *)
7 | module Main;
8 | var i, j : integer;
9 | begin
10 | i := 4;
11 | j := 4;
12 |
13 | repeat
14 | i := i - 1;
15 | j := j - 1;
16 | until i = 3;
17 |
18 | if j = 3 then halt(1) else halt(0) end;
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/06-REPEAT-Statements/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.6. REPEAT statement.
4 | *
5 | * Positive test: repeat statement executed two times.
6 | *)
7 | module Main;
8 | var i, j : integer;
9 | begin
10 | i := 5;
11 | j := 5;
12 |
13 | repeat
14 | i := i - 1;
15 | j := j - 1;
16 | until i = 3;
17 |
18 | if j = 3 then halt(1) else halt(0) end;
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/06-REPEAT-Statements/T03-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.6. REPEAT statement.
4 | *
5 | * Negative test: not logical expression in until clause.
6 | *)
7 | module Main;
8 | var i, j : integer;
9 | begin
10 | i := 4;
11 | j := 4;
12 |
13 | repeat
14 | i := i - 1;
15 | j := j - 1;
16 | until i - i;
17 |
18 | halt(0);
19 | end Main.
20 |
--------------------------------------------------------------------------------
/testsuite/07-Statement/06-REPEAT-Statements/T04-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.6. REPEAT statement.
4 | *
5 | * Negative test: undeclared variable in UNTIL clause.
6 | *)
7 | module Main;
8 | var i : integer;
9 | begin
10 | repeat
11 | i := 0;
12 | until j;
13 |
14 | halt(0);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/07-FOR-Statements/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.7. FOR statement.
4 | *
5 | * Positive test: for statement has integer control variable.
6 | *)
7 | module Main;
8 | var s, i : integer;
9 | begin
10 | s := 0;
11 |
12 | for i := 1 to 10 do;
13 | s := i;
14 | end;
15 |
16 | if s = 10 then halt(1) else halt(0) end;
17 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/07-FOR-Statements/T04-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.7. FOR statement.
4 | *
5 | * Negative test: for statement has real control variable.
6 | *)
7 | module Main;
8 | var s, r : real;
9 | begin
10 | s := 1.0;
11 | for r := 1.0 to 3.5 by 0.5 do;
12 | s := r;
13 | end;
14 |
15 | halt(0);
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/07-FOR-Statements/T05-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.7. FOR statement.
4 | *
5 | * Negative test: for statement has 0 step.
6 | *)
7 | module Main;
8 | const N = 10;
9 | var s, i : integer;
10 | begin
11 | s := 1;
12 | for i := 1 to 10 by N-N do;
13 | s := i;
14 | end;
15 |
16 | halt(0);
17 | end Main.
18 |
--------------------------------------------------------------------------------
/testsuite/07-Statement/07-FOR-Statements/T06-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.7. FOR statement.
4 | *
5 | * Negative test: for statement has not constant step.
6 | *)
7 | module Main;
8 | var s, i, j : integer;
9 | begin
10 | j := 5;
11 | s := 1;
12 | for i := 1 to 10 by j do;
13 | s := i;
14 | end;
15 |
16 | halt(0);
17 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/07-FOR-Statements/T07-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.7. FOR statement.
4 | *
5 | * Positive test: for statement has step=2.
6 | *)
7 | module Main;
8 | var s, i : integer;
9 | begin
10 | s := 1;
11 |
12 | for i := 1 to 5 by 2 do;
13 | s := i;
14 | end;
15 |
16 | if s = 5 then halt(1) else halt(0) end;
17 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/07-FOR-Statements/T08-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.7. FOR statement.
4 | *
5 | * Positive test: for statement has step = -2.
6 | *)
7 | module Main;
8 | var s, i : integer;
9 | begin
10 | s := 1;
11 |
12 | for i := 5 to 1 by -2 do;
13 | s := i;
14 | end;
15 |
16 | if s = 1
17 | then halt(1) else halt(0) end;
18 | end Main.
19 |
--------------------------------------------------------------------------------
/testsuite/07-Statement/07-FOR-Statements/T11-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.7. FOR statement.
4 | *
5 | * Negative test: FOR statement uses undeclared variable i in
6 | * FOR i := 1
7 | *)
8 | module Main;
9 | var
10 | a : integer;
11 | begin
12 | for i := 1 to 5 do;
13 | a := i;
14 | end;
15 |
16 | halt(0)
17 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/07-FOR-Statements/T12-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.7. FOR statement.
4 | *
5 | * Negative test: FOR statement uses undeclared variable j in
6 | * FOR i := j
7 | *)
8 | module Main;
9 | var
10 | i, a : integer;
11 | begin
12 | for i := j to 5 do;
13 | a := 0
14 | end;
15 |
16 | halt(0)
17 | end Main.
18 |
--------------------------------------------------------------------------------
/testsuite/07-Statement/07-FOR-Statements/T13-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.7. FOR statement.
4 | *
5 | * Negative test: FOR statement uses undeclared variable j
6 | * in TO j
7 | *)
8 | module Main;
9 | var
10 | i, a : integer;
11 | begin
12 | for i := 0 to j do;
13 | a := 0
14 | end;
15 |
16 | halt(0)
17 | end Main.
18 |
19 |
--------------------------------------------------------------------------------
/testsuite/07-Statement/07-FOR-Statements/T14-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.7. FOR statement.
4 | *
5 | * Negative test: FOR statement uses undeclared variable j
6 | * in TO v[j]
7 | *)
8 | module Main;
9 | var
10 | i, a : integer;
11 | var v : array 2 of integer;
12 | begin
13 | for i := 0 to v[j] do;
14 | a := 0
15 | end;
16 |
17 | halt(0)
18 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/07-FOR-Statements/T15-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.7. FOR statement.
4 | *
5 | * Negative test: FOR statement uses undeclared variable j
6 | * in TO v[j]
7 | *)
8 | module Main;
9 | var
10 | i, a : integer;
11 | begin
12 | for i := 0 to 3 by 1+j do;
13 | a := 0
14 | end;
15 |
16 | halt(0)
17 | end Main.
18 |
--------------------------------------------------------------------------------
/testsuite/07-Statement/07-FOR-Statements/T16-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.7. FOR statement.
4 | *
5 | * Negative test: FOR statement uses undeclared variable v
6 | * in TO len(v)
7 | *)
8 | module Main;
9 | var
10 | i, a : integer;
11 | begin
12 | for i := 0 to len(v)-1 do;
13 | a := 0
14 | end;
15 |
16 | halt(0)
17 | end Main.
18 |
19 |
20 |
--------------------------------------------------------------------------------
/testsuite/07-Statement/07-FOR-Statements/T17-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.7. FOR statement.
4 | *
5 | * Negative test: conditions are missing
6 | *)
7 |
8 | module Main;
9 | var x: real;
10 | i: integer;
11 | begin
12 |
13 |
14 | for i := to do
15 | writeln("i=", i);
16 | end;
17 |
18 | for x := to do
19 | writeln("x=", x);
20 | end;
21 | readln;
22 | end Main.
23 |
--------------------------------------------------------------------------------
/testsuite/07-Statement/08-LOOP-Statements/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.8. loop statement.
4 | *
5 | * Positive test: loop statement with exit.
6 | *)
7 | module Main;
8 | var s : integer;
9 | begin
10 | s := 0;
11 |
12 | loop
13 | s := s + 1;
14 | if s = 3 then exit end;
15 | end;
16 |
17 | if s = 3
18 | then halt(1) else halt(0) end;
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/09-RETURN-Statements/T01-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.9. return statement.
4 | *
5 | * Negative test: function without return.
6 | *)
7 | module Main;
8 | procedure p(i : integer) : integer;
9 | begin
10 | i := i + 1
11 | end p;
12 | begin
13 | halt(0);
14 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/09-RETURN-Statements/T02-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.9. return statement.
4 | *
5 | * Negative test: function without return expression.
6 | *)
7 | module Main;
8 | procedure p(i : integer) : integer;
9 | begin
10 | i := i + 1;
11 | return;
12 | end p;
13 | begin
14 | halt(0);
15 | end Main.
16 |
--------------------------------------------------------------------------------
/testsuite/07-Statement/09-RETURN-Statements/T07-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.9. return statement.
4 | *
5 | * Negative test: function with not declared variable in RETURN .
6 | *)
7 | module Main;
8 | procedure p(i : integer) : integer;
9 | begin
10 | return j
11 | end p;
12 | begin
13 | halt(0);
14 | end Main.
15 |
--------------------------------------------------------------------------------
/testsuite/07-Statement/10-Block-Statements-and-Exception-Handling/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 7. Statement
3 | * 7.10. Block statement and exception handling.
4 | *
5 | * Positive test: await in a protected module.
6 | *)
7 | module {protected} Main;
8 |
9 | var a : boolean;
10 | begin
11 | a := true;
12 |
13 | await a;
14 |
15 | if a then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/07-Statement/12-Protocol/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 9. Concurrency-Activities-Protocols
3 | * 9.2. Protocol-Controlled-and-Activities
4 | * Positive test: Simple activity implements the protocol
5 | *)
6 |
7 | module Main;
8 |
9 | protocol P = (
10 | A, B, C,
11 | dialog = A | B | C
12 | );
13 |
14 | begin
15 | halt(1) (* success *)
16 | end Main.
17 |
18 |
--------------------------------------------------------------------------------
/testsuite/07-Statement/13-Activity/T01-t.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 | type {ref, public, protected} O = object
3 |
4 | activity a;
5 | begin
6 |
7 | end a;
8 |
9 | end O;
10 |
11 | var arr: array 10 of O;
12 | begin
13 | arr[1] := new O;
14 | new arr[1].a;
15 | halt(1);
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/08-Procedure-Declarations-and-Formal-Parameters/0A-VAR-parameter/T02-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 8. Procedure declaration and formal parameters
3 | *
4 | * Negative test: the function call uses wrong variable parameter type.
5 | *)
6 | module Main;
7 | procedure A(var i : integer);
8 | begin
9 | i := i + 1;
10 | end A;
11 |
12 | var r : real;
13 | begin
14 | A(r);
15 | halt(0);
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/08-Procedure-Declarations-and-Formal-Parameters/0B-Function/T01-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 8. Procedure declaration and formal parameters
3 | *
4 | * Negative test: the procedure A has not return statement.
5 | *)
6 | module Main;
7 | procedure A : integer;
8 | begin
9 | end A;
10 | begin
11 | A;
12 | halt(0);
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/08-Procedure-Declarations-and-Formal-Parameters/0B-Function/T02-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 8. Procedure declaration and formal parameters
3 | *
4 | * Negative test: the procedure A does not return any result.
5 | *)
6 | module Main;
7 | procedure A : integer;
8 | begin
9 | return;
10 | end A;
11 | begin
12 | A;
13 | halt(0);
14 | end Main.
--------------------------------------------------------------------------------
/testsuite/08-Procedure-Declarations-and-Formal-Parameters/0B-Function/T03-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 8. Procedure declaration and formal parameters
3 | *
4 | * Negative test: the function does not return correct result.
5 | *)
6 | module Main;
7 | procedure A : integer;
8 | begin
9 | return 'A';
10 | end A;
11 | begin
12 | A;
13 | halt(0);
14 | end Main.
--------------------------------------------------------------------------------
/testsuite/08-Procedure-Declarations-and-Formal-Parameters/0B-Function/T04-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 8. Procedure declaration and formal parameters
3 | *
4 | * Negative test: the procedure A returns not initialized variable.
5 | *)
6 | module Main;
7 | procedure A : integer;
8 | var k : integer;
9 | begin
10 | return k;
11 | end A;
12 | begin
13 | A;
14 | halt(0);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/08-Procedure-Declarations-and-Formal-Parameters/0B-Function/T05-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 8. Procedure declaration and formal parameters
3 | *
4 | * Negative test: the procedure A uses not initilezed variable in return construct.
5 | *)
6 | module Main;
7 | procedure A : integer;
8 | var k : integer;
9 | begin
10 | return k + 1;
11 | end A;
12 | begin
13 | A;
14 | halt(0);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/08-Procedure-Declarations-and-Formal-Parameters/0B-Function/T06-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 8. Procedure declaration and formal parameters
3 | *
4 | * Negative test: the procedure A uses not declared variable in return construct.
5 | *)
6 | module Main;
7 | procedure A : integer;
8 | begin
9 | return k;
10 | end A;
11 | begin
12 | A;
13 | halt(0);
14 | end Main.
--------------------------------------------------------------------------------
/testsuite/08-Procedure-Declarations-and-Formal-Parameters/0B-Function/T07-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 8. Procedure declaration and formal parameters
3 | *
4 | * Negative test: the function call returns incompitible type.
5 | *)
6 | module Main;
7 | procedure A(i : integer) : integer;
8 | begin
9 | return i + 1;
10 | end A;
11 |
12 | var r : real;
13 | begin
14 | r := A(1);
15 | halt(0);
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/08-Procedure-Declarations-and-Formal-Parameters/0B-Function/t10-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 8. Procedure declaration and formal parameters
3 | *
4 | * Positive test: return type with width
5 | *)
6 |
7 | module Main;
8 |
9 | procedure Test : integer{64};
10 | begin
11 | return 1000;
12 | end Test;
13 |
14 | begin
15 | writeln(Test);
16 | halt(1)
17 | end Main.
--------------------------------------------------------------------------------
/testsuite/08-Procedure-Declarations-and-Formal-Parameters/T01-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 8. Procedure declaration and formal parameters
3 | *
4 | * Negative test: the procedure end has not simple procedure name.
5 | *)
6 | module Main;
7 | procedure A;
8 | begin
9 | end;
10 | begin
11 | A;
12 | halt(0);
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/08-Procedure-Declarations-and-Formal-Parameters/T02-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 8. Procedure declaration and formal parameters
3 | *
4 | * Negative test: the procedure call used wrong actual parameter type.
5 | *)
6 | module Main;
7 | procedure A(i : integer);
8 | begin
9 | end A;
10 | begin
11 | A(3.0);
12 | halt(0);
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/08-Procedure-Declarations-and-Formal-Parameters/T03-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 8. Procedure declaration and formal parameters
3 | *
4 | * Negative test: the procedure call uses wrong parameters count.
5 | * The count is less then 1.
6 | *)
7 | module Main;
8 | procedure A(i : integer);
9 | begin
10 | end A;
11 | begin
12 | A();
13 | halt(0);
14 | end Main.
--------------------------------------------------------------------------------
/testsuite/08-Procedure-Declarations-and-Formal-Parameters/T04-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 8. Procedure declaration and formal parameters
3 | *
4 | * Negative test: the function call uses wrong parameters count.
5 | * The count is more then 1.
6 | *)
7 | module Main;
8 | procedure A(i : integer) : integer;
9 | begin
10 | end A;
11 | begin
12 | A(1, 2);
13 | halt(0);
14 | end Main.
--------------------------------------------------------------------------------
/testsuite/08-Procedure-Declarations-and-Formal-Parameters/T05-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 8. Procedure declaration and formal parameters
3 | *
4 | * Negative test: double procedure declaration.
5 | *)
6 | module Main;
7 | procedure A();
8 | begin end A;
9 |
10 | procedure A();
11 | begin end A;
12 | begin
13 | halt(0);
14 | end Main.
--------------------------------------------------------------------------------
/testsuite/08-Procedure-Declarations-and-Formal-Parameters/T07-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 8. Procedure declaration and formal parameters
3 | *
4 | * Negative test: the procedure and variable have the same name.
5 | *)
6 | module Main;
7 | var A : integer;
8 |
9 | procedure A();
10 | begin end A;
11 | begin
12 | halt(0);
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/08-Procedure-Declarations-and-Formal-Parameters/T08-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 8. Procedure declaration and formal parameters
3 | *
4 | * Negative test: the procedure declaration and type declaration have the same name.
5 | *)
6 | module Main;
7 | type A = (one, two);
8 |
9 | procedure A();
10 | begin end A;
11 | begin
12 | halt(0);
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/08-Procedure-Declarations-and-Formal-Parameters/T09-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 8. Procedure declaration and formal parameters
3 | *
4 | * Negative test: the variable name is used as procedure name.
5 | *)
6 | module Main;
7 | var A : integer;
8 | begin
9 | A();
10 | halt(0);
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/08-Procedure-Declarations-and-Formal-Parameters/T21-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 8. Procedure declaration and formal parameters
3 | *
4 | * Negative test: undeclared parameter type.
5 | *)
6 | module Main;
7 | procedure P(p : A);
8 | begin end P;
9 | begin
10 | end Main.
11 |
12 |
--------------------------------------------------------------------------------
/testsuite/08-Procedure-Declarations-and-Formal-Parameters/T22-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 8. Procedure declaration and formal parameters
3 | *
4 | * Negative test: undeclared parameter type in procedure of nested object.
5 | *)
6 | module Main;
7 |
8 | object A;
9 | procedure f(p : a);
10 | begin
11 | end f;
12 | end A;
13 |
14 | begin
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/08-Procedure-Declarations-and-Formal-Parameters/T24-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 8. Procedure declaration and formal parameters
3 | *
4 | * Negative test: the procedure end has not simple procedure name.
5 | *)
6 | module Main;
7 | procedure A;
8 | begin
9 | end B;
10 | begin
11 | A;
12 | halt(0);
13 | end Main.
14 |
--------------------------------------------------------------------------------
/testsuite/09-Activities-Behavior-And-Interaction/1-The-Granularity-of-Concurrency/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 9. Concurrency-Activities-Protocols
3 | * 9.1. The-Granularity-of-Concurrency
4 | *
5 | * Positive test: Simple activity declaration
6 | *)
7 |
8 | module {protected} Main;
9 |
10 | activity A;
11 | begin
12 | end A;
13 |
14 | begin
15 | halt(1) (* success *)
16 | end Main.
17 |
--------------------------------------------------------------------------------
/testsuite/09-Activities-Behavior-And-Interaction/1-The-Granularity-of-Concurrency/t09-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 9. Concurrency-Activities-Protocols
3 | * 9.1. The-Granularity-of-Concurrency
4 | *
5 | * Positive test: Activity execution without a link
6 | *)
7 | module {protected} Main;
8 | activity A;
9 | begin
10 |
11 | end A;
12 | begin
13 | new A;
14 | halt(1) (* success *)
15 | end Main.
16 |
--------------------------------------------------------------------------------
/testsuite/09-Activities-Behavior-And-Interaction/2-Protocol-Controlled-and-Activities/t11-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 9. Concurrency-Activities-Protocols
3 | * 9.2. Protocol-Controlled-and-Activities
4 | * Positive test: Simple protocol declaration
5 | *)
6 |
7 | module Main;
8 |
9 | protocol P = (
10 | A, B, C, dialog = ( A | B | C )
11 | );
12 |
13 | begin
14 | halt(1) (* success *)
15 | end Main.
16 |
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/01-MODULE/A-ModuleName/T01-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11.Program Units.
3 | * 11.1. module
4 | * ModuleName
5 | *
6 | * Negative test: the module B.C is nested into other module run.
7 | *)
8 | module Main;
9 | module B.C;
10 | end C;
11 | begin
12 | halt(0);
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/01-MODULE/A-ModuleName/T02-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11.Program Units.
3 | * 11.1. module
4 | * ModuleName
5 | *
6 | * Negative test: double declaration of module A.B.C.
7 | *)
8 | module A.B.C;
9 | end C.
10 |
11 | module A.B.C;
12 | end C.
13 |
14 | module Main;
15 | begin
16 | halt(0);
17 | end Main.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/01-MODULE/A-ModuleName/T03-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11.Program Units.
3 | * 11.1. module
4 | * ModuleName
5 | *
6 | * Negative test: wrong module name A.B.C.
7 | * The name is used for definition A.B.C already.
8 | *)
9 | definition A.B.C;
10 | end C.
11 |
12 | module A.B.C;
13 | end C.
14 |
15 | module Main;
16 | begin
17 | halt(0);
18 | end Main.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/01-MODULE/A-ModuleName/T05-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11.Program Units.
3 | * 11.1. module
4 | * ModuleName
5 | *
6 | * Negative tests:
7 | * a) wrong simple name F at module B.F end.
8 | * b) the simple name C is absent at module A.B.C end.
9 | *)
10 | module B.E;
11 | end F.
12 |
13 | module A.B.C;
14 | end.
15 |
16 | module Main;
17 | begin
18 | halt(0);
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/01-MODULE/C-IMPORTS/T03-c.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11.Program Units.
3 | * 11.1. module
4 | * imports clause
5 | *
6 | * Positive test: the module A uses module B in imports clause.
7 | * The module B is declared before it is used.
8 | *)
9 | module B;
10 | end B.
11 |
12 | module A;
13 | import B;
14 | end A.
15 |
16 | module Main;
17 | begin
18 | halt(1);
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/01-MODULE/C-IMPORTS/T04-c.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11.Program Units.
3 | * 11.1. module
4 | * imports clause
5 | *
6 | * Positive test: the module A uses module B in import clause.
7 | * The module B is declared before it is used.
8 | *)
9 | module A;
10 | import B;
11 | end A.
12 |
13 | module B;
14 | end B.
15 |
16 | module Main;
17 | begin
18 | halt(1);
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/01-MODULE/C-IMPORTS/T10-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11.Program Units.
3 | * 11.1. module
4 | * imports clause
5 | *
6 | * Negative test: it is impossible to import enumeration.
7 | *)
8 | module A;
9 | type { public }
10 | B = ( one, two );
11 | end A.
12 |
13 | module Main;
14 | import A.B;
15 | begin
16 | halt(0);
17 | end Main.
18 |
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/01-MODULE/C-IMPORTS/T11-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11.Program Units.
3 | * 11.1. module
4 | * imports clause
5 | *
6 | * Negative test: it is impossible to import enumeration.
7 | *)
8 | module Main;
9 | import A.B;
10 | begin
11 | halt(0);
12 | end Main.
13 |
14 | module A;
15 | type { public }
16 | B = ( one, two );
17 | end A.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/01-MODULE/D-IMPORT-AS/T05-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11.Program Units.
3 | * 11.1. module
4 | * imports x as clause
5 | *
6 | * Positive test: the short name C in as clause and imported name are same.
7 | *)
8 | module Main;
9 | import C as C;
10 | begin
11 | halt(1);
12 | end Main.
13 |
14 | object C;
15 | end C.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/01-MODULE/D-IMPORT-AS/T06-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11.Program Units.
3 | * 11.1. module
4 | * imports x as clause
5 | *
6 | * Negative test: the short name in as clause and imported object name are same.
7 | *)
8 | module Main;
9 | import A.B as C, C;
10 | begin
11 | halt(0);
12 | end Main.
13 |
14 | object C;
15 | end C.
16 |
17 | object A.B;
18 | end B.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/01-MODULE/D-IMPORT-AS/T07-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11.Program Units.
3 | * 11.1. module
4 | * imports x as clause
5 | *
6 | * Negative test: the imported name is absent.
7 | *)
8 | module Main;
9 | import
10 | C, A.B as C;
11 | begin
12 | halt(0);
13 | end Main.
14 |
15 | object C;
16 | end C.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/01-MODULE/D-IMPORT-AS/T08-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11.Program Units.
3 | * 11.1. module
4 | * imports x as clause
5 | *
6 | * Negative test: the short name in as clause and imported object name are same.
7 | *)
8 | module Main;
9 | import C, A.B as C;
10 | begin
11 | halt(0);
12 | end Main.
13 |
14 | object C;
15 | end C.
16 |
17 | object A.B;
18 | end B.
19 |
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/01-MODULE/F-Init/t01-t.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 | const N = 100;
3 | type Rec = record
4 | arr: array N of integer;
5 | end Rec;
6 |
7 | var rar: array N of Rec;
8 |
9 | begin
10 | rar[3].arr[1] := 5;
11 | writeln(rar[3].arr[1]);
12 | halt(1)
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/02-OBJECT/A-ObjectName/T02-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11. Program Units.
3 | * 11.2. object
4 | * Object name
5 | *
6 | * Negative test: double object declaration.
7 | *)
8 | object A.B.C;
9 | end C.
10 |
11 | object A.B.C;
12 | end C.
13 |
14 | module Main;
15 | begin
16 | halt(0);
17 | end Main.
18 |
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/02-OBJECT/A-ObjectName/T03-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11. Program Units.
3 | * 11.2. object
4 | * Object name
5 | *
6 | * Negative test: wrong object name A.B.C.
7 | * The name A.B.C is used for module already.
8 | *)
9 | module A.B.C;
10 | end C.
11 |
12 | object A.B.C;
13 | end C.
14 |
15 | module Main;
16 | begin
17 | halt(0);
18 | end Main.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/02-OBJECT/A-ObjectName/T04-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11. Program Units.
3 | * 11.2. object
4 | * Object name
5 | *
6 | * Negative test: wrong object name.
7 | * The element A of qualified name A.B.C used for module A already.
8 | *)
9 | module A;
10 | end A.
11 |
12 | object A.B.C;
13 | end C.
14 |
15 | module Main;
16 | begin
17 | halt(0);
18 | end Main.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/02-OBJECT/A-ObjectName/T05-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11. Program Units.
3 | * 11.2. object
4 | * Object name
5 | *
6 | * Negative tests:
7 | * a) wrong simple name F at object B.E end.
8 | * a) the simple name C is absent at object A.B.C end.
9 | *)
10 | object B.E;
11 | end F.
12 |
13 | object A.B.C;
14 | end.
15 |
16 | module Main;
17 | begin
18 | halt(0);
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/02-OBJECT/C-Parameters/T05-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11. Program Units.
3 | * 11.2. object
4 | * Parameters of the object.
5 | *
6 | * Negative test: object parameter can not be passed by reference.
7 | *)
8 | object {public, ref} A.B(var i : integer);
9 | begin
10 | end B.
11 |
12 | module Main;
13 | begin
14 | halt(0);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/03-DEFINITION/A-DefinitionName/T01-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11. Program Units.
3 | * 11.3. definition
4 | * Definition name
5 | *
6 | * Negative test: the nested definition has qualified name B.C.
7 | *)
8 | module {public} A;
9 | definition {public} B.C;
10 | end C;
11 | end A.
12 |
13 | module Main;
14 | begin
15 | halt(0);
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/03-DEFINITION/A-DefinitionName/T02-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11. Program Units.
3 | * 11.3. definition
4 | * Definition name
5 | *
6 | * Negative test: double declaration of definition A.B.C.
7 | *)
8 | definition {public} A.B.C;
9 | end C.
10 |
11 | definition {public} A.B.C;
12 | end C.
13 |
14 | module Main;
15 | begin
16 | halt(0);
17 | end Main.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/03-DEFINITION/A-DefinitionName/T03-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11. Program Units.
3 | * 11.3. definition
4 | * Definition name
5 | *
6 | * Negative test: wrong definition name A.B.C.
7 | * The name is used by module A.B.C already.
8 | *)
9 | module {public} A.B.C;
10 | end C.
11 |
12 | definition {public} A.B.C;
13 | end C.
14 |
15 | module Main;
16 | begin
17 | halt(0);
18 | end Main.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/03-DEFINITION/B-REFINES/T05-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11. Program Units.
3 | * 11.3. definition
4 | * refines clause
5 | *
6 | * Negative test: the name B.C is used in refines clause,
7 | * but is not declared anywhere.
8 | *)
9 | definition {public} A refines B.C;
10 | end A.
11 |
12 | module Main;
13 | begin
14 | halt(0);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/03-DEFINITION/B-REFINES/T12-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11. Program Units.
3 | * 11.3. definition
4 | * refines clause
5 | *
6 | * Negative test: definition refines itself.
7 | *)
8 | definition {public} A refines A;
9 | end A.
10 |
11 | module Main;
12 | begin
13 | halt(0);
14 | end Main.
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/03-DEFINITION/B-REFINES/T13-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11. Program Units.
3 | * 11.3. definition
4 | * refines clause
5 | *
6 | * Negative test: circle in definition refines.
7 | *)
8 | definition {public} A refines B;
9 | end A.
10 |
11 | definition {public} B refines A;
12 | end B.
13 |
14 | module Main;
15 | begin
16 | halt(0);
17 | end Main.
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/03-DEFINITION/B-REFINES/T19-t.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 | definition {public} D1;
3 | var x: real;
4 | end D1;
5 |
6 | definition D2 refines D1;
7 | var y: real;
8 | end D2;
9 |
10 | definition D3 refines Main.D1;
11 | var y: real;
12 | end D3;
13 |
14 | begin
15 | halt(1)
16 | end Main.
17 |
18 | definition D4 refines Main.D1;
19 | var y: real;
20 | end D4.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/03-DEFINITION/T16-c.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11.Program Units.
3 | * 11.3. Definition
4 | *
5 | * Positive test: the definition type A is used in the definition declaration.
6 | *)
7 | definition {public} A;
8 | procedure P : object{A};
9 | end A.
10 |
11 | module Main;
12 | begin
13 | halt(1);
14 | end Main.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/03-DEFINITION/T17-c.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11.Program Units.
3 | * 11.3. Definition
4 | *
5 | * Positive test: the definition type A is used in the definition declaration.
6 | *)
7 | definition {public} A;
8 | procedure P : object{A};
9 | end A.
10 |
11 | module Main;
12 | begin
13 | halt(1);
14 | end Main.
15 |
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/03-DEFINITION/T18-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11.Program Units.
3 | * 11.3. Definition
4 | *
5 | * Negative test: the definition type A is used as procedure result.
6 | *)
7 | definition {public} A;
8 | procedure P : A;
9 | end A.
10 |
11 | module Main;
12 | begin
13 | halt(1);
14 | end Main.
15 |
16 |
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/04-IMPLEMENTATION/T01-c.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11.Program Units.
3 | * 11.4. implementation
4 | *
5 | * Positive test: the definition A is declared after its default implementation A.
6 | *)
7 | implementation A;
8 | end A.
9 |
10 | definition A;
11 | end A.
12 |
13 | module Main;
14 | begin
15 | halt(1);
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/10-Program-Units/04-IMPLEMENTATION/T02-c.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 11.Program Units.
3 | * 11.4. implementation
4 | *
5 | * Positive test: the definition A is declared before its default implementation A.
6 | *)
7 | definition A;
8 | end A.
9 |
10 | implementation A;
11 | end A.
12 |
13 | module Main;
14 | begin
15 | halt(1);
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/11-Reflection/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 12. Reflection.
3 | * The sample from Zonnon Report.
4 |
5 | THIS PART IS REMOVED
6 | *)
7 |
8 |
9 | module Main;
10 | begin
11 | halt(1);
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The abs procedure.
4 | *
5 | * Positive test: abs of negative and positive integers.
6 | *)
7 | module Main;
8 | begin
9 | if (abs(1) = 1) & (abs(0) = 0) & (abs(-1) = 1)
10 | then halt(1) else halt(0) end;
11 | end Main.
12 |
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T02-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The cap procedure.
4 | *
5 | * Positive test: cap of 'a' and '_'.
6 | *)
7 | module Main;
8 | begin
9 | if (cap('a') = 'A') & (cap('_') = '_')
10 | then halt(1) else halt(0) end;
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T03-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The inc procedure.
4 | *
5 | * Positive test: the predefined procedure inc call with one and two parameters.
6 | *)
7 | module Main;
8 | var i, j : integer;
9 | begin
10 | i := 5;
11 | j := 5;
12 |
13 | inc(i);
14 | inc(j, 2);
15 |
16 | if (i = 6) & (j = 7)
17 | then halt(1) else halt(0) end;
18 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T04-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The dec procedure.
4 | *
5 | * Positive test: the predefined procedure dec call with one and two parameters.
6 | *)
7 | module Main;
8 | var i, j : integer;
9 | begin
10 | i := 5;
11 | j := 5;
12 |
13 | dec(i);
14 | dec(j, 2);
15 |
16 | if (i = 4) & (j = 3)
17 | then halt(1) else halt(0) end;
18 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T05-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The len procedure.
4 | *
5 | * Positive test: 1-dimensional static array length
6 | *)
7 | module Main;
8 | var a : array 5 of integer;
9 | begin
10 | if len(a) = 5
11 | then halt(1) else halt(0) end;
12 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T06-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The len procedure.
4 | *
5 | * Positive test: 1-dimensional dynamic array length
6 | *)
7 | module Main;
8 | type A = array * of integer;
9 | var a : A;
10 | begin
11 | a := new A(5);
12 |
13 | if len(a) = 5
14 | then halt(1) else halt(0) end;
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T07-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The len procedure.
4 | *
5 | * Positive test: 2-dimensional dynamic array length
6 | *)
7 | module Main;
8 | type A = array *,* of integer;
9 | var a : A;
10 | begin
11 | a := new A(5,4);
12 |
13 | if (len(a, 0) = 5) & (len(a, 1) = 4)
14 | then halt(1) else halt(0) end;
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T08-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The len procedure.
4 | *
5 | * Positive test: 1-dimensional static array length
6 | *)
7 | module Main;
8 | var a : array 5, 4 of integer;
9 | begin
10 | if (len(a, 0) = 5) & (len(a, 1) = 4)
11 | then halt(1) else halt(0) end;
12 | end Main.
13 |
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T09-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The ODD procedure.
4 | *
5 | * Positive test: ODD for two integer numbers.
6 | *)
7 | module Main;
8 | begin
9 | if odd(5) & ~odd(4)
10 | then halt(1) else halt(0) end;
11 | end Main.
12 |
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T10-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The chr procedure.
4 | *
5 | * Positive test: get the order number for letter A and digit 1
6 | *)
7 | module Main;
8 | begin
9 | if (integer('A') = 65) & (integer('1') = 49)
10 | then halt(1) else halt(0) end;
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T11-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The assert procedure.
4 | *
5 | * Positive test: assert without report number.
6 | *)
7 | module Main;
8 | var i : integer;
9 | begin
10 | i := 2;
11 | assert(i < 1);
12 | halt(0);
13 | on exception do
14 | halt(1);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T12-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The assert procedure.
4 | *
5 | * Positive test: assert with report number.
6 | *)
7 | module Main;
8 | var i : integer;
9 | begin
10 | i := 2;
11 | assert(i < 1, 1);
12 | halt(0);
13 | end Main.
14 |
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T13-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The max(T) procedure.
4 | *
5 | * Positive test: max value for enumeration type.
6 | *)
7 | module Main;
8 | type E = ( one, two, three );
9 |
10 | var e : E;
11 | begin
12 | e := min(E);
13 |
14 | if e = E.one
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T14-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The max(T) procedure.
4 | *
5 | * Positive test: max value for enumeration type.
6 | *)
7 | module Main;
8 | type E = ( one, two, three );
9 |
10 | var e : E;
11 | begin
12 | e := max(E);
13 |
14 | if e = E.three
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T15-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The max(T) procedure.
4 | *
5 | * Positive test: max value for char type.
6 | *)
7 | module Main;
8 | var i : integer;
9 | begin
10 | i := max( char{8} );
11 |
12 | if i = 255
13 | then halt(1) else halt(0) end;
14 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T16-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The max(T) procedure.
4 | *
5 | * Positive test: max value for set type.
6 | *)
7 | module Main;
8 | var i : integer;
9 | begin
10 | i := max( set{8} );
11 |
12 | if i = 7
13 | then halt(1) else halt(0) end;
14 | end Main.
15 |
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T17-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The max(T) procedure.
4 | *
5 | * Positive test: max value for integer type.
6 | *)
7 | module Main;
8 | var i : integer;
9 | begin
10 | i := max( integer{8} );
11 |
12 | if i = 127
13 | then halt(1) else halt(0) end;
14 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T18-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The min(T) procedure.
4 | *
5 | * Positive test: min value for integer type.
6 | *)
7 | module Main;
8 | var i : integer;
9 | begin
10 | i := min( integer{8} );
11 |
12 | if i = -128
13 | then halt(1) else halt(0) end;
14 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T19-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The min(T) procedure.
4 | *
5 | * Positive test: min value for enumeration type.
6 | *)
7 | module Main;
8 | type E = ( one, two, three );
9 |
10 | var e : E;
11 | begin
12 | e := min(E);
13 |
14 | if e = E.one
15 | then halt(1) else halt(0) end;
16 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T20-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The min(T) procedure.
4 | *
5 | * Positive test: min value for char type.
6 | *)
7 | module Main;
8 | var i : integer;
9 | begin
10 | i := min( char{8} );
11 |
12 | if i = 0
13 | then halt(1) else halt(0) end;
14 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T21-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The min(T) procedure.
4 | *
5 | * Positive test: min value for set type.
6 | *)
7 | module Main;
8 | var i : integer;
9 | begin
10 | i := min( set{8} );
11 |
12 | if i = 0
13 | then halt(1) else halt(0) end;
14 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T22-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The pred (x) procedure.
4 | *
5 | * Positive test: pred of integer type value.
6 | *)
7 | module Main;
8 | var i, j : integer;
9 | begin
10 | i := 5;
11 | j := pred(i);
12 |
13 | if j = 4
14 | then halt(1) else halt(0) end;
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T23-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The pred (x) procedure.
4 | *
5 | * Positive test: pred of enumeration type value.
6 | *)
7 | module Main;
8 | type E = ( zero, one, two );
9 |
10 | var e1, e2 : E;
11 | begin
12 | e1 := E.one;
13 | e2 := pred(e1);
14 |
15 | if e2 = E.zero
16 | then halt(1) else halt(0) end;
17 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T24-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The pred (x) procedure.
4 | *
5 | * Positive test: pred of enumeration type value.
6 | *)
7 | module Main;
8 | type E = ( zero, one, two );
9 |
10 | var e1, e2 : E;
11 | begin
12 | do
13 | e1 := E.zero;
14 | e2 := pred(e1);
15 | halt(0);
16 | on exception do
17 | halt(1);
18 | end
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T25-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The pred (x) procedure.
4 | *
5 | * Positive test: pred of char type value.
6 | *)
7 | module Main;
8 | var ch1, ch2 : char;
9 | begin
10 | ch1 := 'b';
11 | ch2 := pred(ch1);
12 |
13 | if ch2 = 'a'
14 | then halt(1) else halt(0) end;
15 | end Main.
16 |
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T27-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The succ(x) procedure.
4 | *
5 | * Positive test: succ procedure for integer type value.
6 | *)
7 | module Main;
8 | var i1, i2 : integer;
9 | begin
10 | i1 := 21;
11 | i2 := succ(i1);
12 |
13 | if i2 = 22
14 | then halt(1) else halt(0) end;
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T28-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The succ(x) procedure.
4 | *
5 | * Positive test: succ procedure for enumeration type value.
6 | *)
7 | module Main;
8 | type E = ( zero, one, two );
9 |
10 | var e1, e2 : E;
11 | begin
12 | e1 := E.zero;
13 | e2 := succ(e1);
14 |
15 | if e2 = E.one
16 | then halt(1) else halt(0) end;
17 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T29-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The succ(x) procedure.
4 | *
5 | * Positive test: succ procedure for enumeration type value.
6 | *)
7 | module Main;
8 | var ch1, ch2 : char;
9 | begin
10 | ch1 := 'a';
11 | ch2 := succ(ch1);
12 |
13 | if ch2 = 'b'
14 | then halt(1) else halt(0) end;
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T30-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The low procedure.
4 | *
5 | * Positive test: low of 'a' and '_'.
6 | *)
7 | module Main;
8 | begin
9 | if (low('A') = 'a') & (low('_') = '_')
10 | then halt(1) else halt(0) end;
11 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T32-t.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 |
3 | procedure P(var s : string);
4 | var
5 | a : array 5 of char;
6 | t : string;
7 | begin
8 | a[0] := "1";
9 | a[1] := "2";
10 |
11 | copy(a, s);
12 | end P;
13 |
14 | var
15 | s1, s : string;
16 | begin
17 | P(s);
18 |
19 | if s = "12"
20 | then halt(1) else halt(0) end;
21 | end Main.
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T33-t.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 | var
3 | s1, s : string;
4 | a : array 8 of char;
5 | begin
6 | a[0] := "2";
7 | a[1] := "5";
8 |
9 | copy(a, s);
10 | writeln(s);
11 | if s = "25"
12 | then halt(1) else halt(0) end;
13 | end Main.
14 |
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T34-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The len procedure.
4 | *
5 | * Positive test: 1-dimensional static array length
6 | *)
7 | module Main;
8 | var a : array 5 of char;
9 | begin
10 | if len(a) = 5
11 | then halt(1) else halt(0) end;
12 | end Main.
13 |
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T35-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The len procedure.
4 | *
5 | * Positive test: 1-dimensional static array length
6 | *)
7 | module Main;
8 | var a : array 5, 4 of char;
9 | begin
10 | if (len(a, 0) = 5) & (len(a, 1) = 4)
11 | then halt(1) else halt(0) end;
12 | end Main.
13 |
14 |
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T36-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The len procedure.
4 | *
5 | * Positive test: 1-dimensional dynamic array length
6 | *)
7 | module Main;
8 | type CharArray = array * of char;
9 |
10 | var a : CharArray;
11 | begin
12 | a := new CharArray(5);
13 | if len(a) = 5
14 | then halt(1) else halt(0) end;
15 | end Main.
16 |
--------------------------------------------------------------------------------
/testsuite/13-Predefined-Procedures/T37-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 09.Predefined procedures.
3 | * The len procedure.
4 | *
5 | * Positive test: 1-dimensional dynamic array length
6 | *)
7 | module Main;
8 | procedure Len(a : array of char) : integer;
9 | begin return len(a) end Len;
10 |
11 | var b : array 5 of char;
12 | begin
13 | if Len(b) = 5
14 | then halt(1) else halt(0) end;
15 | end Main.
16 |
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/01-Between-Zonnon-Dlls/Library/bin/debug/Library.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/14-Interoperability/01-Between-Zonnon-Dlls/Library/bin/debug/Library.dll
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/01-Between-Zonnon-Dlls/Library/bin/debug/Library.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/14-Interoperability/01-Between-Zonnon-Dlls/Library/bin/debug/Library.pdb
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/01-Between-Zonnon-Dlls/Use/bin/debug/Library.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/14-Interoperability/01-Between-Zonnon-Dlls/Use/bin/debug/Library.dll
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/01-Between-Zonnon-Dlls/Use/bin/debug/Library.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/14-Interoperability/01-Between-Zonnon-Dlls/Use/bin/debug/Library.pdb
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/01-Between-Zonnon-Dlls/Use/bin/debug/Use.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/14-Interoperability/01-Between-Zonnon-Dlls/Use/bin/debug/Use.exe
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/01-Between-Zonnon-Dlls/Use/bin/debug/Use.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/14-Interoperability/01-Between-Zonnon-Dlls/Use/bin/debug/Use.pdb
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/01-Between-Zonnon-Dlls/Use/bin/debug/UserLibrary.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/14-Interoperability/01-Between-Zonnon-Dlls/Use/bin/debug/UserLibrary.dll
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/01-Between-Zonnon-Dlls/Use/bin/debug/UserLibrary.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/14-Interoperability/01-Between-Zonnon-Dlls/Use/bin/debug/UserLibrary.pdb
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/01-Between-Zonnon-Dlls/test.ts:
--------------------------------------------------------------------------------
1 | setout Library.dll
2 | setentry no
3 | compile Library\data.znn Library\queues.znn
4 | setref Library.dll
5 | setentry Main
6 | setout testBuffers.exe
7 | compile Use\testBuffers.znn
8 | testrun testbuffers.exe
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/02-Definition-From-Dll/Library.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/14-Interoperability/02-Definition-From-Dll/Library.suo
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/02-Definition-From-Dll/Use/bin/debug/Library.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/14-Interoperability/02-Definition-From-Dll/Use/bin/debug/Library.dll
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/02-Definition-From-Dll/Use/bin/debug/Library.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/14-Interoperability/02-Definition-From-Dll/Use/bin/debug/Library.pdb
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/02-Definition-From-Dll/Use/bin/debug/Use.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/14-Interoperability/02-Definition-From-Dll/Use/bin/debug/Use.exe
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/02-Definition-From-Dll/Use/bin/debug/Use.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/14-Interoperability/02-Definition-From-Dll/Use/bin/debug/Use.pdb
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/02-Definition-From-Dll/Use/bin/debug/UserLibrary.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/14-Interoperability/02-Definition-From-Dll/Use/bin/debug/UserLibrary.dll
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/02-Definition-From-Dll/Use/bin/debug/UserLibrary.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/14-Interoperability/02-Definition-From-Dll/Use/bin/debug/UserLibrary.pdb
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/02-Definition-From-Dll/UserLibrary/bin/debug/Library.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/14-Interoperability/02-Definition-From-Dll/UserLibrary/bin/debug/Library.dll
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/02-Definition-From-Dll/UserLibrary/bin/debug/Library.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/14-Interoperability/02-Definition-From-Dll/UserLibrary/bin/debug/Library.pdb
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/02-Definition-From-Dll/UserLibrary/bin/debug/UserLibrary.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/14-Interoperability/02-Definition-From-Dll/UserLibrary/bin/debug/UserLibrary.dll
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/02-Definition-From-Dll/UserLibrary/bin/debug/UserLibrary.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/14-Interoperability/02-Definition-From-Dll/UserLibrary/bin/debug/UserLibrary.pdb
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/02-Definition-From-Dll/test.ts:
--------------------------------------------------------------------------------
1 | setout Library2.dll
2 | setentry no
3 | compile Library\Library.znn
4 | setref Library2.dll
5 | setout UserLibrary2.dll
6 | compile UserLibrary\UserLibrary.znn
7 | setref Library2.dll UserLibrary2.dll
8 | setentry Main
9 | setout Use.exe
10 | compile Use\Use.znn
11 | testrun Use.exe
12 |
13 |
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/03-Use-Of-Externals/T01-T.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 | import System.Drawing.Rectangle as Rectangle;
3 |
4 | var {public}
5 | s: Rectangle;
6 | begin
7 | s := new Rectangle(10,10,100,100);
8 | halt(1);
9 | end Main.
--------------------------------------------------------------------------------
/testsuite/14-Interoperability/03-Use-Of-Externals/test.ts:
--------------------------------------------------------------------------------
1 | setref System.Drawing.dll
2 | setentry Main
3 | setout System.Drawing.t01-t.exe
4 | compile t01-t.znn
5 | testrun System.Drawing.t01-t.exe
--------------------------------------------------------------------------------
/testsuite/15-Examples/01-Book/Chapter3/example_3_6.in:
--------------------------------------------------------------------------------
1 | 7 2 6 5 1 3 8 4
2 | 4 3 2 6 8 1 7 5
3 | 3 2 4 1 8 5 7 6
4 | 3 8 4 2 5 6 7 1
5 | 8 3 4 5 6 1 7 2
6 | 8 7 5 2 4 3 1 6
7 | 2 4 6 3 1 7 5 8
8 | 6 1 4 2 7 5 3 8
9 | 4 6 2 5 8 1 3 7
10 | 8 5 3 1 6 7 4 2
11 | 6 8 1 2 3 4 7 5
12 | 3 2 4 7 6 8 5 1
13 | 6 3 1 4 5 7 2 8
14 | 2 1 3 8 7 4 6 5
15 | 3 5 7 2 4 1 8 6
16 | 7 2 8 4 5 6 3 1
17 |
--------------------------------------------------------------------------------
/testsuite/15-Examples/01-Book/Chapter3/example_3_7.in:
--------------------------------------------------------------------------------
1 | 10 18
2 | 11 20
3 | 12 17
4 | 13 19
5 | 14 25
6 | 15 21
7 | 16 27
8 | 17 23
9 | 18 25
10 | 19 24
11 | 10 160
12 |
--------------------------------------------------------------------------------
/testsuite/15-Examples/01-Book/Chapter4/example_4_4.in:
--------------------------------------------------------------------------------
1 | 21
2 | 8
3 | 9
4 | 11
5 | 15
6 | 19
7 | 20
8 | 21
9 | 7
10 | 3
11 | 2
12 | 1
13 | 5
14 | 6
15 | 4
16 | 13
17 | 14
18 | 10
19 | 12
20 | 17
21 | 16
22 | 18
23 |
--------------------------------------------------------------------------------
/testsuite/15-Examples/01-Book/dirinfo.info:
--------------------------------------------------------------------------------
1 | Examples in Zonnon for Algorithms & Data Structures book
2 |
--------------------------------------------------------------------------------
/testsuite/15-Examples/02-Concurrency/dirinfo.info:
--------------------------------------------------------------------------------
1 | Examples on using concurrency in Zonnon (activities, protocols, barriers)
2 |
--------------------------------------------------------------------------------
/testsuite/15-Examples/03-Lectures/Sample07_Zonnon/vbz.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/15-Examples/03-Lectures/Sample07_Zonnon/vbz.txt
--------------------------------------------------------------------------------
/testsuite/15-Examples/03-Lectures/dirinfo.info:
--------------------------------------------------------------------------------
1 | Zonnon Samples for Prof. Gutknecht lectures
--------------------------------------------------------------------------------
/testsuite/15-Examples/04-ZonnonIntro/character.znn:
--------------------------------------------------------------------------------
1 | (* ********* Zonnon online collection ***********
2 | * Character constant
3 | *
4 | * This example is a part Introdunction into Zonnon for beginners
5 | * www.zonnon.ethz.ch/usergroup
6 | * (c) ETH Zurich
7 | *)
8 |
9 | module Example_3_1;
10 |
11 | var ch:char;
12 | begin
13 | ch := 100X;
14 | writeln(ch);
15 | end Example_3_1.
--------------------------------------------------------------------------------
/testsuite/15-Examples/04-ZonnonIntro/darray.znn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/15-Examples/04-ZonnonIntro/darray.znn
--------------------------------------------------------------------------------
/testsuite/15-Examples/04-ZonnonIntro/dirinfo.info:
--------------------------------------------------------------------------------
1 | Zonnon examples form the introduction for new Zonnon programmers
--------------------------------------------------------------------------------
/testsuite/15-Examples/04-ZonnonIntro/for.znn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/15-Examples/04-ZonnonIntro/for.znn
--------------------------------------------------------------------------------
/testsuite/15-Examples/tets.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/15-Examples/tets.ts
--------------------------------------------------------------------------------
/testsuite/16-Regression/001/tests.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/16-Regression/001/tests.ts
--------------------------------------------------------------------------------
/testsuite/16-Regression/002/procedureType.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/16-Regression/002/procedureType.zip
--------------------------------------------------------------------------------
/testsuite/16-Regression/002/tests.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/16-Regression/002/tests.ts
--------------------------------------------------------------------------------
/testsuite/16-Regression/003/source/core/.dolphinview:
--------------------------------------------------------------------------------
1 | V0100199912312359590A0
--------------------------------------------------------------------------------
/testsuite/16-Regression/003/source/math/.dolphinview:
--------------------------------------------------------------------------------
1 | V0100199912312359590A0
--------------------------------------------------------------------------------
/testsuite/16-Regression/003/tests.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/16-Regression/003/tests.ts
--------------------------------------------------------------------------------
/testsuite/16-Regression/004/status.txt:
--------------------------------------------------------------------------------
1 | STATUS: OPEN
2 | RECEIVED: 20.6.2009
3 | VERSION: 1.1.11
4 | CONTACT: fnecati
5 |
6 | Recerived from fnecati
7 |
8 |
9 | http://www.ocp.inf.ethz.ch/forum/index.php?topic=283.new#new
--------------------------------------------------------------------------------
/testsuite/16-Regression/004/t01-t.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 |
3 | begin
4 |
5 | (*
6 | INSERT
7 | *)
8 |
9 | end Main.
10 |
--------------------------------------------------------------------------------
/testsuite/16-Regression/005/status.txt:
--------------------------------------------------------------------------------
1 | STATUS: OPEN
2 | RECEIVED: Fri 6/19/2009 12:41 AM
3 | VERSION: 1.1.11
4 | CONTACT: Meik
5 |
6 |
7 |
--------------------------------------------------------------------------------
/testsuite/16-Regression/006/status.txt:
--------------------------------------------------------------------------------
1 | STATUS: OPEN
2 | RECEIVED: Sat 6/20/2009 3:28 PM
3 | VERSION: 1.1.11
4 | CONTACT: Alan
5 |
6 |
7 |
--------------------------------------------------------------------------------
/testsuite/16-Regression/007/0001.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 9. Concurrency-Activities-Protocols
3 | * 9.2. Protocol-Controlled-and-Activities
4 | * Positive test: Simple activity implements the protocol
5 | *)
6 |
7 | module run;
8 |
9 | protocol P = (
10 | A, B, C,
11 | dialog = A | B | C
12 | );
13 |
14 | begin
15 | halt(1) (* success *)
16 | end run.
17 |
--------------------------------------------------------------------------------
/testsuite/16-Regression/007/0002.znn:
--------------------------------------------------------------------------------
1 | object {ref, public} Test.TreeNode;
2 | var {public}
3 | left, right : TreeNode;
4 | end TreeNode.
5 |
--------------------------------------------------------------------------------
/testsuite/16-Regression/007/0005.znn:
--------------------------------------------------------------------------------
1 |
2 | definition DX;
3 | end DX.
4 |
5 | object {ref} Y implements DX;
6 | import Y;
7 | procedure {public} Copy () : object{DX};
8 | var newY : Y;
9 | begin
10 | newY := new Y;
11 | return newY;
12 | end Copy;
13 | end Y.
14 |
15 | module run;
16 | end run.
--------------------------------------------------------------------------------
/testsuite/16-Regression/007/0006.znn:
--------------------------------------------------------------------------------
1 | module mainModule;
2 | var
3 | a: real;
4 | begin
5 | a:=0;
6 | end mainModule.
7 |
--------------------------------------------------------------------------------
/testsuite/16-Regression/007/1.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/16-Regression/007/1.ts
--------------------------------------------------------------------------------
/testsuite/16-Regression/007/qformurs.znn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/16-Regression/007/qformurs.znn
--------------------------------------------------------------------------------
/testsuite/16-Regression/tests.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/16-Regression/tests.ts
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/2-Array definition/T01-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.2. Definition
4 | *
5 | * Positive test: dynamic math array creation.
6 | *)
7 | module Main;
8 |
9 | type v = array {math} * of integer;
10 |
11 | var
12 | a : v;
13 | begin
14 | a := new v(2);
15 | a[0] := 5;
16 | halt(1);
17 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/2-Array definition/T02-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.2. Definition
4 | *
5 | *
6 | * Negative test: dynamic math array creation: incorrect syntax
7 | *)
8 |
9 | module Main;
10 |
11 | type v = array {m} * of integer;
12 |
13 | var
14 | a : v;
15 | begin
16 | halt(0);
17 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/2-Array definition/T03-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.2. Definition
4 | *
5 | * Negative test: dynamic math array creation: math is without '{}'.
6 | *)
7 |
8 | module Main;
9 |
10 | type v = array math * of integer;
11 |
12 | var
13 | a : v;
14 |
15 | begin
16 | halt(0);
17 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/2-Array definition/T04-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.2. Definition
4 | *
5 | * Negative test: dynamic math array creation: unknown type.
6 | *)
7 |
8 | module Main;
9 |
10 | type v = array {math} * of type_;
11 |
12 | var
13 | a : v;
14 |
15 | begin
16 | halt(0);
17 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/2-Array definition/T05-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.2. Definition
4 | *
5 | * Positive test: static math array creation.
6 | *)
7 |
8 | module Main;
9 | var
10 | a : array {math} 3, 4 of integer;
11 | begin
12 | a[1, 3] := 5;
13 | if a[1, 3] = 5
14 | then
15 | halt(1);
16 | else
17 | halt(0);
18 | end;
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/2-Array definition/T06-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.2. Definition
4 | *
5 | * Negative test: incorrect static math array creation.
6 | *)
7 |
8 | module Main;
9 | var
10 | a : array {math} 3, * of integer;
11 | begin
12 | halt(0);
13 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/2-Array definition/T08-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.2. Definition
4 | *
5 | * Negaive test: static math array creation & expression array definition:
6 | * incorrect type
7 | *)
8 |
9 | module Main;
10 | var
11 | a : array {math} 2, 3 of integer;
12 | begin
13 | a := [[1, 2., 3],[4, 5, 6]];
14 | halt(0);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/2-Array definition/T09-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.2. Definition
4 | *
5 | * Negaive test: static math array creation & expression array definition:
6 | * incorrect number of indices
7 | *)
8 |
9 | module Main;
10 | var
11 | a : array {math} 2, 3 of integer;
12 | begin
13 | a := [[1, 2, 3], [4, 5, 6], [7, 8, 9]];
14 | halt(0);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/2-Array definition/T11-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.2. Definition
4 | *
5 | * Negative test: dynamic math array creation & expression array definition:
6 | * incorrect type
7 | *)
8 |
9 | module Main;
10 | var
11 | b : array {math} * of cardinal;
12 | begin
13 | b := [7, 8, -9, 10];
14 | halt(0);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/2-Array definition/T12-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.2. Definition
4 | *
5 | * Negaive test: dynamic math array creation & expression array definition:
6 | * different number of indices (exceeding)
7 | *)
8 |
9 | module Main;
10 | var
11 | a : array {math} *, * of real;
12 | begin
13 | a := [[1., 2., 3.],[4., 5., 6., 7.]];
14 | halt(0);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/2-Array definition/T13-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.2. Definition
4 | *
5 | * Negaive test: dynamic math array creation & expression array definition:
6 | * different number of indices (belittling)
7 | *)
8 |
9 | module Main;
10 | var
11 | a : array {math} *, * of real;
12 | begin
13 | a := [[1., 2., 3.],[4., 5.]];
14 | halt(0);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/2-Array definition/T15-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.2. Definition
4 | *
5 | * Negaive test: dynamic math array creation & expression array definition:
6 | * incorrect dimension (belittling)
7 | *)
8 |
9 | module Main;
10 | var
11 | a : array {math} *, * of real;
12 | begin
13 | a := [1., 2., 3.];
14 | halt(0);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/3-Indices/T03-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.3. Indexing
4 | *
5 | * Negative test: simple indexing (static array)
6 | *)
7 |
8 | module Main;
9 |
10 | var
11 | a : array {math} 3 of integer;
12 | begin
13 | a[1] := 5;
14 | a[2] := 7;
15 | do
16 | a[4] := 9;
17 | on OutOfRange do
18 | halt(1);
19 | end;
20 | halt(0);
21 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/3-Indices/T08-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.3. Indexing
4 | *
5 | * Negative test: range indexing : array is not math
6 | *)
7 |
8 | module Main;
9 |
10 | var
11 | a : array 5 of integer;
12 | begin
13 | a[1..3] := [9, 10, 11];
14 | halt(0);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/3-Indices/T10-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.3. Indexing
4 | *
5 | * Negative test: integer vector indexing (array is not math)
6 | *)
7 |
8 | module Main;
9 |
10 | type v = array * of integer;
11 |
12 | var
13 | b : v;
14 | a : array 5 of real;
15 | begin
16 | b := [1, 3];
17 | a[b] := [-1., -2.];
18 |
19 | halt(0);
20 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/3-Indices/T14-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.3. Indexing
4 | *
5 | * Negative test: boolean vector indexing (array is not math)
6 | *)
7 |
8 | module Main;
9 |
10 | type v = array * of boolean;
11 |
12 | var
13 | b : v;
14 | a : array 5 of real;
15 | begin
16 | b := [false, true, false, false, true];
17 | a[b] := [-1., -2.];
18 | halt(0);
19 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/3-Indices/T22-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.3. Indexing
4 | *
5 | * Negative test: ranges never change array dimension
6 | *)
7 |
8 | module Main;
9 |
10 | var
11 | a : array {math} 5 of integer;
12 | begin
13 | a[1..1] := a[0];
14 | halt(0);
15 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/3-Indices/T27-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.3. Indexing
4 | *
5 | * Positive test: ranges
6 | *)
7 |
8 | module Main;
9 |
10 | var
11 | a : array {math} 3 of integer;
12 | r : range;
13 |
14 | begin
15 | r := ..2 by 2;
16 | a[r] := [5, 7];
17 | halt(0);
18 | end Main.
19 |
20 |
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/3-Indices/T28-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.3. Indexing
4 | *
5 | * Positive test: ranges
6 | *)
7 |
8 | module Main;
9 |
10 | var
11 | a : array {math} 3 of integer;
12 | r : range;
13 |
14 | begin
15 | r := 0.. by 2;
16 | a[r] := [5, 7];
17 | halt(0);
18 | end Main.
19 |
20 |
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/3-Indices/T29-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.3. Indexing
4 | *
5 | * Positive test: ranges
6 | *)
7 |
8 | module Main;
9 |
10 | var
11 | a : array {math} 3 of integer;
12 | r : range;
13 |
14 | begin
15 | r := .. by 2;
16 | a[r] := [5, 7];
17 | halt(0);
18 | end Main.
19 |
20 |
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/3-Indices/T30-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.3. Indexing
4 | *
5 | * Positive test: ranges
6 | *)
7 |
8 | module Main;
9 |
10 | var
11 | a : array {math} 3 of integer;
12 | r : range;
13 |
14 | begin
15 | r := 2..1 by 2;
16 | a[r] := [5, 7];
17 | halt(0);
18 | end Main.
19 |
20 |
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/3-Indices/T31-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.3. Indexing
4 | *
5 | * Positive test: ranges
6 | *)
7 |
8 | module Main;
9 |
10 | var
11 | a : array {math} 3 of integer;
12 | r : range;
13 |
14 | begin
15 | r := 0..5 by 3;
16 | do
17 | a[r] := [5, 7];
18 | on OutOfRange do
19 | halt(1);
20 | end;
21 | halt(0);
22 | end Main.
23 |
24 |
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/3-Indices/T32-t.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.3. Indexing
4 | *
5 | * Positive test: ranges
6 | *)
7 |
8 | module Main;
9 |
10 | var
11 | a : array {math} 3 of integer;
12 | r : range;
13 |
14 | begin
15 | r := -1..2 by 2;
16 | do
17 | a[r] := [5, 7];
18 | on OutOfRange do
19 | halt(1);
20 | end;
21 |
22 | halt(0);
23 | end Main.
24 |
25 |
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/4-Operators/1-Operators-Common/2-Unary/T02-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.4. Operators
4 | * 17.4.2. Unary
5 | *
6 | * Negative test: Unary plus:
7 | * array is not math
8 | *)
9 |
10 | module Main;
11 |
12 | var
13 | ai1, ai2 : array 2, 3 of integer;
14 |
15 | begin
16 |
17 | ai2 := +ai1;
18 | halt(0);
19 |
20 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/4-Operators/1-Operators-Common/2-Unary/T05-x.znn:
--------------------------------------------------------------------------------
1 | (**
2 | * 17. Math extensions.
3 | * 17.4. Operators
4 | * 17.4.2. Unary
5 | *
6 | * Negative test: Unary minus:
7 | * array is not math
8 | *)
9 |
10 | module Main;
11 |
12 | var
13 | ai1, ai2 : array 2, 3 of integer;
14 |
15 | begin
16 |
17 | ai2 := -ai1;
18 | halt(0);
19 |
20 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/7-Sparse/T01-t.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 |
3 | var
4 | A: array {sparse} *,* of integer;
5 |
6 | begin
7 | halt(1);
8 | end Main.
9 |
10 |
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/7-Sparse/T02-x.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 |
3 | var
4 | a: array {sparse} * of double;
5 |
6 | begin
7 | halt(0);
8 | end Main.
9 |
10 |
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/7-Sparse/T03-x.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 |
3 | var
4 | A: array {sparse, math} *,* of integer;
5 |
6 | begin
7 | halt(0);
8 | end Main.
9 |
10 |
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/7-Sparse/T04-x.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 |
3 | var
4 | A: array {sparse} *,*,* of integer;
5 |
6 | begin
7 | halt(0);
8 | end Main.
9 |
10 |
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/7-Sparse/T05-x.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 |
3 | type t1 = array {sparse} * of double;
4 |
5 | var
6 | a : t1;
7 |
8 | begin
9 |
10 | halt(1);
11 |
12 | end Main.
13 |
14 |
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/7-Sparse/T06-t.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 |
3 | type t1 = array {sparse} *,* of integer{64};
4 | type t2 = array {sparse} * of real{16};
5 |
6 | var
7 | a : t1;
8 | b : t2;
9 |
10 | begin
11 | halt(1);
12 | end Main.
13 |
14 |
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/7-Sparse/T07-x.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 |
3 | type t1 = array {sparse} *,*,* of integer;
4 |
5 | var
6 |
7 | begin
8 | halt(0);
9 | end Main.
10 |
11 |
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/7-Sparse/T08-x.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 |
3 | var
4 | A: array {sparse} 5,* of integer;
5 |
6 | begin
7 | halt(0);
8 | end Main.
9 |
10 |
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/7-Sparse/T12-t.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 |
3 | type t1 = array {sparse} *,* of integer;
4 |
5 | var
6 | a : t1;
7 | i : array {math} 5 of integer;
8 | j : array {math} 5 of integer;
9 | s : array {math} 5 of integer;
10 |
11 | begin
12 | a := new t1(5, 7);
13 |
14 | halt(1);
15 | end Main.
16 |
17 |
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/7-Sparse/T17-t.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 |
3 | type t1 = array {sparse} * of integer;
4 |
5 | var
6 | a : t1;
7 | b : array {math} * of integer;
8 | n : integer;
9 |
10 | begin
11 | b := [0, 1, 3];
12 |
13 | a := tosparse(b);
14 |
15 | if (a[0] = 0) & (a[1] = 1) & (a[2] = 3) & (len(a) = 3)
16 | then halt(1);
17 | end;
18 |
19 | halt(0);
20 |
21 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/7-Sparse/T18-x.znn:
--------------------------------------------------------------------------------
1 | module Main;
2 |
3 | type t1 = array {sparse} * of integer;
4 |
5 | var
6 | a, b : t1;
7 |
8 | i : array {math} 5 of integer;
9 | s : array {math} 5 of integer{16};
10 |
11 | begin
12 | i := [4, 1, 0, 7, 2];
13 | s := [-1, -2, 20, -4, 10];
14 | b := new t1(i, s, 8, 5);
15 |
16 | a := !b;
17 |
18 | halt(0);
19 |
20 | end Main.
--------------------------------------------------------------------------------
/testsuite/17-Math-Extensions/Examples/Strassen-t.znn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zonnonproject/compiler/ea9699c241d4bad312b9d81315e599828efb8b2f/testsuite/17-Math-Extensions/Examples/Strassen-t.znn
--------------------------------------------------------------------------------
/testsuite/readme.txt:
--------------------------------------------------------------------------------
1 | Test Script Commands
2 |
3 | setref
4 | setout
5 | setentry
6 | compile
7 | testrun
--------------------------------------------------------------------------------