Add .import and .export directive to the grammar and parser

This commit is contained in:
2025-04-07 10:49:57 +02:00
parent c43aab3a2d
commit 7596e54191
6 changed files with 52 additions and 2 deletions

View File

@ -3,10 +3,14 @@
<label> ::= <identifier> <colon>
<directive> ::= <dot> <section_directive>
<directive> ::= <dot> (<section_directive> | <export_directive> | <import_directive> )
<section_directive> ::= "section" <identifier>
<export_directive> ::= "export" <identifier>
<import_directive> ::= "import" <identifier>
<instruction> ::= <identifier> <operands>
<operands> ::= <operand> ( <comma> <operand> )*