Syntax
A command is described by its syntax, for example:
show interface list { status | statistics | capabilities | switchport | veriphy }
and show erps [ groups ] [ detail | statistics ]
Syntax is represented in a slightly different manner in this documentation as compared to a ICLI session. In this document, variable parameters are written in italics, whereas a ICLI session will display such items surrounded by ‘<’ and ‘>’.
The semantics are:
keywords are written in bold
parameters are written in italics
[ ... ] indicates an optional construct: It may or may not be present
{ ... } indicates a grouping; the constructs within belong together
‘|’ indicates a choice between two or more alternatives, (example, a | b | c which reads as “a or b or c”)
Thus, the first command syntax is simple: First show, then interface, then a list of interfaces, then exactly one of status, statistics, capabilities, switchport, and veriphy. The second command is a bit more complex: show and erps are mandatory, but the remaining parameters and keywords are optional: The user may enter group IDs; the user may enter either ‘statistics’ or ‘detail’. For example:
There are some slightly more complex features of the syntax that center around sequences of optional items such as [a] [b] [c].
• Each of a, b, c may or may not be present (“a c” is valid, as is no input)
Order is not important (“a c” and “c a” are equivalent)
Each optional item can be present exactly no times or one time (not repeated)
There are variations:
Group of options, of which at least one must be present: { [a] [b] [c] }*1
Group of options, where one or more has fixed position: [a] {[b]} [c]
This says that ‘b’ is optional, but if it is present then it must follow after ‘a’ (if ‘a’ is present) and it must come before ‘c’ (if ‘c’ is present)
For example, assuming a command with this syntax: a [b] [c] { d | e } {[f] [g]}*1
then valid input examples are:
‘a d f’, because ‘b’ and ‘c’ are optional, ‘d’ is picked instead of ‘e’, and ‘f’ is chosen as the mandatory optional
‘a d f g’, because ‘b’ and ‘c’ are optional, ‘d’ is picked instead of ‘e’, and both ‘f’ and ‘g’ are chosen in the final group of optional
‘a c b e g’, because the ‘b’ optional is omitted, ‘e’ is picked instead of ‘d’, and ‘g’ is chosen for the mandatory optional
Last updated