Crates.io | uff |
lib.rs | uff |
version | 0.1.0 |
source | src |
created_at | 2022-11-22 23:08:09.110346 |
updated_at | 2022-11-22 23:08:09.110346 |
description | Compiler for a language that makes you say 'big ouf' often |
homepage | |
repository | https://github.com/myOmikron/uff-lang |
max_upload_size | |
id | 721180 |
size | 23,776 |
To add new proposals, open a new issue, describe what and why we should change. Add an example as well as explain the use case to archive.
But if you really insist:
uff.uff
should should be <<be>>
be should be <<should>>
say be should
the answer is 0
~> uff build uff.uff
~> bin/uff
should be
exit_statement = "the" whitespace "answer" whitespace "is" whitespace ( integer | identifier ) .
assign_statement = identifier whitespace "should be" whitespace expression .
expression = ( integer | identifier | string | decimal_float ) .
string = "<<" /* any character */ ">>" .
identifier = (unicode_symobls | unicode_letter) { unicode_symobls | unicode_letter | unicode_digit } .
imaginary = ( decimal_float | integer ) "i" .
decimal_float = integer "." digits [ "e" integer ] .
integer = [ "-" ] digits .
digits = digit { ["_"] digit } .
digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 .
whitespace = whitespace_character { whitespace_character } .
whitespace_character = /* Unicode 13.0.0 Character Class: White_Space */ .
unicode_symobls = /* Unicode 13.0.0 Character Classes: Sm, Sc, Sk, So */ .
unicode_digit = /* Unicode 13.0.0 Characer Class: Nd */ | "_" .
unicode_letter = /* Unicode 13.0.0 Characer Classes: Lu, Ll, Lt, Lm, Lo */.
should be
'
: Block comment"
: Line commentTo exit the program just use the keyword: the answer is <int64>
.
If no explicit exit code was given, 42
is used.
Strings have to begin with <<
and end with >>
. The use of >>
in the string is not possible.
2x float64
, split up in imaginary and real part.
b@2
or b@-2
-- Not so sure about this syntaxThis may be a valid struct in uff
. This is also subject to be discussed.
bla struct {
" This is a line comment
pub {
message string
success bool
data object
}
}
Exceptions are named heart attacks.
tbd
as keyword
The CAT
mode is enabled by default.
The program behaves like a cat. It has multiple lifes.
How many lifes your program has, depends on the target architecture.
These should be valid keywords, but I don't have an idea, what to use them for:
xd
uff
yeet