Add .import and .export directive to the grammar and parser
This commit is contained in:
@ -3,10 +3,14 @@
|
||||
|
||||
<label> ::= <identifier> <colon>
|
||||
|
||||
<directive> ::= <dot> <section_directive> <newline>
|
||||
<directive> ::= <dot> (<section_directive> | <export_directive> | <import_directive> ) <newline>
|
||||
|
||||
<section_directive> ::= "section" <identifier>
|
||||
|
||||
<export_directive> ::= "export" <identifier>
|
||||
|
||||
<import_directive> ::= "import" <identifier>
|
||||
|
||||
<instruction> ::= <identifier> <operands> <newline>
|
||||
|
||||
<operands> ::= <operand> ( <comma> <operand> )*
|
||||
|
Reference in New Issue
Block a user