O
Ole Nielsby
Guest
Given this lump:
entity my_entity is
port
(
my_vector : out my_vector_type(17 downto 0)
);
end my_entity;
it is clear that
my_vector_type(17 downto 0)
parses as:
subtype_indication
type_mark
type_name or subtype_name
simple_name
identifier "my_vector_type"
constraint
index_constraint
"("
discrete_range
range
simple_expression "17"
direction "downto"
simple_expression "0"
")"
What I'd like to know is, when the parser has seen:
my_vector_type(
can it, without symbol table information, infer that
the type_mark has ended and a constraint has begun?
Or can a type_name start with xxx( ?
The BNF grammar seems to allow this, allowing a
name to be a function call, but I am having a hard time
trying to find out if it is a real possibility or just lax
grammar spec.
entity my_entity is
port
(
my_vector : out my_vector_type(17 downto 0)
);
end my_entity;
it is clear that
my_vector_type(17 downto 0)
parses as:
subtype_indication
type_mark
type_name or subtype_name
simple_name
identifier "my_vector_type"
constraint
index_constraint
"("
discrete_range
range
simple_expression "17"
direction "downto"
simple_expression "0"
")"
What I'd like to know is, when the parser has seen:
my_vector_type(
can it, without symbol table information, infer that
the type_mark has ended and a constraint has begun?
Or can a type_name start with xxx( ?
The BNF grammar seems to allow this, allowing a
name to be a function call, but I am having a hard time
trying to find out if it is a real possibility or just lax
grammar spec.