Syntax Specification
Conventions
- Terminal symbols are written in
font. - Some special terminal symbols can be enclosed in
, or can be represented as a unicode literal like . - Non-terminal syntactic symbols are written in
font. - Every non-terminal syntactic symbol names follow
naming rule. - Non-terminal lexemes are written in
font. - Every non-terminal lexeme names follow
naming rule. is a special lexeme denoting the end of input. denotes the empty string. means followed by . means either or . is a sequence of iterations of . is a sequence of zero or more iterations of , which is equivalent to . is a sequence of one or more iterations of , which is equivalent to . is an zero or one occurrence of , which is equivalent to . denotes any except . ( is defined here) denotes positive lookahead of , meaning followed by . denotes negative lookahead of , meaning not followed by . is a sequence of zero or more iterations of separated by , ending with optional , which is equivalent to . - Production rules are written in the form of
.
Lexical Structure
Note that Dyn's lexical structure has context-free grammar.
Characters
Comments
White Spaces
Nil
Boolean
Number
There is no distinction between unsigned and signed integers.
String
Template String
Identifiers
The below are every keyword in Dyn. Reserved keywrods are NOT used yet, but they are reserved for future use and treated as just normal keywords.
Lexeme | Symbol | Reserved |
---|---|---|
X | ||
X | ||
X | ||
O | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
O |
Punctuations
Lexeme | Symbol | Reserved |
---|---|---|
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
O | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X | ||
X |