Make semi-colon after discipline/nature name optional.
The VAMS-2.2 LRM syntax does not include a semicolon after the nature/ discipline name, but the 2.3 LRM does. Effectively, that means that the simicolon is option from now on.
This commit is contained in:
parent
7166aea1d7
commit
cbf96d73ee
10
parse.y
10
parse.y
|
|
@ -672,8 +672,14 @@ description
|
|||
}
|
||||
;
|
||||
|
||||
/* The discipline and nature declarations used to take no ';' after
|
||||
the identifier. The 2.3 LRM adds the ';', but since there are
|
||||
programs written to the 2.1 and 2.2 standard that don't, we
|
||||
choose to make the ';' optional in this context. */
|
||||
optional_semicolon : ';' | ;
|
||||
|
||||
discipline_declaration
|
||||
: K_discipline IDENTIFIER ';'
|
||||
: K_discipline IDENTIFIER optional_semicolon
|
||||
{ pform_start_discipline($2); }
|
||||
discipline_items K_enddiscipline
|
||||
{ pform_end_discipline(@1); delete[] $2; }
|
||||
|
|
@ -696,7 +702,7 @@ discipline_item
|
|||
;
|
||||
|
||||
nature_declaration
|
||||
: K_nature IDENTIFIER ';'
|
||||
: K_nature IDENTIFIER optional_semicolon
|
||||
{ pform_start_nature($2); }
|
||||
nature_items
|
||||
K_endnature
|
||||
|
|
|
|||
Loading…
Reference in New Issue