BracketFolders

From Esolang
Jump to navigation Jump to search

Introduction

This language is inspired by Folders made by User:Rottytooth All code in this language is only made by 2 characters: The open bracket "(" and the close bracket ")"

Note

I'm sorry because I'm so lazy for the Syntax part. However, I'll do the program examples for the sake of syntax

Syntax

Pair bracket

It is use to specifies what command will be. The pair bracket will look like this

   ()

Command

Commands are read from up to down, from in to out

The number of pair bracket within the first pair bracket are read as the type, command, or expression. The second and sometimes third folder are read as the content (in the case of If or While statements).

The number of folders in the first bracket determines the expression, type, or command:

Commands

Command # of Pair Brackets Details
if 0 folders Second sub-folder holds expression, third holds list of commands
while 1 folder Second sub-folder holds expression, third holds list of commands
declare 2 folders Second sub-folder holds type, third holds var name (in number of folders)
let 3 folders Second holds types, third holds var name (in number of folders), fourth holds expressions or boolean expressions depending on the type before
print 4 folders Second sub-folder afterward holds expression
input 5 folders Second sub-folder holds the input types, third sub-folder holds var name in numbers of pair bracket (0 is the lowest number of pair bracket you can use)

Boolean Expressions

Caption text
Type # of Bracket pairs Argument (If needed)
False 0
True 1
AND 2 Second sub-bracket and third sub-bracket holds boolean expressions
OR 3 Second sub-bracket and third sub-bracket holds boolean expressions
NOT 4 Second sub-bracket holds boolean expression
Less than 5 Second sub-bracket and third sub-bracket holds expressions or boolean expressions
Larger than 6 Second sub-bracket and third sub-bracket holds expressions or boolean expressions
Equal 7 Second sub-bracket and third sub-bracket holds expressions or boolean expressions

Expressions

Type # of folders Details
Variable 0 folders Second sub-folder holds var name
Add 1 folder Second sub-folder holds first expression to add, third holds second expression
Subtract 2 folders Second sub-folder holds first expression to subtract, third holds second expression
Multiply 3 folders Second sub-folder holds first expression to multiply, third holds second expression
Divide 4 folders Second sub-folder holds first expression to divide, third holds second expression
Literal Value 5 folders Second sub-folder holds the value

Types

Type # of Folders
int 0 folders
float 1 folder
string 2 folders

Literals

All literals are represented in hex. A group of four folders is a single hex digit. Each of the four folders either contains a sub-folder, marking it as a 1, or is empty, marking it as 0.

Ints and Chars

A folder holding a series of folders, each of which is a hex digit, as described under literal above.

Strings

Strings are made up of Unicode characters. Each string has a series of folders, one per character. Each character has a series of sub-folders for each hex digit, as described above.

Boolean

Boolean value is defined by Boolean Expression table

Coding form

There are 4 coding forms of writing code, basically it makes coding more fun where you intepret one language in multiples form. You can choose 1 of 3 below

Readable Bracket form

Readable Code form

Compacted form

Binary form

Examples Programs

Hello, world!

(((()()()())((()()()()())(()())(((()(())()())((())()()()))((()(())(())())(()(())()(())))((()(())(())())((())(())()()))((()(())(())())((())(())()()))((()(())(())())((())(())(())(())))((()()(())())((())(())()()))((()()(())())(()()()()))((()(())(())(()))(()(())(())(())))((()(())(())())((())(())(())(())))((()(())(())(()))(()()(())()))((()(())(())())((())(())()()))((()(())(())())(()(())()()))((()()(())())(()()()(())))))))
Or in binary version:
000010101011000101010101100101100001001101011000110101011100010011001101100100110100111100010011001101100011001101011100010011001101100011001101011100010011001101100011001100110011110001010011011000110011010111000101001101100101010111000100110011001110010011001100111100010011001101100011001100110011110001001100110011100101001101110001001100110110001100110101110001001100110110010011010111000101001101100101010011111111

Disan Count