Add types and semantics to micro language description

This commit is contained in:
Yannick Reiß 2025-08-07 09:33:47 +02:00
parent 4a5488dff7
commit 0b6073b5bb
1 changed files with 31 additions and 0 deletions

31
language.toml Normal file
View File

@ -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]