TWiki
>
Sandbox Web
>
AllowTrailingSemisCommas
(2016-04-06,
RobGaddi
)
(raw view)
E
dit
A
ttach
---+ Allow Trailing Semicolons and Commas In Lists That trailing commas and semicolons aren't allowed in lists such as port lists, port maps, and aggregates is a frequent source of irritating compile erorrs. They never take long to fix, but they're irritating and could be easily dealt with by the tools. I propose that we allow them, i.e. that we allow the following: <verbatim>entity dealywhopper is port( d : in std_logic; q : out std_logic; clk : in std_logic; rst : in std_logic; ); end entity dealywhopper; REAL_DEAL: entity work.dealywhopper port map ( d => d, q => q, clk => clk, rst => rst, );</verbatim> The trailing semis and commas would be treated as semantically null; they're wasted characters that are simply deemed to be inoffensive by the compiler. This would apply any time a comma or semicolon delimited list appears inside of parens. ---++ Places This Structure Appears | Syntactic Element | LRM (2008) Section | Relevant? | | aggregate ::=<br />( element_association { , element_association } ) | [§ 9.3.3.1] | Yes, this is aggregates | | association_list ::=<br />association_element { , association_element } | [§ 6.5.7.1] | Yes, this is port, generic, and subprogram parameter maps | | context_reference ::=<br />context selected_name { , selected_name } ; | [§ 13.4] | No, this is for contexts and has no parens. | | entity_class_entry_list ::=<br />entity_class_entry { , entity_class_entry } | [§ 6.9] | Sure (though who uses groups) | | entity_name_list ::=<br />entity_designator { , entity_designator } | [§ 7.2] | No, this is the entity specifier for attributes and has no parens. | | enumeration_type_definition ::=<br />( enumeration_literal { , enumeration_literal } ) | [§ 5.2.2.1] | Yes, this is enumerations. | | identifier_list ::= identifier { , identifier } | [§ 5.3.3] | No, this is things like a, b : std_logic in a record. | | index_constraint ::= ( discrete_range { , discrete_range } ) | [§ 5.3.2.1] | Yes, this is defining array ranges. | | indexed_name ::= prefix ( expression { , expression } ) | [§ 8.4] | Yes, this is indexing an array. | | instantiation_list ::=<br />instantiation_label { , instantiation_label } | [§ 7.3.1] | No, this is calling out instances in a configuration specification. | | interface_list ::=<br />interface_element { ; interface_element } | [§ 6.5.6.1] | Yes, this is port/generic specifications. | | logical_name_list ::= logical_name { , logical_name } | [§ 13.2] | No, this is listing multiple libraries on a line and has no parens. | | record_constraint ::=<br />( record_element_constraint { , record_element_constraint } ) | [§ 5.3.3] | Yes, this is for creating constrained subtypes of records. | | sensitivity_list ::= signal_name { , signal_name } | [§ 10.2] | Not when used in a wait statement, but explicitly allowed in §11.3 process sensitivity lists. | | signal_list ::=<br />signal_name { , signal_name } | [§ 7.4] | No, this is a disconnect list. | | signature ::= [ [ type_mark { , type_mark } ] [ return type_mark ] ] | [§ 4.5.3] | No, these are type marks in function signatures and have no parens. | -- %USERSIG{RobGaddi - 2016-04-06}% ---++ Comments <br />%COMMENT%
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r2 - 2016-04-06 - 21:58:19 -
RobGaddi
Sandbox
Log In
or
Register
Sandbox Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
Webs
Main
P1076
Ballots
LCS2016_080
P10761
P1647
P16661
P1685
P1734
P1735
P1778
P1800
P1801
Sandbox
TWiki
VIP
VerilogAMS
Copyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback