summaryrefslogtreecommitdiff
path: root/src/vhdl
diff options
context:
space:
mode:
authorTristan Gingold2015-01-15 21:39:27 +0100
committerTristan Gingold2015-01-15 21:39:27 +0100
commit7feacb916efb1059b45e6297337fbf5beb67e0c2 (patch)
tree762091d6f0702b10d8896e796fa8cf547eddb0b1 /src/vhdl
parent321635b007eb1c63a7f1f12a734c8e0a61ba5a98 (diff)
downloadghdl-7feacb916efb1059b45e6297337fbf5beb67e0c2.tar.gz
ghdl-7feacb916efb1059b45e6297337fbf5beb67e0c2.tar.bz2
ghdl-7feacb916efb1059b45e6297337fbf5beb67e0c2.zip
PSL: add comments, scan endpoint.
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/parse.adb5
-rw-r--r--src/vhdl/parse_psl.adb13
-rw-r--r--src/vhdl/scanner.adb2
3 files changed, 16 insertions, 4 deletions
diff --git a/src/vhdl/parse.adb b/src/vhdl/parse.adb
index 1eb513f..3ad8c11 100644
--- a/src/vhdl/parse.adb
+++ b/src/vhdl/parse.adb
@@ -6515,17 +6515,22 @@ package body Parse is
Res : Iir;
begin
Res := Create_Iir (Iir_Kind_Psl_Declaration);
+
+ -- Skip 'property', 'sequence' or 'endpoint'.
Scan;
+
if Current_Token /= Tok_Identifier then
Error_Msg_Parse ("property name expected here");
else
Set_Identifier (Res, Current_Identifier);
end if;
+
Scanner.Flag_Psl := True;
Set_Psl_Declaration (Res, Parse_Psl.Parse_Psl_Declaration (Tok));
Expect (Tok_Semi_Colon);
Scanner.Flag_Scan_In_Comment := False;
Scanner.Flag_Psl := False;
+
return Res;
end Parse_Psl_Declaration;
diff --git a/src/vhdl/parse_psl.adb b/src/vhdl/parse_psl.adb
index 7cb20ca..b71dc74 100644
--- a/src/vhdl/parse_psl.adb
+++ b/src/vhdl/parse_psl.adb
@@ -203,19 +203,23 @@ package body Parse_Psl is
end loop;
end Parse_SERE;
- -- precond: '{'
+ -- precond : '{'
+ -- postcond: next token after '}'
function Parse_Braced_SERE return Node is
Res : Node;
begin
- if Current_Token /= Tok_Left_Curly then
- raise Program_Error;
- end if;
+ pragma Assert (Current_Token = Tok_Left_Curly);
Res := Create_Node_Loc (N_Braced_SERE);
+
+ -- Skip '{'
Scan;
+
Set_SERE (Res, Parse_SERE (Prio_Lowest));
+
if Current_Token /= Tok_Right_Curly then
Error_Msg_Parse ("missing '}' after braced SERE");
else
+ -- Skip '}'
Scan;
end if;
return Res;
@@ -651,6 +655,7 @@ package body Parse_Psl is
if Current_Token /= Tok_Is then
Error_Msg_Parse ("'is' expected after identifier");
else
+ -- Skip 'is'.
Scan;
end if;
case Kind is
diff --git a/src/vhdl/scanner.adb b/src/vhdl/scanner.adb
index 32ae03f..f18723d 100644
--- a/src/vhdl/scanner.adb
+++ b/src/vhdl/scanner.adb
@@ -915,6 +915,8 @@ package body Scanner is
Current_Token := Tok_Psl_Sequence;
when Std_Names.Name_Property =>
Current_Token := Tok_Psl_Property;
+ when Std_Names.Name_Endpoint =>
+ Current_Token := Tok_Psl_Endpoint;
when Std_Names.Name_Cover =>
Current_Token := Tok_Psl_Cover;
when Std_Names.Name_Default =>