Add types and semantics to micro language description
This commit is contained in:
parent
4a5488dff7
commit
0b6073b5bb
|
@ -0,0 +1,31 @@
|
|||
# Every key below is used as type in an enumerate to sort the tokens
|
||||
# -> Replacement in order
|
||||
# -> Every amount of other symbols is saved as some kind of value
|
||||
# -> Those are using the default type "identifier"
|
||||
[token]
|
||||
separator = [" "]
|
||||
operands = [":=", "->", "!", "+", "-", "/", "*", "(", ")", "[", "]", "{", "}", "=", "?", ":", "'", "\""]
|
||||
terminator = [";"]
|
||||
|
||||
[semantics]
|
||||
keywords = ["if", "then", "else", "with"]
|
||||
|
||||
# constant descriptions
|
||||
number = "(?:0b[01]+|0x[0-9a-fA-F]+|0[0-7]+|[1-9][0-9]*)"
|
||||
string = "\"[\w\W]*?\""
|
||||
character = "'[\w\W]'"
|
||||
logic = "(true|false)"
|
||||
|
||||
[types]
|
||||
Number = ""
|
||||
Character = ""
|
||||
Type = ""
|
||||
Logic = ""
|
||||
|
||||
[syntax]
|
||||
|
||||
[hdl]
|
||||
|
||||
[compiled]
|
||||
|
||||
[interpreter]
|
Loading…
Reference in New Issue