Skip to content

Instantly share code, notes, and snippets.

View angelcaru's full-sized avatar

angelcaru

View GitHub Profile
@cfsamson
cfsamson / lexer.rs
Last active March 10, 2024 21:33
Code for a simple rust lexer for use in a simple example to rewrite code
use core::{num, slice};
use std::{io::Lines, string};
const STRING_BORDER: char = '"';
#[derive(Debug)]
enum NonTerminal {
ArgumentOpen,
ArgumentClose,
BlockOpen,
@angelcaru
angelcaru / bf.c
Created February 28, 2024 19:37
Brainf**k transpiler in C
#include <stdio.h>
#include <stddef.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
void usage(const char *program_name) {
printf("Usage: %s <input-file>\n", program_name);
}