diff options
author | Jakob Kaivo <jkk@ungol.org> | 2020-03-31 11:57:48 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ungol.org> | 2020-03-31 11:57:48 -0400 |
commit | a67836c7c8aadd011762fe74a842e51d975e98a7 (patch) | |
tree | 3ea6625b0d14f5b9f83126ee01e4d8948c6811e0 | |
parent | cb694dd62f6ff5d6d40a97872be7beb334437e2c (diff) |
basic implementationy
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | liby.c | 15 |
3 files changed, 29 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e0292b1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.o +*.a diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..70a1c29 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +.POSIX: + +LIB=liby + +$(LIB).a: $(LIB).o + $(AR) rv $@ $(LIB).o + +$(LIB).o: $(LIB).c + $(CC) $(CFLAGS) -c $(LIB).c + +clean: + rm -f *.a *.o @@ -0,0 +1,15 @@ +#include <stdio.h> + +extern int yyparse(void); + +int yyerror(const char *s) +{ + return fprintf(stderr, "%s\n", s); +} + +int main(int argc, char *argv[]) +{ + (void)argc; + (void)argv; + return yyparse(); +} |