Skip to content

Commit

Permalink
Allow semicolon after discipline/nature identifier
Browse files Browse the repository at this point in the history
Version 2.3.0 of the Verilog-AMS Language Reference Manual introduced
an optional semicolon after a nature and discipline identifier in a
nature and discipline declaration, respectively; e.g.,

    nature identifier;
        ...
    endnature

and

    discipline identifier;
        ...
    enddiscipline

are now also legal syntax.

ADMS behaves the same as when the semicolon is absent.

This brings ADMS one step closer to being able to parse the most
recent Accellera standard disciplines header files.

This commit fixes GitHub issue #39.
  • Loading branch information
ngwood authored and felix-salfelder committed Jan 4, 2022
1 parent 0076263 commit 2cd762e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions admsXml/verilogaYacc.y.in
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ R_s.admsParse
;
R_discipline_member
| tk_discipline R_discipline_name R_l.discipline_assignment tk_enddiscipline
| tk_discipline R_discipline_name ';' R_l.discipline_assignment tk_enddiscipline
_ adms_admsmain_list_discipline_prepend_once_or_abort(root(),gDiscipline);
_ gDiscipline=NULL;
;
Expand Down Expand Up @@ -175,6 +176,7 @@ R_discipline.naturename

R_nature_member
| tk_nature tk_ident R_l.nature_assignment tk_endnature
| tk_nature tk_ident ';' R_l.nature_assignment tk_endnature
_ p_nature mynature=NULL;
_ if(gNatureAccess)
_ mynature=adms_admsmain_list_nature_prepend_by_id_once_or_abort(root(),gNatureAccess);
Expand Down

0 comments on commit 2cd762e

Please sign in to comment.