[sv-bc] BNF issues


Subject: [sv-bc] BNF issues
From: Jacobi, Dan (dan.jacobi@intel.com)
Date: Tue Nov 18 2003 - 04:26:14 PST


Hello All,

 

Some more BNF issues:

 

Issue 1 - enumerated type ranges

=========================

 

Section 3.10.2 specifies the use of enumerated type ranges such as :

            enum { add=10, sub[5], jmp[6:8] } ;

 

However the BNF does not permit such ranges

data_type ::=

..

| enum [ integer_type [ signing ] { packed_dimension } ]

{ enum_identifier [ = constant_expression ] { , enum_identifier [ =
constant_expression ] } }

 

 

enum_identifier ::= identifier

 

 

Proposal

Under A.9.3

CAHNGE

enum_identifier ::= identifier

WITH

enum_identifier ::= identifier

                        | identifier [constant_expression ]

| identifier [constant_expression : constant_expression ]

 

 

* Brackets '[' ']' and colons ':' are in bold red font

 

Dan Jacobi, LVT

Tel : +(972)-4-8655855

INet : 465-5855

 



This archive was generated by hypermail 2b28 : Tue Nov 18 2003 - 04:27:15 PST