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

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

View File

@ -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> )*