From 61d12faf4702685388d27cd8ff442523ad5821c5 Mon Sep 17 00:00:00 2001 From: miwi Date: Mon, 24 Nov 2008 09:33:54 +0000 Subject: cparser is a C compiler, which can parse C89 and C99 as well as many GCC and some MSVC extensions. It also provides many useful analyses for warnings. It uses libFIRM, which provides a SSA-based intermediate representation in form of explicit dependency graphs, for optimization and code generation. Parsing is done with a handwritten recursive descent parser. The AST representation is straightforward, so it can be used for other purposes than code generation. * fast recursive descent parser, parses C89 and C99 * handles most GCC extensions, f.e. __attribute__, inline assembler, computed goto, statement expressions * handles some MSVC extensions (like declspec) * provides many useful warnings * format string checker for char and wchar_t * unreachable code analysis * missing return statement check, which pinpoints exact location(s) * write-only/-self variables detection * missing and redundant forward declarations * most warnings switches, which are available for GCC * provides concise messages in case of error, for example when encountering misspelled typenames * compiler driver compatible with with GCC (-fxxx, -Wxxx, -M, ...) * uses libFIRM for optimization and code generation (devel/libfirm) WWW: http://www.libfirm.org Submitted by: Christoph Mallon --- lang/Makefile | 1 + lang/cparser/Makefile | 29 +++++++++++++++++++++++++++++ lang/cparser/distinfo | 3 +++ lang/cparser/pkg-descr | 24 ++++++++++++++++++++++++ 4 files changed, 57 insertions(+) create mode 100644 lang/cparser/Makefile create mode 100644 lang/cparser/distinfo create mode 100644 lang/cparser/pkg-descr (limited to 'lang') diff --git a/lang/Makefile b/lang/Makefile index 3f6e6c4c282..4919612ff0a 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -33,6 +33,7 @@ SUBDIR += cmucl-extra SUBDIR += cocor SUBDIR += compaq-cc + SUBDIR += cparser SUBDIR += csharp-mode.el SUBDIR += cu-prolog SUBDIR += cython diff --git a/lang/cparser/Makefile b/lang/cparser/Makefile new file mode 100644 index 00000000000..c436f5d2e6e --- /dev/null +++ b/lang/cparser/Makefile @@ -0,0 +1,29 @@ +# New ports collection makefile for: libFIRM +# Date created: 22 Nov 2008 +# Whom: Christoph Mallon +# +# $FreeBSD$ +# + +PORTNAME= cparser +PORTVERSION= 0.9.6 +CATEGORIES= lang devel +MASTER_SITES= http://www.info.uni-karlsruhe.de/software/libfirm/ + +MAINTAINER= christoph.mallon@gmx.de +COMMENT= A C99 compiler using libFIRM as backend + +RUN_DEPENDS= ${LOCALBASE}/lib/libfirm.a:${PORTSDIR}/devel/libfirm +LIB_DEPENDS= firm.0:${PORTSDIR}/devel/libfirm + +USE_BZIP2= yes +USE_GMAKE= yes + +PLIST_FILES= bin/cparser + +.include + +do-install: + @${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/build/cparser ${PREFIX}/bin + +.include diff --git a/lang/cparser/distinfo b/lang/cparser/distinfo new file mode 100644 index 00000000000..3c1ad60cac9 --- /dev/null +++ b/lang/cparser/distinfo @@ -0,0 +1,3 @@ +MD5 (cparser-0.9.6.tar.bz2) = 3efd0e233292038642ec6c0de065bca5 +SHA256 (cparser-0.9.6.tar.bz2) = cb81ff4838aeb39b7692906d7872ccb9c389326136745da9f3dd602fab092149 +SIZE (cparser-0.9.6.tar.bz2) = 179038 diff --git a/lang/cparser/pkg-descr b/lang/cparser/pkg-descr new file mode 100644 index 00000000000..40555d4c0af --- /dev/null +++ b/lang/cparser/pkg-descr @@ -0,0 +1,24 @@ +cparser is a C compiler, which can parse C89 and C99 as well as many GCC and +some MSVC extensions. It also provides many useful analyses for warnings. It +uses libFIRM, which provides a SSA-based intermediate representation in form of +explicit dependency graphs, for optimization and code generation. Parsing is +done with a handwritten recursive descent parser. The AST representation is +straightforward, so it can be used for other purposes than code generation. + +* fast recursive descent parser, parses C89 and C99 +* handles most GCC extensions, f.e. __attribute__, inline assembler, + computed goto, statement expressions +* handles some MSVC extensions (like declspec) +* provides many useful warnings + * format string checker for char and wchar_t + * unreachable code analysis + * missing return statement check, which pinpoints exact location(s) + * write-only/-self variables detection + * missing and redundant forward declarations + * most warnings switches, which are available for GCC +* provides concise messages in case of error, for example when encountering + misspelled typenames +* compiler driver compatible with with GCC (-fxxx, -Wxxx, -M, ...) +* uses libFIRM for optimization and code generation (devel/libfirm) + +WWW: http://www.libfirm.org -- cgit