Skip to content

Instantly share code, notes, and snippets.

View Airbus5717's full-sized avatar
🎯
Busy

Airbus5717 Airbus5717

🎯
Busy
View GitHub Profile
@oluigipo
oluigipo / parser.c
Last active November 28, 2022 22:42
simple expression parser in C
// Top-level declarations
static double parse_add(void);
static const char* state;
// Checks if state is a valid digit
static int is_digit(void) {
return *state >= '0' && *state <= '9';
}
// Get the digit value of state
@seanjensengrey
seanjensengrey / tiny.c
Last active March 25, 2024 16:46
Marc Feeley Tiny C compiler
/* file: "tinyc.c" */
/* originally from http://www.iro.umontreal.ca/~felipe/IFT2030-Automne2002/Complements/tinyc.c */
/* Copyright (C) 2001 by Marc Feeley, All Rights Reserved. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
@MrSmith33
MrSmith33 / tinyc.d
Created November 3, 2014 13:56
Tiny C
/* file: "tinyc.d" */
/* Copyright (C) 2001 by Marc Feeley, All Rights Reserved. */
// D port by Mr.Smith (C) 2014
import std.stdio;
import std.algorithm : equal;
/*
* This is a compiler for the Tiny-C language. Tiny-C is a