V
valtih1978
Guest
Another ambiguity comes from
literal ::= numeric_literal | enumeration_literal | ...
numeric_literal ::= physical_literal | ...
physical_literal ::= [ abstract_literal ] name
name ::= identifier | operator_symbol | character_literal |
selected_name | indexed_name | slice_name | attribute_name
enumeration_literal ::= identifier | ...
For instance, you have a 'second' in the expression. Is it an
enumeration or physical literal? The numerical quantity is optional in
phys. literals, as we see. It seems that this is an incarnation of what
I heard of "context-sensitivity" of VHDL? Does it mean that the parse
tree is ambiguous until after the elaboration?
Moreover, 'name' admits such fancy names as function invocation,
attribute requests and such, which seems to be a nonsense for physical
literal, e.g. 1 miles(3) should be valid according to the LRM grammar.
Language designers could easily ban this "feature" by saying that
physical units are specified by identifiers (aka simple names) rather
than arbitrary names. Why does spec choose the general name production
instead?
literal ::= numeric_literal | enumeration_literal | ...
numeric_literal ::= physical_literal | ...
physical_literal ::= [ abstract_literal ] name
name ::= identifier | operator_symbol | character_literal |
selected_name | indexed_name | slice_name | attribute_name
enumeration_literal ::= identifier | ...
For instance, you have a 'second' in the expression. Is it an
enumeration or physical literal? The numerical quantity is optional in
phys. literals, as we see. It seems that this is an incarnation of what
I heard of "context-sensitivity" of VHDL? Does it mean that the parse
tree is ambiguous until after the elaboration?
Moreover, 'name' admits such fancy names as function invocation,
attribute requests and such, which seems to be a nonsense for physical
literal, e.g. 1 miles(3) should be valid according to the LRM grammar.
Language designers could easily ban this "feature" by saying that
physical units are specified by identifiers (aka simple names) rather
than arbitrary names. Why does spec choose the general name production
instead?