Skip to content

Commit

Permalink
Primera version de clon de MySQL
Browse files Browse the repository at this point in the history
  • Loading branch information
juanpablodejesus committed Feb 26, 2020
0 parents commit 8351734
Show file tree
Hide file tree
Showing 45 changed files with 20,800 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Makefile for pmysql
CC = cc -g
LEX = flex
YACC = bison
CFLAGS = -DYYDEBUG=1

all: pmysql

pmysql: pmysql.tab.o pmysql.o
${CC} -o $@ pmysql.tab.o pmysql.o

pmysql.tab.c pmysql.tab.h: pmysql.y
${YACC} -vd pmysql.y

pmysql.c: pmysql.l
${LEX} -o $*.c $<

pmysql.o: pmysql.c pmysql.tab.h

test: all
cd test && python gen_tests.py
cd test && py.test -v

.SUFFIXES: .pgm .l .y .c
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# pmysql
bison &amp; flex sql parser

sql example code from flex-bison book

https://www.safaribooksonline.com/library/view/flex-bison/9780596805418/ch04.html
Binary file added pmysql
Binary file not shown.
Loading

0 comments on commit 8351734

Please sign in to comment.