fist version of the lexer
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
```
|
||||
def concept one as 1 --> creates a new concept 1
|
||||
def concept two as 2 --> creates a new concept 2
|
||||
def concept add(a,b) as a + b --> create concept that need parenthesis
|
||||
def concept a plus b as add(a,b) --> create a concept that mimic human language
|
||||
|
||||
one plus two --> recognizes the concept 'a plus b'
|
||||
one plus two ? --> makes the addition
|
||||
|
||||
concept a plus b --> will work on this concept
|
||||
pre: a is a number
|
||||
|
||||
--> ERROR : 'a is a number' is not known
|
||||
|
||||
def concept a is a number as :
|
||||
isinstanceof(a, number)
|
||||
|
||||
--> adds concept a is a number
|
||||
--> add the pre condition to the concept a plus b
|
||||
```
|
||||
Reference in New Issue
Block a user