Shift/reduce conflict in value_range of parameter declaration

From: Surya Pratik Saha <spsaha_at_.....>
Date: Mon Aug 24 2009 - 06:19:08 PDT
Hi,
value_range for parameter declaration is defined as:
value_range ::=
value_range_type ( value_range_expression : value_range_expression )
| value_range_type ( value_range_expression : value_range_expression ]
| value_range_type [ value_range_expression : value_range_expression )
| value_range_type [ value_range_expression : value_range_expression ]
| value_range_type '{ string { , string } }
| exclude constant_expression
value_range_type :: = from | exclude
value_range_expression ::= constant_expression | -inf | inf


Now a constant_expression rule may contain
constant_expression ::=
constant_primary
[...]
constant_primary ::=
[...]
| ( constant_mintypmax_expression )
[...]
constant_mintypmax_expression ::=
constant_expression
| constant_expression : constant_expression : constant_expression


So after 'exclude' if we get first '(' and then ':', a rule can be reduced to both 'value_range_expression' or 'constant_mintypmax_expression'. So it is conflicting. I think LRM needs a fix by providing mandatory () for the following rule, like:

| exclude ( constant_expression )

to resolve the conflict. Please let me know. I can file mantis for future LRM enhancement.
-- 
Regards
Surya

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean. Received on Mon Aug 24 06:20:28 2009

This archive was generated by hypermail 2.1.8 : Mon Aug 24 2009 - 06:20:53 PDT