Assembly Grammar
assembly‑file
→
assembly‑line
*
assembly‑line
→
comment‑line
|
empty‑line
|
mode‑line
|
instruction‑line
comment‑line
→
comment
newline
comment
→
space
?
(
<any>
−
(
newline
|
symbol
|
local‑symbol
|
dot
|
semicolon
|
at
)
)
(
<any>
−
newline
)
*
empty‑line
→
space
?
newline
mode‑line
→
space
?
dot
symbol
space
?
newline
instruction‑line
→
instruction
(
space
?
semicolon
instruction
)
*
comment
?
newline
instruction
→
label
split‑line
opcode
operands
label
→
local‑symbol
|
symbol
|
<empty>
split‑line
→
space
(
newline
space
)
?
|
newline
space
opcode
→
decimal‑constant
?
symbol
operands
→
space
?
expression
(
comma
expression
)
*
|
space
?
expression
→
term
(
weak‑operator
term
)
*
weak‑operator
→
plus
|
minus
|
bar
|
caret
term
→
primary‑expression
(
strong‑operator
primary‑expression
)
*
strong‑operator
→
ast
|
slash
|
slash‑slash
|
percent
|
shift‑left
|
shift‑right
|
amp
primary‑expression
→
local‑symbol
|
constant
|
symbol
|
at
|
lparen
expression
rparen
|
unary‑operator
primary‑expression
unary‑operator
→
plus
|
minus
|
tilde
|
dollar
|
amp
local‑symbol
→
local‑symbol
constant
→
decimal‑constant
|
hexadecimal‑constant
|
character‑constant
|
string‑constant
|
clsid‑constant
symbol
→
symbol
at
→
at