Changeset 2665
- Timestamp:
- 11/06/08 21:57:27 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/tendra/src/producers/ada/xasis/xasis-utils.adb
r2644 r2665 15 15 with XASIS.Types; 16 16 17 with Gela.To_Upper; use Gela; 18 17 19 package body XASIS.Utils is 18 20 … … 30 32 (Left, Right : Asis.Program_Text) return Boolean 31 33 is 32 use Ada.Characters.Handling; 33 L : constant String := To_Lower (To_String (Left)); 34 R : constant String := To_Lower (To_String (Right)); 34 L_Text : Wide_String (1 .. Left'Length * 3); 35 L_Last : Natural; 36 R_Text : Wide_String (1 .. Right'Length * 3); 37 R_Last : Natural; 35 38 begin 36 39 if Left (Left'First) = ''' then 37 40 return Left = Right; 41 elsif Left (Left'First) = '"' then 42 To_Upper.Identifier (Left, L_Text, L_Last); 43 To_Upper.Identifier (Right, R_Text, R_Last); 44 45 if L_Last > 0 then 46 return L_Text (1 .. L_Last) = R_Text (1 .. R_Last); 47 else 48 return Left = Right; 49 end if; 38 50 else 39 if R = "false" then40 return L = R;41 end if; 42 return To_Lower (To_String (Left)) = To_Lower (To_String (Right));51 To_Upper.Identifier (Left, L_Text, L_Last); 52 To_Upper.Identifier (Right, R_Text, R_Last); 53 54 return L_Text (1 .. L_Last) = R_Text (1 .. R_Last); 43 55 end if; 44 56 end Are_Equal_Identifiers;