Lines Matching defs:macro

126                      const char *macro,
132 const char *macro,
208 /* Perform macro expansion in-place on the given list. */
1127 /* Backward compatibility with an undocumented macro.
1174 This macro was not mandated originally: define only if we know
1787 be undefined if yyoverflow is a macro. */
1963 glcpp_error(& (yylsp[-2]), parser, "undefined macro %s in expression (illegal in GLES)", (yyvsp[-1].expression_value).undefined_macro);
1973 glcpp_error(& (yylsp[-2]), parser, "undefined macro %s in expression (illegal in GLES)", (yyvsp[-1].expression_value).undefined_macro);
2070 * (pre-defined) macro name.
2078 * By convention, all macro names containing two consecutive
2083 * multiple definitions of the same name. All macro names
2244 macro_t *macro = entry ? entry->data : NULL;
2245 _glcpp_parser_skip_stack_push_if (parser, & (yylsp[-4]), macro != NULL);
2255 macro_t *macro = entry ? entry->data : NULL;
2256 _glcpp_parser_skip_stack_push_if (parser, & (yylsp[-2]), macro == NULL);
2398 glcpp_error (& (yylsp[-2]), parser, "#define without macro name");
3965 /* Find a set of function-like macro arguments by looking for a
3982 * simply that the macro name should be treated as a non-macro.
4075 * If the identifier is a defined macro, this function returns 1.
4077 * If the identifier is not a defined macro, this function returns 0.
4188 /* Perform macro expansion on 'list', placing the resulting tokens
4239 yyerror(&node->token->location, parser, "'##' cannot appear at either end of a macro expansion\n");
4258 * function-like macro, it is not followed with a parenthesized
4262 * macro) and subsequent nodes which are arguments.
4277 macro_t *macro;
4287 macro = entry ? entry->data : NULL;
4289 assert(macro->is_function);
4304 /* Replace a macro defined as empty with a SPACE token. */
4305 if (macro->replacements == NULL) {
4310 _string_list_length (macro->parameters)) ||
4311 (_string_list_length (macro->parameters) == 0 &&
4315 "Error: macro %s invoked with %d arguments (expected %d)\n",
4317 _string_list_length(macro->parameters));
4324 for (node = macro->replacements->head; node; node = node->next) {
4326 _string_list_contains(macro->parameters, node->token->value.str,
4360 * 'node' in the case that 'node' is a function-like macro and
4369 * As 'node' in the case of object-like macro expansion.
4372 * function-like macro expansion.
4385 macro_t *macro;
4412 macro = entry ? entry->data : NULL;
4414 /* Not a macro, so no expansion needed. */
4415 if (macro == NULL)
4418 /* Finally, don't expand this macro if we're already actively
4435 if (! macro->is_function) {
4438 /* Replace a macro defined as empty with a SPACE token. */
4439 if (macro->replacements == NULL)
4442 replacement = _token_list_copy(parser, macro->replacements);
4515 * token is the name of a defined macro. If the DEFINED token is
4619 * "All macro names containing two consecutive underscores ( __ )
4620 * are reserved for future use as predefined macro names. All
4621 * macro names prefixed with "GL_" ("GL" followed by a single
4641 glcpp_error (loc, parser, "\"defined\" cannot be used as a macro name");
4663 macro_t *macro, *previous;
4672 macro = linear_alloc_child(parser->linalloc, sizeof(macro_t));
4674 macro->is_function = 0;
4675 macro->parameters = NULL;
4676 macro->identifier = linear_strdup(parser->linalloc, identifier);
4677 macro->replacements = replacements;
4682 if (_macro_equal (macro, previous)) {
4685 glcpp_error (loc, parser, "Redefinition of macro %s\n", identifier);
4688 _mesa_hash_table_insert (parser->defines, identifier, macro);
4696 macro_t *macro, *previous;
4704 glcpp_error (loc, parser, "Duplicate macro parameter \"%s\"", dup);
4707 macro = linear_alloc_child(parser->linalloc, sizeof(macro_t));
4709 macro->is_function = 1;
4710 macro->parameters = parameters;
4711 macro->identifier = linear_strdup(parser->linalloc, identifier);
4712 macro->replacements = replacements;
4717 if (_macro_equal (macro, previous)) {
4720 glcpp_error (loc, parser, "Redefinition of macro %s\n", identifier);
4723 _mesa_hash_table_insert(parser->defines, identifier, macro);
4738 * function-like macro name, but have not yet seen its
4771 macro_t *macro = entry ? entry->data : NULL;
4772 if (macro && macro->is_function) {
4905 * fragment shader, so we always define this macro in ES2/ES3.
4960 macro_t *macro = (macro_t *) data;
4966 const char *identifier = macro->identifier;
4972 if (_macro_equal(macro, previous)) {
4975 glcpp_error(di->loc, di->parser, "Redefinition of macro %s\n",
4979 _mesa_hash_table_insert(di->parser->defines, identifier, macro);