repo_name
stringlengths
9
74
language
stringclasses
1 value
length_bytes
int64
11
9.34M
extension
stringclasses
2 values
content
stringlengths
11
9.34M
docandrew/troodon
Ada
1,338
ads
pragma Ada_2012; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; package bits_types_struct_sched_param_h is -- Sched parameter structure. Generic version. -- Copyright (C) 1996-2021 Free Software Foundation, Inc. -- This file is part of the GNU C Library. -- The GNU C Library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public -- License as published by the Free Software Foundation; either -- version 2.1 of the License, or (at your option) any later version. -- The GNU C Library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- Lesser General Public License for more details. -- You should have received a copy of the GNU Lesser General Public -- License along with the GNU C Library; if not, see -- <https://www.gnu.org/licenses/>. -- Data structure to describe a process' schedulability. type sched_param is record sched_priority : aliased int; -- /usr/include/bits/types/struct_sched_param.h:25 end record with Convention => C_Pass_By_Copy; -- /usr/include/bits/types/struct_sched_param.h:23 end bits_types_struct_sched_param_h;
PThierry/ewok-kernel
Ada
1,045
ads
-- -- Copyright 2018 The wookey project team <[email protected]> -- - Ryad Benadjila -- - Arnauld Michelizza -- - Mathieu Renard -- - Philippe Thierry -- - Philippe Trebuchet -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- with ewok.tasks_shared; use ewok.tasks_shared; package ewok.syscalls.exiting with spark_mode => off is procedure svc_exit (caller_id : in ewok.tasks_shared.t_task_id; mode : in ewok.tasks_shared.t_task_mode); end ewok.syscalls.exiting;
zhmu/ananas
Ada
2,957
ads
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . A D D R E S S _ I M A G E -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This is a GNAT specific addition which provides a useful debugging -- procedure that gives an (implementation dependent) string which -- identifies an address. -- This unit may be used directly from an application program by providing -- an appropriate WITH, and the interface can be expected to remain stable. function System.Address_Image (A : Address) return String; pragma Pure (System.Address_Image); -- Returns string (hexadecimal digits with upper case letters) representing -- the address (string is 8/16 bytes for 32/64-bit machines). 'First of the -- result = 1.
reznikmm/matreshka
Ada
5,130
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Generic_Collections; package AMF.CMOF.Package_Imports.Collections is pragma Preelaborate; package CMOF_Package_Import_Collections is new AMF.Generic_Collections (CMOF_Package_Import, CMOF_Package_Import_Access); type Set_Of_CMOF_Package_Import is new CMOF_Package_Import_Collections.Set with null record; Empty_Set_Of_CMOF_Package_Import : constant Set_Of_CMOF_Package_Import; type Ordered_Set_Of_CMOF_Package_Import is new CMOF_Package_Import_Collections.Ordered_Set with null record; Empty_Ordered_Set_Of_CMOF_Package_Import : constant Ordered_Set_Of_CMOF_Package_Import; type Bag_Of_CMOF_Package_Import is new CMOF_Package_Import_Collections.Bag with null record; Empty_Bag_Of_CMOF_Package_Import : constant Bag_Of_CMOF_Package_Import; type Sequence_Of_CMOF_Package_Import is new CMOF_Package_Import_Collections.Sequence with null record; Empty_Sequence_Of_CMOF_Package_Import : constant Sequence_Of_CMOF_Package_Import; private Empty_Set_Of_CMOF_Package_Import : constant Set_Of_CMOF_Package_Import := (CMOF_Package_Import_Collections.Set with null record); Empty_Ordered_Set_Of_CMOF_Package_Import : constant Ordered_Set_Of_CMOF_Package_Import := (CMOF_Package_Import_Collections.Ordered_Set with null record); Empty_Bag_Of_CMOF_Package_Import : constant Bag_Of_CMOF_Package_Import := (CMOF_Package_Import_Collections.Bag with null record); Empty_Sequence_Of_CMOF_Package_Import : constant Sequence_Of_CMOF_Package_Import := (CMOF_Package_Import_Collections.Sequence with null record); end AMF.CMOF.Package_Imports.Collections;
Fabien-Chouteau/samd51-hal
Ada
1,244
ads
pragma Style_Checks (Off); -- This spec has been automatically generated from ATSAMD51G19A.svd pragma Restrictions (No_Elaboration_Code); with HAL; with System; package SAM_SVD.HMATRIXB is pragma Preelaborate; --------------- -- Registers -- --------------- -------------------------------------- -- HMATRIXB_PRS cluster's Registers -- -------------------------------------- type HMATRIXB_PRS_Cluster is record -- Priority A for Slave PRAS : aliased HAL.UInt32; -- Priority B for Slave PRBS : aliased HAL.UInt32; end record with Size => 64; for HMATRIXB_PRS_Cluster use record PRAS at 16#0# range 0 .. 31; PRBS at 16#4# range 0 .. 31; end record; type HMATRIXB_PRS_Clusters is array (0 .. 15) of HMATRIXB_PRS_Cluster; ----------------- -- Peripherals -- ----------------- -- HSB Matrix type HMATRIX_Peripheral is record HMATRIXB_PRS : aliased HMATRIXB_PRS_Clusters; end record with Volatile; for HMATRIX_Peripheral use record HMATRIXB_PRS at 16#80# range 0 .. 1023; end record; -- HSB Matrix HMATRIX_Periph : aliased HMATRIX_Peripheral with Import, Address => HMATRIX_Base; end SAM_SVD.HMATRIXB;
AdaCore/Ada_Drivers_Library
Ada
3,586
adb
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015-2016, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with HAL.I2C; use HAL.I2C; package body MCP23x08.I2C is -------------- -- IO_Write -- -------------- overriding procedure IO_Write (This : in out MCP23008_IO_Expander; WriteAddr : Register_Address; Value : UInt8) is Status : I2C_Status; begin This.Port.Mem_Write (BASE_ADDRESS or I2C_Address (This.Addr), UInt16 (WriteAddr), Memory_Size_8b, (1 => Value), Status, 1000); if Status /= Ok then -- No error handling... raise Program_Error; end if; end IO_Write; ------------- -- IO_Read -- ------------- overriding procedure IO_Read (This : MCP23008_IO_Expander; ReadAddr : Register_Address; Value : out UInt8) is Ret : I2C_Data (1 .. 1); Status : I2C_Status; begin This.Port.Mem_Read (BASE_ADDRESS or I2C_Address (This.Addr), UInt16 (ReadAddr), Memory_Size_8b, Ret, Status, 1000); if Status /= Ok then -- No error handling... raise Program_Error; end if; Value := Ret (1); end IO_Read; end MCP23x08.I2C;
zhmu/ananas
Ada
9,051
adb
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . P A C K _ 1 2 -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with System.Storage_Elements; with System.Unsigned_Types; package body System.Pack_12 is subtype Bit_Order is System.Bit_Order; Reverse_Bit_Order : constant Bit_Order := Bit_Order'Val (1 - Bit_Order'Pos (System.Default_Bit_Order)); subtype Ofs is System.Storage_Elements.Storage_Offset; subtype Uns is System.Unsigned_Types.Unsigned; subtype N07 is System.Unsigned_Types.Unsigned range 0 .. 7; use type System.Storage_Elements.Storage_Offset; use type System.Unsigned_Types.Unsigned; type Cluster is record E0, E1, E2, E3, E4, E5, E6, E7 : Bits_12; end record; for Cluster use record E0 at 0 range 0 * Bits .. 0 * Bits + Bits - 1; E1 at 0 range 1 * Bits .. 1 * Bits + Bits - 1; E2 at 0 range 2 * Bits .. 2 * Bits + Bits - 1; E3 at 0 range 3 * Bits .. 3 * Bits + Bits - 1; E4 at 0 range 4 * Bits .. 4 * Bits + Bits - 1; E5 at 0 range 5 * Bits .. 5 * Bits + Bits - 1; E6 at 0 range 6 * Bits .. 6 * Bits + Bits - 1; E7 at 0 range 7 * Bits .. 7 * Bits + Bits - 1; end record; for Cluster'Size use Bits * 8; for Cluster'Alignment use Integer'Min (Standard'Maximum_Alignment, 1 + 1 * Boolean'Pos (Bits mod 2 = 0) + 2 * Boolean'Pos (Bits mod 4 = 0)); -- Use maximum possible alignment, given the bit field size, since this -- will result in the most efficient code possible for the field. type Cluster_Ref is access Cluster; type Rev_Cluster is new Cluster with Bit_Order => Reverse_Bit_Order, Scalar_Storage_Order => Reverse_Bit_Order; type Rev_Cluster_Ref is access Rev_Cluster; -- The following declarations are for the case where the address -- passed to GetU_12 or SetU_12 is not guaranteed to be aligned. -- These routines are used when the packed array is itself a -- component of a packed record, and therefore may not be aligned. type ClusterU is new Cluster; for ClusterU'Alignment use 1; type ClusterU_Ref is access ClusterU; type Rev_ClusterU is new ClusterU with Bit_Order => Reverse_Bit_Order, Scalar_Storage_Order => Reverse_Bit_Order; type Rev_ClusterU_Ref is access Rev_ClusterU; ------------ -- Get_12 -- ------------ function Get_12 (Arr : System.Address; N : Natural; Rev_SSO : Boolean) return Bits_12 is A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8); C : Cluster_Ref with Address => A'Address, Import; RC : Rev_Cluster_Ref with Address => A'Address, Import; begin if Rev_SSO then case N07 (Uns (N) mod 8) is when 0 => return RC.E0; when 1 => return RC.E1; when 2 => return RC.E2; when 3 => return RC.E3; when 4 => return RC.E4; when 5 => return RC.E5; when 6 => return RC.E6; when 7 => return RC.E7; end case; else case N07 (Uns (N) mod 8) is when 0 => return C.E0; when 1 => return C.E1; when 2 => return C.E2; when 3 => return C.E3; when 4 => return C.E4; when 5 => return C.E5; when 6 => return C.E6; when 7 => return C.E7; end case; end if; end Get_12; ------------- -- GetU_12 -- ------------- function GetU_12 (Arr : System.Address; N : Natural; Rev_SSO : Boolean) return Bits_12 is A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8); C : ClusterU_Ref with Address => A'Address, Import; RC : Rev_ClusterU_Ref with Address => A'Address, Import; begin if Rev_SSO then case N07 (Uns (N) mod 8) is when 0 => return RC.E0; when 1 => return RC.E1; when 2 => return RC.E2; when 3 => return RC.E3; when 4 => return RC.E4; when 5 => return RC.E5; when 6 => return RC.E6; when 7 => return RC.E7; end case; else case N07 (Uns (N) mod 8) is when 0 => return C.E0; when 1 => return C.E1; when 2 => return C.E2; when 3 => return C.E3; when 4 => return C.E4; when 5 => return C.E5; when 6 => return C.E6; when 7 => return C.E7; end case; end if; end GetU_12; ------------ -- Set_12 -- ------------ procedure Set_12 (Arr : System.Address; N : Natural; E : Bits_12; Rev_SSO : Boolean) is A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8); C : Cluster_Ref with Address => A'Address, Import; RC : Rev_Cluster_Ref with Address => A'Address, Import; begin if Rev_SSO then case N07 (Uns (N) mod 8) is when 0 => RC.E0 := E; when 1 => RC.E1 := E; when 2 => RC.E2 := E; when 3 => RC.E3 := E; when 4 => RC.E4 := E; when 5 => RC.E5 := E; when 6 => RC.E6 := E; when 7 => RC.E7 := E; end case; else case N07 (Uns (N) mod 8) is when 0 => C.E0 := E; when 1 => C.E1 := E; when 2 => C.E2 := E; when 3 => C.E3 := E; when 4 => C.E4 := E; when 5 => C.E5 := E; when 6 => C.E6 := E; when 7 => C.E7 := E; end case; end if; end Set_12; ------------- -- SetU_12 -- ------------- procedure SetU_12 (Arr : System.Address; N : Natural; E : Bits_12; Rev_SSO : Boolean) is A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8); C : ClusterU_Ref with Address => A'Address, Import; RC : Rev_ClusterU_Ref with Address => A'Address, Import; begin if Rev_SSO then case N07 (Uns (N) mod 8) is when 0 => RC.E0 := E; when 1 => RC.E1 := E; when 2 => RC.E2 := E; when 3 => RC.E3 := E; when 4 => RC.E4 := E; when 5 => RC.E5 := E; when 6 => RC.E6 := E; when 7 => RC.E7 := E; end case; else case N07 (Uns (N) mod 8) is when 0 => C.E0 := E; when 1 => C.E1 := E; when 2 => C.E2 := E; when 3 => C.E3 := E; when 4 => C.E4 := E; when 5 => C.E5 := E; when 6 => C.E6 := E; when 7 => C.E7 := E; end case; end if; end SetU_12; end System.Pack_12;
afrl-rq/OpenUxAS
Ada
1,103
adb
package body AFRL.CMASI.AutomationRequest.SPARK_Boundary with SPARK_Mode => Off is -------------------- -- Get_EntityList -- -------------------- function Get_EntityList (Request : AutomationRequest) return Int64_Vect is L : constant Vect_Int64_Acc := Request.getEntityList; begin return R : Int64_Vect do for E of L.all loop Int64_Vects.Append (R, E); end loop; end return; end Get_EntityList; ------------------------- -- Get_OperatingRegion -- ------------------------- function Get_OperatingRegion (Request : AutomationRequest) return Int64 renames getOperatingRegion; ------------------ -- Get_TaskList -- ------------------ function Get_TaskList (Request : AutomationRequest) return Int64_Vect is L : constant Vect_Int64_Acc := Request.getTaskList; begin return R : Int64_Vect do for E of L.all loop Int64_Vects.Append (R, E); end loop; end return; end Get_TaskList; end AFRL.CMASI.AutomationRequest.SPARK_Boundary;
onox/orka
Ada
4,264
adb
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2016 onox <[email protected]> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. with AUnit.Assertions; with AUnit.Test_Caller; with Orka.SIMD.SSE.Singles.Swizzle; package body Test_SIMD_SSE_Swizzle is use Orka; use Orka.SIMD.SSE.Singles; use Orka.SIMD.SSE.Singles.Swizzle; use AUnit.Assertions; package Caller is new AUnit.Test_Caller (Test); Test_Suite : aliased AUnit.Test_Suites.Test_Suite; function Suite return AUnit.Test_Suites.Access_Test_Suite is Name : constant String := "(SIMD - SSE - Swizzle) "; begin Test_Suite.Add_Test (Caller.Create (Name & "Test Shuffle function", Test_Shuffle'Access)); Test_Suite.Add_Test (Caller.Create (Name & "Test Transpose function", Test_Transpose_Function'Access)); Test_Suite.Add_Test (Caller.Create (Name & "Test Transpose procedure", Test_Transpose_Procedure'Access)); return Test_Suite'Access; end Suite; procedure Test_Shuffle (Object : in out Test) is Elements : constant m128 := (1.0, 2.0, 3.0, 4.0); Mask_0_0_0_0 : constant := 0 + 0 * 4 + 0 * 16 + 0 * 64; Mask_2_2_2_2 : constant := 2 + 2 * 4 + 2 * 16 + 2 * 64; Mask_1_0_3_2 : constant := 1 + 0 * 4 + 3 * 16 + 2 * 64; Mask_2_3_0_1 : constant := 2 + 3 * 4 + 0 * 16 + 1 * 64; Expected : constant array (Positive range <>) of m128 := ((1.0, 1.0, 1.0, 1.0), (3.0, 3.0, 3.0, 3.0), (2.0, 1.0, 4.0, 3.0), (3.0, 4.0, 1.0, 2.0)); Results : array (Positive range Expected'Range) of m128; begin Results (1) := Shuffle (Elements, Elements, Mask_0_0_0_0); Results (2) := Shuffle (Elements, Elements, Mask_2_2_2_2); Results (3) := Shuffle (Elements, Elements, Mask_1_0_3_2); Results (4) := Shuffle (Elements, Elements, Mask_2_3_0_1); for I in Expected'Range loop for J in Index_4D loop declare Message : constant String := "Unexpected Single at " & Index_4D'Image (J); begin Assert (Expected (I) (J) = Results (I) (J), Message); end; end loop; end loop; end Test_Shuffle; procedure Test_Transpose_Function (Object : in out Test) is Elements : constant m128_Array := ((1.0, 2.0, 3.0, 4.0), (5.0, 6.0, 7.0, 8.0), (9.0, 10.0, 11.0, 12.0), (13.0, 14.0, 15.0, 16.0)); Expected : constant m128_Array := ((1.0, 5.0, 9.0, 13.0), (2.0, 6.0, 10.0, 14.0), (3.0, 7.0, 11.0, 15.0), (4.0, 8.0, 12.0, 16.0)); Result : constant m128_Array := Transpose (Elements); begin for I in Result'Range loop for J in Index_4D loop Assert (Expected (I) (J) = Result (I) (J), "Unexpected Single at " & I'Image & ", " & J'Image); end loop; end loop; end Test_Transpose_Function; procedure Test_Transpose_Procedure (Object : in out Test) is Elements : m128_Array := ((1.0, 2.0, 3.0, 4.0), (5.0, 6.0, 7.0, 8.0), (9.0, 10.0, 11.0, 12.0), (13.0, 14.0, 15.0, 16.0)); Expected : constant m128_Array := ((1.0, 5.0, 9.0, 13.0), (2.0, 6.0, 10.0, 14.0), (3.0, 7.0, 11.0, 15.0), (4.0, 8.0, 12.0, 16.0)); begin Transpose (Elements); for I in Elements'Range loop for J in Index_4D loop Assert (Expected (I) (J) = Elements (I) (J), "Unexpected Single at " & I'Image & ", " & J'Image); end loop; end loop; end Test_Transpose_Procedure; end Test_SIMD_SSE_Swizzle;
reznikmm/matreshka
Ada
3,470
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Tools Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2015, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Asis.Implementation; procedure Main is begin Asis.Implementation.Initialize; Asis.Implementation.Finalize; end Main;
Gabriel-Degret/adalib
Ada
580
ads
-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <[email protected]> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual --------------------------------------------------------------------------- package Ada.Wide_Wide_Characters is pragma Pure (Wide_Wide_Characters); end Ada.Wide_Wide_Characters;
reznikmm/matreshka
Ada
3,694
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Attributes; package ODF.DOM.Table_Order_Attributes is pragma Preelaborate; type ODF_Table_Order_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Table_Order_Attribute_Access is access all ODF_Table_Order_Attribute'Class with Storage_Size => 0; end ODF.DOM.Table_Order_Attributes;
sebsgit/textproc
Ada
638
ads
with AUnit; use AUnit; with AUnit.Test_Cases; use AUnit.Test_Cases; package GpuImageTests is type TestCase is new AUnit.Test_Cases.Test_Case with null record; procedure Register_Tests(T: in out TestCase); function Name(T: TestCase) return Message_String; procedure initOpenCL(T: in out Test_Cases.Test_Case'Class); procedure testGpuImage(T : in out Test_Cases.Test_Case'Class); procedure testGpuProcessing(T : in out Test_Cases.Test_Case'Class); procedure testGpuBernsenThreshold(T : in out Test_Cases.Test_Case'Class); procedure testGpuGaussianFilter(T: in out Test_Cases.Test_Case'Class); end GpuImageTests;
evgenijaZ/PP-labs
Ada
5,491
adb
with Ada.Integer_Text_IO; with Ada.Integer_Text_IO; with Ada.Text_IO; use Ada.Text_IO; with Ada.Numerics; with Ada.Numerics.Discrete_Random; package body Data is protected body Mutex is entry Seize when not Owned is begin Owned := True; end Seize; Procedure Release is begin Owned := False; end Release; end Mutex; function F1(A : in Matrix; D : in Matrix; B : in Vector; N : in Integer) return Matrix is E : Matrix; begin E := Multiple(A, D, N); E := Multiple(Max(B, N), E, N); return E; end F1; function F2(a : in Integer; G : in Matrix; K : in Matrix; L : in Matrix; N : in Integer) return Matrix is F,T : Matrix; begin T:=Trans(G,N); F:=Multiple(a,T,N); T:=Multiple(K,L,N); F:=Amount(F,T,N); return F; end F2; function F3(P : in Matrix; R : in Matrix; S : in Vector; T : in Vector; N : in Integer) return Vector is O : Vector; A : Matrix; begin A:=Multiple(P,R,N); O:=Multiple(A,S,N); O:=Amount(O,S,N); return O; end F3; procedure Matrix_Input (A : out Matrix; N : in Integer) is item : Integer; begin My_Mutex.Seize; Put_Line ("Enter matrix values:"); for i in 1..N loop for j in 1..N loop Ada.Integer_Text_IO.Get (item); A(i,j) := item; end loop; end loop; My_Mutex.Release; end Matrix_Input; procedure Matrix_Output(A : in Matrix; N : in Integer; S: in String) is begin My_Mutex.Seize; Put_Line(S); for i in 1..N loop for j in 1..N loop Ada.Integer_Text_IO.Put(A(i,j)); end loop; New_Line; end loop; My_Mutex.Release; end Matrix_Output; procedure Matrix_Generate (A : out Matrix; N : in Integer) is type Rand_Range is range 1..10; package Rand_Int is new Ada.Numerics.Discrete_Random(Rand_Range); seed : Rand_Int.Generator; Num : Rand_Range; begin Rand_Int.Reset(seed); for i in 1..N loop for j in 1..N loop Num := Rand_Int.Random(seed); A(i,j) := 1; end loop; end loop; end Matrix_Generate; procedure Vector_Generate (A : out Vector; N : in Integer) is type Rand_Range is range 1..10; package Rand_Int is new Ada.Numerics.Discrete_Random(Rand_Range); seed : Rand_Int.Generator; Num : Rand_Range; begin Rand_Int.Reset(seed); for i in 1..N loop Num := Rand_Int.Random(seed); A(i) := 1; end loop; end Vector_Generate; procedure Value_Generate (A : out Integer) is type Rand_Range is range 1..10; package Rand_Int is new Ada.Numerics.Discrete_Random(Rand_Range); seed : Rand_Int.Generator; Num : Rand_Range; begin Rand_Int.Reset(seed); Num := Rand_Int.Random(seed); A := 5; end Value_Generate; procedure Vector_Input (A : out Vector; N : in Integer) is item : Integer; begin My_Mutex.Seize; Put_Line ("Enter vector values:"); for i in 1..N loop Ada.Integer_Text_IO.Get(item); A(i) := item; end loop; My_Mutex.Release; end Vector_Input; procedure Vector_Output(A : in Vector; N : in Integer; S: in String) is begin My_Mutex.Seize; Put_Line(S); for i in 1..N loop Ada.Integer_Text_IO.Put(A(i)); end loop; New_Line; My_Mutex.Release; end Vector_Output; function Max (A: Vector; N : in Integer) return Integer is x : Integer; begin x := A(1); for i in 1..N loop if A(i)>x then x := A(i); end if; end loop; return x; end Max; function Amount ( A: in Vector; B: in Vector; N : in Integer) return Vector is C : Vector; begin for i in 1..N loop C(i):=A(i)+B(i); end loop; return C; end Amount; function Multiple ( A: in Integer; B: in out Matrix; N : in Integer) return Matrix is C:Matrix; begin for i in 1..N loop for j in 1..N loop C(i,j):=A*B(i,j); end loop; end loop; return C; end Multiple; function Trans (A: in Matrix; N : in Integer) return Matrix is B:Matrix; begin for i in 1..N loop for j in 1..N loop B(i,j):=A(j,i); end loop; end loop; return B; end Trans; function Amount ( A: in Matrix; B: in Matrix; N : in Integer) return Matrix is C:Matrix; begin for i in 1..N loop for j in 1..N loop C(i,j):=A(i,j)+B(i,j); end loop; end loop; return C; end Amount; function Multiple ( A: in Matrix; B: in Matrix; N : in Integer) return Matrix is C:Matrix; begin for row in 1..N loop for col in 1..N loop C(row,col):=0; for inner in 1..N loop C(row,col) := C(row,col) + A(row,inner) * B(inner,col); end loop; end loop; end loop; return C; end Multiple; function Multiple ( A: in Matrix; B: in Vector; N : in Integer) return Vector is C:Vector; begin for row in 1..N loop C(row):=0; for col in 1..N loop C(row) := C(row) + A(row,col) * B(col); end loop; end loop; return C; end Multiple; end Data;
zhmu/ananas
Ada
1,013
ads
with Ada.Containers.Formal_Hashed_Sets; with Ada.Strings.Hash; -- with Dynamic_Strings; use Dynamic_Strings; -- with Bounded_Dynamic_Strings; with Equal8_Pkg; package Equal8 is package Dynamic_Strings is -- pragma SPARK_Mode (On); package Bounded_Dynamic_Strings is new Equal8_Pkg (Component => Character, List_Index => Positive, List => String, Default_Value => ' '); type Dynamic_String is new Bounded_Dynamic_Strings.Sequence; end Dynamic_Strings; use Dynamic_Strings; subtype Subscription_Address is Dynamic_String (Capacity => 255); function Hashed_Subscription_Address (Element : Subscription_Address) return Ada.Containers.Hash_Type is (Ada.Strings.Hash (Value (Element))); package Subscription_Addresses is new Ada.Containers.Formal_Hashed_Sets (Element_Type => Subscription_Address, Hash => Hashed_Subscription_Address, Equivalent_Elements => "="); procedure Foo; end Equal8;
AdaCore/training_material
Ada
3,644
adb
----------------------------------------------------------------------- -- Ada Labs -- -- -- -- Copyright (C) 2008-2009, AdaCore -- -- -- -- Labs is free software; you can redistribute it and/or modify it -- -- under the terms of the GNU General Public License as published by -- -- the Free Software Foundation; either version 2 of the License, or -- -- (at your option) any later version. -- -- -- -- This program is distributed in the hope that it will be useful, -- -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- -- General Public License for more details. You should have received -- -- a copy of the GNU General Public License along with this program; -- -- if not, write to the Free Software Foundation, Inc., 59 Temple -- -- Place - Suite 330, Boston, MA 02111-1307, USA. -- ----------------------------------------------------------------------- with Libm_Single; use Libm_Single; package body Solar_System is function Get_Body (B : Bodies_Enum_T; Bodies : access Bodies_Array_T) return Body_Access_T is begin return Bodies (B)'Access; end Get_Body; procedure Init_Body (B : Body_Access_T; Radius : Float; Color : RGBA_T; Distance : Float; Angle : Float; Speed : Float; Turns_Around : Body_Access_T; Visible : Boolean := True) is begin B.all := (Distance => Distance, Speed => Speed, Angle => Angle, Turns_Around => Turns_Around, Visible => Visible, Radius => Radius, Color => Color, others => <>); end Init_Body; -- implement a function to compute the X coordinate -- x of the reference + distance * cos(angle) function Compute_X(Body_To_Move : Body_T; Turns_Around : Body_T) return Float; -- implement a function to compute the Y coordinate -- y of the reference + distance * sin(angle) function Compute_Y(Body_To_Move : Body_T; Turns_Around : Body_T) return Float; function Compute_X(Body_To_Move : Body_T; Turns_Around : Body_T) return Float is begin return Turns_Around.X + Body_To_Move.Distance * Cos (Body_To_Move.Angle); end Compute_X; function Compute_Y(Body_To_Move : Body_T; Turns_Around : Body_T) return Float is begin return Turns_Around.Y + Body_To_Move.Distance * Sin (Body_To_Move.Angle); end Compute_Y; procedure Move (Body_To_Move : Body_Access_T) is begin Body_To_Move.X := Compute_X(Body_To_Move.all, Body_To_Move.Turns_Around.all); Body_To_Move.Y := Compute_Y(Body_To_Move.all, Body_To_Move.Turns_Around.all); Body_To_Move.Angle := Body_To_Move.Angle + Body_To_Move.Speed; end Move; procedure Move_All (Bodies : access Bodies_Array_T) is begin -- loop over all bodies and call Move procedure for B in Bodies_Enum_T loop -- call the move procedure for each body Move (Get_Body (B, Bodies)); end loop; end Move_All; end Solar_System;
KipodAfterFree/KAF-2019-FireHog
Ada
3,699
adb
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- Sample.My_Field_Type -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 1998 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, distribute with modifications, sublicense, and/or sell -- -- copies of the Software, and to permit persons to whom the Software is -- -- furnished to do so, subject to the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer <[email protected]> 1996 -- Version Control -- $Revision: 1.5 $ -- Binding Version 00.93 ------------------------------------------------------------------------------ with Terminal_Interface.Curses.Forms; use Terminal_Interface.Curses.Forms; -- This is a very simple user defined field type. It accepts only a -- defined character as input into the field. -- package body Sample.My_Field_Type is -- That's simple. There are no field validity checks. function Field_Check (Fld : Field; Typ : My_Data) return Boolean is begin return True; end Field_Check; -- Check exactly against the specified character. function Character_Check (Ch : Character; Typ : My_Data) return Boolean is C : constant Character := Typ.Ch; begin return Ch = C; end Character_Check; end Sample.My_Field_Type;
charlie5/cBound
Ada
1,903
ads
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_change_pointer_control_request_t is -- Item -- type Item is record major_opcode : aliased Interfaces.Unsigned_8; pad0 : aliased Interfaces.Unsigned_8; length : aliased Interfaces.Unsigned_16; acceleration_numerator : aliased Interfaces.Integer_16; acceleration_denominator : aliased Interfaces.Integer_16; threshold : aliased Interfaces.Integer_16; do_acceleration : aliased Interfaces.Unsigned_8; do_threshold : aliased Interfaces.Unsigned_8; end record; -- Item_Array -- type Item_Array is array (Interfaces.C .size_t range <>) of aliased xcb.xcb_change_pointer_control_request_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_change_pointer_control_request_t.Item, Element_Array => xcb.xcb_change_pointer_control_request_t.Item_Array, Default_Terminator => (others => <>)); subtype Pointer is C_Pointers.Pointer; -- Pointer_Array -- type Pointer_Array is array (Interfaces.C .size_t range <>) of aliased xcb.xcb_change_pointer_control_request_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_change_pointer_control_request_t.Pointer, Element_Array => xcb.xcb_change_pointer_control_request_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_change_pointer_control_request_t;
optikos/oasis
Ada
6,369
adb
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- package body Program.Nodes.Type_Declarations is function Create (Type_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Name : not null Program.Elements.Defining_Identifiers .Defining_Identifier_Access; Discriminant_Part : Program.Elements.Definitions.Definition_Access; Is_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Definition : not null Program.Elements.Definitions .Definition_Access; With_Token : Program.Lexical_Elements.Lexical_Element_Access; Aspects : Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; Semicolon_Token : not null Program.Lexical_Elements .Lexical_Element_Access) return Type_Declaration is begin return Result : Type_Declaration := (Type_Token => Type_Token, Name => Name, Discriminant_Part => Discriminant_Part, Is_Token => Is_Token, Definition => Definition, With_Token => With_Token, Aspects => Aspects, Semicolon_Token => Semicolon_Token, Enclosing_Element => null) do Initialize (Result); end return; end Create; function Create (Name : not null Program.Elements.Defining_Identifiers .Defining_Identifier_Access; Discriminant_Part : Program.Elements.Definitions.Definition_Access; Definition : not null Program.Elements.Definitions .Definition_Access; Aspects : Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_Type_Declaration is begin return Result : Implicit_Type_Declaration := (Name => Name, Discriminant_Part => Discriminant_Part, Definition => Definition, Aspects => Aspects, Is_Part_Of_Implicit => Is_Part_Of_Implicit, Is_Part_Of_Inherited => Is_Part_Of_Inherited, Is_Part_Of_Instance => Is_Part_Of_Instance, Enclosing_Element => null) do Initialize (Result); end return; end Create; overriding function Name (Self : Base_Type_Declaration) return not null Program.Elements.Defining_Identifiers .Defining_Identifier_Access is begin return Self.Name; end Name; overriding function Discriminant_Part (Self : Base_Type_Declaration) return Program.Elements.Definitions.Definition_Access is begin return Self.Discriminant_Part; end Discriminant_Part; overriding function Definition (Self : Base_Type_Declaration) return not null Program.Elements.Definitions.Definition_Access is begin return Self.Definition; end Definition; overriding function Aspects (Self : Base_Type_Declaration) return Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access is begin return Self.Aspects; end Aspects; overriding function Type_Token (Self : Type_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Type_Token; end Type_Token; overriding function Is_Token (Self : Type_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Is_Token; end Is_Token; overriding function With_Token (Self : Type_Declaration) return Program.Lexical_Elements.Lexical_Element_Access is begin return Self.With_Token; end With_Token; overriding function Semicolon_Token (Self : Type_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Semicolon_Token; end Semicolon_Token; overriding function Is_Part_Of_Implicit (Self : Implicit_Type_Declaration) return Boolean is begin return Self.Is_Part_Of_Implicit; end Is_Part_Of_Implicit; overriding function Is_Part_Of_Inherited (Self : Implicit_Type_Declaration) return Boolean is begin return Self.Is_Part_Of_Inherited; end Is_Part_Of_Inherited; overriding function Is_Part_Of_Instance (Self : Implicit_Type_Declaration) return Boolean is begin return Self.Is_Part_Of_Instance; end Is_Part_Of_Instance; procedure Initialize (Self : aliased in out Base_Type_Declaration'Class) is begin Set_Enclosing_Element (Self.Name, Self'Unchecked_Access); if Self.Discriminant_Part.Assigned then Set_Enclosing_Element (Self.Discriminant_Part, Self'Unchecked_Access); end if; Set_Enclosing_Element (Self.Definition, Self'Unchecked_Access); for Item in Self.Aspects.Each_Element loop Set_Enclosing_Element (Item.Element, Self'Unchecked_Access); end loop; null; end Initialize; overriding function Is_Type_Declaration_Element (Self : Base_Type_Declaration) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Type_Declaration_Element; overriding function Is_Declaration_Element (Self : Base_Type_Declaration) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Declaration_Element; overriding procedure Visit (Self : not null access Base_Type_Declaration; Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is begin Visitor.Type_Declaration (Self); end Visit; overriding function To_Type_Declaration_Text (Self : aliased in out Type_Declaration) return Program.Elements.Type_Declarations.Type_Declaration_Text_Access is begin return Self'Unchecked_Access; end To_Type_Declaration_Text; overriding function To_Type_Declaration_Text (Self : aliased in out Implicit_Type_Declaration) return Program.Elements.Type_Declarations.Type_Declaration_Text_Access is pragma Unreferenced (Self); begin return null; end To_Type_Declaration_Text; end Program.Nodes.Type_Declarations;
tum-ei-rcs/StratoX
Ada
2,204
adb
with Simulation; with Ada.Text_IO; use Ada.Text_IO; with Units; use Units; package body ublox8.driver with SPARK_Mode => Off, Refined_State => (State => (null)) is cur_loc : GPS_Loacation_Type; -- L,L,A cur_msg : GPS_Message_Type; cur_fix : GPS_FIX_Type; cur_vel : Units.Linear_Velocity_Type := 0.0*Meter/Second; cur_datetime : GPS_DateTime_Type; cur_vacc : Units.Length_Type := 0.0*Meter; procedure reset is null; procedure init is null; function get_Nsat return Unsigned_8 is ( 0 ); procedure update_val is begin --cur_loc.Longitude := Longitude_Type ( Simulation.CSV_here.Get_Column ("Lng")); --cur_loc.Latitude := Latitude_Type ( Simulation.CSV_here.Get_Column ("Lat")); --cur_loc.Altitude := Altitude_Type ( Simulation.CSV_here.Get_Column ("Alt")); cur_fix := NO_FIX;-- GPS_Fix_Type'Enum_Val (Integer ( Simulation.CSV_here.Get_Column ("fix"))); cur_msg.sats := Unsigned_8 ( 0 ); cur_msg.speed := Linear_Velocity_Type ( 0.0 ); -- don't care about the following for now: cur_msg.datetime.year := 2016; cur_msg.datetime.mon := 07; cur_msg.datetime.day := 20; cur_msg.lat := cur_loc.Latitude; cur_msg.lon := cur_loc.Longitude; cur_msg.alt := cur_loc.Altitude; cur_msg.datetime.min := 0; cur_msg.datetime.sec := 0; cur_msg.datetime.hour := 0; end update_val; function get_Position return GPS_Loacation_Type is begin return cur_loc; end; function get_GPS_Message return GPS_Message_Type is begin return cur_msg; end; function get_Vertical_Accuracy return Units.Length_Type is begin return cur_vacc; end get_Vertical_Accuracy; function get_Fix return GPS_Fix_Type is begin return cur_fix; end; function get_Velo return Units.Linear_Velocity_Type is begin return cur_vel; end get_Velo; function get_Time return GPS_DateTime_Type is begin return cur_datetime; end get_Time; -- function get_Direction return Direction_Type; procedure perform_Self_Check (Status : out Error_Type) is begin Status := SUCCESS; end perform_Self_Check; end ublox8.driver;
kimtg/euler-ada
Ada
330
adb
with ada.text_io; use ada.text_io; procedure euler2 is a, b : integer := 1; s : integer := 0; begin loop declare c : integer := a + b; begin exit when c > 4000000; if c mod 2 = 0 then s := s + c; end if; a := b; b := c; end; end loop; put_line(integer'image(s)); end euler2;
simonjwright/sdlada
Ada
3,936
adb
with Ada.Unchecked_Conversion; with Interfaces.C; with SDL; with SDL.Events.Events; with SDL.Events.Keyboards; with SDL.Images.IO; with SDL.Log; with SDL.Video.Rectangles; with SDL.Video.Surfaces; with SDL.Video.Windows.Makers; procedure Load_Surface is use type Interfaces.C.int; W : SDL.Video.Windows.Window; Window_Size : constant SDL.Positive_Sizes := (Width => 800, Height => 640); begin SDL.Log.Set (Category => SDL.Log.Application, Priority => SDL.Log.Debug); if SDL.Initialise (Flags => SDL.Enable_Screen) = True and then SDL.Images.Initialise then SDL.Video.Windows.Makers.Create (Win => W, Title => "Surface (Esc to exit)", Position => SDL.Natural_Coordinates'(X => 100, Y => 100), Size => Window_Size, Flags => SDL.Video.Windows.Resizable); -- Main loop. declare Event : SDL.Events.Events.Events; Window_Surface : SDL.Video.Surfaces.Surface; Image_Surface : SDL.Video.Surfaces.Surface; Image_Area : SDL.Video.Rectangles.Rectangle := (X => 0, Y => 0, Width => 400, Height => 300); Image_Dest_Area : SDL.Video.Rectangles.Rectangle := (X => Window_Size.Width / 2 - Image_Area.Width / 2, Y => Window_Size.Height / 2 - Image_Area.Height / 2, Width => 400, Height => 300); Scaled_Dest_Area : SDL.Video.Rectangles.Rectangle := (X => 10, Y => 10, Width => Image_Area.Width / 4, Height => Image_Area.Height / 4); Scaled_Dest_Area_2 : SDL.Video.Rectangles.Rectangle := (X => 10, Y => 100, Width => Image_Area.Width / 4, Height => Image_Area.Height / 4); Finished : Boolean := False; use type SDL.Events.Keyboards.Key_Codes; begin Window_Surface := W.Get_Surface; SDL.Images.IO.Create (Image_Surface, "../../test/assets/sdl_logo_400_300.png"); Window_Surface.Blit (Self_Area => Image_Dest_Area, Source => Image_Surface, Source_Area => Image_Area); Window_Surface.Blit_Scaled (Self_Area => Scaled_Dest_Area, Source => Image_Surface, Source_Area => SDL.Video.Rectangles.Null_Rectangle); Window_Surface.Blit_Scaled (Self_Area => Scaled_Dest_Area_2, Source => Image_Surface, Source_Area => SDL.Video.Rectangles.Rectangle'(X => 0, Y => 0, Width => Image_Area.Width / 2, Height => Image_Area.Height / 2)); loop W.Update_Surface; while SDL.Events.Events.Poll (Event) loop case Event.Common.Event_Type is when SDL.Events.Quit => Finished := True; when SDL.Events.Keyboards.Key_Down => if Event.Keyboard.Key_Sym.Key_Code = SDL.Events.Keyboards.Code_Escape then Finished := True; end if; when others => null; end case; end loop; exit when Finished; end loop; end; SDL.Log.Put_Debug (""); W.Finalize; SDL.Images.Finalise; SDL.Finalise; end if; end Load_Surface;
reznikmm/matreshka
Ada
3,436
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Tools Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2017, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with AWS.Server; procedure Main is begin AWS.Server.Wait (AWS.Server.No_Server); end Main;
reznikmm/matreshka
Ada
26,138
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with AMF.Elements; with AMF.Internals.Element_Collections; with AMF.Internals.Helpers; with AMF.Internals.Tables.UML_Attributes; with League.Strings.Internals; with Matreshka.Internals.Strings; with AMF.Visitors.UML_Iterators; with AMF.Visitors.UML_Visitors; package body AMF.Internals.UML_Clear_Structural_Feature_Actions is ------------------- -- Enter_Element -- ------------------- overriding procedure Enter_Element (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then AMF.Visitors.UML_Visitors.UML_Visitor'Class (Visitor).Enter_Clear_Structural_Feature_Action (AMF.UML.Clear_Structural_Feature_Actions.UML_Clear_Structural_Feature_Action_Access (Self), Control); end if; end Enter_Element; ------------------- -- Leave_Element -- ------------------- overriding procedure Leave_Element (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then AMF.Visitors.UML_Visitors.UML_Visitor'Class (Visitor).Leave_Clear_Structural_Feature_Action (AMF.UML.Clear_Structural_Feature_Actions.UML_Clear_Structural_Feature_Action_Access (Self), Control); end if; end Leave_Element; ------------------- -- Visit_Element -- ------------------- overriding procedure Visit_Element (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy; Iterator : in out AMF.Visitors.Abstract_Iterator'Class; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Iterator in AMF.Visitors.UML_Iterators.UML_Iterator'Class then AMF.Visitors.UML_Iterators.UML_Iterator'Class (Iterator).Visit_Clear_Structural_Feature_Action (Visitor, AMF.UML.Clear_Structural_Feature_Actions.UML_Clear_Structural_Feature_Action_Access (Self), Control); end if; end Visit_Element; ---------------- -- Get_Result -- ---------------- overriding function Get_Result (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Output_Pins.UML_Output_Pin_Access is begin return AMF.UML.Output_Pins.UML_Output_Pin_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Result (Self.Element))); end Get_Result; ---------------- -- Set_Result -- ---------------- overriding procedure Set_Result (Self : not null access UML_Clear_Structural_Feature_Action_Proxy; To : AMF.UML.Output_Pins.UML_Output_Pin_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Result (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Result; ---------------- -- Get_Object -- ---------------- overriding function Get_Object (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Input_Pins.UML_Input_Pin_Access is begin return AMF.UML.Input_Pins.UML_Input_Pin_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Object (Self.Element))); end Get_Object; ---------------- -- Set_Object -- ---------------- overriding procedure Set_Object (Self : not null access UML_Clear_Structural_Feature_Action_Proxy; To : AMF.UML.Input_Pins.UML_Input_Pin_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Object (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Object; ---------------------------- -- Get_Structural_Feature -- ---------------------------- overriding function Get_Structural_Feature (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Structural_Features.UML_Structural_Feature_Access is begin return AMF.UML.Structural_Features.UML_Structural_Feature_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Structural_Feature (Self.Element))); end Get_Structural_Feature; ---------------------------- -- Set_Structural_Feature -- ---------------------------- overriding procedure Set_Structural_Feature (Self : not null access UML_Clear_Structural_Feature_Action_Proxy; To : AMF.UML.Structural_Features.UML_Structural_Feature_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Structural_Feature (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Structural_Feature; ----------------- -- Get_Context -- ----------------- overriding function Get_Context (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Classifiers.UML_Classifier_Access is begin return AMF.UML.Classifiers.UML_Classifier_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Context (Self.Element))); end Get_Context; --------------- -- Get_Input -- --------------- overriding function Get_Input (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Input_Pins.Collections.Ordered_Set_Of_UML_Input_Pin is begin return AMF.UML.Input_Pins.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Input (Self.Element))); end Get_Input; ------------------------------ -- Get_Is_Locally_Reentrant -- ------------------------------ overriding function Get_Is_Locally_Reentrant (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return Boolean is begin return AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Locally_Reentrant (Self.Element); end Get_Is_Locally_Reentrant; ------------------------------ -- Set_Is_Locally_Reentrant -- ------------------------------ overriding procedure Set_Is_Locally_Reentrant (Self : not null access UML_Clear_Structural_Feature_Action_Proxy; To : Boolean) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Locally_Reentrant (Self.Element, To); end Set_Is_Locally_Reentrant; ----------------------------- -- Get_Local_Postcondition -- ----------------------------- overriding function Get_Local_Postcondition (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint is begin return AMF.UML.Constraints.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Local_Postcondition (Self.Element))); end Get_Local_Postcondition; ---------------------------- -- Get_Local_Precondition -- ---------------------------- overriding function Get_Local_Precondition (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint is begin return AMF.UML.Constraints.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Local_Precondition (Self.Element))); end Get_Local_Precondition; ---------------- -- Get_Output -- ---------------- overriding function Get_Output (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Output_Pins.Collections.Ordered_Set_Of_UML_Output_Pin is begin return AMF.UML.Output_Pins.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Output (Self.Element))); end Get_Output; ----------------- -- Get_Handler -- ----------------- overriding function Get_Handler (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Exception_Handlers.Collections.Set_Of_UML_Exception_Handler is begin return AMF.UML.Exception_Handlers.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Handler (Self.Element))); end Get_Handler; ------------------ -- Get_Activity -- ------------------ overriding function Get_Activity (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Activities.UML_Activity_Access is begin return AMF.UML.Activities.UML_Activity_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Activity (Self.Element))); end Get_Activity; ------------------ -- Set_Activity -- ------------------ overriding procedure Set_Activity (Self : not null access UML_Clear_Structural_Feature_Action_Proxy; To : AMF.UML.Activities.UML_Activity_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Activity (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Activity; ------------------ -- Get_In_Group -- ------------------ overriding function Get_In_Group (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Activity_Groups.Collections.Set_Of_UML_Activity_Group is begin return AMF.UML.Activity_Groups.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_In_Group (Self.Element))); end Get_In_Group; --------------------------------- -- Get_In_Interruptible_Region -- --------------------------------- overriding function Get_In_Interruptible_Region (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Interruptible_Activity_Regions.Collections.Set_Of_UML_Interruptible_Activity_Region is begin return AMF.UML.Interruptible_Activity_Regions.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_In_Interruptible_Region (Self.Element))); end Get_In_Interruptible_Region; ---------------------- -- Get_In_Partition -- ---------------------- overriding function Get_In_Partition (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Activity_Partitions.Collections.Set_Of_UML_Activity_Partition is begin return AMF.UML.Activity_Partitions.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_In_Partition (Self.Element))); end Get_In_Partition; ---------------------------- -- Get_In_Structured_Node -- ---------------------------- overriding function Get_In_Structured_Node (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access is begin return AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_In_Structured_Node (Self.Element))); end Get_In_Structured_Node; ---------------------------- -- Set_In_Structured_Node -- ---------------------------- overriding procedure Set_In_Structured_Node (Self : not null access UML_Clear_Structural_Feature_Action_Proxy; To : AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_In_Structured_Node (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_In_Structured_Node; ------------------ -- Get_Incoming -- ------------------ overriding function Get_Incoming (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge is begin return AMF.UML.Activity_Edges.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Incoming (Self.Element))); end Get_Incoming; ------------------ -- Get_Outgoing -- ------------------ overriding function Get_Outgoing (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge is begin return AMF.UML.Activity_Edges.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Outgoing (Self.Element))); end Get_Outgoing; ------------------------ -- Get_Redefined_Node -- ------------------------ overriding function Get_Redefined_Node (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Activity_Nodes.Collections.Set_Of_UML_Activity_Node is begin return AMF.UML.Activity_Nodes.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefined_Node (Self.Element))); end Get_Redefined_Node; ----------------- -- Get_Is_Leaf -- ----------------- overriding function Get_Is_Leaf (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return Boolean is begin return AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Leaf (Self.Element); end Get_Is_Leaf; ----------------- -- Set_Is_Leaf -- ----------------- overriding procedure Set_Is_Leaf (Self : not null access UML_Clear_Structural_Feature_Action_Proxy; To : Boolean) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Leaf (Self.Element, To); end Set_Is_Leaf; --------------------------- -- Get_Redefined_Element -- --------------------------- overriding function Get_Redefined_Element (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element is begin return AMF.UML.Redefinable_Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefined_Element (Self.Element))); end Get_Redefined_Element; ------------------------------ -- Get_Redefinition_Context -- ------------------------------ overriding function Get_Redefinition_Context (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is begin return AMF.UML.Classifiers.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefinition_Context (Self.Element))); end Get_Redefinition_Context; --------------------------- -- Get_Client_Dependency -- --------------------------- overriding function Get_Client_Dependency (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency is begin return AMF.UML.Dependencies.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Client_Dependency (Self.Element))); end Get_Client_Dependency; ------------------------- -- Get_Name_Expression -- ------------------------- overriding function Get_Name_Expression (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.String_Expressions.UML_String_Expression_Access is begin return AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Name_Expression (Self.Element))); end Get_Name_Expression; ------------------------- -- Set_Name_Expression -- ------------------------- overriding procedure Set_Name_Expression (Self : not null access UML_Clear_Structural_Feature_Action_Proxy; To : AMF.UML.String_Expressions.UML_String_Expression_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Name_Expression (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Name_Expression; ------------------- -- Get_Namespace -- ------------------- overriding function Get_Namespace (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Namespaces.UML_Namespace_Access is begin return AMF.UML.Namespaces.UML_Namespace_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Namespace (Self.Element))); end Get_Namespace; ------------------------ -- Get_Qualified_Name -- ------------------------ overriding function Get_Qualified_Name (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.Optional_String is begin declare use type Matreshka.Internals.Strings.Shared_String_Access; Aux : constant Matreshka.Internals.Strings.Shared_String_Access := AMF.Internals.Tables.UML_Attributes.Internal_Get_Qualified_Name (Self.Element); begin if Aux = null then return (Is_Empty => True); else return (False, League.Strings.Internals.Create (Aux)); end if; end; end Get_Qualified_Name; ------------- -- Context -- ------------- overriding function Context (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Classifiers.UML_Classifier_Access is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Context unimplemented"); raise Program_Error with "Unimplemented procedure UML_Clear_Structural_Feature_Action_Proxy.Context"; return Context (Self); end Context; ------------------------ -- Is_Consistent_With -- ------------------------ overriding function Is_Consistent_With (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy; Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Consistent_With unimplemented"); raise Program_Error with "Unimplemented procedure UML_Clear_Structural_Feature_Action_Proxy.Is_Consistent_With"; return Is_Consistent_With (Self, Redefinee); end Is_Consistent_With; ----------------------------------- -- Is_Redefinition_Context_Valid -- ----------------------------------- overriding function Is_Redefinition_Context_Valid (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy; Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Redefinition_Context_Valid unimplemented"); raise Program_Error with "Unimplemented procedure UML_Clear_Structural_Feature_Action_Proxy.Is_Redefinition_Context_Valid"; return Is_Redefinition_Context_Valid (Self, Redefined); end Is_Redefinition_Context_Valid; ------------------------- -- All_Owning_Packages -- ------------------------- overriding function All_Owning_Packages (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Packages.Collections.Set_Of_UML_Package is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "All_Owning_Packages unimplemented"); raise Program_Error with "Unimplemented procedure UML_Clear_Structural_Feature_Action_Proxy.All_Owning_Packages"; return All_Owning_Packages (Self); end All_Owning_Packages; ----------------------------- -- Is_Distinguishable_From -- ----------------------------- overriding function Is_Distinguishable_From (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy; N : AMF.UML.Named_Elements.UML_Named_Element_Access; Ns : AMF.UML.Namespaces.UML_Namespace_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Distinguishable_From unimplemented"); raise Program_Error with "Unimplemented procedure UML_Clear_Structural_Feature_Action_Proxy.Is_Distinguishable_From"; return Is_Distinguishable_From (Self, N, Ns); end Is_Distinguishable_From; --------------- -- Namespace -- --------------- overriding function Namespace (Self : not null access constant UML_Clear_Structural_Feature_Action_Proxy) return AMF.UML.Namespaces.UML_Namespace_Access is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Namespace unimplemented"); raise Program_Error with "Unimplemented procedure UML_Clear_Structural_Feature_Action_Proxy.Namespace"; return Namespace (Self); end Namespace; end AMF.Internals.UML_Clear_Structural_Feature_Actions;
AdaCore/gpr
Ada
188
adb
with GNAT.IO; use GNAT.IO; with test1; with test2; with test3; with test4; with test5; with test6; with test7; procedure aggregated is begin Put_Line ("Hello World!"); end aggregated;
tum-ei-rcs/StratoX
Ada
368
ads
with System.Dim.Mks; use System.Dim.Mks; package Sensors is subtype Data_Type is Float; type Timestamp_Type is Mks_Type with Dimension => (Symbol => 's', Second => 1, others => 0); subtype Valid_Flag is Boolean; type Sensor_Data_Type is record Data : Data_Type := 0.0; isValid : Valid_Flag := FALSE; end record; function isDataValid(); end Sensors;
AaronC98/PlaneSystem
Ada
17,635
ads
------------------------------------------------------------------------------ -- Ada Web Server -- -- -- -- Copyright (C) 2000-2017, AdaCore -- -- -- -- This library is free software; you can redistribute it and/or modify -- -- it under terms of the GNU General Public License as published by the -- -- Free Software Foundation; either version 3, or (at your option) any -- -- later version. This library is distributed in the hope that it will be -- -- useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- -- -- -- -- -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ------------------------------------------------------------------------------ -- Package to support Server Push feature. This is only supported by Netscape -- browsers. It will not work with Microsoft Internet Explorer. -- For Microsoft Internet Explorer complementary active components -- should be used like java applets or ActiveX controls. with Ada.Calendar; with Ada.Streams; with Ada.Strings.Unbounded; with AWS.Containers.Tables; with AWS.Default; with AWS.Net; with System; private with Ada.Containers.Indefinite_Hashed_Sets; private with Ada.Containers.Indefinite_Hashed_Maps; private with Ada.Containers.Indefinite_Doubly_Linked_Lists; private with Ada.Strings.Hash; generic type Client_Output_Type (<>) is private; -- Data type client want to send through server push type Client_Environment is private; -- Data type to keep client context. This context will be passed to the -- conversion routine below. with function To_Stream_Array (Output : Client_Output_Type; Client : Client_Environment) return Ada.Streams.Stream_Element_Array; -- Function used for convert Client_Output_Type to Stream_Output_Type. -- This is used by the server to prepare the data to be sent to the -- clients. package AWS.Server.Push is use Ada; use Ada.Streams; use Ada.Strings.Unbounded; Client_Gone : exception; -- Raised when a client is not responding Closed : exception; -- Raised when trying to register to a closed push server Duplicate_Client_Id : exception; -- Raised in trying to register an already registered client type Object is limited private; -- This is the push server object. A push server has two modes, either it -- is Open or Closed. When open it will send data to registered -- clients. No data will be sent to registered client if the server is -- Closed. type Mode is (Plain, Multipart, Chunked); -- Described the mode to communicate with the client. -- Plain : no transformation is done, the data are sent as-is -- Multipart : data are MIME encoded. -- Chuncked : data are chunked, a piece of data is sent in small pieces. subtype Client_Key is String; -- The Client Id key representation. In a server each client must have a -- uniq ID. This Id is used for registration and for sending data to -- specific client. type Wait_Counter_Type is mod System.Max_Binary_Modulus; subtype Group_Set is Containers.Tables.VString_Array; Empty_Group : constant Group_Set := (1 .. 0 => Null_Unbounded_String); procedure Register (Server : in out Object; Client_Id : Client_Key; Socket : Net.Socket_Access; Environment : Client_Environment; Init_Data : Client_Output_Type; Init_Content_Type : String := ""; Kind : Mode := Plain; Duplicated_Age : Duration := Duration'Last; Groups : Group_Set := Empty_Group; Timeout : Duration := Default.Send_Timeout); -- Add client identified by Client_Id to the server subscription -- list and send the Init_Data (as a Init_Content_Type mime content) to -- him. After registering this client will be able to receive pushed data -- from the server in broadcasting mode. -- If Duplicated_Age less than age of the already registered same Client_Id -- then old one will be unregistered first (no exception will be raised). -- The Timeout is not for socket send timeout, but for internal waiting for -- write availability timeout. procedure Register (Server : in out Object; Client_Id : Client_Key; Socket : Net.Socket_Type'Class; Environment : Client_Environment; Init_Data : Client_Output_Type; Init_Content_Type : String := ""; Kind : Mode := Plain; Duplicated_Age : Duration := Duration'Last; Groups : Group_Set := Empty_Group; Timeout : Duration := Default.Send_Timeout); -- Same as above but with Socket_Type'Class parameter. -- Is not recommended, use above one with Socket_Access parameter. procedure Register (Server : in out Object; Client_Id : Client_Key; Socket : Net.Socket_Type'Class; Environment : Client_Environment; Content_Type : String := ""; Kind : Mode := Plain; Duplicated_Age : Duration := Duration'Last; Groups : Group_Set := Empty_Group; Timeout : Duration := Default.Send_Timeout); -- Same as above but without sending initial data. -- Content_Type applicable only when Kind parameter is Plain or Chunked, -- in Multipart server push mode each server push message would have own -- Content_Type defined. -- Is not recommended, use above one with Socket_Access parameter. procedure Unregister (Server : in out Object; Client_Id : Client_Key; Close_Socket : Boolean := True); -- Removes client Client_Id from server subscription list. The associated -- client's socket will be closed if Close_Socket is True. No exception is -- raised if Client_Id was not registered. procedure Unregister_Clients (Server : in out Object; Close_Sockets : Boolean := True); -- Remove all registered clients from the server. Closes if Close_Sockets -- is set to True (default) otherwise the sockets remain open. After this -- call the sever will still in running mode. Does nothing if there is no -- client registered. procedure Subscribe (Server : in out Object; Client_Id : Client_Key; Group_Id : String); -- Subscribe client to the group procedure Subscribe_Copy (Server : in out Object; Source : String; Target : String); -- Subscribe everybody in the group Source to the group Target. -- If Source is empty then subscribe all clients to the group Target. procedure Unsubscribe (Server : in out Object; Client_Id : Client_Key; Group_Id : String); -- Remove group from client's group list procedure Unsubscribe_Copy (Server : in out Object; Source : String; Target : String); -- Unsubscribe everybody in the group Source from the group Target. -- If Source is empty then unsubscribe all clients from the group Target. procedure Send_To (Server : in out Object; Client_Id : Client_Key; Data : Client_Output_Type; Content_Type : String := ""; Thin_Id : String := ""); -- Push data to a specified client identified by Client_Id -- Thin_Id is to be able to replace messages in the send client queue -- with the newer one with the same Thin_Id. procedure Send (Server : in out Object; Data : Client_Output_Type; Group_Id : String := ""; Content_Type : String := ""; Thin_Id : String := ""; Client_Gone : access procedure (Client_Id : String) := null); -- Push data to group of clients (broadcast) subscribed to the server. -- If Group_Id is empty, data transferred to each client. -- Call Client_Gone for each client with broken socket. -- Thin_Id is to be able to replace messages in the send client queue -- with the newer one with the same Thin_Id. generic with procedure Client_Gone (Client_Id : String); procedure Send_G (Server : in out Object; Data : Client_Output_Type; Group_Id : String := ""; Content_Type : String := ""; Thin_Id : String := ""); -- Same like before, but generic for back compatibility function Count (Server : Object) return Natural; -- Returns the number of registered clients in the server procedure Info (Server : in out Object; Clients : out Natural; Groups : out Natural; Process : access procedure (Client_Id : Client_Key; Address : String; State : String; Environment : Client_Environment; Kind : Mode; Groups : Group_Set) := null); -- Returns the number of registered clients and groups in the server. -- Call Process routine for each client if defined. -- Test internal integrity. function Is_Open (Server : Object) return Boolean; -- Return True if the server is open, meaning server is still running, -- ready to accept client's registration and still sending data to -- clients. -- Shutdown routines put the server in a Closed mode. The routines below -- provides a way to eventually close the socket, to send some -- finalization data. procedure Shutdown (Server : in out Object; Close_Sockets : Boolean := True); -- Unregistered all clients and close all associated connections (socket) -- if Close_Socket is True. The server will be in Closed mode. After this -- call any client trying to register will get the Closed exception. It is -- possible to reactivate the server with Restart. procedure Shutdown (Server : in out Object; Final_Data : Client_Output_Type; Final_Content_Type : String := ""); -- Idem as above but it send Final_Data (as a Data_Content_Type mime -- content) before closing connections. procedure Shutdown_If_Empty (Server : in out Object; Open : out Boolean); -- Server will be shutdown (close mode) if there is no more active clients -- (Count = 0). Returns new server status in Open (Open will be True if -- server is in Open mode and False otherwise). After this call any client -- trying to register will get the Closed exception. It is possible to -- reactivate the server with Restart. procedure Restart (Server : in out Object); -- Set server to Open mode. Server will again send data to registered -- clients. It does nothing if server was already open. procedure Info (Size : out Natural; Max_Size : out Natural; Max_Size_DT : out Calendar.Time; Counter : out Wait_Counter_Type); -- Size would return number of currently waiting sockets. -- Counter would return total number of waited sockets from start. function Wait_Send_Completion (Timeout : Duration) return Boolean; -- Wait for all data sending in all server_push objects of the current -- package instance. -- Return True if wait successful. False in timeout. type Error_Handler is not null access procedure (Message : String); procedure Set_Internal_Error_Handler (Handler : Error_Handler); -- Set the handler of the internal fatal errors private package Group_Sets is new Ada.Containers.Indefinite_Hashed_Sets (String, Ada.Strings.Hash, Equivalent_Elements => "="); -- Package instance to keep each client subscribed groups type Message_Type (Size : Stream_Element_Count; Thin_Size : Natural) is record Data : Stream_Element_Array (1 .. Size); Thin : String (1 .. Thin_Size); end record; package Chunk_Lists is new Ada.Containers.Indefinite_Doubly_Linked_Lists (Message_Type); package Thin_Indexes is new Ada.Containers.Indefinite_Hashed_Maps (Key_Type => String, Element_Type => Chunk_Lists.Cursor, Hash => Strings.Hash, Equivalent_Keys => "=", "=" => Chunk_Lists."="); type Client_Holder; type Client_Holder_Access is access all Client_Holder; package Tables is new Ada.Containers.Indefinite_Hashed_Maps (String, Client_Holder_Access, Strings.Hash, "="); type Map_Access is access all Tables.Map; package Group_Maps is new Ada.Containers.Indefinite_Hashed_Maps (String, Map_Access, Strings.Hash, "="); subtype Group_Map is Group_Maps.Map; protected type Object is function Count return Natural; -- Returns the number of registered client procedure Unregister_Clients (Queue : out Tables.Map; Open : Boolean); -- Unregister all clients, close associated sockets if Close_Socket is -- set to True. procedure Shutdown_If_Empty (Open : out Boolean); -- See above procedure Restart; -- See above procedure Shutdown (Final_Data : Client_Output_Type; Final_Content_Type : String; Queue : out Tables.Map); -- See above procedure Register (Client_Id : Client_Key; Holder : in out Client_Holder_Access; Duplicated : out Client_Holder_Access; Duplicated_Age : Duration; Ext_Sock_Alloc : Boolean); -- See above. -- Holder would be released in case of registration failure. procedure Send_To (Client_Id : Client_Key; Data : Client_Output_Type; Content_Type : String; Thin_Id : String; Holder : out Client_Holder_Access); -- Holder out parameter not null mean that we have to convert Data into -- Stream_Element_Array, put it into socket and send the socket into -- waiter. procedure Send (Data : Client_Output_Type; Group_Id : String; Content_Type : String; Thin_Id : String; Queue : out Tables.Map); -- Send Data to all clients registered. -- Queue would contain client holders available to send data or those -- failed on the write waiting state. procedure Get_Data (Holder : Client_Holder_Access; Data : out Stream_Element_Array; Last : out Stream_Element_Offset); -- Return data for the Waiter task. -- Could be called only for the write busy client. -- If no data to send client become not write busy. procedure Unregister (Client_Id : Client_Key; Holder : out Client_Holder_Access); -- Unregister client and return its holder procedure Waiter_Error (Holder : Client_Holder_Access; Message : String); -- Waiter task would call it on socket error function Is_Open return Boolean; -- See above procedure Subscribe (Client_Id : Client_Key; Group_Id : String); -- See above procedure Subscribe_Copy (Source : String; Target : String); -- See above procedure Unsubscribe (Client_Id : Client_Key; Group_Id : String); -- See above procedure Unsubscribe_Copy (Source : String; Target : String); procedure Info (Client_Count : out Natural; Group_Count : out Natural; Process : access procedure (Client_Id : Client_Key; Address : String; State : String; Environment : Client_Environment; Kind : Mode; Groups : Group_Set)); private Container : Tables.Map; Groups : Group_Map; Open : Boolean := True; end Object; end AWS.Server.Push;
zhmu/ananas
Ada
3,045
adb
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . I N T E R R U P T _ M A N A G E M E N T -- -- -- -- B o d y -- -- -- -- Copyright (C) 1991-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNARL was developed by the GNARL team at Florida State University. -- -- Extensive contributions were provided by Ada Core Technologies, Inc. -- -- -- ------------------------------------------------------------------------------ -- This is the NT version of this package with System.OS_Interface; use System.OS_Interface; package body System.Interrupt_Management is ---------------- -- Initialize -- ---------------- procedure Initialize is begin -- "Reserve" all the interrupts, except those that are explicitly -- defined. for J in Interrupt_ID'Range loop Reserve (J) := True; end loop; Reserve (SIGINT) := False; Reserve (SIGILL) := False; Reserve (SIGABRT) := False; Reserve (SIGFPE) := False; Reserve (SIGSEGV) := False; Reserve (SIGTERM) := False; end Initialize; end System.Interrupt_Management;
RREE/ada-util
Ada
14,701
adb
----------------------------------------------------------------------- -- util-http-clients-tests -- Unit tests for HTTP client -- Copyright (C) 2012, 2020, 2021 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Unchecked_Deallocation; with Util.Test_Caller; with Util.Strings.Transforms; with Util.Http.Tools; with Util.Strings; with Util.Log.Loggers; package body Util.Http.Clients.Tests is -- The logger Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Util.Http.Clients.Tests"); package body Http_Tests is package Caller is new Util.Test_Caller (Http_Test, "Http-" & NAME); procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is begin Caller.Add_Test (Suite, "Test Util.Http.Clients." & NAME & ".Get", Test_Http_Get'Access); Caller.Add_Test (Suite, "Test Util.Http.Clients." & NAME & ".Head", Test_Http_Head'Access); Caller.Add_Test (Suite, "Test Util.Http.Clients." & NAME & ".Post", Test_Http_Post'Access); Caller.Add_Test (Suite, "Test Util.Http.Clients." & NAME & ".Put", Test_Http_Put'Access); Caller.Add_Test (Suite, "Test Util.Http.Clients." & NAME & ".Delete", Test_Http_Delete'Access); Caller.Add_Test (Suite, "Test Util.Http.Clients." & NAME & ".Options", Test_Http_Options'Access); Caller.Add_Test (Suite, "Test Util.Http.Clients." & NAME & ".Patch", Test_Http_Patch'Access); Caller.Add_Test (Suite, "Test Util.Http.Clients." & NAME & ".Get (timeout)", Test_Http_Timeout'Access); end Add_Tests; overriding procedure Set_Up (T : in out Http_Test) is begin Test (T).Set_Up; Register; end Set_Up; end Http_Tests; overriding procedure Set_Up (T : in out Test) is begin Log.Info ("Starting test server"); T.Server := new Test_Server; T.Server.Start; end Set_Up; overriding procedure Tear_Down (T : in out Test) is procedure Free is new Ada.Unchecked_Deallocation (Object => Test_Server'Class, Name => Test_Server_Access); begin if T.Server /= null then Log.Info ("Stopping test server"); T.Server.Stop; Free (T.Server); T.Server := null; end if; end Tear_Down; -- ------------------------------ -- Process the line received by the server. -- ------------------------------ overriding procedure Process_Line (Into : in out Test_Server; Line : in Ada.Strings.Unbounded.Unbounded_String; Stream : in out Util.Streams.Texts.Reader_Stream'Class; Client : in out Util.Streams.Sockets.Socket_Stream'Class) is L : constant String := Ada.Strings.Unbounded.To_String (Line); Pos : Natural := Util.Strings.Index (L, ' '); begin if Pos > 0 and Into.Method = UNKNOWN then if L (L'First .. Pos - 1) = "GET" then Into.Method := GET; elsif L (L'First .. Pos - 1) = "HEAD" then Into.Method := HEAD; elsif L (L'First .. Pos - 1) = "POST" then Into.Method := POST; elsif L (L'First .. Pos - 1) = "PUT" then Into.Method := PUT; elsif L (L'First .. Pos - 1) = "DELETE" then Into.Method := DELETE; elsif L (L'First .. Pos - 1) = "OPTIONS" then Into.Method := OPTIONS; elsif L (L'First .. Pos - 1) = "PATCH" then Into.Method := PATCH; else Into.Method := UNKNOWN; end if; end if; Pos := Util.Strings.Index (L, ':'); if Pos > 0 then if L (L'First .. Pos) = "Content-Type:" then Into.Content_Type := Ada.Strings.Unbounded.To_Unbounded_String (L (Pos + 2 .. L'Last - 2)); elsif L (L'First .. Pos) = "Content-Length:" then Into.Length := Natural'Value (L (Pos + 1 .. L'Last - 2)); end if; end if; -- Don't answer if we check the timeout. if Into.Test_Timeout then return; end if; if L'Length = 2 and then Into.Length > 0 then for I in 1 .. Into.Length loop declare C : Character; begin Stream.Read (C); Ada.Strings.Unbounded.Append (Into.Result, C); end; end loop; declare Output : Util.Streams.Texts.Print_Stream; begin Output.Initialize (Client'Unchecked_Access); Output.Write ("HTTP/1.1 200 Found" & ASCII.CR & ASCII.LF); Output.Write ("Content-Length: 4" & ASCII.CR & ASCII.LF); Output.Write (ASCII.CR & ASCII.LF); Output.Write ("OK" & ASCII.CR & ASCII.LF); Output.Flush; end; elsif L'Length = 2 then declare Output : Util.Streams.Texts.Print_Stream; begin Output.Initialize (Client'Unchecked_Access); Output.Write ("HTTP/1.1 204 No Content" & ASCII.CR & ASCII.LF); Output.Write (ASCII.CR & ASCII.LF); Output.Flush; end; end if; Log.Info ("Received: {0}", L); end Process_Line; -- ------------------------------ -- Get the test server base URI. -- ------------------------------ function Get_Uri (T : in Test) return String is begin return "http://" & T.Server.Get_Host & ":" & Util.Strings.Image (T.Server.Get_Port); end Get_Uri; -- ------------------------------ -- Test the http Get operation. -- ------------------------------ procedure Test_Http_Get (T : in out Test) is Request : Client; Reply : Response; begin Request.Get ("http://www.google.com", Reply); Request.Set_Timeout (5.0); Request.Set_Header ("Accept", "text/html"); Util.Http.Add_Int_Header (Request, "DNT", 0); T.Assert (Reply.Get_Status = 200 or Reply.Get_Status = 302, "Get status is invalid: " & Natural'Image (Reply.Get_Status)); Util.Http.Tools.Save_Response (Util.Tests.Get_Test_Path ("http_get.txt"), Reply, True); -- Check the content. declare Content : constant String := Util.Strings.Transforms.To_Lower_Case (Reply.Get_Body); begin Util.Tests.Assert_Matches (T, ".*html.*", Content, "Invalid GET content"); end; T.Assert (Reply.Contains_Header ("Content-Type"), "Header Content-Type not found"); T.Assert (not Reply.Contains_Header ("Content-Type-Invalid-Missing"), "Some invalid header found"); -- Check one header. declare Content : constant String := Reply.Get_Header ("Content-Type"); begin T.Assert (Content'Length > 0, "Empty Content-Type header"); Util.Tests.Assert_Matches (T, ".*text/html.*", Content, "Invalid content type"); end; end Test_Http_Get; -- ------------------------------ -- Test the http HEAD operation. -- ------------------------------ procedure Test_Http_Head (T : in out Test) is Request : Client; Reply : Response; begin Request.Head ("http://www.google.com", Reply); Request.Set_Timeout (5.0); Request.Add_Header ("Accept", "text/html"); T.Assert (Reply.Get_Status = 200 or Reply.Get_Status = 302, "Get status is invalid: " & Natural'Image (Reply.Get_Status)); Util.Http.Tools.Save_Response (Util.Tests.Get_Test_Path ("http_head.txt"), Reply, True); T.Assert (Reply.Contains_Header ("Content-Type"), "Header Content-Type not found"); T.Assert (not Reply.Contains_Header ("Content-Type-Invalid-Missing"), "Some invalid header found"); -- Check one header. declare Content : constant String := Reply.Get_Header ("Content-Type"); begin T.Assert (Content'Length > 0, "Empty Content-Type header"); Util.Tests.Assert_Matches (T, ".*text/html.*", Content, "Invalid content type"); end; end Test_Http_Head; -- ------------------------------ -- Test the http POST operation. -- ------------------------------ procedure Test_Http_Post (T : in out Test) is Request : Client; Reply : Response; Uri : constant String := T.Get_Uri; begin Log.Info ("Post on " & Uri); T.Server.Method := UNKNOWN; Request.Post (Uri & "/post", "p1=1", Reply); T.Assert (T.Server.Method = POST, "Invalid method received by server"); Util.Tests.Assert_Equals (T, "application/x-www-form-urlencoded", T.Server.Content_Type, "Invalid content type received by server"); Util.Tests.Assert_Equals (T, "OK" & ASCII.CR & ASCII.LF, Reply.Get_Body, "Invalid response"); Util.Http.Tools.Save_Response (Util.Tests.Get_Test_Path ("http_post.txt"), Reply, True); end Test_Http_Post; -- ------------------------------ -- Test the http PUT operation. -- ------------------------------ procedure Test_Http_Put (T : in out Test) is Request : Client; Reply : Response; Uri : constant String := T.Get_Uri; begin Log.Info ("Put on " & Uri); T.Server.Method := UNKNOWN; Request.Add_Header ("Content-Type", "application/x-www-form-urlencoded"); Request.Set_Timeout (1.0); T.Assert (Request.Contains_Header ("Content-Type"), "Missing Content-Type"); Request.Put (Uri & "/put", "p1=1", Reply); T.Assert (T.Server.Method = PUT, "Invalid method received by server"); Util.Tests.Assert_Equals (T, "application/x-www-form-urlencoded", T.Server.Content_Type, "Invalid content type received by server"); Util.Tests.Assert_Equals (T, "OK" & ASCII.CR & ASCII.LF, Reply.Get_Body, "Invalid response"); Util.Http.Tools.Save_Response (Util.Tests.Get_Test_Path ("http_put.txt"), Reply, True); end Test_Http_Put; -- ------------------------------ -- Test the http DELETE operation. -- ------------------------------ procedure Test_Http_Delete (T : in out Test) is Request : Client; Reply : Response; Uri : constant String := T.Get_Uri; begin Log.Info ("Delete on " & Uri); T.Server.Method := UNKNOWN; Request.Add_Header ("Content-Type", "application/x-www-form-urlencoded"); Request.Set_Timeout (1.0); T.Assert (Request.Contains_Header ("Content-Type"), "Missing Content-Type"); Request.Delete (Uri & "/delete", Reply); T.Assert (T.Server.Method = DELETE, "Invalid method received by server"); Util.Tests.Assert_Equals (T, "application/x-www-form-urlencoded", T.Server.Content_Type, "Invalid content type received by server"); Util.Tests.Assert_Equals (T, "", Reply.Get_Body, "Invalid response"); Util.Tests.Assert_Equals (T, 204, Reply.Get_Status, "Invalid status response"); end Test_Http_Delete; -- ------------------------------ -- Test the http OPTIONS operation. -- ------------------------------ procedure Test_Http_Options (T : in out Test) is Request : Client; Reply : Response; Uri : constant String := T.Get_Uri; begin Log.Info ("Delete on " & Uri); T.Server.Method := UNKNOWN; Request.Add_Header ("Content-Type", "application/x-www-form-urlencoded"); Request.Set_Timeout (1.0); T.Assert (Request.Contains_Header ("Content-Type"), "Missing Content-Type"); Request.Options (Uri & "/options", Reply); T.Assert (T.Server.Method = OPTIONS, "Invalid method received by server"); Util.Tests.Assert_Equals (T, "application/x-www-form-urlencoded", T.Server.Content_Type, "Invalid content type received by server"); Util.Tests.Assert_Equals (T, "", Reply.Get_Body, "Invalid response"); Util.Tests.Assert_Equals (T, 204, Reply.Get_Status, "Invalid status response"); end Test_Http_Options; -- ------------------------------ -- Test the http PATCH operation. -- ------------------------------ procedure Test_Http_Patch (T : in out Test) is Request : Client; Reply : Response; Uri : constant String := T.Get_Uri; begin Log.Info ("Patch on " & Uri); T.Server.Method := UNKNOWN; Request.Add_Header ("Content-Type", "application/x-www-form-urlencoded"); Request.Set_Timeout (1.0); T.Assert (Request.Contains_Header ("Content-Type"), "Missing Content-Type"); Request.Patch (Uri & "/patch", "patch-content", Reply); T.Assert (T.Server.Method = PATCH, "Invalid method received by server"); Util.Tests.Assert_Equals (T, "application/x-www-form-urlencoded", T.Server.Content_Type, "Invalid content type received by server"); Util.Tests.Assert_Equals (T, 200, Reply.Get_Status, "Invalid status response"); Util.Tests.Assert_Equals (T, "OK" & ASCII.CR & ASCII.LF, Reply.Get_Body, "Invalid response"); end Test_Http_Patch; -- ------------------------------ -- Test the http timeout. -- ------------------------------ procedure Test_Http_Timeout (T : in out Test) is Request : Client; Reply : Response; Uri : constant String := T.Get_Uri; begin Log.Info ("Timeout on " & Uri); T.Server.Test_Timeout := True; T.Server.Method := UNKNOWN; Request.Set_Timeout (0.5); begin Request.Get (Uri & "/timeout", Reply); T.Fail ("No Connection_Error exception raised"); exception when Connection_Error => null; end; end Test_Http_Timeout; end Util.Http.Clients.Tests;
zhmu/ananas
Ada
687
adb
-- { dg-do run } -- { dg-options "-gnatws" } with Ada.Unchecked_Conversion; procedure Unchecked_Convert1 is type Byte is mod 2**8; type Stream is array (Natural range <>) of Byte; type Rec is record I1, I2 : Integer; end record; function Do_Sum (R : Rec) return Integer is begin return R.I1 + R.I2; end; function Sum (S : Stream) return Integer is subtype Chunk is Stream (1 .. Rec'Size / 8); function To_Chunk is new Ada.Unchecked_Conversion (Chunk, Rec); begin return Do_Sum (To_Chunk (S(S'First .. S'First + Rec'Size / 8 - 1))); end; A : Stream (1..9) := (others => 0); I : Integer; begin A (9) := 1; I := Sum (A(1..8)); end;
AdaCore/gpr
Ada
689
ads
-- -- Copyright (C) 2019-2023, AdaCore -- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -- with System; with Gpr_Parser.Analysis; use Gpr_Parser.Analysis; -- This package provides conversion helpers to switch between types as found -- in Gpr_Parser's public Ada API and the corresponding C API. Use it -- when interfacing with foreign code. package Gpr_Parser.C is function C_Context (Context : Analysis_Context) return System.Address; function Ada_Context (Context : System.Address) return Analysis_Context; function C_Unit (Unit : Analysis_Unit) return System.Address; function Ada_Unit (Unit : System.Address) return Analysis_Unit; end Gpr_Parser.C;
VMika/DES_Ada
Ada
3,321
adb
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Interfaces.COBOL; use Interfaces.COBOL; package body P_StructuralTypes is package T_Bit_IO is new Ada.Text_IO.Modular_IO(T_Bit); function O_plus (b1 : in T_BinaryUnit ; b2 : in T_BinaryUnit) return T_BinaryUnit is Operand_Error : exception; res : T_BinaryUnit(1..b1'Length); begin if (b1'Length /= b2'Length) then raise Operand_Error; else for i in 1..b1'Length loop res(i) := b1(b1'First + i - 1) + b2(b2'First + i - 1); end loop; end if; return res; end; function TextBlock_To_Binary (Block : String) return T_BinaryBlock is BinaryTextBlock : T_BinaryBlock; IntValue : Integer; BitRank : Integer; begin for i in Block'Range loop BitRank := 0; IntValue := Character'Pos(Block(i)); while BitRank /= 8 loop BinaryTextBlock(i * 8 - BitRank) := T_Bit(IntValue mod 2); IntValue := IntValue / 2; BitRank := BitRank + 1; end loop; end loop; return BinaryTextBlock; end; function Byte_To_CharacterCode (Byte : in T_Byte) return Integer is CharCode : Integer; begin CharCode := 0; for i in Byte'Range loop CharCode := CharCode + Integer((Byte(Byte'First + i - 1)))*(2**(Byte'Last - i)); end loop; return CharCode; end; function Integer_To_Binary (Number : Integer; NbBits : Integer) return T_BinaryUnit is BitRank : Integer; Unit : T_BinaryUnit (1..NbBits); Tmp : Integer := Number; begin if (2 ** (NbBits +1)) < Number then raise Conversion_Error; else BitRank := 0; while Tmp /= 0 loop Unit(NbBits - BitRank) := T_Bit(Tmp mod 2); Tmp := Tmp / 2; BitRank := BitRank + 1; end loop; return Unit; end if; end; procedure Replace_Block (Ptr_BinaryContainer : in BinaryContainer_Access; Index : in Integer; BinaryBlock : in T_BinaryBlock) is begin Ptr_BinaryContainer.all(Index) := BinaryBlock; end; procedure Put_BinaryUnit (Unit : T_BinaryUnit) is begin Put ("Print of Unit") ; New_Line ; for i in Unit'Range loop T_Bit_IO.Put (Unit(i)) ; end loop; New_Line; end; procedure Left_Shift (Unit : in out T_BinaryUnit ; Iteration : in Positive) is OverflowBit : T_Bit; begin for Round in 1..Iteration loop OverflowBit := Unit(1); for Index in 1..Unit'Last-1 loop Unit(Index) := Unit(Index+1); end loop; Unit(Unit'Last) := OverflowBit; end loop; end; function Left (Block : T_BinaryUnit) return T_BinaryUnit is begin return Block (1..Block'Last/2); end; function Right (Block : T_BinaryUnit) return T_BinaryUnit is begin return Block ((Block'Last/2)+1..Block'Last); end; end P_StructuralTypes;
twinbee/djikstrasStabilizing
Ada
10,035
adb
----------------------------csc410/prog4/as4.adb---------------------------- -- Author: Matthew Bennett -- Class: CSC410 Burgess -- Date: 10-05-04 Modified: 10-17-04 -- Due: 10-12-04 -- Desc: Assignment 4: DJIKSTRA'S STABILIZING ALGORITHM -- -- a nonproduction implementation of -- DJIKSTRA's algorithm which describes -- mutual exclusion, fairness, and deadlock avoidance -- n processes (TASKS), and is self-correcting -- -- BRIEF: (please read all of this) -- n processes form a [directed] virtual ring topology, and -- use an internal integer counter called flag to determine -- which may go next. In general, a process may not proceed -- unless its flag is not equal to its previous neighbor, except for process0 -- -- The algorithm is ASYMMETRIC. Process0 behaves differently than -- processes [1..n] in several respects. Also, since the -- asymmetrical behavior is neccessary for the algorithm to -- continue, some other process MUST assume the behavior of -- Process0 in case that process is killed or quits. -- -- The algorithm is self-stabilizing, so it should operate on a -- "dummy resource" for several iterations (up to 10) eahc time -- the tasks are reordered. id will try to add this feature to -- code soon. -- !! MUTUAL EXCLUSION IS NOT GUARANTEED UNTIL THE TASKS STABILIZE !! -- -- DJIKSTRA implemented as described in -- "Algorithms for Mutual Exclusion", M. Raynal -- MIT PRESS Cambridge, 1986 ISBN: 0-262-18119-3 -- with minor revisions ---------------------------------------------------------------- -- Refactorings 10-05-04: (denoted @FIX@) -- (1) enumerated types {_PREV_, _SELF_, _NEXT_} instead of {-1, 0 1} -- (2) message passing / reindezvouz instead of function calls -- (3) slect instead of case -- (4) linked list of processes instread of array -- (5) randomly kill of processes including process #1, check for stabiliz. -- (6) remove "magic" constants ---------------------------------------------------------------- -- dependencies -- style note: the reasons to "with in" but not "use" packages are -- (1) to avoid crowding of the namespace -- (2) to be explicit where abstract data types and methods come from. -- for instance, line randomPool : Ada.Numerics.Float_Random.Generator; -- is more explicit than randomPool : Generator; WITH ADA.TEXT_IO; USE ADA.TEXT_IO; WITH ADA.INTEGER_TEXT_IO; USE ADA.INTEGER_TEXT_IO; WITH ADA.NUMERICS.FLOAT_RANDOM; USE ADA.NUMERICS.FLOAT_RANDOM; --by request only WITH ADA.CALENDAR; -- (provides cast: natural -> time for input into delay) WITH ADA.STRINGS; USE ADA.STRINGS; ---------------------------------------------------------------- ---------------------------------------------------------------- procedure Main is -- Globals -- G : Generator; -- Float Random Number Generator -- End Globals -- type RX_Task; type RX_Ptr is access RX_Task; ---- Begin RX_Task declaration and definition ---- task type RX_Task is entry Start (id : Integer; this : RX_Ptr; left : RX_Ptr; right : RX_Ptr; thisFlag : Integer; leftFlag : Integer; rightFlag : Integer; numProcesses : Integer; lowId : Boolean); entry Receive (mesgType : Character; id : Integer; flag : Integer; left : RX_Ptr; right : RX_Ptr; lowId : Boolean); end RX_Task; task body RX_Task is procArray : array (0..2) of RX_Ptr; flagArray : array (0..2) of Integer := (Others => 0); myId,recId,num_count : Integer; ShouldIDie : Boolean := false; lowestId : Boolean; ---- Begin AL_Task declaration and definition ---- task type AL_Task is end AL_Task; task body AL_Task is begin loop if (lowestId) then -- Protocol 0 -- loop exit when flagArray(1) = flagArray(0); end loop; -- Begin Critical Section -- Put (myId, (1+(4*myId))); Put (" in CS"); New_Line; Delay (Standard.Duration(random(g) * 4.0)); Put (myId, (1+(4*myId))); Put (" out CS"); New_Line; -- End Critical Section -- flagArray(1) := (flagArray(1) + 1) mod num_count; procArray(2).Receive('U', myId, flagArray(1), null, null, false); else -- Protocol id -- loop exit when (flagArray(1) /= flagArray(0)); end loop; -- Begin Critical Section -- Put (myId, (1+(4*myId))); Put (" in CS"); New_Line; Delay (Standard.Duration(random(g) * 4.0)); Put (myId, (1+(4*myId))); Put (" out CS"); New_Line; -- End Critical Section -- flagArray(1) := flagArray(0); procArray(2).Receive('U', myId, flagArray(1), null, null, false); end if; end loop; end AL_Task; ---- End AL_Task declaration and definition ---- type AL_Ptr is access AL_Task; ptr : AL_Ptr; begin -- Entry Point to initalize our id's from the main procedure accept Start (id : Integer; this : RX_Ptr; left : RX_Ptr; right : RX_Ptr; thisFlag : Integer; leftFlag : Integer; rightFlag : Integer; numProcesses : Integer; lowId : Boolean) do procArray(1) := this; procArray(0) := left; procArray(2) := right; flagArray(1) := thisFlag; flagArray(0) := leftFlag; flagArray(2) := rightFlag; num_count := numProcesses; myId := id; lowestId := lowId; end Start; ptr := new AL_Task; -- Start our message handling loop waiting for messages to arrive -- loop accept Receive (mesgType : Character; id : Integer; flag : Integer; left : RX_Ptr; right : RX_Ptr; lowId : Boolean) do case mesgType is when 'U' => begin Put(id, (80 - 10 ) ); Put_Line(" update"); New_Line; -- As we always receive update messages from the left neighbour -- we simply change our local copy of left's new flag flagArray(0) := flag; end; when 'N' => begin Put(id, (80 - 10 ) ); Put_Line(" neighbor"); New_Line; if (left = null) then -- Someone is updating our right neighbour procArray(2) := right; flagArray(2) := flag; else -- Someone is updating our left neighbour procArray(0) := left; flagArray(0) := flag; lowestId := lowId; end if; end; when 'R' => begin Put(id, (80 - 10 ) ); Put_Line(" dying..."); procArray(0).Receive('N', myId, flagArray(2), null, procArray(2), false); -- Tell my left who my right was -- Also, if dying, we pass true as the lowest id to the right, -- as it is our next lowest, if we were the lowest already if (lowestId) then procArray(2).Receive('N', myId, flagArray(0), procArray(0), null, true); -- Tell my right who my left was else procArray(2).Receive('N', myId, flagArray(0), procArray(0), null, false); -- Tell my right who my left was end if; ShouldIDie := true; -- Set flag to drop out of loop now end; when Others => null; end case; end Receive; exit when ShouldIDie = true; end loop; end RX_Task; ---- End RX_Task declaration and definition ---- Procedure Driver is numtasks_user, seed_user : Integer; --user defined at runtime by std. in numProcesses : Integer; ptrArray : array (0..15) of RX_Ptr; killId : Integer; --temp to store which process to kill RIPArray : array (0..100) of Boolean := (Others => FALSE); begin put("# random seed: "); get(seed_user); --to ensure a significantly random series, a seed is needed -- to generate pseudo-random numbers Ada.Numerics.Float_Random.Reset(g,seed_user); --seed the random number pool put("# tasks[1-50]: "); Get (numProcesses); -- Reset the random number generator -- Create each of our tasks for count in 0 .. numProcesses-1 loop ptrArray(count) := new RX_Task; end loop; -- Now pass everyone their neighbours and initialize -- We pass 0 separately in order to set it to lowest ID ptrArray(0).Start(0, ptrArray(0), ptrArray((0 - 1) mod numProcesses), ptrArray((0 + 1) mod numProcesses), 0, ((0 - 1) mod numProcesses), ((0 + 1) mod numProcesses), numProcesses, true); for count in 1 .. numProcesses-1 loop ptrArray(count).Start(count, ptrArray(count), ptrArray((count - 1) mod numProcesses), ptrArray((count + 1) mod numProcesses), count, ((count - 1) mod numProcesses),((count + 1) mod numProcesses), numProcesses, false); end loop; delay (60.0); FOR kill_index IN REVERSE 0 .. (numprocesses - 1) LOOP delay (3.0); Put ("Going to kill random process ... process "); -- Delay 60 seconds then kill off a process -- LOOP killID := Integer (random(g)) mod numprocesses; EXIT WHEN NOT RIParray(killID); END LOOP; RIParray(killID) := TRUE; Put(killID, 0); Put_line(""); ptrArray(killID).Receive('R', 0, 0, null, null, false); END LOOP; --kill out all our processes end Driver; begin -- Call our driver procedure (separate to keep variables from being global) Driver; end main;
reznikmm/matreshka
Ada
4,129
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with ODF.DOM.Draw_Notify_On_Update_Of_Ranges_Attributes; package Matreshka.ODF_Draw.Notify_On_Update_Of_Ranges_Attributes is type Draw_Notify_On_Update_Of_Ranges_Attribute_Node is new Matreshka.ODF_Draw.Abstract_Draw_Attribute_Node and ODF.DOM.Draw_Notify_On_Update_Of_Ranges_Attributes.ODF_Draw_Notify_On_Update_Of_Ranges_Attribute with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Draw_Notify_On_Update_Of_Ranges_Attribute_Node; overriding function Get_Local_Name (Self : not null access constant Draw_Notify_On_Update_Of_Ranges_Attribute_Node) return League.Strings.Universal_String; end Matreshka.ODF_Draw.Notify_On_Update_Of_Ranges_Attributes;
sf17k/sdlada
Ada
2,480
adb
-------------------------------------------------------------------------------------------------------------------- -- Copyright (c) 2014-2015 Luke A. Guest -- -- This software is provided 'as-is', without any express or implied -- warranty. In no event will the authors be held liable for any damages -- arising from the use of this software. -- -- Permission is granted to anyone to use this software for any purpose, -- including commercial applications, and to alter it and redistribute it -- freely, subject to the following restrictions: -- -- 1. The origin of this software must not be misrepresented; you must not -- claim that you wrote the original software. If you use this software -- in a product, an acknowledgment in the product documentation would be -- appreciated but is not required. -- -- 2. Altered source versions must be plainly marked as such, and must not be -- misrepresented as being the original software. -- -- 3. This notice may not be removed or altered from any source -- distribution. -------------------------------------------------------------------------------------------------------------------- package body SDL is package C renames Interfaces.C; use type C.int; function Initialise (Flags : in Init_Flags := Enable_Everything) return Boolean is function SDL_Init (Flags : in Init_Flags := Enable_Everything) return C.int with Import => True, Convention => C, External_Name => "SDL_Init"; Result : C.int := SDL_Init (Flags); begin return (Result = Success); end Initialise; function Initialise_Sub_System (Flags : in Init_Flags) return Boolean is function SDL_Init_Sub_System (Flags : in Init_Flags) return C.int with Import => True, Convention => C, External_Name => "SDL_InitSubSystem"; Result : C.int := SDL_Init_Sub_System (Flags); begin return (Result = Success); end Initialise_Sub_System; function SDL_Was_Initialised (Flags : in Init_Flags := Null_Init_Flags) return Init_Flags with Import => True, Convention => C, External_Name => "SDL_WasInit"; function Was_Initialised return Init_Flags is begin return SDL_Was_Initialised; end Was_Initialised; function Was_Initialised (Flags : in Init_Flags) return Boolean is begin return (SDL_Was_Initialised (Flags) = Flags); end Was_Initialised; end SDL;
zhmu/ananas
Ada
230
ads
with Vect9_Pkg; use Vect9_Pkg; package Vect9 is type Rec is record Data : Vector_Access; end record; procedure Proc (This : in Rec; CV : in Unit_Vector; Data : in out Unit_Vector); end Vect9;
AdaCore/Ada_Drivers_Library
Ada
10,048
ads
-- This spec has been automatically generated from cm0.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package Cortex_M_SVD.Debug is pragma Preelaborate; --------------- -- Registers -- --------------- -- Debug Fault Status Register type DFSR_Register is record HALTED : Boolean := False; -- BKPT instruction executed or breakpoint match in FPB. BKPT : Boolean := False; -- Data Watchpoint and Trace trap. Indicates that the core halted due to -- at least one DWT trap event. DWTTRAP : Boolean := False; -- Vector catch triggered. Corresponding FSR will contain the primary -- cause of the exception. VCATCH : Boolean := False; -- An asynchronous exception generated due to the assertion of EDBGRQ. EXTERNAL : Boolean := False; -- unspecified Reserved_5_31 : HAL.UInt27 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DFSR_Register use record HALTED at 0 range 0 .. 0; BKPT at 0 range 1 .. 1; DWTTRAP at 0 range 2 .. 2; VCATCH at 0 range 3 .. 3; EXTERNAL at 0 range 4 .. 4; Reserved_5_31 at 0 range 5 .. 31; end record; ------------------------------- -- DHCSR cluster's Registers -- ------------------------------- type Read_DHCSR_Register is record -- Read-only. C_DEBUGGEN : Boolean; -- Read-only. C_HALT : Boolean; -- Read-only. C_STEP : Boolean; -- Read-only. C_MASKINTS : Boolean; -- unspecified Reserved_4_4 : HAL.Bit; -- Read-only. C_SNAPSTALL : Boolean; -- unspecified Reserved_6_15 : HAL.UInt10; -- Read-only. S_REGRDY : Boolean; -- Read-only. S_HALT : Boolean; -- Read-only. S_SLEEP : Boolean; -- Read-only. S_LOCKUP : Boolean; -- unspecified Reserved_20_23 : HAL.UInt4; -- Read-only. S_RETIRE_ST : Boolean; -- Read-only. S_RESET_ST : Boolean; -- unspecified Reserved_26_31 : HAL.UInt6; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for Read_DHCSR_Register use record C_DEBUGGEN at 0 range 0 .. 0; C_HALT at 0 range 1 .. 1; C_STEP at 0 range 2 .. 2; C_MASKINTS at 0 range 3 .. 3; Reserved_4_4 at 0 range 4 .. 4; C_SNAPSTALL at 0 range 5 .. 5; Reserved_6_15 at 0 range 6 .. 15; S_REGRDY at 0 range 16 .. 16; S_HALT at 0 range 17 .. 17; S_SLEEP at 0 range 18 .. 18; S_LOCKUP at 0 range 19 .. 19; Reserved_20_23 at 0 range 20 .. 23; S_RETIRE_ST at 0 range 24 .. 24; S_RESET_ST at 0 range 25 .. 25; Reserved_26_31 at 0 range 26 .. 31; end record; subtype Write_DHCSR_S_RESET_ST_Field is HAL.UInt16; type Write_DHCSR_Register is record -- Write-only. C_DEBUGGEN : Boolean := False; -- Write-only. C_HALT : Boolean := False; -- Write-only. C_STEP : Boolean := False; -- Write-only. C_MASKINTS : Boolean := False; -- unspecified Reserved_4_4 : HAL.Bit := 16#0#; -- Write-only. C_SNAPSTALL : Boolean := False; -- unspecified Reserved_6_15 : HAL.UInt10 := 16#0#; -- Write-only. Debug Key. The value 0xA05F must be written to enable -- write accesses to bits [15:0], otherwise the write access will be -- ignored. Read behavior of bits [31:16] is as listed below. S_RESET_ST : Write_DHCSR_S_RESET_ST_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for Write_DHCSR_Register use record C_DEBUGGEN at 0 range 0 .. 0; C_HALT at 0 range 1 .. 1; C_STEP at 0 range 2 .. 2; C_MASKINTS at 0 range 3 .. 3; Reserved_4_4 at 0 range 4 .. 4; C_SNAPSTALL at 0 range 5 .. 5; Reserved_6_15 at 0 range 6 .. 15; S_RESET_ST at 0 range 16 .. 31; end record; type DHCSR_Disc is ( Mode_1, Mode_2); -- Debug Halting Control and Status Register type DHCSR_Cluster (Discriminent : DHCSR_Disc := Mode_1) is record case Discriminent is when Mode_1 => Read : aliased Read_DHCSR_Register; when Mode_2 => Write : aliased Write_DHCSR_Register; end case; end record with Unchecked_Union, Volatile, Size => 32; for DHCSR_Cluster use record Read at 0 range 0 .. 31; Write at 0 range 0 .. 31; end record; type DCRSR_HALTED_Field is ( Register_0, Register_1, Register_2, Register_3, Register_4, Register_5, Register_6, Register_7, Register_8, Register_9, Register_10, Register_11, Register_12, Current_Sp, Link_Rregister, Debug_Return_Address, XPsr, Msp, Psp, Control_Faultmask_Basepri_Primask) with Size => 5; for DCRSR_HALTED_Field use (Register_0 => 0, Register_1 => 1, Register_2 => 2, Register_3 => 3, Register_4 => 4, Register_5 => 5, Register_6 => 6, Register_7 => 7, Register_8 => 8, Register_9 => 9, Register_10 => 10, Register_11 => 11, Register_12 => 12, Current_Sp => 13, Link_Rregister => 14, Debug_Return_Address => 15, XPsr => 16, Msp => 17, Psp => 18, Control_Faultmask_Basepri_Primask => 19); type DCRSR_REGWnR_Field is ( Read, Write) with Size => 1; for DCRSR_REGWnR_Field use (Read => 0, Write => 1); -- Debug Core Register Selector Register: The DCRSR write-only register -- generates a handshake to the core to transfer the selected register -- to/from the DCRDR. The DHCSR S_REGRDY bit is cleared when the DCRSR is -- written, and remains clear until the core transaction completes. This -- register is only accessible from Debug state. type DCRSR_Register is record -- Write-only. HALTED : DCRSR_HALTED_Field := Cortex_M_SVD.Debug.Register_0; -- unspecified Reserved_5_15 : HAL.UInt11 := 16#0#; -- Write-only. REGWnR : DCRSR_REGWnR_Field := Cortex_M_SVD.Debug.Read; -- unspecified Reserved_17_31 : HAL.UInt15 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DCRSR_Register use record HALTED at 0 range 0 .. 4; Reserved_5_15 at 0 range 5 .. 15; REGWnR at 0 range 16 .. 16; Reserved_17_31 at 0 range 17 .. 31; end record; -- Debug Exception and Monitor Control Register type DEMCR_Register is record VC_CORERESET : Boolean := False; -- unspecified Reserved_1_3 : HAL.UInt3 := 16#0#; VC_MMERR : Boolean := False; VC_NOCPERR : Boolean := False; VC_CHKERR : Boolean := False; VC_STATERR : Boolean := False; VC_BUSERR : Boolean := False; VC_INTERR : Boolean := False; VC_HARDERR : Boolean := False; -- unspecified Reserved_11_15 : HAL.UInt5 := 16#0#; MON_EN : Boolean := False; MON_PEND : Boolean := False; MON_STEP : Boolean := False; MON_REQ : Boolean := False; -- unspecified Reserved_20_23 : HAL.UInt4 := 16#0#; TRCENA : Boolean := False; -- unspecified Reserved_25_31 : HAL.UInt7 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DEMCR_Register use record VC_CORERESET at 0 range 0 .. 0; Reserved_1_3 at 0 range 1 .. 3; VC_MMERR at 0 range 4 .. 4; VC_NOCPERR at 0 range 5 .. 5; VC_CHKERR at 0 range 6 .. 6; VC_STATERR at 0 range 7 .. 7; VC_BUSERR at 0 range 8 .. 8; VC_INTERR at 0 range 9 .. 9; VC_HARDERR at 0 range 10 .. 10; Reserved_11_15 at 0 range 11 .. 15; MON_EN at 0 range 16 .. 16; MON_PEND at 0 range 17 .. 17; MON_STEP at 0 range 18 .. 18; MON_REQ at 0 range 19 .. 19; Reserved_20_23 at 0 range 20 .. 23; TRCENA at 0 range 24 .. 24; Reserved_25_31 at 0 range 25 .. 31; end record; ----------------- -- Peripherals -- ----------------- type Debug_Peripheral is record -- Debug Fault Status Register DFSR : aliased DFSR_Register; -- Debug Halting Control and Status Register DHCSR : aliased DHCSR_Cluster; -- Debug Core Register Selector Register: The DCRSR write-only register -- generates a handshake to the core to transfer the selected register -- to/from the DCRDR. The DHCSR S_REGRDY bit is cleared when the DCRSR -- is written, and remains clear until the core transaction completes. -- This register is only accessible from Debug state. DCRSR : aliased DCRSR_Register; -- Debug Core Register Data Register DCRDR : aliased HAL.UInt32; -- Debug Exception and Monitor Control Register DEMCR : aliased DEMCR_Register; end record with Volatile; for Debug_Peripheral use record DFSR at 16#30# range 0 .. 31; DHCSR at 16#F0# range 0 .. 31; DCRSR at 16#F4# range 0 .. 31; DCRDR at 16#F8# range 0 .. 31; DEMCR at 16#FC# range 0 .. 31; end record; Debug_Periph : aliased Debug_Peripheral with Import, Address => Debug_Base; end Cortex_M_SVD.Debug;
DrenfongWong/tkm-rpc
Ada
405
ads
with Ada.Unchecked_Conversion; package Tkmrpc.Response.Ike.Tkm_Limits.Convert is function To_Response is new Ada.Unchecked_Conversion ( Source => Tkm_Limits.Response_Type, Target => Response.Data_Type); function From_Response is new Ada.Unchecked_Conversion ( Source => Response.Data_Type, Target => Tkm_Limits.Response_Type); end Tkmrpc.Response.Ike.Tkm_Limits.Convert;
Tim-Tom/project-euler
Ada
1,926
adb
with Ada.Text_IO; with Ada.Long_Long_Integer_Text_IO; with PrimeInstances; package body Problem_15 is package IO renames Ada.Text_IO; procedure Solve is package Positive_Primes renames PrimeInstances.Positive_Primes; primes : constant Positive_Primes.Sieve := Positive_Primes.Generate_Sieve(40); type Factor_Array is Array (2 .. primes(primes'Last)) of Natural; function Factor_Factorial(num : in Integer) return Factor_Array is result : Factor_Array; begin for index in result'Range loop result(index) := 0; end loop; for const_number in 2 .. num loop declare number : Positive := const_number; begin for index in primes'Range loop declare prime : constant Positive := primes(index); begin while number mod prime = 0 loop result(prime) := result(prime) + 1; number := number / prime; end loop; end; end loop; end; end loop; return result; end Factor_Factorial; factor_40 : Factor_Array := Factor_Factorial(40); factor_20 : constant Factor_Array := Factor_Factorial(20); result : Long_Long_Integer := 1; begin for index in Factor_Array'Range loop factor_40(index) := factor_40(index) - 2*factor_20(index); if factor_40(index) > 0 then result := result * Long_Long_Integer(index**factor_40(index)); end if; end loop; -- This problem is 40!/(20!20!). I was too lazy to either write division for my bignums or write the routines -- that would factorize the numbers and cancel common factors. Ada.Long_Long_Integer_Text_IO.Put(result); IO.New_Line; end Solve; end Problem_15;
1Crazymoney/LearnAda
Ada
2,220
adb
with Lnko; package body Racionalisok is function Szamlalo ( R: Racionalis ) return Integer is begin return R.Szamlalo; end; function Nevezo ( R: Racionalis ) return Positive is begin return R.Nevezo; end; function Normalizalva ( Szamlalo: Integer; Nevezo: Positive ) return Racionalis is begin if Szamlalo = 0 then return (0,1); else declare H: Positive := Lnko( abs Szamlalo, Nevezo ); begin return (Szamlalo/H, Nevezo/H); end; end if; end; function "/" ( Szamlalo: Integer; Nevezo: Positive ) return Racionalis is begin return Normalizalva( Szamlalo, Nevezo ); end; function "/" ( X, Y: Racionalis ) return Racionalis is begin return Normalizalva( X.Szamlalo * Y.Nevezo, X.Nevezo * Y.Szamlalo ); end; function "/" ( X: Racionalis; Y: Positive ) return Racionalis is begin return Normalizalva( X.Szamlalo, X.Nevezo * Y ); end; function "+" ( Szamlalo: Integer; Nevezo: Positive ) return Racionalis is begin return Normalizalva(Szamlalo + Nevezo, 1); end; function "+" ( X, Y: Racionalis ) return Racionalis is begin return Normalizalva(X.Szamlalo * Y.Nevezo + X.Nevezo * Y.Szamlalo, X.Nevezo * Y.Nevezo); end; function "+" ( X: Racionalis; Y: Positive ) return Racionalis is begin return Normalizalva(X.Szamlalo + X.Nevezo * Y, X.Nevezo); end; function "*" ( Szamlalo: Integer; Nevezo: Positive ) return Racionalis is begin return Normalizalva(Szamlalo * Nevezo, 1); end; function "*" ( X, Y: Racionalis ) return Racionalis is begin return Normalizalva(X.Szamlalo * Y.Szamlalo, X.Nevezo * Y.Nevezo); end; function "*" ( X: Racionalis; Y: Positive ) return Racionalis is begin return Normalizalva(X.Szamlalo * Y, X.Nevezo); end; -- function "=" ( X, Y: Racionalis ) return Boolean is -- begin -- return X.Szamlalo * Y.Nevezo = Y.Szamlalo * X.Nevezo; -- end; end Racionalisok;
zhmu/ananas
Ada
3,227
ads
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . P A C K _ 1 7 -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- Handling of packed arrays with Component_Size = 17 package System.Pack_17 is pragma Preelaborate; Bits : constant := 17; type Bits_17 is mod 2 ** Bits; for Bits_17'Size use Bits; -- In all subprograms below, Rev_SSO is set True if the array has the -- non-default scalar storage order. function Get_17 (Arr : System.Address; N : Natural; Rev_SSO : Boolean) return Bits_17 with Inline; -- Arr is the address of the packed array, N is the zero-based -- subscript. This element is extracted and returned. procedure Set_17 (Arr : System.Address; N : Natural; E : Bits_17; Rev_SSO : Boolean) with Inline; -- Arr is the address of the packed array, N is the zero-based -- subscript. This element is set to the given value. end System.Pack_17;
kraileth/ravenadm
Ada
66,917
adb
-- This file is covered by the Internet Software Consortium (ISC) License -- Reference: ../License.txt with Ada.Exceptions; with Ada.Directories; with Ada.Containers.Vectors; with Ada.Characters.Latin_1; with File_Operations; with Parameters; with Signals; with Unix; package body Replicant is package EX renames Ada.Exceptions; package PM renames Parameters; package CON renames Ada.Containers; package DIR renames Ada.Directories; package LAT renames Ada.Characters.Latin_1; package FOP renames File_Operations; -------------------------------------------------------------------------------------------- -- initialize -------------------------------------------------------------------------------------------- procedure initialize (testmode : Boolean) is raven_sysroot : constant String := HT.USS (PM.configuration.dir_sysroot); mm : constant String := get_master_mount; sretc : constant String := raven_sysroot & "/usr/share"; maspas : constant String := "/master.passwd"; passwd : constant String := "/passwd"; spwd : constant String := "/spwd.db"; pwd : constant String := "/pwd.db"; rcconf : constant String := "/rc.conf"; hints : constant String := "/ld-elf.so.hints"; nhints : constant String := "/ld.so.hints"; group : constant String := "/group"; ldcnf1 : constant String := "/x86_64-linux-gnu.conf"; ldcnf2 : constant String := "/ld.so.conf"; begin developer_mode := testmode; ravenbase := PM.configuration.dir_localbase; start_abnormal_logging; DIR.Create_Path (mm); case platform_type is when dragonfly | freebsd | macos | netbsd | openbsd => DIR.Copy_File (sretc & passwd, mm & passwd); DIR.Copy_File (sretc & maspas, mm & maspas); DIR.Copy_File (sretc & group, mm & group); when linux | sunos => DIR.Copy_File (sretc & passwd, mm & passwd); DIR.Copy_File (sretc & group, mm & group); end case; case platform_type is when dragonfly | freebsd | netbsd | openbsd => DIR.Copy_File (sretc & spwd, mm & spwd); DIR.Copy_File (sretc & pwd, mm & pwd); when linux | macos | sunos => null; -- pwd.db not used end case; case platform_type is when dragonfly | freebsd | netbsd | openbsd => DIR.Copy_File (sretc & rcconf, mm & rcconf); when linux | macos | sunos => null; -- rc.conf not used end case; case platform_type is when dragonfly => DIR.Copy_File (sretc & hints, mm & hints); when freebsd => DIR.Copy_File (sretc & hints, mm & hints); when netbsd | openbsd => DIR.Copy_File (sretc & nhints, mm & nhints); when linux => DIR.Copy_File (sretc & ldcnf1, mm & ldcnf1); DIR.Copy_File (sretc & ldcnf2, mm & ldcnf2); when macos | sunos => null; end case; create_mtree_exc_preinst (mm); create_mtree_exc_preconfig (mm); end initialize; -------------------------------------------------------------------------------------------- -- finalize -------------------------------------------------------------------------------------------- procedure finalize is mm : constant String := get_master_mount; begin if DIR.Exists (mm) then annihilate_directory_tree (mm); end if; stop_abnormal_logging; end finalize; -------------------------------------------------------------------------------------------- -- get_master_mount -------------------------------------------------------------------------------------------- function get_master_mount return String is begin return HT.USS (PM.configuration.dir_buildbase) & "/" & reference_base; end get_master_mount; -------------------------------------------------------------------------------------------- -- get_slave_mount -------------------------------------------------------------------------------------------- function get_slave_mount (id : builders) return String is begin return HT.USS (PM.configuration.dir_buildbase) & "/" & slave_name (id); end get_slave_mount; -------------------------------------------------------------------------------------------- -- start_abnormal_logging -------------------------------------------------------------------------------------------- procedure start_abnormal_logging is logpath : constant String := HT.USS (PM.configuration.dir_logs) & "/logs/" & abnormal_cmd_logname; begin if DIR.Exists (logpath) then DIR.Delete_File (logpath); end if; TIO.Create (File => abnormal_log, Mode => TIO.Out_File, Name => logpath); abn_log_ready := True; exception when others => abn_log_ready := False; end start_abnormal_logging; -------------------------------------------------------------------------------------------- -- stop_abnormal_logging -------------------------------------------------------------------------------------------- procedure stop_abnormal_logging is begin if abn_log_ready then TIO.Close (abnormal_log); end if; end stop_abnormal_logging; -------------------------------------------------------------------------------------------- -- annihilate_directory_tree -------------------------------------------------------------------------------------------- procedure annihilate_directory_tree (tree : String) is command : constant String := "/bin/rm -rf " & tree; retry : Boolean := False; begin silent_exec (command); exception when others => -- Only can occur when tmpfs is avoided if DIR.Exists (tree & "/home") then folder_access (tree & "/home", unlock); retry := True; end if; if DIR.Exists (tree & "/root") then folder_access (tree & "/root", unlock); retry := True; end if; if retry then silent_exec (command); else raise scenario_unexpected with "annihilate_directory_tree " & tree & " failed"; end if; end annihilate_directory_tree; -------------------------------------------------------------------------------------------- -- annihilate_directory_tree_contents -------------------------------------------------------------------------------------------- procedure annihilate_directory_tree_contents (tree : String) is command : constant String := "/usr/bin/find -s " & tree & " -depth 1 -maxdepth 1 -exec /bin/rm -rf {} \;"; begin silent_exec (command); end annihilate_directory_tree_contents; -------------------------------------------------------------------------------------------- -- execute -------------------------------------------------------------------------------------------- procedure execute (command : String) is Exit_Status : Integer; output : HT.Text := Unix.piped_command (command, Exit_Status); begin if abn_log_ready and then not HT.IsBlank (output) then TIO.Put_Line (abnormal_log, HT.USS (output)); end if; if Exit_Status /= 0 then raise scenario_unexpected with command & " => failed with code" & Exit_Status'Img; end if; end execute; -------------------------------------------------------------------------------------------- -- silent_exec -------------------------------------------------------------------------------------------- procedure silent_exec (command : String) is cmd_output : HT.Text; success : Boolean := Unix.piped_mute_command (command, cmd_output); begin if not success then if abn_log_ready and then not HT.IsBlank (cmd_output) then TIO.Put_Line (abnormal_log, "piped_mute_command failure:"); TIO.Put_Line (abnormal_log, HT.USS (cmd_output)); end if; raise scenario_unexpected with command & " => failed (exit code not 0)"; end if; end silent_exec; -------------------------------------------------------------------------------------------- -- append_abnormal_log -------------------------------------------------------------------------------------------- procedure append_abnormal_log (line : String) is begin TIO.Put_Line (abnormal_log, line); end append_abnormal_log; -------------------------------------------------------------------------------------------- -- internal_system_command -------------------------------------------------------------------------------------------- function internal_system_command (command : String) return HT.Text is content : HT.Text; status : Integer; begin content := Unix.piped_command (command, status); if status /= 0 then raise scenario_unexpected with "cmd: " & command & " (return code =" & status'Img & ")"; end if; return content; end internal_system_command; -------------------------------------------------------------------------------------------- -- specific_mount_exists -------------------------------------------------------------------------------------------- function specific_mount_exists (mount_point : String) return Boolean is comres : constant String := HT.USS (internal_system_command (df_command)); markers : HT.Line_Markers; begin HT.initialize_markers (comres, markers); loop exit when not HT.next_line_present (comres, markers); declare line : constant String := HT.extract_line (comres, markers); begin if HT.contains (line, mount_point) then return True; end if; end; end loop; return False; exception when others => return True; end specific_mount_exists; -------------------------------------------------------------------------------------------- -- ravenadm_mounts_exist -------------------------------------------------------------------------------------------- function ravenadm_mounts_exist return Boolean is buildbase : constant String := HT.USS (PM.configuration.dir_buildbase); comres : constant String := HT.USS (internal_system_command (df_command)); markers : HT.Line_Markers; begin HT.initialize_markers (comres, markers); loop exit when not HT.next_line_present (comres, markers); declare line : constant String := HT.extract_line (comres, markers); begin if HT.contains (line, buildbase) then return True; end if; end; end loop; return False; exception when others => return True; end ravenadm_mounts_exist; -------------------------------------------------------------------------------------------- -- clear_existing_mounts -------------------------------------------------------------------------------------------- function clear_existing_mounts return Boolean is package crate is new CON.Vectors (Index_Type => Positive, Element_Type => HT.Text, "=" => HT.SU."="); procedure annihilate (cursor : crate.Cursor); buildbase : constant String := HT.USS (PM.configuration.dir_buildbase); comres : constant String := HT.USS (internal_system_command (df_command)); markers : HT.Line_Markers; mpoints : crate.Vector; procedure annihilate (cursor : crate.Cursor) is mountpoint : constant String := HT.USS (crate.Element (cursor)); begin unmount (mountpoint); if DIR.Exists (mountpoint) then DIR.Delete_Directory (mountpoint); end if; exception when others => null; end annihilate; begin HT.initialize_markers (comres, markers); loop exit when not HT.next_line_present (comres, markers); declare line : constant String := HT.extract_line (comres, markers); mindex : Natural; begin mindex := HT.start_index (line, buildbase); if mindex > 0 then mpoints.Append (HT.SUS (line (mindex .. line'Last))); end if; end; end loop; mpoints.Reverse_Iterate (Process => annihilate'Access); if ravenadm_mounts_exist then return False; end if; -- No need to remove empty dirs, the upcoming run will do that. return True; end clear_existing_mounts; -------------------------------------------------------------------------------------------- -- disk_workareas_exist -------------------------------------------------------------------------------------------- function disk_workareas_exist return Boolean is Search : DIR.Search_Type; buildbase : constant String := HT.USS (PM.configuration.dir_buildbase); result : Boolean := False; begin if not DIR.Exists (buildbase) then return False; end if; if DIR.Exists (buildbase & "/Base") then return True; end if; -- SLXX may be present if tmpfs is avoided DIR.Start_Search (Search => Search, Directory => buildbase, Filter => (DIR.Directory => True, others => False), Pattern => "SL*"); result := DIR.More_Entries (Search => Search); DIR.End_Search (Search); return result; end disk_workareas_exist; -------------------------------------------------------------------------------------------- -- clear_existing_workareas -------------------------------------------------------------------------------------------- function clear_existing_workareas return Boolean is Search : DIR.Search_Type; Dir_Ent : DIR.Directory_Entry_Type; buildbase : constant String := HT.USS (PM.configuration.dir_buildbase); base : constant String := buildbase & "/Base"; begin if DIR.Exists (base) then annihilate_directory_tree (base); end if; -- SLXX may be present if tmpfs is avoided DIR.Start_Search (Search => Search, Directory => buildbase, Filter => (DIR.Directory => True, others => False), Pattern => "SL*"); while DIR.More_Entries (Search => Search) loop DIR.Get_Next_Entry (Search => Search, Directory_Entry => Dir_Ent); declare target : constant String := buildbase & "/" & DIR.Simple_Name (Dir_Ent); begin annihilate_directory_tree (target); end; end loop; DIR.End_Search (Search); return True; exception when others => return False; end clear_existing_workareas; -------------------------------------------------------------------------------------------- -- create_mtree_exc_preinst -------------------------------------------------------------------------------------------- procedure create_mtree_exc_preinst (path_to_mm : String) is mtreefile : TIO.File_Type; filename : constant String := path_to_mm & "/mtree.prestage.exclude"; begin TIO.Create (File => mtreefile, Mode => TIO.Out_File, Name => filename); write_common_mtree_exclude_base (mtreefile); write_preinstall_section (mtreefile); TIO.Close (mtreefile); end create_mtree_exc_preinst; -------------------------------------------------------------------------------------------- -- create_mtree_exc_preconfig -------------------------------------------------------------------------------------------- procedure create_mtree_exc_preconfig (path_to_mm : String) is mtreefile : TIO.File_Type; filename : constant String := path_to_mm & "/mtree.preconfig.exclude"; begin TIO.Create (File => mtreefile, Mode => TIO.Out_File, Name => filename); write_common_mtree_exclude_base (mtreefile); TIO.Close (mtreefile); end create_mtree_exc_preconfig; -------------------------------------------------------------------------------------------- -- write_common_mtree_exclude_base -------------------------------------------------------------------------------------------- procedure write_common_mtree_exclude_base (mtreefile : TIO.File_Type) is function write_usr return String; function opsys_specific return String; RB : String := LAT.Full_Stop & HT.USS (ravenbase); function write_usr return String is begin if HT.equivalent (ravenbase, bsd_localbase) then return "./usr/bin" & LAT.LF & "./usr/include" & LAT.LF & "./usr/lib" & LAT.LF & "./usr/lib32" & LAT.LF & "./usr/share" & LAT.LF; else return "./usr" & LAT.LF; end if; end write_usr; function opsys_specific return String is begin case platform_type is when freebsd | dragonfly | netbsd | openbsd => return "./libexec" & LAT.LF; when linux => return "./lib" & LAT.LF & "./lib64" & LAT.LF; when sunos => return "./lib" & LAT.LF & "./devices" & LAT.LF; when macos => return "./System" & LAT.LF; end case; end opsys_specific; begin TIO.Put_Line (mtreefile, "./bin" & LAT.LF & "./ccache" & LAT.LF & "./construction" & LAT.LF & "./dev" & LAT.LF & "./distfiles" & LAT.LF & "./home" & LAT.LF & "./packages" & LAT.LF & "./port" & LAT.LF & "./proc" & LAT.LF & "./root" & LAT.LF & "./tmp" & LAT.LF & write_usr & opsys_specific & "./var/db/rvnfontconfig" & LAT.LF & "./var/run" & LAT.LF & "./var/tmp" & LAT.LF & "./xports" & LAT.LF & RB & "/toolchain" ); end write_common_mtree_exclude_base; -------------------------------------------------------------------------------------------- -- write_preinstall_section -------------------------------------------------------------------------------------------- procedure write_preinstall_section (mtreefile : TIO.File_Type) is RB : String := LAT.Full_Stop & HT.USS (ravenbase); begin TIO.Put_Line (mtreefile, "./etc/group" & LAT.LF & "./etc/make.conf" & LAT.LF & "./etc/make.conf.bak" & LAT.LF & "./etc/make.nxb.conf" & LAT.LF & "./etc/master.passwd" & LAT.LF & "./etc/passwd" & LAT.LF & "./etc/pwd.db" & LAT.LF & "./etc/shells" & LAT.LF & "./etc/spwd.db" & LAT.LF & "./etc/ld.so.conf.d/x86_64-linux-gnu.conf" & LAT.LF & "./var/db" & LAT.LF & "./var/log" & LAT.LF & "./var/mail" & LAT.LF & "./var/spool" & LAT.LF & "./var/tmp" & LAT.LF & RB & "/etc/gconf/gconf.xml.defaults/%gconf-tree*.xml" & LAT.LF & RB & "/lib/gio/modules/giomodule.cache" & LAT.LF & RB & "/share/info/dir" & LAT.LF & RB & "/share/info" & LAT.LF & RB & "/share/*/info/dir" & LAT.LF & RB & "/share/*/info" & LAT.LF & RB & "/*/ls-R" & LAT.LF & RB & "/share/octave/octave_packages" & LAT.LF & RB & "/share/xml/catalog.ports" ); end write_preinstall_section; -------------------------------------------------------------------------------------------- -- df_command -------------------------------------------------------------------------------------------- function df_command return String is begin case platform_type is when freebsd | macos => return "/bin/df -h"; when dragonfly | netbsd | openbsd => return "/bin/df -h -t null,tmpfs,devfs,procfs"; when sunos => return "/usr/sbin/df -h"; when linux => return "/bin/df -h -a"; end case; end df_command; -------------------------------------------------------------------------------------------- -- unmount -------------------------------------------------------------------------------------------- procedure unmount (device_or_node : String; retry_times : Natural := 0) is bsd_command : constant String := "/sbin/umount " & device_or_node; sol_command : constant String := "/usr/sbin/umount " & device_or_node; lin_command : constant String := "/bin/umount " & device_or_node; counter : Natural := 0; success : Boolean := False; begin -- failure to unmount causes stderr squawks which messes up curses display -- Just log it and ignore for now (Add robustness later) loop begin exit when counter > retry_times; case platform_type is when dragonfly | freebsd | macos | netbsd | openbsd => execute (bsd_command); when linux => execute (lin_command); when sunos => execute (sol_command); end case; success := True; exit; exception when others => counter := counter + 1; delay 10.0; end; end loop; if not success then raise failed_unmount with device_or_node; end if; end unmount; -------------------------------------------------------------------------------------------- -- mount_nullfs -------------------------------------------------------------------------------------------- procedure mount_nullfs (target, mount_point : String; mode : mount_mode := readonly) is cmd_freebsd : constant String := "/sbin/mount_nullfs"; cmd_dragonfly : constant String := "/sbin/mount_null"; cmd_solaris : constant String := "/sbin/mount -F lofs"; cmd_linux : constant String := "/bin/mount --bind"; cmd_macos : constant String := "/sbin/mount -t nfs"; cmd_openbsd : constant String := "/sbin/mount_nfs"; command : HT.Text; begin if not DIR.Exists (mount_point) then raise scenario_unexpected with "mount point " & mount_point & " does not exist"; end if; if not DIR.Exists (target) then raise scenario_unexpected with "mount target " & target & " does not exist"; end if; case platform_type is when freebsd => command := HT.SUS (cmd_freebsd); when dragonfly | netbsd => command := HT.SUS (cmd_dragonfly); when sunos => command := HT.SUS (cmd_solaris); when linux => command := HT.SUS (cmd_linux); when macos => command := HT.SUS (cmd_macos); when openbsd => command := HT.SUS (cmd_openbsd); end case; case mode is when readonly => HT.SU.Append (command, " -o ro"); when readwrite => null; end case; case platform_type is when macos | openbsd => execute (HT.USS (command) & " 127.0.0.1:" & target & " " & mount_point); when others => execute (HT.USS (command) & " " & target & " " & mount_point); end case; end mount_nullfs; -------------------------------------------------------------------------------------------- -- mount_tmpfs -------------------------------------------------------------------------------------------- procedure mount_tmpfs (mount_point : String; max_size_M : Natural := 0) is cmd_freebsd : constant String := "/sbin/mount -t tmpfs"; cmd_dragonfly : constant String := "/sbin/mount_tmpfs"; cmd_solaris : constant String := "/sbin/mount -F tmpfs"; cmd_linux : constant String := "/bin/mount -t tmpfs"; command : HT.Text; begin case platform_type is when freebsd | netbsd => command := HT.SUS (cmd_freebsd); when dragonfly => command := HT.SUS (cmd_dragonfly); when sunos => command := HT.SUS (cmd_solaris); when linux => command := HT.SUS (cmd_linux); when macos | -- Not available at all openbsd => -- Was available, disabled on OpenBSD 6.0 (no maintenance) raise scenario_unexpected with "tmpfs not supported on " & platform_type'Img; end case; if max_size_M > 0 then HT.SU.Append (command, " -o size=" & HT.trim (max_size_M'Img) & "M"); end if; case platform_type is when sunos => HT.SU.Append (command, " swap " & mount_point); when freebsd | dragonfly | netbsd | linux => HT.SU.Append (command, " tmpfs " & mount_point); when macos => null; when openbsd => null; end case; execute (HT.USS (command)); end mount_tmpfs; -------------------------------------------------------------------------------------------- -- mount_devices -------------------------------------------------------------------------------------------- procedure mount_devices (path_to_dev : String) is bsd_command : constant String := "/sbin/mount -t devfs devfs " & path_to_dev; lin_command : constant String := "/bin/mount --bind /dev " & path_to_dev; begin case platform_type is when dragonfly | freebsd | macos => execute (bsd_command); when linux => execute (lin_command); when netbsd | openbsd | sunos => mount_nullfs (target => "/dev", mount_point => path_to_dev); end case; end mount_devices; -------------------------------------------------------------------------------------------- -- unmount_devices -------------------------------------------------------------------------------------------- procedure unmount_devices (path_to_dev : String) is begin unmount (path_to_dev); end unmount_devices; -------------------------------------------------------------------------------------------- -- mount_procfs -------------------------------------------------------------------------------------------- procedure mount_procfs (path_to_proc : String) is bsd_command : constant String := "/sbin/mount -t procfs proc " & path_to_proc; net_command : constant String := "/sbin/mount_procfs /proc " & path_to_proc; lin_command : constant String := "/bin/mount --bind /proc " & path_to_proc; begin case platform_type is when dragonfly | freebsd => execute (bsd_command); when netbsd | openbsd => execute (net_command); when linux => execute (lin_command); when sunos => mount_nullfs (target => "/proc", mount_point => path_to_proc); when macos => raise scenario_unexpected with "procfs not supported on " & platform_type'Img; end case; end mount_procfs; -------------------------------------------------------------------------------------------- -- unmount_procfs -------------------------------------------------------------------------------------------- procedure unmount_procfs (path_to_proc : String) is begin unmount (path_to_proc); end unmount_procfs; -------------------------------------------------------------------------------------------- -- mount_hardlink -------------------------------------------------------------------------------------------- procedure mount_hardlink (target, mount_point, sysroot : String) is find_program : constant String := sysroot & "/usr/bin/find "; copy_program : constant String := sysroot & "/bin/cp -RpPl "; chmod_program : constant String := sysroot & "/bin/chmod "; begin if DIR.Exists (mount_point) then DIR.Delete_Directory (mount_point); end if; execute (copy_program & target & " " & mount_point); execute (find_program & mount_point & " -type d -exec " & chmod_program & "555 {} +"); end mount_hardlink; -------------------------------------------------------------------------------------------- -- mount_fullcopy -------------------------------------------------------------------------------------------- procedure mount_fullcopy (target, mount_point, sysroot : String) is find_program : constant String := sysroot & "/usr/bin/find "; copy_program : constant String := sysroot & "/bin/cp -RpP "; chmod_program : constant String := sysroot & "/bin/chmod "; begin if DIR.Exists (mount_point) then DIR.Delete_Directory (mount_point); end if; execute (copy_program & target & " " & mount_point); execute (find_program & mount_point & " -type d -exec " & chmod_program & "555 {} +"); end mount_fullcopy; -------------------------------------------------------------------------------------------- -- location -------------------------------------------------------------------------------------------- function location (mount_base : String; point : folder) return String is begin case point is when bin => return mount_base & root_bin; when usr => return mount_base & root_usr; when dev => return mount_base & root_dev; when etc => return mount_base & root_etc; when etc_default => return mount_base & root_etc_default; when etc_rcd => return mount_base & root_etc_rcd; when etc_ldsocnf => return mount_base & root_etc_ldsocnf; when tmp => return mount_base & root_tmp; when var => return mount_base & root_var; when home => return mount_base & root_home; when proc => return mount_base & root_proc; when root => return mount_base & root_root; when xports => return mount_base & root_xports; when port => return mount_base & root_port; when lib => return mount_base & root_lib; when lib64 => return mount_base & root_lib64; when libexec => return mount_base & root_libexec; when packages => return mount_base & root_packages; when distfiles => return mount_base & root_distfiles; when wrkdirs => return mount_base & root_wrkdirs; when ccache => return mount_base & root_ccache; when devices => return mount_base & root_devices; when frameworks => return mount_base & root_frameworks; when localbase => return mount_base & HT.USS (PM.configuration.dir_localbase); when toolchain => return mount_base & HT.USS (PM.configuration.dir_localbase) & toolchain_dir; end case; end location; -------------------------------------------------------------------------------------------- -- mount_target -------------------------------------------------------------------------------------------- function mount_target (point : folder) return String is begin case point is when xports => return HT.USS (PM.configuration.dir_conspiracy); when packages => return HT.USS (PM.configuration.dir_packages); when toolchain => return HT.USS (PM.configuration.dir_toolchain); when distfiles => return HT.USS (PM.configuration.dir_distfiles); when ccache => return HT.USS (PM.configuration.dir_ccache); when others => return "ERROR"; end case; end mount_target; -------------------------------------------------------------------------------------------- -- forge_directory -------------------------------------------------------------------------------------------- procedure forge_directory (target : String) is begin DIR.Create_Path (New_Directory => target); exception when failed : others => TIO.Put_Line (EX.Exception_Information (failed)); raise scenario_unexpected with "failed to create " & target & " directory"; end forge_directory; -------------------------------------------------------------------------------------------- -- folder_access -------------------------------------------------------------------------------------------- procedure folder_access (path : String; operation : folder_operation) is -- chattr does not work on tmpfs partitions -- It appears immutable locking can't be supported on Linux -- Don't use chflags schg on *BSD as securitylevel > 0 (BSD) will block it cmd_fallback : constant String := "/bin/chmod"; fback_lock : constant String := " 555 "; fback_unlock : constant String := " 755 "; command : HT.Text := HT.SUS (cmd_fallback); begin if not DIR.Exists (path) then return; end if; case operation is when lock => HT.SU.Append (command, fback_lock & path); when unlock => HT.SU.Append (command, fback_unlock & path); end case; execute (HT.USS (command)); end folder_access; -------------------------------------------------------------------------------------------- -- folder_access -------------------------------------------------------------------------------------------- procedure set_folder_mode (path : String; operation : folder_operation) is cmd : constant String := "/bin/chmod"; oplock : constant String := " 555 "; opunlock : constant String := " 755 "; command : HT.Text; begin case operation is when lock => command := HT.SUS (cmd & oplock & path); when unlock => command := HT.SUS (cmd & opunlock & path); end case; execute (HT.USS (command)); end set_folder_mode; -------------------------------------------------------------------------------------------- -- get_workzone_path -------------------------------------------------------------------------------------------- function get_workzone_path return String is begin return get_slave_mount (workzone_id); end get_workzone_path; -------------------------------------------------------------------------------------------- -- launch_workzone -------------------------------------------------------------------------------------------- procedure launch_workzone is zone_base : constant String := get_workzone_path; begin forge_directory (zone_base); if not PM.configuration.avoid_tmpfs then -- Limit slave to 32Mb mount_tmpfs (zone_base, 32); end if; end launch_workzone; -------------------------------------------------------------------------------------------- -- destroy_workzone -------------------------------------------------------------------------------------------- procedure destroy_workzone is zone_base : constant String := get_workzone_path; begin if not PM.configuration.avoid_tmpfs then unmount (zone_base, 50); end if; annihilate_directory_tree (zone_base); end destroy_workzone; -------------------------------------------------------------------------------------------- -- clear_workzone_directory -------------------------------------------------------------------------------------------- procedure clear_workzone_directory (subpath : String) is zone_base : constant String := get_workzone_path; begin annihilate_directory_tree (zone_base & "/" & subpath); end clear_workzone_directory; -------------------------------------------------------------------------------------------- -- launch_slave -------------------------------------------------------------------------------------------- procedure launch_slave (id : builders; need_procfs : Boolean := False) is slave_base : constant String := get_slave_mount (id); slave_local : constant String := slave_base & "_localbase"; dir_system : constant String := HT.USS (PM.configuration.dir_sysroot); lbase : constant String := HT.USS (PM.configuration.dir_localbase); etc_path : constant String := location (slave_base, etc); begin forge_directory (slave_base); if PM.configuration.avoid_tmpfs then if lbase = bsd_localbase then -- /usr is write only, so to build on /usr/local, we need a dedicated mount -- restriction isn't necessary on mac or openbsd which copies via hardlink case platform_type is when macos | openbsd => set_folder_mode (slave_base & lbase, unlock); forge_directory (location (slave_base, toolchain)); when others => forge_directory (location (slave_local, toolchain)); mount_nullfs (slave_local, slave_base & lbase, readwrite); end case; else forge_directory (location (slave_base, toolchain)); end if; else -- Limit slave to 24Gb, covers localbase + construction mainly mount_tmpfs (slave_base, 24 * 1024); if lbase = bsd_localbase then mount_tmpfs (slave_base & bsd_localbase, 12 * 1024); end if; forge_directory (location (slave_base, toolchain)); end if; for mnt in safefolders'Range loop forge_directory (location (slave_base, mnt)); end loop; -- Save a null mount on all platforms (all keeps /xports to the bare minimum) declare mk_directory : constant String := mount_target (xports) & "/Mk"; slave_mk : constant String := location (slave_base, xports) & "/Mk"; begin if PM.configuration.avoid_tmpfs then mount_hardlink (mk_directory, slave_mk, dir_system); else mount_fullcopy (mk_directory, slave_mk, dir_system); end if; process_keyword_files (slave_mk, lbase); end; case platform_type is when macos | openbsd => mount_hardlink (location (dir_system, bin), location (slave_base, bin), dir_system); mount_hardlink (location (dir_system, usr), location (slave_base, usr), dir_system); mount_hardlink (mount_target (toolchain), location (slave_base, toolchain) & "-off", dir_system); preplace_libgcc_s (location (slave_base, toolchain) & "-fallback"); when others => mount_nullfs (location (dir_system, bin), location (slave_base, bin)); mount_nullfs (location (dir_system, usr), location (slave_base, usr)); end case; case platform_type is when freebsd | dragonfly | netbsd | openbsd => -- should be limited to rtld executable if PM.configuration.avoid_tmpfs then mount_hardlink (target => location (dir_system, libexec), mount_point => location (slave_base, libexec), sysroot => dir_system); else -- saves a null mount (at the cost of memory) mount_fullcopy (target => location (dir_system, libexec), mount_point => location (slave_base, libexec), sysroot => dir_system); end if; when linux => mount_nullfs (location (dir_system, lib), location (slave_base, lib)); mount_nullfs (location (dir_system, lib64), location (slave_base, lib64)); when sunos => forge_directory (location (slave_base, devices)); mount_nullfs (location (dir_system, lib), location (slave_base, lib)); mount_nullfs (root_devices, location (slave_base, devices)); when macos => forge_directory (location (slave_base, frameworks)); mount_nullfs (location (dir_system, frameworks), location (slave_base, frameworks)); end case; folder_access (location (slave_base, home), lock); folder_access (location (slave_base, root), lock); mount_nullfs (mount_target (packages), location (slave_base, packages), mode => readwrite); mount_nullfs (mount_target (distfiles), location (slave_base, distfiles), mode => readwrite); if need_procfs or else platform_type = linux or else platform_type = sunos then mount_procfs (path_to_proc => location (slave_base, proc)); end if; if DIR.Exists (mount_target (ccache)) then mount_nullfs (mount_target (ccache), location (slave_base, ccache), readwrite); end if; mount_devices (location (slave_base, dev)); populate_var_folder (location (slave_base, var)); copy_rc_default (etc_path); copy_resolv_conf (etc_path); copy_ldconfig_hints (slave_base & "/var/run"); copy_unkindness_IDs (slave_base & "/construction"); fix_macos_resolv (slave_base & "/var/run"); create_make_conf (etc_path); install_passwd_and_group (etc_path); create_etc_services (etc_path); create_etc_shells (etc_path); create_sun_files (etc_path); install_linux_ldsoconf (location (slave_base, etc_ldsocnf)); exception when hiccup : others => TIO.Put_Line (abnormal_log, "LAUNCH SLAVE" & id'Img & " FAILED: " & EX.Exception_Information (hiccup)); Signals.initiate_shutdown; end launch_slave; -------------------------------------------------------------------------------------------- -- destroy_slave -------------------------------------------------------------------------------------------- procedure destroy_slave (id : builders; need_procfs : Boolean := False) is slave_base : constant String := get_slave_mount (id); slave_local : constant String := slave_base & "_localbase"; dir_system : constant String := HT.USS (PM.configuration.dir_sysroot); lbase : constant String := HT.USS (PM.configuration.dir_localbase); retry1min : constant Natural := 6; counter : Natural := 0; begin unmount_devices (location (slave_base, dev)); if DIR.Exists (mount_target (ccache)) then unmount (location (slave_base, ccache), retry1min); end if; if need_procfs or else platform_type = linux or else platform_type = sunos then unmount_procfs (location (slave_base, proc)); end if; unmount (location (slave_base, distfiles), retry1min); unmount (location (slave_base, packages), retry1min); if DIR.Exists (slave_base & toolchain_tag) then unhook_toolchain (id); end if; case platform_type is when macos | openbsd => null; when others => unmount (location (slave_base, bin)); unmount (location (slave_base, usr)); end case; case platform_type is when freebsd | dragonfly | netbsd | openbsd => null; -- libexec is copied now when linux => unmount (location (slave_base, lib)); unmount (location (slave_base, lib64)); when sunos => unmount (location (slave_base, lib)); unmount (location (slave_base, devices)); when macos => unmount (location (slave_base, frameworks)); end case; if PM.configuration.avoid_tmpfs then if lbase = bsd_localbase then case platform_type is when macos | openbsd => null; when others => unmount (slave_base & lbase, retry1min); end case; end if; annihilate_directory_tree (slave_local); else if lbase = bsd_localbase then unmount (slave_base & lbase, retry1min); end if; unmount (slave_base, retry1min * 5); end if; annihilate_directory_tree (slave_base); exception when hiccup : others => TIO.Put_Line (abnormal_log, "DESTROY SLAVE" & id'Img & " FAILED: " & EX.Exception_Information (hiccup)); Signals.initiate_shutdown; end destroy_slave; -------------------------------------------------------------------------------------------- -- hook_toolchain -------------------------------------------------------------------------------------------- procedure hook_toolchain (id : builders) is use type DIR.File_Kind; slave_base : constant String := get_slave_mount (id); tc_path : constant String := location (slave_base, toolchain); forged : TIO.File_Type; begin -- When hook_toolchain is called, there very well may be installed packages that -- brought in gcc libs and installed them at /raven/toolchain. -- For null-mount systems, the toolchain is mounted over /raven/toolchain, but it's -- unmounted before package deinstallation. -- For NFS-mount systems, the toolchain is hardlink-copied at toolchain-off. The -- toolchain and toolchain-off are renamed toolchain-packages and toolchain respectively. -- This is reversed during unhooking. case platform_type is when macos | openbsd => DIR.Rename (Old_Name => tc_path, New_Name => tc_path & "-packaged"); DIR.Rename (Old_Name => tc_path & "-off", New_Name => tc_path); when others => mount_nullfs (mount_target (toolchain), tc_path); end case; TIO.Create (File => forged, Mode => TIO.Out_File, Name => slave_base & toolchain_tag); TIO.Close (forged); end hook_toolchain; -------------------------------------------------------------------------------------------- -- unhook_toolchain -------------------------------------------------------------------------------------------- procedure unhook_toolchain (id : builders) is use type DIR.File_Kind; slave_base : constant String := get_slave_mount (id); tc_path : constant String := location (slave_base, toolchain); begin case platform_type is when macos | openbsd => DIR.Rename (Old_Name => tc_path, New_Name => tc_path & "-off"); DIR.Rename (Old_Name => tc_path & "-packaged", New_Name => tc_path); when others => unmount (tc_path); end case; DIR.Delete_File (slave_base & toolchain_tag); end unhook_toolchain; -------------------------------------------------------------------------------------------- -- slave_name -------------------------------------------------------------------------------------------- function slave_name (id : builders) return String is id_image : constant String := HT.int2str (Integer (id)); suffix : String := "SL00"; begin if id < 10 then suffix (4) := id_image (id_image'First); else suffix (3 .. 4) := id_image (id_image'First .. id_image'First + 1); end if; return suffix; end slave_name; -------------------------------------------------------------------------------------------- -- populate_var_folder -------------------------------------------------------------------------------------------- procedure populate_var_folder (path : String) is begin forge_directory (path & "/cache"); forge_directory (path & "/cron"); forge_directory (path & "/db"); forge_directory (path & "/empty"); forge_directory (path & "/games"); forge_directory (path & "/log"); forge_directory (path & "/mail"); forge_directory (path & "/msgs"); forge_directory (path & "/preserve"); forge_directory (path & "/run/sem"); forge_directory (path & "/spool"); forge_directory (path & "/tmp"); end populate_var_folder; -------------------------------------------------------------------------------------------- -- copy_ldconfig_hints -------------------------------------------------------------------------------------------- procedure copy_ldconfig_hints (path_to_varrun : String) is mm : constant String := get_master_mount; hints : constant String := "/ld-elf.so.hints"; nhints : constant String := "/ld.so.hints"; begin case platform_type is when dragonfly | freebsd => DIR.Copy_File (mm & hints, path_to_varrun & hints); when netbsd | openbsd => DIR.Copy_File (mm & nhints, path_to_varrun & nhints); when macos | linux | sunos => null; end case; end copy_ldconfig_hints; -------------------------------------------------------------------------------------------- -- fix_macos_resolv -------------------------------------------------------------------------------------------- procedure fix_macos_resolv (path_to_varrun : String) is DNSR : constant String := "/mDNSResponder"; path_orig : constant String := "/var/run" & DNSR; path_dest : constant String := path_to_varrun & DNSR; errprefix : constant String := "Hardlink failure: "; begin case platform_type is when macos => if DIR.Exists (path_orig) then if not Unix.create_hardlink (path_orig, path_dest) then TIO.Put_Line (errprefix & "link " & path_dest & " to " & path_orig); end if; else raise scenario_unexpected with errprefix & path_orig & " is not present on system"; end if; when others => null; end case; end fix_macos_resolv; -------------------------------------------------------------------------------------------- -- preplace_libgcc_s -------------------------------------------------------------------------------------------- procedure preplace_libgcc_s (path_to_toolchain : String) is mpath : constant String := "/" & default_compiler & "/lib"; dylib : constant String := mpath & "/libgcc_s.1.dylib"; TC : constant String := mount_target (toolchain); begin if DIR.Exists (TC & dylib) then forge_directory (path_to_toolchain & mpath); DIR.Copy_File (Source_Name => TC & dylib, Target_Name => path_to_toolchain & dylib); else raise scenario_unexpected with TC & dylib & " is not present on system"; end if; end preplace_libgcc_s; -------------------------------------------------------------------------------------------- -- populate_var_folder -------------------------------------------------------------------------------------------- procedure copy_rc_default (path_to_etc : String) is mm : constant String := get_master_mount; rcconf : constant String := "/rc.conf"; begin if DIR.Exists (mm & rcconf) then DIR.Copy_File (Source_Name => mm & rcconf, Target_Name => path_to_etc & "/defaults" & rcconf); end if; end copy_rc_default; -------------------------------------------------------------------------------------------- -- copy_resolv_conf -------------------------------------------------------------------------------------------- procedure copy_resolv_conf (path_to_etc : String) is procedure install (filename : String); resolv : constant String := "/resolv.conf"; netconfig : constant String := "/netconfig"; nssconf : constant String := "/nsswitch.conf"; nssfiles : constant String := "/nsswitch.files"; nssdns : constant String := "/nsswitch.dns"; procedure install (filename : String) is begin if DIR.Exists ("/etc" & filename) then DIR.Copy_File (Source_Name => "/etc" & filename, Target_Name => path_to_etc & filename); end if; end install; begin install (resolv); install (netconfig); install (nssconf); install (nssfiles); install (nssdns); end copy_resolv_conf; -------------------------------------------------------------------------------------------- -- copy_unkindness_IDs -------------------------------------------------------------------------------------------- procedure copy_unkindness_IDs (path_to_construction : String) is procedure install (filename, new_name : String); dir_unkindness : constant String := HT.USS (PM.configuration.dir_unkindness); procedure install (filename, new_name : String) is begin if DIR.Exists (filename) then DIR.Copy_File (Source_Name => filename, Target_Name => path_to_construction & new_name); end if; end install; begin if dir_unkindness /= PM.no_unkindness then install (dir_unkindness & "/custom_UID", "/.UID.custom"); install (dir_unkindness & "/custom_GID", "/.GID.custom"); end if; end copy_unkindness_IDs; -------------------------------------------------------------------------------------------- -- install_passwd -------------------------------------------------------------------------------------------- procedure install_passwd_and_group (path_to_etc : String) is procedure install (filename : String); mm : constant String := get_master_mount; maspwd : constant String := "/master.passwd"; passwd : constant String := "/passwd"; spwd : constant String := "/spwd.db"; pwd : constant String := "/pwd.db"; group : constant String := "/group"; mtree1 : constant String := "/mtree.preconfig.exclude"; mtree2 : constant String := "/mtree.prestage.exclude"; ldcnf2 : constant String := "/ld.so.conf"; procedure install (filename : String) is begin if DIR.Exists (mm & filename) then DIR.Copy_File (Source_Name => mm & filename, Target_Name => path_to_etc & filename); end if; end install; begin install (passwd); install (maspwd); install (spwd); install (pwd); install (group); install (mtree1); install (mtree2); install (ldcnf2); end install_passwd_and_group; -------------------------------------------------------------------------------------------- -- install_linux_ldsoconf -------------------------------------------------------------------------------------------- procedure install_linux_ldsoconf (path_to_etc_ldsocnf : String) is procedure install (filename : String); mm : constant String := get_master_mount; ldconf : constant String := "/x86_64-linux-gnu.conf"; procedure install (filename : String) is begin if DIR.Exists (mm & filename) then DIR.Copy_File (Source_Name => mm & filename, Target_Name => path_to_etc_ldsocnf & filename); end if; end install; begin install (ldconf); end install_linux_ldsoconf; -------------------------------------------------------------------------------------------- -- create_etc_services -------------------------------------------------------------------------------------------- procedure create_etc_services (path_to_etc : String) is svcfile : TIO.File_Type; begin TIO.Create (File => svcfile, Mode => TIO.Out_File, Name => path_to_etc & "/services"); TIO.Put_Line (svcfile, "ftp 21/tcp" & LAT.LF & "ftp 21/udp" & LAT.LF & "ssh 22/tcp" & LAT.LF & "ssh 22/udp" & LAT.LF & "http 80/tcp" & LAT.LF & "http 80/udp" & LAT.LF & "https 443/tcp" & LAT.LF & "https 443/udp" & LAT.LF); TIO.Close (svcfile); end create_etc_services; -------------------------------------------------------------------------------------------- -- create_etc_shells -------------------------------------------------------------------------------------------- procedure create_etc_shells (path_to_etc : String) is shells : TIO.File_Type; begin TIO.Create (File => shells, Mode => TIO.Out_File, Name => path_to_etc & "/shells"); TIO.Put_Line (shells, "/bin/sh"); TIO.Put_Line (shells, "/bin/csh"); if platform_type = linux then TIO.Put_Line (shells, "/bin/bash"); end if; TIO.Close (shells); end create_etc_shells; -------------------------------------------------------------------------------------------- -- create_make_conf -------------------------------------------------------------------------------------------- procedure create_make_conf (path_to_etc : String) is procedure override_defaults (label : String; value : HT.Text); makeconf : TIO.File_Type; profilemc : constant String := PM.raven_confdir & "/" & HT.USS (PM.configuration.profile) & "-make.conf"; profile : constant String := HT.USS (PM.configuration.profile); mjnum : constant Integer := Integer (PM.configuration.jobs_limit); procedure override_defaults (label : String; value : HT.Text) is begin if not (HT.equivalent (value, ports_default)) then TIO.Put_Line (makeconf, "DEFAULT_VERSIONS+=" & label & "=" & HT.USS (value)); end if; end override_defaults; begin TIO.Create (File => makeconf, Mode => TIO.Out_File, Name => path_to_etc & "/make.conf"); TIO.Put_Line (makeconf, "RAVENPROFILE=" & profile & LAT.LF & "RAVENBASE=" & HT.USS (PM.configuration.dir_localbase) & LAT.LF & "WRKDIRPREFIX=/construction" & LAT.LF & "DISTDIR=/distfiles" & LAT.LF & "NUMBER_CPUS=" & HT.int2str (Integer (PM.configuration.number_cores)) & LAT.LF & "MAKE_JOBS_NUMBER_LIMIT=" & HT.int2str (mjnum)); if developer_mode then TIO.Put_Line (makeconf, "DEVELOPER=1"); TIO.Put_Line (makeconf, "PATCH_DEBUG=yes"); end if; if DIR.Exists (HT.USS (PM.configuration.dir_ccache)) then TIO.Put_Line (makeconf, "BUILD_WITH_CCACHE=yes"); TIO.Put_Line (makeconf, "CCACHE_DIR=/ccache"); end if; override_defaults ("firebird", PM.configuration.def_firebird); override_defaults ("lua", PM.configuration.def_lua); override_defaults ("mysql", PM.configuration.def_mysql_group); override_defaults ("perl5", PM.configuration.def_perl); override_defaults ("php", PM.configuration.def_php); override_defaults ("pgsql", PM.configuration.def_postgresql); override_defaults ("python3", PM.configuration.def_python3); override_defaults ("ruby", PM.configuration.def_ruby); override_defaults ("ssl", PM.configuration.def_ssl); override_defaults ("tcl", PM.configuration.def_tcl_tk); concatenate_makeconf (makeconf, profilemc); TIO.Close (makeconf); end create_make_conf; -------------------------------------------------------------------------------------------- -- create_make_conf -------------------------------------------------------------------------------------------- procedure concatenate_makeconf (makeconf_handle : TIO.File_Type; target_name : String) is fragment : TIO.File_Type; begin if DIR.Exists (target_name) then TIO.Open (File => fragment, Mode => TIO.In_File, Name => target_name); while not TIO.End_Of_File (fragment) loop declare Line : String := TIO.Get_Line (fragment); begin TIO.Put_Line (makeconf_handle, Line); end; end loop; TIO.Close (fragment); end if; exception when others => null; end concatenate_makeconf; -------------------------------------------------------------------------------------------- -- create_sun_files -------------------------------------------------------------------------------------------- procedure create_sun_files (path_to_etc : String) is sun_file : TIO.File_Type; security : constant String := path_to_etc & "/security"; skel : constant String := path_to_etc & "/skel"; begin if platform_type /= sunos then return; end if; -- version found in Solaris 10u8 -- # -- # Copyright 2008 Sun Microsystems, Inc. All rights reserved. -- # Use is subject to license terms. -- # -- #ident "@(#)crypt.conf 1.2 08/05/14 SMI" -- # -- # The algorithm name __unix__ is reserved. -- -- 1 crypt_bsdmd5.so.1 -- 2a crypt_bsdbf.so.1 -- md5 crypt_sunmd5.so.1 -- 5 crypt_sha256.so.1 -- 6 crypt_sha512.so.1 DIR.Create_Path (security); TIO.Create (sun_file, TIO.Out_File, security & "/crypt.conf"); TIO.Put_Line (sun_file, "1 crypt_bsdmd5.so.1"); TIO.Put_Line (sun_file, "2a crypt_bsdbf.so.1"); TIO.Put_Line (sun_file, "md5 crypt_sunmd5.so.1"); TIO.Put_Line (sun_file, "5 crypt_sha256.so.1"); TIO.Put_Line (sun_file, "6 crypt_sha512.so.1"); TIO.Close (sun_file); -- Dummy /etc/user_attr to allow useradd to succeed TIO.Create (sun_file, TIO.Out_File, path_to_etc & "/user_attr"); TIO.Put_Line (sun_file, "adm::::profiles=Log Management"); TIO.Put_Line (sun_file, "lp::::profiles=Printer Management"); TIO.Close (sun_file); -- Create skel files DIR.Create_Path (skel); TIO.Create (sun_file, TIO.Out_File, skel & "/local.cshrc"); TIO.Put_Line (sun_file, "umask 022"); TIO.Put_Line (sun_file, "set path=(/bin /usr/bin /usr/ucb /etc .)"); TIO.Put_Line (sun_file, "if ( $?prompt ) then"); TIO.Put_Line (sun_file, " set history=32"); TIO.Put_Line (sun_file, "endif"); TIO.Close (sun_file); -- skel/local.login TIO.Create (sun_file, TIO.Out_File, skel & "/local.login"); TIO.Put_Line (sun_file, "stty -istrip"); TIO.Close (sun_file); -- skel/local.profile TIO.Create (sun_file, TIO.Out_File, skel & "/local.profile"); TIO.Put_Line (sun_file, "stty istrip"); TIO.Put_Line (sun_file, "PATH=/usr/bin:/usr/ucb:/etc:."); TIO.Put_Line (sun_file, "export PATH"); TIO.Close (sun_file); -- etc/datemsk (extremely pared done) TIO.Create (sun_file, TIO.Out_File, path_to_etc & "/datemsk"); TIO.Put_Line (sun_file, "%m/%d/%y %H:%M"); TIO.Put_Line (sun_file, "%m%d%H%M%y"); TIO.Close (sun_file); -- etc/shadow (couple of entries) TIO.Create (sun_file, TIO.Out_File, path_to_etc & "/shadow"); TIO.Put_Line (sun_file, "root:kF/MO3YejnKKE:6445::::::"); TIO.Put_Line (sun_file, "adm:NP:6445::::::"); TIO.Put_Line (sun_file, "lp:NP:6445::::::"); TIO.Put_Line (sun_file, "nobody:*LK*:6445::::::"); TIO.Put_Line (sun_file, "nobody4:*LK*:6445::::::"); TIO.Close (sun_file); -- etc/project TIO.Create (sun_file, TIO.Out_File, path_to_etc & "/project"); TIO.Put_Line (sun_file, "system:0::::"); TIO.Put_Line (sun_file, "user.root:1::::"); TIO.Put_Line (sun_file, "noproject:2::::"); TIO.Put_Line (sun_file, "default:3::::"); TIO.Put_Line (sun_file, "group.staff:10::::"); TIO.Close (sun_file); end create_sun_files; -------------------------------------------------------------------------------------------- -- process keyword files -------------------------------------------------------------------------------------------- procedure process_keyword_files (slave_mk : String; localbase : String) is procedure process_file (keyfile : String); Search : DIR.Search_Type; Dir_Ent : DIR.Directory_Entry_Type; keydir : constant String := slave_mk & "/Keywords"; procedure process_file (keyfile : String) is contents : constant String := FOP.get_file_contents (keyfile); lpattern : constant String := "%LOCALBASE%"; modified : Boolean := False; finaltxt : HT.Text := HT.SUS (contents); begin loop exit when not HT.contains (finaltxt, lpattern); modified := True; finaltxt := HT.replace_substring (finaltxt, lpattern, localbase); end loop; if modified then DIR.Delete_File (keyfile); FOP.dump_contents_to_file (HT.USS (finaltxt), keyfile); end if; end process_file; begin DIR.Start_Search (Search => Search, Directory => keydir, Filter => (DIR.Ordinary_File => True, others => False), Pattern => "*.ucl"); while DIR.More_Entries (Search => Search) loop DIR.Get_Next_Entry (Search => Search, Directory_Entry => Dir_Ent); declare kfile : constant String := keydir & "/" & DIR.Simple_Name (Dir_Ent); begin process_file (kfile); end; end loop; DIR.End_Search (Search); end process_keyword_files; end Replicant;
clairvoyant/anagram
Ada
2,741
adb
separate (Anagram.Grammars.Scanners) procedure On_Accept (Self : not null access Anagram.Grammars.Scanner_Handlers.Handler'Class; Scanner : not null access Anagram.Grammars.Scanners.Scanner'Class; Rule : Anagram.Grammars.Scanner_Types.Rule_Index; Token : out Ag_Tokens.Token; Skip : in out Boolean) is begin case Rule is when 1 => Self.Equal_Token (Scanner, Rule, Token, Skip); when 2 => Self.Inherited_Token (Scanner, Rule, Token, Skip); when 3 => Self.Synthesized_Token (Scanner, Rule, Token, Skip); when 4 => Self.Local_Token (Scanner, Rule, Token, Skip); when 5 => Self.Attributes_Token (Scanner, Rule, Token, Skip); when 6 => Self.Rules_Token (Scanner, Rule, Token, Skip); when 7 => Self.Token_Token (Scanner, Rule, Token, Skip); when 8 => Self.With_Token (Scanner, Rule, Token, Skip); when 9 => Self.Priority_Token (Scanner, Rule, Token, Skip); when 10 => Self.Integer_Token (Scanner, Rule, Token, Skip); when 11 => Self.Identifier_Token (Scanner, Rule, Token, Skip); when 12 => Self.Open_Rule_Token (Scanner, Rule, Token, Skip); when 13 => Self.Rule_Body_Token (Scanner, Rule, Token, Skip); when 14 => Self.Close_Rule_Token (Scanner, Rule, Token, Skip); when 15 => Self.Semicolon_Token (Scanner, Rule, Token, Skip); when 16 => Self.Open_Production_Name_Token (Scanner, Rule, Token, Skip); when 17 => Self.Close_Production_Name_Token (Scanner, Rule, Token, Skip); when 18 => Self.Open_Part_Name_Token (Scanner, Rule, Token, Skip); when 19 => Self.Close_Part_Name_Token (Scanner, Rule, Token, Skip); when 20 => Self.Open_List_Token (Scanner, Rule, Token, Skip); when 21 => Self.Close_List_Token (Scanner, Rule, Token, Skip); when 22 => Self.Open_Option_Token (Scanner, Rule, Token, Skip); when 23 => Self.Close_Option_Token (Scanner, Rule, Token, Skip); when 24 => Self.Colon_Token (Scanner, Rule, Token, Skip); when 25 => Self.Or_Token (Scanner, Rule, Token, Skip); when 26 => Self.Comma_Token (Scanner, Rule, Token, Skip); when 27 => Self.Regexp_Token (Scanner, Rule, Token, Skip); when 28 => Self.Spaces (Scanner, Rule, Token, Skip); when 29 => Self.Comment (Scanner, Rule, Token, Skip); when 30 => Self.New_Line (Scanner, Rule, Token, Skip); when others => raise Constraint_Error; end case; end On_Accept;
zhmu/ananas
Ada
3,640
ads
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . W I D E _ W I D E _ T E X T _ I O . F L O A T _ A U X -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package contains the routines for Ada.Wide_Wide_Text_IO.Float_IO that -- are shared among separate instantiations of this package. The routines -- in this package are identical semantically to those in Float_IO, except -- that the default parameters have been removed because they are supplied -- explicitly by the calls from within the generic template. Also used by -- Ada.Wide_Wide_Text_IO.Fixed_IO and by Ada.Wide_Wide_Text_IO.Decimal_IO. private generic type Num is digits <>; with function Scan (Str : String; Ptr : not null access Integer; Max : Integer) return Num; with procedure Set_Image (V : Num; S : in out String; P : in out Natural; Fore : Natural; Aft : Natural; Exp : Natural); package Ada.Wide_Wide_Text_IO.Float_Aux is procedure Get (File : File_Type; Item : out Num; Width : Field); procedure Put (File : File_Type; Item : Num; Fore : Field; Aft : Field; Exp : Field); procedure Gets (From : String; Item : out Num; Last : out Positive); procedure Puts (To : out String; Item : Num; Aft : Field; Exp : Field); end Ada.Wide_Wide_Text_IO.Float_Aux;
zhmu/ananas
Ada
56,836
adb
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- ADA.CONTAINERS.INDEFINITE_ORDERED_MULTISETS -- -- -- -- B o d y -- -- -- -- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ with Ada.Unchecked_Deallocation; with Ada.Containers.Red_Black_Trees.Generic_Operations; pragma Elaborate_All (Ada.Containers.Red_Black_Trees.Generic_Operations); with Ada.Containers.Red_Black_Trees.Generic_Keys; pragma Elaborate_All (Ada.Containers.Red_Black_Trees.Generic_Keys); with Ada.Containers.Red_Black_Trees.Generic_Set_Operations; pragma Elaborate_All (Ada.Containers.Red_Black_Trees.Generic_Set_Operations); with System; use type System.Address; with System.Put_Images; package body Ada.Containers.Indefinite_Ordered_Multisets with SPARK_Mode => Off is pragma Warnings (Off, "variable ""Busy*"" is not referenced"); pragma Warnings (Off, "variable ""Lock*"" is not referenced"); -- See comment in Ada.Containers.Helpers ----------------------------- -- Node Access Subprograms -- ----------------------------- -- These subprograms provide a functional interface to access fields -- of a node, and a procedural interface for modifying these values. function Color (Node : Node_Access) return Color_Type; pragma Inline (Color); function Left (Node : Node_Access) return Node_Access; pragma Inline (Left); function Parent (Node : Node_Access) return Node_Access; pragma Inline (Parent); function Right (Node : Node_Access) return Node_Access; pragma Inline (Right); procedure Set_Parent (Node : Node_Access; Parent : Node_Access); pragma Inline (Set_Parent); procedure Set_Left (Node : Node_Access; Left : Node_Access); pragma Inline (Set_Left); procedure Set_Right (Node : Node_Access; Right : Node_Access); pragma Inline (Set_Right); procedure Set_Color (Node : Node_Access; Color : Color_Type); pragma Inline (Set_Color); ----------------------- -- Local Subprograms -- ----------------------- function Copy_Node (Source : Node_Access) return Node_Access; pragma Inline (Copy_Node); procedure Free (X : in out Node_Access); procedure Insert_Sans_Hint (Tree : in out Tree_Type; New_Item : Element_Type; Node : out Node_Access); procedure Insert_With_Hint (Dst_Tree : in out Tree_Type; Dst_Hint : Node_Access; Src_Node : Node_Access; Dst_Node : out Node_Access); function Is_Equal_Node_Node (L, R : Node_Access) return Boolean; pragma Inline (Is_Equal_Node_Node); function Is_Greater_Element_Node (Left : Element_Type; Right : Node_Access) return Boolean; pragma Inline (Is_Greater_Element_Node); function Is_Less_Element_Node (Left : Element_Type; Right : Node_Access) return Boolean; pragma Inline (Is_Less_Element_Node); function Is_Less_Node_Node (L, R : Node_Access) return Boolean; pragma Inline (Is_Less_Node_Node); procedure Replace_Element (Tree : in out Tree_Type; Node : Node_Access; Item : Element_Type); -------------------------- -- Local Instantiations -- -------------------------- package Tree_Operations is new Red_Black_Trees.Generic_Operations (Tree_Types); procedure Delete_Tree is new Tree_Operations.Generic_Delete_Tree (Free); function Copy_Tree is new Tree_Operations.Generic_Copy_Tree (Copy_Node, Delete_Tree); use Tree_Operations; procedure Free_Element is new Ada.Unchecked_Deallocation (Element_Type, Element_Access); function Is_Equal is new Tree_Operations.Generic_Equal (Is_Equal_Node_Node); package Set_Ops is new Generic_Set_Operations (Tree_Operations => Tree_Operations, Insert_With_Hint => Insert_With_Hint, Copy_Tree => Copy_Tree, Delete_Tree => Delete_Tree, Is_Less => Is_Less_Node_Node, Free => Free); package Element_Keys is new Red_Black_Trees.Generic_Keys (Tree_Operations => Tree_Operations, Key_Type => Element_Type, Is_Less_Key_Node => Is_Less_Element_Node, Is_Greater_Key_Node => Is_Greater_Element_Node); --------- -- "<" -- --------- function "<" (Left, Right : Cursor) return Boolean is begin if Left.Node = null then raise Constraint_Error with "Left cursor equals No_Element"; end if; if Right.Node = null then raise Constraint_Error with "Right cursor equals No_Element"; end if; if Left.Node.Element = null then raise Program_Error with "Left cursor is bad"; end if; if Right.Node.Element = null then raise Program_Error with "Right cursor is bad"; end if; pragma Assert (Vet (Left.Container.Tree, Left.Node), "bad Left cursor in ""<"""); pragma Assert (Vet (Right.Container.Tree, Right.Node), "bad Right cursor in ""<"""); return Left.Node.Element.all < Right.Node.Element.all; end "<"; function "<" (Left : Cursor; Right : Element_Type) return Boolean is begin if Left.Node = null then raise Constraint_Error with "Left cursor equals No_Element"; end if; if Left.Node.Element = null then raise Program_Error with "Left cursor is bad"; end if; pragma Assert (Vet (Left.Container.Tree, Left.Node), "bad Left cursor in ""<"""); return Left.Node.Element.all < Right; end "<"; function "<" (Left : Element_Type; Right : Cursor) return Boolean is begin if Right.Node = null then raise Constraint_Error with "Right cursor equals No_Element"; end if; if Right.Node.Element = null then raise Program_Error with "Right cursor is bad"; end if; pragma Assert (Vet (Right.Container.Tree, Right.Node), "bad Right cursor in ""<"""); return Left < Right.Node.Element.all; end "<"; --------- -- "=" -- --------- function "=" (Left, Right : Set) return Boolean is begin return Is_Equal (Left.Tree, Right.Tree); end "="; --------- -- ">" -- --------- function ">" (Left, Right : Cursor) return Boolean is begin if Left.Node = null then raise Constraint_Error with "Left cursor equals No_Element"; end if; if Right.Node = null then raise Constraint_Error with "Right cursor equals No_Element"; end if; if Left.Node.Element = null then raise Program_Error with "Left cursor is bad"; end if; if Right.Node.Element = null then raise Program_Error with "Right cursor is bad"; end if; pragma Assert (Vet (Left.Container.Tree, Left.Node), "bad Left cursor in "">"""); pragma Assert (Vet (Right.Container.Tree, Right.Node), "bad Right cursor in "">"""); -- L > R same as R < L return Right.Node.Element.all < Left.Node.Element.all; end ">"; function ">" (Left : Cursor; Right : Element_Type) return Boolean is begin if Left.Node = null then raise Constraint_Error with "Left cursor equals No_Element"; end if; if Left.Node.Element = null then raise Program_Error with "Left cursor is bad"; end if; pragma Assert (Vet (Left.Container.Tree, Left.Node), "bad Left cursor in "">"""); return Right < Left.Node.Element.all; end ">"; function ">" (Left : Element_Type; Right : Cursor) return Boolean is begin if Right.Node = null then raise Constraint_Error with "Right cursor equals No_Element"; end if; if Right.Node.Element = null then raise Program_Error with "Right cursor is bad"; end if; pragma Assert (Vet (Right.Container.Tree, Right.Node), "bad Right cursor in "">"""); return Right.Node.Element.all < Left; end ">"; ------------ -- Adjust -- ------------ procedure Adjust is new Tree_Operations.Generic_Adjust (Copy_Tree); procedure Adjust (Container : in out Set) is begin Adjust (Container.Tree); end Adjust; ------------ -- Assign -- ------------ procedure Assign (Target : in out Set; Source : Set) is begin if Target'Address = Source'Address then return; end if; Target.Clear; Target.Union (Source); end Assign; ------------- -- Ceiling -- ------------- function Ceiling (Container : Set; Item : Element_Type) return Cursor is Node : constant Node_Access := Element_Keys.Ceiling (Container.Tree, Item); begin if Node = null then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, Node); end Ceiling; ----------- -- Clear -- ----------- procedure Clear is new Tree_Operations.Generic_Clear (Delete_Tree); procedure Clear (Container : in out Set) is begin Clear (Container.Tree); end Clear; ----------- -- Color -- ----------- function Color (Node : Node_Access) return Color_Type is begin return Node.Color; end Color; ------------------------ -- Constant_Reference -- ------------------------ function Constant_Reference (Container : aliased Set; Position : Cursor) return Constant_Reference_Type is begin if Position.Container = null then raise Constraint_Error with "Position cursor has no element"; end if; if Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor designates wrong container"; end if; pragma Assert (Vet (Position.Container.Tree, Position.Node), "bad cursor in Constant_Reference"); -- Note: in predefined container units, the creation of a reference -- increments the busy bit of the container, and its finalization -- decrements it. In the absence of control machinery, this tampering -- protection is missing. declare T : Tree_Type renames Container.Tree'Unrestricted_Access.all; pragma Unreferenced (T); begin return R : constant Constant_Reference_Type := (Element => Position.Node.Element, Control => (Container => Container'Unrestricted_Access)) do null; end return; end; end Constant_Reference; -------------- -- Contains -- -------------- function Contains (Container : Set; Item : Element_Type) return Boolean is begin return Find (Container, Item) /= No_Element; end Contains; ---------- -- Copy -- ---------- function Copy (Source : Set) return Set is begin return Target : Set do Target.Assign (Source); end return; end Copy; --------------- -- Copy_Node -- --------------- function Copy_Node (Source : Node_Access) return Node_Access is X : Element_Access := new Element_Type'(Source.Element.all); begin return new Node_Type'(Parent => null, Left => null, Right => null, Color => Source.Color, Element => X); exception when others => Free_Element (X); raise; end Copy_Node; ------------ -- Delete -- ------------ procedure Delete (Container : in out Set; Item : Element_Type) is Tree : Tree_Type renames Container.Tree; Node : Node_Access := Element_Keys.Ceiling (Tree, Item); Done : constant Node_Access := Element_Keys.Upper_Bound (Tree, Item); X : Node_Access; begin if Node = Done then raise Constraint_Error with "attempt to delete element not in set"; end if; loop X := Node; Node := Tree_Operations.Next (Node); Tree_Operations.Delete_Node_Sans_Free (Tree, X); Free (X); exit when Node = Done; end loop; end Delete; procedure Delete (Container : in out Set; Position : in out Cursor) is begin if Position.Node = null then raise Constraint_Error with "Position cursor equals No_Element"; end if; if Position.Node.Element = null then raise Program_Error with "Position cursor is bad"; end if; if Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor designates wrong set"; end if; pragma Assert (Vet (Container.Tree, Position.Node), "bad cursor in Delete"); Tree_Operations.Delete_Node_Sans_Free (Container.Tree, Position.Node); Free (Position.Node); Position.Container := null; end Delete; ------------------ -- Delete_First -- ------------------ procedure Delete_First (Container : in out Set) is Tree : Tree_Type renames Container.Tree; X : Node_Access := Tree.First; begin if X = null then return; end if; Tree_Operations.Delete_Node_Sans_Free (Tree, X); Free (X); end Delete_First; ----------------- -- Delete_Last -- ----------------- procedure Delete_Last (Container : in out Set) is Tree : Tree_Type renames Container.Tree; X : Node_Access := Tree.Last; begin if X = null then return; end if; Tree_Operations.Delete_Node_Sans_Free (Tree, X); Free (X); end Delete_Last; ---------------- -- Difference -- ---------------- procedure Difference (Target : in out Set; Source : Set) is begin Set_Ops.Difference (Target.Tree, Source.Tree); end Difference; function Difference (Left, Right : Set) return Set is Tree : constant Tree_Type := Set_Ops.Difference (Left.Tree, Right.Tree); begin return Set'(Controlled with Tree); end Difference; ------------- -- Element -- ------------- function Element (Position : Cursor) return Element_Type is begin if Position.Node = null then raise Constraint_Error with "Position cursor equals No_Element"; end if; if Position.Node.Element = null then raise Program_Error with "Position cursor is bad"; end if; if Checks and then (Left (Position.Node) = Position.Node or else Right (Position.Node) = Position.Node) then raise Program_Error with "dangling cursor"; end if; pragma Assert (Vet (Position.Container.Tree, Position.Node), "bad cursor in Element"); return Position.Node.Element.all; end Element; ------------------------- -- Equivalent_Elements -- ------------------------- function Equivalent_Elements (Left, Right : Element_Type) return Boolean is begin if Left < Right or else Right < Left then return False; else return True; end if; end Equivalent_Elements; --------------------- -- Equivalent_Sets -- --------------------- function Equivalent_Sets (Left, Right : Set) return Boolean is function Is_Equivalent_Node_Node (L, R : Node_Access) return Boolean; pragma Inline (Is_Equivalent_Node_Node); function Is_Equivalent is new Tree_Operations.Generic_Equal (Is_Equivalent_Node_Node); ----------------------------- -- Is_Equivalent_Node_Node -- ----------------------------- function Is_Equivalent_Node_Node (L, R : Node_Access) return Boolean is begin if L.Element.all < R.Element.all then return False; elsif R.Element.all < L.Element.all then return False; else return True; end if; end Is_Equivalent_Node_Node; -- Start of processing for Equivalent_Sets begin return Is_Equivalent (Left.Tree, Right.Tree); end Equivalent_Sets; ------------- -- Exclude -- ------------- procedure Exclude (Container : in out Set; Item : Element_Type) is Tree : Tree_Type renames Container.Tree; Node : Node_Access := Element_Keys.Ceiling (Tree, Item); Done : constant Node_Access := Element_Keys.Upper_Bound (Tree, Item); X : Node_Access; begin while Node /= Done loop X := Node; Node := Tree_Operations.Next (Node); Tree_Operations.Delete_Node_Sans_Free (Tree, X); Free (X); end loop; end Exclude; ---------- -- Find -- ---------- function Find (Container : Set; Item : Element_Type) return Cursor is Node : constant Node_Access := Element_Keys.Find (Container.Tree, Item); begin if Node = null then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, Node); end Find; -------------- -- Finalize -- -------------- procedure Finalize (Object : in out Iterator) is begin Unbusy (Object.Container.Tree.TC); end Finalize; ----------- -- First -- ----------- function First (Container : Set) return Cursor is begin if Container.Tree.First = null then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, Container.Tree.First); end First; function First (Object : Iterator) return Cursor is begin -- The value of the iterator object's Node component influences the -- behavior of the First (and Last) selector function. -- When the Node component is null, this means the iterator object was -- constructed without a start expression, in which case the (forward) -- iteration starts from the (logical) beginning of the entire sequence -- of items (corresponding to Container.First, for a forward iterator). -- Otherwise, this is iteration over a partial sequence of items. When -- the Node component is non-null, the iterator object was constructed -- with a start expression, that specifies the position from which the -- (forward) partial iteration begins. if Object.Node = null then return Object.Container.First; else return Cursor'(Object.Container, Object.Node); end if; end First; ------------------- -- First_Element -- ------------------- function First_Element (Container : Set) return Element_Type is begin if Container.Tree.First = null then raise Constraint_Error with "set is empty"; end if; pragma Assert (Container.Tree.First.Element /= null); return Container.Tree.First.Element.all; end First_Element; ----------- -- Floor -- ----------- function Floor (Container : Set; Item : Element_Type) return Cursor is Node : constant Node_Access := Element_Keys.Floor (Container.Tree, Item); begin if Node = null then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, Node); end Floor; ---------- -- Free -- ---------- procedure Free (X : in out Node_Access) is procedure Deallocate is new Ada.Unchecked_Deallocation (Node_Type, Node_Access); begin if X = null then return; end if; X.Parent := X; X.Left := X; X.Right := X; begin Free_Element (X.Element); exception when others => X.Element := null; Deallocate (X); raise; end; Deallocate (X); end Free; ------------------ -- Generic_Keys -- ------------------ package body Generic_Keys is ----------------------- -- Local Subprograms -- ----------------------- function Is_Less_Key_Node (Left : Key_Type; Right : Node_Access) return Boolean; pragma Inline (Is_Less_Key_Node); function Is_Greater_Key_Node (Left : Key_Type; Right : Node_Access) return Boolean; pragma Inline (Is_Greater_Key_Node); -------------------------- -- Local Instantiations -- -------------------------- package Key_Keys is new Red_Black_Trees.Generic_Keys (Tree_Operations => Tree_Operations, Key_Type => Key_Type, Is_Less_Key_Node => Is_Less_Key_Node, Is_Greater_Key_Node => Is_Greater_Key_Node); ------------- -- Ceiling -- ------------- function Ceiling (Container : Set; Key : Key_Type) return Cursor is Node : constant Node_Access := Key_Keys.Ceiling (Container.Tree, Key); begin if Node = null then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, Node); end Ceiling; -------------- -- Contains -- -------------- function Contains (Container : Set; Key : Key_Type) return Boolean is begin return Find (Container, Key) /= No_Element; end Contains; ------------ -- Delete -- ------------ procedure Delete (Container : in out Set; Key : Key_Type) is Tree : Tree_Type renames Container.Tree; Node : Node_Access := Key_Keys.Ceiling (Tree, Key); Done : constant Node_Access := Key_Keys.Upper_Bound (Tree, Key); X : Node_Access; begin if Node = Done then raise Constraint_Error with "attempt to delete key not in set"; end if; loop X := Node; Node := Tree_Operations.Next (Node); Tree_Operations.Delete_Node_Sans_Free (Tree, X); Free (X); exit when Node = Done; end loop; end Delete; ------------- -- Element -- ------------- function Element (Container : Set; Key : Key_Type) return Element_Type is Node : constant Node_Access := Key_Keys.Find (Container.Tree, Key); begin if Node = null then raise Constraint_Error with "key not in set"; end if; return Node.Element.all; end Element; --------------------- -- Equivalent_Keys -- --------------------- function Equivalent_Keys (Left, Right : Key_Type) return Boolean is begin if Left < Right or else Right < Left then return False; else return True; end if; end Equivalent_Keys; ------------- -- Exclude -- ------------- procedure Exclude (Container : in out Set; Key : Key_Type) is Tree : Tree_Type renames Container.Tree; Node : Node_Access := Key_Keys.Ceiling (Tree, Key); Done : constant Node_Access := Key_Keys.Upper_Bound (Tree, Key); X : Node_Access; begin while Node /= Done loop X := Node; Node := Tree_Operations.Next (Node); Tree_Operations.Delete_Node_Sans_Free (Tree, X); Free (X); end loop; end Exclude; ---------- -- Find -- ---------- function Find (Container : Set; Key : Key_Type) return Cursor is Node : constant Node_Access := Key_Keys.Find (Container.Tree, Key); begin if Node = null then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, Node); end Find; ----------- -- Floor -- ----------- function Floor (Container : Set; Key : Key_Type) return Cursor is Node : constant Node_Access := Key_Keys.Floor (Container.Tree, Key); begin if Node = null then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, Node); end Floor; ------------------------- -- Is_Greater_Key_Node -- ------------------------- function Is_Greater_Key_Node (Left : Key_Type; Right : Node_Access) return Boolean is begin return Key (Right.Element.all) < Left; end Is_Greater_Key_Node; ---------------------- -- Is_Less_Key_Node -- ---------------------- function Is_Less_Key_Node (Left : Key_Type; Right : Node_Access) return Boolean is begin return Left < Key (Right.Element.all); end Is_Less_Key_Node; ------------- -- Iterate -- ------------- procedure Iterate (Container : Set; Key : Key_Type; Process : not null access procedure (Position : Cursor)) is procedure Process_Node (Node : Node_Access); pragma Inline (Process_Node); procedure Local_Iterate is new Key_Keys.Generic_Iteration (Process_Node); ------------------ -- Process_Node -- ------------------ procedure Process_Node (Node : Node_Access) is begin Process (Cursor'(Container'Unrestricted_Access, Node)); end Process_Node; T : Tree_Type renames Container.Tree'Unrestricted_Access.all; Busy : With_Busy (T.TC'Unrestricted_Access); -- Start of processing for Iterate begin Local_Iterate (T, Key); end Iterate; --------- -- Key -- --------- function Key (Position : Cursor) return Key_Type is begin if Position.Node = null then raise Constraint_Error with "Position cursor equals No_Element"; end if; if Position.Node.Element = null then raise Program_Error with "Position cursor is bad"; end if; pragma Assert (Vet (Position.Container.Tree, Position.Node), "bad cursor in Key"); return Key (Position.Node.Element.all); end Key; --------------------- -- Reverse_Iterate -- --------------------- procedure Reverse_Iterate (Container : Set; Key : Key_Type; Process : not null access procedure (Position : Cursor)) is procedure Process_Node (Node : Node_Access); pragma Inline (Process_Node); ------------- -- Iterate -- ------------- procedure Local_Reverse_Iterate is new Key_Keys.Generic_Reverse_Iteration (Process_Node); ------------------ -- Process_Node -- ------------------ procedure Process_Node (Node : Node_Access) is begin Process (Cursor'(Container'Unrestricted_Access, Node)); end Process_Node; T : Tree_Type renames Container.Tree'Unrestricted_Access.all; Busy : With_Busy (T.TC'Unrestricted_Access); -- Start of processing for Reverse_Iterate begin Local_Reverse_Iterate (T, Key); end Reverse_Iterate; -------------------- -- Update_Element -- -------------------- procedure Update_Element (Container : in out Set; Position : Cursor; Process : not null access procedure (Element : in out Element_Type)) is Tree : Tree_Type renames Container.Tree; Node : constant Node_Access := Position.Node; begin if Node = null then raise Constraint_Error with "Position cursor equals No_Element"; end if; if Node.Element = null then raise Program_Error with "Position cursor is bad"; end if; if Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor designates wrong set"; end if; pragma Assert (Vet (Tree, Node), "bad cursor in Update_Element"); declare E : Element_Type renames Node.Element.all; K : constant Key_Type := Key (E); Lock : With_Lock (Tree.TC'Unrestricted_Access); begin Process (E); if Equivalent_Keys (Left => K, Right => Key (E)) then return; end if; end; -- Delete_Node checks busy-bit Tree_Operations.Delete_Node_Sans_Free (Tree, Node); Insert_New_Item : declare function New_Node return Node_Access; pragma Inline (New_Node); procedure Insert_Post is new Element_Keys.Generic_Insert_Post (New_Node); procedure Unconditional_Insert is new Element_Keys.Generic_Unconditional_Insert (Insert_Post); -------------- -- New_Node -- -------------- function New_Node return Node_Access is begin Node.Color := Red_Black_Trees.Red; Node.Parent := null; Node.Left := null; Node.Right := null; return Node; end New_Node; Result : Node_Access; -- Start of processing for Insert_New_Item begin Unconditional_Insert (Tree => Tree, Key => Node.Element.all, Node => Result); pragma Assert (Result = Node); end Insert_New_Item; end Update_Element; end Generic_Keys; ----------------- -- Has_Element -- ----------------- function Has_Element (Position : Cursor) return Boolean is begin return Position /= No_Element; end Has_Element; ------------ -- Insert -- ------------ procedure Insert (Container : in out Set; New_Item : Element_Type) is Position : Cursor; begin Insert (Container, New_Item, Position); end Insert; procedure Insert (Container : in out Set; New_Item : Element_Type; Position : out Cursor) is begin Insert_Sans_Hint (Container.Tree, New_Item, Position.Node); Position.Container := Container'Unrestricted_Access; end Insert; ---------------------- -- Insert_Sans_Hint -- ---------------------- procedure Insert_Sans_Hint (Tree : in out Tree_Type; New_Item : Element_Type; Node : out Node_Access) is function New_Node return Node_Access; pragma Inline (New_Node); procedure Insert_Post is new Element_Keys.Generic_Insert_Post (New_Node); procedure Unconditional_Insert is new Element_Keys.Generic_Unconditional_Insert (Insert_Post); -------------- -- New_Node -- -------------- function New_Node return Node_Access is -- The element allocator may need an accessibility check in the case -- the actual type is class-wide or has access discriminants (see -- RM 4.8(10.1) and AI12-0035). pragma Unsuppress (Accessibility_Check); Element : Element_Access := new Element_Type'(New_Item); begin return new Node_Type'(Parent => null, Left => null, Right => null, Color => Red_Black_Trees.Red, Element => Element); exception when others => Free_Element (Element); raise; end New_Node; -- Start of processing for Insert_Sans_Hint begin Unconditional_Insert (Tree, New_Item, Node); end Insert_Sans_Hint; ---------------------- -- Insert_With_Hint -- ---------------------- procedure Insert_With_Hint (Dst_Tree : in out Tree_Type; Dst_Hint : Node_Access; Src_Node : Node_Access; Dst_Node : out Node_Access) is function New_Node return Node_Access; pragma Inline (New_Node); procedure Insert_Post is new Element_Keys.Generic_Insert_Post (New_Node); procedure Insert_Sans_Hint is new Element_Keys.Generic_Unconditional_Insert (Insert_Post); procedure Local_Insert_With_Hint is new Element_Keys.Generic_Unconditional_Insert_With_Hint (Insert_Post, Insert_Sans_Hint); -------------- -- New_Node -- -------------- function New_Node return Node_Access is X : Element_Access := new Element_Type'(Src_Node.Element.all); begin return new Node_Type'(Parent => null, Left => null, Right => null, Color => Red, Element => X); exception when others => Free_Element (X); raise; end New_Node; -- Start of processing for Insert_With_Hint begin Local_Insert_With_Hint (Dst_Tree, Dst_Hint, Src_Node.Element.all, Dst_Node); end Insert_With_Hint; ------------------ -- Intersection -- ------------------ procedure Intersection (Target : in out Set; Source : Set) is begin Set_Ops.Intersection (Target.Tree, Source.Tree); end Intersection; function Intersection (Left, Right : Set) return Set is Tree : constant Tree_Type := Set_Ops.Intersection (Left.Tree, Right.Tree); begin return Set'(Controlled with Tree); end Intersection; -------------- -- Is_Empty -- -------------- function Is_Empty (Container : Set) return Boolean is begin return Container.Tree.Length = 0; end Is_Empty; ------------------------ -- Is_Equal_Node_Node -- ------------------------ function Is_Equal_Node_Node (L, R : Node_Access) return Boolean is begin return L.Element.all = R.Element.all; end Is_Equal_Node_Node; ----------------------------- -- Is_Greater_Element_Node -- ----------------------------- function Is_Greater_Element_Node (Left : Element_Type; Right : Node_Access) return Boolean is begin -- e > node same as node < e return Right.Element.all < Left; end Is_Greater_Element_Node; -------------------------- -- Is_Less_Element_Node -- -------------------------- function Is_Less_Element_Node (Left : Element_Type; Right : Node_Access) return Boolean is begin return Left < Right.Element.all; end Is_Less_Element_Node; ----------------------- -- Is_Less_Node_Node -- ----------------------- function Is_Less_Node_Node (L, R : Node_Access) return Boolean is begin return L.Element.all < R.Element.all; end Is_Less_Node_Node; --------------- -- Is_Subset -- --------------- function Is_Subset (Subset : Set; Of_Set : Set) return Boolean is begin return Set_Ops.Is_Subset (Subset => Subset.Tree, Of_Set => Of_Set.Tree); end Is_Subset; ------------- -- Iterate -- ------------- procedure Iterate (Container : Set; Item : Element_Type; Process : not null access procedure (Position : Cursor)) is procedure Process_Node (Node : Node_Access); pragma Inline (Process_Node); procedure Local_Iterate is new Element_Keys.Generic_Iteration (Process_Node); ------------------ -- Process_Node -- ------------------ procedure Process_Node (Node : Node_Access) is begin Process (Cursor'(Container'Unrestricted_Access, Node)); end Process_Node; T : Tree_Type renames Container.Tree'Unrestricted_Access.all; Busy : With_Busy (T.TC'Unrestricted_Access); -- Start of processing for Iterate begin Local_Iterate (T, Item); end Iterate; procedure Iterate (Container : Set; Process : not null access procedure (Position : Cursor)) is procedure Process_Node (Node : Node_Access); pragma Inline (Process_Node); procedure Local_Iterate is new Tree_Operations.Generic_Iteration (Process_Node); ------------------ -- Process_Node -- ------------------ procedure Process_Node (Node : Node_Access) is begin Process (Cursor'(Container'Unrestricted_Access, Node)); end Process_Node; T : Tree_Type renames Container.Tree'Unrestricted_Access.all; Busy : With_Busy (T.TC'Unrestricted_Access); -- Start of processing for Iterate begin Local_Iterate (T); end Iterate; function Iterate (Container : Set) return Set_Iterator_Interfaces.Reversible_Iterator'Class is S : constant Set_Access := Container'Unrestricted_Access; begin -- The value of the Node component influences the behavior of the First -- and Last selector functions of the iterator object. When the Node -- component is null (as is the case here), this means the iterator -- object was constructed without a start expression. This is a complete -- iterator, meaning that the iteration starts from the (logical) -- beginning of the sequence of items. -- Note: For a forward iterator, Container.First is the beginning, and -- for a reverse iterator, Container.Last is the beginning. return It : constant Iterator := (Limited_Controlled with S, null) do Busy (S.Tree.TC); end return; end Iterate; function Iterate (Container : Set; Start : Cursor) return Set_Iterator_Interfaces.Reversible_Iterator'Class is S : constant Set_Access := Container'Unrestricted_Access; begin -- It was formerly the case that when Start = No_Element, the partial -- iterator was defined to behave the same as for a complete iterator, -- and iterate over the entire sequence of items. However, those -- semantics were unintuitive and arguably error-prone (it is too easy -- to accidentally create an endless loop), and so they were changed, -- per the ARG meeting in Denver on 2011/11. However, there was no -- consensus about what positive meaning this corner case should have, -- and so it was decided to simply raise an exception. This does imply, -- however, that it is not possible to use a partial iterator to specify -- an empty sequence of items. if Start = No_Element then raise Constraint_Error with "Start position for iterator equals No_Element"; end if; if Start.Container /= Container'Unrestricted_Access then raise Program_Error with "Start cursor of Iterate designates wrong set"; end if; pragma Assert (Vet (Container.Tree, Start.Node), "Start cursor of Iterate is bad"); -- The value of the Node component influences the behavior of the First -- and Last selector functions of the iterator object. When the Node -- component is non-null (as is the case here), it means that this is a -- partial iteration, over a subset of the complete sequence of -- items. The iterator object was constructed with a start expression, -- indicating the position from which the iteration begins. Note that -- the start position has the same value irrespective of whether this is -- a forward or reverse iteration. return It : constant Iterator := (Limited_Controlled with S, Start.Node) do Busy (S.Tree.TC); end return; end Iterate; ---------- -- Last -- ---------- function Last (Container : Set) return Cursor is begin if Container.Tree.Last = null then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, Container.Tree.Last); end Last; function Last (Object : Iterator) return Cursor is begin -- The value of the iterator object's Node component influences the -- behavior of the Last (and First) selector function. -- When the Node component is null, this means the iterator object was -- constructed without a start expression, in which case the (reverse) -- iteration starts from the (logical) beginning of the entire sequence -- (corresponding to Container.Last, for a reverse iterator). -- Otherwise, this is iteration over a partial sequence of items. When -- the Node component is non-null, the iterator object was constructed -- with a start expression, that specifies the position from which the -- (reverse) partial iteration begins. if Object.Node = null then return Object.Container.Last; else return Cursor'(Object.Container, Object.Node); end if; end Last; ------------------ -- Last_Element -- ------------------ function Last_Element (Container : Set) return Element_Type is begin if Container.Tree.Last = null then raise Constraint_Error with "set is empty"; end if; pragma Assert (Container.Tree.Last.Element /= null); return Container.Tree.Last.Element.all; end Last_Element; ---------- -- Left -- ---------- function Left (Node : Node_Access) return Node_Access is begin return Node.Left; end Left; ------------ -- Length -- ------------ function Length (Container : Set) return Count_Type is begin return Container.Tree.Length; end Length; ---------- -- Move -- ---------- procedure Move is new Tree_Operations.Generic_Move (Clear); procedure Move (Target : in out Set; Source : in out Set) is begin Move (Target => Target.Tree, Source => Source.Tree); end Move; ---------- -- Next -- ---------- function Next (Position : Cursor) return Cursor is begin if Position = No_Element then return No_Element; end if; pragma Assert (Vet (Position.Container.Tree, Position.Node), "bad cursor in Next"); declare Node : constant Node_Access := Tree_Operations.Next (Position.Node); begin if Node = null then return No_Element; end if; return Cursor'(Position.Container, Node); end; end Next; procedure Next (Position : in out Cursor) is begin Position := Next (Position); end Next; function Next (Object : Iterator; Position : Cursor) return Cursor is begin if Position.Container = null then return No_Element; end if; if Position.Container /= Object.Container then raise Program_Error with "Position cursor of Next designates wrong set"; end if; return Next (Position); end Next; ------------- -- Overlap -- ------------- function Overlap (Left, Right : Set) return Boolean is begin return Set_Ops.Overlap (Left.Tree, Right.Tree); end Overlap; ------------ -- Parent -- ------------ function Parent (Node : Node_Access) return Node_Access is begin return Node.Parent; end Parent; -------------- -- Previous -- -------------- function Previous (Position : Cursor) return Cursor is begin if Position = No_Element then return No_Element; end if; pragma Assert (Vet (Position.Container.Tree, Position.Node), "bad cursor in Previous"); declare Node : constant Node_Access := Tree_Operations.Previous (Position.Node); begin if Node = null then return No_Element; end if; return Cursor'(Position.Container, Node); end; end Previous; procedure Previous (Position : in out Cursor) is begin Position := Previous (Position); end Previous; function Previous (Object : Iterator; Position : Cursor) return Cursor is begin if Position.Container = null then return No_Element; end if; if Position.Container /= Object.Container then raise Program_Error with "Position cursor of Previous designates wrong set"; end if; return Previous (Position); end Previous; ------------------- -- Query_Element -- ------------------- procedure Query_Element (Position : Cursor; Process : not null access procedure (Element : Element_Type)) is begin if Position.Node = null then raise Constraint_Error with "Position cursor equals No_Element"; end if; if Position.Node.Element = null then raise Program_Error with "Position cursor is bad"; end if; pragma Assert (Vet (Position.Container.Tree, Position.Node), "bad cursor in Query_Element"); declare T : Tree_Type renames Position.Container.Tree; Lock : With_Lock (T.TC'Unrestricted_Access); begin Process (Position.Node.Element.all); end; end Query_Element; --------------- -- Put_Image -- --------------- procedure Put_Image (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set) is First_Time : Boolean := True; use System.Put_Images; begin Array_Before (S); for X of V loop if First_Time then First_Time := False; else Simple_Array_Between (S); end if; Element_Type'Put_Image (S, X); end loop; Array_After (S); end Put_Image; ---------- -- Read -- ---------- procedure Read (Stream : not null access Root_Stream_Type'Class; Container : out Set) is function Read_Node (Stream : not null access Root_Stream_Type'Class) return Node_Access; pragma Inline (Read_Node); procedure Read is new Tree_Operations.Generic_Read (Clear, Read_Node); --------------- -- Read_Node -- --------------- function Read_Node (Stream : not null access Root_Stream_Type'Class) return Node_Access is Node : Node_Access := new Node_Type; begin Node.Element := new Element_Type'(Element_Type'Input (Stream)); return Node; exception when others => Free (Node); -- Note that Free deallocates elem too raise; end Read_Node; -- Start of processing for Read begin Read (Stream, Container.Tree); end Read; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Cursor) is begin raise Program_Error with "attempt to stream set cursor"; end Read; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Constant_Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Read; --------------------- -- Replace_Element -- --------------------- procedure Replace_Element (Tree : in out Tree_Type; Node : Node_Access; Item : Element_Type) is begin if Item < Node.Element.all or else Node.Element.all < Item then null; else TE_Check (Tree.TC); declare X : Element_Access := Node.Element; -- The element allocator may need an accessibility check in the -- case the actual type is class-wide or has access discriminants -- (see RM 4.8(10.1) and AI12-0035). pragma Unsuppress (Accessibility_Check); begin Node.Element := new Element_Type'(Item); Free_Element (X); end; return; end if; Tree_Operations.Delete_Node_Sans_Free (Tree, Node); -- Checks busy-bit Insert_New_Item : declare function New_Node return Node_Access; pragma Inline (New_Node); procedure Insert_Post is new Element_Keys.Generic_Insert_Post (New_Node); procedure Unconditional_Insert is new Element_Keys.Generic_Unconditional_Insert (Insert_Post); -------------- -- New_Node -- -------------- function New_Node return Node_Access is -- The element allocator may need an accessibility check in the -- case the actual type is class-wide or has access discriminants -- (see RM 4.8(10.1) and AI12-0035). pragma Unsuppress (Accessibility_Check); begin Node.Element := new Element_Type'(Item); -- OK if fails Node.Color := Red_Black_Trees.Red; Node.Parent := null; Node.Left := null; Node.Right := null; return Node; end New_Node; Result : Node_Access; X : Element_Access := Node.Element; -- Start of processing for Insert_New_Item begin Unconditional_Insert (Tree => Tree, Key => Item, Node => Result); pragma Assert (Result = Node); Free_Element (X); -- OK if fails end Insert_New_Item; end Replace_Element; procedure Replace_Element (Container : in out Set; Position : Cursor; New_Item : Element_Type) is begin if Position.Node = null then raise Constraint_Error with "Position cursor equals No_Element"; end if; if Position.Node.Element = null then raise Program_Error with "Position cursor is bad"; end if; if Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor designates wrong set"; end if; pragma Assert (Vet (Container.Tree, Position.Node), "bad cursor in Replace_Element"); Replace_Element (Container.Tree, Position.Node, New_Item); end Replace_Element; --------------------- -- Reverse_Iterate -- --------------------- procedure Reverse_Iterate (Container : Set; Item : Element_Type; Process : not null access procedure (Position : Cursor)) is procedure Process_Node (Node : Node_Access); pragma Inline (Process_Node); procedure Local_Reverse_Iterate is new Element_Keys.Generic_Reverse_Iteration (Process_Node); ------------------ -- Process_Node -- ------------------ procedure Process_Node (Node : Node_Access) is begin Process (Cursor'(Container'Unrestricted_Access, Node)); end Process_Node; T : Tree_Type renames Container.Tree'Unrestricted_Access.all; Busy : With_Busy (T.TC'Unrestricted_Access); -- Start of processing for Reverse_Iterate begin Local_Reverse_Iterate (T, Item); end Reverse_Iterate; procedure Reverse_Iterate (Container : Set; Process : not null access procedure (Position : Cursor)) is procedure Process_Node (Node : Node_Access); pragma Inline (Process_Node); procedure Local_Reverse_Iterate is new Tree_Operations.Generic_Reverse_Iteration (Process_Node); ------------------ -- Process_Node -- ------------------ procedure Process_Node (Node : Node_Access) is begin Process (Cursor'(Container'Unrestricted_Access, Node)); end Process_Node; T : Tree_Type renames Container.Tree'Unrestricted_Access.all; Busy : With_Busy (T.TC'Unrestricted_Access); -- Start of processing for Reverse_Iterate begin Local_Reverse_Iterate (T); end Reverse_Iterate; ----------- -- Right -- ----------- function Right (Node : Node_Access) return Node_Access is begin return Node.Right; end Right; --------------- -- Set_Color -- --------------- procedure Set_Color (Node : Node_Access; Color : Color_Type) is begin Node.Color := Color; end Set_Color; -------------- -- Set_Left -- -------------- procedure Set_Left (Node : Node_Access; Left : Node_Access) is begin Node.Left := Left; end Set_Left; ---------------- -- Set_Parent -- ---------------- procedure Set_Parent (Node : Node_Access; Parent : Node_Access) is begin Node.Parent := Parent; end Set_Parent; --------------- -- Set_Right -- --------------- procedure Set_Right (Node : Node_Access; Right : Node_Access) is begin Node.Right := Right; end Set_Right; -------------------------- -- Symmetric_Difference -- -------------------------- procedure Symmetric_Difference (Target : in out Set; Source : Set) is begin Set_Ops.Symmetric_Difference (Target.Tree, Source.Tree); end Symmetric_Difference; function Symmetric_Difference (Left, Right : Set) return Set is Tree : constant Tree_Type := Set_Ops.Symmetric_Difference (Left.Tree, Right.Tree); begin return Set'(Controlled with Tree); end Symmetric_Difference; ------------ -- To_Set -- ------------ function To_Set (New_Item : Element_Type) return Set is Tree : Tree_Type; Node : Node_Access; begin Insert_Sans_Hint (Tree, New_Item, Node); return Set'(Controlled with Tree); end To_Set; ----------- -- Union -- ----------- procedure Union (Target : in out Set; Source : Set) is begin Set_Ops.Union (Target.Tree, Source.Tree); end Union; function Union (Left, Right : Set) return Set is Tree : constant Tree_Type := Set_Ops.Union (Left.Tree, Right.Tree); begin return Set'(Controlled with Tree); end Union; ----------- -- Write -- ----------- procedure Write (Stream : not null access Root_Stream_Type'Class; Container : Set) is procedure Write_Node (Stream : not null access Root_Stream_Type'Class; Node : Node_Access); pragma Inline (Write_Node); procedure Write is new Tree_Operations.Generic_Write (Write_Node); ---------------- -- Write_Node -- ---------------- procedure Write_Node (Stream : not null access Root_Stream_Type'Class; Node : Node_Access) is begin Element_Type'Output (Stream, Node.Element.all); end Write_Node; -- Start of processing for Write begin Write (Stream, Container.Tree); end Write; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Cursor) is begin raise Program_Error with "attempt to stream set cursor"; end Write; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Constant_Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Write; end Ada.Containers.Indefinite_Ordered_Multisets;
stcarrez/ada-awa
Ada
2,119
ads
----------------------------------------------------------------------- -- awa-wikis-servlets -- Serve files saved in the storage service -- Copyright (C) 2016, 2019 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Strings.Unbounded; with Ada.Calendar; with ADO; with ASF.Requests; with AWA.Storages.Servlets; package AWA.Wikis.Servlets is -- The <b>Storage_Servlet</b> represents the component that will handle -- an HTTP request received by the server. type Image_Servlet is new AWA.Storages.Servlets.Storage_Servlet with private; -- Load the data content that correspond to the GET request and get the name as well -- as mime-type and date. overriding procedure Load (Server : in Image_Servlet; Request : in out ASF.Requests.Request'Class; Name : out Ada.Strings.Unbounded.Unbounded_String; Mime : out Ada.Strings.Unbounded.Unbounded_String; Date : out Ada.Calendar.Time; Data : out ADO.Blob_Ref); -- Get the expected return mode (content disposition for download or inline). overriding function Get_Format (Server : in Image_Servlet; Request : in ASF.Requests.Request'Class) return AWA.Storages.Servlets.Get_Type; private type Image_Servlet is new AWA.Storages.Servlets.Storage_Servlet with null record; end AWA.Wikis.Servlets;
DrenfongWong/tkm-rpc
Ada
263
ads
with Tkmrpc.Request; with Tkmrpc.Response; package Tkmrpc.Operation_Handlers.Cfg.Tkm_Reset is procedure Handle (Req : Request.Data_Type; Res : out Response.Data_Type); -- Handler for the tkm_reset operation. end Tkmrpc.Operation_Handlers.Cfg.Tkm_Reset;
reznikmm/matreshka
Ada
4,178
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ package Web_Services.SOAP.Modules.Registry is procedure Register (Module : SOAP_Module_Access); -- Registers module in the chain. procedure Execute_Receive_Request (Message : in out Web_Services.SOAP.Messages.SOAP_Message; Output : in out Web_Services.SOAP.Messages.SOAP_Message_Access); -- Execute modules in the chain one-by-one till end of chain is reached or -- someone stop processing by setting Output to non-null fault message. procedure Execute_Send_Request (Message : in out Web_Services.SOAP.Messages.SOAP_Message; User : League.Strings.Universal_String; Password : League.Strings.Universal_String); -- Execute modules in the chain one-by-one till end of chain is reached or -- someone stop processing by raising exception. end Web_Services.SOAP.Modules.Registry;
reznikmm/matreshka
Ada
3,920
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- XML Processor -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Ada.Finalization; package body XML.DOM.Named_Node_Maps is ------------ -- Length -- ------------ function Length (Self : DOM_Named_Node_Map'Class) return Natural is begin return 0; end Length; -------------- -- Adjust -- -------------- overriding procedure Adjust (Self : in out DOM_Named_Node_Map) is begin null; end Adjust; -------------- -- Finalize -- -------------- overriding procedure Finalize (Self : in out DOM_Named_Node_Map) is begin null; end Finalize; end XML.DOM.Named_Node_Maps;
reznikmm/matreshka
Ada
7,061
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Table.Database_Source_Sql_Elements is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Table_Database_Source_Sql_Element_Node is begin return Self : Table_Database_Source_Sql_Element_Node do Matreshka.ODF_Table.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Table_Prefix); end return; end Create; ---------------- -- Enter_Node -- ---------------- overriding procedure Enter_Node (Self : not null access Table_Database_Source_Sql_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Visitor in ODF.DOM.Visitors.Abstract_ODF_Visitor'Class then ODF.DOM.Visitors.Abstract_ODF_Visitor'Class (Visitor).Enter_Table_Database_Source_Sql (ODF.DOM.Table_Database_Source_Sql_Elements.ODF_Table_Database_Source_Sql_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Enter_Node (Visitor, Control); end if; end Enter_Node; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Table_Database_Source_Sql_Element_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Database_Source_Sql_Element; end Get_Local_Name; ---------------- -- Leave_Node -- ---------------- overriding procedure Leave_Node (Self : not null access Table_Database_Source_Sql_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Visitor in ODF.DOM.Visitors.Abstract_ODF_Visitor'Class then ODF.DOM.Visitors.Abstract_ODF_Visitor'Class (Visitor).Leave_Table_Database_Source_Sql (ODF.DOM.Table_Database_Source_Sql_Elements.ODF_Table_Database_Source_Sql_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Leave_Node (Visitor, Control); end if; end Leave_Node; ---------------- -- Visit_Node -- ---------------- overriding procedure Visit_Node (Self : not null access Table_Database_Source_Sql_Element_Node; Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Iterator in ODF.DOM.Iterators.Abstract_ODF_Iterator'Class then ODF.DOM.Iterators.Abstract_ODF_Iterator'Class (Iterator).Visit_Table_Database_Source_Sql (Visitor, ODF.DOM.Table_Database_Source_Sql_Elements.ODF_Table_Database_Source_Sql_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Visit_Node (Iterator, Visitor, Control); end if; end Visit_Node; begin Matreshka.DOM_Documents.Register_Element (Matreshka.ODF_String_Constants.Table_URI, Matreshka.ODF_String_Constants.Database_Source_Sql_Element, Table_Database_Source_Sql_Element_Node'Tag); end Matreshka.ODF_Table.Database_Source_Sql_Elements;
optikos/oasis
Ada
284
ads
with Anagram.Grammars; with Program.Parsers.Nodes; private procedure Program.Parsers.On_Reduce_501 (Self : access Parse_Context; Prod : Anagram.Grammars.Production_Index; Nodes : in out Program.Parsers.Nodes.Node_Array); pragma Preelaborate (Program.Parsers.On_Reduce_501);
charlie5/cBound
Ada
1,332
ads
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces.C; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_intern_atom_cookie_t is -- Item -- type Item is record sequence : aliased Interfaces.C.unsigned; end record; -- Item_Array -- type Item_Array is array (Interfaces.C.size_t range <>) of aliased xcb.xcb_intern_atom_cookie_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_intern_atom_cookie_t.Item, Element_Array => xcb.xcb_intern_atom_cookie_t.Item_Array, Default_Terminator => (others => <>)); subtype Pointer is C_Pointers.Pointer; -- Pointer_Array -- type Pointer_Array is array (Interfaces.C.size_t range <>) of aliased xcb.xcb_intern_atom_cookie_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_intern_atom_cookie_t.Pointer, Element_Array => xcb.xcb_intern_atom_cookie_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_intern_atom_cookie_t;
AdaCore/Ada_Drivers_Library
Ada
45,813
ads
-- This spec has been automatically generated from STM32F46_79x.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package STM32_SVD.Ethernet is pragma Preelaborate; --------------- -- Registers -- --------------- subtype DMABMR_DSL_Field is HAL.UInt5; subtype DMABMR_PBL_Field is HAL.UInt6; subtype DMABMR_RTPR_Field is HAL.UInt2; subtype DMABMR_RDP_Field is HAL.UInt6; -- Ethernet DMA bus mode register type DMABMR_Register is record -- no description available SR : Boolean := True; -- no description available DA : Boolean := False; -- no description available DSL : DMABMR_DSL_Field := 16#0#; -- no description available EDFE : Boolean := False; -- no description available PBL : DMABMR_PBL_Field := 16#21#; -- no description available RTPR : DMABMR_RTPR_Field := 16#0#; -- no description available FB : Boolean := False; -- no description available RDP : DMABMR_RDP_Field := 16#0#; -- no description available USP : Boolean := False; -- no description available FPM : Boolean := False; -- no description available AAB : Boolean := False; -- no description available MB : Boolean := False; -- unspecified Reserved_27_31 : HAL.UInt5 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DMABMR_Register use record SR at 0 range 0 .. 0; DA at 0 range 1 .. 1; DSL at 0 range 2 .. 6; EDFE at 0 range 7 .. 7; PBL at 0 range 8 .. 13; RTPR at 0 range 14 .. 15; FB at 0 range 16 .. 16; RDP at 0 range 17 .. 22; USP at 0 range 23 .. 23; FPM at 0 range 24 .. 24; AAB at 0 range 25 .. 25; MB at 0 range 26 .. 26; Reserved_27_31 at 0 range 27 .. 31; end record; subtype DMASR_RPS_Field is HAL.UInt3; subtype DMASR_TPS_Field is HAL.UInt3; subtype DMASR_EBS_Field is HAL.UInt3; -- Ethernet DMA status register type DMASR_Register is record -- no description available TS : Boolean := False; -- no description available TPSS : Boolean := False; -- no description available TBUS : Boolean := False; -- no description available TJTS : Boolean := False; -- no description available ROS : Boolean := False; -- no description available TUS : Boolean := False; -- no description available RS : Boolean := False; -- no description available RBUS : Boolean := False; -- no description available RPSS : Boolean := False; -- no description available PWTS : Boolean := False; -- no description available ETS : Boolean := False; -- unspecified Reserved_11_12 : HAL.UInt2 := 16#0#; -- no description available FBES : Boolean := False; -- no description available ERS : Boolean := False; -- no description available AIS : Boolean := False; -- no description available NIS : Boolean := False; -- Read-only. no description available RPS : DMASR_RPS_Field := 16#0#; -- Read-only. no description available TPS : DMASR_TPS_Field := 16#0#; -- Read-only. no description available EBS : DMASR_EBS_Field := 16#0#; -- unspecified Reserved_26_26 : HAL.Bit := 16#0#; -- Read-only. no description available MMCS : Boolean := False; -- Read-only. no description available PMTS : Boolean := False; -- Read-only. no description available TSTS : Boolean := False; -- unspecified Reserved_30_31 : HAL.UInt2 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DMASR_Register use record TS at 0 range 0 .. 0; TPSS at 0 range 1 .. 1; TBUS at 0 range 2 .. 2; TJTS at 0 range 3 .. 3; ROS at 0 range 4 .. 4; TUS at 0 range 5 .. 5; RS at 0 range 6 .. 6; RBUS at 0 range 7 .. 7; RPSS at 0 range 8 .. 8; PWTS at 0 range 9 .. 9; ETS at 0 range 10 .. 10; Reserved_11_12 at 0 range 11 .. 12; FBES at 0 range 13 .. 13; ERS at 0 range 14 .. 14; AIS at 0 range 15 .. 15; NIS at 0 range 16 .. 16; RPS at 0 range 17 .. 19; TPS at 0 range 20 .. 22; EBS at 0 range 23 .. 25; Reserved_26_26 at 0 range 26 .. 26; MMCS at 0 range 27 .. 27; PMTS at 0 range 28 .. 28; TSTS at 0 range 29 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; subtype DMAOMR_RTC_Field is HAL.UInt2; subtype DMAOMR_TTC_Field is HAL.UInt3; -- Ethernet DMA operation mode register type DMAOMR_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- SR SR : Boolean := False; -- OSF OSF : Boolean := False; -- RTC RTC : DMAOMR_RTC_Field := 16#0#; -- unspecified Reserved_5_5 : HAL.Bit := 16#0#; -- FUGF FUGF : Boolean := False; -- FEF FEF : Boolean := False; -- unspecified Reserved_8_12 : HAL.UInt5 := 16#0#; -- ST ST : Boolean := False; -- TTC TTC : DMAOMR_TTC_Field := 16#0#; -- unspecified Reserved_17_19 : HAL.UInt3 := 16#0#; -- FTF FTF : Boolean := False; -- TSF TSF : Boolean := False; -- unspecified Reserved_22_23 : HAL.UInt2 := 16#0#; -- DFRF DFRF : Boolean := False; -- RSF RSF : Boolean := False; -- DTCEFD DTCEFD : Boolean := False; -- unspecified Reserved_27_31 : HAL.UInt5 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DMAOMR_Register use record Reserved_0_0 at 0 range 0 .. 0; SR at 0 range 1 .. 1; OSF at 0 range 2 .. 2; RTC at 0 range 3 .. 4; Reserved_5_5 at 0 range 5 .. 5; FUGF at 0 range 6 .. 6; FEF at 0 range 7 .. 7; Reserved_8_12 at 0 range 8 .. 12; ST at 0 range 13 .. 13; TTC at 0 range 14 .. 16; Reserved_17_19 at 0 range 17 .. 19; FTF at 0 range 20 .. 20; TSF at 0 range 21 .. 21; Reserved_22_23 at 0 range 22 .. 23; DFRF at 0 range 24 .. 24; RSF at 0 range 25 .. 25; DTCEFD at 0 range 26 .. 26; Reserved_27_31 at 0 range 27 .. 31; end record; -- Ethernet DMA interrupt enable register type DMAIER_Register is record -- no description available TIE : Boolean := False; -- no description available TPSIE : Boolean := False; -- no description available TBUIE : Boolean := False; -- no description available TJTIE : Boolean := False; -- no description available ROIE : Boolean := False; -- no description available TUIE : Boolean := False; -- no description available RIE : Boolean := False; -- no description available RBUIE : Boolean := False; -- no description available RPSIE : Boolean := False; -- no description available RWTIE : Boolean := False; -- no description available ETIE : Boolean := False; -- unspecified Reserved_11_12 : HAL.UInt2 := 16#0#; -- no description available FBEIE : Boolean := False; -- no description available ERIE : Boolean := False; -- no description available AISE : Boolean := False; -- no description available NISE : Boolean := False; -- unspecified Reserved_17_31 : HAL.UInt15 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DMAIER_Register use record TIE at 0 range 0 .. 0; TPSIE at 0 range 1 .. 1; TBUIE at 0 range 2 .. 2; TJTIE at 0 range 3 .. 3; ROIE at 0 range 4 .. 4; TUIE at 0 range 5 .. 5; RIE at 0 range 6 .. 6; RBUIE at 0 range 7 .. 7; RPSIE at 0 range 8 .. 8; RWTIE at 0 range 9 .. 9; ETIE at 0 range 10 .. 10; Reserved_11_12 at 0 range 11 .. 12; FBEIE at 0 range 13 .. 13; ERIE at 0 range 14 .. 14; AISE at 0 range 15 .. 15; NISE at 0 range 16 .. 16; Reserved_17_31 at 0 range 17 .. 31; end record; subtype DMAMFBOCR_MFC_Field is HAL.UInt16; subtype DMAMFBOCR_MFA_Field is HAL.UInt11; -- Ethernet DMA missed frame and buffer overflow counter register type DMAMFBOCR_Register is record -- no description available MFC : DMAMFBOCR_MFC_Field := 16#0#; -- no description available OMFC : Boolean := False; -- no description available MFA : DMAMFBOCR_MFA_Field := 16#0#; -- no description available OFOC : Boolean := False; -- unspecified Reserved_29_31 : HAL.UInt3 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DMAMFBOCR_Register use record MFC at 0 range 0 .. 15; OMFC at 0 range 16 .. 16; MFA at 0 range 17 .. 27; OFOC at 0 range 28 .. 28; Reserved_29_31 at 0 range 29 .. 31; end record; subtype DMARSWTR_RSWTC_Field is HAL.UInt8; -- Ethernet DMA receive status watchdog timer register type DMARSWTR_Register is record -- RSWTC RSWTC : DMARSWTR_RSWTC_Field := 16#0#; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DMARSWTR_Register use record RSWTC at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype MACCR_BL_Field is HAL.UInt2; subtype MACCR_IFG_Field is HAL.UInt3; -- Ethernet MAC configuration register type MACCR_Register is record -- unspecified Reserved_0_1 : HAL.UInt2 := 16#0#; -- RE RE : Boolean := False; -- TE TE : Boolean := False; -- DC DC : Boolean := False; -- BL BL : MACCR_BL_Field := 16#0#; -- APCS APCS : Boolean := False; -- unspecified Reserved_8_8 : HAL.Bit := 16#0#; -- RD RD : Boolean := False; -- IPCO IPCO : Boolean := False; -- DM DM : Boolean := False; -- LM LM : Boolean := False; -- ROD ROD : Boolean := False; -- FES FES : Boolean := False; -- unspecified Reserved_15_15 : HAL.Bit := 16#1#; -- CSD CSD : Boolean := False; -- IFG IFG : MACCR_IFG_Field := 16#0#; -- unspecified Reserved_20_21 : HAL.UInt2 := 16#0#; -- JD JD : Boolean := False; -- WD WD : Boolean := False; -- unspecified Reserved_24_24 : HAL.Bit := 16#0#; -- CSTF CSTF : Boolean := False; -- unspecified Reserved_26_31 : HAL.UInt6 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACCR_Register use record Reserved_0_1 at 0 range 0 .. 1; RE at 0 range 2 .. 2; TE at 0 range 3 .. 3; DC at 0 range 4 .. 4; BL at 0 range 5 .. 6; APCS at 0 range 7 .. 7; Reserved_8_8 at 0 range 8 .. 8; RD at 0 range 9 .. 9; IPCO at 0 range 10 .. 10; DM at 0 range 11 .. 11; LM at 0 range 12 .. 12; ROD at 0 range 13 .. 13; FES at 0 range 14 .. 14; Reserved_15_15 at 0 range 15 .. 15; CSD at 0 range 16 .. 16; IFG at 0 range 17 .. 19; Reserved_20_21 at 0 range 20 .. 21; JD at 0 range 22 .. 22; WD at 0 range 23 .. 23; Reserved_24_24 at 0 range 24 .. 24; CSTF at 0 range 25 .. 25; Reserved_26_31 at 0 range 26 .. 31; end record; -- Ethernet MAC frame filter register type MACFFR_Register is record -- no description available PM : Boolean := False; -- no description available HU : Boolean := False; -- no description available HM : Boolean := False; -- no description available DAIF : Boolean := False; -- no description available RAM : Boolean := False; -- no description available BFD : Boolean := False; -- no description available PCF : Boolean := False; -- no description available SAIF : Boolean := False; -- no description available SAF : Boolean := False; -- no description available HPF : Boolean := False; -- unspecified Reserved_10_30 : HAL.UInt21 := 16#0#; -- no description available RA : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACFFR_Register use record PM at 0 range 0 .. 0; HU at 0 range 1 .. 1; HM at 0 range 2 .. 2; DAIF at 0 range 3 .. 3; RAM at 0 range 4 .. 4; BFD at 0 range 5 .. 5; PCF at 0 range 6 .. 6; SAIF at 0 range 7 .. 7; SAF at 0 range 8 .. 8; HPF at 0 range 9 .. 9; Reserved_10_30 at 0 range 10 .. 30; RA at 0 range 31 .. 31; end record; subtype MACMIIAR_CR_Field is HAL.UInt3; subtype MACMIIAR_MR_Field is HAL.UInt5; subtype MACMIIAR_PA_Field is HAL.UInt5; -- Ethernet MAC MII address register type MACMIIAR_Register is record -- no description available MB : Boolean := False; -- no description available MW : Boolean := False; -- no description available CR : MACMIIAR_CR_Field := 16#0#; -- unspecified Reserved_5_5 : HAL.Bit := 16#0#; -- no description available MR : MACMIIAR_MR_Field := 16#0#; -- no description available PA : MACMIIAR_PA_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACMIIAR_Register use record MB at 0 range 0 .. 0; MW at 0 range 1 .. 1; CR at 0 range 2 .. 4; Reserved_5_5 at 0 range 5 .. 5; MR at 0 range 6 .. 10; PA at 0 range 11 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MACMIIDR_TD_Field is HAL.UInt16; -- Ethernet MAC MII data register type MACMIIDR_Register is record -- no description available TD : MACMIIDR_TD_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACMIIDR_Register use record TD at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MACFCR_PLT_Field is HAL.UInt2; subtype MACFCR_PT_Field is HAL.UInt16; -- Ethernet MAC flow control register type MACFCR_Register is record -- no description available FCB : Boolean := False; -- no description available TFCE : Boolean := False; -- no description available RFCE : Boolean := False; -- no description available UPFD : Boolean := False; -- no description available PLT : MACFCR_PLT_Field := 16#0#; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- no description available ZQPD : Boolean := False; -- unspecified Reserved_8_15 : HAL.UInt8 := 16#0#; -- no description available PT : MACFCR_PT_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACFCR_Register use record FCB at 0 range 0 .. 0; TFCE at 0 range 1 .. 1; RFCE at 0 range 2 .. 2; UPFD at 0 range 3 .. 3; PLT at 0 range 4 .. 5; Reserved_6_6 at 0 range 6 .. 6; ZQPD at 0 range 7 .. 7; Reserved_8_15 at 0 range 8 .. 15; PT at 0 range 16 .. 31; end record; subtype MACVLANTR_VLANTI_Field is HAL.UInt16; -- Ethernet MAC VLAN tag register type MACVLANTR_Register is record -- no description available VLANTI : MACVLANTR_VLANTI_Field := 16#0#; -- no description available VLANTC : Boolean := False; -- unspecified Reserved_17_31 : HAL.UInt15 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACVLANTR_Register use record VLANTI at 0 range 0 .. 15; VLANTC at 0 range 16 .. 16; Reserved_17_31 at 0 range 17 .. 31; end record; -- Ethernet MAC PMT control and status register type MACPMTCSR_Register is record -- no description available PD : Boolean := False; -- no description available MPE : Boolean := False; -- no description available WFE : Boolean := False; -- unspecified Reserved_3_4 : HAL.UInt2 := 16#0#; -- no description available MPR : Boolean := False; -- no description available WFR : Boolean := False; -- unspecified Reserved_7_8 : HAL.UInt2 := 16#0#; -- no description available GU : Boolean := False; -- unspecified Reserved_10_30 : HAL.UInt21 := 16#0#; -- no description available WFFRPR : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACPMTCSR_Register use record PD at 0 range 0 .. 0; MPE at 0 range 1 .. 1; WFE at 0 range 2 .. 2; Reserved_3_4 at 0 range 3 .. 4; MPR at 0 range 5 .. 5; WFR at 0 range 6 .. 6; Reserved_7_8 at 0 range 7 .. 8; GU at 0 range 9 .. 9; Reserved_10_30 at 0 range 10 .. 30; WFFRPR at 0 range 31 .. 31; end record; -- Ethernet MAC debug register type MACDBGR_Register is record -- Read-only. CR CR : Boolean; -- Read-only. CSR CSR : Boolean; -- Read-only. ROR ROR : Boolean; -- Read-only. MCF MCF : Boolean; -- Read-only. MCP MCP : Boolean; -- Read-only. MCFHP MCFHP : Boolean; -- unspecified Reserved_6_31 : HAL.UInt26; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACDBGR_Register use record CR at 0 range 0 .. 0; CSR at 0 range 1 .. 1; ROR at 0 range 2 .. 2; MCF at 0 range 3 .. 3; MCP at 0 range 4 .. 4; MCFHP at 0 range 5 .. 5; Reserved_6_31 at 0 range 6 .. 31; end record; -- Ethernet MAC interrupt status register type MACSR_Register is record -- unspecified Reserved_0_2 : HAL.UInt3 := 16#0#; -- Read-only. no description available PMTS : Boolean := False; -- Read-only. no description available MMCS : Boolean := False; -- Read-only. no description available MMCRS : Boolean := False; -- Read-only. no description available MMCTS : Boolean := False; -- unspecified Reserved_7_8 : HAL.UInt2 := 16#0#; -- no description available TSTS : Boolean := False; -- unspecified Reserved_10_31 : HAL.UInt22 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACSR_Register use record Reserved_0_2 at 0 range 0 .. 2; PMTS at 0 range 3 .. 3; MMCS at 0 range 4 .. 4; MMCRS at 0 range 5 .. 5; MMCTS at 0 range 6 .. 6; Reserved_7_8 at 0 range 7 .. 8; TSTS at 0 range 9 .. 9; Reserved_10_31 at 0 range 10 .. 31; end record; -- Ethernet MAC interrupt mask register type MACIMR_Register is record -- unspecified Reserved_0_2 : HAL.UInt3 := 16#0#; -- no description available PMTIM : Boolean := False; -- unspecified Reserved_4_8 : HAL.UInt5 := 16#0#; -- no description available TSTIM : Boolean := False; -- unspecified Reserved_10_31 : HAL.UInt22 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACIMR_Register use record Reserved_0_2 at 0 range 0 .. 2; PMTIM at 0 range 3 .. 3; Reserved_4_8 at 0 range 4 .. 8; TSTIM at 0 range 9 .. 9; Reserved_10_31 at 0 range 10 .. 31; end record; subtype MACA0HR_MACA0H_Field is HAL.UInt16; -- Ethernet MAC address 0 high register type MACA0HR_Register is record -- MAC address0 high MACA0H : MACA0HR_MACA0H_Field := 16#FFFF#; -- unspecified Reserved_16_30 : HAL.UInt15 := 16#10#; -- Read-only. Always 1 MO : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACA0HR_Register use record MACA0H at 0 range 0 .. 15; Reserved_16_30 at 0 range 16 .. 30; MO at 0 range 31 .. 31; end record; subtype MACA1HR_MACA1H_Field is HAL.UInt16; subtype MACA1HR_MBC_Field is HAL.UInt6; -- Ethernet MAC address 1 high register type MACA1HR_Register is record -- no description available MACA1H : MACA1HR_MACA1H_Field := 16#FFFF#; -- unspecified Reserved_16_23 : HAL.UInt8 := 16#0#; -- no description available MBC : MACA1HR_MBC_Field := 16#0#; -- no description available SA : Boolean := False; -- no description available AE : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACA1HR_Register use record MACA1H at 0 range 0 .. 15; Reserved_16_23 at 0 range 16 .. 23; MBC at 0 range 24 .. 29; SA at 0 range 30 .. 30; AE at 0 range 31 .. 31; end record; subtype MACA2HR_MAC2AH_Field is HAL.UInt16; subtype MACA2HR_MBC_Field is HAL.UInt6; -- Ethernet MAC address 2 high register type MACA2HR_Register is record -- no description available MAC2AH : MACA2HR_MAC2AH_Field := 16#FFFF#; -- unspecified Reserved_16_23 : HAL.UInt8 := 16#0#; -- no description available MBC : MACA2HR_MBC_Field := 16#0#; -- no description available SA : Boolean := False; -- no description available AE : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACA2HR_Register use record MAC2AH at 0 range 0 .. 15; Reserved_16_23 at 0 range 16 .. 23; MBC at 0 range 24 .. 29; SA at 0 range 30 .. 30; AE at 0 range 31 .. 31; end record; subtype MACA2LR_MACA2L_Field is HAL.UInt31; -- Ethernet MAC address 2 low register type MACA2LR_Register is record -- no description available MACA2L : MACA2LR_MACA2L_Field := 16#7FFFFFFF#; -- unspecified Reserved_31_31 : HAL.Bit := 16#1#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACA2LR_Register use record MACA2L at 0 range 0 .. 30; Reserved_31_31 at 0 range 31 .. 31; end record; subtype MACA3HR_MACA3H_Field is HAL.UInt16; subtype MACA3HR_MBC_Field is HAL.UInt6; -- Ethernet MAC address 3 high register type MACA3HR_Register is record -- no description available MACA3H : MACA3HR_MACA3H_Field := 16#FFFF#; -- unspecified Reserved_16_23 : HAL.UInt8 := 16#0#; -- no description available MBC : MACA3HR_MBC_Field := 16#0#; -- no description available SA : Boolean := False; -- no description available AE : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACA3HR_Register use record MACA3H at 0 range 0 .. 15; Reserved_16_23 at 0 range 16 .. 23; MBC at 0 range 24 .. 29; SA at 0 range 30 .. 30; AE at 0 range 31 .. 31; end record; -- Ethernet MMC control register type MMCCR_Register is record -- no description available CR : Boolean := False; -- no description available CSR : Boolean := False; -- no description available ROR : Boolean := False; -- no description available MCF : Boolean := False; -- no description available MCP : Boolean := False; -- no description available MCFHP : Boolean := False; -- unspecified Reserved_6_31 : HAL.UInt26 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MMCCR_Register use record CR at 0 range 0 .. 0; CSR at 0 range 1 .. 1; ROR at 0 range 2 .. 2; MCF at 0 range 3 .. 3; MCP at 0 range 4 .. 4; MCFHP at 0 range 5 .. 5; Reserved_6_31 at 0 range 6 .. 31; end record; -- Ethernet MMC receive interrupt register type MMCRIR_Register is record -- unspecified Reserved_0_4 : HAL.UInt5 := 16#0#; -- no description available RFCES : Boolean := False; -- no description available RFAES : Boolean := False; -- unspecified Reserved_7_16 : HAL.UInt10 := 16#0#; -- no description available RGUFS : Boolean := False; -- unspecified Reserved_18_31 : HAL.UInt14 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MMCRIR_Register use record Reserved_0_4 at 0 range 0 .. 4; RFCES at 0 range 5 .. 5; RFAES at 0 range 6 .. 6; Reserved_7_16 at 0 range 7 .. 16; RGUFS at 0 range 17 .. 17; Reserved_18_31 at 0 range 18 .. 31; end record; -- Ethernet MMC transmit interrupt register type MMCTIR_Register is record -- unspecified Reserved_0_13 : HAL.UInt14; -- Read-only. no description available TGFSCS : Boolean; -- Read-only. no description available TGFMSCS : Boolean; -- unspecified Reserved_16_20 : HAL.UInt5; -- Read-only. no description available TGFS : Boolean; -- unspecified Reserved_22_31 : HAL.UInt10; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MMCTIR_Register use record Reserved_0_13 at 0 range 0 .. 13; TGFSCS at 0 range 14 .. 14; TGFMSCS at 0 range 15 .. 15; Reserved_16_20 at 0 range 16 .. 20; TGFS at 0 range 21 .. 21; Reserved_22_31 at 0 range 22 .. 31; end record; -- Ethernet MMC receive interrupt mask register type MMCRIMR_Register is record -- unspecified Reserved_0_4 : HAL.UInt5 := 16#0#; -- no description available RFCEM : Boolean := False; -- no description available RFAEM : Boolean := False; -- unspecified Reserved_7_16 : HAL.UInt10 := 16#0#; -- no description available RGUFM : Boolean := False; -- unspecified Reserved_18_31 : HAL.UInt14 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MMCRIMR_Register use record Reserved_0_4 at 0 range 0 .. 4; RFCEM at 0 range 5 .. 5; RFAEM at 0 range 6 .. 6; Reserved_7_16 at 0 range 7 .. 16; RGUFM at 0 range 17 .. 17; Reserved_18_31 at 0 range 18 .. 31; end record; -- Ethernet MMC transmit interrupt mask register type MMCTIMR_Register is record -- unspecified Reserved_0_13 : HAL.UInt14 := 16#0#; -- no description available TGFSCM : Boolean := False; -- no description available TGFMSCM : Boolean := False; -- no description available TGFM : Boolean := False; -- unspecified Reserved_17_31 : HAL.UInt15 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MMCTIMR_Register use record Reserved_0_13 at 0 range 0 .. 13; TGFSCM at 0 range 14 .. 14; TGFMSCM at 0 range 15 .. 15; TGFM at 0 range 16 .. 16; Reserved_17_31 at 0 range 17 .. 31; end record; subtype PTPTSCR_TSCNT_Field is HAL.UInt2; -- Ethernet PTP time stamp control register type PTPTSCR_Register is record -- no description available TSE : Boolean := False; -- no description available TSFCU : Boolean := False; -- no description available TSSTI : Boolean := False; -- no description available TSSTU : Boolean := False; -- no description available TSITE : Boolean := False; -- no description available TTSARU : Boolean := False; -- unspecified Reserved_6_7 : HAL.UInt2 := 16#0#; -- no description available TSSARFE : Boolean := False; -- no description available TSSSR : Boolean := False; -- no description available TSPTPPSV2E : Boolean := False; -- no description available TSSPTPOEFE : Boolean := False; -- no description available TSSIPV6FE : Boolean := False; -- no description available TSSIPV4FE : Boolean := True; -- no description available TSSEME : Boolean := False; -- no description available TSSMRME : Boolean := False; -- no description available TSCNT : PTPTSCR_TSCNT_Field := 16#0#; -- no description available TSPFFMAE : Boolean := False; -- unspecified Reserved_19_31 : HAL.UInt13 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for PTPTSCR_Register use record TSE at 0 range 0 .. 0; TSFCU at 0 range 1 .. 1; TSSTI at 0 range 2 .. 2; TSSTU at 0 range 3 .. 3; TSITE at 0 range 4 .. 4; TTSARU at 0 range 5 .. 5; Reserved_6_7 at 0 range 6 .. 7; TSSARFE at 0 range 8 .. 8; TSSSR at 0 range 9 .. 9; TSPTPPSV2E at 0 range 10 .. 10; TSSPTPOEFE at 0 range 11 .. 11; TSSIPV6FE at 0 range 12 .. 12; TSSIPV4FE at 0 range 13 .. 13; TSSEME at 0 range 14 .. 14; TSSMRME at 0 range 15 .. 15; TSCNT at 0 range 16 .. 17; TSPFFMAE at 0 range 18 .. 18; Reserved_19_31 at 0 range 19 .. 31; end record; subtype PTPSSIR_STSSI_Field is HAL.UInt8; -- Ethernet PTP subsecond increment register type PTPSSIR_Register is record -- no description available STSSI : PTPSSIR_STSSI_Field := 16#0#; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for PTPSSIR_Register use record STSSI at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype PTPTSLR_STSS_Field is HAL.UInt31; -- Ethernet PTP time stamp low register type PTPTSLR_Register is record -- Read-only. no description available STSS : PTPTSLR_STSS_Field; -- Read-only. no description available STPNS : Boolean; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for PTPTSLR_Register use record STSS at 0 range 0 .. 30; STPNS at 0 range 31 .. 31; end record; subtype PTPTSLUR_TSUSS_Field is HAL.UInt31; -- Ethernet PTP time stamp low update register type PTPTSLUR_Register is record -- no description available TSUSS : PTPTSLUR_TSUSS_Field := 16#0#; -- no description available TSUPNS : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for PTPTSLUR_Register use record TSUSS at 0 range 0 .. 30; TSUPNS at 0 range 31 .. 31; end record; -- Ethernet PTP time stamp status register type PTPTSSR_Register is record -- Read-only. no description available TSSO : Boolean; -- Read-only. no description available TSTTR : Boolean; -- unspecified Reserved_2_31 : HAL.UInt30; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for PTPTSSR_Register use record TSSO at 0 range 0 .. 0; TSTTR at 0 range 1 .. 1; Reserved_2_31 at 0 range 2 .. 31; end record; -- Ethernet PTP PPS control register type PTPPPSCR_Register is record -- Read-only. TSSO TSSO : Boolean; -- Read-only. TSTTR TSTTR : Boolean; -- unspecified Reserved_2_31 : HAL.UInt30; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for PTPPPSCR_Register use record TSSO at 0 range 0 .. 0; TSTTR at 0 range 1 .. 1; Reserved_2_31 at 0 range 2 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Ethernet: DMA controller operation type Ethernet_DMA_Peripheral is record -- Ethernet DMA bus mode register DMABMR : aliased DMABMR_Register; -- Ethernet DMA transmit poll demand register DMATPDR : aliased HAL.UInt32; -- EHERNET DMA receive poll demand register DMARPDR : aliased HAL.UInt32; -- Ethernet DMA receive descriptor list address register DMARDLAR : aliased HAL.UInt32; -- Ethernet DMA transmit descriptor list address register DMATDLAR : aliased HAL.UInt32; -- Ethernet DMA status register DMASR : aliased DMASR_Register; -- Ethernet DMA operation mode register DMAOMR : aliased DMAOMR_Register; -- Ethernet DMA interrupt enable register DMAIER : aliased DMAIER_Register; -- Ethernet DMA missed frame and buffer overflow counter register DMAMFBOCR : aliased DMAMFBOCR_Register; -- Ethernet DMA receive status watchdog timer register DMARSWTR : aliased DMARSWTR_Register; -- Ethernet DMA current host transmit descriptor register DMACHTDR : aliased HAL.UInt32; -- Ethernet DMA current host receive descriptor register DMACHRDR : aliased HAL.UInt32; -- Ethernet DMA current host transmit buffer address register DMACHTBAR : aliased HAL.UInt32; -- Ethernet DMA current host receive buffer address register DMACHRBAR : aliased HAL.UInt32; end record with Volatile; for Ethernet_DMA_Peripheral use record DMABMR at 16#0# range 0 .. 31; DMATPDR at 16#4# range 0 .. 31; DMARPDR at 16#8# range 0 .. 31; DMARDLAR at 16#C# range 0 .. 31; DMATDLAR at 16#10# range 0 .. 31; DMASR at 16#14# range 0 .. 31; DMAOMR at 16#18# range 0 .. 31; DMAIER at 16#1C# range 0 .. 31; DMAMFBOCR at 16#20# range 0 .. 31; DMARSWTR at 16#24# range 0 .. 31; DMACHTDR at 16#48# range 0 .. 31; DMACHRDR at 16#4C# range 0 .. 31; DMACHTBAR at 16#50# range 0 .. 31; DMACHRBAR at 16#54# range 0 .. 31; end record; -- Ethernet: DMA controller operation Ethernet_DMA_Periph : aliased Ethernet_DMA_Peripheral with Import, Address => System'To_Address (16#40029000#); -- Ethernet: media access control (MAC) type Ethernet_MAC_Peripheral is record -- Ethernet MAC configuration register MACCR : aliased MACCR_Register; -- Ethernet MAC frame filter register MACFFR : aliased MACFFR_Register; -- Ethernet MAC hash table high register MACHTHR : aliased HAL.UInt32; -- Ethernet MAC hash table low register MACHTLR : aliased HAL.UInt32; -- Ethernet MAC MII address register MACMIIAR : aliased MACMIIAR_Register; -- Ethernet MAC MII data register MACMIIDR : aliased MACMIIDR_Register; -- Ethernet MAC flow control register MACFCR : aliased MACFCR_Register; -- Ethernet MAC VLAN tag register MACVLANTR : aliased MACVLANTR_Register; -- Ethernet MAC PMT control and status register MACPMTCSR : aliased MACPMTCSR_Register; -- Ethernet MAC debug register MACDBGR : aliased MACDBGR_Register; -- Ethernet MAC interrupt status register MACSR : aliased MACSR_Register; -- Ethernet MAC interrupt mask register MACIMR : aliased MACIMR_Register; -- Ethernet MAC address 0 high register MACA0HR : aliased MACA0HR_Register; -- Ethernet MAC address 0 low register MACA0LR : aliased HAL.UInt32; -- Ethernet MAC address 1 high register MACA1HR : aliased MACA1HR_Register; -- Ethernet MAC address1 low register MACA1LR : aliased HAL.UInt32; -- Ethernet MAC address 2 high register MACA2HR : aliased MACA2HR_Register; -- Ethernet MAC address 2 low register MACA2LR : aliased MACA2LR_Register; -- Ethernet MAC address 3 high register MACA3HR : aliased MACA3HR_Register; -- Ethernet MAC address 3 low register MACA3LR : aliased HAL.UInt32; end record with Volatile; for Ethernet_MAC_Peripheral use record MACCR at 16#0# range 0 .. 31; MACFFR at 16#4# range 0 .. 31; MACHTHR at 16#8# range 0 .. 31; MACHTLR at 16#C# range 0 .. 31; MACMIIAR at 16#10# range 0 .. 31; MACMIIDR at 16#14# range 0 .. 31; MACFCR at 16#18# range 0 .. 31; MACVLANTR at 16#1C# range 0 .. 31; MACPMTCSR at 16#2C# range 0 .. 31; MACDBGR at 16#34# range 0 .. 31; MACSR at 16#38# range 0 .. 31; MACIMR at 16#3C# range 0 .. 31; MACA0HR at 16#40# range 0 .. 31; MACA0LR at 16#44# range 0 .. 31; MACA1HR at 16#48# range 0 .. 31; MACA1LR at 16#4C# range 0 .. 31; MACA2HR at 16#50# range 0 .. 31; MACA2LR at 16#54# range 0 .. 31; MACA3HR at 16#58# range 0 .. 31; MACA3LR at 16#5C# range 0 .. 31; end record; -- Ethernet: media access control (MAC) Ethernet_MAC_Periph : aliased Ethernet_MAC_Peripheral with Import, Address => System'To_Address (16#40028000#); -- Ethernet: MAC management counters type Ethernet_MMC_Peripheral is record -- Ethernet MMC control register MMCCR : aliased MMCCR_Register; -- Ethernet MMC receive interrupt register MMCRIR : aliased MMCRIR_Register; -- Ethernet MMC transmit interrupt register MMCTIR : aliased MMCTIR_Register; -- Ethernet MMC receive interrupt mask register MMCRIMR : aliased MMCRIMR_Register; -- Ethernet MMC transmit interrupt mask register MMCTIMR : aliased MMCTIMR_Register; -- Ethernet MMC transmitted good frames after a single collision counter MMCTGFSCCR : aliased HAL.UInt32; -- Ethernet MMC transmitted good frames after more than a single -- collision MMCTGFMSCCR : aliased HAL.UInt32; -- Ethernet MMC transmitted good frames counter register MMCTGFCR : aliased HAL.UInt32; -- Ethernet MMC received frames with CRC error counter register MMCRFCECR : aliased HAL.UInt32; -- Ethernet MMC received frames with alignment error counter register MMCRFAECR : aliased HAL.UInt32; -- MMC received good unicast frames counter register MMCRGUFCR : aliased HAL.UInt32; end record with Volatile; for Ethernet_MMC_Peripheral use record MMCCR at 16#0# range 0 .. 31; MMCRIR at 16#4# range 0 .. 31; MMCTIR at 16#8# range 0 .. 31; MMCRIMR at 16#C# range 0 .. 31; MMCTIMR at 16#10# range 0 .. 31; MMCTGFSCCR at 16#4C# range 0 .. 31; MMCTGFMSCCR at 16#50# range 0 .. 31; MMCTGFCR at 16#68# range 0 .. 31; MMCRFCECR at 16#94# range 0 .. 31; MMCRFAECR at 16#98# range 0 .. 31; MMCRGUFCR at 16#C4# range 0 .. 31; end record; -- Ethernet: MAC management counters Ethernet_MMC_Periph : aliased Ethernet_MMC_Peripheral with Import, Address => System'To_Address (16#40028100#); -- Ethernet: Precision time protocol type Ethernet_PTP_Peripheral is record -- Ethernet PTP time stamp control register PTPTSCR : aliased PTPTSCR_Register; -- Ethernet PTP subsecond increment register PTPSSIR : aliased PTPSSIR_Register; -- Ethernet PTP time stamp high register PTPTSHR : aliased HAL.UInt32; -- Ethernet PTP time stamp low register PTPTSLR : aliased PTPTSLR_Register; -- Ethernet PTP time stamp high update register PTPTSHUR : aliased HAL.UInt32; -- Ethernet PTP time stamp low update register PTPTSLUR : aliased PTPTSLUR_Register; -- Ethernet PTP time stamp addend register PTPTSAR : aliased HAL.UInt32; -- Ethernet PTP target time high register PTPTTHR : aliased HAL.UInt32; -- Ethernet PTP target time low register PTPTTLR : aliased HAL.UInt32; -- Ethernet PTP time stamp status register PTPTSSR : aliased PTPTSSR_Register; -- Ethernet PTP PPS control register PTPPPSCR : aliased PTPPPSCR_Register; end record with Volatile; for Ethernet_PTP_Peripheral use record PTPTSCR at 16#0# range 0 .. 31; PTPSSIR at 16#4# range 0 .. 31; PTPTSHR at 16#8# range 0 .. 31; PTPTSLR at 16#C# range 0 .. 31; PTPTSHUR at 16#10# range 0 .. 31; PTPTSLUR at 16#14# range 0 .. 31; PTPTSAR at 16#18# range 0 .. 31; PTPTTHR at 16#1C# range 0 .. 31; PTPTTLR at 16#20# range 0 .. 31; PTPTSSR at 16#28# range 0 .. 31; PTPPPSCR at 16#2C# range 0 .. 31; end record; -- Ethernet: Precision time protocol Ethernet_PTP_Periph : aliased Ethernet_PTP_Peripheral with Import, Address => System'To_Address (16#40028700#); end STM32_SVD.Ethernet;
reznikmm/matreshka
Ada
3,694
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Attributes; package ODF.DOM.Fo_Language_Attributes is pragma Preelaborate; type ODF_Fo_Language_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Fo_Language_Attribute_Access is access all ODF_Fo_Language_Attribute'Class with Storage_Size => 0; end ODF.DOM.Fo_Language_Attributes;
melwyncarlo/ProjectEuler
Ada
2,740
adb
with Ada.Strings.Fixed; with Ada.Integer_Text_IO; -- Copyright 2021 Melwyn Francis Carlo procedure A020 is use Ada.Strings.Fixed; use Ada.Integer_Text_IO; N_Str : array (Integer range 1 .. 500) of Character := ('1', others => '0'); Products_Array : array (Integer range 1 .. 500, Integer range 1 .. 500) of Character; Temp_Product : String (1 .. 3); Temp_Sum_Str : String (1 .. 2); Sum_Of_Digits : Integer := 0; Str_Length : Integer := 1; Temp_Sum, Temp_Len : Integer; begin for I in 2 .. 100 loop for J in reverse 1 .. Str_Length loop Temp_Sum := I * (Character'Pos (N_Str (J)) - Character'Pos ('0')); Temp_Product := "000"; if (Temp_Sum > 0) then Temp_Len := Trim (Integer'Image (Temp_Sum), Ada.Strings.Both)'Length; Temp_Product ((4 - Temp_Len) .. 3) := Trim (Integer'Image ( Temp_Sum), Ada.Strings.Both); end if; for K1 in 1 .. J loop Products_Array (J, K1) := '0'; end loop; for K2 in (J + 1) .. (J + 3) loop Products_Array (J, K2) := Temp_Product (K2 - J); end loop; for K3 in (J + 4) .. (Str_Length + 4) loop Products_Array (J, K3) := '0'; end loop; end loop; N_Str := (others => '0'); for K in reverse 2 .. (Str_Length + 3 - 1) loop Temp_Sum := 0; for J in 1 .. Str_Length loop Temp_Sum := Temp_Sum + Character'Pos (Products_Array (J, K + 1)) - Character'Pos ('0'); end loop; Temp_Sum := Temp_Sum + Character'Pos (N_Str (K)) - Character'Pos ('0'); Temp_Len := Trim (Integer'Image (Temp_Sum), Ada.Strings.Both)'Length; Temp_Sum_Str := "00"; if Temp_Len = 1 then Temp_Sum_Str (2) := Trim (Integer'Image (Temp_Sum), Ada.Strings.Both) (1); else Temp_Sum_Str := Trim (Integer'Image (Temp_Sum), Ada.Strings.Both) (1 .. 2); end if; N_Str (K) := Temp_Sum_Str (2); N_Str (K - 1) := Temp_Sum_Str (1); end loop; Str_Length := Str_Length + 2; end loop; for I in 1 .. Str_Length loop Sum_Of_Digits := Sum_Of_Digits + Character'Pos (N_Str (I)) - Character'Pos ('0'); end loop; Put (Sum_Of_Digits, Width => 0); end A020;
LionelDraghi/smk
Ada
6,118
ads
pragma Ada_2005; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; with asm_generic_int_ll64_h; package linux_ptrace_h is PTRACE_TRACEME : constant := 0; -- /usr/include/linux/ptrace.h:11 PTRACE_PEEKTEXT : constant := 1; -- /usr/include/linux/ptrace.h:12 PTRACE_PEEKDATA : constant := 2; -- /usr/include/linux/ptrace.h:13 PTRACE_PEEKUSR : constant := 3; -- /usr/include/linux/ptrace.h:14 PTRACE_POKETEXT : constant := 4; -- /usr/include/linux/ptrace.h:15 PTRACE_POKEDATA : constant := 5; -- /usr/include/linux/ptrace.h:16 PTRACE_POKEUSR : constant := 6; -- /usr/include/linux/ptrace.h:17 PTRACE_CONT : constant := 7; -- /usr/include/linux/ptrace.h:18 PTRACE_KILL : constant := 8; -- /usr/include/linux/ptrace.h:19 PTRACE_SINGLESTEP : constant := 9; -- /usr/include/linux/ptrace.h:20 PTRACE_ATTACH : constant := 16; -- /usr/include/linux/ptrace.h:22 PTRACE_DETACH : constant := 17; -- /usr/include/linux/ptrace.h:23 PTRACE_SYSCALL : constant := 24; -- /usr/include/linux/ptrace.h:25 PTRACE_SETOPTIONS : constant := 16#4200#; -- /usr/include/linux/ptrace.h:28 PTRACE_GETEVENTMSG : constant := 16#4201#; -- /usr/include/linux/ptrace.h:29 PTRACE_GETSIGINFO : constant := 16#4202#; -- /usr/include/linux/ptrace.h:30 PTRACE_SETSIGINFO : constant := 16#4203#; -- /usr/include/linux/ptrace.h:31 PTRACE_GETREGSET : constant := 16#4204#; -- /usr/include/linux/ptrace.h:50 PTRACE_SETREGSET : constant := 16#4205#; -- /usr/include/linux/ptrace.h:51 PTRACE_SEIZE : constant := 16#4206#; -- /usr/include/linux/ptrace.h:53 PTRACE_INTERRUPT : constant := 16#4207#; -- /usr/include/linux/ptrace.h:54 PTRACE_LISTEN : constant := 16#4208#; -- /usr/include/linux/ptrace.h:55 PTRACE_PEEKSIGINFO : constant := 16#4209#; -- /usr/include/linux/ptrace.h:57 PTRACE_GETSIGMASK : constant := 16#420a#; -- /usr/include/linux/ptrace.h:65 PTRACE_SETSIGMASK : constant := 16#420b#; -- /usr/include/linux/ptrace.h:66 PTRACE_SECCOMP_GET_FILTER : constant := 16#420c#; -- /usr/include/linux/ptrace.h:68 PTRACE_SECCOMP_GET_METADATA : constant := 16#420d#; -- /usr/include/linux/ptrace.h:69 PTRACE_PEEKSIGINFO_SHARED : constant := (2 ** 0); -- /usr/include/linux/ptrace.h:77 PTRACE_EVENT_FORK : constant := 1; -- /usr/include/linux/ptrace.h:80 PTRACE_EVENT_VFORK : constant := 2; -- /usr/include/linux/ptrace.h:81 PTRACE_EVENT_CLONE : constant := 3; -- /usr/include/linux/ptrace.h:82 PTRACE_EVENT_EXEC : constant := 4; -- /usr/include/linux/ptrace.h:83 PTRACE_EVENT_VFORK_DONE : constant := 5; -- /usr/include/linux/ptrace.h:84 PTRACE_EVENT_EXIT : constant := 6; -- /usr/include/linux/ptrace.h:85 PTRACE_EVENT_SECCOMP : constant := 7; -- /usr/include/linux/ptrace.h:86 PTRACE_EVENT_STOP : constant := 128; -- /usr/include/linux/ptrace.h:88 PTRACE_O_TRACESYSGOOD : constant := 1; -- /usr/include/linux/ptrace.h:91 -- unsupported macro: PTRACE_O_TRACEFORK (1 << PTRACE_EVENT_FORK) -- unsupported macro: PTRACE_O_TRACEVFORK (1 << PTRACE_EVENT_VFORK) -- unsupported macro: PTRACE_O_TRACECLONE (1 << PTRACE_EVENT_CLONE) -- unsupported macro: PTRACE_O_TRACEEXEC (1 << PTRACE_EVENT_EXEC) -- unsupported macro: PTRACE_O_TRACEVFORKDONE (1 << PTRACE_EVENT_VFORK_DONE) -- unsupported macro: PTRACE_O_TRACEEXIT (1 << PTRACE_EVENT_EXIT) -- unsupported macro: PTRACE_O_TRACESECCOMP (1 << PTRACE_EVENT_SECCOMP) PTRACE_O_EXITKILL : constant := (2 ** 20); -- /usr/include/linux/ptrace.h:101 PTRACE_O_SUSPEND_SECCOMP : constant := (2 ** 21); -- /usr/include/linux/ptrace.h:102 -- unsupported macro: PTRACE_O_MASK ( 0x000000ff | PTRACE_O_EXITKILL | PTRACE_O_SUSPEND_SECCOMP) -- SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note -- ptrace.h -- structs and defines to help the user use the ptrace system call. -- has the defines to get at the registers. -- 0x4200-0x4300 are reserved for architecture-independent additions. -- * Generic ptrace interface that exports the architecture specific regsets -- * using the corresponding NT_* types (which are also used in the core dump). -- * Please note that the NT_PRSTATUS note type in a core dump contains a full -- * 'struct elf_prstatus'. But the user_regset for NT_PRSTATUS contains just the -- * elf_gregset_t that is the pr_reg field of 'struct elf_prstatus'. For all the -- * other user_regset flavors, the user_regset layout and the ELF core dump note -- * payload are exactly the same layout. -- * -- * This interface usage is as follows: -- * struct iovec iov = { buf, len}; -- * -- * ret = ptrace(PTRACE_GETREGSET/PTRACE_SETREGSET, pid, NT_XXX_TYPE, &iov); -- * -- * On the successful completion, iov.len will be updated by the kernel, -- * specifying how much the kernel has written/read to/from the user's iov.buf. -- -- from which siginfo to start type ptrace_peeksiginfo_args is record off : aliased asm_generic_int_ll64_h.uu_u64; -- /usr/include/linux/ptrace.h:60 flags : aliased asm_generic_int_ll64_h.uu_u32; -- /usr/include/linux/ptrace.h:61 nr : aliased asm_generic_int_ll64_h.uu_s32; -- /usr/include/linux/ptrace.h:62 end record; pragma Convention (C_Pass_By_Copy, ptrace_peeksiginfo_args); -- /usr/include/linux/ptrace.h:59 -- how may siginfos to take -- Input: which filter type seccomp_metadata is record filter_off : aliased asm_generic_int_ll64_h.uu_u64; -- /usr/include/linux/ptrace.h:72 flags : aliased asm_generic_int_ll64_h.uu_u64; -- /usr/include/linux/ptrace.h:73 end record; pragma Convention (C_Pass_By_Copy, seccomp_metadata); -- /usr/include/linux/ptrace.h:71 -- Output: filter's flags -- Read signals from a shared (process wide) queue -- Wait extended result codes for the above trace options. -- Extended result codes which enabled by means other than options. -- Options set using PTRACE_SETOPTIONS or using PTRACE_SEIZE @data param -- eventless options end linux_ptrace_h;
optikos/oasis
Ada
6,958
adb
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Scanner_Destinations; package body Program.Scanners is type First_Stage_Index is mod 16#1100#; type Second_Stage_Index is mod 16#100#; generic type Element_Type is private; type Second_Stage_Array is array (Second_Stage_Index) of Element_Type; type Second_Stage_Array_Access is not null access constant Second_Stage_Array; type First_Stage_Array is array (First_Stage_Index) of Second_Stage_Array_Access; function Generic_Element (Data : First_Stage_Array; Code : Natural) return Element_Type; --------------------- -- Generic_Element -- --------------------- function Generic_Element (Data : First_Stage_Array; Code : Natural) return Element_Type is begin return Data (First_Stage_Index (Code / Second_Stage_Index'Modulus)) (Second_Stage_Index (Code mod Second_Stage_Index'Modulus)); end Generic_Element; package body Tables is separate; procedure On_Accept (Self : not null access Program.Scanned_Rule_Handlers.Handler'Class; Scanner : not null access Program.Scanners.Scanner'Class; Rule : Program.Scanner_States.Rule_Index; Token : out Program.Lexical_Elements.Lexical_Element_Kind; Skip : in out Boolean); ---------------- -- Get_Source -- ---------------- function Get_Source (Self : Scanner'Class) return not null Program.Source_Buffers.Source_Buffer_Access is begin return Self.Source; end Get_Source; -------------- -- Get_Span -- -------------- function Get_Span (Self : Scanner'Class) return Program.Source_Buffers.Span is begin return (Self.From, Self.To); end Get_Span; ------------------------- -- Get_Start_Condition -- ------------------------- function Get_Start_Condition (Self : Scanner'Class) return Start_Condition is begin return Self.Start; end Get_Start_Condition; --------------- -- Get_Token -- --------------- procedure Get_Token (Self : access Scanner'Class; Value : out Program.Lexical_Elements.Lexical_Element_Kind) is procedure Next; procedure Next is begin Self.Offset := Self.Offset + Positive (Self.Classes (Self.Next).Length); if Self.Next = Self.Classes'Last then Self.Next := 1; else Self.Next := Self.Next + 1; end if; end Next; use type Program.Scanner_States.Character_Class; Current_State : Program.Scanner_States.State; Char : Program.Scanner_States.Character_Class; Skip : Boolean := True; Valid_Rule : Program.Scanner_States.Rule_Index; Valid_Next : Buffer_Index; Valid_From : Positive; Valid_To : Positive; -- Offset for Valid_Next begin if Self.EOF = Self.Next then Value := Program.Lexical_Elements.End_Of_Input; return; end if; loop Current_State := Self.Start; Valid_Rule := 0; Valid_From := Self.Offset; -- Begin of any token Valid_Next := Self.Next; Valid_To := Self.Offset; -- End of token in case of Error loop Char := Self.Classes (Self.Next).Class; if Char /= Error_Character then Current_State := Tables.Switch (Current_State, Char); if Current_State not in Scanner_States.Looping_State then if Current_State in Scanner_States.Final_State then Valid_Rule := Tables.Rule (Current_State); Valid_Next := Self.Next; Valid_To := Self.Offset; end if; exit; elsif Current_State in Scanner_States.Final_State then Valid_Rule := Tables.Rule (Current_State); Valid_Next := Self.Next; Valid_To := Self.Offset; end if; Next; elsif Self.Classes (Self.Next).Length = End_Of_Buffer then Self.Read_Buffer; if Self.EOF = Self.Next then if Valid_Next = Self.Next then Value := Program.Lexical_Elements.End_Of_Input; return; else exit; end if; end if; else exit; end if; end loop; Self.Next := Valid_Next; Self.Offset := Valid_To; Self.From := Valid_From; Self.To := Valid_To; Next; if Valid_Rule in 0 then Value := Program.Lexical_Elements.Error; return; else On_Accept (Self.Handler, Self, Valid_Rule, Value, Skip); if not Skip then return; end if; end if; end loop; end Get_Token; procedure On_Accept (Self : not null access Program.Scanned_Rule_Handlers.Handler'Class; Scanner : not null access Program.Scanners.Scanner'Class; Rule : Program.Scanner_States.Rule_Index; Token : out Program.Lexical_Elements.Lexical_Element_Kind; Skip : in out Boolean) is separate; ----------------- -- Read_Buffer -- ----------------- procedure Read_Buffer (Self : in out Scanner'Class) is Last : Natural := Buffer_Half_Size; begin if Self.Next > Buffer_Half_Size then Last := Buffer_Index'Last; end if; Self.Source.Read (Self.Classes (Self.Next .. Last), Last); if Last < Self.Next then Self.EOF := Self.Next; return; elsif Last = Buffer_Index'Last then Last := 1; else Last := Last + 1; end if; Self.Classes (Last) := (Class => Error_Character, Length => End_Of_Buffer); end Read_Buffer; ----------------- -- Set_Handler -- ----------------- procedure Set_Handler (Self : in out Scanner'Class; Handler : not null Program.Scanned_Rule_Handlers.Handler_Access) is begin Self.Handler := Handler; end Set_Handler; ---------------- -- Set_Source -- ---------------- procedure Set_Source (Self : in out Scanner'Class; Source : not null Program.Source_Buffers.Source_Buffer_Access) is begin Self.Source := Source; Self.Source.Rewind; end Set_Source; ------------------------- -- Set_Start_Condition -- ------------------------- procedure Set_Start_Condition (Self : in out Scanner'Class; Condition : Start_Condition) is begin Self.Start := Condition; end Set_Start_Condition; end Program.Scanners;
reznikmm/matreshka
Ada
4,702
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Visitors; with ODF.DOM.Db_Key_Columns_Elements; package Matreshka.ODF_Db.Key_Columns_Elements is type Db_Key_Columns_Element_Node is new Matreshka.ODF_Db.Abstract_Db_Element_Node and ODF.DOM.Db_Key_Columns_Elements.ODF_Db_Key_Columns with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Db_Key_Columns_Element_Node; overriding function Get_Local_Name (Self : not null access constant Db_Key_Columns_Element_Node) return League.Strings.Universal_String; overriding procedure Enter_Node (Self : not null access Db_Key_Columns_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); overriding procedure Leave_Node (Self : not null access Db_Key_Columns_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); overriding procedure Visit_Node (Self : not null access Db_Key_Columns_Element_Node; Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); end Matreshka.ODF_Db.Key_Columns_Elements;
sungyeon/drake
Ada
11,682
ads
pragma License (Unrestricted); with Ada.Strings.Wide_Functions.Maps; with Ada.Strings.Wide_Maps; package Ada.Strings.Wide_Fixed is pragma Preelaborate; -- "Copy" procedure for strings of possibly different lengths procedure Move ( Source : Wide_String; Target : out Wide_String; Drop : Truncation := Error; Justify : Alignment := Left; Pad : Wide_Character := Wide_Space) renames Wide_Functions.Move; -- Search subprograms -- modified -- function Index ( -- Source : Wide_String; -- Pattern : Wide_String; -- From : Positive; -- Going : Direction := Forward; -- Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity) -- return Natural; function Index ( Source : Wide_String; Pattern : Wide_String; From : Positive; Going : Direction := Forward) return Natural renames Wide_Functions.Index; function Index ( Source : Wide_String; Pattern : Wide_String; From : Positive; Going : Direction := Forward; Mapping : Wide_Maps.Wide_Character_Mapping) return Natural renames Wide_Functions.Maps.Index; -- modified -- function Index ( -- Source : Wide_String; -- Pattern : Wide_String; -- From : Positive; -- Going : Direction := Forward; -- Mapping : Wide_Maps.Wide_Character_Mapping_Function) -- return Natural; function Index ( Source : Wide_String; Pattern : Wide_String; From : Positive; Going : Direction := Forward; Mapping : not null access function (From : Wide_Character) return Wide_Character) return Natural renames Wide_Functions.Maps.Index_Element; function Index ( Source : Wide_String; Pattern : Wide_String; From : Positive; Going : Direction := Forward; Mapping : not null access function (From : Wide_Wide_Character) return Wide_Wide_Character) return Natural renames Wide_Functions.Maps.Index; -- modified -- function Index ( -- Source : Wide_String; -- Pattern : Wide_String; -- Going : Direction := Forward; -- Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity) -- return Natural; function Index ( Source : Wide_String; Pattern : Wide_String; Going : Direction := Forward) return Natural renames Wide_Functions.Index; function Index ( Source : Wide_String; Pattern : Wide_String; Going : Direction := Forward; Mapping : Wide_Maps.Wide_Character_Mapping) return Natural renames Wide_Functions.Maps.Index; -- modified -- function Index ( -- Source : Wide_String; -- Pattern : Wide_String; -- Going : Direction := Forward; -- Mapping : Wide_Maps.Wide_Character_Mapping_Function) -- return Natural; function Index ( Source : Wide_String; Pattern : Wide_String; Going : Direction := Forward; Mapping : not null access function (From : Wide_Character) return Wide_Character) return Natural renames Wide_Functions.Maps.Index_Element; function Index ( Source : Wide_String; Pattern : Wide_String; Going : Direction := Forward; Mapping : not null access function (From : Wide_Wide_Character) return Wide_Wide_Character) return Natural renames Wide_Functions.Maps.Index; function Index ( Source : Wide_String; Set : Wide_Maps.Wide_Character_Set; From : Positive; Test : Membership := Inside; Going : Direction := Forward) return Natural renames Wide_Functions.Maps.Index; function Index ( Source : Wide_String; Set : Wide_Maps.Wide_Character_Set; Test : Membership := Inside; Going : Direction := Forward) return Natural renames Wide_Functions.Maps.Index; function Index_Non_Blank ( Source : Wide_String; From : Positive; Going : Direction := Forward) return Natural renames Wide_Functions.Index_Non_Blank; function Index_Non_Blank ( Source : Wide_String; Going : Direction := Forward) return Natural renames Wide_Functions.Index_Non_Blank; -- modified -- function Count ( -- Source : Wide_String; -- Pattern : Wide_String; -- Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity) -- return Natural; function Count ( Source : Wide_String; Pattern : Wide_String) return Natural renames Wide_Functions.Count; function Count ( Source : Wide_String; Pattern : Wide_String; Mapping : Wide_Maps.Wide_Character_Mapping) return Natural renames Wide_Functions.Maps.Count; -- modified -- function Count ( -- Source : Wide_String; -- Pattern : Wide_String; -- Mapping : Wide_Maps.Wide_Character_Mapping_Function) -- return Natural; function Count ( Source : Wide_String; Pattern : Wide_String; Mapping : not null access function (From : Wide_Character) return Wide_Character) return Natural renames Wide_Functions.Maps.Count_Element; function Count ( Source : Wide_String; Pattern : Wide_String; Mapping : not null access function (From : Wide_Wide_Character) return Wide_Wide_Character) return Natural renames Wide_Functions.Maps.Count; function Count ( Source : Wide_String; Set : Wide_Maps.Wide_Character_Set) return Natural renames Wide_Functions.Maps.Count; procedure Find_Token ( Source : Wide_String; Set : Wide_Maps.Wide_Character_Set; From : Positive; Test : Membership; First : out Positive; Last : out Natural) renames Wide_Functions.Maps.Find_Token; procedure Find_Token ( Source : Wide_String; Set : Wide_Maps.Wide_Character_Set; Test : Membership; First : out Positive; Last : out Natural) renames Wide_Functions.Maps.Find_Token; -- Wide_String translation subprograms function Translate ( Source : Wide_String; Mapping : Wide_Maps.Wide_Character_Mapping) return Wide_String renames Wide_Functions.Maps.Translate; -- modified procedure Translate ( Source : in out Wide_String; Mapping : Wide_Maps.Wide_Character_Mapping; Drop : Truncation := Error; -- additional Justify : Alignment := Left; -- additional Pad : Wide_Character := Wide_Space) -- additional renames Wide_Functions.Maps.Translate; -- modified -- function Translate ( -- Source : Wide_String; -- Mapping : Wide_Maps.Wide_Character_Mapping_Function) -- return Wide_String; function Translate ( Source : Wide_String; Mapping : not null access function (From : Wide_Character) return Wide_Character) return Wide_String renames Wide_Functions.Maps.Translate_Element; function Translate ( Source : Wide_String; Mapping : not null access function (From : Wide_Wide_Character) return Wide_Wide_Character) return Wide_String renames Wide_Functions.Maps.Translate; -- modified -- procedure Translate ( -- Source : in out Wide_String; -- Mapping : Wide_Maps.Wide_Character_Mapping_Function); procedure Translate ( Source : in out Wide_String; Mapping : not null access function (From : Wide_Character) return Wide_Character) renames Wide_Functions.Maps.Translate_Element; procedure Translate ( Source : in out Wide_String; Mapping : not null access function (From : Wide_Wide_Character) return Wide_Wide_Character; Drop : Truncation := Error; -- additional Justify : Alignment := Left; -- additional Pad : Wide_Character := Wide_Space) -- additional renames Wide_Functions.Maps.Translate; -- Wide_String transformation subprograms function Replace_Slice ( Source : Wide_String; Low : Positive; High : Natural; By : Wide_String) return Wide_String renames Wide_Functions.Replace_Slice; procedure Replace_Slice ( Source : in out Wide_String; Low : Positive; High : Natural; By : Wide_String; Drop : Truncation := Error; Justify : Alignment := Left; Pad : Wide_Character := Wide_Space) renames Wide_Functions.Replace_Slice; function Insert ( Source : Wide_String; Before : Positive; New_Item : Wide_String) return Wide_String renames Wide_Functions.Insert; procedure Insert ( Source : in out Wide_String; Before : Positive; New_Item : Wide_String; Drop : Truncation := Error) renames Wide_Functions.Insert; function Overwrite ( Source : Wide_String; Position : Positive; New_Item : Wide_String) return Wide_String renames Wide_Functions.Overwrite; procedure Overwrite ( Source : in out Wide_String; Position : Positive; New_Item : Wide_String; Drop : Truncation := Right) renames Wide_Functions.Overwrite; function Delete ( Source : Wide_String; From : Positive; Through : Natural) return Wide_String renames Wide_Functions.Delete; procedure Delete ( Source : in out Wide_String; From : Positive; Through : Natural; Justify : Alignment := Left; Pad : Wide_Character := Wide_Space) renames Wide_Functions.Delete; -- Wide_String selector subprograms -- modified function Trim ( Source : Wide_String; Side : Trim_End; Blank : Wide_Character := Wide_Space) -- additional return Wide_String renames Wide_Functions.Trim; procedure Trim ( Source : in out Wide_String; Side : Trim_End; Justify : Alignment := Left; Pad : Wide_Character := Wide_Space) renames Wide_Functions.Trim; -- extended procedure Trim ( Source : in out Wide_String; Side : Trim_End; Blank : Wide_Character; Justify : Alignment := Left; Pad : Wide_Character := Wide_Space) renames Wide_Functions.Trim; function Trim ( Source : Wide_String; Left : Wide_Maps.Wide_Character_Set; Right : Wide_Maps.Wide_Character_Set) return Wide_String renames Wide_Functions.Maps.Trim; procedure Trim ( Source : in out Wide_String; Left : Wide_Maps.Wide_Character_Set; Right : Wide_Maps.Wide_Character_Set; Justify : Alignment := Strings.Left; Pad : Wide_Character := Wide_Space) renames Wide_Functions.Maps.Trim; function Head ( Source : Wide_String; Count : Natural; Pad : Wide_Character := Wide_Space) return Wide_String renames Wide_Functions.Head; procedure Head ( Source : in out Wide_String; Count : Natural; Justify : Alignment := Left; Pad : Wide_Character := Wide_Space) renames Wide_Functions.Head; function Tail ( Source : Wide_String; Count : Natural; Pad : Wide_Character := Wide_Space) return Wide_String renames Wide_Functions.Tail; procedure Tail ( Source : in out Wide_String; Count : Natural; Justify : Alignment := Left; Pad : Wide_Character := Wide_Space) renames Wide_Functions.Tail; -- Wide_String constructor functions function "*" (Left : Natural; Right : Wide_Character) return Wide_String renames Wide_Functions."*"; function "*" (Left : Natural; Right : Wide_String) return Wide_String renames Wide_Functions."*"; end Ada.Strings.Wide_Fixed;
VitalijBondarenko/notifyada
Ada
3,558
adb
------------------------------------------------------------------------------ -- -- -- Copyright (c) 2014-2023 Vitalii Bondarenko <[email protected]> -- -- -- ------------------------------------------------------------------------------ -- -- -- The MIT License (MIT) -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, sublicense, and/or sell copies of the Software, and to -- -- permit persons to whom the Software is furnished to do so, subject to -- -- the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -- -- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -- -- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -- -- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- ------------------------------------------------------------------------------ with Ada.Text_IO; use Ada.Text_IO; with Ada.Text_IO.Unbounded_IO; use Ada.Text_IO.Unbounded_IO; with Glib; use Glib; with Gtk; use Gtk; with Gtk.Main; package body Demo_Action_Callbacks is --------------------- -- Action_Callback -- --------------------- procedure Action_Callback (Notification : Notify_Notification; Action : UTF8_String) is begin Put_Line ("Action : " & Action); Gtk.Main.Main_Quit; Put_Line ("Action button pressed." & ASCII.LF & "Goodbye!"); end Action_Callback; ------------------------------- -- Action_Callback_User_Data -- ------------------------------- procedure Action_Callback_User_Data (Notification : Notify_Notification; Action : UTF8_String; User_Data : String_Ptr) is begin Put_Line ("Action : " & Action); Put_Line ("User Data : " & User_Data.all); Gtk.Main.Main_Quit; Put_Line ("Action button pressed." & ASCII.LF & "Goodbye!"); end Action_Callback_User_Data; ------------------------ -- On_Closed_Callback -- ------------------------ procedure On_Closed_Callback (Notification : access Notify_Notification_Record'Class) is begin Gtk.Main.Main_Quit; Put_Line ("Notification closed." & ASCII.LF & "Goodbye!"); end On_Closed_Callback; end Demo_Action_Callbacks;
zhmu/ananas
Ada
3,300
ads
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY COMPONENTS -- -- -- -- S Y S T E M . C O M P A R E _ A R R A Y _ S I G N E D _ 6 4 -- -- -- -- S p e c -- -- -- -- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package contains functions for runtime comparisons on arrays whose -- elements are 64-bit discrete type values to be treated as signed. package System.Compare_Array_Signed_64 is -- Note: although the functions in this package are in a sense Pure, the -- package cannot be declared as Pure, since the arguments are addresses, -- not the data, and the result is not pure wrt the address values. function Compare_Array_S64 (Left : System.Address; Right : System.Address; Left_Len : Natural; Right_Len : Natural) return Integer; -- Compare the array starting at address Left of length Left_Len -- with the array starting at address Right of length Right_Len. -- The comparison is in the normal Ada semantic sense of array -- comparison. The result is -1,0,+1 for Left<Right, Left=Right, -- Left>Right respectively. end System.Compare_Array_Signed_64;
damaki/libkeccak
Ada
7,643
ads
------------------------------------------------------------------------------- -- Copyright (c) 2019, Daniel King -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- * Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- * Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- * The name of the copyright holder may not be used to endorse or promote -- Products derived from this software without specific prior written -- permission. -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY -- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------- with Keccak.Generic_Parallel_Permutation_Serial_Fallback; with Keccak.Keccak_1600; with Keccak.Types; pragma Elaborate_All (Keccak.Generic_Parallel_Permutation_Serial_Fallback); -- @summary -- Defines procedures for running Keccak-f permutations in parallel for -- 2x, 4x, and 8x parallelism, as well as serial permutations. -- -- @description -- This package must define the following types and procedures: -- * Permute_S1_R12 - Serial Keccak-p[1600] permutation with 12 rounds. -- * Permute_S1_R24 - Serial Keccak-p[1600] permutation with 24 rounds. -- -- For 2x parallelism: -- * Parallel_State_P2 -- * Init_P2 -- * Permute_All_P2_R12 -- * Permute_All_P2_R24 -- * XOR_Bits_Into_State_Separate_P2 -- * Extract_Bytes_P2 -- -- For 4x parallelism: -- * Parallel_State_P4 -- * Init_P4 -- * Permute_All_P4_R12 -- * Permute_All_P4_R24 -- * XOR_Bits_Into_State_Separate_P4 -- * Extract_Bytes_P4 -- -- For 8x parallelism: -- * Parallel_State_P8 -- * Init_P8 -- * Permute_All_P8_R12 -- * Permute_All_P8_R24 -- * XOR_Bits_Into_State_Separate_P8 -- * Extract_Bytes_P8 -- -- Any other declarations in this package are architecture-specific and should -- not be relied upon. package Keccak.Parallel_Keccak_1600 with SPARK_Mode => On is ------------------------ -- Keccak-f[1600]x2 -- ------------------------ -- No SIMD available on this architecture. Fall back to serial implementation. package KeccakF_1600_P2 is new Keccak.Generic_Parallel_Permutation_Serial_Fallback (Permutation_State => Keccak_1600.KeccakF_1600.Lane_Complemented_State, Init => Keccak_1600.KeccakF_1600.Init, XOR_Bits_Into_State => Keccak_1600.KeccakF_1600_Lanes.XOR_Bits_Into_State, Extract_Bytes => Keccak_1600.KeccakF_1600_Lanes.Extract_Bytes, State_Size_Bits => 1600, Parallelism => 2); subtype Parallel_State_P2 is KeccakF_1600_P2.Parallel_State; procedure Init_P2 (S : out KeccakF_1600_P2.Parallel_State) renames KeccakF_1600_P2.Init; procedure XOR_Bits_Into_State_Separate_P2 (S : in out Parallel_State_P2; Data : in Types.Byte_Array; Data_Offset : in Natural; Bit_Len : in Natural) renames KeccakF_1600_P2.XOR_Bits_Into_State_Separate; procedure XOR_Bits_Into_State_All_P2 (S : in out Parallel_State_P2; Data : in Types.Byte_Array; Bit_Len : in Natural) renames KeccakF_1600_P2.XOR_Bits_Into_State_All; procedure Extract_Bytes_P2 (S : in Parallel_State_P2; Data : out Types.Byte_Array; Data_Offset : in Natural; Byte_Len : in Natural) renames KeccakF_1600_P2.Extract_Bytes; ------------------------ -- Keccak-f[1600]x4 -- ------------------------ -- No SIMD available on this architecture. Fall back to serial implementation. package KeccakF_1600_P4 is new Keccak.Generic_Parallel_Permutation_Serial_Fallback (Permutation_State => Keccak_1600.KeccakF_1600.Lane_Complemented_State, Init => Keccak_1600.KeccakF_1600.Init, XOR_Bits_Into_State => Keccak_1600.KeccakF_1600_Lanes.XOR_Bits_Into_State, Extract_Bytes => Keccak_1600.KeccakF_1600_Lanes.Extract_Bytes, State_Size_Bits => 1600, Parallelism => 4); subtype Parallel_State_P4 is KeccakF_1600_P4.Parallel_State; procedure Init_P4 (S : out KeccakF_1600_P4.Parallel_State) renames KeccakF_1600_P4.Init; procedure XOR_Bits_Into_State_Separate_P4 (S : in out Parallel_State_P4; Data : in Types.Byte_Array; Data_Offset : in Natural; Bit_Len : in Natural) renames KeccakF_1600_P4.XOR_Bits_Into_State_Separate; procedure XOR_Bits_Into_State_All_P4 (S : in out Parallel_State_P4; Data : in Types.Byte_Array; Bit_Len : in Natural) renames KeccakF_1600_P4.XOR_Bits_Into_State_All; procedure Extract_Bytes_P4 (S : in Parallel_State_P4; Data : out Types.Byte_Array; Data_Offset : in Natural; Byte_Len : in Natural) renames KeccakF_1600_P4.Extract_Bytes; ----------------------- -- Keccak-f[1600]x8 -- ----------------------- -- No SIMD available on this architecture. Fall back to serial implementation. package KeccakF_1600_P8 is new Keccak.Generic_Parallel_Permutation_Serial_Fallback (Permutation_State => Keccak_1600.KeccakF_1600.Lane_Complemented_State, Init => Keccak_1600.KeccakF_1600.Init, XOR_Bits_Into_State => Keccak_1600.KeccakF_1600_Lanes.XOR_Bits_Into_State, Extract_Bytes => Keccak_1600.KeccakF_1600_Lanes.Extract_Bytes, State_Size_Bits => 1600, Parallelism => 8); subtype Parallel_State_P8 is KeccakF_1600_P8.Parallel_State; procedure Init_P8 (S : out KeccakF_1600_P8.Parallel_State) renames KeccakF_1600_P8.Init; procedure XOR_Bits_Into_State_Separate_P8 (S : in out Parallel_State_P8; Data : in Types.Byte_Array; Data_Offset : in Natural; Bit_Len : in Natural) renames KeccakF_1600_P8.XOR_Bits_Into_State_Separate; procedure XOR_Bits_Into_State_All_P8 (S : in out Parallel_State_P8; Data : in Types.Byte_Array; Bit_Len : in Natural) renames KeccakF_1600_P8.XOR_Bits_Into_State_All; procedure Extract_Bytes_P8 (S : in Parallel_State_P8; Data : out Types.Byte_Array; Data_Offset : in Natural; Byte_Len : in Natural) renames KeccakF_1600_P8.Extract_Bytes; end Keccak.Parallel_Keccak_1600;
reznikmm/matreshka
Ada
6,842
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Number.Minutes_Elements is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Number_Minutes_Element_Node is begin return Self : Number_Minutes_Element_Node do Matreshka.ODF_Number.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Number_Prefix); end return; end Create; ---------------- -- Enter_Node -- ---------------- overriding procedure Enter_Node (Self : not null access Number_Minutes_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Visitor in ODF.DOM.Visitors.Abstract_ODF_Visitor'Class then ODF.DOM.Visitors.Abstract_ODF_Visitor'Class (Visitor).Enter_Number_Minutes (ODF.DOM.Number_Minutes_Elements.ODF_Number_Minutes_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Enter_Node (Visitor, Control); end if; end Enter_Node; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Number_Minutes_Element_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Minutes_Element; end Get_Local_Name; ---------------- -- Leave_Node -- ---------------- overriding procedure Leave_Node (Self : not null access Number_Minutes_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Visitor in ODF.DOM.Visitors.Abstract_ODF_Visitor'Class then ODF.DOM.Visitors.Abstract_ODF_Visitor'Class (Visitor).Leave_Number_Minutes (ODF.DOM.Number_Minutes_Elements.ODF_Number_Minutes_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Leave_Node (Visitor, Control); end if; end Leave_Node; ---------------- -- Visit_Node -- ---------------- overriding procedure Visit_Node (Self : not null access Number_Minutes_Element_Node; Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Iterator in ODF.DOM.Iterators.Abstract_ODF_Iterator'Class then ODF.DOM.Iterators.Abstract_ODF_Iterator'Class (Iterator).Visit_Number_Minutes (Visitor, ODF.DOM.Number_Minutes_Elements.ODF_Number_Minutes_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Visit_Node (Iterator, Visitor, Control); end if; end Visit_Node; begin Matreshka.DOM_Documents.Register_Element (Matreshka.ODF_String_Constants.Number_URI, Matreshka.ODF_String_Constants.Minutes_Element, Number_Minutes_Element_Node'Tag); end Matreshka.ODF_Number.Minutes_Elements;
gusthoff/fixed_types
Ada
3,877
adb
------------------------------------------------------------------------------- -- -- FIXED TYPES -- -- Fixed_Long & Fixed_Sat_Long definitions -- -- The MIT License (MIT) -- -- Copyright (c) 2015 Gustavo A. Hoffmann -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to -- deal in the Software without restriction, including without limitation the -- rights to use, copy, modify, merge, publish, distribute, sublicense, and / -- or sell copies of the Software, and to permit persons to whom the Software -- is furnished to do so, subject to the following conditions: -- -- The above copyright notice and this permission notice shall be included in -- all copies or substantial portions of the Software. -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -- IN THE SOFTWARE. ------------------------------------------------------------------------------- package body Fixed_Types.Long is overriding function "abs" (A : Fixed_Sat_Long) return Fixed_Sat_Long is begin if A = Fixed_Sat_Long'First then return Fixed_Sat_Long'Last; else return Fixed_Sat_Long (abs Fixed_Long (A)); end if; end "abs"; overriding function "+" (A, B : Fixed_Sat_Long) return Fixed_Sat_Long is pragma Suppress (Overflow_Check); C : Fixed_Integer_Long; Zero : constant Fixed_Integer_Long := 0; begin C := To_Fixed_Integer_Long (A) + To_Fixed_Integer_Long (B); if A > 0.0 and then B > 0.0 and then C < Zero then return Fixed_Sat_Long'Last; elsif A < 0.0 and then B < 0.0 and then C > Zero then return Fixed_Sat_Long'First; else return To_Fixed_Sat_Long (C); end if; end "+"; overriding function "-" (A, B : Fixed_Sat_Long) return Fixed_Sat_Long is pragma Suppress (Overflow_Check); C : Fixed_Integer_Long; Zero : constant Fixed_Integer_Long := 0; begin C := To_Fixed_Integer_Long (A) - To_Fixed_Integer_Long (B); if A > 0.0 and then B < 0.0 and then C < Zero then return Fixed_Sat_Long'Last; elsif A < 0.0 and then B > 0.0 and then C > Zero then return Fixed_Sat_Long'First; else return To_Fixed_Sat_Long (C); end if; end "-"; overriding function "-" (A : Fixed_Sat_Long) return Fixed_Sat_Long is pragma Suppress (Overflow_Check); begin if A = Fixed_Sat_Long'First then return Fixed_Sat_Long'Last; else return Fixed_Sat_Long (-Fixed_Long (A)); end if; end "-"; not overriding function "*" (A, B : Fixed_Sat_Long) return Fixed_Sat_Long is pragma Suppress (Overflow_Check); begin if A = Fixed_Sat_Long'First and then B = Fixed_Sat_Long'First then return Fixed_Sat_Long'Last; else return Fixed_Sat_Long (Fixed_Long (A) * Fixed_Long (B)); end if; end "*"; overriding function "*" (A : Fixed_Sat_Long; B : Integer) return Fixed_Sat_Long is pragma Unsuppress (Overflow_Check); begin return Fixed_Sat_Long (Fixed_Long (A) * B); exception when Constraint_Error => if (A > 0.0 and B > 0) or (A < 0.0 and B < 0) then return Fixed_Sat_Long'Last; else return Fixed_Sat_Long'First; end if; end "*"; end Fixed_Types.Long;
stcarrez/ada-el
Ada
1,234
ads
----------------------------------------------------------------------- -- EL testsuite - EL Testsuite -- Copyright (C) 2009, 2010, 2022 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package EL.Testsuite is function Suite return Util.Tests.Access_Test_Suite; type Test is new Util.Tests.Test with record I1 : Integer; I2 : Integer; end record; -- Test object integer procedure Test_To_Object_Integer (T : in out Test); -- Test object integer procedure Test_Expression (T : in out Test); end EL.Testsuite;
OpenAPITools/openapi-generator
Ada
9,499
ads
-- OpenAPI Petstore -- This is a sample server Petstore server. For this sample, you can use the api key `special_key` to test the authorization filters. -- -- The version of the OpenAPI document: 1.0.0 -- -- -- NOTE: This package is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. -- https://openapi-generator.tech -- Do not edit the class manually. with Swagger.Streams; with Ada.Containers.Vectors; package Samples.Petstore.Models is pragma Style_Checks ("-bmrIu"); -- ------------------------------ -- An uploaded response -- Describes the result of uploading an image resource -- ------------------------------ type ApiResponse_Type is record Code : Swagger.Nullable_Integer; P_Type : Swagger.Nullable_UString; Message : Swagger.Nullable_UString; end record; package ApiResponse_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Samples.Petstore.Models.ApiResponse_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Samples.Petstore.Models.ApiResponse_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in ApiResponse_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Samples.Petstore.Models.ApiResponse_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : in out ApiResponse_Type_Vectors.Vector); -- ------------------------------ -- Pet category -- A category for a pet -- ------------------------------ type Category_Type is record Id : Swagger.Nullable_Long; Name : Swagger.Nullable_UString; end record; package Category_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Samples.Petstore.Models.Category_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Samples.Petstore.Models.Category_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Category_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Samples.Petstore.Models.Category_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : in out Category_Type_Vectors.Vector); -- ------------------------------ -- Pet Order -- An order for a pets from the pet store -- ------------------------------ type Order_Type is record Id : Swagger.Nullable_Long; Pet_Id : Swagger.Nullable_Long; Quantity : Swagger.Nullable_Integer; Ship_Date : Swagger.Nullable_Date; Status : Swagger.Nullable_UString; Complete : Swagger.Nullable_Boolean; end record; package Order_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Samples.Petstore.Models.Order_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Samples.Petstore.Models.Order_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Order_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Samples.Petstore.Models.Order_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : in out Order_Type_Vectors.Vector); type PropertyNameMapping_Type is record P_HTTPDebugOperation : Swagger.Nullable_UString; P_UnderscoreType : Swagger.Nullable_UString; P_Type : Swagger.Nullable_UString; P_TypeWithUnderscore : Swagger.Nullable_UString; end record; package PropertyNameMapping_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Samples.Petstore.Models.PropertyNameMapping_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Samples.Petstore.Models.PropertyNameMapping_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in PropertyNameMapping_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Samples.Petstore.Models.PropertyNameMapping_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : in out PropertyNameMapping_Type_Vectors.Vector); -- ------------------------------ -- Pet Tag -- A tag for a pet -- ------------------------------ type Tag_Type is record Id : Swagger.Nullable_Long; Name : Swagger.Nullable_UString; end record; package Tag_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Samples.Petstore.Models.Tag_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Samples.Petstore.Models.Tag_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Tag_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Samples.Petstore.Models.Tag_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : in out Tag_Type_Vectors.Vector); -- ------------------------------ -- a User -- A User who is purchasing from the pet store -- ------------------------------ type User_Type is record Id : Swagger.Nullable_Long; Username : Swagger.Nullable_UString; First_Name : Swagger.Nullable_UString; Last_Name : Swagger.Nullable_UString; Email : Swagger.Nullable_UString; Password : Swagger.Nullable_UString; Phone : Swagger.Nullable_UString; User_Status : Swagger.Nullable_Integer; end record; package User_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Samples.Petstore.Models.User_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Samples.Petstore.Models.User_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in User_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Samples.Petstore.Models.User_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : in out User_Type_Vectors.Vector); -- ------------------------------ -- a Pet -- A pet for sale in the pet store -- ------------------------------ type Pet_Type is record Id : Swagger.Nullable_Long; Category : Samples.Petstore.Models.Category_Type; Name : Swagger.UString; Photo_Urls : Swagger.UString_Vectors.Vector; Tags : Samples.Petstore.Models.Tag_Type_Vectors.Vector; Status : Swagger.Nullable_UString; end record; package Pet_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Samples.Petstore.Models.Pet_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Samples.Petstore.Models.Pet_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Pet_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Samples.Petstore.Models.Pet_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : in out Pet_Type_Vectors.Vector); end Samples.Petstore.Models;
charlie5/cBound
Ada
1,394
ads
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces.C; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_keycode_iterator_t is -- Item -- type Item is record data : access xcb.xcb_keycode_t; the_rem : aliased Interfaces.C.int; index : aliased Interfaces.C.int; end record; -- Item_Array -- type Item_Array is array (Interfaces.C.size_t range <>) of aliased xcb.xcb_keycode_iterator_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_keycode_iterator_t.Item, Element_Array => xcb.xcb_keycode_iterator_t.Item_Array, Default_Terminator => (others => <>)); subtype Pointer is C_Pointers.Pointer; -- Pointer_Array -- type Pointer_Array is array (Interfaces.C.size_t range <>) of aliased xcb.xcb_keycode_iterator_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_keycode_iterator_t.Pointer, Element_Array => xcb.xcb_keycode_iterator_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_keycode_iterator_t;
docandrew/troodon
Ada
201,591
ads
pragma Ada_2012; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; with ftimage; with fttypes; with System; with ftsystem; with Interfaces.C.Strings; with freetype_config_integer_types; package freetype is -- arg-macro: procedure FT_ENC_TAG (value, a, b, c, d) -- value := ( ( (FT_UInt32)(a) << 24 ) or ( (FT_UInt32)(b) << 16 ) or ( (FT_UInt32)(c) << 8 ) or (FT_UInt32)(d) ) -- unsupported macro: ft_encoding_none FT_ENCODING_NONE -- unsupported macro: ft_encoding_unicode FT_ENCODING_UNICODE -- unsupported macro: ft_encoding_symbol FT_ENCODING_MS_SYMBOL -- unsupported macro: ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1 -- unsupported macro: ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2 -- unsupported macro: ft_encoding_sjis FT_ENCODING_SJIS -- unsupported macro: ft_encoding_gb2312 FT_ENCODING_PRC -- unsupported macro: ft_encoding_big5 FT_ENCODING_BIG5 -- unsupported macro: ft_encoding_wansung FT_ENCODING_WANSUNG -- unsupported macro: ft_encoding_johab FT_ENCODING_JOHAB -- unsupported macro: ft_encoding_adobe_standard FT_ENCODING_ADOBE_STANDARD -- unsupported macro: ft_encoding_adobe_expert FT_ENCODING_ADOBE_EXPERT -- unsupported macro: ft_encoding_adobe_custom FT_ENCODING_ADOBE_CUSTOM -- unsupported macro: ft_encoding_apple_roman FT_ENCODING_APPLE_ROMAN FT_FACE_FLAG_SCALABLE : constant := ( 2 ** 0 ); -- /usr/include/freetype2/freetype/freetype.h:1197 FT_FACE_FLAG_FIXED_SIZES : constant := ( 2 ** 1 ); -- /usr/include/freetype2/freetype/freetype.h:1198 FT_FACE_FLAG_FIXED_WIDTH : constant := ( 2 ** 2 ); -- /usr/include/freetype2/freetype/freetype.h:1199 FT_FACE_FLAG_SFNT : constant := ( 2 ** 3 ); -- /usr/include/freetype2/freetype/freetype.h:1200 FT_FACE_FLAG_HORIZONTAL : constant := ( 2 ** 4 ); -- /usr/include/freetype2/freetype/freetype.h:1201 FT_FACE_FLAG_VERTICAL : constant := ( 2 ** 5 ); -- /usr/include/freetype2/freetype/freetype.h:1202 FT_FACE_FLAG_KERNING : constant := ( 2 ** 6 ); -- /usr/include/freetype2/freetype/freetype.h:1203 FT_FACE_FLAG_FAST_GLYPHS : constant := ( 2 ** 7 ); -- /usr/include/freetype2/freetype/freetype.h:1204 FT_FACE_FLAG_MULTIPLE_MASTERS : constant := ( 2 ** 8 ); -- /usr/include/freetype2/freetype/freetype.h:1205 FT_FACE_FLAG_GLYPH_NAMES : constant := ( 2 ** 9 ); -- /usr/include/freetype2/freetype/freetype.h:1206 FT_FACE_FLAG_EXTERNAL_STREAM : constant := ( 2 ** 10 ); -- /usr/include/freetype2/freetype/freetype.h:1207 FT_FACE_FLAG_HINTER : constant := ( 2 ** 11 ); -- /usr/include/freetype2/freetype/freetype.h:1208 FT_FACE_FLAG_CID_KEYED : constant := ( 2 ** 12 ); -- /usr/include/freetype2/freetype/freetype.h:1209 FT_FACE_FLAG_TRICKY : constant := ( 2 ** 13 ); -- /usr/include/freetype2/freetype/freetype.h:1210 FT_FACE_FLAG_COLOR : constant := ( 2 ** 14 ); -- /usr/include/freetype2/freetype/freetype.h:1211 FT_FACE_FLAG_VARIATION : constant := ( 2 ** 15 ); -- /usr/include/freetype2/freetype/freetype.h:1212 -- arg-macro: function FT_HAS_HORIZONTAL (face) -- return notnot( (face).face_flags and FT_FACE_FLAG_HORIZONTAL ) ; -- arg-macro: function FT_HAS_VERTICAL (face) -- return notnot( (face).face_flags and FT_FACE_FLAG_VERTICAL ) ; -- arg-macro: function FT_HAS_KERNING (face) -- return notnot( (face).face_flags and FT_FACE_FLAG_KERNING ) ; -- arg-macro: function FT_IS_SCALABLE (face) -- return notnot( (face).face_flags and FT_FACE_FLAG_SCALABLE ) ; -- arg-macro: function FT_IS_SFNT (face) -- return notnot( (face).face_flags and FT_FACE_FLAG_SFNT ) ; -- arg-macro: function FT_IS_FIXED_WIDTH (face) -- return notnot( (face).face_flags and FT_FACE_FLAG_FIXED_WIDTH ) ; -- arg-macro: function FT_HAS_FIXED_SIZES (face) -- return notnot( (face).face_flags and FT_FACE_FLAG_FIXED_SIZES ) ; -- arg-macro: procedure FT_HAS_FAST_GLYPHS (face) -- 0 -- arg-macro: function FT_HAS_GLYPH_NAMES (face) -- return notnot( (face).face_flags and FT_FACE_FLAG_GLYPH_NAMES ) ; -- arg-macro: function FT_HAS_MULTIPLE_MASTERS (face) -- return notnot( (face).face_flags and FT_FACE_FLAG_MULTIPLE_MASTERS ) ; -- arg-macro: function FT_IS_NAMED_INSTANCE (face) -- return notnot( (face).face_index and 16#7FFF0000# ) ; -- arg-macro: function FT_IS_VARIATION (face) -- return notnot( (face).face_flags and FT_FACE_FLAG_VARIATION ) ; -- arg-macro: function FT_IS_CID_KEYED (face) -- return notnot( (face).face_flags and FT_FACE_FLAG_CID_KEYED ) ; -- arg-macro: function FT_IS_TRICKY (face) -- return notnot( (face).face_flags and FT_FACE_FLAG_TRICKY ) ; -- arg-macro: function FT_HAS_COLOR (face) -- return notnot( (face).face_flags and FT_FACE_FLAG_COLOR ) ; FT_STYLE_FLAG_ITALIC : constant := ( 2 ** 0 ); -- /usr/include/freetype2/freetype/freetype.h:1475 FT_STYLE_FLAG_BOLD : constant := ( 2 ** 1 ); -- /usr/include/freetype2/freetype/freetype.h:1476 FT_OPEN_MEMORY : constant := 16#1#; -- /usr/include/freetype2/freetype/freetype.h:2003 FT_OPEN_STREAM : constant := 16#2#; -- /usr/include/freetype2/freetype/freetype.h:2004 FT_OPEN_PATHNAME : constant := 16#4#; -- /usr/include/freetype2/freetype/freetype.h:2005 FT_OPEN_DRIVER : constant := 16#8#; -- /usr/include/freetype2/freetype/freetype.h:2006 FT_OPEN_PARAMS : constant := 16#10#; -- /usr/include/freetype2/freetype/freetype.h:2007 -- unsupported macro: ft_open_memory FT_OPEN_MEMORY -- unsupported macro: ft_open_stream FT_OPEN_STREAM -- unsupported macro: ft_open_pathname FT_OPEN_PATHNAME -- unsupported macro: ft_open_driver FT_OPEN_DRIVER -- unsupported macro: ft_open_params FT_OPEN_PARAMS FT_LOAD_DEFAULT : constant := 16#0#; -- /usr/include/freetype2/freetype/freetype.h:3021 FT_LOAD_NO_SCALE : constant := ( 2 ** 0 ); -- /usr/include/freetype2/freetype/freetype.h:3022 FT_LOAD_NO_HINTING : constant := ( 2 ** 1 ); -- /usr/include/freetype2/freetype/freetype.h:3023 FT_LOAD_RENDER : constant := ( 2 ** 2 ); -- /usr/include/freetype2/freetype/freetype.h:3024 FT_LOAD_NO_BITMAP : constant := ( 2 ** 3 ); -- /usr/include/freetype2/freetype/freetype.h:3025 FT_LOAD_VERTICAL_LAYOUT : constant := ( 2 ** 4 ); -- /usr/include/freetype2/freetype/freetype.h:3026 FT_LOAD_FORCE_AUTOHINT : constant := ( 2 ** 5 ); -- /usr/include/freetype2/freetype/freetype.h:3027 FT_LOAD_CROP_BITMAP : constant := ( 2 ** 6 ); -- /usr/include/freetype2/freetype/freetype.h:3028 FT_LOAD_PEDANTIC : constant := ( 2 ** 7 ); -- /usr/include/freetype2/freetype/freetype.h:3029 FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH : constant := ( 2 ** 9 ); -- /usr/include/freetype2/freetype/freetype.h:3030 FT_LOAD_NO_RECURSE : constant := ( 2 ** 10 ); -- /usr/include/freetype2/freetype/freetype.h:3031 FT_LOAD_IGNORE_TRANSFORM : constant := ( 2 ** 11 ); -- /usr/include/freetype2/freetype/freetype.h:3032 FT_LOAD_MONOCHROME : constant := ( 2 ** 12 ); -- /usr/include/freetype2/freetype/freetype.h:3033 FT_LOAD_LINEAR_DESIGN : constant := ( 2 ** 13 ); -- /usr/include/freetype2/freetype/freetype.h:3034 FT_LOAD_NO_AUTOHINT : constant := ( 2 ** 15 ); -- /usr/include/freetype2/freetype/freetype.h:3035 FT_LOAD_COLOR : constant := ( 2 ** 20 ); -- /usr/include/freetype2/freetype/freetype.h:3037 FT_LOAD_COMPUTE_METRICS : constant := ( 2 ** 21 ); -- /usr/include/freetype2/freetype/freetype.h:3038 FT_LOAD_BITMAP_METRICS_ONLY : constant := ( 2 ** 22 ); -- /usr/include/freetype2/freetype/freetype.h:3039 FT_LOAD_ADVANCE_ONLY : constant := ( 2 ** 8 ); -- /usr/include/freetype2/freetype/freetype.h:3044 FT_LOAD_SBITS_ONLY : constant := ( 2 ** 14 ); -- /usr/include/freetype2/freetype/freetype.h:3045 -- arg-macro: function FT_LOAD_TARGET_ (x) -- return (FT_Int32)( (x) and 15 ) << 16 ; -- unsupported macro: FT_LOAD_TARGET_NORMAL FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL ) -- unsupported macro: FT_LOAD_TARGET_LIGHT FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT ) -- unsupported macro: FT_LOAD_TARGET_MONO FT_LOAD_TARGET_( FT_RENDER_MODE_MONO ) -- unsupported macro: FT_LOAD_TARGET_LCD FT_LOAD_TARGET_( FT_RENDER_MODE_LCD ) -- unsupported macro: FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V ) -- arg-macro: function FT_LOAD_TARGET_MODE (x) -- return (FT_Render_Mode)( ( (x) >> 16 ) and 15 ) ; -- unsupported macro: ft_render_mode_normal FT_RENDER_MODE_NORMAL -- unsupported macro: ft_render_mode_mono FT_RENDER_MODE_MONO -- unsupported macro: ft_kerning_default FT_KERNING_DEFAULT -- unsupported macro: ft_kerning_unfitted FT_KERNING_UNFITTED -- unsupported macro: ft_kerning_unscaled FT_KERNING_UNSCALED FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS : constant := 1; -- /usr/include/freetype2/freetype/freetype.h:3954 FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES : constant := 2; -- /usr/include/freetype2/freetype/freetype.h:3955 FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID : constant := 4; -- /usr/include/freetype2/freetype/freetype.h:3956 FT_SUBGLYPH_FLAG_SCALE : constant := 8; -- /usr/include/freetype2/freetype/freetype.h:3957 FT_SUBGLYPH_FLAG_XY_SCALE : constant := 16#40#; -- /usr/include/freetype2/freetype/freetype.h:3958 FT_SUBGLYPH_FLAG_2X2 : constant := 16#80#; -- /usr/include/freetype2/freetype/freetype.h:3959 FT_SUBGLYPH_FLAG_USE_MY_METRICS : constant := 16#200#; -- /usr/include/freetype2/freetype/freetype.h:3960 FT_FSTYPE_INSTALLABLE_EMBEDDING : constant := 16#0000#; -- /usr/include/freetype2/freetype/freetype.h:4240 FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING : constant := 16#0002#; -- /usr/include/freetype2/freetype/freetype.h:4241 FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING : constant := 16#0004#; -- /usr/include/freetype2/freetype/freetype.h:4242 FT_FSTYPE_EDITABLE_EMBEDDING : constant := 16#0008#; -- /usr/include/freetype2/freetype/freetype.h:4243 FT_FSTYPE_NO_SUBSETTING : constant := 16#0100#; -- /usr/include/freetype2/freetype/freetype.h:4244 FT_FSTYPE_BITMAP_EMBEDDING_ONLY : constant := 16#0200#; -- /usr/include/freetype2/freetype/freetype.h:4245 FREETYPE_MAJOR : constant := 2; -- /usr/include/freetype2/freetype/freetype.h:4768 FREETYPE_MINOR : constant := 10; -- /usr/include/freetype2/freetype/freetype.h:4769 FREETYPE_PATCH : constant := 4; -- /usr/include/freetype2/freetype/freetype.h:4770 --*************************************************************************** -- * -- * freetype.h -- * -- * FreeType high-level API and common types (specification only). -- * -- * Copyright (C) 1996-2020 by -- * David Turner, Robert Wilhelm, and Werner Lemberg. -- * -- * This file is part of the FreeType project, and may only be used, -- * modified, and distributed under the terms of the FreeType project -- * license, LICENSE.TXT. By continuing to use, modify, or distribute -- * this file you indicate that you have read the license and -- * understand and accept it fully. -- * -- --************************************************************************* -- * -- * @section: -- * header_inclusion -- * -- * @title: -- * FreeType's header inclusion scheme -- * -- * @abstract: -- * How client applications should include FreeType header files. -- * -- * @description: -- * To be as flexible as possible (and for historical reasons), you must -- * load file `ft2build.h` first before other header files, for example -- * -- * ``` -- * #include <ft2build.h> -- * -- * #include <freetype/freetype.h> -- * #include <freetype/ftoutln.h> -- * ``` -- --************************************************************************* -- * -- * @section: -- * user_allocation -- * -- * @title: -- * User allocation -- * -- * @abstract: -- * How client applications should allocate FreeType data structures. -- * -- * @description: -- * FreeType assumes that structures allocated by the user and passed as -- * arguments are zeroed out except for the actual data. In other words, -- * it is recommended to use `calloc` (or variants of it) instead of -- * `malloc` for allocation. -- * -- --*********************************************************************** --*********************************************************************** -- -- B A S I C T Y P E S -- --*********************************************************************** --*********************************************************************** --************************************************************************* -- * -- * @section: -- * base_interface -- * -- * @title: -- * Base Interface -- * -- * @abstract: -- * The FreeType~2 base font interface. -- * -- * @description: -- * This section describes the most important public high-level API -- * functions of FreeType~2. -- * -- * @order: -- * FT_Library -- * FT_Face -- * FT_Size -- * FT_GlyphSlot -- * FT_CharMap -- * FT_Encoding -- * FT_ENC_TAG -- * -- * FT_FaceRec -- * -- * FT_FACE_FLAG_SCALABLE -- * FT_FACE_FLAG_FIXED_SIZES -- * FT_FACE_FLAG_FIXED_WIDTH -- * FT_FACE_FLAG_HORIZONTAL -- * FT_FACE_FLAG_VERTICAL -- * FT_FACE_FLAG_COLOR -- * FT_FACE_FLAG_SFNT -- * FT_FACE_FLAG_CID_KEYED -- * FT_FACE_FLAG_TRICKY -- * FT_FACE_FLAG_KERNING -- * FT_FACE_FLAG_MULTIPLE_MASTERS -- * FT_FACE_FLAG_VARIATION -- * FT_FACE_FLAG_GLYPH_NAMES -- * FT_FACE_FLAG_EXTERNAL_STREAM -- * FT_FACE_FLAG_HINTER -- * -- * FT_HAS_HORIZONTAL -- * FT_HAS_VERTICAL -- * FT_HAS_KERNING -- * FT_HAS_FIXED_SIZES -- * FT_HAS_GLYPH_NAMES -- * FT_HAS_COLOR -- * FT_HAS_MULTIPLE_MASTERS -- * -- * FT_IS_SFNT -- * FT_IS_SCALABLE -- * FT_IS_FIXED_WIDTH -- * FT_IS_CID_KEYED -- * FT_IS_TRICKY -- * FT_IS_NAMED_INSTANCE -- * FT_IS_VARIATION -- * -- * FT_STYLE_FLAG_BOLD -- * FT_STYLE_FLAG_ITALIC -- * -- * FT_SizeRec -- * FT_Size_Metrics -- * -- * FT_GlyphSlotRec -- * FT_Glyph_Metrics -- * FT_SubGlyph -- * -- * FT_Bitmap_Size -- * -- * FT_Init_FreeType -- * FT_Done_FreeType -- * -- * FT_New_Face -- * FT_Done_Face -- * FT_Reference_Face -- * FT_New_Memory_Face -- * FT_Face_Properties -- * FT_Open_Face -- * FT_Open_Args -- * FT_Parameter -- * FT_Attach_File -- * FT_Attach_Stream -- * -- * FT_Set_Char_Size -- * FT_Set_Pixel_Sizes -- * FT_Request_Size -- * FT_Select_Size -- * FT_Size_Request_Type -- * FT_Size_RequestRec -- * FT_Size_Request -- * FT_Set_Transform -- * FT_Load_Glyph -- * FT_Get_Char_Index -- * FT_Get_First_Char -- * FT_Get_Next_Char -- * FT_Get_Name_Index -- * FT_Load_Char -- * -- * FT_OPEN_MEMORY -- * FT_OPEN_STREAM -- * FT_OPEN_PATHNAME -- * FT_OPEN_DRIVER -- * FT_OPEN_PARAMS -- * -- * FT_LOAD_DEFAULT -- * FT_LOAD_RENDER -- * FT_LOAD_MONOCHROME -- * FT_LOAD_LINEAR_DESIGN -- * FT_LOAD_NO_SCALE -- * FT_LOAD_NO_HINTING -- * FT_LOAD_NO_BITMAP -- * FT_LOAD_NO_AUTOHINT -- * FT_LOAD_COLOR -- * -- * FT_LOAD_VERTICAL_LAYOUT -- * FT_LOAD_IGNORE_TRANSFORM -- * FT_LOAD_FORCE_AUTOHINT -- * FT_LOAD_NO_RECURSE -- * FT_LOAD_PEDANTIC -- * -- * FT_LOAD_TARGET_NORMAL -- * FT_LOAD_TARGET_LIGHT -- * FT_LOAD_TARGET_MONO -- * FT_LOAD_TARGET_LCD -- * FT_LOAD_TARGET_LCD_V -- * -- * FT_LOAD_TARGET_MODE -- * -- * FT_Render_Glyph -- * FT_Render_Mode -- * FT_Get_Kerning -- * FT_Kerning_Mode -- * FT_Get_Track_Kerning -- * FT_Get_Glyph_Name -- * FT_Get_Postscript_Name -- * -- * FT_CharMapRec -- * FT_Select_Charmap -- * FT_Set_Charmap -- * FT_Get_Charmap_Index -- * -- * FT_Get_FSType_Flags -- * FT_Get_SubGlyph_Info -- * -- * FT_Face_Internal -- * FT_Size_Internal -- * FT_Slot_Internal -- * -- * FT_FACE_FLAG_XXX -- * FT_STYLE_FLAG_XXX -- * FT_OPEN_XXX -- * FT_LOAD_XXX -- * FT_LOAD_TARGET_XXX -- * FT_SUBGLYPH_FLAG_XXX -- * FT_FSTYPE_XXX -- * -- * FT_HAS_FAST_GLYPHS -- * -- --************************************************************************* -- * -- * @struct: -- * FT_Glyph_Metrics -- * -- * @description: -- * A structure to model the metrics of a single glyph. The values are -- * expressed in 26.6 fractional pixel format; if the flag -- * @FT_LOAD_NO_SCALE has been used while loading the glyph, values are -- * expressed in font units instead. -- * -- * @fields: -- * width :: -- * The glyph's width. -- * -- * height :: -- * The glyph's height. -- * -- * horiBearingX :: -- * Left side bearing for horizontal layout. -- * -- * horiBearingY :: -- * Top side bearing for horizontal layout. -- * -- * horiAdvance :: -- * Advance width for horizontal layout. -- * -- * vertBearingX :: -- * Left side bearing for vertical layout. -- * -- * vertBearingY :: -- * Top side bearing for vertical layout. Larger positive values mean -- * further below the vertical glyph origin. -- * -- * vertAdvance :: -- * Advance height for vertical layout. Positive values mean the glyph -- * has a positive advance downward. -- * -- * @note: -- * If not disabled with @FT_LOAD_NO_HINTING, the values represent -- * dimensions of the hinted glyph (in case hinting is applicable). -- * -- * Stroking a glyph with an outside border does not increase -- * `horiAdvance` or `vertAdvance`; you have to manually adjust these -- * values to account for the added width and height. -- * -- * FreeType doesn't use the 'VORG' table data for CFF fonts because it -- * doesn't have an interface to quickly retrieve the glyph height. The -- * y~coordinate of the vertical origin can be simply computed as -- * `vertBearingY + height` after loading a glyph. -- type FT_Glyph_Metrics_u is record width : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:302 height : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:303 horiBearingX : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:305 horiBearingY : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:306 horiAdvance : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:307 vertBearingX : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:309 vertBearingY : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:310 vertAdvance : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:311 end record with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:300 subtype FT_Glyph_Metrics is FT_Glyph_Metrics_u; -- /usr/include/freetype2/freetype/freetype.h:313 --************************************************************************* -- * -- * @struct: -- * FT_Bitmap_Size -- * -- * @description: -- * This structure models the metrics of a bitmap strike (i.e., a set of -- * glyphs for a given point size and resolution) in a bitmap font. It is -- * used for the `available_sizes` field of @FT_Face. -- * -- * @fields: -- * height :: -- * The vertical distance, in pixels, between two consecutive baselines. -- * It is always positive. -- * -- * width :: -- * The average width, in pixels, of all glyphs in the strike. -- * -- * size :: -- * The nominal size of the strike in 26.6 fractional points. This -- * field is not very useful. -- * -- * x_ppem :: -- * The horizontal ppem (nominal width) in 26.6 fractional pixels. -- * -- * y_ppem :: -- * The vertical ppem (nominal height) in 26.6 fractional pixels. -- * -- * @note: -- * Windows FNT: -- * The nominal size given in a FNT font is not reliable. If the driver -- * finds it incorrect, it sets `size` to some calculated values, and -- * `x_ppem` and `y_ppem` to the pixel width and height given in the -- * font, respectively. -- * -- * TrueType embedded bitmaps: -- * `size`, `width`, and `height` values are not contained in the bitmap -- * strike itself. They are computed from the global font parameters. -- type FT_Bitmap_Size_u is record height : aliased fttypes.FT_Short; -- /usr/include/freetype2/freetype/freetype.h:357 width : aliased fttypes.FT_Short; -- /usr/include/freetype2/freetype/freetype.h:358 size : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:360 x_ppem : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:362 y_ppem : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:363 end record with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:355 subtype FT_Bitmap_Size is FT_Bitmap_Size_u; -- /usr/include/freetype2/freetype/freetype.h:365 --*********************************************************************** --*********************************************************************** -- -- O B J E C T C L A S S E S -- --*********************************************************************** --*********************************************************************** --************************************************************************* -- * -- * @type: -- * FT_Library -- * -- * @description: -- * A handle to a FreeType library instance. Each 'library' is completely -- * independent from the others; it is the 'root' of a set of objects like -- * fonts, faces, sizes, etc. -- * -- * It also embeds a memory manager (see @FT_Memory), as well as a -- * scan-line converter object (see @FT_Raster). -- * -- * [Since 2.5.6] In multi-threaded applications it is easiest to use one -- * `FT_Library` object per thread. In case this is too cumbersome, a -- * single `FT_Library` object across threads is possible also, as long as -- * a mutex lock is used around @FT_New_Face and @FT_Done_Face. -- * -- * @note: -- * Library objects are normally created by @FT_Init_FreeType, and -- * destroyed with @FT_Done_FreeType. If you need reference-counting -- * (cf. @FT_Reference_Library), use @FT_New_Library and @FT_Done_Library. -- type FT_LibraryRec_u is null record; -- incomplete struct type FT_Library is access all FT_LibraryRec_u; -- /usr/include/freetype2/freetype/freetype.h:399 --************************************************************************* -- * -- * @section: -- * module_management -- * -- --************************************************************************* -- * -- * @type: -- * FT_Module -- * -- * @description: -- * A handle to a given FreeType module object. A module can be a font -- * driver, a renderer, or anything else that provides services to the -- * former. -- type FT_ModuleRec_u is null record; -- incomplete struct type FT_Module is access all FT_ModuleRec_u; -- /usr/include/freetype2/freetype/freetype.h:419 --************************************************************************* -- * -- * @type: -- * FT_Driver -- * -- * @description: -- * A handle to a given FreeType font driver object. A font driver is a -- * module capable of creating faces from font files. -- type FT_DriverRec_u is null record; -- incomplete struct type FT_Driver is access all FT_DriverRec_u; -- /usr/include/freetype2/freetype/freetype.h:431 --************************************************************************* -- * -- * @type: -- * FT_Renderer -- * -- * @description: -- * A handle to a given FreeType renderer. A renderer is a module in -- * charge of converting a glyph's outline image to a bitmap. It supports -- * a single glyph image format, and one or more target surface depths. -- type FT_RendererRec_u is null record; -- incomplete struct type FT_Renderer is access all FT_RendererRec_u; -- /usr/include/freetype2/freetype/freetype.h:444 --************************************************************************* -- * -- * @section: -- * base_interface -- * -- --************************************************************************* -- * -- * @type: -- * FT_Face -- * -- * @description: -- * A handle to a typographic face object. A face object models a given -- * typeface, in a given style. -- * -- * @note: -- * A face object also owns a single @FT_GlyphSlot object, as well as one -- * or more @FT_Size objects. -- * -- * Use @FT_New_Face or @FT_Open_Face to create a new face object from a -- * given filepath or a custom input stream. -- * -- * Use @FT_Done_Face to destroy it (along with its slot and sizes). -- * -- * An `FT_Face` object can only be safely used from one thread at a time. -- * Similarly, creation and destruction of `FT_Face` with the same -- * @FT_Library object can only be done from one thread at a time. On the -- * other hand, functions like @FT_Load_Glyph and its siblings are -- * thread-safe and do not need the lock to be held as long as the same -- * `FT_Face` object is not used from multiple threads at the same time. -- * -- * @also: -- * See @FT_FaceRec for the publicly accessible fields of a given face -- * object. -- type FT_FaceRec_u; type FT_Face is access all FT_FaceRec_u; -- /usr/include/freetype2/freetype/freetype.h:483 --************************************************************************* -- * -- * @type: -- * FT_Size -- * -- * @description: -- * A handle to an object that models a face scaled to a given character -- * size. -- * -- * @note: -- * An @FT_Face has one _active_ @FT_Size object that is used by functions -- * like @FT_Load_Glyph to determine the scaling transformation that in -- * turn is used to load and hint glyphs and metrics. -- * -- * You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes, @FT_Request_Size -- * or even @FT_Select_Size to change the content (i.e., the scaling -- * values) of the active @FT_Size. -- * -- * You can use @FT_New_Size to create additional size objects for a given -- * @FT_Face, but they won't be used by other functions until you activate -- * it through @FT_Activate_Size. Only one size can be activated at any -- * given time per face. -- * -- * @also: -- * See @FT_SizeRec for the publicly accessible fields of a given size -- * object. -- type FT_SizeRec_u; type FT_Size is access all FT_SizeRec_u; -- /usr/include/freetype2/freetype/freetype.h:513 --************************************************************************* -- * -- * @type: -- * FT_GlyphSlot -- * -- * @description: -- * A handle to a given 'glyph slot'. A slot is a container that can hold -- * any of the glyphs contained in its parent face. -- * -- * In other words, each time you call @FT_Load_Glyph or @FT_Load_Char, -- * the slot's content is erased by the new glyph data, i.e., the glyph's -- * metrics, its image (bitmap or outline), and other control information. -- * -- * @also: -- * See @FT_GlyphSlotRec for the publicly accessible glyph fields. -- type FT_GlyphSlotRec_u; type FT_GlyphSlot is access all FT_GlyphSlotRec_u; -- /usr/include/freetype2/freetype/freetype.h:532 --************************************************************************* -- * -- * @type: -- * FT_CharMap -- * -- * @description: -- * A handle to a character map (usually abbreviated to 'charmap'). A -- * charmap is used to translate character codes in a given encoding into -- * glyph indexes for its parent's face. Some font formats may provide -- * several charmaps per font. -- * -- * Each face object owns zero or more charmaps, but only one of them can -- * be 'active', providing the data used by @FT_Get_Char_Index or -- * @FT_Load_Char. -- * -- * The list of available charmaps in a face is available through the -- * `face->num_charmaps` and `face->charmaps` fields of @FT_FaceRec. -- * -- * The currently active charmap is available as `face->charmap`. You -- * should call @FT_Set_Charmap to change it. -- * -- * @note: -- * When a new face is created (either through @FT_New_Face or -- * @FT_Open_Face), the library looks for a Unicode charmap within the -- * list and automatically activates it. If there is no Unicode charmap, -- * FreeType doesn't set an 'active' charmap. -- * -- * @also: -- * See @FT_CharMapRec for the publicly accessible fields of a given -- * character map. -- type FT_CharMapRec_u; type FT_CharMap is access all FT_CharMapRec_u; -- /usr/include/freetype2/freetype/freetype.h:566 --************************************************************************* -- * -- * @macro: -- * FT_ENC_TAG -- * -- * @description: -- * This macro converts four-letter tags into an unsigned long. It is -- * used to define 'encoding' identifiers (see @FT_Encoding). -- * -- * @note: -- * Since many 16-bit compilers don't like 32-bit enumerations, you should -- * redefine this macro in case of problems to something like this: -- * -- * ``` -- * #define FT_ENC_TAG( value, a, b, c, d ) value -- * ``` -- * -- * to get a simple enumeration without assigning special numbers. -- --************************************************************************* -- * -- * @enum: -- * FT_Encoding -- * -- * @description: -- * An enumeration to specify character sets supported by charmaps. Used -- * in the @FT_Select_Charmap API function. -- * -- * @note: -- * Despite the name, this enumeration lists specific character -- * repertories (i.e., charsets), and not text encoding methods (e.g., -- * UTF-8, UTF-16, etc.). -- * -- * Other encodings might be defined in the future. -- * -- * @values: -- * FT_ENCODING_NONE :: -- * The encoding value~0 is reserved for all formats except BDF, PCF, -- * and Windows FNT; see below for more information. -- * -- * FT_ENCODING_UNICODE :: -- * The Unicode character set. This value covers all versions of the -- * Unicode repertoire, including ASCII and Latin-1. Most fonts include -- * a Unicode charmap, but not all of them. -- * -- * For example, if you want to access Unicode value U+1F028 (and the -- * font contains it), use value 0x1F028 as the input value for -- * @FT_Get_Char_Index. -- * -- * FT_ENCODING_MS_SYMBOL :: -- * Microsoft Symbol encoding, used to encode mathematical symbols and -- * wingdings. For more information, see -- * 'https://www.microsoft.com/typography/otspec/recom.htm#non-standard-symbol-fonts', -- * 'http://www.kostis.net/charsets/symbol.htm', and -- * 'http://www.kostis.net/charsets/wingding.htm'. -- * -- * This encoding uses character codes from the PUA (Private Unicode -- * Area) in the range U+F020-U+F0FF. -- * -- * FT_ENCODING_SJIS :: -- * Shift JIS encoding for Japanese. More info at -- * 'https://en.wikipedia.org/wiki/Shift_JIS'. See note on multi-byte -- * encodings below. -- * -- * FT_ENCODING_PRC :: -- * Corresponds to encoding systems mainly for Simplified Chinese as -- * used in People's Republic of China (PRC). The encoding layout is -- * based on GB~2312 and its supersets GBK and GB~18030. -- * -- * FT_ENCODING_BIG5 :: -- * Corresponds to an encoding system for Traditional Chinese as used in -- * Taiwan and Hong Kong. -- * -- * FT_ENCODING_WANSUNG :: -- * Corresponds to the Korean encoding system known as Extended Wansung -- * (MS Windows code page 949). For more information see -- * 'https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt'. -- * -- * FT_ENCODING_JOHAB :: -- * The Korean standard character set (KS~C 5601-1992), which -- * corresponds to MS Windows code page 1361. This character set -- * includes all possible Hangul character combinations. -- * -- * FT_ENCODING_ADOBE_LATIN_1 :: -- * Corresponds to a Latin-1 encoding as defined in a Type~1 PostScript -- * font. It is limited to 256 character codes. -- * -- * FT_ENCODING_ADOBE_STANDARD :: -- * Adobe Standard encoding, as found in Type~1, CFF, and OpenType/CFF -- * fonts. It is limited to 256 character codes. -- * -- * FT_ENCODING_ADOBE_EXPERT :: -- * Adobe Expert encoding, as found in Type~1, CFF, and OpenType/CFF -- * fonts. It is limited to 256 character codes. -- * -- * FT_ENCODING_ADOBE_CUSTOM :: -- * Corresponds to a custom encoding, as found in Type~1, CFF, and -- * OpenType/CFF fonts. It is limited to 256 character codes. -- * -- * FT_ENCODING_APPLE_ROMAN :: -- * Apple roman encoding. Many TrueType and OpenType fonts contain a -- * charmap for this 8-bit encoding, since older versions of Mac OS are -- * able to use it. -- * -- * FT_ENCODING_OLD_LATIN_2 :: -- * This value is deprecated and was neither used nor reported by -- * FreeType. Don't use or test for it. -- * -- * FT_ENCODING_MS_SJIS :: -- * Same as FT_ENCODING_SJIS. Deprecated. -- * -- * FT_ENCODING_MS_GB2312 :: -- * Same as FT_ENCODING_PRC. Deprecated. -- * -- * FT_ENCODING_MS_BIG5 :: -- * Same as FT_ENCODING_BIG5. Deprecated. -- * -- * FT_ENCODING_MS_WANSUNG :: -- * Same as FT_ENCODING_WANSUNG. Deprecated. -- * -- * FT_ENCODING_MS_JOHAB :: -- * Same as FT_ENCODING_JOHAB. Deprecated. -- * -- * @note: -- * By default, FreeType enables a Unicode charmap and tags it with -- * `FT_ENCODING_UNICODE` when it is either provided or can be generated -- * from PostScript glyph name dictionaries in the font file. All other -- * encodings are considered legacy and tagged only if explicitly defined -- * in the font file. Otherwise, `FT_ENCODING_NONE` is used. -- * -- * `FT_ENCODING_NONE` is set by the BDF and PCF drivers if the charmap is -- * neither Unicode nor ISO-8859-1 (otherwise it is set to -- * `FT_ENCODING_UNICODE`). Use @FT_Get_BDF_Charset_ID to find out which -- * encoding is really present. If, for example, the `cs_registry` field -- * is 'KOI8' and the `cs_encoding` field is 'R', the font is encoded in -- * KOI8-R. -- * -- * `FT_ENCODING_NONE` is always set (with a single exception) by the -- * winfonts driver. Use @FT_Get_WinFNT_Header and examine the `charset` -- * field of the @FT_WinFNT_HeaderRec structure to find out which encoding -- * is really present. For example, @FT_WinFNT_ID_CP1251 (204) means -- * Windows code page 1251 (for Russian). -- * -- * `FT_ENCODING_NONE` is set if `platform_id` is @TT_PLATFORM_MACINTOSH -- * and `encoding_id` is not `TT_MAC_ID_ROMAN` (otherwise it is set to -- * `FT_ENCODING_APPLE_ROMAN`). -- * -- * If `platform_id` is @TT_PLATFORM_MACINTOSH, use the function -- * @FT_Get_CMap_Language_ID to query the Mac language ID that may be -- * needed to be able to distinguish Apple encoding variants. See -- * -- * https://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt -- * -- * to get an idea how to do that. Basically, if the language ID is~0, -- * don't use it, otherwise subtract 1 from the language ID. Then examine -- * `encoding_id`. If, for example, `encoding_id` is `TT_MAC_ID_ROMAN` -- * and the language ID (minus~1) is `TT_MAC_LANGID_GREEK`, it is the -- * Greek encoding, not Roman. `TT_MAC_ID_ARABIC` with -- * `TT_MAC_LANGID_FARSI` means the Farsi variant the Arabic encoding. -- subtype FT_Encoding_u is unsigned; FT_ENCODING_NONE : constant unsigned := 0; FT_ENCODING_MS_SYMBOL : constant unsigned := 1937337698; FT_ENCODING_UNICODE : constant unsigned := 1970170211; FT_ENCODING_SJIS : constant unsigned := 1936353651; FT_ENCODING_PRC : constant unsigned := 1734484000; FT_ENCODING_BIG5 : constant unsigned := 1651074869; FT_ENCODING_WANSUNG : constant unsigned := 2002873971; FT_ENCODING_JOHAB : constant unsigned := 1785686113; FT_ENCODING_GB2312 : constant unsigned := 1734484000; FT_ENCODING_MS_SJIS : constant unsigned := 1936353651; FT_ENCODING_MS_GB2312 : constant unsigned := 1734484000; FT_ENCODING_MS_BIG5 : constant unsigned := 1651074869; FT_ENCODING_MS_WANSUNG : constant unsigned := 2002873971; FT_ENCODING_MS_JOHAB : constant unsigned := 1785686113; FT_ENCODING_ADOBE_STANDARD : constant unsigned := 1094995778; FT_ENCODING_ADOBE_EXPERT : constant unsigned := 1094992453; FT_ENCODING_ADOBE_CUSTOM : constant unsigned := 1094992451; FT_ENCODING_ADOBE_LATIN_1 : constant unsigned := 1818326065; FT_ENCODING_OLD_LATIN_2 : constant unsigned := 1818326066; FT_ENCODING_APPLE_ROMAN : constant unsigned := 1634889070; -- /usr/include/freetype2/freetype/freetype.h:740 -- for backward compatibility subtype FT_Encoding is FT_Encoding_u; -- /usr/include/freetype2/freetype/freetype.h:770 -- these constants are deprecated; use the corresponding `FT_Encoding` -- values instead --************************************************************************* -- * -- * @struct: -- * FT_CharMapRec -- * -- * @description: -- * The base charmap structure. -- * -- * @fields: -- * face :: -- * A handle to the parent face object. -- * -- * encoding :: -- * An @FT_Encoding tag identifying the charmap. Use this with -- * @FT_Select_Charmap. -- * -- * platform_id :: -- * An ID number describing the platform for the following encoding ID. -- * This comes directly from the TrueType specification and gets -- * emulated for other formats. -- * -- * encoding_id :: -- * A platform-specific encoding number. This also comes from the -- * TrueType specification and gets emulated similarly. -- type FT_CharMapRec_u is record face : FT_Face; -- /usr/include/freetype2/freetype/freetype.h:819 encoding : aliased FT_Encoding; -- /usr/include/freetype2/freetype/freetype.h:820 platform_id : aliased fttypes.FT_UShort; -- /usr/include/freetype2/freetype/freetype.h:821 encoding_id : aliased fttypes.FT_UShort; -- /usr/include/freetype2/freetype/freetype.h:822 end record with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:817 subtype FT_CharMapRec is FT_CharMapRec_u; -- /usr/include/freetype2/freetype/freetype.h:824 --*********************************************************************** --*********************************************************************** -- -- B A S E O B J E C T C L A S S E S -- --*********************************************************************** --*********************************************************************** --************************************************************************* -- * -- * @type: -- * FT_Face_Internal -- * -- * @description: -- * An opaque handle to an `FT_Face_InternalRec` structure that models the -- * private data of a given @FT_Face object. -- * -- * This structure might change between releases of FreeType~2 and is not -- * generally available to client applications. -- type FT_Face_InternalRec_u is null record; -- incomplete struct type FT_Face_Internal is access all FT_Face_InternalRec_u; -- /usr/include/freetype2/freetype/freetype.h:848 --************************************************************************* -- * -- * @struct: -- * FT_FaceRec -- * -- * @description: -- * FreeType root face class structure. A face object models a typeface -- * in a font file. -- * -- * @fields: -- * num_faces :: -- * The number of faces in the font file. Some font formats can have -- * multiple faces in a single font file. -- * -- * face_index :: -- * This field holds two different values. Bits 0-15 are the index of -- * the face in the font file (starting with value~0). They are set -- * to~0 if there is only one face in the font file. -- * -- * [Since 2.6.1] Bits 16-30 are relevant to GX and OpenType variation -- * fonts only, holding the named instance index for the current face -- * index (starting with value~1; value~0 indicates font access without -- * a named instance). For non-variation fonts, bits 16-30 are ignored. -- * If we have the third named instance of face~4, say, `face_index` is -- * set to 0x00030004. -- * -- * Bit 31 is always zero (this is, `face_index` is always a positive -- * value). -- * -- * [Since 2.9] Changing the design coordinates with -- * @FT_Set_Var_Design_Coordinates or @FT_Set_Var_Blend_Coordinates does -- * not influence the named instance index value (only -- * @FT_Set_Named_Instance does that). -- * -- * face_flags :: -- * A set of bit flags that give important information about the face; -- * see @FT_FACE_FLAG_XXX for the details. -- * -- * style_flags :: -- * The lower 16~bits contain a set of bit flags indicating the style of -- * the face; see @FT_STYLE_FLAG_XXX for the details. -- * -- * [Since 2.6.1] Bits 16-30 hold the number of named instances -- * available for the current face if we have a GX or OpenType variation -- * (sub)font. Bit 31 is always zero (this is, `style_flags` is always -- * a positive value). Note that a variation font has always at least -- * one named instance, namely the default instance. -- * -- * num_glyphs :: -- * The number of glyphs in the face. If the face is scalable and has -- * sbits (see `num_fixed_sizes`), it is set to the number of outline -- * glyphs. -- * -- * For CID-keyed fonts (not in an SFNT wrapper) this value gives the -- * highest CID used in the font. -- * -- * family_name :: -- * The face's family name. This is an ASCII string, usually in -- * English, that describes the typeface's family (like 'Times New -- * Roman', 'Bodoni', 'Garamond', etc). This is a least common -- * denominator used to list fonts. Some formats (TrueType & OpenType) -- * provide localized and Unicode versions of this string. Applications -- * should use the format-specific interface to access them. Can be -- * `NULL` (e.g., in fonts embedded in a PDF file). -- * -- * In case the font doesn't provide a specific family name entry, -- * FreeType tries to synthesize one, deriving it from other name -- * entries. -- * -- * style_name :: -- * The face's style name. This is an ASCII string, usually in English, -- * that describes the typeface's style (like 'Italic', 'Bold', -- * 'Condensed', etc). Not all font formats provide a style name, so -- * this field is optional, and can be set to `NULL`. As for -- * `family_name`, some formats provide localized and Unicode versions -- * of this string. Applications should use the format-specific -- * interface to access them. -- * -- * num_fixed_sizes :: -- * The number of bitmap strikes in the face. Even if the face is -- * scalable, there might still be bitmap strikes, which are called -- * 'sbits' in that case. -- * -- * available_sizes :: -- * An array of @FT_Bitmap_Size for all bitmap strikes in the face. It -- * is set to `NULL` if there is no bitmap strike. -- * -- * Note that FreeType tries to sanitize the strike data since they are -- * sometimes sloppy or incorrect, but this can easily fail. -- * -- * num_charmaps :: -- * The number of charmaps in the face. -- * -- * charmaps :: -- * An array of the charmaps of the face. -- * -- * generic :: -- * A field reserved for client uses. See the @FT_Generic type -- * description. -- * -- * bbox :: -- * The font bounding box. Coordinates are expressed in font units (see -- * `units_per_EM`). The box is large enough to contain any glyph from -- * the font. Thus, `bbox.yMax` can be seen as the 'maximum ascender', -- * and `bbox.yMin` as the 'minimum descender'. Only relevant for -- * scalable formats. -- * -- * Note that the bounding box might be off by (at least) one pixel for -- * hinted fonts. See @FT_Size_Metrics for further discussion. -- * -- * Note that the bounding box does not vary in OpenType variable fonts -- * and should only be used in relation to the default instance. -- * -- * units_per_EM :: -- * The number of font units per EM square for this face. This is -- * typically 2048 for TrueType fonts, and 1000 for Type~1 fonts. Only -- * relevant for scalable formats. -- * -- * ascender :: -- * The typographic ascender of the face, expressed in font units. For -- * font formats not having this information, it is set to `bbox.yMax`. -- * Only relevant for scalable formats. -- * -- * descender :: -- * The typographic descender of the face, expressed in font units. For -- * font formats not having this information, it is set to `bbox.yMin`. -- * Note that this field is negative for values below the baseline. -- * Only relevant for scalable formats. -- * -- * height :: -- * This value is the vertical distance between two consecutive -- * baselines, expressed in font units. It is always positive. Only -- * relevant for scalable formats. -- * -- * If you want the global glyph height, use `ascender - descender`. -- * -- * max_advance_width :: -- * The maximum advance width, in font units, for all glyphs in this -- * face. This can be used to make word wrapping computations faster. -- * Only relevant for scalable formats. -- * -- * max_advance_height :: -- * The maximum advance height, in font units, for all glyphs in this -- * face. This is only relevant for vertical layouts, and is set to -- * `height` for fonts that do not provide vertical metrics. Only -- * relevant for scalable formats. -- * -- * underline_position :: -- * The position, in font units, of the underline line for this face. -- * It is the center of the underlining stem. Only relevant for -- * scalable formats. -- * -- * underline_thickness :: -- * The thickness, in font units, of the underline for this face. Only -- * relevant for scalable formats. -- * -- * glyph :: -- * The face's associated glyph slot(s). -- * -- * size :: -- * The current active size for this face. -- * -- * charmap :: -- * The current active charmap for this face. -- * -- * @note: -- * Fields may be changed after a call to @FT_Attach_File or -- * @FT_Attach_Stream. -- * -- * For an OpenType variation font, the values of the following fields can -- * change after a call to @FT_Set_Var_Design_Coordinates (and friends) if -- * the font contains an 'MVAR' table: `ascender`, `descender`, `height`, -- * `underline_position`, and `underline_thickness`. -- * -- * Especially for TrueType fonts see also the documentation for -- * @FT_Size_Metrics. -- -- Troodon: change type of available_sizes to Address for easier use type FT_FaceRec_u is record num_faces : aliased fttypes.FT_Long; -- /usr/include/freetype2/freetype/freetype.h:1030 face_index : aliased fttypes.FT_Long; -- /usr/include/freetype2/freetype/freetype.h:1031 face_flags : aliased fttypes.FT_Long; -- /usr/include/freetype2/freetype/freetype.h:1033 style_flags : aliased fttypes.FT_Long; -- /usr/include/freetype2/freetype/freetype.h:1034 num_glyphs : aliased fttypes.FT_Long; -- /usr/include/freetype2/freetype/freetype.h:1036 family_name : access fttypes.FT_String; -- /usr/include/freetype2/freetype/freetype.h:1038 style_name : access fttypes.FT_String; -- /usr/include/freetype2/freetype/freetype.h:1039 num_fixed_sizes : aliased fttypes.FT_Int; -- /usr/include/freetype2/freetype/freetype.h:1041 available_sizes : System.Address; --access FT_Bitmap_Size; -- /usr/include/freetype2/freetype/freetype.h:1042 num_charmaps : aliased fttypes.FT_Int; -- /usr/include/freetype2/freetype/freetype.h:1044 charmaps : System.Address; -- /usr/include/freetype2/freetype/freetype.h:1045 c_generic : aliased fttypes.FT_Generic; -- /usr/include/freetype2/freetype/freetype.h:1047 bbox : aliased ftimage.FT_BBox; -- /usr/include/freetype2/freetype/freetype.h:1052 units_per_EM : aliased fttypes.FT_UShort; -- /usr/include/freetype2/freetype/freetype.h:1054 ascender : aliased fttypes.FT_Short; -- /usr/include/freetype2/freetype/freetype.h:1055 descender : aliased fttypes.FT_Short; -- /usr/include/freetype2/freetype/freetype.h:1056 height : aliased fttypes.FT_Short; -- /usr/include/freetype2/freetype/freetype.h:1057 max_advance_width : aliased fttypes.FT_Short; -- /usr/include/freetype2/freetype/freetype.h:1059 max_advance_height : aliased fttypes.FT_Short; -- /usr/include/freetype2/freetype/freetype.h:1060 underline_position : aliased fttypes.FT_Short; -- /usr/include/freetype2/freetype/freetype.h:1062 underline_thickness : aliased fttypes.FT_Short; -- /usr/include/freetype2/freetype/freetype.h:1063 glyph : FT_GlyphSlot; -- /usr/include/freetype2/freetype/freetype.h:1065 size : FT_Size; -- /usr/include/freetype2/freetype/freetype.h:1066 charmap : FT_CharMap; -- /usr/include/freetype2/freetype/freetype.h:1067 driver : FT_Driver; -- /usr/include/freetype2/freetype/freetype.h:1071 memory : ftsystem.FT_Memory; -- /usr/include/freetype2/freetype/freetype.h:1072 stream : ftsystem.FT_Stream; -- /usr/include/freetype2/freetype/freetype.h:1073 sizes_list : aliased fttypes.FT_ListRec; -- /usr/include/freetype2/freetype/freetype.h:1075 autohint : aliased fttypes.FT_Generic; -- /usr/include/freetype2/freetype/freetype.h:1077 extensions : System.Address; -- /usr/include/freetype2/freetype/freetype.h:1078 internal : FT_Face_Internal; -- /usr/include/freetype2/freetype/freetype.h:1080 end record with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:1028 --# The following member variables (down to `underline_thickness`) --# are only relevant to scalable outlines; cf. @FT_Bitmap_Size --# for bitmap fonts. --@private begin -- face-specific auto-hinter data -- unused --@private end subtype FT_FaceRec is FT_FaceRec_u; -- /usr/include/freetype2/freetype/freetype.h:1084 --************************************************************************* -- * -- * @enum: -- * FT_FACE_FLAG_XXX -- * -- * @description: -- * A list of bit flags used in the `face_flags` field of the @FT_FaceRec -- * structure. They inform client applications of properties of the -- * corresponding face. -- * -- * @values: -- * FT_FACE_FLAG_SCALABLE :: -- * The face contains outline glyphs. Note that a face can contain -- * bitmap strikes also, i.e., a face can have both this flag and -- * @FT_FACE_FLAG_FIXED_SIZES set. -- * -- * FT_FACE_FLAG_FIXED_SIZES :: -- * The face contains bitmap strikes. See also the `num_fixed_sizes` -- * and `available_sizes` fields of @FT_FaceRec. -- * -- * FT_FACE_FLAG_FIXED_WIDTH :: -- * The face contains fixed-width characters (like Courier, Lucida, -- * MonoType, etc.). -- * -- * FT_FACE_FLAG_SFNT :: -- * The face uses the SFNT storage scheme. For now, this means TrueType -- * and OpenType. -- * -- * FT_FACE_FLAG_HORIZONTAL :: -- * The face contains horizontal glyph metrics. This should be set for -- * all common formats. -- * -- * FT_FACE_FLAG_VERTICAL :: -- * The face contains vertical glyph metrics. This is only available in -- * some formats, not all of them. -- * -- * FT_FACE_FLAG_KERNING :: -- * The face contains kerning information. If set, the kerning distance -- * can be retrieved using the function @FT_Get_Kerning. Otherwise the -- * function always return the vector (0,0). Note that FreeType doesn't -- * handle kerning data from the SFNT 'GPOS' table (as present in many -- * OpenType fonts). -- * -- * FT_FACE_FLAG_FAST_GLYPHS :: -- * THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT. -- * -- * FT_FACE_FLAG_MULTIPLE_MASTERS :: -- * The face contains multiple masters and is capable of interpolating -- * between them. Supported formats are Adobe MM, TrueType GX, and -- * OpenType variation fonts. -- * -- * See section @multiple_masters for API details. -- * -- * FT_FACE_FLAG_GLYPH_NAMES :: -- * The face contains glyph names, which can be retrieved using -- * @FT_Get_Glyph_Name. Note that some TrueType fonts contain broken -- * glyph name tables. Use the function @FT_Has_PS_Glyph_Names when -- * needed. -- * -- * FT_FACE_FLAG_EXTERNAL_STREAM :: -- * Used internally by FreeType to indicate that a face's stream was -- * provided by the client application and should not be destroyed when -- * @FT_Done_Face is called. Don't read or test this flag. -- * -- * FT_FACE_FLAG_HINTER :: -- * The font driver has a hinting machine of its own. For example, with -- * TrueType fonts, it makes sense to use data from the SFNT 'gasp' -- * table only if the native TrueType hinting engine (with the bytecode -- * interpreter) is available and active. -- * -- * FT_FACE_FLAG_CID_KEYED :: -- * The face is CID-keyed. In that case, the face is not accessed by -- * glyph indices but by CID values. For subsetted CID-keyed fonts this -- * has the consequence that not all index values are a valid argument -- * to @FT_Load_Glyph. Only the CID values for which corresponding -- * glyphs in the subsetted font exist make `FT_Load_Glyph` return -- * successfully; in all other cases you get an -- * `FT_Err_Invalid_Argument` error. -- * -- * Note that CID-keyed fonts that are in an SFNT wrapper (this is, all -- * OpenType/CFF fonts) don't have this flag set since the glyphs are -- * accessed in the normal way (using contiguous indices); the -- * 'CID-ness' isn't visible to the application. -- * -- * FT_FACE_FLAG_TRICKY :: -- * The face is 'tricky', this is, it always needs the font format's -- * native hinting engine to get a reasonable result. A typical example -- * is the old Chinese font `mingli.ttf` (but not `mingliu.ttc`) that -- * uses TrueType bytecode instructions to move and scale all of its -- * subglyphs. -- * -- * It is not possible to auto-hint such fonts using -- * @FT_LOAD_FORCE_AUTOHINT; it will also ignore @FT_LOAD_NO_HINTING. -- * You have to set both @FT_LOAD_NO_HINTING and @FT_LOAD_NO_AUTOHINT to -- * really disable hinting; however, you probably never want this except -- * for demonstration purposes. -- * -- * Currently, there are about a dozen TrueType fonts in the list of -- * tricky fonts; they are hard-coded in file `ttobjs.c`. -- * -- * FT_FACE_FLAG_COLOR :: -- * [Since 2.5.1] The face has color glyph tables. See @FT_LOAD_COLOR -- * for more information. -- * -- * FT_FACE_FLAG_VARIATION :: -- * [Since 2.9] Set if the current face (or named instance) has been -- * altered with @FT_Set_MM_Design_Coordinates, -- * @FT_Set_Var_Design_Coordinates, or @FT_Set_Var_Blend_Coordinates. -- * This flag is unset by a call to @FT_Set_Named_Instance. -- --************************************************************************* -- * -- * @macro: -- * FT_HAS_HORIZONTAL -- * -- * @description: -- * A macro that returns true whenever a face object contains horizontal -- * metrics (this is true for all font formats though). -- * -- * @also: -- * @FT_HAS_VERTICAL can be used to check for vertical metrics. -- * -- --************************************************************************* -- * -- * @macro: -- * FT_HAS_VERTICAL -- * -- * @description: -- * A macro that returns true whenever a face object contains real -- * vertical metrics (and not only synthesized ones). -- * -- --************************************************************************* -- * -- * @macro: -- * FT_HAS_KERNING -- * -- * @description: -- * A macro that returns true whenever a face object contains kerning data -- * that can be accessed with @FT_Get_Kerning. -- * -- --************************************************************************* -- * -- * @macro: -- * FT_IS_SCALABLE -- * -- * @description: -- * A macro that returns true whenever a face object contains a scalable -- * font face (true for TrueType, Type~1, Type~42, CID, OpenType/CFF, and -- * PFR font formats). -- * -- --************************************************************************* -- * -- * @macro: -- * FT_IS_SFNT -- * -- * @description: -- * A macro that returns true whenever a face object contains a font whose -- * format is based on the SFNT storage scheme. This usually means: -- * TrueType fonts, OpenType fonts, as well as SFNT-based embedded bitmap -- * fonts. -- * -- * If this macro is true, all functions defined in @FT_SFNT_NAMES_H and -- * @FT_TRUETYPE_TABLES_H are available. -- * -- --************************************************************************* -- * -- * @macro: -- * FT_IS_FIXED_WIDTH -- * -- * @description: -- * A macro that returns true whenever a face object contains a font face -- * that contains fixed-width (or 'monospace', 'fixed-pitch', etc.) -- * glyphs. -- * -- --************************************************************************* -- * -- * @macro: -- * FT_HAS_FIXED_SIZES -- * -- * @description: -- * A macro that returns true whenever a face object contains some -- * embedded bitmaps. See the `available_sizes` field of the @FT_FaceRec -- * structure. -- * -- --************************************************************************* -- * -- * @macro: -- * FT_HAS_FAST_GLYPHS -- * -- * @description: -- * Deprecated. -- * -- --************************************************************************* -- * -- * @macro: -- * FT_HAS_GLYPH_NAMES -- * -- * @description: -- * A macro that returns true whenever a face object contains some glyph -- * names that can be accessed through @FT_Get_Glyph_Name. -- * -- --************************************************************************* -- * -- * @macro: -- * FT_HAS_MULTIPLE_MASTERS -- * -- * @description: -- * A macro that returns true whenever a face object contains some -- * multiple masters. The functions provided by @FT_MULTIPLE_MASTERS_H -- * are then available to choose the exact design you want. -- * -- --************************************************************************* -- * -- * @macro: -- * FT_IS_NAMED_INSTANCE -- * -- * @description: -- * A macro that returns true whenever a face object is a named instance -- * of a GX or OpenType variation font. -- * -- * [Since 2.9] Changing the design coordinates with -- * @FT_Set_Var_Design_Coordinates or @FT_Set_Var_Blend_Coordinates does -- * not influence the return value of this macro (only -- * @FT_Set_Named_Instance does that). -- * -- * @since: -- * 2.7 -- * -- --************************************************************************* -- * -- * @macro: -- * FT_IS_VARIATION -- * -- * @description: -- * A macro that returns true whenever a face object has been altered by -- * @FT_Set_MM_Design_Coordinates, @FT_Set_Var_Design_Coordinates, or -- * @FT_Set_Var_Blend_Coordinates. -- * -- * @since: -- * 2.9 -- * -- --************************************************************************* -- * -- * @macro: -- * FT_IS_CID_KEYED -- * -- * @description: -- * A macro that returns true whenever a face object contains a CID-keyed -- * font. See the discussion of @FT_FACE_FLAG_CID_KEYED for more details. -- * -- * If this macro is true, all functions defined in @FT_CID_H are -- * available. -- * -- --************************************************************************* -- * -- * @macro: -- * FT_IS_TRICKY -- * -- * @description: -- * A macro that returns true whenever a face represents a 'tricky' font. -- * See the discussion of @FT_FACE_FLAG_TRICKY for more details. -- * -- --************************************************************************* -- * -- * @macro: -- * FT_HAS_COLOR -- * -- * @description: -- * A macro that returns true whenever a face object contains tables for -- * color glyphs. -- * -- * @since: -- * 2.5.1 -- * -- --************************************************************************* -- * -- * @enum: -- * FT_STYLE_FLAG_XXX -- * -- * @description: -- * A list of bit flags to indicate the style of a given face. These are -- * used in the `style_flags` field of @FT_FaceRec. -- * -- * @values: -- * FT_STYLE_FLAG_ITALIC :: -- * The face style is italic or oblique. -- * -- * FT_STYLE_FLAG_BOLD :: -- * The face is bold. -- * -- * @note: -- * The style information as provided by FreeType is very basic. More -- * details are beyond the scope and should be done on a higher level (for -- * example, by analyzing various fields of the 'OS/2' table in SFNT based -- * fonts). -- --************************************************************************* -- * -- * @type: -- * FT_Size_Internal -- * -- * @description: -- * An opaque handle to an `FT_Size_InternalRec` structure, used to model -- * private data of a given @FT_Size object. -- type FT_Size_InternalRec_u is null record; -- incomplete struct type FT_Size_Internal is access all FT_Size_InternalRec_u; -- /usr/include/freetype2/freetype/freetype.h:1488 --************************************************************************* -- * -- * @struct: -- * FT_Size_Metrics -- * -- * @description: -- * The size metrics structure gives the metrics of a size object. -- * -- * @fields: -- * x_ppem :: -- * The width of the scaled EM square in pixels, hence the term 'ppem' -- * (pixels per EM). It is also referred to as 'nominal width'. -- * -- * y_ppem :: -- * The height of the scaled EM square in pixels, hence the term 'ppem' -- * (pixels per EM). It is also referred to as 'nominal height'. -- * -- * x_scale :: -- * A 16.16 fractional scaling value to convert horizontal metrics from -- * font units to 26.6 fractional pixels. Only relevant for scalable -- * font formats. -- * -- * y_scale :: -- * A 16.16 fractional scaling value to convert vertical metrics from -- * font units to 26.6 fractional pixels. Only relevant for scalable -- * font formats. -- * -- * ascender :: -- * The ascender in 26.6 fractional pixels, rounded up to an integer -- * value. See @FT_FaceRec for the details. -- * -- * descender :: -- * The descender in 26.6 fractional pixels, rounded down to an integer -- * value. See @FT_FaceRec for the details. -- * -- * height :: -- * The height in 26.6 fractional pixels, rounded to an integer value. -- * See @FT_FaceRec for the details. -- * -- * max_advance :: -- * The maximum advance width in 26.6 fractional pixels, rounded to an -- * integer value. See @FT_FaceRec for the details. -- * -- * @note: -- * The scaling values, if relevant, are determined first during a size -- * changing operation. The remaining fields are then set by the driver. -- * For scalable formats, they are usually set to scaled values of the -- * corresponding fields in @FT_FaceRec. Some values like ascender or -- * descender are rounded for historical reasons; more precise values (for -- * outline fonts) can be derived by scaling the corresponding @FT_FaceRec -- * values manually, with code similar to the following. -- * -- * ``` -- * scaled_ascender = FT_MulFix( face->ascender, -- * size_metrics->y_scale ); -- * ``` -- * -- * Note that due to glyph hinting and the selected rendering mode these -- * values are usually not exact; consequently, they must be treated as -- * unreliable with an error margin of at least one pixel! -- * -- * Indeed, the only way to get the exact metrics is to render _all_ -- * glyphs. As this would be a definite performance hit, it is up to -- * client applications to perform such computations. -- * -- * The `FT_Size_Metrics` structure is valid for bitmap fonts also. -- * -- * -- * **TrueType fonts with native bytecode hinting** -- * -- * All applications that handle TrueType fonts with native hinting must -- * be aware that TTFs expect different rounding of vertical font -- * dimensions. The application has to cater for this, especially if it -- * wants to rely on a TTF's vertical data (for example, to properly align -- * box characters vertically). -- * -- * Only the application knows _in advance_ that it is going to use native -- * hinting for TTFs! FreeType, on the other hand, selects the hinting -- * mode not at the time of creating an @FT_Size object but much later, -- * namely while calling @FT_Load_Glyph. -- * -- * Here is some pseudo code that illustrates a possible solution. -- * -- * ``` -- * font_format = FT_Get_Font_Format( face ); -- * -- * if ( !strcmp( font_format, "TrueType" ) && -- * do_native_bytecode_hinting ) -- * { -- * ascender = ROUND( FT_MulFix( face->ascender, -- * size_metrics->y_scale ) ); -- * descender = ROUND( FT_MulFix( face->descender, -- * size_metrics->y_scale ) ); -- * } -- * else -- * { -- * ascender = size_metrics->ascender; -- * descender = size_metrics->descender; -- * } -- * -- * height = size_metrics->height; -- * max_advance = size_metrics->max_advance; -- * ``` -- -- horizontal pixels per EM type FT_Size_Metrics_u is record x_ppem : aliased fttypes.FT_UShort; -- /usr/include/freetype2/freetype/freetype.h:1597 y_ppem : aliased fttypes.FT_UShort; -- /usr/include/freetype2/freetype/freetype.h:1598 x_scale : aliased fttypes.FT_Fixed; -- /usr/include/freetype2/freetype/freetype.h:1600 y_scale : aliased fttypes.FT_Fixed; -- /usr/include/freetype2/freetype/freetype.h:1601 ascender : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:1603 descender : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:1604 height : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:1605 max_advance : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:1606 end record with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:1595 -- vertical pixels per EM -- scaling values used to convert font -- units to 26.6 fractional pixels -- ascender in 26.6 frac. pixels -- descender in 26.6 frac. pixels -- text height in 26.6 frac. pixels -- max horizontal advance, in 26.6 pixels subtype FT_Size_Metrics is FT_Size_Metrics_u; -- /usr/include/freetype2/freetype/freetype.h:1608 --************************************************************************* -- * -- * @struct: -- * FT_SizeRec -- * -- * @description: -- * FreeType root size class structure. A size object models a face -- * object at a given size. -- * -- * @fields: -- * face :: -- * Handle to the parent face object. -- * -- * generic :: -- * A typeless pointer, unused by the FreeType library or any of its -- * drivers. It can be used by client applications to link their own -- * data to each size object. -- * -- * metrics :: -- * Metrics for this size object. This field is read-only. -- -- parent face object type FT_SizeRec_u is record face : FT_Face; -- /usr/include/freetype2/freetype/freetype.h:1634 c_generic : aliased fttypes.FT_Generic; -- /usr/include/freetype2/freetype/freetype.h:1635 metrics : aliased FT_Size_Metrics; -- /usr/include/freetype2/freetype/freetype.h:1636 internal : FT_Size_Internal; -- /usr/include/freetype2/freetype/freetype.h:1637 end record with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:1632 -- generic pointer for client uses -- size metrics subtype FT_SizeRec is FT_SizeRec_u; -- /usr/include/freetype2/freetype/freetype.h:1639 --************************************************************************* -- * -- * @struct: -- * FT_SubGlyph -- * -- * @description: -- * The subglyph structure is an internal object used to describe -- * subglyphs (for example, in the case of composites). -- * -- * @note: -- * The subglyph implementation is not part of the high-level API, hence -- * the forward structure declaration. -- * -- * You can however retrieve subglyph information with -- * @FT_Get_SubGlyph_Info. -- type FT_SubGlyphRec_u is null record; -- incomplete struct type FT_SubGlyph is access all FT_SubGlyphRec_u; -- /usr/include/freetype2/freetype/freetype.h:1658 --************************************************************************* -- * -- * @type: -- * FT_Slot_Internal -- * -- * @description: -- * An opaque handle to an `FT_Slot_InternalRec` structure, used to model -- * private data of a given @FT_GlyphSlot object. -- type FT_Slot_InternalRec_u is null record; -- incomplete struct type FT_Slot_Internal is access all FT_Slot_InternalRec_u; -- /usr/include/freetype2/freetype/freetype.h:1670 --************************************************************************* -- * -- * @struct: -- * FT_GlyphSlotRec -- * -- * @description: -- * FreeType root glyph slot class structure. A glyph slot is a container -- * where individual glyphs can be loaded, be they in outline or bitmap -- * format. -- * -- * @fields: -- * library :: -- * A handle to the FreeType library instance this slot belongs to. -- * -- * face :: -- * A handle to the parent face object. -- * -- * next :: -- * In some cases (like some font tools), several glyph slots per face -- * object can be a good thing. As this is rare, the glyph slots are -- * listed through a direct, single-linked list using its `next` field. -- * -- * glyph_index :: -- * [Since 2.10] The glyph index passed as an argument to @FT_Load_Glyph -- * while initializing the glyph slot. -- * -- * generic :: -- * A typeless pointer unused by the FreeType library or any of its -- * drivers. It can be used by client applications to link their own -- * data to each glyph slot object. -- * -- * metrics :: -- * The metrics of the last loaded glyph in the slot. The returned -- * values depend on the last load flags (see the @FT_Load_Glyph API -- * function) and can be expressed either in 26.6 fractional pixels or -- * font units. -- * -- * Note that even when the glyph image is transformed, the metrics are -- * not. -- * -- * linearHoriAdvance :: -- * The advance width of the unhinted glyph. Its value is expressed in -- * 16.16 fractional pixels, unless @FT_LOAD_LINEAR_DESIGN is set when -- * loading the glyph. This field can be important to perform correct -- * WYSIWYG layout. Only relevant for outline glyphs. -- * -- * linearVertAdvance :: -- * The advance height of the unhinted glyph. Its value is expressed in -- * 16.16 fractional pixels, unless @FT_LOAD_LINEAR_DESIGN is set when -- * loading the glyph. This field can be important to perform correct -- * WYSIWYG layout. Only relevant for outline glyphs. -- * -- * advance :: -- * This shorthand is, depending on @FT_LOAD_IGNORE_TRANSFORM, the -- * transformed (hinted) advance width for the glyph, in 26.6 fractional -- * pixel format. As specified with @FT_LOAD_VERTICAL_LAYOUT, it uses -- * either the `horiAdvance` or the `vertAdvance` value of `metrics` -- * field. -- * -- * format :: -- * This field indicates the format of the image contained in the glyph -- * slot. Typically @FT_GLYPH_FORMAT_BITMAP, @FT_GLYPH_FORMAT_OUTLINE, -- * or @FT_GLYPH_FORMAT_COMPOSITE, but other values are possible. -- * -- * bitmap :: -- * This field is used as a bitmap descriptor. Note that the address -- * and content of the bitmap buffer can change between calls of -- * @FT_Load_Glyph and a few other functions. -- * -- * bitmap_left :: -- * The bitmap's left bearing expressed in integer pixels. -- * -- * bitmap_top :: -- * The bitmap's top bearing expressed in integer pixels. This is the -- * distance from the baseline to the top-most glyph scanline, upwards -- * y~coordinates being **positive**. -- * -- * outline :: -- * The outline descriptor for the current glyph image if its format is -- * @FT_GLYPH_FORMAT_OUTLINE. Once a glyph is loaded, `outline` can be -- * transformed, distorted, emboldened, etc. However, it must not be -- * freed. -- * -- * [Since 2.10.1] If @FT_LOAD_NO_SCALE is set, outline coordinates of -- * OpenType variation fonts for a selected instance are internally -- * handled as 26.6 fractional font units but returned as (rounded) -- * integers, as expected. To get unrounded font units, don't use -- * @FT_LOAD_NO_SCALE but load the glyph with @FT_LOAD_NO_HINTING and -- * scale it, using the font's `units_per_EM` value as the ppem. -- * -- * num_subglyphs :: -- * The number of subglyphs in a composite glyph. This field is only -- * valid for the composite glyph format that should normally only be -- * loaded with the @FT_LOAD_NO_RECURSE flag. -- * -- * subglyphs :: -- * An array of subglyph descriptors for composite glyphs. There are -- * `num_subglyphs` elements in there. Currently internal to FreeType. -- * -- * control_data :: -- * Certain font drivers can also return the control data for a given -- * glyph image (e.g. TrueType bytecode, Type~1 charstrings, etc.). -- * This field is a pointer to such data; it is currently internal to -- * FreeType. -- * -- * control_len :: -- * This is the length in bytes of the control data. Currently internal -- * to FreeType. -- * -- * other :: -- * Reserved. -- * -- * lsb_delta :: -- * The difference between hinted and unhinted left side bearing while -- * auto-hinting is active. Zero otherwise. -- * -- * rsb_delta :: -- * The difference between hinted and unhinted right side bearing while -- * auto-hinting is active. Zero otherwise. -- * -- * @note: -- * If @FT_Load_Glyph is called with default flags (see @FT_LOAD_DEFAULT) -- * the glyph image is loaded in the glyph slot in its native format -- * (e.g., an outline glyph for TrueType and Type~1 formats). [Since 2.9] -- * The prospective bitmap metrics are calculated according to -- * @FT_LOAD_TARGET_XXX and other flags even for the outline glyph, even -- * if @FT_LOAD_RENDER is not set. -- * -- * This image can later be converted into a bitmap by calling -- * @FT_Render_Glyph. This function searches the current renderer for the -- * native image's format, then invokes it. -- * -- * The renderer is in charge of transforming the native image through the -- * slot's face transformation fields, then converting it into a bitmap -- * that is returned in `slot->bitmap`. -- * -- * Note that `slot->bitmap_left` and `slot->bitmap_top` are also used to -- * specify the position of the bitmap relative to the current pen -- * position (e.g., coordinates (0,0) on the baseline). Of course, -- * `slot->format` is also changed to @FT_GLYPH_FORMAT_BITMAP. -- * -- * Here is a small pseudo code fragment that shows how to use `lsb_delta` -- * and `rsb_delta` to do fractional positioning of glyphs: -- * -- * ``` -- * FT_GlyphSlot slot = face->glyph; -- * FT_Pos origin_x = 0; -- * -- * -- * for all glyphs do -- * <load glyph with `FT_Load_Glyph'> -- * -- * FT_Outline_Translate( slot->outline, origin_x & 63, 0 ); -- * -- * <save glyph image, or render glyph, or ...> -- * -- * <compute kern between current and next glyph -- * and add it to `origin_x'> -- * -- * origin_x += slot->advance.x; -- * origin_x += slot->lsb_delta - slot->rsb_delta; -- * endfor -- * ``` -- * -- * Here is another small pseudo code fragment that shows how to use -- * `lsb_delta` and `rsb_delta` to improve integer positioning of glyphs: -- * -- * ``` -- * FT_GlyphSlot slot = face->glyph; -- * FT_Pos origin_x = 0; -- * FT_Pos prev_rsb_delta = 0; -- * -- * -- * for all glyphs do -- * <compute kern between current and previous glyph -- * and add it to `origin_x'> -- * -- * <load glyph with `FT_Load_Glyph'> -- * -- * if ( prev_rsb_delta - slot->lsb_delta > 32 ) -- * origin_x -= 64; -- * else if ( prev_rsb_delta - slot->lsb_delta < -31 ) -- * origin_x += 64; -- * -- * prev_rsb_delta = slot->rsb_delta; -- * -- * <save glyph image, or render glyph, or ...> -- * -- * origin_x += slot->advance.x; -- * endfor -- * ``` -- * -- * If you use strong auto-hinting, you **must** apply these delta values! -- * Otherwise you will experience far too large inter-glyph spacing at -- * small rendering sizes in most cases. Note that it doesn't harm to use -- * the above code for other hinting modes also, since the delta values -- * are zero then. -- type FT_GlyphSlotRec_u is record library : FT_Library; -- /usr/include/freetype2/freetype/freetype.h:1873 face : FT_Face; -- /usr/include/freetype2/freetype/freetype.h:1874 next : FT_GlyphSlot; -- /usr/include/freetype2/freetype/freetype.h:1875 glyph_index : aliased fttypes.FT_UInt; -- /usr/include/freetype2/freetype/freetype.h:1876 c_generic : aliased fttypes.FT_Generic; -- /usr/include/freetype2/freetype/freetype.h:1877 metrics : aliased FT_Glyph_Metrics; -- /usr/include/freetype2/freetype/freetype.h:1879 linearHoriAdvance : aliased fttypes.FT_Fixed; -- /usr/include/freetype2/freetype/freetype.h:1880 linearVertAdvance : aliased fttypes.FT_Fixed; -- /usr/include/freetype2/freetype/freetype.h:1881 advance : aliased ftimage.FT_Vector; -- /usr/include/freetype2/freetype/freetype.h:1882 format : aliased ftimage.FT_Glyph_Format; -- /usr/include/freetype2/freetype/freetype.h:1884 bitmap : aliased ftimage.FT_Bitmap; -- /usr/include/freetype2/freetype/freetype.h:1886 bitmap_left : aliased fttypes.FT_Int; -- /usr/include/freetype2/freetype/freetype.h:1887 bitmap_top : aliased fttypes.FT_Int; -- /usr/include/freetype2/freetype/freetype.h:1888 outline : aliased ftimage.FT_Outline; -- /usr/include/freetype2/freetype/freetype.h:1890 num_subglyphs : aliased fttypes.FT_UInt; -- /usr/include/freetype2/freetype/freetype.h:1892 subglyphs : FT_SubGlyph; -- /usr/include/freetype2/freetype/freetype.h:1893 control_data : System.Address; -- /usr/include/freetype2/freetype/freetype.h:1895 control_len : aliased long; -- /usr/include/freetype2/freetype/freetype.h:1896 lsb_delta : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:1898 rsb_delta : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:1899 other : System.Address; -- /usr/include/freetype2/freetype/freetype.h:1901 internal : FT_Slot_Internal; -- /usr/include/freetype2/freetype/freetype.h:1903 end record with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:1871 -- new in 2.10; was reserved previously subtype FT_GlyphSlotRec is FT_GlyphSlotRec_u; -- /usr/include/freetype2/freetype/freetype.h:1905 --*********************************************************************** --*********************************************************************** -- -- F U N C T I O N S -- --*********************************************************************** --*********************************************************************** --************************************************************************* -- * -- * @function: -- * FT_Init_FreeType -- * -- * @description: -- * Initialize a new FreeType library object. The set of modules that are -- * registered by this function is determined at build time. -- * -- * @output: -- * alibrary :: -- * A handle to a new library object. -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @note: -- * In case you want to provide your own memory allocating routines, use -- * @FT_New_Library instead, followed by a call to @FT_Add_Default_Modules -- * (or a series of calls to @FT_Add_Module) and -- * @FT_Set_Default_Properties. -- * -- * See the documentation of @FT_Library and @FT_Face for multi-threading -- * issues. -- * -- * If you need reference-counting (cf. @FT_Reference_Library), use -- * @FT_New_Library and @FT_Done_Library. -- * -- * If compilation option `FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES` is -- * set, this function reads the `FREETYPE_PROPERTIES` environment -- * variable to control driver properties. See section @properties for -- * more. -- function FT_Init_FreeType (alibrary : System.Address) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:1951 with Import => True, Convention => C, External_Name => "FT_Init_FreeType"; --************************************************************************* -- * -- * @function: -- * FT_Done_FreeType -- * -- * @description: -- * Destroy a given FreeType library object and all of its children, -- * including resources, drivers, faces, sizes, etc. -- * -- * @input: -- * library :: -- * A handle to the target library object. -- * -- * @return: -- * FreeType error code. 0~means success. -- function FT_Done_FreeType (library : FT_Library) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:1971 with Import => True, Convention => C, External_Name => "FT_Done_FreeType"; --************************************************************************* -- * -- * @enum: -- * FT_OPEN_XXX -- * -- * @description: -- * A list of bit field constants used within the `flags` field of the -- * @FT_Open_Args structure. -- * -- * @values: -- * FT_OPEN_MEMORY :: -- * This is a memory-based stream. -- * -- * FT_OPEN_STREAM :: -- * Copy the stream from the `stream` field. -- * -- * FT_OPEN_PATHNAME :: -- * Create a new input stream from a C~path name. -- * -- * FT_OPEN_DRIVER :: -- * Use the `driver` field. -- * -- * FT_OPEN_PARAMS :: -- * Use the `num_params` and `params` fields. -- * -- * @note: -- * The `FT_OPEN_MEMORY`, `FT_OPEN_STREAM`, and `FT_OPEN_PATHNAME` flags -- * are mutually exclusive. -- -- these constants are deprecated; use the corresponding `FT_OPEN_XXX` -- values instead --************************************************************************* -- * -- * @struct: -- * FT_Parameter -- * -- * @description: -- * A simple structure to pass more or less generic parameters to -- * @FT_Open_Face and @FT_Face_Properties. -- * -- * @fields: -- * tag :: -- * A four-byte identification tag. -- * -- * data :: -- * A pointer to the parameter data. -- * -- * @note: -- * The ID and function of parameters are driver-specific. See section -- * @parameter_tags for more information. -- type FT_Parameter_u is record tag : aliased fttypes.FT_ULong; -- /usr/include/freetype2/freetype/freetype.h:2041 data : fttypes.FT_Pointer; -- /usr/include/freetype2/freetype/freetype.h:2042 end record with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:2039 subtype FT_Parameter is FT_Parameter_u; -- /usr/include/freetype2/freetype/freetype.h:2044 --************************************************************************* -- * -- * @struct: -- * FT_Open_Args -- * -- * @description: -- * A structure to indicate how to open a new font file or stream. A -- * pointer to such a structure can be used as a parameter for the -- * functions @FT_Open_Face and @FT_Attach_Stream. -- * -- * @fields: -- * flags :: -- * A set of bit flags indicating how to use the structure. -- * -- * memory_base :: -- * The first byte of the file in memory. -- * -- * memory_size :: -- * The size in bytes of the file in memory. -- * -- * pathname :: -- * A pointer to an 8-bit file pathname. The pointer is not owned by -- * FreeType. -- * -- * stream :: -- * A handle to a source stream object. -- * -- * driver :: -- * This field is exclusively used by @FT_Open_Face; it simply specifies -- * the font driver to use for opening the face. If set to `NULL`, -- * FreeType tries to load the face with each one of the drivers in its -- * list. -- * -- * num_params :: -- * The number of extra parameters. -- * -- * params :: -- * Extra parameters passed to the font driver when opening a new face. -- * -- * @note: -- * The stream type is determined by the contents of `flags` that are -- * tested in the following order by @FT_Open_Face: -- * -- * If the @FT_OPEN_MEMORY bit is set, assume that this is a memory file -- * of `memory_size` bytes, located at `memory_address`. The data are not -- * copied, and the client is responsible for releasing and destroying -- * them _after_ the corresponding call to @FT_Done_Face. -- * -- * Otherwise, if the @FT_OPEN_STREAM bit is set, assume that a custom -- * input stream `stream` is used. -- * -- * Otherwise, if the @FT_OPEN_PATHNAME bit is set, assume that this is a -- * normal file and use `pathname` to open it. -- * -- * If the @FT_OPEN_DRIVER bit is set, @FT_Open_Face only tries to open -- * the file with the driver whose handler is in `driver`. -- * -- * If the @FT_OPEN_PARAMS bit is set, the parameters given by -- * `num_params` and `params` is used. They are ignored otherwise. -- * -- * Ideally, both the `pathname` and `params` fields should be tagged as -- * 'const'; this is missing for API backward compatibility. In other -- * words, applications should treat them as read-only. -- type FT_Open_Args_u is record flags : aliased fttypes.FT_UInt; -- /usr/include/freetype2/freetype/freetype.h:2113 memory_base : access fttypes.FT_Byte; -- /usr/include/freetype2/freetype/freetype.h:2114 memory_size : aliased fttypes.FT_Long; -- /usr/include/freetype2/freetype/freetype.h:2115 pathname : access fttypes.FT_String; -- /usr/include/freetype2/freetype/freetype.h:2116 stream : ftsystem.FT_Stream; -- /usr/include/freetype2/freetype/freetype.h:2117 driver : FT_Module; -- /usr/include/freetype2/freetype/freetype.h:2118 num_params : aliased fttypes.FT_Int; -- /usr/include/freetype2/freetype/freetype.h:2119 params : access FT_Parameter; -- /usr/include/freetype2/freetype/freetype.h:2120 end record with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:2111 subtype FT_Open_Args is FT_Open_Args_u; -- /usr/include/freetype2/freetype/freetype.h:2122 --************************************************************************* -- * -- * @function: -- * FT_New_Face -- * -- * @description: -- * Call @FT_Open_Face to open a font by its pathname. -- * -- * @inout: -- * library :: -- * A handle to the library resource. -- * -- * @input: -- * pathname :: -- * A path to the font file. -- * -- * face_index :: -- * See @FT_Open_Face for a detailed description of this parameter. -- * -- * @output: -- * aface :: -- * A handle to a new face object. If `face_index` is greater than or -- * equal to zero, it must be non-`NULL`. -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @note: -- * Use @FT_Done_Face to destroy the created @FT_Face object (along with -- * its slot and sizes). -- function FT_New_Face (library : FT_Library; filepathname : Interfaces.C.Strings.chars_ptr; face_index : fttypes.FT_Long; aface : System.Address) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2157 with Import => True, Convention => C, External_Name => "FT_New_Face"; --************************************************************************* -- * -- * @function: -- * FT_New_Memory_Face -- * -- * @description: -- * Call @FT_Open_Face to open a font that has been loaded into memory. -- * -- * @inout: -- * library :: -- * A handle to the library resource. -- * -- * @input: -- * file_base :: -- * A pointer to the beginning of the font data. -- * -- * file_size :: -- * The size of the memory chunk used by the font data. -- * -- * face_index :: -- * See @FT_Open_Face for a detailed description of this parameter. -- * -- * @output: -- * aface :: -- * A handle to a new face object. If `face_index` is greater than or -- * equal to zero, it must be non-`NULL`. -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @note: -- * You must not deallocate the memory before calling @FT_Done_Face. -- function FT_New_Memory_Face (library : FT_Library; file_base : access fttypes.FT_Byte; file_size : fttypes.FT_Long; face_index : fttypes.FT_Long; aface : System.Address) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2197 with Import => True, Convention => C, External_Name => "FT_New_Memory_Face"; --************************************************************************* -- * -- * @function: -- * FT_Open_Face -- * -- * @description: -- * Create a face object from a given resource described by @FT_Open_Args. -- * -- * @inout: -- * library :: -- * A handle to the library resource. -- * -- * @input: -- * args :: -- * A pointer to an `FT_Open_Args` structure that must be filled by the -- * caller. -- * -- * face_index :: -- * This field holds two different values. Bits 0-15 are the index of -- * the face in the font file (starting with value~0). Set it to~0 if -- * there is only one face in the font file. -- * -- * [Since 2.6.1] Bits 16-30 are relevant to GX and OpenType variation -- * fonts only, specifying the named instance index for the current face -- * index (starting with value~1; value~0 makes FreeType ignore named -- * instances). For non-variation fonts, bits 16-30 are ignored. -- * Assuming that you want to access the third named instance in face~4, -- * `face_index` should be set to 0x00030004. If you want to access -- * face~4 without variation handling, simply set `face_index` to -- * value~4. -- * -- * `FT_Open_Face` and its siblings can be used to quickly check whether -- * the font format of a given font resource is supported by FreeType. -- * In general, if the `face_index` argument is negative, the function's -- * return value is~0 if the font format is recognized, or non-zero -- * otherwise. The function allocates a more or less empty face handle -- * in `*aface` (if `aface` isn't `NULL`); the only two useful fields in -- * this special case are `face->num_faces` and `face->style_flags`. -- * For any negative value of `face_index`, `face->num_faces` gives the -- * number of faces within the font file. For the negative value -- * '-(N+1)' (with 'N' a non-negative 16-bit value), bits 16-30 in -- * `face->style_flags` give the number of named instances in face 'N' -- * if we have a variation font (or zero otherwise). After examination, -- * the returned @FT_Face structure should be deallocated with a call to -- * @FT_Done_Face. -- * -- * @output: -- * aface :: -- * A handle to a new face object. If `face_index` is greater than or -- * equal to zero, it must be non-`NULL`. -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @note: -- * Unlike FreeType 1.x, this function automatically creates a glyph slot -- * for the face object that can be accessed directly through -- * `face->glyph`. -- * -- * Each new face object created with this function also owns a default -- * @FT_Size object, accessible as `face->size`. -- * -- * One @FT_Library instance can have multiple face objects, this is, -- * @FT_Open_Face and its siblings can be called multiple times using the -- * same `library` argument. -- * -- * See the discussion of reference counters in the description of -- * @FT_Reference_Face. -- * -- * @example: -- * To loop over all faces, use code similar to the following snippet -- * (omitting the error handling). -- * -- * ``` -- * ... -- * FT_Face face; -- * FT_Long i, num_faces; -- * -- * -- * error = FT_Open_Face( library, args, -1, &face ); -- * if ( error ) { ... } -- * -- * num_faces = face->num_faces; -- * FT_Done_Face( face ); -- * -- * for ( i = 0; i < num_faces; i++ ) -- * { -- * ... -- * error = FT_Open_Face( library, args, i, &face ); -- * ... -- * FT_Done_Face( face ); -- * ... -- * } -- * ``` -- * -- * To loop over all valid values for `face_index`, use something similar -- * to the following snippet, again without error handling. The code -- * accesses all faces immediately (thus only a single call of -- * `FT_Open_Face` within the do-loop), with and without named instances. -- * -- * ``` -- * ... -- * FT_Face face; -- * -- * FT_Long num_faces = 0; -- * FT_Long num_instances = 0; -- * -- * FT_Long face_idx = 0; -- * FT_Long instance_idx = 0; -- * -- * -- * do -- * { -- * FT_Long id = ( instance_idx << 16 ) + face_idx; -- * -- * -- * error = FT_Open_Face( library, args, id, &face ); -- * if ( error ) { ... } -- * -- * num_faces = face->num_faces; -- * num_instances = face->style_flags >> 16; -- * -- * ... -- * -- * FT_Done_Face( face ); -- * -- * if ( instance_idx < num_instances ) -- * instance_idx++; -- * else -- * { -- * face_idx++; -- * instance_idx = 0; -- * } -- * -- * } while ( face_idx < num_faces ) -- * ``` -- function FT_Open_Face (library : FT_Library; args : access constant FT_Open_Args; face_index : fttypes.FT_Long; aface : System.Address) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2342 with Import => True, Convention => C, External_Name => "FT_Open_Face"; --************************************************************************* -- * -- * @function: -- * FT_Attach_File -- * -- * @description: -- * Call @FT_Attach_Stream to attach a file. -- * -- * @inout: -- * face :: -- * The target face object. -- * -- * @input: -- * filepathname :: -- * The pathname. -- * -- * @return: -- * FreeType error code. 0~means success. -- function FT_Attach_File (face : FT_Face; filepathname : Interfaces.C.Strings.chars_ptr) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2368 with Import => True, Convention => C, External_Name => "FT_Attach_File"; --************************************************************************* -- * -- * @function: -- * FT_Attach_Stream -- * -- * @description: -- * 'Attach' data to a face object. Normally, this is used to read -- * additional information for the face object. For example, you can -- * attach an AFM file that comes with a Type~1 font to get the kerning -- * values and other metrics. -- * -- * @inout: -- * face :: -- * The target face object. -- * -- * @input: -- * parameters :: -- * A pointer to @FT_Open_Args that must be filled by the caller. -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @note: -- * The meaning of the 'attach' (i.e., what really happens when the new -- * file is read) is not fixed by FreeType itself. It really depends on -- * the font format (and thus the font driver). -- * -- * Client applications are expected to know what they are doing when -- * invoking this function. Most drivers simply do not implement file or -- * stream attachments. -- function FT_Attach_Stream (face : FT_Face; parameters : access FT_Open_Args) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2404 with Import => True, Convention => C, External_Name => "FT_Attach_Stream"; --************************************************************************* -- * -- * @function: -- * FT_Reference_Face -- * -- * @description: -- * A counter gets initialized to~1 at the time an @FT_Face structure is -- * created. This function increments the counter. @FT_Done_Face then -- * only destroys a face if the counter is~1, otherwise it simply -- * decrements the counter. -- * -- * This function helps in managing life-cycles of structures that -- * reference @FT_Face objects. -- * -- * @input: -- * face :: -- * A handle to a target face object. -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @since: -- * 2.4.2 -- function FT_Reference_Face (face : FT_Face) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2433 with Import => True, Convention => C, External_Name => "FT_Reference_Face"; --************************************************************************* -- * -- * @function: -- * FT_Done_Face -- * -- * @description: -- * Discard a given face object, as well as all of its child slots and -- * sizes. -- * -- * @input: -- * face :: -- * A handle to a target face object. -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @note: -- * See the discussion of reference counters in the description of -- * @FT_Reference_Face. -- function FT_Done_Face (face : FT_Face) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2457 with Import => True, Convention => C, External_Name => "FT_Done_Face"; --************************************************************************* -- * -- * @function: -- * FT_Select_Size -- * -- * @description: -- * Select a bitmap strike. To be more precise, this function sets the -- * scaling factors of the active @FT_Size object in a face so that -- * bitmaps from this particular strike are taken by @FT_Load_Glyph and -- * friends. -- * -- * @inout: -- * face :: -- * A handle to a target face object. -- * -- * @input: -- * strike_index :: -- * The index of the bitmap strike in the `available_sizes` field of -- * @FT_FaceRec structure. -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @note: -- * For bitmaps embedded in outline fonts it is common that only a subset -- * of the available glyphs at a given ppem value is available. FreeType -- * silently uses outlines if there is no bitmap for a given glyph index. -- * -- * For GX and OpenType variation fonts, a bitmap strike makes sense only -- * if the default instance is active (this is, no glyph variation takes -- * place); otherwise, FreeType simply ignores bitmap strikes. The same -- * is true for all named instances that are different from the default -- * instance. -- * -- * Don't use this function if you are using the FreeType cache API. -- function FT_Select_Size (face : FT_Face; strike_index : fttypes.FT_Int) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2497 with Import => True, Convention => C, External_Name => "FT_Select_Size"; --************************************************************************* -- * -- * @enum: -- * FT_Size_Request_Type -- * -- * @description: -- * An enumeration type that lists the supported size request types, i.e., -- * what input size (in font units) maps to the requested output size (in -- * pixels, as computed from the arguments of @FT_Size_Request). -- * -- * @values: -- * FT_SIZE_REQUEST_TYPE_NOMINAL :: -- * The nominal size. The `units_per_EM` field of @FT_FaceRec is used -- * to determine both scaling values. -- * -- * This is the standard scaling found in most applications. In -- * particular, use this size request type for TrueType fonts if they -- * provide optical scaling or something similar. Note, however, that -- * `units_per_EM` is a rather abstract value which bears no relation to -- * the actual size of the glyphs in a font. -- * -- * FT_SIZE_REQUEST_TYPE_REAL_DIM :: -- * The real dimension. The sum of the `ascender` and (minus of) the -- * `descender` fields of @FT_FaceRec is used to determine both scaling -- * values. -- * -- * FT_SIZE_REQUEST_TYPE_BBOX :: -- * The font bounding box. The width and height of the `bbox` field of -- * @FT_FaceRec are used to determine the horizontal and vertical -- * scaling value, respectively. -- * -- * FT_SIZE_REQUEST_TYPE_CELL :: -- * The `max_advance_width` field of @FT_FaceRec is used to determine -- * the horizontal scaling value; the vertical scaling value is -- * determined the same way as @FT_SIZE_REQUEST_TYPE_REAL_DIM does. -- * Finally, both scaling values are set to the smaller one. This type -- * is useful if you want to specify the font size for, say, a window of -- * a given dimension and 80x24 cells. -- * -- * FT_SIZE_REQUEST_TYPE_SCALES :: -- * Specify the scaling values directly. -- * -- * @note: -- * The above descriptions only apply to scalable formats. For bitmap -- * formats, the behaviour is up to the driver. -- * -- * See the note section of @FT_Size_Metrics if you wonder how size -- * requesting relates to scaling values. -- type FT_Size_Request_Type_u is (FT_SIZE_REQUEST_TYPE_NOMINAL, FT_SIZE_REQUEST_TYPE_REAL_DIM, FT_SIZE_REQUEST_TYPE_BBOX, FT_SIZE_REQUEST_TYPE_CELL, FT_SIZE_REQUEST_TYPE_SCALES, FT_SIZE_REQUEST_TYPE_MAX) with Convention => C; -- /usr/include/freetype2/freetype/freetype.h:2550 subtype FT_Size_Request_Type is FT_Size_Request_Type_u; -- /usr/include/freetype2/freetype/freetype.h:2560 --************************************************************************* -- * -- * @struct: -- * FT_Size_RequestRec -- * -- * @description: -- * A structure to model a size request. -- * -- * @fields: -- * type :: -- * See @FT_Size_Request_Type. -- * -- * width :: -- * The desired width, given as a 26.6 fractional point value (with 72pt -- * = 1in). -- * -- * height :: -- * The desired height, given as a 26.6 fractional point value (with -- * 72pt = 1in). -- * -- * horiResolution :: -- * The horizontal resolution (dpi, i.e., pixels per inch). If set to -- * zero, `width` is treated as a 26.6 fractional **pixel** value, which -- * gets internally rounded to an integer. -- * -- * vertResolution :: -- * The vertical resolution (dpi, i.e., pixels per inch). If set to -- * zero, `height` is treated as a 26.6 fractional **pixel** value, -- * which gets internally rounded to an integer. -- * -- * @note: -- * If `width` is zero, the horizontal scaling value is set equal to the -- * vertical scaling value, and vice versa. -- * -- * If `type` is `FT_SIZE_REQUEST_TYPE_SCALES`, `width` and `height` are -- * interpreted directly as 16.16 fractional scaling values, without any -- * further modification, and both `horiResolution` and `vertResolution` -- * are ignored. -- type FT_Size_RequestRec_u is record c_type : aliased FT_Size_Request_Type; -- /usr/include/freetype2/freetype/freetype.h:2604 width : aliased fttypes.FT_Long; -- /usr/include/freetype2/freetype/freetype.h:2605 height : aliased fttypes.FT_Long; -- /usr/include/freetype2/freetype/freetype.h:2606 horiResolution : aliased fttypes.FT_UInt; -- /usr/include/freetype2/freetype/freetype.h:2607 vertResolution : aliased fttypes.FT_UInt; -- /usr/include/freetype2/freetype/freetype.h:2608 end record with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:2602 subtype FT_Size_RequestRec is FT_Size_RequestRec_u; -- /usr/include/freetype2/freetype/freetype.h:2610 --************************************************************************* -- * -- * @struct: -- * FT_Size_Request -- * -- * @description: -- * A handle to a size request structure. -- type FT_Size_Request is access all FT_Size_RequestRec_u; -- /usr/include/freetype2/freetype/freetype.h:2621 --************************************************************************* -- * -- * @function: -- * FT_Request_Size -- * -- * @description: -- * Resize the scale of the active @FT_Size object in a face. -- * -- * @inout: -- * face :: -- * A handle to a target face object. -- * -- * @input: -- * req :: -- * A pointer to a @FT_Size_RequestRec. -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @note: -- * Although drivers may select the bitmap strike matching the request, -- * you should not rely on this if you intend to select a particular -- * bitmap strike. Use @FT_Select_Size instead in that case. -- * -- * The relation between the requested size and the resulting glyph size -- * is dependent entirely on how the size is defined in the source face. -- * The font designer chooses the final size of each glyph relative to -- * this size. For more information refer to -- * 'https://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html'. -- * -- * Contrary to @FT_Set_Char_Size, this function doesn't have special code -- * to normalize zero-valued widths, heights, or resolutions (which lead -- * to errors in most cases). -- * -- * Don't use this function if you are using the FreeType cache API. -- function FT_Request_Size (face : FT_Face; req : FT_Size_Request) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2661 with Import => True, Convention => C, External_Name => "FT_Request_Size"; --************************************************************************* -- * -- * @function: -- * FT_Set_Char_Size -- * -- * @description: -- * Call @FT_Request_Size to request the nominal size (in points). -- * -- * @inout: -- * face :: -- * A handle to a target face object. -- * -- * @input: -- * char_width :: -- * The nominal width, in 26.6 fractional points. -- * -- * char_height :: -- * The nominal height, in 26.6 fractional points. -- * -- * horz_resolution :: -- * The horizontal resolution in dpi. -- * -- * vert_resolution :: -- * The vertical resolution in dpi. -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @note: -- * While this function allows fractional points as input values, the -- * resulting ppem value for the given resolution is always rounded to the -- * nearest integer. -- * -- * If either the character width or height is zero, it is set equal to -- * the other value. -- * -- * If either the horizontal or vertical resolution is zero, it is set -- * equal to the other value. -- * -- * A character width or height smaller than 1pt is set to 1pt; if both -- * resolution values are zero, they are set to 72dpi. -- * -- * Don't use this function if you are using the FreeType cache API. -- function FT_Set_Char_Size (face : FT_Face; char_width : fttypes.FT_F26Dot6; char_height : fttypes.FT_F26Dot6; horz_resolution : fttypes.FT_UInt; vert_resolution : fttypes.FT_UInt) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2710 with Import => True, Convention => C, External_Name => "FT_Set_Char_Size"; --************************************************************************* -- * -- * @function: -- * FT_Set_Pixel_Sizes -- * -- * @description: -- * Call @FT_Request_Size to request the nominal size (in pixels). -- * -- * @inout: -- * face :: -- * A handle to the target face object. -- * -- * @input: -- * pixel_width :: -- * The nominal width, in pixels. -- * -- * pixel_height :: -- * The nominal height, in pixels. -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @note: -- * You should not rely on the resulting glyphs matching or being -- * constrained to this pixel size. Refer to @FT_Request_Size to -- * understand how requested sizes relate to actual sizes. -- * -- * Don't use this function if you are using the FreeType cache API. -- function FT_Set_Pixel_Sizes (face : FT_Face; pixel_width : fttypes.FT_UInt; pixel_height : fttypes.FT_UInt) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2747 with Import => True, Convention => C, External_Name => "FT_Set_Pixel_Sizes"; --************************************************************************* -- * -- * @function: -- * FT_Load_Glyph -- * -- * @description: -- * Load a glyph into the glyph slot of a face object. -- * -- * @inout: -- * face :: -- * A handle to the target face object where the glyph is loaded. -- * -- * @input: -- * glyph_index :: -- * The index of the glyph in the font file. For CID-keyed fonts -- * (either in PS or in CFF format) this argument specifies the CID -- * value. -- * -- * load_flags :: -- * A flag indicating what to load for this glyph. The @FT_LOAD_XXX -- * constants can be used to control the glyph loading process (e.g., -- * whether the outline should be scaled, whether to load bitmaps or -- * not, whether to hint the outline, etc). -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @note: -- * The loaded glyph may be transformed. See @FT_Set_Transform for the -- * details. -- * -- * For subsetted CID-keyed fonts, `FT_Err_Invalid_Argument` is returned -- * for invalid CID values (this is, for CID values that don't have a -- * corresponding glyph in the font). See the discussion of the -- * @FT_FACE_FLAG_CID_KEYED flag for more details. -- * -- * If you receive `FT_Err_Glyph_Too_Big`, try getting the glyph outline -- * at EM size, then scale it manually and fill it as a graphics -- * operation. -- function FT_Load_Glyph (face : FT_Face; glyph_index : fttypes.FT_UInt; load_flags : freetype_config_integer_types.FT_Int32) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2793 with Import => True, Convention => C, External_Name => "FT_Load_Glyph"; --************************************************************************* -- * -- * @function: -- * FT_Load_Char -- * -- * @description: -- * Load a glyph into the glyph slot of a face object, accessed by its -- * character code. -- * -- * @inout: -- * face :: -- * A handle to a target face object where the glyph is loaded. -- * -- * @input: -- * char_code :: -- * The glyph's character code, according to the current charmap used in -- * the face. -- * -- * load_flags :: -- * A flag indicating what to load for this glyph. The @FT_LOAD_XXX -- * constants can be used to control the glyph loading process (e.g., -- * whether the outline should be scaled, whether to load bitmaps or -- * not, whether to hint the outline, etc). -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @note: -- * This function simply calls @FT_Get_Char_Index and @FT_Load_Glyph. -- * -- * Many fonts contain glyphs that can't be loaded by this function since -- * its glyph indices are not listed in any of the font's charmaps. -- * -- * If no active cmap is set up (i.e., `face->charmap` is zero), the call -- * to @FT_Get_Char_Index is omitted, and the function behaves identically -- * to @FT_Load_Glyph. -- function FT_Load_Char (face : FT_Face; char_code : fttypes.FT_ULong; load_flags : freetype_config_integer_types.FT_Int32) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2836 with Import => True, Convention => C, External_Name => "FT_Load_Char"; --************************************************************************* -- * -- * @enum: -- * FT_LOAD_XXX -- * -- * @description: -- * A list of bit field constants for @FT_Load_Glyph to indicate what kind -- * of operations to perform during glyph loading. -- * -- * @values: -- * FT_LOAD_DEFAULT :: -- * Corresponding to~0, this value is used as the default glyph load -- * operation. In this case, the following happens: -- * -- * 1. FreeType looks for a bitmap for the glyph corresponding to the -- * face's current size. If one is found, the function returns. The -- * bitmap data can be accessed from the glyph slot (see note below). -- * -- * 2. If no embedded bitmap is searched for or found, FreeType looks -- * for a scalable outline. If one is found, it is loaded from the font -- * file, scaled to device pixels, then 'hinted' to the pixel grid in -- * order to optimize it. The outline data can be accessed from the -- * glyph slot (see note below). -- * -- * Note that by default the glyph loader doesn't render outlines into -- * bitmaps. The following flags are used to modify this default -- * behaviour to more specific and useful cases. -- * -- * FT_LOAD_NO_SCALE :: -- * Don't scale the loaded outline glyph but keep it in font units. -- * -- * This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and -- * unsets @FT_LOAD_RENDER. -- * -- * If the font is 'tricky' (see @FT_FACE_FLAG_TRICKY for more), using -- * `FT_LOAD_NO_SCALE` usually yields meaningless outlines because the -- * subglyphs must be scaled and positioned with hinting instructions. -- * This can be solved by loading the font without `FT_LOAD_NO_SCALE` -- * and setting the character size to `font->units_per_EM`. -- * -- * FT_LOAD_NO_HINTING :: -- * Disable hinting. This generally generates 'blurrier' bitmap glyphs -- * when the glyph are rendered in any of the anti-aliased modes. See -- * also the note below. -- * -- * This flag is implied by @FT_LOAD_NO_SCALE. -- * -- * FT_LOAD_RENDER :: -- * Call @FT_Render_Glyph after the glyph is loaded. By default, the -- * glyph is rendered in @FT_RENDER_MODE_NORMAL mode. This can be -- * overridden by @FT_LOAD_TARGET_XXX or @FT_LOAD_MONOCHROME. -- * -- * This flag is unset by @FT_LOAD_NO_SCALE. -- * -- * FT_LOAD_NO_BITMAP :: -- * Ignore bitmap strikes when loading. Bitmap-only fonts ignore this -- * flag. -- * -- * @FT_LOAD_NO_SCALE always sets this flag. -- * -- * FT_LOAD_VERTICAL_LAYOUT :: -- * Load the glyph for vertical text layout. In particular, the -- * `advance` value in the @FT_GlyphSlotRec structure is set to the -- * `vertAdvance` value of the `metrics` field. -- * -- * In case @FT_HAS_VERTICAL doesn't return true, you shouldn't use this -- * flag currently. Reason is that in this case vertical metrics get -- * synthesized, and those values are not always consistent across -- * various font formats. -- * -- * FT_LOAD_FORCE_AUTOHINT :: -- * Prefer the auto-hinter over the font's native hinter. See also the -- * note below. -- * -- * FT_LOAD_PEDANTIC :: -- * Make the font driver perform pedantic verifications during glyph -- * loading and hinting. This is mostly used to detect broken glyphs in -- * fonts. By default, FreeType tries to handle broken fonts also. -- * -- * In particular, errors from the TrueType bytecode engine are not -- * passed to the application if this flag is not set; this might result -- * in partially hinted or distorted glyphs in case a glyph's bytecode -- * is buggy. -- * -- * FT_LOAD_NO_RECURSE :: -- * Don't load composite glyphs recursively. Instead, the font driver -- * fills the `num_subglyph` and `subglyphs` values of the glyph slot; -- * it also sets `glyph->format` to @FT_GLYPH_FORMAT_COMPOSITE. The -- * description of subglyphs can then be accessed with -- * @FT_Get_SubGlyph_Info. -- * -- * Don't use this flag for retrieving metrics information since some -- * font drivers only return rudimentary data. -- * -- * This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM. -- * -- * FT_LOAD_IGNORE_TRANSFORM :: -- * Ignore the transform matrix set by @FT_Set_Transform. -- * -- * FT_LOAD_MONOCHROME :: -- * This flag is used with @FT_LOAD_RENDER to indicate that you want to -- * render an outline glyph to a 1-bit monochrome bitmap glyph, with -- * 8~pixels packed into each byte of the bitmap data. -- * -- * Note that this has no effect on the hinting algorithm used. You -- * should rather use @FT_LOAD_TARGET_MONO so that the -- * monochrome-optimized hinting algorithm is used. -- * -- * FT_LOAD_LINEAR_DESIGN :: -- * Keep `linearHoriAdvance` and `linearVertAdvance` fields of -- * @FT_GlyphSlotRec in font units. See @FT_GlyphSlotRec for details. -- * -- * FT_LOAD_NO_AUTOHINT :: -- * Disable the auto-hinter. See also the note below. -- * -- * FT_LOAD_COLOR :: -- * Load colored glyphs. There are slight differences depending on the -- * font format. -- * -- * [Since 2.5] Load embedded color bitmap images. The resulting color -- * bitmaps, if available, will have the @FT_PIXEL_MODE_BGRA format, -- * with pre-multiplied color channels. If the flag is not set and -- * color bitmaps are found, they are converted to 256-level gray -- * bitmaps, using the @FT_PIXEL_MODE_GRAY format. -- * -- * [Since 2.10, experimental] If the glyph index contains an entry in -- * the face's 'COLR' table with a 'CPAL' palette table (as defined in -- * the OpenType specification), make @FT_Render_Glyph provide a default -- * blending of the color glyph layers associated with the glyph index, -- * using the same bitmap format as embedded color bitmap images. This -- * is mainly for convenience; for full control of color layers use -- * @FT_Get_Color_Glyph_Layer and FreeType's color functions like -- * @FT_Palette_Select instead of setting @FT_LOAD_COLOR for rendering -- * so that the client application can handle blending by itself. -- * -- * FT_LOAD_COMPUTE_METRICS :: -- * [Since 2.6.1] Compute glyph metrics from the glyph data, without the -- * use of bundled metrics tables (for example, the 'hdmx' table in -- * TrueType fonts). This flag is mainly used by font validating or -- * font editing applications, which need to ignore, verify, or edit -- * those tables. -- * -- * Currently, this flag is only implemented for TrueType fonts. -- * -- * FT_LOAD_BITMAP_METRICS_ONLY :: -- * [Since 2.7.1] Request loading of the metrics and bitmap image -- * information of a (possibly embedded) bitmap glyph without allocating -- * or copying the bitmap image data itself. No effect if the target -- * glyph is not a bitmap image. -- * -- * This flag unsets @FT_LOAD_RENDER. -- * -- * FT_LOAD_CROP_BITMAP :: -- * Ignored. Deprecated. -- * -- * FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH :: -- * Ignored. Deprecated. -- * -- * @note: -- * By default, hinting is enabled and the font's native hinter (see -- * @FT_FACE_FLAG_HINTER) is preferred over the auto-hinter. You can -- * disable hinting by setting @FT_LOAD_NO_HINTING or change the -- * precedence by setting @FT_LOAD_FORCE_AUTOHINT. You can also set -- * @FT_LOAD_NO_AUTOHINT in case you don't want the auto-hinter to be used -- * at all. -- * -- * See the description of @FT_FACE_FLAG_TRICKY for a special exception -- * (affecting only a handful of Asian fonts). -- * -- * Besides deciding which hinter to use, you can also decide which -- * hinting algorithm to use. See @FT_LOAD_TARGET_XXX for details. -- * -- * Note that the auto-hinter needs a valid Unicode cmap (either a native -- * one or synthesized by FreeType) for producing correct results. If a -- * font provides an incorrect mapping (for example, assigning the -- * character code U+005A, LATIN CAPITAL LETTER~Z, to a glyph depicting a -- * mathematical integral sign), the auto-hinter might produce useless -- * results. -- * -- -- Bits 16-19 are used by `FT_LOAD_TARGET_` -- -- used internally only by certain font drivers --************************************************************************* -- * -- * @enum: -- * FT_LOAD_TARGET_XXX -- * -- * @description: -- * A list of values to select a specific hinting algorithm for the -- * hinter. You should OR one of these values to your `load_flags` when -- * calling @FT_Load_Glyph. -- * -- * Note that a font's native hinters may ignore the hinting algorithm you -- * have specified (e.g., the TrueType bytecode interpreter). You can set -- * @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used. -- * -- * @values: -- * FT_LOAD_TARGET_NORMAL :: -- * The default hinting algorithm, optimized for standard gray-level -- * rendering. For monochrome output, use @FT_LOAD_TARGET_MONO instead. -- * -- * FT_LOAD_TARGET_LIGHT :: -- * A lighter hinting algorithm for gray-level modes. Many generated -- * glyphs are fuzzier but better resemble their original shape. This -- * is achieved by snapping glyphs to the pixel grid only vertically -- * (Y-axis), as is done by FreeType's new CFF engine or Microsoft's -- * ClearType font renderer. This preserves inter-glyph spacing in -- * horizontal text. The snapping is done either by the native font -- * driver, if the driver itself and the font support it, or by the -- * auto-hinter. -- * -- * Advance widths are rounded to integer values; however, using the -- * `lsb_delta` and `rsb_delta` fields of @FT_GlyphSlotRec, it is -- * possible to get fractional advance widths for subpixel positioning -- * (which is recommended to use). -- * -- * If configuration option `AF_CONFIG_OPTION_TT_SIZE_METRICS` is -- * active, TrueType-like metrics are used to make this mode behave -- * similarly as in unpatched FreeType versions between 2.4.6 and 2.7.1 -- * (inclusive). -- * -- * FT_LOAD_TARGET_MONO :: -- * Strong hinting algorithm that should only be used for monochrome -- * output. The result is probably unpleasant if the glyph is rendered -- * in non-monochrome modes. -- * -- * Note that for outline fonts only the TrueType font driver has proper -- * monochrome hinting support, provided the TTFs contain hints for B/W -- * rendering (which most fonts no longer provide). If these conditions -- * are not met it is very likely that you get ugly results at smaller -- * sizes. -- * -- * FT_LOAD_TARGET_LCD :: -- * A variant of @FT_LOAD_TARGET_LIGHT optimized for horizontally -- * decimated LCD displays. -- * -- * FT_LOAD_TARGET_LCD_V :: -- * A variant of @FT_LOAD_TARGET_NORMAL optimized for vertically -- * decimated LCD displays. -- * -- * @note: -- * You should use only _one_ of the `FT_LOAD_TARGET_XXX` values in your -- * `load_flags`. They can't be ORed. -- * -- * If @FT_LOAD_RENDER is also set, the glyph is rendered in the -- * corresponding mode (i.e., the mode that matches the used algorithm -- * best). An exception is `FT_LOAD_TARGET_MONO` since it implies -- * @FT_LOAD_MONOCHROME. -- * -- * You can use a hinting algorithm that doesn't correspond to the same -- * rendering mode. As an example, it is possible to use the 'light' -- * hinting algorithm and have the results rendered in horizontal LCD -- * pixel mode, with code like -- * -- * ``` -- * FT_Load_Glyph( face, glyph_index, -- * load_flags | FT_LOAD_TARGET_LIGHT ); -- * -- * FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD ); -- * ``` -- * -- * In general, you should stick with one rendering mode. For example, -- * switching between @FT_LOAD_TARGET_NORMAL and @FT_LOAD_TARGET_MONO -- * enforces a lot of recomputation for TrueType fonts, which is slow. -- * Another reason is caching: Selecting a different mode usually causes -- * changes in both the outlines and the rasterized bitmaps; it is thus -- * necessary to empty the cache after a mode switch to avoid false hits. -- * -- --************************************************************************* -- * -- * @macro: -- * FT_LOAD_TARGET_MODE -- * -- * @description: -- * Return the @FT_Render_Mode corresponding to a given -- * @FT_LOAD_TARGET_XXX value. -- * -- --************************************************************************* -- * -- * @function: -- * FT_Set_Transform -- * -- * @description: -- * Set the transformation that is applied to glyph images when they are -- * loaded into a glyph slot through @FT_Load_Glyph. -- * -- * @inout: -- * face :: -- * A handle to the source face object. -- * -- * @input: -- * matrix :: -- * A pointer to the transformation's 2x2 matrix. Use `NULL` for the -- * identity matrix. -- * delta :: -- * A pointer to the translation vector. Use `NULL` for the null vector. -- * -- * @note: -- * This function is provided as a convenience, but keep in mind that -- * @FT_Matrix coefficients are only 16.16 fixed point values, which can -- * limit the accuracy of the results. Using floating-point computations -- * to perform the transform directly in client code instead will always -- * yield better numbers. -- * -- * The transformation is only applied to scalable image formats after the -- * glyph has been loaded. It means that hinting is unaltered by the -- * transformation and is performed on the character size given in the -- * last call to @FT_Set_Char_Size or @FT_Set_Pixel_Sizes. -- * -- * Note that this also transforms the `face.glyph.advance` field, but -- * **not** the values in `face.glyph.metrics`. -- procedure FT_Set_Transform (face : FT_Face; matrix : access fttypes.FT_Matrix; c_delta : access ftimage.FT_Vector) -- /usr/include/freetype2/freetype/freetype.h:3193 with Import => True, Convention => C, External_Name => "FT_Set_Transform"; --************************************************************************* -- * -- * @enum: -- * FT_Render_Mode -- * -- * @description: -- * Render modes supported by FreeType~2. Each mode corresponds to a -- * specific type of scanline conversion performed on the outline. -- * -- * For bitmap fonts and embedded bitmaps the `bitmap->pixel_mode` field -- * in the @FT_GlyphSlotRec structure gives the format of the returned -- * bitmap. -- * -- * All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity, -- * indicating pixel coverage. Use linear alpha blending and gamma -- * correction to correctly render non-monochrome glyph bitmaps onto a -- * surface; see @FT_Render_Glyph. -- * -- * @values: -- * FT_RENDER_MODE_NORMAL :: -- * Default render mode; it corresponds to 8-bit anti-aliased bitmaps. -- * -- * FT_RENDER_MODE_LIGHT :: -- * This is equivalent to @FT_RENDER_MODE_NORMAL. It is only defined as -- * a separate value because render modes are also used indirectly to -- * define hinting algorithm selectors. See @FT_LOAD_TARGET_XXX for -- * details. -- * -- * FT_RENDER_MODE_MONO :: -- * This mode corresponds to 1-bit bitmaps (with 2~levels of opacity). -- * -- * FT_RENDER_MODE_LCD :: -- * This mode corresponds to horizontal RGB and BGR subpixel displays -- * like LCD screens. It produces 8-bit bitmaps that are 3~times the -- * width of the original glyph outline in pixels, and which use the -- * @FT_PIXEL_MODE_LCD mode. -- * -- * FT_RENDER_MODE_LCD_V :: -- * This mode corresponds to vertical RGB and BGR subpixel displays -- * (like PDA screens, rotated LCD displays, etc.). It produces 8-bit -- * bitmaps that are 3~times the height of the original glyph outline in -- * pixels and use the @FT_PIXEL_MODE_LCD_V mode. -- * -- * @note: -- * The selected render mode only affects vector glyphs of a font. -- * Embedded bitmaps often have a different pixel mode like -- * @FT_PIXEL_MODE_MONO. You can use @FT_Bitmap_Convert to transform them -- * into 8-bit pixmaps. -- type FT_Render_Mode_u is (FT_RENDER_MODE_NORMAL, FT_RENDER_MODE_LIGHT, FT_RENDER_MODE_MONO, FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V, FT_RENDER_MODE_MAX) with Convention => C; -- /usr/include/freetype2/freetype/freetype.h:3247 subtype FT_Render_Mode is FT_Render_Mode_u; -- /usr/include/freetype2/freetype/freetype.h:3257 -- these constants are deprecated; use the corresponding -- `FT_Render_Mode` values instead --************************************************************************* -- * -- * @function: -- * FT_Render_Glyph -- * -- * @description: -- * Convert a given glyph image to a bitmap. It does so by inspecting the -- * glyph image format, finding the relevant renderer, and invoking it. -- * -- * @inout: -- * slot :: -- * A handle to the glyph slot containing the image to convert. -- * -- * @input: -- * render_mode :: -- * The render mode used to render the glyph image into a bitmap. See -- * @FT_Render_Mode for a list of possible values. -- * -- * If @FT_RENDER_MODE_NORMAL is used, a previous call of @FT_Load_Glyph -- * with flag @FT_LOAD_COLOR makes FT_Render_Glyph provide a default -- * blending of colored glyph layers associated with the current glyph -- * slot (provided the font contains such layers) instead of rendering -- * the glyph slot's outline. This is an experimental feature; see -- * @FT_LOAD_COLOR for more information. -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @note: -- * To get meaningful results, font scaling values must be set with -- * functions like @FT_Set_Char_Size before calling `FT_Render_Glyph`. -- * -- * When FreeType outputs a bitmap of a glyph, it really outputs an alpha -- * coverage map. If a pixel is completely covered by a filled-in -- * outline, the bitmap contains 0xFF at that pixel, meaning that -- * 0xFF/0xFF fraction of that pixel is covered, meaning the pixel is 100% -- * black (or 0% bright). If a pixel is only 50% covered (value 0x80), -- * the pixel is made 50% black (50% bright or a middle shade of grey). -- * 0% covered means 0% black (100% bright or white). -- * -- * On high-DPI screens like on smartphones and tablets, the pixels are so -- * small that their chance of being completely covered and therefore -- * completely black are fairly good. On the low-DPI screens, however, -- * the situation is different. The pixels are too large for most of the -- * details of a glyph and shades of gray are the norm rather than the -- * exception. -- * -- * This is relevant because all our screens have a second problem: they -- * are not linear. 1~+~1 is not~2. Twice the value does not result in -- * twice the brightness. When a pixel is only 50% covered, the coverage -- * map says 50% black, and this translates to a pixel value of 128 when -- * you use 8~bits per channel (0-255). However, this does not translate -- * to 50% brightness for that pixel on our sRGB and gamma~2.2 screens. -- * Due to their non-linearity, they dwell longer in the darks and only a -- * pixel value of about 186 results in 50% brightness -- 128 ends up too -- * dark on both bright and dark backgrounds. The net result is that dark -- * text looks burnt-out, pixely and blotchy on bright background, bright -- * text too frail on dark backgrounds, and colored text on colored -- * background (for example, red on green) seems to have dark halos or -- * 'dirt' around it. The situation is especially ugly for diagonal stems -- * like in 'w' glyph shapes where the quality of FreeType's anti-aliasing -- * depends on the correct display of grays. On high-DPI screens where -- * smaller, fully black pixels reign supreme, this doesn't matter, but on -- * our low-DPI screens with all the gray shades, it does. 0% and 100% -- * brightness are the same things in linear and non-linear space, just -- * all the shades in-between aren't. -- * -- * The blending function for placing text over a background is -- * -- * ``` -- * dst = alpha * src + (1 - alpha) * dst , -- * ``` -- * -- * which is known as the OVER operator. -- * -- * To correctly composite an antialiased pixel of a glyph onto a surface, -- * -- * 1. take the foreground and background colors (e.g., in sRGB space) -- * and apply gamma to get them in a linear space, -- * -- * 2. use OVER to blend the two linear colors using the glyph pixel -- * as the alpha value (remember, the glyph bitmap is an alpha coverage -- * bitmap), and -- * -- * 3. apply inverse gamma to the blended pixel and write it back to -- * the image. -- * -- * Internal testing at Adobe found that a target inverse gamma of~1.8 for -- * step~3 gives good results across a wide range of displays with an sRGB -- * gamma curve or a similar one. -- * -- * This process can cost performance. There is an approximation that -- * does not need to know about the background color; see -- * https://bel.fi/alankila/lcd/ and -- * https://bel.fi/alankila/lcd/alpcor.html for details. -- * -- * **ATTENTION**: Linear blending is even more important when dealing -- * with subpixel-rendered glyphs to prevent color-fringing! A -- * subpixel-rendered glyph must first be filtered with a filter that -- * gives equal weight to the three color primaries and does not exceed a -- * sum of 0x100, see section @lcd_rendering. Then the only difference to -- * gray linear blending is that subpixel-rendered linear blending is done -- * 3~times per pixel: red foreground subpixel to red background subpixel -- * and so on for green and blue. -- function FT_Render_Glyph (slot : FT_GlyphSlot; render_mode : FT_Render_Mode) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:3372 with Import => True, Convention => C, External_Name => "FT_Render_Glyph"; --************************************************************************* -- * -- * @enum: -- * FT_Kerning_Mode -- * -- * @description: -- * An enumeration to specify the format of kerning values returned by -- * @FT_Get_Kerning. -- * -- * @values: -- * FT_KERNING_DEFAULT :: -- * Return grid-fitted kerning distances in 26.6 fractional pixels. -- * -- * FT_KERNING_UNFITTED :: -- * Return un-grid-fitted kerning distances in 26.6 fractional pixels. -- * -- * FT_KERNING_UNSCALED :: -- * Return the kerning vector in original font units. -- * -- * @note: -- * `FT_KERNING_DEFAULT` returns full pixel values; it also makes FreeType -- * heuristically scale down kerning distances at small ppem values so -- * that they don't become too big. -- * -- * Both `FT_KERNING_DEFAULT` and `FT_KERNING_UNFITTED` use the current -- * horizontal scaling factor (as set e.g. with @FT_Set_Char_Size) to -- * convert font units to pixels. -- type FT_Kerning_Mode_u is (FT_KERNING_DEFAULT, FT_KERNING_UNFITTED, FT_KERNING_UNSCALED) with Convention => C; -- /usr/include/freetype2/freetype/freetype.h:3404 subtype FT_Kerning_Mode is FT_Kerning_Mode_u; -- /usr/include/freetype2/freetype/freetype.h:3410 -- these constants are deprecated; use the corresponding -- `FT_Kerning_Mode` values instead --************************************************************************* -- * -- * @function: -- * FT_Get_Kerning -- * -- * @description: -- * Return the kerning vector between two glyphs of the same face. -- * -- * @input: -- * face :: -- * A handle to a source face object. -- * -- * left_glyph :: -- * The index of the left glyph in the kern pair. -- * -- * right_glyph :: -- * The index of the right glyph in the kern pair. -- * -- * kern_mode :: -- * See @FT_Kerning_Mode for more information. Determines the scale and -- * dimension of the returned kerning vector. -- * -- * @output: -- * akerning :: -- * The kerning vector. This is either in font units, fractional pixels -- * (26.6 format), or pixels for scalable formats, and in pixels for -- * fixed-sizes formats. -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @note: -- * Only horizontal layouts (left-to-right & right-to-left) are supported -- * by this method. Other layouts, or more sophisticated kernings, are -- * out of the scope of this API function -- they can be implemented -- * through format-specific interfaces. -- * -- * Kerning for OpenType fonts implemented in a 'GPOS' table is not -- * supported; use @FT_HAS_KERNING to find out whether a font has data -- * that can be extracted with `FT_Get_Kerning`. -- function FT_Get_Kerning (face : FT_Face; left_glyph : fttypes.FT_UInt; right_glyph : fttypes.FT_UInt; kern_mode : fttypes.FT_UInt; akerning : access ftimage.FT_Vector) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:3462 with Import => True, Convention => C, External_Name => "FT_Get_Kerning"; --************************************************************************* -- * -- * @function: -- * FT_Get_Track_Kerning -- * -- * @description: -- * Return the track kerning for a given face object at a given size. -- * -- * @input: -- * face :: -- * A handle to a source face object. -- * -- * point_size :: -- * The point size in 16.16 fractional points. -- * -- * degree :: -- * The degree of tightness. Increasingly negative values represent -- * tighter track kerning, while increasingly positive values represent -- * looser track kerning. Value zero means no track kerning. -- * -- * @output: -- * akerning :: -- * The kerning in 16.16 fractional points, to be uniformly applied -- * between all glyphs. -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @note: -- * Currently, only the Type~1 font driver supports track kerning, using -- * data from AFM files (if attached with @FT_Attach_File or -- * @FT_Attach_Stream). -- * -- * Only very few AFM files come with track kerning data; please refer to -- * Adobe's AFM specification for more details. -- function FT_Get_Track_Kerning (face : FT_Face; point_size : fttypes.FT_Fixed; degree : fttypes.FT_Int; akerning : access fttypes.FT_Fixed) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:3506 with Import => True, Convention => C, External_Name => "FT_Get_Track_Kerning"; --************************************************************************* -- * -- * @function: -- * FT_Get_Glyph_Name -- * -- * @description: -- * Retrieve the ASCII name of a given glyph in a face. This only works -- * for those faces where @FT_HAS_GLYPH_NAMES(face) returns~1. -- * -- * @input: -- * face :: -- * A handle to a source face object. -- * -- * glyph_index :: -- * The glyph index. -- * -- * buffer_max :: -- * The maximum number of bytes available in the buffer. -- * -- * @output: -- * buffer :: -- * A pointer to a target buffer where the name is copied to. -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @note: -- * An error is returned if the face doesn't provide glyph names or if the -- * glyph index is invalid. In all cases of failure, the first byte of -- * `buffer` is set to~0 to indicate an empty name. -- * -- * The glyph name is truncated to fit within the buffer if it is too -- * long. The returned string is always zero-terminated. -- * -- * Be aware that FreeType reorders glyph indices internally so that glyph -- * index~0 always corresponds to the 'missing glyph' (called '.notdef'). -- * -- * This function always returns an error if the config macro -- * `FT_CONFIG_OPTION_NO_GLYPH_NAMES` is not defined in `ftoption.h`. -- function FT_Get_Glyph_Name (face : FT_Face; glyph_index : fttypes.FT_UInt; buffer : fttypes.FT_Pointer; buffer_max : fttypes.FT_UInt) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:3553 with Import => True, Convention => C, External_Name => "FT_Get_Glyph_Name"; --************************************************************************* -- * -- * @function: -- * FT_Get_Postscript_Name -- * -- * @description: -- * Retrieve the ASCII PostScript name of a given face, if available. -- * This only works with PostScript, TrueType, and OpenType fonts. -- * -- * @input: -- * face :: -- * A handle to the source face object. -- * -- * @return: -- * A pointer to the face's PostScript name. `NULL` if unavailable. -- * -- * @note: -- * The returned pointer is owned by the face and is destroyed with it. -- * -- * For variation fonts, this string changes if you select a different -- * instance, and you have to call `FT_Get_PostScript_Name` again to -- * retrieve it. FreeType follows Adobe TechNote #5902, 'Generating -- * PostScript Names for Fonts Using OpenType Font Variations'. -- * -- * https://download.macromedia.com/pub/developer/opentype/tech-notes/5902.AdobePSNameGeneration.html -- * -- * [Since 2.9] Special PostScript names for named instances are only -- * returned if the named instance is set with @FT_Set_Named_Instance (and -- * the font has corresponding entries in its 'fvar' table). If -- * @FT_IS_VARIATION returns true, the algorithmically derived PostScript -- * name is provided, not looking up special entries for named instances. -- function FT_Get_Postscript_Name (face : FT_Face) return Interfaces.C.Strings.chars_ptr -- /usr/include/freetype2/freetype/freetype.h:3592 with Import => True, Convention => C, External_Name => "FT_Get_Postscript_Name"; --************************************************************************* -- * -- * @function: -- * FT_Select_Charmap -- * -- * @description: -- * Select a given charmap by its encoding tag (as listed in -- * `freetype.h`). -- * -- * @inout: -- * face :: -- * A handle to the source face object. -- * -- * @input: -- * encoding :: -- * A handle to the selected encoding. -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @note: -- * This function returns an error if no charmap in the face corresponds -- * to the encoding queried here. -- * -- * Because many fonts contain more than a single cmap for Unicode -- * encoding, this function has some special code to select the one that -- * covers Unicode best ('best' in the sense that a UCS-4 cmap is -- * preferred to a UCS-2 cmap). It is thus preferable to @FT_Set_Charmap -- * in this case. -- function FT_Select_Charmap (face : FT_Face; encoding : FT_Encoding) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:3626 with Import => True, Convention => C, External_Name => "FT_Select_Charmap"; --************************************************************************* -- * -- * @function: -- * FT_Set_Charmap -- * -- * @description: -- * Select a given charmap for character code to glyph index mapping. -- * -- * @inout: -- * face :: -- * A handle to the source face object. -- * -- * @input: -- * charmap :: -- * A handle to the selected charmap. -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @note: -- * This function returns an error if the charmap is not part of the face -- * (i.e., if it is not listed in the `face->charmaps` table). -- * -- * It also fails if an OpenType type~14 charmap is selected (which -- * doesn't map character codes to glyph indices at all). -- function FT_Set_Charmap (face : FT_Face; charmap : FT_CharMap) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:3657 with Import => True, Convention => C, External_Name => "FT_Set_Charmap"; --************************************************************************* -- * -- * @function: -- * FT_Get_Charmap_Index -- * -- * @description: -- * Retrieve index of a given charmap. -- * -- * @input: -- * charmap :: -- * A handle to a charmap. -- * -- * @return: -- * The index into the array of character maps within the face to which -- * `charmap` belongs. If an error occurs, -1 is returned. -- * -- function FT_Get_Charmap_Index (charmap : FT_CharMap) return fttypes.FT_Int -- /usr/include/freetype2/freetype/freetype.h:3679 with Import => True, Convention => C, External_Name => "FT_Get_Charmap_Index"; --************************************************************************* -- * -- * @function: -- * FT_Get_Char_Index -- * -- * @description: -- * Return the glyph index of a given character code. This function uses -- * the currently selected charmap to do the mapping. -- * -- * @input: -- * face :: -- * A handle to the source face object. -- * -- * charcode :: -- * The character code. -- * -- * @return: -- * The glyph index. 0~means 'undefined character code'. -- * -- * @note: -- * If you use FreeType to manipulate the contents of font files directly, -- * be aware that the glyph index returned by this function doesn't always -- * correspond to the internal indices used within the file. This is done -- * to ensure that value~0 always corresponds to the 'missing glyph'. If -- * the first glyph is not named '.notdef', then for Type~1 and Type~42 -- * fonts, '.notdef' will be moved into the glyph ID~0 position, and -- * whatever was there will be moved to the position '.notdef' had. For -- * Type~1 fonts, if there is no '.notdef' glyph at all, then one will be -- * created at index~0 and whatever was there will be moved to the last -- * index -- Type~42 fonts are considered invalid under this condition. -- function FT_Get_Char_Index (face : FT_Face; charcode : fttypes.FT_ULong) return fttypes.FT_UInt -- /usr/include/freetype2/freetype/freetype.h:3714 with Import => True, Convention => C, External_Name => "FT_Get_Char_Index"; --************************************************************************* -- * -- * @function: -- * FT_Get_First_Char -- * -- * @description: -- * Return the first character code in the current charmap of a given -- * face, together with its corresponding glyph index. -- * -- * @input: -- * face :: -- * A handle to the source face object. -- * -- * @output: -- * agindex :: -- * Glyph index of first character code. 0~if charmap is empty. -- * -- * @return: -- * The charmap's first character code. -- * -- * @note: -- * You should use this function together with @FT_Get_Next_Char to parse -- * all character codes available in a given charmap. The code should -- * look like this: -- * -- * ``` -- * FT_ULong charcode; -- * FT_UInt gindex; -- * -- * -- * charcode = FT_Get_First_Char( face, &gindex ); -- * while ( gindex != 0 ) -- * { -- * ... do something with (charcode,gindex) pair ... -- * -- * charcode = FT_Get_Next_Char( face, charcode, &gindex ); -- * } -- * ``` -- * -- * Be aware that character codes can have values up to 0xFFFFFFFF; this -- * might happen for non-Unicode or malformed cmaps. However, even with -- * regular Unicode encoding, so-called 'last resort fonts' (using SFNT -- * cmap format 13, see function @FT_Get_CMap_Format) normally have -- * entries for all Unicode characters up to 0x1FFFFF, which can cause *a -- * lot* of iterations. -- * -- * Note that `*agindex` is set to~0 if the charmap is empty. The result -- * itself can be~0 in two cases: if the charmap is empty or if the -- * value~0 is the first valid character code. -- function FT_Get_First_Char (face : FT_Face; agindex : access fttypes.FT_UInt) return fttypes.FT_ULong -- /usr/include/freetype2/freetype/freetype.h:3769 with Import => True, Convention => C, External_Name => "FT_Get_First_Char"; --************************************************************************* -- * -- * @function: -- * FT_Get_Next_Char -- * -- * @description: -- * Return the next character code in the current charmap of a given face -- * following the value `char_code`, as well as the corresponding glyph -- * index. -- * -- * @input: -- * face :: -- * A handle to the source face object. -- * -- * char_code :: -- * The starting character code. -- * -- * @output: -- * agindex :: -- * Glyph index of next character code. 0~if charmap is empty. -- * -- * @return: -- * The charmap's next character code. -- * -- * @note: -- * You should use this function with @FT_Get_First_Char to walk over all -- * character codes available in a given charmap. See the note for that -- * function for a simple code example. -- * -- * Note that `*agindex` is set to~0 when there are no more codes in the -- * charmap. -- function FT_Get_Next_Char (face : FT_Face; char_code : fttypes.FT_ULong; agindex : access fttypes.FT_UInt) return fttypes.FT_ULong -- /usr/include/freetype2/freetype/freetype.h:3806 with Import => True, Convention => C, External_Name => "FT_Get_Next_Char"; --************************************************************************* -- * -- * @function: -- * FT_Face_Properties -- * -- * @description: -- * Set or override certain (library or module-wide) properties on a -- * face-by-face basis. Useful for finer-grained control and avoiding -- * locks on shared structures (threads can modify their own faces as they -- * see fit). -- * -- * Contrary to @FT_Property_Set, this function uses @FT_Parameter so that -- * you can pass multiple properties to the target face in one call. Note -- * that only a subset of the available properties can be controlled. -- * -- * * @FT_PARAM_TAG_STEM_DARKENING (stem darkening, corresponding to the -- * property `no-stem-darkening` provided by the 'autofit', 'cff', -- * 'type1', and 't1cid' modules; see @no-stem-darkening). -- * -- * * @FT_PARAM_TAG_LCD_FILTER_WEIGHTS (LCD filter weights, corresponding -- * to function @FT_Library_SetLcdFilterWeights). -- * -- * * @FT_PARAM_TAG_RANDOM_SEED (seed value for the CFF, Type~1, and CID -- * 'random' operator, corresponding to the `random-seed` property -- * provided by the 'cff', 'type1', and 't1cid' modules; see -- * @random-seed). -- * -- * Pass `NULL` as `data` in @FT_Parameter for a given tag to reset the -- * option and use the library or module default again. -- * -- * @input: -- * face :: -- * A handle to the source face object. -- * -- * num_properties :: -- * The number of properties that follow. -- * -- * properties :: -- * A handle to an @FT_Parameter array with `num_properties` elements. -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @example: -- * Here is an example that sets three properties. You must define -- * `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` to make the LCD filter examples -- * work. -- * -- * ``` -- * FT_Parameter property1; -- * FT_Bool darken_stems = 1; -- * -- * FT_Parameter property2; -- * FT_LcdFiveTapFilter custom_weight = -- * { 0x11, 0x44, 0x56, 0x44, 0x11 }; -- * -- * FT_Parameter property3; -- * FT_Int32 random_seed = 314159265; -- * -- * FT_Parameter properties[3] = { property1, -- * property2, -- * property3 }; -- * -- * -- * property1.tag = FT_PARAM_TAG_STEM_DARKENING; -- * property1.data = &darken_stems; -- * -- * property2.tag = FT_PARAM_TAG_LCD_FILTER_WEIGHTS; -- * property2.data = custom_weight; -- * -- * property3.tag = FT_PARAM_TAG_RANDOM_SEED; -- * property3.data = &random_seed; -- * -- * FT_Face_Properties( face, 3, properties ); -- * ``` -- * -- * The next example resets a single property to its default value. -- * -- * ``` -- * FT_Parameter property; -- * -- * -- * property.tag = FT_PARAM_TAG_LCD_FILTER_WEIGHTS; -- * property.data = NULL; -- * -- * FT_Face_Properties( face, 1, &property ); -- * ``` -- * -- * @since: -- * 2.8 -- * -- function FT_Face_Properties (face : FT_Face; num_properties : fttypes.FT_UInt; properties : access FT_Parameter) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:3904 with Import => True, Convention => C, External_Name => "FT_Face_Properties"; --************************************************************************* -- * -- * @function: -- * FT_Get_Name_Index -- * -- * @description: -- * Return the glyph index of a given glyph name. -- * -- * @input: -- * face :: -- * A handle to the source face object. -- * -- * glyph_name :: -- * The glyph name. -- * -- * @return: -- * The glyph index. 0~means 'undefined character code'. -- function FT_Get_Name_Index (face : FT_Face; glyph_name : access fttypes.FT_String) return fttypes.FT_UInt -- /usr/include/freetype2/freetype/freetype.h:3928 with Import => True, Convention => C, External_Name => "FT_Get_Name_Index"; --************************************************************************* -- * -- * @enum: -- * FT_SUBGLYPH_FLAG_XXX -- * -- * @description: -- * A list of constants describing subglyphs. Please refer to the 'glyf' -- * table description in the OpenType specification for the meaning of the -- * various flags (which get synthesized for non-OpenType subglyphs). -- * -- * https://docs.microsoft.com/en-us/typography/opentype/spec/glyf#composite-glyph-description -- * -- * @values: -- * FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS :: -- * FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES :: -- * FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID :: -- * FT_SUBGLYPH_FLAG_SCALE :: -- * FT_SUBGLYPH_FLAG_XY_SCALE :: -- * FT_SUBGLYPH_FLAG_2X2 :: -- * FT_SUBGLYPH_FLAG_USE_MY_METRICS :: -- * -- --************************************************************************* -- * -- * @function: -- * FT_Get_SubGlyph_Info -- * -- * @description: -- * Retrieve a description of a given subglyph. Only use it if -- * `glyph->format` is @FT_GLYPH_FORMAT_COMPOSITE; an error is returned -- * otherwise. -- * -- * @input: -- * glyph :: -- * The source glyph slot. -- * -- * sub_index :: -- * The index of the subglyph. Must be less than -- * `glyph->num_subglyphs`. -- * -- * @output: -- * p_index :: -- * The glyph index of the subglyph. -- * -- * p_flags :: -- * The subglyph flags, see @FT_SUBGLYPH_FLAG_XXX. -- * -- * p_arg1 :: -- * The subglyph's first argument (if any). -- * -- * p_arg2 :: -- * The subglyph's second argument (if any). -- * -- * p_transform :: -- * The subglyph transformation (if any). -- * -- * @return: -- * FreeType error code. 0~means success. -- * -- * @note: -- * The values of `*p_arg1`, `*p_arg2`, and `*p_transform` must be -- * interpreted depending on the flags returned in `*p_flags`. See the -- * OpenType specification for details. -- * -- * https://docs.microsoft.com/en-us/typography/opentype/spec/glyf#composite-glyph-description -- * -- function FT_Get_SubGlyph_Info (glyph : FT_GlyphSlot; sub_index : fttypes.FT_UInt; p_index : access fttypes.FT_Int; p_flags : access fttypes.FT_UInt; p_arg1 : access fttypes.FT_Int; p_arg2 : access fttypes.FT_Int; p_transform : access fttypes.FT_Matrix) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:4009 with Import => True, Convention => C, External_Name => "FT_Get_SubGlyph_Info"; --************************************************************************* -- * -- * @section: -- * layer_management -- * -- * @title: -- * Glyph Layer Management -- * -- * @abstract: -- * Retrieving and manipulating OpenType's 'COLR' table data. -- * -- * @description: -- * The functions described here allow access of colored glyph layer data -- * in OpenType's 'COLR' tables. -- --************************************************************************* -- * -- * @struct: -- * FT_LayerIterator -- * -- * @description: -- * This iterator object is needed for @FT_Get_Color_Glyph_Layer. -- * -- * @fields: -- * num_layers :: -- * The number of glyph layers for the requested glyph index. Will be -- * set by @FT_Get_Color_Glyph_Layer. -- * -- * layer :: -- * The current layer. Will be set by @FT_Get_Color_Glyph_Layer. -- * -- * p :: -- * An opaque pointer into 'COLR' table data. The caller must set this -- * to `NULL` before the first call of @FT_Get_Color_Glyph_Layer. -- type FT_LayerIterator_u is record num_layers : aliased fttypes.FT_UInt; -- /usr/include/freetype2/freetype/freetype.h:4057 layer : aliased fttypes.FT_UInt; -- /usr/include/freetype2/freetype/freetype.h:4058 p : access fttypes.FT_Byte; -- /usr/include/freetype2/freetype/freetype.h:4059 end record with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:4055 subtype FT_LayerIterator is FT_LayerIterator_u; -- /usr/include/freetype2/freetype/freetype.h:4061 --************************************************************************* -- * -- * @function: -- * FT_Get_Color_Glyph_Layer -- * -- * @description: -- * This is an interface to the 'COLR' table in OpenType fonts to -- * iteratively retrieve the colored glyph layers associated with the -- * current glyph slot. -- * -- * https://docs.microsoft.com/en-us/typography/opentype/spec/colr -- * -- * The glyph layer data for a given glyph index, if present, provides an -- * alternative, multi-color glyph representation: Instead of rendering -- * the outline or bitmap with the given glyph index, glyphs with the -- * indices and colors returned by this function are rendered layer by -- * layer. -- * -- * The returned elements are ordered in the z~direction from bottom to -- * top; the 'n'th element should be rendered with the associated palette -- * color and blended on top of the already rendered layers (elements 0, -- * 1, ..., n-1). -- * -- * @input: -- * face :: -- * A handle to the parent face object. -- * -- * base_glyph :: -- * The glyph index the colored glyph layers are associated with. -- * -- * @inout: -- * iterator :: -- * An @FT_LayerIterator object. For the first call you should set -- * `iterator->p` to `NULL`. For all following calls, simply use the -- * same object again. -- * -- * @output: -- * aglyph_index :: -- * The glyph index of the current layer. -- * -- * acolor_index :: -- * The color index into the font face's color palette of the current -- * layer. The value 0xFFFF is special; it doesn't reference a palette -- * entry but indicates that the text foreground color should be used -- * instead (to be set up by the application outside of FreeType). -- * -- * The color palette can be retrieved with @FT_Palette_Select. -- * -- * @return: -- * Value~1 if everything is OK. If there are no more layers (or if there -- * are no layers at all), value~0 gets returned. In case of an error, -- * value~0 is returned also. -- * -- * @note: -- * This function is necessary if you want to handle glyph layers by -- * yourself. In particular, functions that operate with @FT_GlyphRec -- * objects (like @FT_Get_Glyph or @FT_Glyph_To_Bitmap) don't have access -- * to this information. -- * -- * Note that @FT_Render_Glyph is able to handle colored glyph layers -- * automatically if the @FT_LOAD_COLOR flag is passed to a previous call -- * to @FT_Load_Glyph. [This is an experimental feature.] -- * -- * @example: -- * ``` -- * FT_Color* palette; -- * FT_LayerIterator iterator; -- * -- * FT_Bool have_layers; -- * FT_UInt layer_glyph_index; -- * FT_UInt layer_color_index; -- * -- * -- * error = FT_Palette_Select( face, palette_index, &palette ); -- * if ( error ) -- * palette = NULL; -- * -- * iterator.p = NULL; -- * have_layers = FT_Get_Color_Glyph_Layer( face, -- * glyph_index, -- * &layer_glyph_index, -- * &layer_color_index, -- * &iterator ); -- * -- * if ( palette && have_layers ) -- * { -- * do -- * { -- * FT_Color layer_color; -- * -- * -- * if ( layer_color_index == 0xFFFF ) -- * layer_color = text_foreground_color; -- * else -- * layer_color = palette[layer_color_index]; -- * -- * // Load and render glyph `layer_glyph_index', then -- * // blend resulting pixmap (using color `layer_color') -- * // with previously created pixmaps. -- * -- * } while ( FT_Get_Color_Glyph_Layer( face, -- * glyph_index, -- * &layer_glyph_index, -- * &layer_color_index, -- * &iterator ) ); -- * } -- * ``` -- function FT_Get_Color_Glyph_Layer (face : FT_Face; base_glyph : fttypes.FT_UInt; aglyph_index : access fttypes.FT_UInt; acolor_index : access fttypes.FT_UInt; iterator : access FT_LayerIterator) return fttypes.FT_Bool -- /usr/include/freetype2/freetype/freetype.h:4173 with Import => True, Convention => C, External_Name => "FT_Get_Color_Glyph_Layer"; --************************************************************************* -- * -- * @section: -- * base_interface -- * -- --************************************************************************* -- * -- * @enum: -- * FT_FSTYPE_XXX -- * -- * @description: -- * A list of bit flags used in the `fsType` field of the OS/2 table in a -- * TrueType or OpenType font and the `FSType` entry in a PostScript font. -- * These bit flags are returned by @FT_Get_FSType_Flags; they inform -- * client applications of embedding and subsetting restrictions -- * associated with a font. -- * -- * See -- * https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf -- * for more details. -- * -- * @values: -- * FT_FSTYPE_INSTALLABLE_EMBEDDING :: -- * Fonts with no fsType bit set may be embedded and permanently -- * installed on the remote system by an application. -- * -- * FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING :: -- * Fonts that have only this bit set must not be modified, embedded or -- * exchanged in any manner without first obtaining permission of the -- * font software copyright owner. -- * -- * FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING :: -- * The font may be embedded and temporarily loaded on the remote -- * system. Documents containing Preview & Print fonts must be opened -- * 'read-only'; no edits can be applied to the document. -- * -- * FT_FSTYPE_EDITABLE_EMBEDDING :: -- * The font may be embedded but must only be installed temporarily on -- * other systems. In contrast to Preview & Print fonts, documents -- * containing editable fonts may be opened for reading, editing is -- * permitted, and changes may be saved. -- * -- * FT_FSTYPE_NO_SUBSETTING :: -- * The font may not be subsetted prior to embedding. -- * -- * FT_FSTYPE_BITMAP_EMBEDDING_ONLY :: -- * Only bitmaps contained in the font may be embedded; no outline data -- * may be embedded. If there are no bitmaps available in the font, -- * then the font is unembeddable. -- * -- * @note: -- * The flags are ORed together, thus more than a single value can be -- * returned. -- * -- * While the `fsType` flags can indicate that a font may be embedded, a -- * license with the font vendor may be separately required to use the -- * font in this way. -- --************************************************************************* -- * -- * @function: -- * FT_Get_FSType_Flags -- * -- * @description: -- * Return the `fsType` flags for a font. -- * -- * @input: -- * face :: -- * A handle to the source face object. -- * -- * @return: -- * The `fsType` flags, see @FT_FSTYPE_XXX. -- * -- * @note: -- * Use this function rather than directly reading the `fs_type` field in -- * the @PS_FontInfoRec structure, which is only guaranteed to return the -- * correct results for Type~1 fonts. -- * -- * @since: -- * 2.3.8 -- function FT_Get_FSType_Flags (face : FT_Face) return fttypes.FT_UShort -- /usr/include/freetype2/freetype/freetype.h:4272 with Import => True, Convention => C, External_Name => "FT_Get_FSType_Flags"; --************************************************************************* -- * -- * @section: -- * glyph_variants -- * -- * @title: -- * Unicode Variation Sequences -- * -- * @abstract: -- * The FreeType~2 interface to Unicode Variation Sequences (UVS), using -- * the SFNT cmap format~14. -- * -- * @description: -- * Many characters, especially for CJK scripts, have variant forms. They -- * are a sort of grey area somewhere between being totally irrelevant and -- * semantically distinct; for this reason, the Unicode consortium decided -- * to introduce Variation Sequences (VS), consisting of a Unicode base -- * character and a variation selector instead of further extending the -- * already huge number of characters. -- * -- * Unicode maintains two different sets, namely 'Standardized Variation -- * Sequences' and registered 'Ideographic Variation Sequences' (IVS), -- * collected in the 'Ideographic Variation Database' (IVD). -- * -- * https://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt -- * https://unicode.org/reports/tr37/ https://unicode.org/ivd/ -- * -- * To date (January 2017), the character with the most ideographic -- * variations is U+9089, having 32 such IVS. -- * -- * Three Mongolian Variation Selectors have the values U+180B-U+180D; 256 -- * generic Variation Selectors are encoded in the ranges U+FE00-U+FE0F -- * and U+E0100-U+E01EF. IVS currently use Variation Selectors from the -- * range U+E0100-U+E01EF only. -- * -- * A VS consists of the base character value followed by a single -- * Variation Selector. For example, to get the first variation of -- * U+9089, you have to write the character sequence `U+9089 U+E0100`. -- * -- * Adobe and MS decided to support both standardized and ideographic VS -- * with a new cmap subtable (format~14). It is an odd subtable because -- * it is not a mapping of input code points to glyphs, but contains lists -- * of all variations supported by the font. -- * -- * A variation may be either 'default' or 'non-default' for a given font. -- * A default variation is the one you will get for that code point if you -- * look it up in the standard Unicode cmap. A non-default variation is a -- * different glyph. -- * -- --************************************************************************* -- * -- * @function: -- * FT_Face_GetCharVariantIndex -- * -- * @description: -- * Return the glyph index of a given character code as modified by the -- * variation selector. -- * -- * @input: -- * face :: -- * A handle to the source face object. -- * -- * charcode :: -- * The character code point in Unicode. -- * -- * variantSelector :: -- * The Unicode code point of the variation selector. -- * -- * @return: -- * The glyph index. 0~means either 'undefined character code', or -- * 'undefined selector code', or 'no variation selector cmap subtable', -- * or 'current CharMap is not Unicode'. -- * -- * @note: -- * If you use FreeType to manipulate the contents of font files directly, -- * be aware that the glyph index returned by this function doesn't always -- * correspond to the internal indices used within the file. This is done -- * to ensure that value~0 always corresponds to the 'missing glyph'. -- * -- * This function is only meaningful if -- * a) the font has a variation selector cmap sub table, and -- * b) the current charmap has a Unicode encoding. -- * -- * @since: -- * 2.3.6 -- function FT_Face_GetCharVariantIndex (face : FT_Face; charcode : fttypes.FT_ULong; variantSelector : fttypes.FT_ULong) return fttypes.FT_UInt -- /usr/include/freetype2/freetype/freetype.h:4365 with Import => True, Convention => C, External_Name => "FT_Face_GetCharVariantIndex"; --************************************************************************* -- * -- * @function: -- * FT_Face_GetCharVariantIsDefault -- * -- * @description: -- * Check whether this variation of this Unicode character is the one to -- * be found in the charmap. -- * -- * @input: -- * face :: -- * A handle to the source face object. -- * -- * charcode :: -- * The character codepoint in Unicode. -- * -- * variantSelector :: -- * The Unicode codepoint of the variation selector. -- * -- * @return: -- * 1~if found in the standard (Unicode) cmap, 0~if found in the variation -- * selector cmap, or -1 if it is not a variation. -- * -- * @note: -- * This function is only meaningful if the font has a variation selector -- * cmap subtable. -- * -- * @since: -- * 2.3.6 -- function FT_Face_GetCharVariantIsDefault (face : FT_Face; charcode : fttypes.FT_ULong; variantSelector : fttypes.FT_ULong) return fttypes.FT_Int -- /usr/include/freetype2/freetype/freetype.h:4401 with Import => True, Convention => C, External_Name => "FT_Face_GetCharVariantIsDefault"; --************************************************************************* -- * -- * @function: -- * FT_Face_GetVariantSelectors -- * -- * @description: -- * Return a zero-terminated list of Unicode variation selectors found in -- * the font. -- * -- * @input: -- * face :: -- * A handle to the source face object. -- * -- * @return: -- * A pointer to an array of selector code points, or `NULL` if there is -- * no valid variation selector cmap subtable. -- * -- * @note: -- * The last item in the array is~0; the array is owned by the @FT_Face -- * object but can be overwritten or released on the next call to a -- * FreeType function. -- * -- * @since: -- * 2.3.6 -- function FT_Face_GetVariantSelectors (face : FT_Face) return access freetype_config_integer_types.FT_UInt32 -- /usr/include/freetype2/freetype/freetype.h:4432 with Import => True, Convention => C, External_Name => "FT_Face_GetVariantSelectors"; --************************************************************************* -- * -- * @function: -- * FT_Face_GetVariantsOfChar -- * -- * @description: -- * Return a zero-terminated list of Unicode variation selectors found for -- * the specified character code. -- * -- * @input: -- * face :: -- * A handle to the source face object. -- * -- * charcode :: -- * The character codepoint in Unicode. -- * -- * @return: -- * A pointer to an array of variation selector code points that are -- * active for the given character, or `NULL` if the corresponding list is -- * empty. -- * -- * @note: -- * The last item in the array is~0; the array is owned by the @FT_Face -- * object but can be overwritten or released on the next call to a -- * FreeType function. -- * -- * @since: -- * 2.3.6 -- function FT_Face_GetVariantsOfChar (face : FT_Face; charcode : fttypes.FT_ULong) return access freetype_config_integer_types.FT_UInt32 -- /usr/include/freetype2/freetype/freetype.h:4465 with Import => True, Convention => C, External_Name => "FT_Face_GetVariantsOfChar"; --************************************************************************* -- * -- * @function: -- * FT_Face_GetCharsOfVariant -- * -- * @description: -- * Return a zero-terminated list of Unicode character codes found for the -- * specified variation selector. -- * -- * @input: -- * face :: -- * A handle to the source face object. -- * -- * variantSelector :: -- * The variation selector code point in Unicode. -- * -- * @return: -- * A list of all the code points that are specified by this selector -- * (both default and non-default codes are returned) or `NULL` if there -- * is no valid cmap or the variation selector is invalid. -- * -- * @note: -- * The last item in the array is~0; the array is owned by the @FT_Face -- * object but can be overwritten or released on the next call to a -- * FreeType function. -- * -- * @since: -- * 2.3.6 -- function FT_Face_GetCharsOfVariant (face : FT_Face; variantSelector : fttypes.FT_ULong) return access freetype_config_integer_types.FT_UInt32 -- /usr/include/freetype2/freetype/freetype.h:4499 with Import => True, Convention => C, External_Name => "FT_Face_GetCharsOfVariant"; --************************************************************************* -- * -- * @section: -- * computations -- * -- * @title: -- * Computations -- * -- * @abstract: -- * Crunching fixed numbers and vectors. -- * -- * @description: -- * This section contains various functions used to perform computations -- * on 16.16 fixed-float numbers or 2d vectors. -- * -- * **Attention**: Most arithmetic functions take `FT_Long` as arguments. -- * For historical reasons, FreeType was designed under the assumption -- * that `FT_Long` is a 32-bit integer; results can thus be undefined if -- * the arguments don't fit into 32 bits. -- * -- * @order: -- * FT_MulDiv -- * FT_MulFix -- * FT_DivFix -- * FT_RoundFix -- * FT_CeilFix -- * FT_FloorFix -- * FT_Vector_Transform -- * FT_Matrix_Multiply -- * FT_Matrix_Invert -- * -- --************************************************************************* -- * -- * @function: -- * FT_MulDiv -- * -- * @description: -- * Compute `(a*b)/c` with maximum accuracy, using a 64-bit intermediate -- * integer whenever necessary. -- * -- * This function isn't necessarily as fast as some processor-specific -- * operations, but is at least completely portable. -- * -- * @input: -- * a :: -- * The first multiplier. -- * -- * b :: -- * The second multiplier. -- * -- * c :: -- * The divisor. -- * -- * @return: -- * The result of `(a*b)/c`. This function never traps when trying to -- * divide by zero; it simply returns 'MaxInt' or 'MinInt' depending on -- * the signs of `a` and `b`. -- function FT_MulDiv (a : fttypes.FT_Long; b : fttypes.FT_Long; c : fttypes.FT_Long) return fttypes.FT_Long -- /usr/include/freetype2/freetype/freetype.h:4565 with Import => True, Convention => C, External_Name => "FT_MulDiv"; --************************************************************************* -- * -- * @function: -- * FT_MulFix -- * -- * @description: -- * Compute `(a*b)/0x10000` with maximum accuracy. Its main use is to -- * multiply a given value by a 16.16 fixed-point factor. -- * -- * @input: -- * a :: -- * The first multiplier. -- * -- * b :: -- * The second multiplier. Use a 16.16 factor here whenever possible -- * (see note below). -- * -- * @return: -- * The result of `(a*b)/0x10000`. -- * -- * @note: -- * This function has been optimized for the case where the absolute value -- * of `a` is less than 2048, and `b` is a 16.16 scaling factor. As this -- * happens mainly when scaling from notional units to fractional pixels -- * in FreeType, it resulted in noticeable speed improvements between -- * versions 2.x and 1.x. -- * -- * As a conclusion, always try to place a 16.16 factor as the _second_ -- * argument of this function; this can make a great difference. -- function FT_MulFix (a : fttypes.FT_Long; b : fttypes.FT_Long) return fttypes.FT_Long -- /usr/include/freetype2/freetype/freetype.h:4601 with Import => True, Convention => C, External_Name => "FT_MulFix"; --************************************************************************* -- * -- * @function: -- * FT_DivFix -- * -- * @description: -- * Compute `(a*0x10000)/b` with maximum accuracy. Its main use is to -- * divide a given value by a 16.16 fixed-point factor. -- * -- * @input: -- * a :: -- * The numerator. -- * -- * b :: -- * The denominator. Use a 16.16 factor here. -- * -- * @return: -- * The result of `(a*0x10000)/b`. -- function FT_DivFix (a : fttypes.FT_Long; b : fttypes.FT_Long) return fttypes.FT_Long -- /usr/include/freetype2/freetype/freetype.h:4625 with Import => True, Convention => C, External_Name => "FT_DivFix"; --************************************************************************* -- * -- * @function: -- * FT_RoundFix -- * -- * @description: -- * Round a 16.16 fixed number. -- * -- * @input: -- * a :: -- * The number to be rounded. -- * -- * @return: -- * `a` rounded to the nearest 16.16 fixed integer, halfway cases away -- * from zero. -- * -- * @note: -- * The function uses wrap-around arithmetic. -- function FT_RoundFix (a : fttypes.FT_Fixed) return fttypes.FT_Fixed -- /usr/include/freetype2/freetype/freetype.h:4649 with Import => True, Convention => C, External_Name => "FT_RoundFix"; --************************************************************************* -- * -- * @function: -- * FT_CeilFix -- * -- * @description: -- * Compute the smallest following integer of a 16.16 fixed number. -- * -- * @input: -- * a :: -- * The number for which the ceiling function is to be computed. -- * -- * @return: -- * `a` rounded towards plus infinity. -- * -- * @note: -- * The function uses wrap-around arithmetic. -- function FT_CeilFix (a : fttypes.FT_Fixed) return fttypes.FT_Fixed -- /usr/include/freetype2/freetype/freetype.h:4671 with Import => True, Convention => C, External_Name => "FT_CeilFix"; --************************************************************************* -- * -- * @function: -- * FT_FloorFix -- * -- * @description: -- * Compute the largest previous integer of a 16.16 fixed number. -- * -- * @input: -- * a :: -- * The number for which the floor function is to be computed. -- * -- * @return: -- * `a` rounded towards minus infinity. -- function FT_FloorFix (a : fttypes.FT_Fixed) return fttypes.FT_Fixed -- /usr/include/freetype2/freetype/freetype.h:4690 with Import => True, Convention => C, External_Name => "FT_FloorFix"; --************************************************************************* -- * -- * @function: -- * FT_Vector_Transform -- * -- * @description: -- * Transform a single vector through a 2x2 matrix. -- * -- * @inout: -- * vector :: -- * The target vector to transform. -- * -- * @input: -- * matrix :: -- * A pointer to the source 2x2 matrix. -- * -- * @note: -- * The result is undefined if either `vector` or `matrix` is invalid. -- procedure FT_Vector_Transform (vector : access ftimage.FT_Vector; matrix : access constant fttypes.FT_Matrix) -- /usr/include/freetype2/freetype/freetype.h:4713 with Import => True, Convention => C, External_Name => "FT_Vector_Transform"; --************************************************************************* -- * -- * @section: -- * version -- * -- * @title: -- * FreeType Version -- * -- * @abstract: -- * Functions and macros related to FreeType versions. -- * -- * @description: -- * Note that those functions and macros are of limited use because even a -- * new release of FreeType with only documentation changes increases the -- * version number. -- * -- * @order: -- * FT_Library_Version -- * -- * FREETYPE_MAJOR -- * FREETYPE_MINOR -- * FREETYPE_PATCH -- * -- * FT_Face_CheckTrueTypePatents -- * FT_Face_SetUnpatentedHinting -- * -- --************************************************************************* -- * -- * @enum: -- * FREETYPE_XXX -- * -- * @description: -- * These three macros identify the FreeType source code version. Use -- * @FT_Library_Version to access them at runtime. -- * -- * @values: -- * FREETYPE_MAJOR :: -- * The major version number. -- * FREETYPE_MINOR :: -- * The minor version number. -- * FREETYPE_PATCH :: -- * The patch level. -- * -- * @note: -- * The version number of FreeType if built as a dynamic link library with -- * the 'libtool' package is _not_ controlled by these three macros. -- * -- --************************************************************************* -- * -- * @function: -- * FT_Library_Version -- * -- * @description: -- * Return the version of the FreeType library being used. This is useful -- * when dynamically linking to the library, since one cannot use the -- * macros @FREETYPE_MAJOR, @FREETYPE_MINOR, and @FREETYPE_PATCH. -- * -- * @input: -- * library :: -- * A source library handle. -- * -- * @output: -- * amajor :: -- * The major version number. -- * -- * aminor :: -- * The minor version number. -- * -- * apatch :: -- * The patch version number. -- * -- * @note: -- * The reason why this function takes a `library` argument is because -- * certain programs implement library initialization in a custom way that -- * doesn't use @FT_Init_FreeType. -- * -- * In such cases, the library version might not be available before the -- * library object has been created. -- procedure FT_Library_Version (library : FT_Library; amajor : access fttypes.FT_Int; aminor : access fttypes.FT_Int; apatch : access fttypes.FT_Int) -- /usr/include/freetype2/freetype/freetype.h:4806 with Import => True, Convention => C, External_Name => "FT_Library_Version"; --************************************************************************* -- * -- * @function: -- * FT_Face_CheckTrueTypePatents -- * -- * @description: -- * Deprecated, does nothing. -- * -- * @input: -- * face :: -- * A face handle. -- * -- * @return: -- * Always returns false. -- * -- * @note: -- * Since May 2010, TrueType hinting is no longer patented. -- * -- * @since: -- * 2.3.5 -- function FT_Face_CheckTrueTypePatents (face : FT_Face) return fttypes.FT_Bool -- /usr/include/freetype2/freetype/freetype.h:4834 with Import => True, Convention => C, External_Name => "FT_Face_CheckTrueTypePatents"; --************************************************************************* -- * -- * @function: -- * FT_Face_SetUnpatentedHinting -- * -- * @description: -- * Deprecated, does nothing. -- * -- * @input: -- * face :: -- * A face handle. -- * -- * value :: -- * New boolean setting. -- * -- * @return: -- * Always returns false. -- * -- * @note: -- * Since May 2010, TrueType hinting is no longer patented. -- * -- * @since: -- * 2.3.5 -- function FT_Face_SetUnpatentedHinting (face : FT_Face; value : fttypes.FT_Bool) return fttypes.FT_Bool -- /usr/include/freetype2/freetype/freetype.h:4862 with Import => True, Convention => C, External_Name => "FT_Face_SetUnpatentedHinting"; -- -- END end freetype;
charlie5/cBound
Ada
1,788
ads
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces; with swig; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_render_query_pict_index_values_reply_t is -- Item -- type Item is record response_type : aliased Interfaces.Unsigned_8; pad0 : aliased Interfaces.Unsigned_8; sequence : aliased Interfaces.Unsigned_16; length : aliased Interfaces.Unsigned_32; num_values : aliased Interfaces.Unsigned_32; pad1 : aliased swig.int8_t_Array (0 .. 19); end record; -- Item_Array -- type Item_Array is array (Interfaces.C .size_t range <>) of aliased xcb .xcb_render_query_pict_index_values_reply_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_render_query_pict_index_values_reply_t.Item, Element_Array => xcb.xcb_render_query_pict_index_values_reply_t.Item_Array, Default_Terminator => (others => <>)); subtype Pointer is C_Pointers.Pointer; -- Pointer_Array -- type Pointer_Array is array (Interfaces.C .size_t range <>) of aliased xcb .xcb_render_query_pict_index_values_reply_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_render_query_pict_index_values_reply_t.Pointer, Element_Array => xcb.xcb_render_query_pict_index_values_reply_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_render_query_pict_index_values_reply_t;
ekoeppen/STM32_Generic_Ada_Drivers
Ada
34,132
ads
-- This spec has been automatically generated from STM32F303xE.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with System; package STM32_SVD.RTC is pragma Preelaborate; --------------- -- Registers -- --------------- subtype TR_SU_Field is STM32_SVD.UInt4; subtype TR_ST_Field is STM32_SVD.UInt3; subtype TR_MNU_Field is STM32_SVD.UInt4; subtype TR_MNT_Field is STM32_SVD.UInt3; subtype TR_HU_Field is STM32_SVD.UInt4; subtype TR_HT_Field is STM32_SVD.UInt2; subtype TR_PM_Field is STM32_SVD.Bit; -- time register type TR_Register is record -- Second units in BCD format SU : TR_SU_Field := 16#0#; -- Second tens in BCD format ST : TR_ST_Field := 16#0#; -- unspecified Reserved_7_7 : STM32_SVD.Bit := 16#0#; -- Minute units in BCD format MNU : TR_MNU_Field := 16#0#; -- Minute tens in BCD format MNT : TR_MNT_Field := 16#0#; -- unspecified Reserved_15_15 : STM32_SVD.Bit := 16#0#; -- Hour units in BCD format HU : TR_HU_Field := 16#0#; -- Hour tens in BCD format HT : TR_HT_Field := 16#0#; -- AM/PM notation PM : TR_PM_Field := 16#0#; -- unspecified Reserved_23_31 : STM32_SVD.UInt9 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for TR_Register use record SU at 0 range 0 .. 3; ST at 0 range 4 .. 6; Reserved_7_7 at 0 range 7 .. 7; MNU at 0 range 8 .. 11; MNT at 0 range 12 .. 14; Reserved_15_15 at 0 range 15 .. 15; HU at 0 range 16 .. 19; HT at 0 range 20 .. 21; PM at 0 range 22 .. 22; Reserved_23_31 at 0 range 23 .. 31; end record; subtype DR_DU_Field is STM32_SVD.UInt4; subtype DR_DT_Field is STM32_SVD.UInt2; subtype DR_MU_Field is STM32_SVD.UInt4; subtype DR_MT_Field is STM32_SVD.Bit; subtype DR_WDU_Field is STM32_SVD.UInt3; subtype DR_YU_Field is STM32_SVD.UInt4; subtype DR_YT_Field is STM32_SVD.UInt4; -- date register type DR_Register is record -- Date units in BCD format DU : DR_DU_Field := 16#1#; -- Date tens in BCD format DT : DR_DT_Field := 16#0#; -- unspecified Reserved_6_7 : STM32_SVD.UInt2 := 16#0#; -- Month units in BCD format MU : DR_MU_Field := 16#1#; -- Month tens in BCD format MT : DR_MT_Field := 16#0#; -- Week day units WDU : DR_WDU_Field := 16#1#; -- Year units in BCD format YU : DR_YU_Field := 16#0#; -- Year tens in BCD format YT : DR_YT_Field := 16#0#; -- unspecified Reserved_24_31 : STM32_SVD.Byte := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DR_Register use record DU at 0 range 0 .. 3; DT at 0 range 4 .. 5; Reserved_6_7 at 0 range 6 .. 7; MU at 0 range 8 .. 11; MT at 0 range 12 .. 12; WDU at 0 range 13 .. 15; YU at 0 range 16 .. 19; YT at 0 range 20 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; subtype CR_WCKSEL_Field is STM32_SVD.UInt3; subtype CR_TSEDGE_Field is STM32_SVD.Bit; subtype CR_REFCKON_Field is STM32_SVD.Bit; subtype CR_BYPSHAD_Field is STM32_SVD.Bit; subtype CR_FMT_Field is STM32_SVD.Bit; subtype CR_ALRAE_Field is STM32_SVD.Bit; subtype CR_ALRBE_Field is STM32_SVD.Bit; subtype CR_WUTE_Field is STM32_SVD.Bit; subtype CR_TSE_Field is STM32_SVD.Bit; subtype CR_ALRAIE_Field is STM32_SVD.Bit; subtype CR_ALRBIE_Field is STM32_SVD.Bit; subtype CR_WUTIE_Field is STM32_SVD.Bit; subtype CR_TSIE_Field is STM32_SVD.Bit; subtype CR_ADD1H_Field is STM32_SVD.Bit; subtype CR_SUB1H_Field is STM32_SVD.Bit; subtype CR_BKP_Field is STM32_SVD.Bit; subtype CR_COSEL_Field is STM32_SVD.Bit; subtype CR_POL_Field is STM32_SVD.Bit; subtype CR_OSEL_Field is STM32_SVD.UInt2; subtype CR_COE_Field is STM32_SVD.Bit; -- control register type CR_Register is record -- Wakeup clock selection WCKSEL : CR_WCKSEL_Field := 16#0#; -- Time-stamp event active edge TSEDGE : CR_TSEDGE_Field := 16#0#; -- Reference clock detection enable (50 or 60 Hz) REFCKON : CR_REFCKON_Field := 16#0#; -- Bypass the shadow registers BYPSHAD : CR_BYPSHAD_Field := 16#0#; -- Hour format FMT : CR_FMT_Field := 16#0#; -- unspecified Reserved_7_7 : STM32_SVD.Bit := 16#0#; -- Alarm A enable ALRAE : CR_ALRAE_Field := 16#0#; -- Alarm B enable ALRBE : CR_ALRBE_Field := 16#0#; -- Wakeup timer enable WUTE : CR_WUTE_Field := 16#0#; -- Time stamp enable TSE : CR_TSE_Field := 16#0#; -- Alarm A interrupt enable ALRAIE : CR_ALRAIE_Field := 16#0#; -- Alarm B interrupt enable ALRBIE : CR_ALRBIE_Field := 16#0#; -- Wakeup timer interrupt enable WUTIE : CR_WUTIE_Field := 16#0#; -- Time-stamp interrupt enable TSIE : CR_TSIE_Field := 16#0#; -- Add 1 hour (summer time change) ADD1H : CR_ADD1H_Field := 16#0#; -- Subtract 1 hour (winter time change) SUB1H : CR_SUB1H_Field := 16#0#; -- Backup BKP : CR_BKP_Field := 16#0#; -- Calibration output selection COSEL : CR_COSEL_Field := 16#0#; -- Output polarity POL : CR_POL_Field := 16#0#; -- Output selection OSEL : CR_OSEL_Field := 16#0#; -- Calibration output enable COE : CR_COE_Field := 16#0#; -- unspecified Reserved_24_31 : STM32_SVD.Byte := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CR_Register use record WCKSEL at 0 range 0 .. 2; TSEDGE at 0 range 3 .. 3; REFCKON at 0 range 4 .. 4; BYPSHAD at 0 range 5 .. 5; FMT at 0 range 6 .. 6; Reserved_7_7 at 0 range 7 .. 7; ALRAE at 0 range 8 .. 8; ALRBE at 0 range 9 .. 9; WUTE at 0 range 10 .. 10; TSE at 0 range 11 .. 11; ALRAIE at 0 range 12 .. 12; ALRBIE at 0 range 13 .. 13; WUTIE at 0 range 14 .. 14; TSIE at 0 range 15 .. 15; ADD1H at 0 range 16 .. 16; SUB1H at 0 range 17 .. 17; BKP at 0 range 18 .. 18; COSEL at 0 range 19 .. 19; POL at 0 range 20 .. 20; OSEL at 0 range 21 .. 22; COE at 0 range 23 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; subtype ISR_ALRAWF_Field is STM32_SVD.Bit; subtype ISR_ALRBWF_Field is STM32_SVD.Bit; subtype ISR_WUTWF_Field is STM32_SVD.Bit; subtype ISR_SHPF_Field is STM32_SVD.Bit; subtype ISR_INITS_Field is STM32_SVD.Bit; subtype ISR_RSF_Field is STM32_SVD.Bit; subtype ISR_INITF_Field is STM32_SVD.Bit; subtype ISR_INIT_Field is STM32_SVD.Bit; subtype ISR_ALRAF_Field is STM32_SVD.Bit; subtype ISR_ALRBF_Field is STM32_SVD.Bit; subtype ISR_WUTF_Field is STM32_SVD.Bit; subtype ISR_TSF_Field is STM32_SVD.Bit; subtype ISR_TSOVF_Field is STM32_SVD.Bit; subtype ISR_TAMP1F_Field is STM32_SVD.Bit; subtype ISR_TAMP2F_Field is STM32_SVD.Bit; subtype ISR_TAMP3F_Field is STM32_SVD.Bit; subtype ISR_RECALPF_Field is STM32_SVD.Bit; -- initialization and status register type ISR_Register is record -- Read-only. Alarm A write flag ALRAWF : ISR_ALRAWF_Field := 16#1#; -- Read-only. Alarm B write flag ALRBWF : ISR_ALRBWF_Field := 16#1#; -- Read-only. Wakeup timer write flag WUTWF : ISR_WUTWF_Field := 16#1#; -- Shift operation pending SHPF : ISR_SHPF_Field := 16#0#; -- Read-only. Initialization status flag INITS : ISR_INITS_Field := 16#0#; -- Registers synchronization flag RSF : ISR_RSF_Field := 16#0#; -- Read-only. Initialization flag INITF : ISR_INITF_Field := 16#0#; -- Initialization mode INIT : ISR_INIT_Field := 16#0#; -- Alarm A flag ALRAF : ISR_ALRAF_Field := 16#0#; -- Alarm B flag ALRBF : ISR_ALRBF_Field := 16#0#; -- Wakeup timer flag WUTF : ISR_WUTF_Field := 16#0#; -- Time-stamp flag TSF : ISR_TSF_Field := 16#0#; -- Time-stamp overflow flag TSOVF : ISR_TSOVF_Field := 16#0#; -- Tamper detection flag TAMP1F : ISR_TAMP1F_Field := 16#0#; -- RTC_TAMP2 detection flag TAMP2F : ISR_TAMP2F_Field := 16#0#; -- RTC_TAMP3 detection flag TAMP3F : ISR_TAMP3F_Field := 16#0#; -- Read-only. Recalibration pending Flag RECALPF : ISR_RECALPF_Field := 16#0#; -- unspecified Reserved_17_31 : STM32_SVD.UInt15 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for ISR_Register use record ALRAWF at 0 range 0 .. 0; ALRBWF at 0 range 1 .. 1; WUTWF at 0 range 2 .. 2; SHPF at 0 range 3 .. 3; INITS at 0 range 4 .. 4; RSF at 0 range 5 .. 5; INITF at 0 range 6 .. 6; INIT at 0 range 7 .. 7; ALRAF at 0 range 8 .. 8; ALRBF at 0 range 9 .. 9; WUTF at 0 range 10 .. 10; TSF at 0 range 11 .. 11; TSOVF at 0 range 12 .. 12; TAMP1F at 0 range 13 .. 13; TAMP2F at 0 range 14 .. 14; TAMP3F at 0 range 15 .. 15; RECALPF at 0 range 16 .. 16; Reserved_17_31 at 0 range 17 .. 31; end record; subtype PRER_PREDIV_S_Field is STM32_SVD.UInt15; subtype PRER_PREDIV_A_Field is STM32_SVD.UInt7; -- prescaler register type PRER_Register is record -- Synchronous prescaler factor PREDIV_S : PRER_PREDIV_S_Field := 16#FF#; -- unspecified Reserved_15_15 : STM32_SVD.Bit := 16#0#; -- Asynchronous prescaler factor PREDIV_A : PRER_PREDIV_A_Field := 16#7F#; -- unspecified Reserved_23_31 : STM32_SVD.UInt9 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for PRER_Register use record PREDIV_S at 0 range 0 .. 14; Reserved_15_15 at 0 range 15 .. 15; PREDIV_A at 0 range 16 .. 22; Reserved_23_31 at 0 range 23 .. 31; end record; subtype WUTR_WUT_Field is STM32_SVD.UInt16; -- wakeup timer register type WUTR_Register is record -- Wakeup auto-reload value bits WUT : WUTR_WUT_Field := 16#FFFF#; -- unspecified Reserved_16_31 : STM32_SVD.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for WUTR_Register use record WUT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype ALRMAR_SU_Field is STM32_SVD.UInt4; subtype ALRMAR_ST_Field is STM32_SVD.UInt3; subtype ALRMAR_MSK1_Field is STM32_SVD.Bit; subtype ALRMAR_MNU_Field is STM32_SVD.UInt4; subtype ALRMAR_MNT_Field is STM32_SVD.UInt3; subtype ALRMAR_MSK2_Field is STM32_SVD.Bit; subtype ALRMAR_HU_Field is STM32_SVD.UInt4; subtype ALRMAR_HT_Field is STM32_SVD.UInt2; subtype ALRMAR_PM_Field is STM32_SVD.Bit; subtype ALRMAR_MSK3_Field is STM32_SVD.Bit; subtype ALRMAR_DU_Field is STM32_SVD.UInt4; subtype ALRMAR_DT_Field is STM32_SVD.UInt2; subtype ALRMAR_WDSEL_Field is STM32_SVD.Bit; subtype ALRMAR_MSK4_Field is STM32_SVD.Bit; -- alarm A register type ALRMAR_Register is record -- Second units in BCD format SU : ALRMAR_SU_Field := 16#0#; -- Second tens in BCD format ST : ALRMAR_ST_Field := 16#0#; -- Alarm A seconds mask MSK1 : ALRMAR_MSK1_Field := 16#0#; -- Minute units in BCD format MNU : ALRMAR_MNU_Field := 16#0#; -- Minute tens in BCD format MNT : ALRMAR_MNT_Field := 16#0#; -- Alarm A minutes mask MSK2 : ALRMAR_MSK2_Field := 16#0#; -- Hour units in BCD format HU : ALRMAR_HU_Field := 16#0#; -- Hour tens in BCD format HT : ALRMAR_HT_Field := 16#0#; -- AM/PM notation PM : ALRMAR_PM_Field := 16#0#; -- Alarm A hours mask MSK3 : ALRMAR_MSK3_Field := 16#0#; -- Date units or day in BCD format DU : ALRMAR_DU_Field := 16#0#; -- Date tens in BCD format DT : ALRMAR_DT_Field := 16#0#; -- Week day selection WDSEL : ALRMAR_WDSEL_Field := 16#0#; -- Alarm A date mask MSK4 : ALRMAR_MSK4_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for ALRMAR_Register use record SU at 0 range 0 .. 3; ST at 0 range 4 .. 6; MSK1 at 0 range 7 .. 7; MNU at 0 range 8 .. 11; MNT at 0 range 12 .. 14; MSK2 at 0 range 15 .. 15; HU at 0 range 16 .. 19; HT at 0 range 20 .. 21; PM at 0 range 22 .. 22; MSK3 at 0 range 23 .. 23; DU at 0 range 24 .. 27; DT at 0 range 28 .. 29; WDSEL at 0 range 30 .. 30; MSK4 at 0 range 31 .. 31; end record; subtype ALRMBR_SU_Field is STM32_SVD.UInt4; subtype ALRMBR_ST_Field is STM32_SVD.UInt3; subtype ALRMBR_MSK1_Field is STM32_SVD.Bit; subtype ALRMBR_MNU_Field is STM32_SVD.UInt4; subtype ALRMBR_MNT_Field is STM32_SVD.UInt3; subtype ALRMBR_MSK2_Field is STM32_SVD.Bit; subtype ALRMBR_HU_Field is STM32_SVD.UInt4; subtype ALRMBR_HT_Field is STM32_SVD.UInt2; subtype ALRMBR_PM_Field is STM32_SVD.Bit; subtype ALRMBR_MSK3_Field is STM32_SVD.Bit; subtype ALRMBR_DU_Field is STM32_SVD.UInt4; subtype ALRMBR_DT_Field is STM32_SVD.UInt2; subtype ALRMBR_WDSEL_Field is STM32_SVD.Bit; subtype ALRMBR_MSK4_Field is STM32_SVD.Bit; -- alarm B register type ALRMBR_Register is record -- Second units in BCD format SU : ALRMBR_SU_Field := 16#0#; -- Second tens in BCD format ST : ALRMBR_ST_Field := 16#0#; -- Alarm B seconds mask MSK1 : ALRMBR_MSK1_Field := 16#0#; -- Minute units in BCD format MNU : ALRMBR_MNU_Field := 16#0#; -- Minute tens in BCD format MNT : ALRMBR_MNT_Field := 16#0#; -- Alarm B minutes mask MSK2 : ALRMBR_MSK2_Field := 16#0#; -- Hour units in BCD format HU : ALRMBR_HU_Field := 16#0#; -- Hour tens in BCD format HT : ALRMBR_HT_Field := 16#0#; -- AM/PM notation PM : ALRMBR_PM_Field := 16#0#; -- Alarm B hours mask MSK3 : ALRMBR_MSK3_Field := 16#0#; -- Date units or day in BCD format DU : ALRMBR_DU_Field := 16#0#; -- Date tens in BCD format DT : ALRMBR_DT_Field := 16#0#; -- Week day selection WDSEL : ALRMBR_WDSEL_Field := 16#0#; -- Alarm B date mask MSK4 : ALRMBR_MSK4_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for ALRMBR_Register use record SU at 0 range 0 .. 3; ST at 0 range 4 .. 6; MSK1 at 0 range 7 .. 7; MNU at 0 range 8 .. 11; MNT at 0 range 12 .. 14; MSK2 at 0 range 15 .. 15; HU at 0 range 16 .. 19; HT at 0 range 20 .. 21; PM at 0 range 22 .. 22; MSK3 at 0 range 23 .. 23; DU at 0 range 24 .. 27; DT at 0 range 28 .. 29; WDSEL at 0 range 30 .. 30; MSK4 at 0 range 31 .. 31; end record; subtype WPR_KEY_Field is STM32_SVD.Byte; -- write protection register type WPR_Register is record -- Write-only. Write protection key KEY : WPR_KEY_Field := 16#0#; -- unspecified Reserved_8_31 : STM32_SVD.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for WPR_Register use record KEY at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype SSR_SS_Field is STM32_SVD.UInt16; -- sub second register type SSR_Register is record -- Read-only. Sub second value SS : SSR_SS_Field; -- unspecified Reserved_16_31 : STM32_SVD.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SSR_Register use record SS at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype SHIFTR_SUBFS_Field is STM32_SVD.UInt15; subtype SHIFTR_ADD1S_Field is STM32_SVD.Bit; -- shift control register type SHIFTR_Register is record -- Write-only. Subtract a fraction of a second SUBFS : SHIFTR_SUBFS_Field := 16#0#; -- unspecified Reserved_15_30 : STM32_SVD.UInt16 := 16#0#; -- Write-only. Add one second ADD1S : SHIFTR_ADD1S_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SHIFTR_Register use record SUBFS at 0 range 0 .. 14; Reserved_15_30 at 0 range 15 .. 30; ADD1S at 0 range 31 .. 31; end record; subtype TSTR_SU_Field is STM32_SVD.UInt4; subtype TSTR_ST_Field is STM32_SVD.UInt3; subtype TSTR_MNU_Field is STM32_SVD.UInt4; subtype TSTR_MNT_Field is STM32_SVD.UInt3; subtype TSTR_HU_Field is STM32_SVD.UInt4; subtype TSTR_HT_Field is STM32_SVD.UInt2; subtype TSTR_PM_Field is STM32_SVD.Bit; -- time stamp time register type TSTR_Register is record -- Read-only. Second units in BCD format SU : TSTR_SU_Field; -- Read-only. Second tens in BCD format ST : TSTR_ST_Field; -- unspecified Reserved_7_7 : STM32_SVD.Bit; -- Read-only. Minute units in BCD format MNU : TSTR_MNU_Field; -- Read-only. Minute tens in BCD format MNT : TSTR_MNT_Field; -- unspecified Reserved_15_15 : STM32_SVD.Bit; -- Read-only. Hour units in BCD format HU : TSTR_HU_Field; -- Read-only. Hour tens in BCD format HT : TSTR_HT_Field; -- Read-only. AM/PM notation PM : TSTR_PM_Field; -- unspecified Reserved_23_31 : STM32_SVD.UInt9; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for TSTR_Register use record SU at 0 range 0 .. 3; ST at 0 range 4 .. 6; Reserved_7_7 at 0 range 7 .. 7; MNU at 0 range 8 .. 11; MNT at 0 range 12 .. 14; Reserved_15_15 at 0 range 15 .. 15; HU at 0 range 16 .. 19; HT at 0 range 20 .. 21; PM at 0 range 22 .. 22; Reserved_23_31 at 0 range 23 .. 31; end record; subtype TSDR_DU_Field is STM32_SVD.UInt4; subtype TSDR_DT_Field is STM32_SVD.UInt2; subtype TSDR_MU_Field is STM32_SVD.UInt4; subtype TSDR_MT_Field is STM32_SVD.Bit; subtype TSDR_WDU_Field is STM32_SVD.UInt3; -- time stamp date register type TSDR_Register is record -- Read-only. Date units in BCD format DU : TSDR_DU_Field; -- Read-only. Date tens in BCD format DT : TSDR_DT_Field; -- unspecified Reserved_6_7 : STM32_SVD.UInt2; -- Read-only. Month units in BCD format MU : TSDR_MU_Field; -- Read-only. Month tens in BCD format MT : TSDR_MT_Field; -- Read-only. Week day units WDU : TSDR_WDU_Field; -- unspecified Reserved_16_31 : STM32_SVD.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for TSDR_Register use record DU at 0 range 0 .. 3; DT at 0 range 4 .. 5; Reserved_6_7 at 0 range 6 .. 7; MU at 0 range 8 .. 11; MT at 0 range 12 .. 12; WDU at 0 range 13 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype TSSSR_SS_Field is STM32_SVD.UInt16; -- timestamp sub second register type TSSSR_Register is record -- Read-only. Sub second value SS : TSSSR_SS_Field; -- unspecified Reserved_16_31 : STM32_SVD.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for TSSSR_Register use record SS at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype CALR_CALM_Field is STM32_SVD.UInt9; subtype CALR_CALW16_Field is STM32_SVD.Bit; subtype CALR_CALW8_Field is STM32_SVD.Bit; subtype CALR_CALP_Field is STM32_SVD.Bit; -- calibration register type CALR_Register is record -- Calibration minus CALM : CALR_CALM_Field := 16#0#; -- unspecified Reserved_9_12 : STM32_SVD.UInt4 := 16#0#; -- Use a 16-second calibration cycle period CALW16 : CALR_CALW16_Field := 16#0#; -- Use an 8-second calibration cycle period CALW8 : CALR_CALW8_Field := 16#0#; -- Increase frequency of RTC by 488.5 ppm CALP : CALR_CALP_Field := 16#0#; -- unspecified Reserved_16_31 : STM32_SVD.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CALR_Register use record CALM at 0 range 0 .. 8; Reserved_9_12 at 0 range 9 .. 12; CALW16 at 0 range 13 .. 13; CALW8 at 0 range 14 .. 14; CALP at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype TAFCR_TAMP1E_Field is STM32_SVD.Bit; subtype TAFCR_TAMP1TRG_Field is STM32_SVD.Bit; subtype TAFCR_TAMPIE_Field is STM32_SVD.Bit; subtype TAFCR_TAMP2E_Field is STM32_SVD.Bit; subtype TAFCR_TAMP2TRG_Field is STM32_SVD.Bit; subtype TAFCR_TAMP3E_Field is STM32_SVD.Bit; subtype TAFCR_TAMP3TRG_Field is STM32_SVD.Bit; subtype TAFCR_TAMPTS_Field is STM32_SVD.Bit; subtype TAFCR_TAMPFREQ_Field is STM32_SVD.UInt3; subtype TAFCR_TAMPFLT_Field is STM32_SVD.UInt2; subtype TAFCR_TAMPPRCH_Field is STM32_SVD.UInt2; subtype TAFCR_TAMPPUDIS_Field is STM32_SVD.Bit; subtype TAFCR_PC13VALUE_Field is STM32_SVD.Bit; subtype TAFCR_PC13MODE_Field is STM32_SVD.Bit; subtype TAFCR_PC14VALUE_Field is STM32_SVD.Bit; subtype TAFCR_PC14MODE_Field is STM32_SVD.Bit; subtype TAFCR_PC15VALUE_Field is STM32_SVD.Bit; subtype TAFCR_PC15MODE_Field is STM32_SVD.Bit; -- tamper and alternate function configuration register type TAFCR_Register is record -- Tamper 1 detection enable TAMP1E : TAFCR_TAMP1E_Field := 16#0#; -- Active level for tamper 1 TAMP1TRG : TAFCR_TAMP1TRG_Field := 16#0#; -- Tamper interrupt enable TAMPIE : TAFCR_TAMPIE_Field := 16#0#; -- Tamper 2 detection enable TAMP2E : TAFCR_TAMP2E_Field := 16#0#; -- Active level for tamper 2 TAMP2TRG : TAFCR_TAMP2TRG_Field := 16#0#; -- Tamper 3 detection enable TAMP3E : TAFCR_TAMP3E_Field := 16#0#; -- Active level for tamper 3 TAMP3TRG : TAFCR_TAMP3TRG_Field := 16#0#; -- Activate timestamp on tamper detection event TAMPTS : TAFCR_TAMPTS_Field := 16#0#; -- Tamper sampling frequency TAMPFREQ : TAFCR_TAMPFREQ_Field := 16#0#; -- Tamper filter count TAMPFLT : TAFCR_TAMPFLT_Field := 16#0#; -- Tamper precharge duration TAMPPRCH : TAFCR_TAMPPRCH_Field := 16#0#; -- TAMPER pull-up disable TAMPPUDIS : TAFCR_TAMPPUDIS_Field := 16#0#; -- unspecified Reserved_16_17 : STM32_SVD.UInt2 := 16#0#; -- PC13 value PC13VALUE : TAFCR_PC13VALUE_Field := 16#0#; -- PC13 mode PC13MODE : TAFCR_PC13MODE_Field := 16#0#; -- PC14 value PC14VALUE : TAFCR_PC14VALUE_Field := 16#0#; -- PC 14 mode PC14MODE : TAFCR_PC14MODE_Field := 16#0#; -- PC15 value PC15VALUE : TAFCR_PC15VALUE_Field := 16#0#; -- PC15 mode PC15MODE : TAFCR_PC15MODE_Field := 16#0#; -- unspecified Reserved_24_31 : STM32_SVD.Byte := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for TAFCR_Register use record TAMP1E at 0 range 0 .. 0; TAMP1TRG at 0 range 1 .. 1; TAMPIE at 0 range 2 .. 2; TAMP2E at 0 range 3 .. 3; TAMP2TRG at 0 range 4 .. 4; TAMP3E at 0 range 5 .. 5; TAMP3TRG at 0 range 6 .. 6; TAMPTS at 0 range 7 .. 7; TAMPFREQ at 0 range 8 .. 10; TAMPFLT at 0 range 11 .. 12; TAMPPRCH at 0 range 13 .. 14; TAMPPUDIS at 0 range 15 .. 15; Reserved_16_17 at 0 range 16 .. 17; PC13VALUE at 0 range 18 .. 18; PC13MODE at 0 range 19 .. 19; PC14VALUE at 0 range 20 .. 20; PC14MODE at 0 range 21 .. 21; PC15VALUE at 0 range 22 .. 22; PC15MODE at 0 range 23 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; subtype ALRMASSR_SS_Field is STM32_SVD.UInt15; subtype ALRMASSR_MASKSS_Field is STM32_SVD.UInt4; -- alarm A sub second register type ALRMASSR_Register is record -- Sub seconds value SS : ALRMASSR_SS_Field := 16#0#; -- unspecified Reserved_15_23 : STM32_SVD.UInt9 := 16#0#; -- Mask the most-significant bits starting at this bit MASKSS : ALRMASSR_MASKSS_Field := 16#0#; -- unspecified Reserved_28_31 : STM32_SVD.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for ALRMASSR_Register use record SS at 0 range 0 .. 14; Reserved_15_23 at 0 range 15 .. 23; MASKSS at 0 range 24 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype ALRMBSSR_SS_Field is STM32_SVD.UInt15; subtype ALRMBSSR_MASKSS_Field is STM32_SVD.UInt4; -- alarm B sub second register type ALRMBSSR_Register is record -- Sub seconds value SS : ALRMBSSR_SS_Field := 16#0#; -- unspecified Reserved_15_23 : STM32_SVD.UInt9 := 16#0#; -- Mask the most-significant bits starting at this bit MASKSS : ALRMBSSR_MASKSS_Field := 16#0#; -- unspecified Reserved_28_31 : STM32_SVD.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for ALRMBSSR_Register use record SS at 0 range 0 .. 14; Reserved_15_23 at 0 range 15 .. 23; MASKSS at 0 range 24 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Real-time clock type RTC_Peripheral is record -- time register TR : aliased TR_Register; -- date register DR : aliased DR_Register; -- control register CR : aliased CR_Register; -- initialization and status register ISR : aliased ISR_Register; -- prescaler register PRER : aliased PRER_Register; -- wakeup timer register WUTR : aliased WUTR_Register; -- alarm A register ALRMAR : aliased ALRMAR_Register; -- alarm B register ALRMBR : aliased ALRMBR_Register; -- write protection register WPR : aliased WPR_Register; -- sub second register SSR : aliased SSR_Register; -- shift control register SHIFTR : aliased SHIFTR_Register; -- time stamp time register TSTR : aliased TSTR_Register; -- time stamp date register TSDR : aliased TSDR_Register; -- timestamp sub second register TSSSR : aliased TSSSR_Register; -- calibration register CALR : aliased CALR_Register; -- tamper and alternate function configuration register TAFCR : aliased TAFCR_Register; -- alarm A sub second register ALRMASSR : aliased ALRMASSR_Register; -- alarm B sub second register ALRMBSSR : aliased ALRMBSSR_Register; -- backup register BKP0R : aliased STM32_SVD.UInt32; -- backup register BKP1R : aliased STM32_SVD.UInt32; -- backup register BKP2R : aliased STM32_SVD.UInt32; -- backup register BKP3R : aliased STM32_SVD.UInt32; -- backup register BKP4R : aliased STM32_SVD.UInt32; -- backup register BKP5R : aliased STM32_SVD.UInt32; -- backup register BKP6R : aliased STM32_SVD.UInt32; -- backup register BKP7R : aliased STM32_SVD.UInt32; -- backup register BKP8R : aliased STM32_SVD.UInt32; -- backup register BKP9R : aliased STM32_SVD.UInt32; -- backup register BKP10R : aliased STM32_SVD.UInt32; -- backup register BKP11R : aliased STM32_SVD.UInt32; -- backup register BKP12R : aliased STM32_SVD.UInt32; -- backup register BKP13R : aliased STM32_SVD.UInt32; -- backup register BKP14R : aliased STM32_SVD.UInt32; -- backup register BKP15R : aliased STM32_SVD.UInt32; -- backup register BKP16R : aliased STM32_SVD.UInt32; -- backup register BKP17R : aliased STM32_SVD.UInt32; -- backup register BKP18R : aliased STM32_SVD.UInt32; -- backup register BKP19R : aliased STM32_SVD.UInt32; -- backup register BKP20R : aliased STM32_SVD.UInt32; -- backup register BKP21R : aliased STM32_SVD.UInt32; -- backup register BKP22R : aliased STM32_SVD.UInt32; -- backup register BKP23R : aliased STM32_SVD.UInt32; -- backup register BKP24R : aliased STM32_SVD.UInt32; -- backup register BKP25R : aliased STM32_SVD.UInt32; -- backup register BKP26R : aliased STM32_SVD.UInt32; -- backup register BKP27R : aliased STM32_SVD.UInt32; -- backup register BKP28R : aliased STM32_SVD.UInt32; -- backup register BKP29R : aliased STM32_SVD.UInt32; -- backup register BKP30R : aliased STM32_SVD.UInt32; -- backup register BKP31R : aliased STM32_SVD.UInt32; end record with Volatile; for RTC_Peripheral use record TR at 16#0# range 0 .. 31; DR at 16#4# range 0 .. 31; CR at 16#8# range 0 .. 31; ISR at 16#C# range 0 .. 31; PRER at 16#10# range 0 .. 31; WUTR at 16#14# range 0 .. 31; ALRMAR at 16#1C# range 0 .. 31; ALRMBR at 16#20# range 0 .. 31; WPR at 16#24# range 0 .. 31; SSR at 16#28# range 0 .. 31; SHIFTR at 16#2C# range 0 .. 31; TSTR at 16#30# range 0 .. 31; TSDR at 16#34# range 0 .. 31; TSSSR at 16#38# range 0 .. 31; CALR at 16#3C# range 0 .. 31; TAFCR at 16#40# range 0 .. 31; ALRMASSR at 16#44# range 0 .. 31; ALRMBSSR at 16#48# range 0 .. 31; BKP0R at 16#50# range 0 .. 31; BKP1R at 16#54# range 0 .. 31; BKP2R at 16#58# range 0 .. 31; BKP3R at 16#5C# range 0 .. 31; BKP4R at 16#60# range 0 .. 31; BKP5R at 16#64# range 0 .. 31; BKP6R at 16#68# range 0 .. 31; BKP7R at 16#6C# range 0 .. 31; BKP8R at 16#70# range 0 .. 31; BKP9R at 16#74# range 0 .. 31; BKP10R at 16#78# range 0 .. 31; BKP11R at 16#7C# range 0 .. 31; BKP12R at 16#80# range 0 .. 31; BKP13R at 16#84# range 0 .. 31; BKP14R at 16#88# range 0 .. 31; BKP15R at 16#8C# range 0 .. 31; BKP16R at 16#90# range 0 .. 31; BKP17R at 16#94# range 0 .. 31; BKP18R at 16#98# range 0 .. 31; BKP19R at 16#9C# range 0 .. 31; BKP20R at 16#A0# range 0 .. 31; BKP21R at 16#A4# range 0 .. 31; BKP22R at 16#A8# range 0 .. 31; BKP23R at 16#AC# range 0 .. 31; BKP24R at 16#B0# range 0 .. 31; BKP25R at 16#B4# range 0 .. 31; BKP26R at 16#B8# range 0 .. 31; BKP27R at 16#BC# range 0 .. 31; BKP28R at 16#C0# range 0 .. 31; BKP29R at 16#C4# range 0 .. 31; BKP30R at 16#C8# range 0 .. 31; BKP31R at 16#CC# range 0 .. 31; end record; -- Real-time clock RTC_Periph : aliased RTC_Peripheral with Import, Address => System'To_Address (16#40002800#); end STM32_SVD.RTC;
reznikmm/matreshka
Ada
3,963
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Tools Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012-2013, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ private package WSDL.Parsers.SOAP is procedure Start_Binding_Element (Attributes : XML.SAX.Attributes.SAX_Attributes; Node : not null WSDL.AST.Binding_Access; Success : in out Boolean); -- Process start of binding element by analyzing SOAP Extension's -- attributes. procedure Start_Binding_Operation_Element (Attributes : XML.SAX.Attributes.SAX_Attributes; Node : not null WSDL.AST.Binding_Operation_Access; Success : in out Boolean); -- Process start of binding operation element by analyzing SOAP Extension's -- attributes. end WSDL.Parsers.SOAP;
AdaCore/Ada_Drivers_Library
Ada
5,855
ads
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2016, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of STMicroelectronics nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- -- -- -- This file is based on: -- -- -- -- @file stm32f4xx_hal_dcmi.h -- -- @author MCD Application Team -- -- @version V1.0.0 -- -- @date 18-February-2014 -- -- @brief Header file of DCMI HAL module. -- -- -- -- COPYRIGHT(c) 2014 STMicroelectronics -- ------------------------------------------------------------------------------ with STM32_SVD.DCMI; use STM32_SVD.DCMI; with System; package STM32.DCMI is function DCMI_Enabled return Boolean; procedure Enable_DCMI with Post => DCMI_Enabled; procedure Disable_DCMI with Post => not DCMI_Enabled; type DCMI_Capture_Mode is (Continous, Snapshot); procedure Start_Capture (Mode : DCMI_Capture_Mode) with Pre => DCMI_Enabled; procedure Stop_Capture; function Capture_In_Progess return Boolean; type DCMI_Data_Mode is (DCMI_8bit, DCMI_10bit, DCMI_12bit, DCMI_14bit); type DCMI_Capture_Rate is (Capture_All, Capture_Half, Capture_Quarter); type DCMI_Polarity is (Active_Low, Active_High); procedure Configure (Data_Mode : DCMI_Data_Mode; Capture_Rate : DCMI_Capture_Rate; Vertical_Polarity : DCMI_Polarity; Horizontal_Polarity : DCMI_Polarity; Pixel_Clock_Polarity : DCMI_Polarity; Hardware_Sync : Boolean; JPEG : Boolean) with Pre => (if JPEG then not Hardware_Sync); procedure Set_Software_Synchronization_Codes (Frame_Start : UInt8; Frame_End : UInt8; Line_Start : UInt8; Line_End : UInt8); procedure Set_Software_Synchronization_Masks (Frame_Start : UInt8; Frame_End : UInt8; Line_Start : UInt8; Line_End : UInt8); procedure Set_Crop_Window (X : UInt13; Y : UInt14; Width : UInt14; Height : UInt14); procedure Enable_Crop; procedure Disable_Crop; function Data return UInt32; function Data return DR_Byte_Field_Array; function Data_Register_Address return System.Address; -- For DMA transfer function FIFO_Not_Empty return Boolean; function FIFO_Empty return Boolean is (not FIFO_Not_Empty); function VSYNC_Active_Frame return Boolean; function HSYNC_Active_Line return Boolean; type DCMI_Interrupts is (Line_Interrupt, VSYNC_Interrupt, SYNC_Error_Interrupt, Overrun_Interrupt, Frame_Interrupt); procedure Enable_Interrupt (Int : DCMI_Interrupts); procedure Disable_Interrupt (Int : DCMI_Interrupts); procedure Clear_Interrupt (Int : DCMI_Interrupts); function Raw_Interrupt_Status (Int : DCMI_Interrupts) return Boolean; function Masked_Interrupt_Status (Int : DCMI_Interrupts) return Boolean; end STM32.DCMI;
ptrebuc/ewok-kernel
Ada
10,225
adb
-- -- Copyright 2018 The wookey project team <[email protected]> -- - Ryad Benadjila -- - Arnauld Michelizza -- - Mathieu Renard -- - Philippe Thierry -- - Philippe Trebuchet -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- with ada.unchecked_conversion; with m4.mpu; use m4.mpu; with ewok.mpu.handler; with ewok.layout; with ewok.debug; with soc.layout; with applications; -- generated package body ewok.mpu with spark_mode => on is procedure init (success : out boolean) with spark_mode => off -- handler is not SPARK compatible is -- Layout mapping validation of generated constants pragma assert (applications.txt_kern_size + applications.txt_kern_region_base <= applications.txt_user_region_base); function get_region_size (size : t_region_size) return unsigned_32 is (2**(natural (size) + 1)); begin -- -- Initializing the MPU -- -- Testing if there's an MPU m4.mpu.is_mpu_available (success); if not success then pragma DEBUG (debug.log (debug.ERROR, "No MPU!")); return; end if; -- Register memory fault handler -- Note: unproved because SPARK doesn't allow "'address" attribute ewok.mpu.handler.init; -- not PARK compatible -- Disable MPU m4.mpu.disable; -- Enable privileged software access (PRIVDEFENA) to default memory map -- and enable the memory fault exception. When ENABLE and PRIVDEFENA are -- both set to 1, privileged code can freely access the default memory -- map. Any access by unprivileged software that does not address an -- enabled memory region causes a memory management fault. m4.mpu.init; -- -- Configuring MPU regions -- -- Region: kernel code if get_region_size (REGION_SIZE_64KB) /= ewok.layout.FW1_KERN_SIZE then pragma DEBUG (debug.log (debug.ERROR, "MPU: invalid 'KERNEL CODE' size")); return; end if; set_region (region_number => KERN_CODE_REGION, addr => applications.txt_kern_region_base, size => applications.txt_kern_region_size, region_type => REGION_TYPE_KERN_CODE, subregion_mask => 0); -- Region: devices that may be accessed by the kernel set_region (region_number => KERN_DEVICES_REGION, addr => soc.layout.PERIPH_BASE, size => REGION_SIZE_512MB, region_type => REGION_TYPE_KERN_DEVICES, subregion_mask => 0); -- Region: kernel data + stack if get_region_size (REGION_SIZE_64KB) /= ewok.layout.KERN_DATA_SIZE then pragma DEBUG (debug.log (debug.ERROR, "MPU: invalid 'KERNEL DATA' size")); return; end if; set_region (region_number => KERN_DATA_REGION, addr => ewok.layout.KERN_DATA_BASE, size => REGION_SIZE_64KB, region_type => REGION_TYPE_KERN_DATA, subregion_mask => 0); -- Region: user data -- Note: This is for the whole area. Each task will use only a fixed -- number of sub-regions if get_region_size (REGION_SIZE_128KB) /= ewok.layout.USER_RAM_SIZE then pragma DEBUG (debug.log (debug.ERROR, "MPU: invalid 'USER DATA' size")); return; end if; set_region (region_number => USER_DATA_REGION, addr => ewok.layout.USER_DATA_BASE, size => REGION_SIZE_128KB, region_type => REGION_TYPE_USER_DATA, subregion_mask => 0); -- Region: user code -- Note: This is for the whole area. Each task will use only a fixed -- number of sub-regions if get_region_size (REGION_SIZE_256KB) /= ewok.layout.FW1_USER_SIZE then pragma DEBUG (debug.log (debug.ERROR, "MPU: invalid 'USER CODE' size")); return; end if; set_region (region_number => USER_CODE_REGION, addr => applications.txt_user_region_base, size => applications.txt_user_region_size, region_type => REGION_TYPE_USER_CODE, subregion_mask => 0); -- Region: user ISR stack set_region (region_number => USER_ISR_STACK_REGION, addr => ewok.layout.STACK_BOTTOM_TASK_ISR, size => REGION_SIZE_4KB, region_type => REGION_TYPE_ISR_STACK, subregion_mask => 0); pragma DEBUG (debug.log (debug.INFO, "MPU is configured")); m4.mpu.enable; pragma DEBUG (debug.log (debug.INFO, "MPU is enabled")); end init; procedure enable_unrestricted_kernel_access is begin m4.mpu.enable_unrestricted_kernel_access; end enable_unrestricted_kernel_access; procedure disable_unrestricted_kernel_access is begin m4.mpu.disable_unrestricted_kernel_access; end disable_unrestricted_kernel_access; procedure set_region (region_number : in m4.mpu.t_region_number; addr : in system_address; size : in m4.mpu.t_region_size; region_type : in t_region_type; subregion_mask : in unsigned_8) is access_perm : m4.mpu.t_region_perm; xn, b, s : boolean; region_config : m4.mpu.t_region_config; begin -- A memory region must never be mapped RWX case (region_type) is when REGION_TYPE_KERN_CODE => access_perm := REGION_PERM_PRIV_RO_USER_NO; xn := false; b := false; s := false; when REGION_TYPE_KERN_DATA => access_perm := REGION_PERM_PRIV_RW_USER_NO; xn := true; b := false; s := true; when REGION_TYPE_KERN_DEVICES => access_perm := REGION_PERM_PRIV_RW_USER_NO; xn := true; b := true; s := true; when REGION_TYPE_USER_CODE => access_perm := REGION_PERM_PRIV_RO_USER_RO; xn := false; b := false; s := false; when REGION_TYPE_USER_DATA => access_perm := REGION_PERM_PRIV_RW_USER_RW; xn := true; b := false; s := true; when REGION_TYPE_USER_DEV => access_perm := REGION_PERM_PRIV_RW_USER_RW; xn := true; b := true; s := true; when REGION_TYPE_USER_DEV_RO => access_perm := REGION_PERM_PRIV_RW_USER_RO; xn := true; b := true; s := true; when REGION_TYPE_ISR_STACK => access_perm := REGION_PERM_PRIV_RW_USER_RW; xn := true; b := false; s := true; end case; region_config := (region_number => region_number, addr => addr, size => size, access_perm => access_perm, xn => xn, b => b, s => s, subregion_mask => subregion_mask); m4.mpu.configure_region (region_config); end set_region; procedure update_subregions (region_number : in m4.mpu.t_region_number; subregion_mask : in unsigned_8) is begin m4.mpu.update_subregion_mask (region_number, subregion_mask); end update_subregions; procedure bytes_to_region_size (bytes : in unsigned_32; region_size : out m4.mpu.t_region_size; success : out boolean) is begin success := true; case (bytes) is when 32 => region_size := REGION_SIZE_32B; when 64 => region_size := REGION_SIZE_64B; when 128 => region_size := REGION_SIZE_128B; when 256 => region_size := REGION_SIZE_256B; when 512 => region_size := REGION_SIZE_512B; when 1*KBYTE => region_size := REGION_SIZE_1KB; when 2*KBYTE => region_size := REGION_SIZE_2KB; when 4*KBYTE => region_size := REGION_SIZE_4KB; when 8*KBYTE => region_size := REGION_SIZE_8KB; when 16*KBYTE => region_size := REGION_SIZE_16KB; when 32*KBYTE => region_size := REGION_SIZE_32KB; when 64*KBYTE => region_size := REGION_SIZE_64KB; when 128*KBYTE => region_size := REGION_SIZE_128KB; when 256*KBYTE => region_size := REGION_SIZE_256KB; when 512*KBYTE => region_size := REGION_SIZE_512KB; when 1*MBYTE => region_size := REGION_SIZE_1MB; when 2*MBYTE => region_size := REGION_SIZE_2MB; when 4*MBYTE => region_size := REGION_SIZE_4MB; when 8*MBYTE => region_size := REGION_SIZE_8MB; when 16*MBYTE => region_size := REGION_SIZE_16MB; when 32*MBYTE => region_size := REGION_SIZE_32MB; when 64*MBYTE => region_size := REGION_SIZE_64MB; when 128*MBYTE => region_size := REGION_SIZE_128MB; when 256*MBYTE => region_size := REGION_SIZE_256MB; when 512*MBYTE => region_size := REGION_SIZE_512MB; when 1*GBYTE => region_size := REGION_SIZE_1GB; when 2*GBYTE => region_size := REGION_SIZE_2GB; when others => region_size := REGION_SIZE_32B; success := false; end case; end bytes_to_region_size; end ewok.mpu;
GLADORG/glad-cli
Ada
1,113
ads
with AAA.Strings; with CLIC.TTY; with Ada.Text_IO; private with GNAT.Strings; package Commands.Destroy is package IO renames Ada.Text_IO; package TT renames CLIC.TTY; type Command is new Commands.Command with private; overriding function Name (Cmd : Command) return CLIC.Subcommand.Identifier is ("destroy"); overriding procedure Execute (Cmd : in out Command; Args : AAA.Strings.Vector); overriding function Long_Description (Cmd : Command) return AAA.Strings.Vector is (AAA.Strings.Empty_Vector.Append ("Destroys code generated by" & " " & TT.Terminal("generate") & " " & "command.") .New_Line ); overriding procedure Setup_Switches (Cmd : in out Command; Config : in out CLIC.Subcommand.Switches_Configuration); overriding function Short_Description (Cmd : Command) return String is ("Destroys code generated by" & " " & TT.Terminal("generate") & " " & "command."); overriding function Usage_Custom_Parameters (Cmd : Command) return String is (""); private type Command is new Commands.Command with null record; end Commands.Destroy;
OneWingedShark/Risi
Ada
13,511
adb
With System.Storage_Elements, Risi_Script.Types.Implementation.Creators, Risi_Script.Types.Internals, Ada.Containers, Ada.Strings.Unbounded, Ada.Strings.Fixed; Separate(Risi_Script.Types.Implementation) Package Body Conversions is Use Risi_Script.Types.Implementation.Creators; Use Type Ada.Containers.Count_Type; Package SE renames System.Storage_Elements; Type Braket_Style is ( Round, Square, Curly ); --------------------- -- UTIL FUNCTIONS -- --------------------- Function "+"( S : String ) return Ada.Strings.Unbounded.Unbounded_String renames Ada.Strings.Unbounded.To_Unbounded_String; Function "+"( S : Ada.Strings.Unbounded.Unbounded_String ) return String renames Ada.Strings.Unbounded.To_String; Function Trim( S : String ) return Ada.Strings.Unbounded.Unbounded_String is Use Ada.Strings.Unbounded, Ada.Strings.Fixed, Ada.Strings; begin Return + Trim(Side => Left, Source => S); end Trim; Function To_Address( X : SE.integer_Address ) return System.Address renames SE.To_Address; Generic Type X is private; Default : X; with Function Value( S : String ) return X; Function Parse_String( S : String_Type ) return X; Function Parse_String( S : String_Type ) return X is begin return Result : X := Default do Result:= Value( +S ); exception when others => null; end return; end Parse_String; Function Bracket( S : String; Style : Braket_Style ) return String is (case Style is when Round => '(' & S & ')', when Square => '[' & S & ']', when Curly => '{' & S & '}' ); Function Bracket( S : Unbounded_String; Style : Braket_Style ) return Unbounded_String is (case Style is when Round => '(' & S & ')', when Square => '[' & S & ']', when Curly => '{' & S & '}' ); ---------------------- -- INSTANTIATIONS -- ---------------------- Function As_Array is new To_Array(Integer_Type); Function As_Array is new To_Array(Real_Type); Function As_Array is new To_Array(Pointer_Type); Function As_Array is new To_Array(Fixed_Type); Function As_Array is new To_Array(Boolean_Type); Function As_Array is new To_Array(Func_Type); Function As_Hash is new To_Hash(Integer_Type); Function As_Hash is new To_Hash(Real_Type); Function As_Hash is new To_Hash(Pointer_Type); Function As_Hash is new To_Hash(Fixed_Type); Function As_Hash is new To_Hash(Boolean_Type); Function As_Hash is new To_Hash(Func_Type); Function Parse is new Parse_String( Integer_Type, 0, Integer_Type'Value ); Function Parse is new Parse_String( Real_Type, 0.0, Real_Type'Value ); Function Parse is new Parse_String( Fixed_Type, 0.0, Fixed_Type'Value ); Function Parse is new Parse_String( Boolean_Type, True, Boolean_Type'Value ); ---------------------- -- IMPLEMENTATION -- ---------------------- Function Convert(Value : Integer_Type ) return Array_Type renames As_Array; Function Convert(Value : Integer_Type ) return Hash_Type renames As_Hash; Function Convert(Value : Integer_Type ) return String_Type is ( Trim( Integer_Type'Image(Value) ) ); Function Convert(Value : Integer_Type ) return Real_Type is ( Real_Type(Value) ); -- Function Convert(Value : Integer_Type ) return Pointer_Type; -- Function Convert(Value : Integer_Type ) return Reference_Type; Function Convert(Value : Integer_Type ) return Fixed_Type is (if abs Value in 0..99_999_999_999_999 then Fixed_Type(Value) elsif Value > 0 then Fixed_Type'Last else Fixed_Type'First ); Function Convert(Value : Integer_Type ) return Boolean_Type is ( Boolean_Type(Value in 0..Integer_Type'Last) ); -- Function Convert(Value : Integer_Type ) return Func_Type; -- Function Convert(Value : Array_Type ) return Integer_Type is ( Integer_Type( Value.Length ) ); Function Convert(Value : Array_Type ) return Hash_Type is Function Internal_Convert(Value : Array_Type; Offset : Integer) return Hash_Type is begin Return Result : Hash_Type do for C in Value.Iterate loop declare Use Hash, List; K : constant String := Natural'Image(To_Index(C) + Offset); V : Representation renames Value(C); begin if Get_Enumeration(V) /= RT_Array then Result.Include( K, V ); else Result.Include( K, Internal_Create( Internal_Convert(V.Array_Value, Offset+1) ) ); end if; end; end loop; end return; end Internal_Convert; begin Return Internal_Convert( Value, -1 ); end Convert; Function Convert(Value : Array_Type ) return String_Type is Use Ada.Strings.Unbounded; Working : Unbounded_String; begin for Item in value.iterate loop declare Key : Positive renames List.To_Index(Item); Last : constant Boolean := Key = Value.Last_Index; Value : constant String := Image( List.Element( Item ) ); begin Append( Source => Working, New_Item => Value & (if not Last then ", " else "") ); end; end loop; Return Bracket( Working, Square ); end Convert; Function Convert(Value : Array_Type ) return Real_Type is ( Real_Type(Value.Length) ); -- Function Convert(Value : Array_Type ) return Pointer_Type; -- Function Convert(Value : Array_Type ) return Reference_Type; Function Convert(Value : Array_Type ) return Fixed_Type is ( Fixed_Type(Value.Length) ); Function Convert(Value : Array_Type ) return Boolean_Type is ( Boolean_Type(Value.Length > 0) ); -- Function Convert(Value : Array_Type ) return Func_Type; -- Function Convert(Value : Hash_Type ) return Integer_Type is ( Integer_Type(Value.Length) ); Function Convert(Value : Hash_Type ) return Array_Type is begin Return Result : Array_Type do for Item of Value loop Result.Append( Item ); end loop; end return; end Convert; Function Convert(Value : Hash_Type ) return String_Type is use Ada.Strings.Unbounded, Hash; Working : Unbounded_String; begin for E in Value.Iterate loop Append( Source => Working, New_Item => '"' & Key(E) & '"' & " => " & Image(Element(E)) & (if E /= Value.Last then ", " else "") ); end loop; return Working; end Convert; Function Convert(Value : Hash_Type ) return Real_Type is ( Real_Type(Value.Length) ); -- Function Convert(Value : Hash_Type ) return Pointer_Type; -- Function Convert(Value : Hash_Type ) return Reference_Type; Function Convert(Value : Hash_Type ) return Fixed_Type is ( Fixed_Type(Value.Length) ); Function Convert(Value : Hash_Type ) return Boolean_Type is ( Boolean_Type(Value.Length > 0) ); -- Function Convert(Value : Hash_Type ) return Func_Type; -- Function Convert(Value : String_Type ) return Integer_Type renames Parse; -- Function Convert(Value : String_Type ) return Array_Type; -- Function Convert(Value : String_Type ) return Hash_Type; Function Convert(Value : String_Type ) return Real_Type renames Parse; -- Function Convert(Value : String_Type ) return Pointer_Type; -- Function Convert(Value : String_Type ) return Reference_Type; Function Convert(Value : String_Type ) return Fixed_Type renames Parse; Function Convert(Value : String_Type ) return Boolean_Type renames Parse; -- Function Convert(Value : String_Type ) return Func_Type; -- Function Convert(Value : Real_Type ) return Integer_Type is First : Constant Real_Type:= Real_Type(Integer_Type'First); Last : Constant Real_Type:= Real_Type(Integer_Type'Last); Subtype Int_Range is Real_Type range First..Last; begin return (if Value in Int_Range then Integer_Type(Value) elsif Value > Last then Integer_Type'Last else Integer_Type'First ); end convert; Function Convert(Value : Real_Type ) return Array_Type renames As_Array; Function Convert(Value : Real_Type ) return Hash_Type renames As_Hash; Function Convert(Value : Real_Type ) return String_Type is ( Trim( Real_Type'Image(Value) ) ); -- Function Convert(Value : Real_Type ) return Pointer_Type; -- Function Convert(Value : Real_Type ) return Reference_Type; Function Convert(Value : Real_Type ) return Fixed_Type is First : Constant Real_Type:= Real_Type(Fixed_Type'First); Last : constant Real_Type:= Real_Type(Fixed_Type'Last); subtype Fixed_Range is Real_Type range First..Last; begin return (if Value in Fixed_Range then Fixed_Type( Value ) elsif Value > Last then Fixed_Type'Last else Fixed_Type'First ); end Convert; Function Convert(Value : Real_Type ) return Boolean_Type is ( Boolean_Type(Value in 0.0..Real_Type'Last) ); -- Function Convert(Value : Real_Type ) return Func_Type; -- -- Function Convert(Value : Pointer_Type ) return Integer_Type; -- Function Convert(Value : Pointer_Type ) return Array_Type; -- Function Convert(Value : Pointer_Type ) return Hash_Type; -- Function Convert(Value : Pointer_Type ) return String_Type; -- Function Convert(Value : Pointer_Type ) return Real_Type; -- Function Convert(Value : Pointer_Type ) return Pointer_Type; -- Function Convert(Value : Pointer_Type ) return Reference_Type; -- Function Convert(Value : Pointer_Type ) return Fixed_Type; -- Function Convert(Value : Pointer_Type ) return Boolean_Type; -- Function Convert(Value : Pointer_Type ) return Func_Type; -- Function Convert(Value : Reference_Type ) return Integer_Type is (case Get_Enumeration(Value) is when RT_Integer => Convert(Value), when RT_Array => Convert(Value), when RT_Hash => Convert(Value), when RT_String => Convert(Value), when RT_Real => Convert(Value), when RT_Pointer => Convert(Value), when RT_Reference => Convert(Value), when RT_Fixed => Convert(Value), when RT_Boolean => Convert(Value), when RT_Func => Convert(Value) ); -- Function Convert(Value : Reference_Type ) return Array_Type; -- Function Convert(Value : Reference_Type ) return Hash_Type; -- Function Convert(Value : Reference_Type ) return String_Type; -- Function Convert(Value : Reference_Type ) return Real_Type; -- Function Convert(Value : Reference_Type ) return Pointer_Type; -- Function Convert(Value : Reference_Type ) return Fixed_Type; -- Function Convert(Value : Reference_Type ) return Boolean_Type; -- Function Convert(Value : Reference_Type ) return Func_Type; Function Convert(Value : Fixed_Type ) return Integer_Type is ( Integer_Type(Value) ); Function Convert(Value : Fixed_Type ) return Array_Type renames As_Array; Function Convert(Value : Fixed_Type ) return Hash_Type renames As_Hash; Function Convert(Value : Fixed_Type ) return String_Type is ( Trim( Fixed_Type'Image(Value) ) ); Function Convert(Value : Fixed_Type ) return Real_Type is ( Real_Type(Value) ); -- Function Convert(Value : Fixed_Type ) return Pointer_Type; -- Function Convert(Value : Fixed_Type ) return Reference_Type; Function Convert(Value : Fixed_Type ) return Boolean_Type is ( Boolean_Type(Value in 0.0..Fixed_Type'Last) ); -- Function Convert(Value : Fixed_Type ) return Func_Type; Function Convert(Value : Boolean_Type ) return Integer_Type is (If Value = True then 1 else -1); Function Convert(Value : Boolean_Type ) return Array_Type renames As_Array; Function Convert(Value : Boolean_Type ) return Hash_Type renames As_Hash; Function Convert(Value : Boolean_Type ) return String_Type is (+(if Value = True then "TRUE" else "FALSE")); Function Convert(Value : Boolean_Type ) return Real_Type is (if Value = True then 1.0 else -1.0); Function Convert(Value : Boolean_Type ) return Pointer_Type is (if Value = True then Pointer_Type(System.Null_Address) else Pointer_Type( To_Address(SE.Integer_Address'Last) ) ); -- Function Convert(Value : Boolean_Type ) return Reference_Type; Function Convert(Value : Boolean_Type ) return Fixed_Type is (If Value = True then 1.0 else -1.0); -- Function Convert(Value : Boolean_Type ) return Func_Type; -- Function Convert(Value : Func_Type ) return Integer_Type; -- Function Convert(Value : Func_Type ) return Array_Type; -- Function Convert(Value : Func_Type ) return Hash_Type; -- Function Convert(Value : Func_Type ) return String_Type; -- Function Convert(Value : Func_Type ) return Real_Type; -- Function Convert(Value : Func_Type ) return Pointer_Type; -- Function Convert(Value : Func_Type ) return Reference_Type; -- Function Convert(Value : Func_Type ) return Fixed_Type; -- Function Convert(Value : Func_Type ) return Boolean_Type; -- End Conversions;
io7m/coreland-sdl-ada
Ada
10,058
ads
package SDL.Keysym is type Key_t is new C.int; type ModKey_t is new Uint32_t; pragma Convention (C, Key_t); pragma Convention (C, ModKey_t); K_Unknown : constant Key_t := 0; K_First : constant Key_t := 0; K_Backspace : constant Key_t := 8; K_Tab : constant Key_t := 9; K_Clear : constant Key_t := 12; K_Return : constant Key_t := 13; K_Pause : constant Key_t := 19; K_Escape : constant Key_t := 27; K_Space : constant Key_t := 32; K_Exclaim : constant Key_t := 33; K_QuoteDbl : constant Key_t := 34; K_Hash : constant Key_t := 35; K_Dollar : constant Key_t := 36; K_Ampersand : constant Key_t := 38; K_Quote : constant Key_t := 39; K_LeftParen : constant Key_t := 40; K_RightParen : constant Key_t := 41; K_Asterisk : constant Key_t := 42; K_Plus : constant Key_t := 43; K_Comma : constant Key_t := 44; K_Minus : constant Key_t := 45; K_Period : constant Key_t := 46; K_Slash : constant Key_t := 47; K_0 : constant Key_t := 48; K_1 : constant Key_t := 49; K_2 : constant Key_t := 50; K_3 : constant Key_t := 51; K_4 : constant Key_t := 52; K_5 : constant Key_t := 53; K_6 : constant Key_t := 54; K_7 : constant Key_t := 55; K_8 : constant Key_t := 56; K_9 : constant Key_t := 57; K_Colon : constant Key_t := 58; K_Semicolon : constant Key_t := 59; K_Less : constant Key_t := 60; K_Equals : constant Key_t := 61; K_Greater : constant Key_t := 62; K_Question : constant Key_t := 63; K_At : constant Key_t := 64; K_LeftBracket : constant Key_t := 91; K_Backslash : constant Key_t := 92; K_RightBracket : constant Key_t := 93; K_Caret : constant Key_t := 94; K_Underscore : constant Key_t := 95; K_Backquote : constant Key_t := 96; K_A : constant Key_t := 97; K_B : constant Key_t := 98; K_C : constant Key_t := 99; K_D : constant Key_t := 100; K_E : constant Key_t := 101; K_F : constant Key_t := 102; K_G : constant Key_t := 103; K_H : constant Key_t := 104; K_I : constant Key_t := 105; K_J : constant Key_t := 106; K_K : constant Key_t := 107; K_L : constant Key_t := 108; K_M : constant Key_t := 109; K_N : constant Key_t := 110; K_O : constant Key_t := 111; K_P : constant Key_t := 112; K_Q : constant Key_t := 113; K_R : constant Key_t := 114; K_S : constant Key_t := 115; K_t : constant Key_t := 116; K_U : constant Key_t := 117; K_V : constant Key_t := 118; K_W : constant Key_t := 119; K_X : constant Key_t := 120; K_Y : constant Key_t := 121; K_Z : constant Key_t := 122; K_Delete : constant Key_t := 127; K_World_0 : constant Key_t := 160; K_World_1 : constant Key_t := 161; K_World_2 : constant Key_t := 162; K_World_3 : constant Key_t := 163; K_World_4 : constant Key_t := 164; K_World_5 : constant Key_t := 165; K_World_6 : constant Key_t := 166; K_World_7 : constant Key_t := 167; K_World_8 : constant Key_t := 168; K_World_9 : constant Key_t := 169; K_World_10 : constant Key_t := 170; K_World_11 : constant Key_t := 171; K_World_12 : constant Key_t := 172; K_World_13 : constant Key_t := 173; K_World_14 : constant Key_t := 174; K_World_15 : constant Key_t := 175; K_World_16 : constant Key_t := 176; K_World_17 : constant Key_t := 177; K_World_18 : constant Key_t := 178; K_World_19 : constant Key_t := 179; K_World_20 : constant Key_t := 180; K_World_21 : constant Key_t := 181; K_World_22 : constant Key_t := 182; K_World_23 : constant Key_t := 183; K_World_24 : constant Key_t := 184; K_World_25 : constant Key_t := 185; K_World_26 : constant Key_t := 186; K_World_27 : constant Key_t := 187; K_World_28 : constant Key_t := 188; K_World_29 : constant Key_t := 189; K_World_30 : constant Key_t := 190; K_World_31 : constant Key_t := 191; K_World_32 : constant Key_t := 192; K_World_33 : constant Key_t := 193; K_World_34 : constant Key_t := 194; K_World_35 : constant Key_t := 195; K_World_36 : constant Key_t := 196; K_World_37 : constant Key_t := 197; K_World_38 : constant Key_t := 198; K_World_39 : constant Key_t := 199; K_World_40 : constant Key_t := 200; K_World_41 : constant Key_t := 201; K_World_42 : constant Key_t := 202; K_World_43 : constant Key_t := 203; K_World_44 : constant Key_t := 204; K_World_45 : constant Key_t := 205; K_World_46 : constant Key_t := 206; K_World_47 : constant Key_t := 207; K_World_48 : constant Key_t := 208; K_World_49 : constant Key_t := 209; K_World_50 : constant Key_t := 210; K_World_51 : constant Key_t := 211; K_World_52 : constant Key_t := 212; K_World_53 : constant Key_t := 213; K_World_54 : constant Key_t := 214; K_World_55 : constant Key_t := 215; K_World_56 : constant Key_t := 216; K_World_57 : constant Key_t := 217; K_World_58 : constant Key_t := 218; K_World_59 : constant Key_t := 219; K_World_60 : constant Key_t := 220; K_World_61 : constant Key_t := 221; K_World_62 : constant Key_t := 222; K_World_63 : constant Key_t := 223; K_World_64 : constant Key_t := 224; K_World_65 : constant Key_t := 225; K_World_66 : constant Key_t := 226; K_World_67 : constant Key_t := 227; K_World_68 : constant Key_t := 228; K_World_69 : constant Key_t := 229; K_World_70 : constant Key_t := 230; K_World_71 : constant Key_t := 231; K_World_72 : constant Key_t := 232; K_World_73 : constant Key_t := 233; K_World_74 : constant Key_t := 234; K_World_75 : constant Key_t := 235; K_World_76 : constant Key_t := 236; K_World_77 : constant Key_t := 237; K_World_78 : constant Key_t := 238; K_World_79 : constant Key_t := 239; K_World_80 : constant Key_t := 240; K_World_81 : constant Key_t := 241; K_World_82 : constant Key_t := 242; K_World_83 : constant Key_t := 243; K_World_84 : constant Key_t := 244; K_World_85 : constant Key_t := 245; K_World_86 : constant Key_t := 246; K_World_87 : constant Key_t := 247; K_World_88 : constant Key_t := 248; K_World_89 : constant Key_t := 249; K_World_90 : constant Key_t := 250; K_World_91 : constant Key_t := 251; K_World_92 : constant Key_t := 252; K_World_93 : constant Key_t := 253; K_World_94 : constant Key_t := 254; K_World_95 : constant Key_t := 255; K_KP0 : constant Key_t := 256; K_KP1 : constant Key_t := 257; K_KP2 : constant Key_t := 258; K_KP3 : constant Key_t := 259; K_KP4 : constant Key_t := 260; K_KP5 : constant Key_t := 261; K_KP6 : constant Key_t := 262; K_KP7 : constant Key_t := 263; K_KP8 : constant Key_t := 264; K_KP9 : constant Key_t := 265; K_KP_Period : constant Key_t := 266; K_KP_Divide : constant Key_t := 267; K_KP_Multiply : constant Key_t := 268; K_KP_Minus : constant Key_t := 269; K_KP_Plus : constant Key_t := 270; K_KP_Enter : constant Key_t := 271; K_KP_Equals : constant Key_t := 272; K_Up : constant Key_t := 273; K_Down : constant Key_t := 274; K_Right : constant Key_t := 275; K_Left : constant Key_t := 276; K_Insert : constant Key_t := 277; K_Home : constant Key_t := 278; K_End : constant Key_t := 279; K_Pageup : constant Key_t := 280; K_Pagedown : constant Key_t := 281; K_F1 : constant Key_t := 282; K_F2 : constant Key_t := 283; K_F3 : constant Key_t := 284; K_F4 : constant Key_t := 285; K_F5 : constant Key_t := 286; K_F6 : constant Key_t := 287; K_F7 : constant Key_t := 288; K_F8 : constant Key_t := 289; K_F9 : constant Key_t := 290; K_F10 : constant Key_t := 291; K_F11 : constant Key_t := 292; K_F12 : constant Key_t := 293; K_F13 : constant Key_t := 294; K_F14 : constant Key_t := 295; K_F15 : constant Key_t := 296; K_Numlock : constant Key_t := 300; K_Capslock : constant Key_t := 301; K_Scrollock : constant Key_t := 302; K_RShift : constant Key_t := 303; K_LShift : constant Key_t := 304; K_RCtrl : constant Key_t := 305; K_LCtrl : constant Key_t := 306; K_RAlt : constant Key_t := 307; K_LAlt : constant Key_t := 308; K_RMeta : constant Key_t := 309; K_LMeta : constant Key_t := 310; K_Lsuper : constant Key_t := 311; K_Rsuper : constant Key_t := 312; K_Mode : constant Key_t := 313; K_Compose : constant Key_t := 314; K_Help : constant Key_t := 315; K_Print : constant Key_t := 316; K_Sysreq : constant Key_t := 317; K_Break : constant Key_t := 318; K_Menu : constant Key_t := 319; K_Power : constant Key_t := 320; K_Euro : constant Key_t := 321; K_Last : constant Key_t := 322; KMod_None : constant ModKey_t := 16#0000#; KMod_LShift : constant ModKey_t := 16#0001#; KMod_RShift : constant ModKey_t := 16#0002#; KMod_LCtrl : constant ModKey_t := 16#0040#; KMod_RCtrl : constant ModKey_t := 16#0080#; KMod_LAlt : constant ModKey_t := 16#0100#; KMod_RAlt : constant ModKey_t := 16#0200#; KMod_LMeta : constant ModKey_t := 16#0400#; KMod_RMeta : constant ModKey_t := 16#0800#; KMod_Num : constant ModKey_t := 16#1000#; KMod_Caps : constant ModKey_t := 16#2000#; KMod_Mode : constant ModKey_t := 16#4000#; KMod_Reserved : constant ModKey_t := 16#8000#; KMod_Ctrl : constant ModKey_t := (KMod_LCtrl or KMod_RCtrl); KMod_Shift : constant ModKey_t := (KMod_LShift or KMod_RShift); KMod_Alt : constant ModKey_t := (KMod_LAlt or KMod_RAlt); KMod_Meta : constant ModKey_t := (KMod_LMeta or KMod_RMeta); end SDL.Keysym;
caqg/linux-home
Ada
241,557
adb
-- generated parser support file. -- command line: wisitoken-bnf-generate.exe --generate LR1 Ada_Emacs re2c PROCESS text_rep ada.wy -- -- Copyright (C) 2013 - 2019 Free Software Foundation, Inc. -- This program is free software; you can redistribute it and/or -- modify it under the terms of the GNU General Public License as -- published by the Free Software Foundation; either version 3, or (at -- your option) any later version. -- -- This software is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. with Wisi; use Wisi; with Wisi.Ada; use Wisi.Ada; package body Ada_Process_Actions is use WisiToken.Semantic_Checks; use all type Motion_Param_Array; procedure abstract_subprogram_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_Override), (6, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end abstract_subprogram_declaration_0; procedure accept_statement_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Motion), (9, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (5, Invalid_Token_ID) & (6, 72) & (9, Invalid_Token_ID))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((2, 3, 1), (8, 3, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (True, (Simple, (Label => None)), (Simple, (Int, Ada_Indent))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end accept_statement_0; function accept_statement_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 2, 8, End_Names_Optional); end accept_statement_0_check; procedure accept_statement_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Statement_End))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 3, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end accept_statement_1; procedure access_definition_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Anchored_1, 4, Ada_Indent_Broken))))); end case; end access_definition_0; procedure access_definition_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Anchored_2, 4, Ada_Indent_Broken))))); end case; end access_definition_1; procedure access_definition_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (4, 1, 2))); when Indent => null; end case; end access_definition_2; procedure actual_parameter_part_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (True, (Simple, (Anchored_0, 1, 1)), (Simple, (Anchored_0, 1, 1))), (False, (Simple, (Anchored_0, 1, 0))))); end case; end actual_parameter_part_0; procedure actual_parameter_part_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (True, (Simple, (Anchored_0, 1, 1)), (Simple, (Anchored_0, 1, 1))), (False, (Simple, (Anchored_0, 1, 0))))); end case; end actual_parameter_part_1; procedure aggregate_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Anchored_0, 1, 1))), (False, (Simple, (Anchored_0, 1, 1))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Anchored_0, 1, 0))))); end case; end aggregate_0; procedure aggregate_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Anchored_0, 1, 1))), (False, (Simple, (Anchored_0, 1, 1))), (True, (Simple, (Anchored_0, 1, 1)), (Simple, (Anchored_0, 1, 1))), (False, (Simple, (Anchored_0, 1, 0))))); end case; end aggregate_1; procedure aggregate_3 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Anchored_0, 1, 1))), (False, (Simple, (Anchored_0, 1, 1))), (False, (Simple, (Anchored_0, 1, 1))), (True, (Simple, (Anchored_0, 1, 1)), (Simple, (Anchored_0, 1, 1))), (False, (Simple, (Anchored_0, 1, 0))))); end case; end aggregate_3; procedure aggregate_4 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (True, (Simple, (Anchored_0, 1, 1)), (Simple, (Anchored_0, 1, 1))), (False, (Simple, (Anchored_0, 1, 0))))); end case; end aggregate_4; procedure aggregate_5 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (True, (Simple, (Anchored_0, 1, 1)), (Simple, (Anchored_0, 1, 1))), (False, (Simple, (Anchored_0, 1, 0))))); end case; end aggregate_5; procedure array_type_definition_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Anchored_0, 2, 1))), (False, (Simple, (Anchored_0, 2, 0))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end array_type_definition_0; procedure array_type_definition_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Anchored_0, 2, 1))), (False, (Simple, (Anchored_0, 2, 0))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end array_type_definition_1; procedure aspect_clause_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end aspect_clause_0; procedure aspect_specification_opt_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))))); end case; end aspect_specification_opt_0; procedure assignment_statement_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (4, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Hanging_0, (Anchored_1, 2, Ada_Indent_Broken), (Anchored_1, 3, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end assignment_statement_0; procedure association_opt_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (True, (Simple, (Anchored_1, 2, Ada_Indent_Broken)), (Simple, (Anchored_1, 2, Ada_Indent_Broken))))); end case; end association_opt_0; procedure association_opt_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Hanging_0, (Label => None), (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (True, (Hanging_3, (Anchored_1, 2, Ada_Indent_Broken), (Anchored_1, 2, 2 * Ada_Indent_Broken)), (Hanging_3, (Anchored_1, 2, Ada_Indent_Broken), (Anchored_1, 2, 2 * Ada_Indent_Broken))))); end case; end association_opt_2; procedure association_opt_3 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Hanging_0, (Label => None), (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end association_opt_3; procedure association_opt_4 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Hanging_0, (Label => None), (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (True, (Hanging_0, (Label => None), (Int, Ada_Indent_Broken)), (Hanging_0, (Label => None), (Int, Ada_Indent_Broken))))); end case; end association_opt_4; procedure association_opt_5 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, (1 => (True, (Hanging_0, (Label => None), (Int, Ada_Indent_Broken)), (Hanging_0, (Label => None), (Int, Ada_Indent_Broken))))); end case; end association_opt_5; procedure asynchronous_select_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Motion), (8, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (3, Invalid_Token_ID) & (8, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (True, (Simple, (Label => None)), (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end asynchronous_select_0; procedure at_clause_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (6, Statement_End))); when Face => null; when Indent => null; end case; end at_clause_0; procedure block_label_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Int, Ada_Indent_Label))), (False, (Simple, (Label => None))))); end case; end block_label_0; function block_label_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Lexer, Recover_Active); begin return Propagate_Name (Nonterm, Tokens, 1); end block_label_0_check; function block_label_opt_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Lexer, Recover_Active); begin return Propagate_Name (Nonterm, Tokens, 1); end block_label_opt_0_check; procedure block_statement_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Motion), (4, Motion), (8, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((2, Invalid_Token_ID) & (4, Invalid_Token_ID) & (5, 72) & (8, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end block_statement_0; function block_statement_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 1, 7, End_Names_Optional); end block_statement_0_check; procedure block_statement_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Motion), (6, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((2, Invalid_Token_ID) & (3, 72) & (6, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end block_statement_1; function block_statement_1_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 1, 5, End_Names_Optional); end block_statement_1_check; procedure case_expression_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, Motion))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (4, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_When))))); end case; end case_expression_0; procedure case_expression_alternative_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, Motion))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Hanging_0, (Anchored_1, 1, Ada_Indent), (Anchored_1, 1, Ada_Indent + Ada_Indent_Broken))))); end case; end case_expression_alternative_0; procedure case_expression_alternative_list_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (3, Invalid_Token_ID))); when Face => null; when Indent => null; end case; end case_expression_alternative_list_0; procedure case_statement_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (4, Invalid_Token_ID) & (7, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent_When)), (Simple, (Int, Ada_Indent_When))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end case_statement_0; procedure case_statement_alternative_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, Motion))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))))); end case; end case_statement_alternative_0; procedure case_statement_alternative_list_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (2, Invalid_Token_ID))); when Face => null; when Indent => null; end case; end case_statement_alternative_list_0; procedure compilation_unit_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Int, 0))), (False, (Simple, (Int, 0))))); end case; end compilation_unit_2; procedure compilation_unit_list_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Int, 0))), (True, (Simple, (Int, 0)), (Simple, (Int, 0))))); end case; end compilation_unit_list_0; procedure compilation_unit_list_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, (1 => (True, (Simple, (Int, 0)), (Simple, (Int, 0))))); end case; end compilation_unit_list_1; function compilation_unit_list_1_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Lexer, Tokens); begin return Terminate_Partial_Parse (Partial_Parse_Active, Partial_Parse_Byte_Goal, Recover_Active, Nonterm); end compilation_unit_list_1_check; procedure component_clause_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (8, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end component_clause_0; procedure component_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Anchored_1, 4, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end component_declaration_0; procedure component_declaration_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end component_declaration_1; procedure component_list_4 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_End))); when Face => null; when Indent => null; end case; end component_list_4; procedure conditional_entry_call_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Motion), (7, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (3, Invalid_Token_ID) & (7, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end conditional_entry_call_0; procedure declaration_9 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (6, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Hanging_0, (Label => None), (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Anchored_1, 4, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end declaration_9; procedure delay_statement_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (4, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end delay_statement_0; procedure delay_statement_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end delay_statement_1; procedure derived_type_definition_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 1, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (True, (Simple, (Label => None)), (Simple, (Language, Ada_Indent_Record_1'Access, 69 & 6 & 0))), (False, (Simple, (Label => None))))); end case; end derived_type_definition_0; procedure derived_type_definition_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 1, 2))); when Indent => null; end case; end derived_type_definition_1; procedure discriminant_part_opt_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Anchored_0, 1, 1))), (False, (Simple, (Anchored_0, 1, 0))))); end case; end discriminant_part_opt_1; procedure elsif_expression_item_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Motion), (3, Motion))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (3, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent_Broken)), (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent))))); end case; end elsif_expression_item_0; procedure elsif_expression_list_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (2, Invalid_Token_ID))); when Face => null; when Indent => null; end case; end elsif_expression_list_0; procedure elsif_statement_item_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Motion), (3, Motion))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (3, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent_Broken)), (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))))); end case; end elsif_statement_item_0; procedure elsif_statement_list_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (2, Invalid_Token_ID))); when Face => null; when Indent => null; end case; end elsif_statement_list_0; procedure entry_body_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (4, Motion), (6, Motion), (8, Motion), (12, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (4, Invalid_Token_ID) & (6, Invalid_Token_ID) & (8, Invalid_Token_ID) & (9, 72) & (12, Invalid_Token_ID))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((2, 3, 1), (11, 3, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Anchored_1, 4, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end entry_body_0; function entry_body_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 2, 11, End_Names_Optional); end entry_body_0_check; procedure entry_body_formal_part_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Anchored_0, 1, 1))), (False, (Simple, (Anchored_0, 1, 1))), (False, (Simple, (Anchored_0, 1, 1))), (False, (Simple, (Anchored_0, 1, 1))), (False, (Simple, (Anchored_0, 1, 0))), (False, (Simple, (Int, Ada_Indent_Broken))))); end case; end entry_body_formal_part_0; procedure entry_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_Override), (8, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 3); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 3, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Anchored_0, 4, 1))), (False, (Simple, (Anchored_0, 4, 0))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end entry_declaration_0; procedure entry_declaration_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_Override), (6, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 3); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 3, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end entry_declaration_1; procedure enumeration_representation_clause_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Statement_End))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 1, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end enumeration_representation_clause_0; procedure enumeration_type_definition_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Anchored_0, 1, 1))), (False, (Simple, (Anchored_0, 1, 0))))); end case; end enumeration_type_definition_0; procedure exception_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (4, Statement_End))); when Face => null; when Indent => null; end case; end exception_declaration_0; procedure exception_handler_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, Motion))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))))); end case; end exception_handler_0; procedure exception_handler_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, Motion))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))))); end case; end exception_handler_1; procedure exception_handler_list_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (2, Invalid_Token_ID))); when Face => null; when Indent => null; end case; end exception_handler_list_0; procedure exit_statement_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end exit_statement_0; procedure exit_statement_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Statement_End))); when Face => null; when Indent => null; end case; end exit_statement_1; procedure expression_function_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_Override), (6, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end expression_function_declaration_0; procedure extended_return_object_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Anchored_1, 6, Ada_Indent_Broken))))); end case; end extended_return_object_declaration_0; procedure extended_return_object_declaration_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))))); end case; end extended_return_object_declaration_1; procedure extended_return_statement_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Motion), (7, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (3, Invalid_Token_ID) & (4, 72) & (7, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((True, (Simple, (Label => None)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end extended_return_statement_0; procedure extended_return_statement_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Statement_End))); when Face => null; when Indent => null; end case; end extended_return_statement_1; procedure formal_object_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (9, Statement_End))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (5, 1, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Anchored_1, 6, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end formal_object_declaration_0; procedure formal_object_declaration_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (8, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Anchored_1, 5, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end formal_object_declaration_1; procedure formal_object_declaration_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (5, 1, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end formal_object_declaration_2; procedure formal_object_declaration_3 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (6, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end formal_object_declaration_3; procedure formal_part_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, Misc))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Anchored_0, 1, 1))), (False, (Simple, (Anchored_0, 1, 0))))); end case; end formal_part_0; procedure formal_subprogram_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end formal_subprogram_declaration_0; procedure formal_subprogram_declaration_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (6, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end formal_subprogram_declaration_1; procedure formal_subprogram_declaration_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (6, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end formal_subprogram_declaration_2; procedure formal_subprogram_declaration_3 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (4, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end formal_subprogram_declaration_3; procedure formal_type_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end formal_type_declaration_0; procedure formal_type_declaration_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end formal_type_declaration_1; procedure formal_type_declaration_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Statement_End))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end formal_type_declaration_2; procedure formal_derived_type_definition_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 1, 2))); when Indent => null; end case; end formal_derived_type_definition_0; procedure formal_derived_type_definition_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 1, 2))); when Indent => null; end case; end formal_derived_type_definition_1; procedure formal_package_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (9, Statement_End))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((3, 1, 1), (6, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end formal_package_declaration_0; procedure full_type_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (True, (Simple, (Int, Ada_Indent_Broken)), (Simple, (Language, Ada_Indent_Record_1'Access, 69 & 5 & Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end full_type_declaration_0; procedure function_specification_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, Statement_Start))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))))); end case; end function_specification_0; function function_specification_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Lexer, Recover_Active); begin return Propagate_Name (Nonterm, Tokens, 2); end function_specification_0_check; procedure generic_formal_part_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, Statement_Start))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent))))); end case; end generic_formal_part_0; procedure generic_formal_part_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, Statement_Start))); when Face => null; when Indent => null; end case; end generic_formal_part_1; procedure generic_instantiation_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((2, 1, 1), (5, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end generic_instantiation_0; procedure generic_instantiation_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_Override), (8, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 3); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((3, 1, 1), (6, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end generic_instantiation_1; procedure generic_instantiation_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_Override), (8, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 3); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((3, 1, 1), (6, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end generic_instantiation_2; procedure generic_package_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (2, Invalid_Token_ID) & (3, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((True, (Simple, (Label => None)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end generic_package_declaration_0; procedure generic_renaming_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 3); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((3, 1, 1), (5, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end generic_renaming_declaration_0; procedure generic_renaming_declaration_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 3); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((3, 1, 1), (5, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Language, Ada_Indent_Renames_0'Access, +3))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end generic_renaming_declaration_1; procedure generic_renaming_declaration_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 3); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((3, 1, 1), (5, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Language, Ada_Indent_Renames_0'Access, +3))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end generic_renaming_declaration_2; procedure generic_subprogram_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_Override), (4, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (2, Invalid_Token_ID) & (4, Invalid_Token_ID))); when Face => null; when Indent => null; end case; end generic_subprogram_declaration_0; procedure goto_label_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 3, 0))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Int, Ada_Indent_Label))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end goto_label_0; procedure handled_sequence_of_statements_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((True, (Simple, (Label => None)), (Simple, (Label => None))), (False, (Simple, (Int, -Ada_Indent))), (True, (Simple, (Int, Ada_Indent_When - Ada_Indent)), (Simple, (Int, Ada_Indent_When - Ada_Indent))))); end case; end handled_sequence_of_statements_0; procedure identifier_list_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Name_Action (Parse_Data, Tree, Nonterm, Tokens, 3); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))))); end case; end identifier_list_0; procedure identifier_list_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Name_Action (Parse_Data, Tree, Nonterm, Tokens, 1); when Face => null; when Indent => null; end case; end identifier_list_1; function identifier_opt_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Lexer, Recover_Active); begin return Propagate_Name (Nonterm, Tokens, 1); end identifier_opt_0_check; procedure if_expression_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Motion), (3, Motion), (6, Motion))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (3, Invalid_Token_ID) & (5, Invalid_Token_ID) & (6, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent_Broken)), (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent))))); end case; end if_expression_0; procedure if_expression_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Motion), (3, Motion), (5, Motion))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (3, Invalid_Token_ID) & (5, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent_Broken)), (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent))))); end case; end if_expression_1; procedure if_expression_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Motion), (3, Motion))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (3, Invalid_Token_ID) & (5, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent_Broken)), (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))))); end case; end if_expression_2; procedure if_expression_3 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Motion), (3, Motion))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (3, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent_Broken)), (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent))))); end case; end if_expression_3; procedure if_statement_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Motion), (6, Motion), (10, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (3, Invalid_Token_ID) & (5, Invalid_Token_ID) & (6, Invalid_Token_ID) & (10, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (True, (Hanging_2, (Int, Ada_Indent_Broken), (Int, 2 * Ada_Indent_Broken)), (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end if_statement_0; procedure if_statement_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Motion), (5, Motion), (9, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (3, Invalid_Token_ID) & (5, Invalid_Token_ID) & (9, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (True, (Hanging_2, (Int, Ada_Indent_Broken), (Int, 2 * Ada_Indent_Broken)), (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end if_statement_1; procedure if_statement_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Motion), (8, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (3, Invalid_Token_ID) & (5, Invalid_Token_ID) & (8, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (True, (Hanging_2, (Int, Ada_Indent_Broken), (Int, 2 * Ada_Indent_Broken)), (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end if_statement_2; procedure if_statement_3 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Motion), (7, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (3, Invalid_Token_ID) & (7, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (True, (Hanging_2, (Int, Ada_Indent_Broken), (Int, 2 * Ada_Indent_Broken)), (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end if_statement_3; procedure incomplete_type_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (6, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end incomplete_type_declaration_0; procedure incomplete_type_declaration_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end incomplete_type_declaration_1; procedure index_constraint_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Anchored_0, 1, 1))), (False, (Simple, (Anchored_0, 1, 0))))); end case; end index_constraint_0; procedure interface_list_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 1, 2))); when Indent => null; end case; end interface_list_0; procedure interface_list_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, 1, 2))); when Indent => null; end case; end interface_list_1; procedure iteration_scheme_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent_Broken)), (Simple, (Int, Ada_Indent_Broken))))); end case; end iteration_scheme_0; procedure iteration_scheme_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent_Broken)), (Simple, (Int, Ada_Indent_Broken))))); end case; end iteration_scheme_1; procedure iterator_specification_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Remove_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => 4)); when Indent => null; end case; end iterator_specification_2; procedure iterator_specification_5 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Remove_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => 3)); when Indent => null; end case; end iterator_specification_5; procedure loop_statement_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_Override), (3, Motion), (8, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((2, Invalid_Token_ID) & (3, Invalid_Token_ID) & (8, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end loop_statement_0; function loop_statement_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 1, 7, End_Names_Optional); end loop_statement_0_check; procedure loop_statement_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_Override), (4, Motion), (7, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((2, Invalid_Token_ID) & (4, Invalid_Token_ID) & (7, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end loop_statement_1; function loop_statement_1_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 1, 6, End_Names_Optional); end loop_statement_1_check; procedure name_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Anchored_1, 1, Ada_Indent_Broken))), (False, (Hanging_0, (Anchored_0, 2, 1), (Anchored_0, 2, 1 + Ada_Indent_Broken))), (False, (Simple, (Anchored_0, 2, 0))))); end case; end name_0; procedure name_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (if Ada_Indent_Hanging_Rel_Exp then (Anchored_0, 1, Ada_Indent_Broken) else (Anchored_1, 1, Ada_Indent_Broken)))))); end case; end name_1; function name_2_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Lexer, Recover_Active); begin return Propagate_Name (Nonterm, Tokens, 1); end name_2_check; procedure name_5 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Mark_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, Suffix))); when Indent => null; end case; end name_5; function name_5_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Lexer, Recover_Active); begin return Propagate_Name (Nonterm, Tokens, 1); end name_5_check; function name_7_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Lexer, Recover_Active); begin return Propagate_Name (Nonterm, Tokens, 1); end name_7_check; function name_opt_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Lexer, Recover_Active); begin return Propagate_Name (Nonterm, Tokens, 1); end name_opt_0_check; procedure null_exclusion_opt_name_type_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, 3, 2))); when Indent => null; end case; end null_exclusion_opt_name_type_0; procedure null_exclusion_opt_name_type_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, 1, 2))); when Indent => null; end case; end null_exclusion_opt_name_type_1; procedure null_exclusion_opt_name_type_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 3, 2))); when Indent => null; end case; end null_exclusion_opt_name_type_2; procedure null_exclusion_opt_name_type_3 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 1, 2))); when Indent => null; end case; end null_exclusion_opt_name_type_3; procedure null_procedure_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_Override), (6, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end null_procedure_declaration_0; procedure object_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (9, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Anchored_2, 6, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end object_declaration_0; procedure object_declaration_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (9, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Anchored_1, 6, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end object_declaration_1; procedure object_declaration_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (9, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Anchored_1, 6, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end object_declaration_2; procedure object_declaration_3 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end object_declaration_3; procedure object_declaration_4 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end object_declaration_4; procedure object_declaration_5 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end object_declaration_5; procedure object_renaming_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (8, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 1); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (4, 1, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end object_renaming_declaration_0; procedure object_renaming_declaration_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 1); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end object_renaming_declaration_1; procedure object_renaming_declaration_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 1); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (5, 1, 3))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end object_renaming_declaration_2; procedure overriding_indicator_opt_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_Override))); when Face => null; when Indent => null; end case; end overriding_indicator_opt_0; procedure overriding_indicator_opt_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, Statement_Start))); when Face => null; when Indent => null; end case; end overriding_indicator_opt_1; procedure package_body_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Motion), (7, Motion), (11, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 3); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (5, Invalid_Token_ID) & (7, Invalid_Token_ID) & (8, 72) & (11, Invalid_Token_ID))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((3, 1, 1), (10, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end package_body_0; function package_body_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 3, 10, End_Names_Optional); end package_body_0_check; procedure package_body_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Motion), (9, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 3); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (5, Invalid_Token_ID) & (9, Invalid_Token_ID))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((3, 1, 1), (8, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end package_body_1; function package_body_1_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 3, 8, End_Names_Optional); end package_body_1_check; procedure package_body_stub_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 3); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end package_body_stub_0; procedure package_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (2, Invalid_Token_ID))); when Face => null; when Indent => null; end case; end package_declaration_0; procedure package_renaming_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (6, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((2, 1, 1), (4, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end package_renaming_declaration_0; procedure package_specification_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (4, Motion), (6, Motion))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (4, Invalid_Token_ID) & (6, Invalid_Token_ID))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((2, 1, 1), (9, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end package_specification_0; function package_specification_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 2, 9, End_Names_Optional); end package_specification_0_check; procedure package_specification_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (4, Motion))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (4, Invalid_Token_ID))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((2, 1, 1), (7, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end package_specification_1; function package_specification_1_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 2, 7, End_Names_Optional); end package_specification_1_check; procedure parameter_and_result_profile_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Language, Ada_Indent_Return_0'Access, 1 & 0))))); end case; end parameter_and_result_profile_0; procedure parameter_specification_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (6, 1, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Anchored_1, 7, Ada_Indent_Broken))))); end case; end parameter_specification_0; procedure parameter_specification_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (6, 1, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))))); end case; end parameter_specification_1; procedure parameter_specification_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Anchored_1, 5, Ada_Indent_Broken))))); end case; end parameter_specification_2; procedure parameter_specification_3 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))))); end case; end parameter_specification_3; procedure paren_expression_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Hanging_0, (Anchored_0, 1, 1), (Anchored_0, 1, 1 + Ada_Indent_Broken))), (False, (Simple, (Anchored_0, 1, 0))))); end case; end paren_expression_0; procedure pragma_g_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (6, Statement_End))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 3, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Anchored_0, 3, 1))), (False, (Simple, (Anchored_0, 3, 0))), (False, (Simple, (Label => None))))); end case; end pragma_g_0; procedure pragma_g_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (6, Statement_End))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 3, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Anchored_0, 3, 1))), (False, (Simple, (Anchored_0, 3, 0))), (False, (Simple, (Label => None))))); end case; end pragma_g_1; procedure pragma_g_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Statement_End))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 3, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end pragma_g_2; procedure primary_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, 3, 0))); when Indent => null; end case; end primary_0; procedure primary_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, (1 => (False, (Simple, (Language, Ada_Indent_Aggregate'Access, Null_Args))))); end case; end primary_2; procedure primary_4 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 1, 2))); when Indent => null; end case; end primary_4; procedure private_extension_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (12, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end private_extension_declaration_0; procedure private_type_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (8, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end private_type_declaration_0; procedure procedure_call_statement_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Hanging_0, (Label => None), (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end procedure_call_statement_0; procedure procedure_specification_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, Statement_Start))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))))); end case; end procedure_specification_0; function procedure_specification_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Lexer, Recover_Active); begin return Propagate_Name (Nonterm, Tokens, 2); end procedure_specification_0_check; procedure protected_body_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Motion), (9, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 3); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (5, Invalid_Token_ID) & (9, Invalid_Token_ID))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((3, 3, 2), (8, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end protected_body_0; function protected_body_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 3, 8, End_Names_Optional); end protected_body_0_check; procedure protected_body_stub_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 3); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end protected_body_stub_0; procedure protected_definition_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, Motion))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (5, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end protected_definition_0; function protected_definition_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Lexer, Recover_Active); begin return Propagate_Name (Nonterm, Tokens, 5); end protected_definition_0_check; procedure protected_definition_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end protected_definition_1; function protected_definition_1_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Lexer, Recover_Active); begin return Propagate_Name (Nonterm, Tokens, 3); end protected_definition_1_check; procedure protected_type_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (6, Motion), (11, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 3); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (6, Invalid_Token_ID) & (10, 49) & (11, Invalid_Token_ID))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end protected_type_declaration_0; function protected_type_declaration_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 3, 10, End_Names_Optional); end protected_type_declaration_0_check; procedure protected_type_declaration_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (6, Motion), (8, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 3); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (6, Invalid_Token_ID) & (7, 49) & (8, Invalid_Token_ID))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (True, (Simple, (Label => None)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end protected_type_declaration_1; function protected_type_declaration_1_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 3, 7, End_Names_Optional); end protected_type_declaration_1_check; procedure qualified_expression_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, 1, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (if Ada_Indent_Hanging_Rel_Exp then (Anchored_0, 1, Ada_Indent_Broken) else (Anchored_1, 1, Ada_Indent_Broken)))))); end case; end qualified_expression_0; procedure quantified_expression_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Anchored_1, 4, Ada_Indent_Broken))))); end case; end quantified_expression_0; procedure raise_expression_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Anchored_1, 3, Ada_Indent_Broken))))); end case; end raise_expression_0; procedure raise_statement_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Anchored_1, 3, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end raise_statement_0; procedure raise_statement_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end raise_statement_1; procedure raise_statement_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_End))); when Face => null; when Indent => null; end case; end raise_statement_2; procedure range_g_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Anchored_0, 4, 1))), (False, (Simple, (Anchored_0, 4, 0))))); end case; end range_g_0; procedure record_definition_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((True, (Simple, (Language, Ada_Indent_Record_1'Access, 69 & 1 & 0)), (Simple, (Language, Ada_Indent_Record_1'Access, 69 & 1 & Ada_Indent))), (True, (Simple, (Language, Ada_Indent_Record_1'Access, 69 & 1 & Ada_Indent)), (Simple, (Language, Ada_Indent_Record_1'Access, 69 & 1 & Ada_Indent))), (False, (Simple, (Language, Ada_Indent_Record_1'Access, 69 & 1 & 0))), (False, (Simple, (Label => None))))); end case; end record_definition_0; procedure record_representation_clause_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Statement_End))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 1, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (True, (Simple, (Language, Ada_Indent_Record_1'Access, 28 & 4 & 0)), (Simple, (Language, Ada_Indent_Record_1'Access, 28 & 4 & Ada_Indent))), (False, (Simple, (Language, Ada_Indent_Record_0'Access, 1 & 4 & Ada_Indent))), (True, (Simple, (Language, Ada_Indent_Record_1'Access, 28 & 4 & Ada_Indent)), (Simple, (Language, Ada_Indent_Record_1'Access, 28 & 4 & Ada_Indent))), (False, (Simple, (Language, Ada_Indent_Record_1'Access, 28 & 4 & 0))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end record_representation_clause_0; procedure requeue_statement_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Statement_End))); when Face => null; when Indent => null; end case; end requeue_statement_0; procedure requeue_statement_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Statement_End))); when Face => null; when Indent => null; end case; end requeue_statement_1; procedure result_profile_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 1, 2))); when Indent => Indent_Action_1 (Parse_Data, Tree, Nonterm, Tokens, 1, ((False, (Simple, (Label => None))), (False, (Simple, (Anchored_3, 1, Ada_Indent_Broken))), (False, (Simple, (Anchored_3, 1, Ada_Indent_Broken))))); end case; end result_profile_0; procedure result_profile_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_1 (Parse_Data, Tree, Nonterm, Tokens, 1, ((False, (Simple, (Label => None))), (False, (Simple, (Anchored_4, 1, Ada_Indent_Broken))))); end case; end result_profile_1; procedure selected_component_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Mark_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Prefix), (3, Suffix))); when Indent => null; end case; end selected_component_0; function selected_component_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Lexer, Recover_Active); begin return Merge_Names (Nonterm, Tokens, 1, 3); end selected_component_0_check; procedure selected_component_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Mark_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, Prefix))); when Indent => null; end case; end selected_component_1; procedure selected_component_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Mark_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, Prefix))); when Indent => null; end case; end selected_component_2; function selected_component_2_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Lexer, Recover_Active); begin return Merge_Names (Nonterm, Tokens, 1, 3); end selected_component_2_check; procedure selected_component_3 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Mark_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, Prefix))); when Indent => null; end case; end selected_component_3; procedure selective_accept_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Motion), (7, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (2, 43) & (3, Invalid_Token_ID) & (7, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((True, (Simple, (Label => None)), (Simple, (Int, Ada_Indent))), (True, (Simple, (Label => None)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end selective_accept_0; procedure selective_accept_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (2, 43) & (5, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((True, (Simple, (Label => None)), (Simple, (Int, Ada_Indent))), (True, (Simple, (Label => None)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end selective_accept_1; procedure select_alternative_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, Motion))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent))), (False, (Simple, (Int, Ada_Indent))))); end case; end select_alternative_0; procedure select_alternative_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Motion), (4, Statement_Start), (5, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))))); end case; end select_alternative_1; procedure select_alternative_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, Motion))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent))))); end case; end select_alternative_2; procedure select_alternative_4 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_End))); when Face => null; when Indent => null; end case; end select_alternative_4; procedure select_alternative_list_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, Motion))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, 43) & (2, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent))))); end case; end select_alternative_list_0; procedure select_alternative_list_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, (1 => (False, (Simple, (Int, Ada_Indent))))); end case; end select_alternative_list_1; procedure simple_return_statement_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end simple_return_statement_0; procedure simple_statement_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_End))); when Face => null; when Indent => null; end case; end simple_statement_0; procedure simple_statement_3 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Statement_End))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 3, 0))); when Indent => null; end case; end simple_statement_3; procedure simple_statement_8 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Statement_End))); when Face => null; when Indent => null; end case; end simple_statement_8; procedure single_protected_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (4, Motion), (7, Motion), (9, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (4, Invalid_Token_ID) & (7, Invalid_Token_ID) & (8, 49) & (9, Invalid_Token_ID))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end single_protected_declaration_0; function single_protected_declaration_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 2, 8, End_Names_Optional); end single_protected_declaration_0_check; procedure single_protected_declaration_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (4, Motion), (6, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (4, Invalid_Token_ID) & (5, 49) & (6, Invalid_Token_ID))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (True, (Simple, (Label => None)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end single_protected_declaration_1; function single_protected_declaration_1_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 2, 5, End_Names_Optional); end single_protected_declaration_1_check; procedure single_task_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (4, Motion), (11, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (4, Invalid_Token_ID) & (8, 49) & (11, Invalid_Token_ID))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((2, 3, 2), (9, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end single_task_declaration_0; function single_task_declaration_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 2, 10, End_Names_Optional); end single_task_declaration_0_check; procedure single_task_declaration_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (4, Motion), (8, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (4, Invalid_Token_ID) & (5, 49) & (8, Invalid_Token_ID))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((2, 3, 2), (6, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (True, (Simple, (Label => None)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end single_task_declaration_1; function single_task_declaration_1_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 2, 7, End_Names_Optional); end single_task_declaration_1_check; procedure single_task_declaration_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (4, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end single_task_declaration_2; procedure subprogram_body_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_Override), (4, Motion), (6, Motion), (10, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (2, Invalid_Token_ID) & (4, Invalid_Token_ID) & (6, Invalid_Token_ID) & (7, 72) & (10, Invalid_Token_ID))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (9, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (True, (Simple, (Label => None)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end subprogram_body_0; function subprogram_body_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 2, 9, End_Names_Optional); end subprogram_body_0_check; procedure subprogram_body_stub_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_Override), (6, Statement_End))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end subprogram_body_stub_0; procedure subprogram_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_Override), (4, Statement_End))); when Face => null; when Indent => null; end case; end subprogram_declaration_0; procedure subprogram_default_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, 1, 1))); when Indent => null; end case; end subprogram_default_0; procedure subprogram_renaming_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (2, Statement_Override), (6, Statement_End))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (4, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Language, Ada_Indent_Renames_0'Access, +2))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end subprogram_renaming_declaration_0; function subprogram_specification_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Lexer, Recover_Active); begin return Propagate_Name (Nonterm, Tokens, 1); end subprogram_specification_0_check; function subprogram_specification_1_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Lexer, Recover_Active); begin return Propagate_Name (Nonterm, Tokens, 1); end subprogram_specification_1_check; procedure subtype_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (6, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 2); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end subtype_declaration_0; procedure subtype_indication_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 1, 2))); when Indent => null; end case; end subtype_indication_0; procedure subtype_indication_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 1, 2))); when Indent => null; end case; end subtype_indication_1; procedure subtype_indication_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, 1, 2))); when Indent => null; end case; end subtype_indication_2; procedure subtype_indication_3 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, 1, 2))); when Indent => null; end case; end subtype_indication_3; procedure subunit_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Statement_Override))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Anchored_0, 2, 1))), (False, (Simple, (Anchored_0, 2, 0))), (False, (Simple, (Label => None))))); end case; end subunit_0; procedure task_body_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Motion), (7, Motion), (11, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 3); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (5, Invalid_Token_ID) & (7, Invalid_Token_ID) & (8, 72) & (11, Invalid_Token_ID))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((3, 3, 2), (10, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end task_body_0; function task_body_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 3, 10, End_Names_Optional); end task_body_0_check; procedure task_body_stub_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 3); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))))); end case; end task_body_stub_0; procedure task_definition_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, Motion))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))))); end case; end task_definition_0; procedure task_definition_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => null; when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, (1 => (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))))); end case; end task_definition_1; procedure task_type_declaration_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (6, Motion), (9, Motion), (13, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 3); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (6, Invalid_Token_ID) & (9, Invalid_Token_ID) & (10, 49) & (13, Invalid_Token_ID))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((3, 3, 2), (12, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end task_type_declaration_0; function task_type_declaration_0_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 3, 12, End_Names_Optional); end task_type_declaration_0_check; procedure task_type_declaration_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (6, Motion), (10, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 3); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (6, Invalid_Token_ID) & (7, 49) & (10, Invalid_Token_ID))); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, ((3, 3, 2), (9, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (True, (Simple, (Label => None)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end task_type_declaration_1; function task_type_declaration_1_check (Lexer : access constant WisiToken.Lexer.Instance'Class; Nonterm : in out WisiToken.Recover_Token; Tokens : in WisiToken.Recover_Token_Array; Recover_Active : in Boolean) return WisiToken.Semantic_Checks.Check_Status is pragma Unreferenced (Nonterm, Recover_Active); begin return Match_Names (Lexer, Descriptor, Tokens, 3, 9, End_Names_Optional); end task_type_declaration_1_check; procedure task_type_declaration_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (6, Statement_End))); Name_Action (Parse_Data, Tree, Nonterm, Tokens, 3); when Face => Face_Apply_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 3, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end task_type_declaration_2; procedure timed_entry_call_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Motion), (6, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (3, Invalid_Token_ID) & (6, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end timed_entry_call_0; procedure variant_part_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (7, Statement_End))); Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (4, Invalid_Token_ID) & (7, Invalid_Token_ID))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_When))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))), (False, (Simple, (Label => None))))); end case; end variant_part_0; procedure variant_list_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Motion_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Invalid_Token_ID) & (2, Invalid_Token_ID))); when Face => null; when Indent => null; end case; end variant_list_0; procedure variant_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (1, Motion))); when Face => null; when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Hanging_0, (Label => None), (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent))), (True, (Simple, (Int, Ada_Indent)), (Simple, (Int, Ada_Indent))))); end case; end variant_0; procedure use_clause_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Statement_End))); when Face => Face_Apply_List_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (4, 1, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Use))), (False, (Simple, (Label => None))))); end case; end use_clause_0; procedure use_clause_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (4, Statement_End))); when Face => Face_Apply_List_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 1, 2))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Use))), (False, (Simple, (Label => None))))); end case; end use_clause_1; procedure use_clause_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Statement_End))); when Face => Face_Apply_List_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Use))), (False, (Simple, (Label => None))))); end case; end use_clause_2; procedure with_clause_0 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (5, Statement_End))); when Face => Face_Apply_List_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (4, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_With))), (False, (Simple, (Label => None))))); end case; end with_clause_0; procedure with_clause_1 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (4, Statement_End))); when Face => Face_Apply_List_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_With))), (False, (Simple, (Label => None))))); end case; end with_clause_1; procedure with_clause_2 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (4, Statement_End))); when Face => Face_Apply_List_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (3, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_Broken))), (False, (Simple, (Int, Ada_Indent_With))), (False, (Simple, (Label => None))))); end case; end with_clause_2; procedure with_clause_3 (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class; Tree : in out WisiToken.Syntax_Trees.Tree; Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index; Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array) is Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type (User_Data); begin case Parse_Data.Post_Parse_Action is when Navigate => Statement_Action (Parse_Data, Tree, Nonterm, Tokens, ((1, Statement_Start), (3, Statement_End))); when Face => Face_Apply_List_Action (Parse_Data, Tree, Nonterm, Tokens, (1 => (2, 1, 1))); when Indent => Indent_Action_0 (Parse_Data, Tree, Nonterm, Tokens, ((False, (Simple, (Label => None))), (False, (Simple, (Int, Ada_Indent_With))), (False, (Simple, (Label => None))))); end case; end with_clause_3; end Ada_Process_Actions;
Kidev/Ada_Drivers_Library
Ada
1,742
ads
-- This package was generated by the Ada_Drivers_Library project wizard script package ADL_Config is Vendor : constant String := "STMicro"; -- From board definition Max_Mount_Points : constant := 2; -- From default value Max_Mount_Name_Length : constant := 128; -- From default value Runtime_Profile : constant String := "ravenscar-full"; -- From command line Device_Name : constant String := "STM32F769NIHx"; -- From board definition Device_Family : constant String := "STM32F7"; -- From board definition Runtime_Name : constant String := "ravenscar-full-stm32f769disco"; -- From default value Has_Ravenscar_Full_Runtime : constant String := "True"; -- From board definition CPU_Core : constant String := "ARM Cortex-M7F"; -- From mcu definition Board : constant String := "STM32F769_Discovery"; -- From command line Has_ZFP_Runtime : constant String := "False"; -- From board definition Has_Ravenscar_SFP_Runtime : constant String := "True"; -- From board definition High_Speed_External_Clock : constant := 25000000; -- From board definition Max_Path_Length : constant := 1024; -- From default value Runtime_Name_Suffix : constant String := "stm32f769disco"; -- From board definition Architecture : constant String := "ARM"; -- From board definition end ADL_Config;
LaplaceKorea/curve25519-spark2014
Ada
3,146
adb
-- Copyright 2008, Google Inc. All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are -- met: -- -- * Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- * Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- * Neither the name of Google Inc. nor the names of its contributors may -- be used to endorse or promote products derived from this software -- without specific prior written permission. -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER -- OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. package body Curve25519_Add with SPARK_Mode is function Add (X, Y : Integer_255) return Integer_255 is Sum : Integer_255 := (others => 0); procedure Prove_Add with Ghost, Pre => (for all J in Sum'Range => Sum (J) = X (J) + Y (J)), Post => To_Big_Integer (Sum) = To_Big_Integer (X) + To_Big_Integer (Y) is X_255, Y_255, Sum_255 : Big_Integer := Zero; begin for J in Sum'Range loop X_255 := X_255 + (+X (J)) * Conversion_Array (J); pragma Assert (X_255 = Partial_Conversion (X, J)); Y_255 := Y_255 + (+Y (J)) * Conversion_Array (J); pragma Assert (Y_255 = Partial_Conversion (Y, J)); Sum_255 := Sum_255 + (+Sum (J)) * Conversion_Array (J); pragma Assert (Sum_255 = Partial_Conversion (Sum, J)); pragma Loop_Invariant (X_255 = Partial_Conversion (X, J)); pragma Loop_Invariant (Y_255 = Partial_Conversion (Y, J)); pragma Loop_Invariant (Sum_255 = Partial_Conversion (Sum, J)); pragma Loop_Invariant (Partial_Conversion (Sum, J) = Partial_Conversion (X, J) + Partial_Conversion (Y, J)); end loop; end Prove_Add; begin for J in Sum'Range loop Sum (J) := X (J) + Y (J); pragma Loop_Invariant (for all K in 0 .. J => Sum (K) = X (K) + Y (K)); end loop; Prove_Add; return Sum; end Add; end Curve25519_Add;
charlie5/lace
Ada
284
adb
with ada.unchecked_Deallocation; package body physics.Space is procedure free (Self : in out View) is procedure deallocate is new ada.unchecked_Deallocation (Item'Class, View); begin Self.destruct; deallocate (Self); end free; end physics.Space;
stcarrez/ada-asf
Ada
2,505
adb
----------------------------------------------------------------------- -- asf-lifecycles-response -- Response phase -- Copyright (C) 2010, 2011, 2012, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Exceptions; with ASF.Components.Root; with ASF.Responses; with Util.Log.Loggers; -- The <b>ASF.Lifecycles.Response</b> package defines the behavior -- of the response phase. package body ASF.Lifecycles.Response is use Ada.Exceptions; -- The logger Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("ASF.Lifecycles.Response"); -- ------------------------------ -- Initialize the phase controller. -- ------------------------------ overriding procedure Initialize (Controller : in out Response_Controller; Views : ASF.Applications.Views.View_Handler_Access) is begin Controller.View_Handler := Views; end Initialize; -- ------------------------------ -- Execute the restore view phase. -- ------------------------------ overriding procedure Execute (Controller : in Response_Controller; Context : in out ASF.Contexts.Faces.Faces_Context'Class) is View : constant Components.Root.UIViewRoot := Context.Get_View_Root; begin if Components.Root.Get_Root (View) = null then Log.Warn ("Page not found: {0}", Context.Get_View_Name); Context.Get_Response.Send_Error (ASF.Responses.SC_NOT_FOUND); Context.Response_Completed; else Controller.View_Handler.Render_View (Context, View); end if; exception when E : others => Log.Error ("Error when displaying view {0}: {1}: {2}", "?", Exception_Name (E), Exception_Message (E)); raise; end Execute; end ASF.Lifecycles.Response;
jhumphry/Ada_BinToAsc
Ada
1,054
ads
-- ASCII85 -- Various binary data to ASCII codecs known as Base85, ASCII85 etc -- Copyright (c) 2015, James Humphry - see LICENSE file for details with System.Storage_Elements; with BinToAsc, BinToAsc.Base85; package ASCII85 is package BToA is new BinToAsc(Bin => System.Storage_Elements.Storage_Element, Bin_Array_Index => System.Storage_Elements.Storage_Offset, Bin_Array => System.Storage_Elements.Storage_Array); use type BToA.Alphabet; subtype Codec_State is BToA.Codec_State; function Ready return BToA.Codec_State renames BToA.Ready; function Complete return BToA.Codec_State renames BToA.Completed; function Failed return BToA.Codec_State renames BToA.Failed; Z85_Alphabet : constant BToA.Alphabet_85 := "0123456789" & "abcdefghij" & "klmnopqrst" & "uvwxyzABCD" & "EFGHIJKLMN" & "OPQRSTUVWX" & "YZ.-:+=^!/" & "*?&<>()[]{" & "}@%$#"; package Z85 is new BToA.Base85(Alphabet => Z85_Alphabet); end ASCII85;
charlie5/cBound
Ada
1,983
ads
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces; with xcb.xcb_render_pointfix_t; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_render_create_radial_gradient_request_t is -- Item -- type Item is record major_opcode : aliased Interfaces.Unsigned_8; minor_opcode : aliased Interfaces.Unsigned_8; length : aliased Interfaces.Unsigned_16; picture : aliased xcb.xcb_render_picture_t; inner : aliased xcb.xcb_render_pointfix_t.Item; outer : aliased xcb.xcb_render_pointfix_t.Item; inner_radius : aliased xcb.xcb_render_fixed_t; outer_radius : aliased xcb.xcb_render_fixed_t; num_stops : aliased Interfaces.Unsigned_32; end record; -- Item_Array -- type Item_Array is array (Interfaces.C .size_t range <>) of aliased xcb .xcb_render_create_radial_gradient_request_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_render_create_radial_gradient_request_t.Item, Element_Array => xcb.xcb_render_create_radial_gradient_request_t.Item_Array, Default_Terminator => (others => <>)); subtype Pointer is C_Pointers.Pointer; -- Pointer_Array -- type Pointer_Array is array (Interfaces.C .size_t range <>) of aliased xcb .xcb_render_create_radial_gradient_request_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_render_create_radial_gradient_request_t.Pointer, Element_Array => xcb.xcb_render_create_radial_gradient_request_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_render_create_radial_gradient_request_t;
stcarrez/ada-util
Ada
1,683
adb
with Ada.Text_IO; with Util.Serialize.IO.JSON; with Util.Beans.Objects; with Util.Beans.Objects.Vectors; with Util.Beans.Objects.Maps; with Util.Streams.Texts; with Util.Streams.Buffered; procedure JsonObj is package UBO renames Util.Beans.Objects; procedure Add_Person (Into : in UBO.Vectors.Vector_Bean_Access; Name : in String; Last_Name : in String; Age : in Natural); procedure Add_Person (Into : in UBO.Vectors.Vector_Bean_Access; Name : in String; Last_Name : in String; Age : in Natural) is Person : constant UBO.Object := UBO.Maps.Create; begin UBO.Set_Value (Person, "name", UBO.To_Object (Name)); UBO.Set_Value (Person, "last_name", UBO.To_Object (Last_Name)); UBO.Set_Value (Person, "age", UBO.To_Object (Age)); Into.Append (Person); end Add_Person; List : constant UBO.Vectors.Vector_Bean_Access := new UBO.Vectors.Vector_Bean; Root : constant UBO.Object := UBO.To_Object (List); begin Add_Person (List, "John", "Johnson", 23); Add_Person (List, "Harry", "Potter", 17); declare Buffer : aliased Util.Streams.Buffered.Output_Buffer_Stream; Print : aliased Util.Streams.Texts.Print_Stream; Output : Util.Serialize.IO.JSON.Output_Stream; begin Buffer.Initialize (Size => 10000); Print.Initialize (Buffer'Unchecked_Access); Output.Initialize (Print'Unchecked_Access); Output.Write_Entity ("", Root); Output.Flush; Ada.Text_IO.Put_Line (Util.Streams.Texts.To_String (Buffer)); end; end JsonObj;
rogermc2/GA_Ada
Ada
792
ads
with GL.Types; with Glfw.Windows; with Maths; package Pick_Manager is type Orientation is private; type Orientation_Array is array (GL.Types.Int range <>) of Orientation; procedure Init_Pick_Manager; procedure Pick (Window : in out Glfw.Windows.Window; Positions : GL.Types.Singles.Vector3_Array; Orientations : Orientation_Array; Indices_Size : GL.Types.Int; View_Matrix : GL.Types.Singles.Matrix4; Projection_Matrix : GL.Types.Singles.Matrix4); function Pick_Active return Boolean; private type Orientation is record Angle : Maths.Radian; Axis : GL.Types.Singles.Vector3; end record; end Pick_Manager;
sungyeon/drake
Ada
294
adb
package body System.Wid_Bool is function Width_Boolean (Lo, Hi : Boolean) return Natural is begin if Lo > Hi then return 0; elsif Lo then return 4; -- "TRUE" else return 5; -- "FALSE" end if; end Width_Boolean; end System.Wid_Bool;
reznikmm/matreshka
Ada
4,965
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Generic_Collections; package AMF.UMLDI.UML_Edges.Collections is pragma Preelaborate; package UMLDI_UML_Edge_Collections is new AMF.Generic_Collections (UMLDI_UML_Edge, UMLDI_UML_Edge_Access); type Set_Of_UMLDI_UML_Edge is new UMLDI_UML_Edge_Collections.Set with null record; Empty_Set_Of_UMLDI_UML_Edge : constant Set_Of_UMLDI_UML_Edge; type Ordered_Set_Of_UMLDI_UML_Edge is new UMLDI_UML_Edge_Collections.Ordered_Set with null record; Empty_Ordered_Set_Of_UMLDI_UML_Edge : constant Ordered_Set_Of_UMLDI_UML_Edge; type Bag_Of_UMLDI_UML_Edge is new UMLDI_UML_Edge_Collections.Bag with null record; Empty_Bag_Of_UMLDI_UML_Edge : constant Bag_Of_UMLDI_UML_Edge; type Sequence_Of_UMLDI_UML_Edge is new UMLDI_UML_Edge_Collections.Sequence with null record; Empty_Sequence_Of_UMLDI_UML_Edge : constant Sequence_Of_UMLDI_UML_Edge; private Empty_Set_Of_UMLDI_UML_Edge : constant Set_Of_UMLDI_UML_Edge := (UMLDI_UML_Edge_Collections.Set with null record); Empty_Ordered_Set_Of_UMLDI_UML_Edge : constant Ordered_Set_Of_UMLDI_UML_Edge := (UMLDI_UML_Edge_Collections.Ordered_Set with null record); Empty_Bag_Of_UMLDI_UML_Edge : constant Bag_Of_UMLDI_UML_Edge := (UMLDI_UML_Edge_Collections.Bag with null record); Empty_Sequence_Of_UMLDI_UML_Edge : constant Sequence_Of_UMLDI_UML_Edge := (UMLDI_UML_Edge_Collections.Sequence with null record); end AMF.UMLDI.UML_Edges.Collections;
AdaCore/libadalang
Ada
40
ads
package Bar is I : Integer; end Bar;
optikos/oasis
Ada
5,097
ads
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Lexical_Elements; with Program.Elements.Private_Type_Definitions; with Program.Element_Visitors; package Program.Nodes.Private_Type_Definitions is pragma Preelaborate; type Private_Type_Definition is new Program.Nodes.Node and Program.Elements.Private_Type_Definitions.Private_Type_Definition and Program.Elements.Private_Type_Definitions .Private_Type_Definition_Text with private; function Create (Abstract_Token : Program.Lexical_Elements.Lexical_Element_Access; Tagged_Token : Program.Lexical_Elements.Lexical_Element_Access; Limited_Token : Program.Lexical_Elements.Lexical_Element_Access; Private_Token : not null Program.Lexical_Elements.Lexical_Element_Access) return Private_Type_Definition; type Implicit_Private_Type_Definition is new Program.Nodes.Node and Program.Elements.Private_Type_Definitions.Private_Type_Definition with private; function Create (Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False; Has_Abstract : Boolean := False; Has_Tagged : Boolean := False; Has_Limited : Boolean := False) return Implicit_Private_Type_Definition with Pre => Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance; private type Base_Private_Type_Definition is abstract new Program.Nodes.Node and Program.Elements.Private_Type_Definitions.Private_Type_Definition with null record; procedure Initialize (Self : aliased in out Base_Private_Type_Definition'Class); overriding procedure Visit (Self : not null access Base_Private_Type_Definition; Visitor : in out Program.Element_Visitors.Element_Visitor'Class); overriding function Is_Private_Type_Definition_Element (Self : Base_Private_Type_Definition) return Boolean; overriding function Is_Definition_Element (Self : Base_Private_Type_Definition) return Boolean; type Private_Type_Definition is new Base_Private_Type_Definition and Program.Elements.Private_Type_Definitions .Private_Type_Definition_Text with record Abstract_Token : Program.Lexical_Elements.Lexical_Element_Access; Tagged_Token : Program.Lexical_Elements.Lexical_Element_Access; Limited_Token : Program.Lexical_Elements.Lexical_Element_Access; Private_Token : not null Program.Lexical_Elements .Lexical_Element_Access; end record; overriding function To_Private_Type_Definition_Text (Self : aliased in out Private_Type_Definition) return Program.Elements.Private_Type_Definitions .Private_Type_Definition_Text_Access; overriding function Abstract_Token (Self : Private_Type_Definition) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Tagged_Token (Self : Private_Type_Definition) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Limited_Token (Self : Private_Type_Definition) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Private_Token (Self : Private_Type_Definition) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Has_Abstract (Self : Private_Type_Definition) return Boolean; overriding function Has_Tagged (Self : Private_Type_Definition) return Boolean; overriding function Has_Limited (Self : Private_Type_Definition) return Boolean; type Implicit_Private_Type_Definition is new Base_Private_Type_Definition with record Is_Part_Of_Implicit : Boolean; Is_Part_Of_Inherited : Boolean; Is_Part_Of_Instance : Boolean; Has_Abstract : Boolean; Has_Tagged : Boolean; Has_Limited : Boolean; end record; overriding function To_Private_Type_Definition_Text (Self : aliased in out Implicit_Private_Type_Definition) return Program.Elements.Private_Type_Definitions .Private_Type_Definition_Text_Access; overriding function Is_Part_Of_Implicit (Self : Implicit_Private_Type_Definition) return Boolean; overriding function Is_Part_Of_Inherited (Self : Implicit_Private_Type_Definition) return Boolean; overriding function Is_Part_Of_Instance (Self : Implicit_Private_Type_Definition) return Boolean; overriding function Has_Abstract (Self : Implicit_Private_Type_Definition) return Boolean; overriding function Has_Tagged (Self : Implicit_Private_Type_Definition) return Boolean; overriding function Has_Limited (Self : Implicit_Private_Type_Definition) return Boolean; end Program.Nodes.Private_Type_Definitions;
onox/orka
Ada
1,110
ads
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2022 onox <[email protected]> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. package Orka.SIMD.AVX.Integers.Shift.Emulation is pragma Pure; function Shift_Elements_Left_Zeros (Elements : m256i) return m256i with Inline_Always; -- Shift each element to the left by one element, shifting in zeros function Shift_Elements_Right_Zeros (Elements : m256i) return m256i with Inline_Always; -- Shift each element to the right by one element, shifting in zeros end Orka.SIMD.AVX.Integers.Shift.Emulation;
jfouquart/synth
Ada
1,587
ads
-- This file is covered by the Internet Software Consortium (ISC) License -- Reference: ../License.txt package Definitions is pragma Pure; synth_version_major : constant String := "2"; synth_version_minor : constant String := "04"; copyright_years : constant String := "2015-2018"; host_localbase : constant String := "/usr/local"; host_make : constant String := "/usr/bin/make"; host_pkg8 : constant String := host_localbase & "/sbin/pkg"; host_bmake : constant String := host_localbase & "/bin/bmake"; host_make_program : constant String := host_make; chroot_make : constant String := "/usr/bin/make"; chroot_bmake : constant String := "/usr/pkg/bin/bmake -m /usr/pkg/share/mk"; chroot_make_program : constant String := chroot_make; jobs_per_cpu : constant := 2; type cpu_range is range 1 .. 32; type scanners is range cpu_range'First .. cpu_range'Last; type builders is range cpu_range'First .. cpu_range'Last * jobs_per_cpu; type package_system is (ports_collection, pkgsrc); software_framework : constant package_system := ports_collection; -- Notes for tailoring Synth. Use sed to: -- 1. Modify host_localbase to value of LOCALBASE -- 2. Change software_framework to "pkgsrc" for pkgsrc version -- 3. Change host_make_program to "host_bmake" for Non-NetBSD pkgsrc platforms -- 4. Change chroot_make_program to "chroot_bmake" for pkgsrc version -- 5. On replicant.ads, change "/usr/local" to "/usr/pkg" on pkgsrc end Definitions;
ekoeppen/STM32_Generic_Ada_Drivers
Ada
582
ads
with STM32_SVD.GPIO; with STM32GD.EXTI; generic Pin : GPIO_Pin; Port : GPIO_Port; Mode : Pin_IO_Modes := Input; In_Conf : Pin_In_Conf := In_Analog; Out_Conf : Pin_Out_Conf := Out_PushPull; package STM32GD.GPIO.Pin is pragma Preelaborate; procedure Enable; procedure Disable; procedure Init; procedure Set_Mode (Mode : Pin_IO_Modes); procedure Set_In_Conf (Conf : Pin_In_Conf); procedure Set_Out_Conf (Conf : Pin_Out_Conf); function Is_Set return Boolean; procedure Set; procedure Clear; procedure Toggle; end STM32GD.GPIO.Pin;
DrenfongWong/tkm-rpc
Ada
1,068
ads
with Tkmrpc.Types; with Tkmrpc.Operations.Ike; package Tkmrpc.Response.Ike.Isa_Skip_Create_First is Data_Size : constant := 0; Padding_Size : constant := Response.Body_Size - Data_Size; subtype Padding_Range is Natural range 1 .. Padding_Size; subtype Padding_Type is Types.Byte_Sequence (Padding_Range); type Response_Type is record Header : Response.Header_Type; Padding : Padding_Type; end record; for Response_Type use record Header at 0 range 0 .. (Response.Header_Size * 8) - 1; Padding at Response.Header_Size + Data_Size range 0 .. (Padding_Size * 8) - 1; end record; for Response_Type'Size use Response.Response_Size * 8; Null_Response : constant Response_Type := Response_Type' (Header => Response.Header_Type'(Operation => Operations.Ike.Isa_Skip_Create_First, Result => Results.Invalid_Operation, Request_Id => 0), Padding => Padding_Type'(others => 0)); end Tkmrpc.Response.Ike.Isa_Skip_Create_First;
reznikmm/matreshka
Ada
3,784
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Elements; package ODF.DOM.Text_Note_Continuation_Notice_Forward_Elements is pragma Preelaborate; type ODF_Text_Note_Continuation_Notice_Forward is limited interface and XML.DOM.Elements.DOM_Element; type ODF_Text_Note_Continuation_Notice_Forward_Access is access all ODF_Text_Note_Continuation_Notice_Forward'Class with Storage_Size => 0; end ODF.DOM.Text_Note_Continuation_Notice_Forward_Elements;
reznikmm/matreshka
Ada
4,904
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Visitors; with ODF.DOM.Text_Object_Index_Entry_Template_Elements; package Matreshka.ODF_Text.Object_Index_Entry_Template_Elements is type Text_Object_Index_Entry_Template_Element_Node is new Matreshka.ODF_Text.Abstract_Text_Element_Node and ODF.DOM.Text_Object_Index_Entry_Template_Elements.ODF_Text_Object_Index_Entry_Template with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Text_Object_Index_Entry_Template_Element_Node; overriding function Get_Local_Name (Self : not null access constant Text_Object_Index_Entry_Template_Element_Node) return League.Strings.Universal_String; overriding procedure Enter_Node (Self : not null access Text_Object_Index_Entry_Template_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); overriding procedure Leave_Node (Self : not null access Text_Object_Index_Entry_Template_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); overriding procedure Visit_Node (Self : not null access Text_Object_Index_Entry_Template_Element_Node; Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); end Matreshka.ODF_Text.Object_Index_Entry_Template_Elements;
burratoo/Acton
Ada
988
ads
------------------------------------------------------------------------------------------ -- -- -- OAK CORE SUPPORT PACKAGE -- -- ARM ARM7TDMI -- -- -- -- OAK.CORE_SUPPORT_PACKAGE -- -- -- -- Copyright (C) 2014-2021, Patrick Bernardi -- -- -- ------------------------------------------------------------------------------------------ package Oak.Core_Support_Package with Pure is end Oak.Core_Support_Package;
stcarrez/dynamo
Ada
42,711
ads
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- A L I -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2015, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package defines the internal data structures used for representation -- of Ada Library Information (ALI) acquired from the ALI files generated by -- the front end. with Casing; use Casing; with Gnatvsn; use Gnatvsn; with Namet; use Namet; with Rident; use Rident; with Table; with Types; use Types; with GNAT.HTable; use GNAT.HTable; package ALI is -------------- -- Id Types -- -------------- -- The various entries are stored in tables with distinct subscript ranges. -- The following type definitions show the ranges used for the subscripts -- (Id values) for the various tables. type ALI_Id is range 0 .. 999_999; -- Id values used for ALIs table entries type Unit_Id is range 1_000_000 .. 1_999_999; -- Id values used for Unit table entries type With_Id is range 2_000_000 .. 2_999_999; -- Id values used for Withs table entries type Arg_Id is range 3_000_000 .. 3_999_999; -- Id values used for argument table entries type Sdep_Id is range 4_000_000 .. 4_999_999; -- Id values used for Sdep table entries type Source_Id is range 5_000_000 .. 5_999_999; -- Id values used for Source table entries type Interrupt_State_Id is range 6_000_000 .. 6_999_999; -- Id values used for Interrupt_State table entries type Priority_Specific_Dispatching_Id is range 7_000_000 .. 7_999_999; -- Id values used for Priority_Specific_Dispatching table entries -------------------- -- ALI File Table -- -------------------- -- Each ALI file read generates an entry in the ALIs table No_ALI_Id : constant ALI_Id := ALI_Id'First; -- Special value indicating no ALI entry First_ALI_Entry : constant ALI_Id := No_ALI_Id + 1; -- Id of first actual entry in table type Main_Program_Type is (None, Proc, Func); -- Indicator of whether unit can be used as main program type ALIs_Record is record Afile : File_Name_Type; -- Name of ALI file Ofile_Full_Name : File_Name_Type; -- Full name of object file corresponding to the ALI file Sfile : File_Name_Type; -- Name of source file that generates this ALI file (which is equal -- to the name of the source file in the first unit table entry for -- this ALI file, since the body if present is always first). Ver : String (1 .. Ver_Len_Max); -- Value of library version (V line in ALI file). Not set if -- V lines are ignored as a result of the Ignore_Lines parameter. Ver_Len : Natural; -- Length of characters stored in Ver. Not set if V lines are ignored as -- a result of the Ignore_Lines parameter. SAL_Interface : Boolean; -- Set True when this is an interface to a standalone library First_Unit : Unit_Id; -- Id of first Unit table entry for this file Last_Unit : Unit_Id; -- Id of last Unit table entry for this file First_Sdep : Sdep_Id; -- Id of first Sdep table entry for this file Last_Sdep : Sdep_Id; -- Id of last Sdep table entry for this file Main_Program : Main_Program_Type; -- Indicator of whether first unit can be used as main program. Not set -- if 'M' appears in Ignore_Lines. Main_Priority : Int; -- Indicates priority value if Main_Program field indicates that this -- can be a main program. A value of -1 (No_Main_Priority) indicates -- that no parameter was found, or no M line was present. Not set if -- 'M' appears in Ignore_Lines. Main_CPU : Int; -- Indicates processor if Main_Program field indicates that this can -- be a main program. A value of -1 (No_Main_CPU) indicates that no C -- parameter was found, or no M line was present. Not set if 'M' appears -- in Ignore_Lines. Time_Slice_Value : Int; -- Indicates value of time slice parameter from T=xxx on main program -- line. A value of -1 indicates that no T=xxx parameter was found, or -- no M line was present. Not set if 'M' appears in Ignore_Lines. WC_Encoding : Character; -- Wide character encoding if main procedure. Otherwise not relevant. -- Not set if 'M' appears in Ignore_Lines. Locking_Policy : Character; -- Indicates locking policy for units in this file. Space means tasking -- was not used, or that no Locking_Policy pragma was present or that -- this is a language defined unit. Otherwise set to first character -- (upper case) of policy name. Not set if 'P' appears in Ignore_Lines. Partition_Elaboration_Policy : Character; -- Indicates partition elaboration policy for units in this file. Space -- means that no Partition_Elaboration_Policy pragma was present or that -- this is a language defined unit. Otherwise set to first character -- (upper case) of policy name. Not set if 'P' appears in Ignore_Lines. Queuing_Policy : Character; -- Indicates queuing policy for units in this file. Space means tasking -- was not used, or that no Queuing_Policy pragma was present or that -- this is a language defined unit. Otherwise set to first character -- (upper case) of policy name. Not set if 'P' appears in Ignore_Lines. Task_Dispatching_Policy : Character; -- Indicates task dispatching policy for units in this file. Space means -- tasking was not used, or that no Task_Dispatching_Policy pragma was -- present or that this is a language defined unit. Otherwise set to -- first character (upper case) of policy name. Not set if 'P' appears -- in Ignore_Lines. Compile_Errors : Boolean; -- Set to True if compile errors for unit. Note that No_Object will -- always be set as well in this case. Not set if 'P' appears in -- Ignore_Lines. GNATprove_Mode : Boolean; -- Set to True if ALI and object file produced in GNATprove_Mode as -- signalled by GP appearing on the P line. Not set if 'P' appears in -- Ignore_Lines. No_Object : Boolean; -- Set to True if no object file generated. Not set if 'P' appears in -- Ignore_Lines. Normalize_Scalars : Boolean; -- Set to True if file was compiled with Normalize_Scalars. Not set if -- 'P' appears in Ignore_Lines. SSO_Default : Character; -- Set to 'H' or 'L' if file was compiled with a configuration pragma -- file containing Default_Scalar_Storage_Order (High/Low_Order_First). -- Set to ' ' if neither pragma was present. Not set if 'P' appears in -- Ignore_Lines. Unit_Exception_Table : Boolean; -- Set to True if unit exception table pointer generated. Not set if 'P' -- appears in Ignore_Lines. Zero_Cost_Exceptions : Boolean; -- Set to True if file was compiled with zero cost exceptions. Not set -- if 'P' appears in Ignore_Lines. Restrictions : Restrictions_Info; -- Restrictions information reconstructed from R lines First_Interrupt_State : Interrupt_State_Id; Last_Interrupt_State : Interrupt_State_Id'Base; -- These point to the first and last entries in the interrupt state -- table for this unit. If no entries, then Last_Interrupt_State = -- First_Interrupt_State - 1 (that's why the 'Base reference is there, -- it can be one less than the lower bound of the subtype). Not set if -- 'I' appears in Ignore_Lines First_Specific_Dispatching : Priority_Specific_Dispatching_Id; Last_Specific_Dispatching : Priority_Specific_Dispatching_Id'Base; -- These point to the first and last entries in the priority specific -- dispatching table for this unit. If there are no entries, then -- Last_Specific_Dispatching = First_Specific_Dispatching - 1. That -- is why the 'Base reference is there, it can be one less than the -- lower bound of the subtype. Not set if 'S' appears in Ignore_Lines. end record; No_Main_Priority : constant Int := -1; -- Code for no main priority set No_Main_CPU : constant Int := -1; -- Code for no main cpu set package ALIs is new Table.Table ( Table_Component_Type => ALIs_Record, Table_Index_Type => ALI_Id, Table_Low_Bound => First_ALI_Entry, Table_Initial => 500, Table_Increment => 200, Table_Name => "ALIs"); ---------------- -- Unit Table -- ---------------- -- Each unit within an ALI file generates an entry in the unit table No_Unit_Id : constant Unit_Id := Unit_Id'First; -- Special value indicating no unit table entry First_Unit_Entry : constant Unit_Id := No_Unit_Id + 1; -- Id of first actual entry in table type Unit_Type is (Is_Spec, Is_Body, Is_Spec_Only, Is_Body_Only); -- Indicates type of entry, if both body and spec appear in the ALI file, -- then the first unit is marked Is_Body, and the second is marked Is_Spec. -- If only a spec appears, then it is marked as Is_Spec_Only, and if only -- a body appears, then it is marked Is_Body_Only). subtype Version_String is String (1 .. 8); -- Version string, taken from unit record type Unit_Record is record My_ALI : ALI_Id; -- Corresponding ALI entry Uname : Unit_Name_Type; -- Name of Unit Sfile : File_Name_Type; -- Name of source file Preelab : Boolean; -- Indicates presence of PR parameter for a preelaborated package No_Elab : Boolean; -- Indicates presence of NE parameter for a unit that has does not -- have an elaboration routine (since it has no elaboration code). Pure : Boolean; -- Indicates presence of PU parameter for a package having pragma Pure Dynamic_Elab : Boolean; -- Set to True if the unit was compiled with dynamic elaboration checks -- (i.e. either -gnatE or pragma Elaboration_Checks (RM) was used to -- compile the unit). Elaborate_Body : Boolean; -- Indicates presence of EB parameter for a package which has a pragma -- Elaborate_Body, and also for generic package instantiations. Set_Elab_Entity : Boolean; -- Indicates presence of EE parameter for a unit which has an -- elaboration entity which must be set true as part of the -- elaboration of the unit. Has_RACW : Boolean; -- Indicates presence of RA parameter for a package that declares at -- least one Remote Access to Class_Wide (RACW) object. Remote_Types : Boolean; -- Indicates presence of RT parameter for a package which has a -- pragma Remote_Types. Serious_Errors : Boolean; -- Indicates presence of SE parameter indicating that compilation of -- the unit encountered as serious error. Shared_Passive : Boolean; -- Indicates presence of SP parameter for a package which has a pragma -- Shared_Passive. RCI : Boolean; -- Indicates presence of RC parameter for a package which has a pragma -- Remote_Call_Interface. Predefined : Boolean; -- Indicates if unit is language predefined (or a child of such a unit) Internal : Boolean; -- Indicates if unit is an internal unit (or a child of such a unit) First_With : With_Id; -- Id of first withs table entry for this file Last_With : With_Id; -- Id of last withs table entry for this file First_Arg : Arg_Id; -- Id of first args table entry for this file Last_Arg : Arg_Id; -- Id of last args table entry for this file Utype : Unit_Type; -- Type of entry Is_Generic : Boolean; -- True for generic unit (i.e. a generic declaration, or a generic -- body). False for a non-generic unit. Unit_Kind : Character; -- Indicates the nature of the unit. 'p' for Packages and 's' for -- subprograms. Version : Version_String; -- Version of unit Icasing : Casing_Type; -- Indicates casing of identifiers in source file for this unit. This -- is used for informational output, and also for constructing the main -- unit if it is being built in Ada. Kcasing : Casing_Type; -- Indicates casing of keywords in source file for this unit. This is -- used for informational output, and also for constructing the main -- unit if it is being built in Ada. Elab_Position : aliased Natural; -- Initialized to zero. Set non-zero when a unit is chosen and -- placed in the elaboration order. The value represents the -- ordinal position in the elaboration order. Init_Scalars : Boolean; -- Set True if IS qualifier appears in ALI file, indicating that -- an Initialize_Scalars pragma applies to the unit. SAL_Interface : Boolean; -- Set True when this is an interface to a standalone library Directly_Scanned : Boolean; -- True iff it is a unit from an ALI file specified to gnatbind Body_Needed_For_SAL : Boolean; -- Indicates that the source for the body of the unit (subprogram, -- package, or generic unit) must be included in a standalone library. Elaborate_Body_Desirable : Boolean; -- Indicates that the front end elaboration circuitry decided that it -- would be a good idea if this package had Elaborate_Body. The binder -- will attempt, but does not promise, to place the elaboration call -- for the body right after the call for the spec, or at least as close -- together as possible. Optimize_Alignment : Character; -- Optimize_Alignment setting. Set to L/S/T/O for OL/OS/OT/OO present Has_Finalizer : Boolean; -- Indicates whether a package body or a spec has a library-level -- finalization routine. end record; package Units is new Table.Table ( Table_Component_Type => Unit_Record, Table_Index_Type => Unit_Id, Table_Low_Bound => First_Unit_Entry, Table_Initial => 100, Table_Increment => 200, Table_Name => "Unit"); --------------------------- -- Interrupt State Table -- --------------------------- -- An entry is made in this table for each I (interrupt state) line -- encountered in the input ALI file. The First/Last_Interrupt_Id -- fields of the ALI file entry show the range of entries defined -- within a particular ALI file. type Interrupt_State_Record is record Interrupt_Id : Nat; -- Id from interrupt state entry Interrupt_State : Character; -- State from interrupt state entry ('u'/'r'/'s') IS_Pragma_Line : Nat; -- Line number of Interrupt_State pragma end record; package Interrupt_States is new Table.Table ( Table_Component_Type => Interrupt_State_Record, Table_Index_Type => Interrupt_State_Id'Base, Table_Low_Bound => Interrupt_State_Id'First, Table_Initial => 100, Table_Increment => 200, Table_Name => "Interrupt_States"); ----------------------------------------- -- Priority Specific Dispatching Table -- ----------------------------------------- -- An entry is made in this table for each S (priority specific -- dispatching) line encountered in the input ALI file. The -- First/Last_Specific_Dispatching_Id fields of the ALI file -- entry show the range of entries defined within a particular -- ALI file. type Specific_Dispatching_Record is record Dispatching_Policy : Character; -- First character (upper case) of the corresponding policy name First_Priority : Nat; -- Lower bound of the priority range to which the specified dispatching -- policy applies. Last_Priority : Nat; -- Upper bound of the priority range to which the specified dispatching -- policy applies. PSD_Pragma_Line : Nat; -- Line number of Priority_Specific_Dispatching pragma end record; package Specific_Dispatching is new Table.Table ( Table_Component_Type => Specific_Dispatching_Record, Table_Index_Type => Priority_Specific_Dispatching_Id'Base, Table_Low_Bound => Priority_Specific_Dispatching_Id'First, Table_Initial => 100, Table_Increment => 200, Table_Name => "Priority_Specific_Dispatching"); -------------- -- Switches -- -------------- -- These switches record status information about ali files that -- have been read, for quick reference without searching tables. -- Note: a switch will be left set at its default value if the line -- which might otherwise set it is ignored (from Ignore_Lines). Dynamic_Elaboration_Checks_Specified : Boolean := False; -- Set to False by Initialize_ALI. Set to True if Scan_ALI reads -- a unit for which dynamic elaboration checking is enabled. GNATprove_Mode_Specified : Boolean := False; -- Set to True if an ali file was produced in GNATprove mode. Initialize_Scalars_Used : Boolean := False; -- Set True if an ali file contains the Initialize_Scalars flag Locking_Policy_Specified : Character := ' '; -- Set to blank by Initialize_ALI. Set to the appropriate locking policy -- character if an ali file contains a P line setting the locking policy. No_Normalize_Scalars_Specified : Boolean := False; -- Set to False by Initialize_ALI. Set to True if an ali file indicates -- that the file was compiled without normalize scalars. No_Object_Specified : Boolean := False; -- Set to False by Initialize_ALI. Set to True if an ali file contains -- the No_Object flag. Normalize_Scalars_Specified : Boolean := False; -- Set to False by Initialize_ALI. Set to True if an ali file indicates -- that the file was compiled in Normalize_Scalars mode. Partition_Elaboration_Policy_Specified : Character := ' '; -- Set to blank by Initialize_ALI. Set to the appropriate partition -- elaboration policy character if an ali file contains a P line setting -- the policy. Queuing_Policy_Specified : Character := ' '; -- Set to blank by Initialize_ALI. Set to the appropriate queuing policy -- character if an ali file contains a P line setting the queuing policy. Cumulative_Restrictions : Restrictions_Info := No_Restrictions; -- This variable records the cumulative contributions of R lines in all -- ali files, showing whether a restriction pragma exists anywhere, and -- accumulating the aggregate knowledge of violations. SSO_Default_Specified : Boolean := False; -- Set to True if at least one ALI file contains an OH/OL flag indicating -- that it was compiled with a configuration pragmas file containing the -- pragma Default_Scalar_Storage_Order (OH/OL present in ALI file P line). Stack_Check_Switch_Set : Boolean := False; -- Set to True if at least one ALI file contains '-fstack-check' in its -- argument list. Static_Elaboration_Model_Used : Boolean := False; -- Set to False by Initialize_ALI. Set to True if any ALI file for a -- non-internal unit compiled with the static elaboration model is -- encountered. Task_Dispatching_Policy_Specified : Character := ' '; -- Set to blank by Initialize_ALI. Set to the appropriate task dispatching -- policy character if an ali file contains a P line setting the -- task dispatching policy. Unreserve_All_Interrupts_Specified : Boolean := False; -- Set to False by Initialize_ALI. Set to True if an ali file is read that -- has P line specifying unreserve all interrupts mode. Zero_Cost_Exceptions_Specified : Boolean := False; -- Set to False by Initialize_ALI. Set to True if an ali file is read that -- has a P line specifying the generation of zero cost exceptions. ----------------- -- Withs Table -- ----------------- -- Each With line (W line) in an ALI file generates a Withs table entry -- Note: there will be no entries in this table if 'W' lines are ignored No_With_Id : constant With_Id := With_Id'First; -- Special value indicating no withs table entry First_With_Entry : constant With_Id := No_With_Id + 1; -- Id of first actual entry in table type With_Record is record Uname : Unit_Name_Type; -- Name of Unit Sfile : File_Name_Type; -- Name of source file, set to No_File in generic case Afile : File_Name_Type; -- Name of ALI file, set to No_File in generic case Elaborate : Boolean; -- Indicates presence of E parameter Elaborate_All : Boolean; -- Indicates presence of EA parameter Elab_All_Desirable : Boolean; -- Indicates presence of AD parameter Elab_Desirable : Boolean; -- Indicates presence of ED parameter SAL_Interface : Boolean := False; -- True if the Unit is an Interface of a Stand-Alone Library Limited_With : Boolean := False; -- True if unit is named in a limited_with_clause Implicit_With_From_Instantiation : Boolean := False; -- True if this is an implicit with from a generic instantiation end record; package Withs is new Table.Table ( Table_Component_Type => With_Record, Table_Index_Type => With_Id, Table_Low_Bound => First_With_Entry, Table_Initial => 5000, Table_Increment => 200, Table_Name => "Withs"); --------------------- -- Arguments Table -- --------------------- -- Each Arg line (A line) in an ALI file generates an Args table entry -- Note: there will be no entries in this table if 'A' lines are ignored No_Arg_Id : constant Arg_Id := Arg_Id'First; -- Special value indicating no args table entry First_Arg_Entry : constant Arg_Id := No_Arg_Id + 1; -- Id of first actual entry in table package Args is new Table.Table ( Table_Component_Type => String_Ptr, Table_Index_Type => Arg_Id, Table_Low_Bound => First_Arg_Entry, Table_Initial => 1000, Table_Increment => 100, Table_Name => "Args"); -------------------------- -- Linker_Options Table -- -------------------------- -- If an ALI file has one of more Linker_Options lines, then a single -- entry is made in this table. If more than one Linker_Options lines -- appears in a given ALI file, then the arguments are concatenated -- to form the entry in this table, using a NUL character as the -- separator, and a final NUL character is appended to the end. -- Note: there will be no entries in this table if 'L' lines are ignored type Linker_Option_Record is record Name : Name_Id; -- Name entry containing concatenated list of Linker_Options -- arguments separated by NUL and ended by NUL as described above. Unit : Unit_Id; -- Unit_Id for the entry Internal_File : Boolean; -- Set True if the linker options are from an internal file. This is -- used to insert certain standard entries after all the user entries -- but before the entries from the run-time. Original_Pos : Positive; -- Keep track of original position in the linker options table. This -- is used to implement a stable sort when we sort the linker options -- table. end record; -- The indexes of active entries in this table range from 1 to the -- value of Linker_Options.Last. The zero'th element is for sort call. package Linker_Options is new Table.Table ( Table_Component_Type => Linker_Option_Record, Table_Index_Type => Integer, Table_Low_Bound => 0, Table_Initial => 200, Table_Increment => 400, Table_Name => "Linker_Options"); ----------------- -- Notes Table -- ----------------- -- The notes table records entries from N lines type Notes_Record is record Pragma_Type : Character; -- 'A', 'C', 'I', 'S', 'T' for Annotate/Comment/Ident/Subtitle/Title Pragma_Line : Nat; -- Line number of pragma Pragma_Col : Nat; -- Column number of pragma Pragma_Source_File : File_Name_Type; -- Source file of pragma Pragma_Args : Name_Id; -- Pragma arguments. No_Name if no arguments, otherwise a single -- name table entry consisting of all the characters on the notes -- line from the first non-blank character following the source -- location to the last character on the line. end record; -- The indexes of active entries in this table range from 1 to the -- value of Linker_Options.Last. The zero'th element is for convenience -- if the table needs to be sorted. package Notes is new Table.Table ( Table_Component_Type => Notes_Record, Table_Index_Type => Integer, Table_Low_Bound => 0, Table_Initial => 200, Table_Increment => 400, Table_Name => "Notes"); ------------------------------------------- -- External Version Reference Hash Table -- ------------------------------------------- -- This hash table keeps track of external version reference strings -- as read from E lines in the ali file. The stored values do not -- include the terminating quote characters. -- Note: there will be no entries in this table if 'E' lines are ignored type Vindex is range 0 .. 98; -- Type to define range of headers function SHash (S : String_Ptr) return Vindex; -- Hash function for this table function SEq (F1, F2 : String_Ptr) return Boolean; -- Equality function for this table package Version_Ref is new Simple_HTable ( Header_Num => Vindex, Element => Boolean, No_Element => False, Key => String_Ptr, Hash => SHash, Equal => SEq); ------------------------- -- No_Dependency Table -- ------------------------- -- Each R line for a No_Dependency Restriction generates an entry in -- this No_Dependency table. type No_Dep_Record is record ALI_File : ALI_Id; -- ALI File containing the entry No_Dep_Unit : Name_Id; -- Id for names table entry including entire name, including periods end record; package No_Deps is new Table.Table ( Table_Component_Type => No_Dep_Record, Table_Index_Type => Integer, Table_Low_Bound => 0, Table_Initial => 200, Table_Increment => 400, Table_Name => "No_Deps"); ------------------------------------ -- Sdep (Source Dependency) Table -- ------------------------------------ -- Each source dependency (D line) in an ALI file generates an entry in the -- Sdep table. -- Note: there will be no entries in this table if 'D' lines are ignored No_Sdep_Id : constant Sdep_Id := Sdep_Id'First; -- Special value indicating no Sdep table entry First_Sdep_Entry : Sdep_Id := No_Sdep_Id + 1; -- Id of first Sdep entry for current ali file. This is initialized to the -- first Sdep entry in the table, and then incremented appropriately as -- successive ALI files are scanned. type Sdep_Record is record Sfile : File_Name_Type; -- Name of source file Stamp : Time_Stamp_Type; -- Time stamp value. Note that this will be all zero characters for the -- dummy entries for missing or non-dependent files. Checksum : Word; -- Checksum value. Note that this will be all zero characters for the -- dummy entries for missing or non-dependent files Dummy_Entry : Boolean; -- Set True for dummy entries that correspond to missing files or files -- where no dependency relationship exists. Subunit_Name : Name_Id; -- Name_Id for subunit name if present, else No_Name Unit_Name : Name_Id; -- Name_Id for the unit name if not a subunit (No_Name for a subunit) Rfile : File_Name_Type; -- Reference file name. Same as Sfile unless a Source_Reference pragma -- was used, in which case it reflects the name used in the pragma. Start_Line : Nat; -- Starting line number in file. Always 1, unless a Source_Reference -- pragma was used, in which case it reflects the line number value -- given in the pragma. end record; package Sdep is new Table.Table ( Table_Component_Type => Sdep_Record, Table_Index_Type => Sdep_Id, Table_Low_Bound => First_Sdep_Entry, Table_Initial => 5000, Table_Increment => 200, Table_Name => "Sdep"); ---------------------------- -- Use of Name Table Info -- ---------------------------- -- All unit names and file names are entered into the Names table. The Info -- fields of these entries are used as follows: -- Unit name Info field has Unit_Id of unit table entry -- ALI file name Info field has ALI_Id of ALI table entry -- Source file name Info field has Source_Id of source table entry -------------------------- -- Cross-Reference Data -- -------------------------- -- The following table records cross-reference sections, there is one entry -- for each X header line in the ALI file for an xref section. -- Note: there will be no entries in this table if 'X' lines are ignored type Xref_Section_Record is record File_Num : Sdep_Id; -- Dependency number for file (entry in Sdep.Table) File_Name : File_Name_Type; -- Name of file First_Entity : Nat; -- First entry in Xref_Entity table Last_Entity : Nat; -- Last entry in Xref_Entity table end record; package Xref_Section is new Table.Table ( Table_Component_Type => Xref_Section_Record, Table_Index_Type => Nat, Table_Low_Bound => 1, Table_Initial => 50, Table_Increment => 300, Table_Name => "Xref_Section"); -- The following is used to indicate whether a typeref field is present -- for the entity, and if so what kind of typeref field. type Tref_Kind is ( Tref_None, -- No typeref present Tref_Access, -- Access type typeref (points to designated type) Tref_Derived, -- Derived type typeref (points to parent type) Tref_Type); -- All other cases type Visibility_Kind is (Global, -- Library level entity Static, -- Static C/C++ entity Other); -- Local and other entity -- The following table records entities for which xrefs are recorded type Xref_Entity_Record is record Line : Pos; -- Line number of definition Etype : Character; -- Set to the identification character for the entity. See section -- "Cross-Reference Entity Identifiers" in lib-xref.ads for details. Col : Pos; -- Column number of definition Visibility : Visibility_Kind; -- Visibility of entity Entity : Name_Id; -- Name of entity Iref_File_Num : Sdep_Id; -- This field is set to the dependency reference for the file containing -- the generic entity that this one instantiates, or to No_Sdep_Id if -- the current entity is not an instantiation Iref_Line : Nat; -- This field is set to the line number in Iref_File_Num of the generic -- entity that this one instantiates, or to zero if the current entity -- is not an instantiation. Rref_Line : Nat; -- This field is set to the line number of a renaming reference if -- one is present, or to zero if no renaming reference is present Rref_Col : Nat; -- This field is set to the column number of a renaming reference -- if one is present, or to zero if no renaming reference is present. Tref : Tref_Kind; -- Indicates if a typeref is present, and if so what kind. Set to -- Tref_None if no typeref field is present. Tref_File_Num : Sdep_Id; -- This field is set to No_Sdep_Id if no typeref is present, or -- if the typeref refers to an entity in standard. Otherwise it -- it is the dependency reference for the file containing the -- declaration of the typeref entity. Tref_Line : Nat; -- This field is set to zero if no typeref is present, or if the -- typeref refers to an entity in standard. Otherwise it contains -- the line number of the declaration of the typeref entity. Tref_Type : Character; -- This field is set to blank if no typeref is present, or if the -- typeref refers to an entity in standard. Otherwise it contains -- the identification character for the typeref entity. See section -- "Cross-Reference Entity Identifiers" in lib-xref.ads for details. Tref_Col : Nat; -- This field is set to zero if no typeref is present, or if the -- typeref refers to an entity in standard. Otherwise it contains -- the column number of the declaration of the parent type. Tref_Standard_Entity : Name_Id; -- This field is set to No_Name if no typeref is present or if the -- typeref refers to a declared entity rather than an entity in -- package Standard. If there is a typeref that references an -- entity in package Standard, then this field is a Name_Id -- reference for the entity name. Oref_File_Num : Sdep_Id; -- This field is set to No_Sdep_Id if the entity doesn't override any -- other entity, or to the dependency reference for the overridden -- entity. Oref_Line : Nat; Oref_Col : Nat; -- These two fields are set to the line and column of the overridden -- entity. First_Xref : Nat; -- Index into Xref table of first cross-reference Last_Xref : Nat; -- Index into Xref table of last cross-reference. The value in -- Last_Xref can be less than the First_Xref value to indicate -- that no entries are present in the Xref Table. end record; package Xref_Entity is new Table.Table ( Table_Component_Type => Xref_Entity_Record, Table_Index_Type => Nat, Table_Low_Bound => 1, Table_Initial => 500, Table_Increment => 300, Table_Name => "Xref_Entity"); Array_Index_Reference : constant Character := '*'; Interface_Reference : constant Character := 'I'; -- Some special types of references. In the ALI file itself, these -- are output as attributes of the entity, not as references, but -- there is no provision in Xref_Entity_Record for storing multiple -- such references. -- The following table records actual cross-references type Xref_Record is record File_Num : Sdep_Id; -- Set to the file dependency number for the cross-reference. Note -- that if no file entry is present explicitly, this is just a copy -- of the reference for the current cross-reference section. Line : Nat; -- Line number for the reference. This is zero when referencing a -- predefined entity, but in this case Name is set. Rtype : Character; -- Indicates type of reference, using code used in ALI file: -- r = reference -- m = modification -- b = body entity -- c = completion of private or incomplete type -- x = type extension -- i = implicit reference -- Array_Index_Reference = reference to the index of an array -- Interface_Reference = reference to an interface implemented -- by the type -- See description in lib-xref.ads for further details Col : Nat; -- Column number for the reference Name : Name_Id := No_Name; -- This is only used when referencing a predefined entity. Currently, -- this only occurs for array indexes. -- Note: for instantiation references, Rtype is set to ' ', and Col is -- set to zero. One or more such entries can follow any other reference. -- When there is more than one such entry, this is to be read as: -- e.g. ref1 ref2 ref3 -- ref1 is a reference to an entity that was instantied at ref2. -- ref2 itself is also the result of an instantiation, that took -- place at ref3 Imported_Lang : Name_Id := No_Name; Imported_Name : Name_Id := No_Name; -- Language and name of imported entity reference end record; package Xref is new Table.Table ( Table_Component_Type => Xref_Record, Table_Index_Type => Nat, Table_Low_Bound => 1, Table_Initial => 2000, Table_Increment => 300, Table_Name => "Xref"); -------------------------------------- -- Subprograms for Reading ALI File -- -------------------------------------- procedure Initialize_ALI; -- Initialize the ALI tables. Also resets all switch values to defaults function Scan_ALI (F : File_Name_Type; T : Text_Buffer_Ptr; Ignore_ED : Boolean; Err : Boolean; Read_Xref : Boolean := False; Read_Lines : String := ""; Ignore_Lines : String := "X"; Ignore_Errors : Boolean := False; Directly_Scanned : Boolean := False) return ALI_Id; -- Given the text, T, of an ALI file, F, scan and store the information -- from the file, and return the Id of the resulting entry in the ALI -- table. Switch settings may be modified as described above in the -- switch description settings. -- -- Ignore_ED is normally False. If set to True, it indicates that -- all AD/ED (elaboration desirable) indications in the ALI file are -- to be ignored. This parameter is obsolete now that the -f switch -- is removed from gnatbind, and should be removed ??? -- -- Err determines the action taken on an incorrectly formatted file. -- If Err is False, then an error message is output, and the program -- is terminated. If Err is True, then no error message is output, -- and No_ALI_Id is returned. -- -- Ignore_Lines requests that Scan_ALI ignore any lines that start -- with any given key character. The default value of X causes all -- Xref lines to be ignored. The corresponding data in the ALI -- tables will not be filled in this case. It is not possible -- to ignore U (unit) lines, they are always read. -- -- Read_Lines requests that Scan_ALI process only lines that start -- with one of the given characters. The corresponding data in the -- ALI file for any characters not given in the list will not be -- set. The default value of the null string indicates that all -- lines should be read (unless Ignore_Lines is specified). U -- (unit) lines are always read regardless of the value of this -- parameter. -- -- Note: either Ignore_Lines or Read_Lines should be non-null, but not -- both. If both are provided then only the Read_Lines value is used, -- and the Ignore_Lines parameter is ignored. -- -- Read_XREF is set True to read and acquire the cross-reference -- information. If Read_XREF is set to True, then the effect is to ignore -- all lines other than U, W, D and X lines and the Ignore_Lines and -- Read_Lines parameters are ignored (i.e. the use of True for Read_XREF -- is equivalent to specifying an argument of "UWDX" for Read_Lines. -- -- Ignore_Errors is normally False. If it is set True, then Scan_ALI -- will do its best to scan through a file and extract all information -- it can, even if there are errors. In this case Err is only set if -- Scan_ALI was completely unable to process the file (e.g. it did not -- look like an ALI file at all). Ignore_Errors is intended to improve -- the downward compatibility of new compilers with old tools. -- -- Directly_Scanned is normally False. If it is set to True, then the -- units (spec and/or body) corresponding to the ALI file are marked as -- such. It is used to decide for what units gnatbind should generate -- the symbols corresponding to 'Version or 'Body_Version in -- Stand-Alone Libraries. end ALI;
riccardo-bernardini/eugen
Ada
4,865
adb
pragma Ada_2012; package body Finite_State_Scanners is ---------------- -- Add_Branch -- ---------------- procedure Add_Branch (Table : in out Automata_Table; From : State_Type; On : Ada.Strings.Maps.Character_Set; To : State_Type) is use Ada.Strings.Maps; Set : constant Character_Sequence := To_Sequence (On); begin for C of Set loop Table.Transitions (From, C) := (Class => To_State, Destination => To); end loop; end Add_Branch; ----------------- -- Add_Default -- ----------------- procedure Add_Default (Table : in out Automata_Table; From : State_Type; To : State_Type) is begin for C in Character loop if Table.Transitions (From, C).Class = Empty then Table.Transitions (From, C) := (Class => To_State, Destination => To); end if; end loop; end Add_Default; --------------- -- Add_Final -- --------------- procedure Add_Final (Table : in out Automata_Table; From : State_Type; On : Ada.Strings.Maps.Character_Set; Result : Token_Type) is begin for C of Ada.Strings.Maps.To_Sequence (On) loop Table.Transitions (From, C) := (Class => To_Final, Result => Result); end loop; end Add_Final; --------------- -- Add_Final -- --------------- procedure Add_Shortcut (Table : in out Automata_Table; From : State_Type; On : String; Result : Token_Type) is begin Table.Shortcuts (From).Append ((Length => On'Length, Shortcut => On, Result => Result)); end Add_Shortcut; ----------------- -- Add_Default -- ----------------- procedure Add_Default (Table : in out Automata_Table; From : State_Type; Result : Token_Type) is begin for C in Character loop if Table.Transitions (From, C).Class = Empty then Table.Transitions (From, C) := (Class => To_Final, Result => Result); end if; end loop; end Add_Default; ---------- -- Scan -- ---------- function Scan (Input : String; Automa : Automata_Table; Skip : String := " ") return Token_List is use Ada.Strings.Maps; Cursor : Positive := Input'First; Result : Token_List; Current_State : State_Type; Image_First : Positive; Spaces : constant Character_Set := To_Set (Skip); function End_Of_Input return Boolean is (Cursor > Input'Last); function Current_Char return Character is (if End_Of_Input then Character'Val (0) else Input (Cursor)); procedure Next_Char is begin if not End_Of_Input then Cursor := Cursor + 1; end if; end Next_Char; procedure Skip_Spaces is begin while Is_In (Current_Char, Spaces) loop Next_Char; end loop; end Skip_Spaces; procedure Start_New_Token is begin Current_State := Start_State; Skip_Spaces; Image_First := Cursor; end Start_New_Token; procedure Append_Token (To : in out Token_List; Token : Token_Type) is Image : constant String := Input (Image_First .. Cursor - 1); begin To.L.Append (Token_Descriptor'(Length => Image'Length, Token => Token, Image => Image)); end Append_Token; begin Start_New_Token; while not End_Of_Input loop case Automa.Transitions (Current_State, Current_Char).Class is when Empty => for Shortcut of Automa.Shortcuts (Current_State) loop raise Program_Error with "Shortcuts not implemented yet"; pragma Compile_Time_Warning (True, "Shortcuts not implemented"); end loop; raise Constraint_Error; when To_State => Current_State := Automa.Transitions (Current_State, Current_Char).Destination; Next_Char; when To_Final => Append_Token (Result, Automa.Transitions (Current_State, Current_Char).Result); Next_Char; Start_New_Token; end case; end loop; return Result; end Scan; end Finite_State_Scanners;
BrickBot/Bound-T-H8-300
Ada
5,733
adb
-- Output.Opt (body) -- -- A component of the Bound-T Worst-Case Execution Time Tool. -- ------------------------------------------------------------------------------- -- Copyright (c) 1999 .. 2015 Tidorum Ltd -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- 1. Redistributions of source code must retain the above copyright notice, this -- list of conditions and the following disclaimer. -- 2. Redistributions in binary form must reproduce the above copyright notice, -- this list of conditions and the following disclaimer in the documentation -- and/or other materials provided with the distribution. -- -- This software is provided by the copyright holders and contributors "as is" and -- any express or implied warranties, including, but not limited to, the implied -- warranties of merchantability and fitness for a particular purpose are -- disclaimed. In no event shall the copyright owner or contributors be liable for -- any direct, indirect, incidental, special, exemplary, or consequential damages -- (including, but not limited to, procurement of substitute goods or services; -- loss of use, data, or profits; or business interruption) however caused and -- on any theory of liability, whether in contract, strict liability, or tort -- (including negligence or otherwise) arising in any way out of the use of this -- software, even if advised of the possibility of such damage. -- -- Other modules (files) of this software composition should contain their -- own copyright statements, which may have different copyright and usage -- conditions. The above conditions apply to this file. ------------------------------------------------------------------------------- -- -- $Revision: 1.2 $ -- $Date: 2015/10/24 20:05:50 $ -- -- $Log: output-opt.adb,v $ -- Revision 1.2 2015/10/24 20:05:50 niklas -- Moved to free licence. -- -- Revision 1.1 2011-08-31 04:17:13 niklas -- Added for BT-CH-0222: Option registry. Option -dump. External help files. -- with Options.Groups; package body Output.Opt is procedure When_Field_Separator_Reset (Option : in Options.Option_Ref) -- -- To be done after the Field_Separator is reset: reset also -- the Basic_Output field separator to the same value. -- is begin Basic_Output.Field_Separator := Field_Separator; end When_Field_Separator_Reset; procedure When_Field_Separator_Set ( Option : in Options.Option_Ref; Value : in String) -- -- To be done after the Field_Separator is set: set also -- the Basic_Output field separator to the same value. -- is begin Basic_Output.Field_Separator := Field_Separator; end When_Field_Separator_Set; procedure When_Show_Notes_Reset (Option : in Options.Option_Ref) -- -- To be done after Show_Notes is reset: reset also -- the Basic_Output Show_Notes option to the same value. -- is begin Basic_Output.Show_Notes := Show_Notes; end When_Show_Notes_Reset; procedure When_Show_Notes_Set ( Option : in Options.Option_Ref; Value : in String) -- -- To be done after Show_Notes is set: set also -- the Basic_Output Show_Notes option to the same value. -- is begin Basic_Output.Show_Notes := Show_Notes; end When_Show_Notes_Set; function Show_Surrounding_Lines return Boolean is begin return Source_Line_Precision.Value = Around; end Show_Surrounding_Lines; Detail_Group : constant Options.Group_Name_T := Options.Group ("output_details"); -- -- The options that control the details of the (basic) output, -- such as the field-separator character. Output_Detail : constant Options.Groups_T := ( Options.Groups.Outputs, Detail_Group); -- -- The groups for most of our options. begin -- Output.Opt Options.Register ( Option => Field_Separator_Opt'access, Name => "output_sep", Groups => Output_Detail, Reset => When_Field_Separator_Reset'access, Set => When_Field_Separator_Set'access); Options.Register ( Option => Show_Notes_Opt'access, Name => "verbose", Groups => Output_Detail, Reset => When_Show_Notes_Reset'access, Set => When_Show_Notes_Set'access); Options.Register ( Option => Show_Notes_Opt'access, Name => "v", Groups => Output_Detail, Reset => When_Show_Notes_Reset'access, Set => When_Show_Notes_Set'access); Options.Register ( Option => Source_File_Form_Opt'access, Name => "source", Groups => Output_Detail); Options.Register ( Option => Show_Code_Addresses_Opt'access, Name => "address", Groups => Output_Detail); Options.Register ( Option => Source_Line_Precision'access, Name => "lines", Groups => Output_Detail); Options.Register ( Option => Trace_Locus_Nesting_Opt'access, Name => Options.Trace_Item ("locus_nesting"), Group => Options.Groups.Trace); Options.Register ( Option => Trace_Current_Locus_Opt'access, Name => Options.Trace_Item ("locus"), Group => Options.Groups.Trace); Options.Register ( Option => Max_Warnings_Opt'access, Name => "max_warn", Group => Options.Groups.Resource_Limits); Options.Register ( Option => Max_Errors_Opt'access, Name => "max_err", Group => Options.Groups.Resource_Limits); Options.Register ( Option => Max_Faults_Opt'access, Name => "max_fault", Group => Options.Groups.Resource_Limits); end Output.Opt;
zhmu/ananas
Ada
342
adb
with Concat5_Pkg2; use Concat5_Pkg2; package body Concat5_Pkg1 is procedure Make_Failed (S : String); pragma No_Inline (Make_Failed); procedure Make_Failed (S : String) is begin Compare (S); end; procedure Scan (S : String) is begin Make_Failed ("option " & S & " should start with '--'"); end; end Concat5_Pkg1;