aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho/oread
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2014-11-27 08:01:48 +0100
committerTristan Gingold <tgingold@free.fr>2014-11-27 08:01:48 +0100
commitb5b150382f1aa027c081c6a8eed39d0cc666d455 (patch)
treea9cfe740f723ec690464ff6eee289976a7b23b0e /src/ortho/oread
parent565599218ea2f1b0fdf4752a479ae561a29f9f43 (diff)
downloadghdl-b5b150382f1aa027c081c6a8eed39d0cc666d455.tar.gz
ghdl-b5b150382f1aa027c081c6a8eed39d0cc666d455.tar.bz2
ghdl-b5b150382f1aa027c081c6a8eed39d0cc666d455.zip
ortho debug/oread: add a procedure to write keyword, use uppercase.
Diffstat (limited to 'src/ortho/oread')
-rw-r--r--src/ortho/oread/ortho_front.adb11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ortho/oread/ortho_front.adb b/src/ortho/oread/ortho_front.adb
index 84bbd1b9d..abb5fda2a 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