Author: Dibyendu Majumdar
Keywords: C C89 C99 Parser Lexer Compiler

# A C99 Parser

## Introduction

The purpose of this project is to create a recursive descent parser for C99. The output from the parser should be a parse tree.

## Project Status

I started the project in January 2001 - but after working for a few days I was not able to continue work on this project. I managed to create a working parser that is almost fully C99 compatible. However, the parser does not generate a parse tree yet.

Since it is unlikely that I will be able to devote time to this project in the immediate future, I have decided to release the code as it is, in the hope that someone can use it and make something of it.

## Licencing Terms

The parser code is licensed under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version.

The lexer code is a modified version of the C lexer in the UPS C Debugger, and is copyrighted by its author Mark Russell.

## Download

C99 Parser - version 0.2.5

## Installation and Usage

After extracting the source into a directory, you can run `make` to build an executable called c_parser. The syntax for invoking c_parser is as follows:

    c_parser [input-file]

The input file must not contain pre-processer directives.

The parser is silent by default. You can define two environment variables if you want to see the parsing process. Set LEX_DEBUG=1 to start lexer trace messages. Set DEBUG to 1,2 or 3 to generate parser trace messages.

Copyright © 2000,2001 by Dibyendu Majumdar