Logo  

CS456 - Systems Programming

Description

Exercise #6

In this exercise you will make a lexer library. A library is just a C program w/o a main() function that is compiled using -fPIC (Position Independent Code,) meaning that the program code can be positioned anywhere in memory and does not need to reside in the normal text segment of a processes and with -shared, meaning the code can be shared among more than one process (each process will have it's own distinct copy of the libraries data and BSS segments, but the libraries text (code) will be the same.)

You are provided a Makefile which can be used to build your library (the lex.c and lex.h files) and then linked to a provided main.c program for testing. use 'make test' to test your completed program. Please read and understand the included Makefile.