%p 3000

%%

Object		return(OBJECT);

Assembly	return(ASSEMBLY);

Composite	return(COMPOSITE);

Pure		return(PURE);

Reflectivity	return(REFLECTIVITY);

Color		return(COLOR);

Emission	return(EMISS);

File		return(TFILE);

Data		return(DATA);

Shadows		return(SHADOWS);

On		return(ON);

Off		return(OFF);

Texture		return(TEXTURE);

Direction	return(DIRECTION);

ViewUp		return(VIEWUP);

Scale		return(SCALE);

UpAxis		return(UPAXIS);

x_axis		return(XAXIS);

y_axis		return(YAXIS);

z_axis		return(ZAXIS);

[a-zA-Z_][a-zA-Z_0-9]*	{
			yylval.y_str = (char *)malloc(strlen(yytext) + 1);
			strcpy(yylval.y_str, yytext);
			return(NOM);
		}

[a-zA-Z_][a-zA-Z_.\/0-9]*	{
			yylval.y_str = (char *)malloc(strlen(yytext) + 1);
			strcpy(yylval.y_str, yytext);
			return(NOMFICHIER);
		}


[\+\-0-9][0-9]*\.[0-9]*	{
			sscanf(yytext, "%f", &(yylval.y_flt));
			return(REEL);
		}

"\""		{
			char	buf[BUFSIZ], *p;
			
			for (p = buf; (*p = input()) != '"'; p++)
				if (*p == '\n' || *p == EOF)
					yyerror("syntax error");

			*p = 0;

			yylval.y_str = (char *)malloc(strlen(buf) + 1);
			strcpy(yylval.y_str, buf);

			return(CHAINE);
		}

"{"		{
			return(ACCOLG);
		}

"}"		{
			return(ACCOLD);
		}

"<"		{
			return(PPQ);
		}

">"		{
			return(PGQ);
		}

"\n"		{
			linecount++;
		}

[ \t]*		{
			;
		}

\;[^\n]*	;
