function_declarator: function_header
functi on_header_wi th_pa rameters
function_header_with_parameters:
function_header parameter_declaration
function_header_with_parameters COMMA parameter_declaration
function_header:
fully_specified_type IDENTIFIER LEFT_PAREN
parameter_declarator:
type_specifier IDENTIFIER
type_specifier IDENTIFIER LEFT_BRACKET RIGHT_BRACKET
parameter_decla rati on:
type_qualifier parameter_qualifier parameter_declarator parameter_qua1i fi er parameter_declarator type_qualifier parameter_qualifier parameter_type_specifier parameter_qualifier parameter_type_specifier

parameter_qualifier: /* пусто */

Приложение А. Грамматика языка

IN
OUT
INOUT
parameter_type_specifier: type_specifier
type_specifier LEFTJRACKET RIGHTJRACKET
init_declarator_list: single_declaration
init_declaratorJist COMMA IDENTIFIER init_declarator_list COMMA IDENTIFIER LEFTJRACKET
RIGHTJRACKET init_declarator_list COMMA IDENTIFIER LEFTJRACKET
constant_expression RIGHTJRACKET initjeclaratorjist COMMA IDENTIFIER EQUAL initializer
single_declaration: f u 11y_spec i fi ed_type fully_specified_type IDENTIFIER
fully_specified_type IDENTIFIER LEFTJRACKET RIGHTJRACKET fully_specified_type IDENTIFIER LEFTJRACKET constant_expression
RIGHTJRACKET fully_specified_type IDENTIFIER EQUAL initializer

// 'enum' и 'typedef не поддерживаются

fu 11 у_s pec i fi ed_type: type_specifier

type_qualifier type_specifier CONST

ATTRIBUTE // только для вершины

VARYING
UNIFORM
type_specifier: VOID FLOAT INT BOOL VEC2 VEC3 VEC4 BVEC2 BVEC3 BVEC4 IVEC2 IVEC3 IVEC4 MAT2 MAT3 MAT4
SAMPLER1D
SAMPLER2D
SAMPLER3D
SAMPLERCUBE
SAMPLER1DSHAD0W

Грамматика языка

SAMPLER2DSHAD0W struct_speci fier TYPE_NAME
struct_specifier:
STRUCT IDENTIFIER LEFT_BRACE struct_declaration_list RIGHTJRACE .
STRUCT LEFT_BRACE struct_declarationjist RIGHT_BRACE
structjeclarationj ist: structjeclaration
structjecl arationj ist struct_declaration
structjeclaration:
type_specifier structjecl arator J ist SEMICOLON
structjecl arator J i st: struct_declarator
struct_declarator_list COMMA struct_declarator

⇐ Предыдущая| |Следующая ⇒