The EBNF Syntax of an Io Module

<Module> ::= {<Import>} <Export> {<Declares>} <Expr>

<Import> ::= import <Id> <Implimit> .

<Implimit> ::= : {<Id>}
             | 
             
<Export> ::= export {<Id>}
           |

<Declares> ::= declare <Id> : <Eatom> .
             | variable <Id> : <Eatom> .

<Expr> ::= <Id>
         | <Id> <Paramlist>
         | <Id> <<= <Patom> <Stmttail>
         | <Id> =>> <Id> <Stmttail>
         | <Stmt>
            
<Paramlist> ::= <Patom> <Paramlisttail>
              | ; <Eatom>
              | <Stmt>

<Paramlisttail> ::= <Patom> <Paramlisttail>
                  | ; <Eatom>
                  | <Stmt>
                  |
                  
<Stmt> ::= -> {<Id>} <Stmttail>

<Stmttail> ::= ; <Eatom>
             | <Atom>

<Eatom> ::= <Expr>
          | <Atom>

<Patom> ::= <Id>
          | <Atom>
          
<Atom> ::= <Int>
         | <String>
         | ( <Expr> )