aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-04-11 11:34:19 +0200
committerTristan Gingold <tgingold@free.fr>2020-04-11 11:34:19 +0200
commit71ff56302baff001ea7d491a486143f0229a289b (patch)
tree91a5fd19d3def62ecd130179e3e268f27df82802 /src
parent93d01c6d4abd22e8e0fd46a13727034de97ae783 (diff)
downloadghdl-71ff56302baff001ea7d491a486143f0229a289b.tar.gz
ghdl-71ff56302baff001ea7d491a486143f0229a289b.tar.bz2
ghdl-71ff56302baff001ea7d491a486143f0229a289b.zip
vhdl: handle pragma synthesis_on/synthesis_off.
Diffstat (limited to 'src')
-rw-r--r--src/std_names.adb2
-rw-r--r--src/std_names.ads4
-rw-r--r--src/vhdl/vhdl-scanner.adb16
3 files changed, 14 insertions, 8 deletions
diff --git a/src/std_names.adb b/src/std_names.adb
index ece86763f..056a77bf3 100644
--- a/src/std_names.adb
+++ b/src/std_names.adb
@@ -790,6 +790,8 @@ package body Std_Names is
Def ("translate_off", Name_Translate_Off);
Def ("translate_on", Name_Translate_On);
Def ("translate", Name_Translate);
+ Def ("synthesis_off", Name_Synthesis_Off);
+ Def ("synthesis_on", Name_Synthesis_On);
Def ("off", Name_Off);
-- PSL keywords
diff --git a/src/std_names.ads b/src/std_names.ads
index 6ed7fb6d5..a736377b7 100644
--- a/src/std_names.ads
+++ b/src/std_names.ads
@@ -919,7 +919,9 @@ package Std_Names is
Name_Translate_Off : constant Name_Id := Name_First_Comment + 4;
Name_Translate_On : constant Name_Id := Name_First_Comment + 5;
Name_Translate : constant Name_Id := Name_First_Comment + 6;
- Name_Off : constant Name_Id := Name_First_Comment + 7;
+ Name_Synthesis_Off : constant Name_Id := Name_First_Comment + 7;
+ Name_Synthesis_On : constant Name_Id := Name_First_Comment + 8;
+ Name_Off : constant Name_Id := Name_First_Comment + 9;
Name_Last_Comment : constant Name_Id := Name_Off;
-- PSL words.
diff --git a/src/vhdl/vhdl-scanner.adb b/src/vhdl/vhdl-scanner.adb
index 214edc280..dc3cc2be0 100644
--- a/src/vhdl/vhdl-scanner.adb
+++ b/src/vhdl/vhdl-scanner.adb
@@ -1847,16 +1847,18 @@ package body Vhdl.Scanner is
(Warnid_Pragma,
"pragma translate must be followed by 'on' or 'off'");
end case;
- when Name_Translate_Off =>
+ when Name_Translate_Off
+ | Name_Synthesis_Off =>
Scan_Translate_Off;
- when Name_Translate_On =>
+ when Name_Translate_On
+ | Name_Synthesis_On =>
Scan_Translate_On;
when Name_Label
- | Name_Label_Applies_To
- | Name_Return_Port_Name
- | Name_Map_To_Operator
- | Name_Type_Function
- | Name_Built_In =>
+ | Name_Label_Applies_To
+ | Name_Return_Port_Name
+ | Name_Map_To_Operator
+ | Name_Type_Function
+ | Name_Built_In =>
-- Used by synopsys, discarded.
Skip_Until_EOL;
when others =>