On Programming languages and syntax
Nov 25, 2023
Every modern mathematical formalism is composed of at most this four parts:
- Tokens
- Declarations
- Expressions
- Statements.
Tokens can be further divided into
- Identifiers
- Literals (Numeric, Char and String)
- Keywords
- Comments
Declarations can contain this or more
- Type declaration
- Variable declaration
- Function declaration
- Module declaration
Expressions can contain this, less or more
- Arithmetic expressions
- Boolean expressions
- Comparison expressions
- Relational expressions
Statements can contain this, less or more
- Assignment statement
- Function calls
- If-else if — else statement
- While statement
- For statement
- Return statement
- Try-Catch statement
- Exit statement