= INTRODUCTION = Welcome reader, You will find our solution on assignment 2 of Compiler Constructions 2008 giving at LIACS University. First we will you a grand overview of the files altered, next we will bullet point the most important design decisions. And the grand finale will show the usage of the program. Enjoy! Johan and Rick = FILES EDITED/ADDED = A coercion.cc = Coercion and checking module C++ code A coercion.h = Coercion and checking module C++ header E comp.l = Main program lexer flex code E comp.y = Main program parser bison code E debug.c = Debug printing module C++ code E debug.h = Debug printing module C++ header A debug.sh = Debug cycle on single test file A DOCUMENTATION.TXT = Reading right know :-) A messages.cc = Messaging module C++ code A messages.h = Messaging module C++ header = DESIGN DECISIONS = * lastOP : Allowing to differentiate without altering the grammar of the language, required the notion of storing the current RELOP and MULOP into lastOP, allowing it to be read later on by the parser, to identity the proper NODE_* * Separate files for the use of Messaging, Coercion, Debug to keep code readable and more understandable * For the sake of simplicity not all calls within the Parser are of type Node, some are Symbol, to clearly define we are only using partial information out of it. * Split calls for recognising the current ID, as the parser could traverse some steps deep, allowing to change the lastID while the corresponding code has not been called. A 'temporary' node will be created and passed along down below * Parameter listings will first have a unknown return value and made to a linked list right away, ones the return value has found it recursively get added to it pre-assessors * Creating a new node and type checking will done 'on the fly' e.g. a function is called with a specific node -> conversion/coercion fails/warnings/errors -> specific node or dummy value returned = USAGE = # Compile $ make first $ make # Full blown debugging stack $ ./comp -w -vvvv