profile/ivi/mesa.git
14 years agoAdd README file describing glcpp.
Carl Worth [Tue, 11 May 2010 19:04:42 +0000 (12:04 -0700)]
Add README file describing glcpp.

Mostly this is a place for me to write down the URLs of the GLSL and
C99 specifications that I need to write this code.

14 years agoAdd a very simple test for the pre-processor.
Carl Worth [Mon, 10 May 2010 23:21:10 +0000 (16:21 -0700)]
Add a very simple test for the pre-processor.

Validate desired test cases by ensuring the output of glcpp matches
the output of the gcc preprocessor, (ignoring any lines of the gcc
output beginning with '#').

Only one test case so far with a trivial #define.

14 years agoImplment #define
Carl Worth [Mon, 10 May 2010 23:16:06 +0000 (16:16 -0700)]
Implment #define

By using the recently-imported hash_table implementation.

14 years agoMakefile: Enable debugging of parser.
Carl Worth [Mon, 10 May 2010 23:14:59 +0000 (16:14 -0700)]
Makefile: Enable debugging of parser.

This compiles the debugging code for teh parser. It's not active
unless the yydebug variable is set to a non-zero value.

14 years agoAdd hash table implementation from glsl2 project.
Carl Worth [Mon, 10 May 2010 20:36:26 +0000 (13:36 -0700)]
Add hash table implementation from glsl2 project.

The preprocessor here is intended to become part of the glsl2 codebase
eventually anyway.

14 years agoAdd .gitignore file.
Carl Worth [Mon, 10 May 2010 20:32:42 +0000 (13:32 -0700)]
Add .gitignore file.

To ignore generated source files (and glcpp binary).

14 years agoAdd some compiler warnings and corresponding fixes.
Carl Worth [Mon, 10 May 2010 20:17:25 +0000 (13:17 -0700)]
Add some compiler warnings and corresponding fixes.

Most of the current problems were (mostly) harmless things like
missing declarations, but there was at least one real error, (reversed
argument order for yyerrror).

14 years agoMake the lexer reentrant (to avoid "still reachable" memory).
Carl Worth [Mon, 10 May 2010 18:52:29 +0000 (11:52 -0700)]
Make the lexer reentrant (to avoid "still reachable" memory).

This allows the final program to be 100% "valgrind clean", (freeing
all memory that it allocates). This will make it much easier to ensure
that any allocation that parser actions perform are also cleaned up.

14 years agoAdd the tiniest shell of a flex/bison-based parser.
Carl Worth [Mon, 10 May 2010 18:44:09 +0000 (11:44 -0700)]
Add the tiniest shell of a flex/bison-based parser.

It doesn't really *do* anything yet---merlely parsing a stream of
whitespace-separated tokens, (and not interpreting them at all).