From 8f0749764335c2196933ce0847f1551bf4a556b9 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Tue, 29 Nov 2011 23:05:34 +0000 Subject: pp2cc: Update readme with dependencies and support --- README | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README b/README index dcf6f4e..096545f 100644 --- a/README +++ b/README @@ -2,16 +2,19 @@ pp2cc is a C compiler for the PP2 Practicum Processor. It generates assembly from C code. Currently, pp2cc is licensed under a proprietary license, but this may change in the future. -Depedencies: +Dependencies: - Python - http://python.org/download/ - pycparser - http://code.google.com/p/pycparser/ +- PLY (Python Lex-Yacc) - http://www.dabeaz.com/ply/ Python is often installed by default on Linux distributions. For Windows, you probably need to run the installer from the above link. Extract the pycparser ZIP file (see link above) and copy the pycparser subdirectory to the directory -containing pp2cc.py. pp2cc is a console program, you need to open a terminal -(or cmd on Windows) to see compiler messages. +containing pp2cc.py. The same goes for PLY: download the tar.gz file and copy +the ply/ directory into the directory containing pp2cc. pp2cc is a console +program, you need to open a terminal (or cmd on Windows) to see compiler +messages. Usage: python pp2cc.py [options] filename.. Multiple input files can be specified, options can be specified before and @@ -52,7 +55,7 @@ function calls - supported, result is stored in register R0 (for int functions) undefined function is used, it'll still try to branch to the label Parameters are not supported. A7.4 Unary Operators - supported: ++ -- + - ~ ! Unsupported: sizeof & * -A7.5 Casts - unsupported +A7.5 Casts - unsupported and ignored A7.6-A7.7, A7.9-7.13 - supported: * / % + - < > <= >= == != & ^ | Left to right A7.8 Shift - << >> is supported, if the second operand is negative, no shift will be performed. The shift treats the first operand as an unsigned integer. @@ -74,7 +77,7 @@ A8.3 Structure and union declarations - unsupported A8.4 Enumerations - unsupported A8.5 Declarators - pointers and qualifiers are ignored, only a direct name is supported -A8.6 Meaning of declarators - pointer and array is unsupported, function is +A8.6 Meaning of declarators - pointer is supported, array is not, function is supported without parameters and assumed to be an int function A8.7 Initialization - Supported for an expression resulting in an int A8.8 Type names - not verified @@ -101,7 +104,9 @@ A10.2 External declarations - unsupported/unchecked A11 Scope and Linkage A11.1 Lexical scope - objects (variables), functions use the same namespace, thereby not conforming to the Standard. Block scope is not - supported, everything is global + supported, everything is global. Variables with the same name in + different block scopes do not affect each other, but recursive + functions do A11.2 Linkage - not applicable / unsupported A12 Preprocessing -- cgit v1.2.1