On Sun, 2014-02-23 at 11:59 +0800, Daniel Kho wrote: > Hello Brian, Tristan, All, > > < Supporting block comments for example would be easy. But IMO block > comments are broken; the standard copied the C way when a much more > robust, less bug-prone style, well proven in Modula-2, would have been > trivial. I wonder if it's worth raising this on P.1076.
> I feel it is worth raising this on P1076 if there is a much better way > to do block commenting, however there will most probably be some > resistance (e.g. from EDA vendors) which we need to wade through. It > is good if the solution we propose is backward-compatible with the > VHDL-2008's existing solution. I admit I haven't taken time to look > into Modula-2's block commenting, so I won't be able to comment on how > feasible it is for a change to be implemented at this time. On this specific point : Modula-2 simply maintains a count (natural) of LH tokens /* unmatched by RH tokens */; if count > 0, we are in a comment. Thus the typical "hack" of temporarily commenting out a section of code never comes to grief from an overlooked comment! In M2 the tokens themselves are different : (* comment *) rather than /* comment */ but I have no attachment to those. It is naturally compatible with any VHDL without nested comments; the count simply never exceeds 1. So I think it's a simple enhancement rather than a deep change. Whether it's worth fixing at this stage is probably debatable, (let alone the effect on syntax highlighting editors etc!) but I'll raise it. -- Brian _______________________________________________ Ghdl-discuss mailing list [email protected] https://mail.gna.org/listinfo/ghdl-discuss
