Thursday, February 5, 2009

GLSL syntax library

Copperbox revision 453.

The GLSL parser is now complete, that's to say all the productions of the grammar are implemented and there are no actions with undefined. There is one shift reduce conflict and there could certainly be errors.

The lexer isn't complete, and the abstract syntax tree isn't very abstract. It looks like I'll have to consider the current syntax tree to be nearer the concrete syntax and do a rewriting step after parsing. The main problem is declartors aren't very pleasing, the abstract syntax tree will probably have to remove coalescing so that:


int a, b = 0;


becomes


int a;
int b = 0;

Blog Archive

About Me

My photo
Disambiguating biog as there are a few Stephen Tetley's in the world. I'm neither a cage fighter or yachtsman. I studied Fine Art in the nineties (foundation Bradford 1992, degree Cheltenham 1992 - 95) then Computing part-time at Leeds Met graduating in 2003. I'm the Stephen Tetley on Haskell Cafe and Stackoverflow.