updating parser logic

git-svn-id: svn://anubis/fart/trunk@97 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
Josh Holtrop 2009-02-10 01:20:05 +00:00
parent 0fc1e468fe
commit 2f16235ed2

View File

@ -120,10 +120,26 @@ camera_items: /* empty */
| camera_item camera_items
;
camera_item: POSITION vector
| LOOKAT vector
| UP vector
| VFOV vector
camera_item: POSITION vector {
$$ = new Node();
$$->type = POSITION;
$$->the_Vector = $2->the_Vector;
}
| LOOKAT vector {
$$ = new Node();
$$->type = LOOKAT;
$$->the_Vector = $2->the_Vector;
}
| UP vector {
$$ = new Node();
$$->type = UP;
$$->the_Vector = $2->the_Vector;
}
| VFOV vector {
$$ = new Node();
$$->type = VFOV;
$$->the_Vector = $2->the_Vector;
}
;
intersect: INTERSECT LCURLY boolean_items RCURLY
@ -136,9 +152,21 @@ material_items: /* empty */
| material_item material_items
;
material_item: COLOR vector
| REFLECTANCE number
| SHININESS number
material_item: COLOR vector {
$$ = new Node();
$$->type = COLOR;
$$->the_Vector = $2->the_Vector;
}
| REFLECTANCE number {
$$ = new Node();
$$->type = REFLECTANCE;
$$->the_double = $2->the_double;
}
| SHININESS number {
$$ = new Node();
$$->type = SHININESS;
$$->the_double = $2->the_double;
}
;
number: DEC_NUMBER {