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:
Stephen Williams 2008-05-12 17:31:59 -07:00
parent 7166aea1d7
commit cbf96d73ee
1 changed files with 8 additions and 2 deletions

10
parse.y
View File

@ -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