ISSUE 37

Add Proposal  Add Analysis  Edit Class, Environment, or Release
Number 37
Category errata
Synopsis Possible syntax restrictions on periods
State open
Class errata-discuss
Arrival-DateSep 28 2001
Originator Daryl Stewart
Release 2001b
Environment

Description
I've noticed a few categories in the syntax which use periods which I always assumed had no whitespace near them. Specifically I believe the following nonterminals all contain periods (.) as part of their syntax
and require restrictions on preceding and/or following whitespace:

The period (.) in design_statement, inst_name, cell_clause and use_clause
shall not be preceded or followed by white_space.
The period (.) in port, named_parameter_assignment and named_port_connection
shall not be followed by white_space.

Although I'm not totally sure ;)
Fix

No change.

Audit-Trail

From: Shalom Bresticker <shalom@msil.sps.mot.com>
To: Daryl.Stewart@cl.cam.ac.uk
Cc: btf-bugs@boyd.com
Subject: Re: enhancement/37: Possible syntax restrictions on periods
Date: Sun, 30 Sep 2001 09:00:51 +0200 (IST)

Daryl,

Of the cases you mention, only "port" and "named_port_connection" exist in
1364-1995. I tested them in Verilog-XL, and Verilog-XL allows white space.

I also made sure there is white space in those cases in my HTML version of the
new BNF.

I think the rule is that white space is allowed unless specifically prohibited.

The same question also exists for the ":" in use_clause.

--
**************************************************************************
Shalom Bresticker Shalom.Bresticker@motorola.com
Motorola Semiconductor Israel, Ltd. Tel #: +972 9 9522268
P.O.B. 2208, Herzlia 46120, ISRAEL Fax #: +972 9 9522890
**************************************************************************

On Fri, 28 Sep 2001 Daryl.Stewart@cl.cam.ac.uk wrote:

> I've noticed a few categories in the syntax which use periods which I always assumed had no whitespace near them. Specifically I believe the following nonterminals all contain periods (.) as part of their syntax
> and require restrictions on preceding and/or following whitespace:
>
> The period (.) in design_statement, inst_name, cell_clause and use_clause
> shall not be preceded or followed by white_space.
> The period (.) in port, named_parameter_assignment and named_port_connection
> shall not be followed by white_space.
>
> Although I'm not totally sure ;)


From: Shalom Bresticker <Shalom.Bresticker@motorola.com>
To: Shalom Bresticker <shalom@msil.sps.mot.com>
Cc: Daryl.Stewart@cl.cam.ac.uk, btf-bugs@boyd.com
Subject: Re: enhancement/37: Possible syntax restrictions on periods
Date: Sun, 30 Sep 2001 10:40:36 +0200

--------------5873AFD3F1D0AE6C534E994B
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Resend.

Shalom Bresticker wrote:

> Daryl,
>
> Of the cases you mention, only "port" and "named_port_connection" exist in
> 1364-1995. I tested them in Verilog-XL, and Verilog-XL allows white space.
>
> I also made sure there is white space in those cases in my HTML version of the
> new BNF.
>
> I think the rule is that white space is allowed unless specifically prohibited.
>
> The same question also exists for the ":" in use_clause.
>
> --
> **************************************************************************
> Shalom Bresticker Shalom.Bresticker@motorola.com
> Motorola Semiconductor Israel, Ltd. Tel #: +972 9 9522268
> P.O.B. 2208, Herzlia 46120, ISRAEL Fax #: +972 9 9522890
> **************************************************************************
>
> On Fri, 28 Sep 2001 Daryl.Stewart@cl.cam.ac.uk wrote:
>
> > I've noticed a few categories in the syntax which use periods which I always assumed had no whitespace near them. Specifically I believe the following nonterminals all contain periods (.) as part of their syntax
> > and require restrictions on preceding and/or following whitespace:
> >
> > The period (.) in design_statement, inst_name, cell_clause and use_clause
> > shall not be preceded or followed by white_space.
> > The period (.) in port, named_parameter_assignment and named_port_connection
> > shall not be followed by white_space.
> >
> > Although I'm not totally sure ;)

--
**************************************************************************
Shalom Bresticker Shalom.Bresticker@motorola.com
Motorola Semiconductor Israel, Ltd. Tel #: +972 9 9522268
P.O.B. 2208, Herzlia 46120, ISRAEL Fax #: +972 9 9522890
**************************************************************************



--------------5873AFD3F1D0AE6C534E994B
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">

Resend.

Shalom Bresticker wrote:
<blockquote TYPE=CITE>Daryl,

Of the cases you mention, only "port" and "named_port_connection" exist
in

1364-1995. I tested them in Verilog-XL, and Verilog-XL allows white
space.

I also made sure there is white space in those cases in my HTML version
of the

new BNF.

I think the rule is that white space is allowed unless specifically
prohibited.

The same question also exists for the ":" in use_clause.

