diff options
| author | Cody <cody@codyq.dev> | 2023-06-26 23:54:29 -0500 |
|---|---|---|
| committer | Cody <cody@codyq.dev> | 2023-06-26 23:54:29 -0500 |
| commit | 6e168a091d13b5ebb0beb7bb93c2b8c6f6d92711 (patch) | |
| tree | 5353261c5eaf66031781e5e01d1b7409b66f50e4 /documentation/grammar.txt | |
| parent | 9748e95027af7820e6d9f08eb20b0901fdedfa2a (diff) | |
| download | sloth-6e168a091d13b5ebb0beb7bb93c2b8c6f6d92711.tar.gz | |
Deleted documentation directory
Diffstat (limited to 'documentation/grammar.txt')
| -rw-r--r-- | documentation/grammar.txt | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/documentation/grammar.txt b/documentation/grammar.txt deleted file mode 100644 index 1217751..0000000 --- a/documentation/grammar.txt +++ /dev/null @@ -1,57 +0,0 @@ -### Statements - -expr_statment : expression ( ";" | "\n" ) - -### Expressions - -expression : logical_or - -### Operators - -logical_or : logical_and ( "||" logical_and )* -logical_and : equality ( "&&" equality )* - -equality : comparison ( ( "==" | "!=" ) comparison )* -comparison : bitwise_or ( ( "<=" | ">=" | "<" | ">" ) bitwise_or )* - -bitwise_or : bitwise_xor ( "|" bitwise_xor )* -bitwise_xor : bitwise_and ( "^" bitwise_and )* -bitwise_and : bitwise_shift ( "&" bitwise_shift )* -bitwise_shift : additive ( ( "<<" | ">>" ) additive )* - -additive : multiplicative ( ( "+" | "++" | "-" ) multiplicative )* -multiplicative : unary ( ( "*" | "**" | "/" | "%" ) unary )* -unary : ( "!" | "-" | "~" ) unary | call - -call : primary ( "(" ( primary "," )* primary? ")" )* - -primary : identifier - | literal - | "(" expression ")" - -### Types - -identifier : ( ALPHA | "_" | "$" ) ( ALPHANUMERIC | "_" | "$" )* -literal : string - | char - | float - | int - | boolean - -string : '"' ALPHANUMERIC* '"' -char : "'" ALPHANUMERIC "'" -float : NUMERIC "." NUMERIC* -int : NUMERIC+ -boolean : "true" | "false" - -### Primitives - -ALPHANUMERIC = ALPHA | NUMERIC -NUMERIC = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" -ALPHA = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" - | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" - | "U" | "V" | "W" | "X" | "Y" | "Z" | "a" | "b" | "c" | "d" - | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" - | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" - | "y" | "z" - |
