diff options
author | Tristan Gingold <tgingold@free.fr> | 2015-01-15 21:39:27 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2015-01-15 21:39:27 +0100 |
commit | 7feacb916efb1059b45e6297337fbf5beb67e0c2 (patch) | |
tree | 762091d6f0702b10d8896e796fa8cf547eddb0b1 /src/vhdl/parse_psl.adb | |
parent | 321635b007eb1c63a7f1f12a734c8e0a61ba5a98 (diff) | |
download | ghdl-7feacb916efb1059b45e6297337fbf5beb67e0c2.tar.gz ghdl-7feacb916efb1059b45e6297337fbf5beb67e0c2.tar.bz2 ghdl-7feacb916efb1059b45e6297337fbf5beb67e0c2.zip |
PSL: add comments, scan endpoint.
Diffstat (limited to 'src/vhdl/parse_psl.adb')
-rw-r--r-- | src/vhdl/parse_psl.adb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/vhdl/parse_psl.adb b/src/vhdl/parse_psl.adb index 7cb20ca3b..b71dc745f 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 |