--

**************************************************************************

Shalom Bresticker                          
Shalom.Bresticker@motorola.com

Motorola Semiconductor Israel, Ltd.                 
Tel #: +972 9 9522268

P.O.B. 2208, Herzlia 46120, ISRAEL                  
Fax #: +972 9 9522890

**************************************************************************

On Fri, 28 Sep 2001 Daryl.Stewart@cl.cam.ac.uk wrote:

> I've noticed a few categories in the syntax which use periods which
I always assumed had no whitespace near them. Specifically I believe the
following nonterminals all contain periods (.) as part of their syntax

> and require restrictions on preceding and/or following whitespace:

>

> The period (.) in design_statement, inst_name, cell_clause and use_clause

> shall not be preceded or followed by white_space.

> The period (.) in port, named_parameter_assignment and named_port_connection

> shall not be followed by white_space.

>

> Although I'm not totally sure ;)

-- 
 **************************************************************************
 Shalom Bresticker                           Shalom.Bresticker@motorola.com
 Motorola Semiconductor Israel, Ltd.                  Tel #: +972 9 9522268
 P.O.B. 2208, Herzlia 46120, ISRAEL                   Fax #: +972 9 9522890
 **************************************************************************

 

--------------5873AFD3F1D0AE6C534E994B--


From: Shalom.Bresticker@motorola.com
To: etf-bugs@boyd.com
Cc:
Subject: Re: errata/37: Possible syntax restrictions on periods
Date: Thu, 2 Oct 2003 23:04:22 +0300 (IDT)

As previously discussed, in Verilog-XL's implementation of Verilog-1995,
spaces ARE allowed in "port" and "named_port_connection".

In fact, the only place in the LRM where it states that white space is
not allowed (outside of VCD files and $readmem data files) is around the
periods separating hierarchy levels in hierarchical name references.
And it is not clear why that restriction was added in 2001, when it was
not there in 1995. No explanations appear in the archives. In fact, just
the opposite. Since then, several people have proposed removing that
restriction. (That is issue #257) And in fact, Verilog-XL, VCS, and NCV
do not enforce that restriction.

In general, the only reason to forbid or require white space is where
the lexer would otherwise be confused. That means, within lexical tokens.

The question is, what is a lexical token? Section 2 attempts to define
lexical tokens, but its description is not complete. The problem comes up
with respect to special characters and their combinations. Basically, the
only such tokens described in Section 2 are called 'operators', but there
are many more such tokens. For example, if I write "a[3:0]", each
character there is a separate token, including each of the square brackets
and the colon. Another example is simply the semicolon at the end of a
statement.

It is important to know what character combinations are lexical tokens,
because white space is not allowed within lexical tokens (except strings
and comments), nor can `define text macros be used for only part of a token.
For example, is "+:" in indexed part-selects one token or two? When Paul
Graham brought this up once, we all agreed that it is one token, but that is
not defined anywhere.

I would like to suggest the following:

- We add a statement to 2.2 ("White space") that white space is permitted
between any tokens, unless specifically forbidden. The first paragraph of 2.1
is probably intended to mean that, but I would like to be more explicit.

- We also add a statement to 2.2 that white space is forbidden within tokens
(except strings and comments) unless specifically permitted.

- Is there a good way to define when white space is required as a token
separator?

- We should probably replace the mention of operators as a type of lexical
token with something more general.

- We remove the restriction on white space in hierarchical name references.

- We add some sort of wording that tokens are defined by the BNF, in that if
characters appear together in the BNF, like "+:", it means that they together
form a token. If they have space between them in the BNF, it means that they
are separate tokens.

- We not restrict use of white space unless necessary. That means, for example,
that in library and configuration descriptions, spaces could appear in "-incdir"
or in ":config".
This might be more controversial. But we might have different rules for
library and configuration descriptions, which are not really mainstream BNF.

- By the way, 2.8 ("Attributes") is sort of out of place, because attributes
are not a lexical token.

Shalom


On Fri, 28 Sep 2001 Daryl.Stewart@cl.cam.ac.uk wrote:

> I've noticed a few categories in the syntax which use periods which I
> always assumed had no whitespace near them. Specifically I believe the
> following nonterminals all contain periods (.) as part of their syntax
> and require restrictions on preceding and/or following whitespace:
>
> The period (.) in design_statement, inst_name, cell_clause and use_clause
> shall not be preceded or followed by white_space.
> The period (.) in port, named_parameter_assignment and
> named_port_connection shall not be followed by white_space.
>
> Although I'm not totally sure ;)

--
Shalom Bresticker Shalom.Bresticker@motorola.com
Design & Reuse Methodology Tel: +972 9 9522268
Motorola Semiconductor Israel, Ltd. Fax: +972 9 9522890
POB 2208, Herzlia 46120, ISRAEL Cell: +972 50 441478


Unformatted

Hosted by Boyd Technology