From cbf96d73ee68f9e3815797f818d591bb6a56f52d Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Mon, 12 May 2008 17:31:59 -0700 Subject: [PATCH] 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. --- parse.y | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/parse.y b/parse.y index 93a83143d..d375ea19c 100644 --- a/parse.y +++ b/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