I DID STUFF, GOD A PROC MACRO AND SHIT

This commit is contained in:
Rusty Striker 2024-09-22 23:46:51 +03:00
commit 22319e84a1
Signed by: RustyStriker
GPG key ID: 87E4D691632DFF15
28 changed files with 3101 additions and 0 deletions

16
assets/sheet_lang_def.txt Normal file
View file

@ -0,0 +1,16 @@
Sheet -> Title Definitions;
Title -> '$' Name | [a-zA-Z0-9_\ ]+ | epsilon
// Title is either a variable whose value will be the title, constant text or none
// in the case of none, the first var will be the title
Definitions -> Definitions Definition | epsilon;
Definition -> Name ':' Type Requirements;
Name -> [a-zA-Z]+;
Type -> BOOL | INT | TEXT | TEXT '(' [0-9]+ ')' | EXP;
// ^^^^^ num of lines
EXP -> TERM '+' FACTOR | TERM '-' FACTOR;
TERM -> FACTOR '*' FACTOR | FACTOR '/' FACTOR;
FACTOR -> '(' EXP ')' | [0-9]+ | '$' Name(of type INT/BOOL);
// $Name of type bool will result in True = 1/False = 0
Requirements -> '|' Condition Requirements | epsilon;
Condition -> EXP RELOP EXP | '$' Name(of type BOOL);
RELOP -> (>|<|>=|<=|==|!=);

2
assets/web/index.html Normal file
View file

@ -0,0 +1,2 @@
<button onclick="onClick()", id="login_button">Click me!, also open terminal</button>
<script src='socket.js'></script>

15
assets/web/socket.js Normal file
View file

@ -0,0 +1,15 @@
const socket = new WebSocket('ws://localhost:3001/ws');
socket.addEventListener('open', e => { socket.send('hello server'); });
socket.addEventListener('message', e => {
console.log('message from server', e.data);
if (e.data == 'ok') {
document.getElementById('login_button').innerText = "logged in!";
}
});
function onClick() {
socket.send('login admin admin123');
}