diff options
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/parse.adb | 5 | ||||
-rw-r--r-- | src/vhdl/parse_psl.adb | 13 | ||||
-rw-r--r-- | src/vhdl/scanner.adb | 2 |
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 => |