Where do the [] brackets hide in the grammar?

O

Ole Nielsby

In listings of special symbols, [] are mentioned but I cannot find them
in the grammar.

(I use http://www.geocities.com/purnank/vhdl93.html for now.)

Searching is complicated by their use as meta symbols for optional elements.
As far as I can tell, all []s in the grammar above are meta symbols, though
the predefined attributes section shows their use for indexing array
attributes.

Are [] generally usable as alternatives to () or are they used in specific
places?

The coloured syntax at
http://tech-www.informatik.uni-hamburg.de/vhdl/tools/grammar/vhdl93-bnf.html
has brown keywords and symbols while metasymbols are white. But no brown
[] as far as I can see.

BTW what is the most accurate online syntax, preferably with 2001 coverage?
 
H

HT-Lab

Ole Nielsby said:
In listings of special symbols, [] are mentioned but I cannot find them
in the grammar.

(I use http://www.geocities.com/purnank/vhdl93.html for now.)

[] brackets are used in signatures:

signature ::= [ [ type_mark { , type_mark } ] [ return type_mark ] ]

The outermost [ ] are part of the syntax and do not represent an optional
item.

Hans
www.ht-lab.com


Searching is complicated by their use as meta symbols for optional
elements.
As far as I can tell, all []s in the grammar above are meta symbols,
though
the predefined attributes section shows their use for indexing array
attributes.

Are [] generally usable as alternatives to () or are they used in specific
places?

The coloured syntax at
http://tech-www.informatik.uni-hamburg.de/vhdl/tools/grammar/vhdl93-bnf.html
has brown keywords and symbols while metasymbols are white. But no brown
[] as far as I can see.

BTW what is the most accurate online syntax, preferably with 2001
coverage?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,123
Latest member
Layne6498
Top