From: Clifford E. Cummings (email@example.com)
Date: Wed May 01 2002 - 16:40:05 PDT
At 07:29 PM 5/1/02 -0400, Steven Sharp wrote:
>The (* problem is annoying. One way of dealing with it would be to
>treat (*) as a single token in the lexer, to avoid it completely. I
>doubt that was the original intent, which was probably "Use * as a
>wildcard. And since people often put parentheses around their event
>controls even when there is only one item in it, allow that. But
>don't allow @(* or foo), just allow @(*)." I don't relish kludging
>the parser to treat '(*' as the start of an attribute unless the next
>token is ')', in which case it is really '*' in parens. It was a poor
>choice of syntax.
>I don't know that making the '@' part of the same token is necessary,
>especially since it requires an extra character of lookahead in the
>Implementations could also go the other way and treat "(*)" as three
>tokens. Then since there is a lexical ambiguity with the "(*" at the
>start of an attribute, require spaces to disambiguate it, as in "( * )".
>Note that C has situations like this where the user is required to
>disambiguate things to avoid backtracking in the parser. Let me say
>again, it was a poor choice of syntax. And I should have caught it
>before Paul did, but some things you don't notice until you start
I guess the (* ... *) "funny braces" aren't so funny after all!
I originally suggested only permitting @* and not the @( * ) syntax, but
was voted down. Spaces were intended to be legal in the @( ... )
implementation just like spaces are permitted with poesdge, negedge or
identifiers. It was supposed to be orthogonol.
If I had thought of the @(* ... ) and (* ... *) ambiguity, I would have
used it to back my objection to @(*).
If you find @ followed by ( is this non-ambiguous?
Regards - Cliff
Cliff Cummings - Sunburst Design, Inc.
14314 SW Allen Blvd., PMB 501, Beaverton, OR 97005
Phone: 503-641-8446 / FAX: 503-641-8486
firstname.lastname@example.org / www.sunburst-design.com
Expert Verilog, Synthesis and Verification Training
This archive was generated by hypermail 2.1.4
: Mon Jul 08 2002 - 12:55:36 PDT
sponsored by Boyd Technology, Inc.