From b5b150382f1aa027c081c6a8eed39d0cc666d455 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 27 Nov 2014 08:01:48 +0100 Subject: ortho debug/oread: add a procedure to write keyword, use uppercase. --- src/ortho/oread/ortho_front.adb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/ortho/oread') diff --git a/src/ortho/oread/ortho_front.adb b/src/ortho/oread/ortho_front.adb index 84bbd1b..abb5fda 100644 --- a/src/ortho/oread/ortho_front.adb +++ b/src/ortho/oread/ortho_front.adb @@ -846,9 +846,18 @@ package body Ortho_Front is procedure Add_Keyword (Str : String; Token : Token_Type) is + Kw : String (Str'Range); Ent : Syment_Acc; begin - Ent := New_Symbol (Str); + -- Convert to uppercase. + for I in Str'Range loop + pragma Assert (Str (I) in 'a' .. 'z'); + Kw (I) := Character'Val + (Character'Pos ('A') + + Character'Pos (Str (I)) - Character'Pos ('a')); + end loop; + + Ent := New_Symbol (Kw); if Ent.Name /= null or else Scope /= null then -- cgit