123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- //////////////////////////////////////////////////////////////////////////////
- //
- // ME Notes
- //
- //////////////////////////////////////////////////////////////////////////////
- - Components
- - AST Editor
- - Syntax checking
- - Type checking
- - Evaluator
- - Renderer
- //////////////////////////////////////////////////////////////////////////////
- //
- // MDL Examples
- //
- //////////////////////////////////////////////////////////////////////////////
- - patterns
- x = identifier
- x : float = pattern : type
- (x, y : type) = (pattern, pattern)
- (x, y) : type =
- head :: tail = pattern :: pattern
- Point x y = function pattern
- //////////////////////////////////////////////////////////////////////////////
- //
- // MDL Grammer
- //
- //////////////////////////////////////////////////////////////////////////////
- typeList =
- type [typeList]
- type =
- identifier
- _
- identifier typeList
- type, type
- [type]
- type -> type
- (type)
- pattern =
- identifier
- pattern : type
- pattern, pattern
- pattern :: pattern
- identifier pattern
- pattern as pattern
- (pattern)
- patternList =
- pattern [patternList]
- statement =
- statements =
- statement [; statements]
- block =
- { statements }
- terminal =
- identifier
- number
- "string"
- 'a'
- numericOperator = + - * / ^ &
- comparisonOperator = == != < <= > >=
- booleanOperator = not and or
- bitwiseOperator = ! & | xor diff test
- pairOperator = ,
- consOperator = ::
- applyOperator = .
- composeOperator = o
- operator = ...
- expression =
- terminal
- expression expression
- expression operator expression
- \pattern -> expression
- '[' [expressionList] ']'
- (expression)
- expression : type
- if expression then expression else expression
- let definitions in expression
- expression where defintions
- block
- expressionList =
- expression [, expression]
- definition =
- patternList = expression
- declaration =
- pattern : type
- def =
- definition
- declaration
- defList:
- def [; defList]
- program =
- defList;
-
- // types, classes
- //////////////////////////////////////////////////////////////////////////////
- //
- // AST Editor
- //
- //////////////////////////////////////////////////////////////////////////////
- - Token list
- - User defined layouts per production
-
-
|