Skip to content

Instantly share code, notes, and snippets.

@Tharun8951
Tharun8951 / httpe.c
Created June 22, 2024 15:56
Trying to implement http server from scratch in c
#include <netinet/in.h>
#include <stdio.h>
#include <sys/socket.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <string.h>
#include <arpa/inet.h>
#include <bits/socket.h>
#include <sys/stat.h>
@Tharun8951
Tharun8951 / lexer.cpp
Created March 30, 2024 20:12
A C++ lexer for a basic programming language. Tokenizes source code into various token types such as numbers, identifiers, operators, and keywords. Includes functions for splitting strings, checking for numbers and alphabetic characters, and handling skippable characters. The lexer reads input from a file, tokenizes it, and prints the resulting…
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <cctype>
#include <fstream>
#include <sstream>
#include <cstring>
#include <cstdlib>