Lines Matching refs:loc

72 #define YY_USER_ACTION  adjust_location (loc, yytext, yyleng);
126 increment_rule_length (location loc)
133 rule_length_overflow (loc);
136 static void handle_dollar (int token_type, char *cp, location loc);
137 static void handle_at (int token_type, char *cp, location loc);
139 static unsigned long int scan_integer (char const *p, int base, location loc);
197 "," warn_at (*loc, _("stray `,' treated as white space"));
201 token_start = loc->start;
209 handle_syncline (yytext + sizeof "#line " - 1, *loc);
261 complain_at (*loc, _("invalid directive: %s"), quote (yytext));
269 val->symbol = symbol_get (yytext, *loc);
270 id_loc = *loc;
271 increment_rule_length (*loc);
276 val->integer = scan_integer (yytext, 10, *loc);
280 val->integer = scan_integer (yytext, 16, *loc);
285 "'" STRING_GROW; token_start = loc->start; BEGIN SC_ESCAPED_CHARACTER;
288 "\"" token_start = loc->start; BEGIN SC_ESCAPED_STRING;
291 "%{" code_start = loc->start; BEGIN SC_PROLOGUE;
300 code_start = loc->start;
321 complain_at (*loc, _("invalid character: %s"), quote (yytext));
325 loc->start = loc->end = scanner_cursor;
339 *loc = id_loc;
346 *loc = id_loc;
351 *loc = id_loc;
402 loc->start = token_start;
404 increment_rule_length (*loc);
423 loc->start = token_start;
426 *loc);
427 symbol_class_set (val->symbol, token_sym, *loc, false);
429 symbol_user_token_number_set (val->symbol, last_string_1, *loc);
431 increment_rule_length (*loc);
441 \0 complain_at (*loc, _("invalid null character"));
454 complain_at (*loc, _("invalid escape sequence: %s"), quote (yytext));
456 complain_at (*loc, _("invalid null character: %s"), quote (yytext));
465 complain_at (*loc, _("invalid escape sequence: %s"), quote (yytext));
467 complain_at (*loc, _("invalid null character: %s"), quote (yytext));
486 complain_at (*loc, _("invalid escape sequence: %s"), quote (yytext));
488 complain_at (*loc, _("invalid null character: %s"), quote (yytext));
493 complain_at (*loc, _("unrecognized escape sequence: %s"), quote (yytext));
531 token_start = loc->start;
537 token_start = loc->start;
543 token_start = loc->start;
570 code_start = loc->start;
575 complain_at (*loc, _("missing `{' in %s"),
623 loc->start = code_start;
625 increment_rule_length (*loc);
626 last_braced_code_loc = *loc;
636 "$"("<"{tag}">")?(-?[0-9]+|"$") handle_dollar (token_type, yytext, *loc);
637 "@"(-?[0-9]+|"$") handle_at (token_type, yytext, *loc);
640 warn_at (*loc, _("stray `$'"));
644 warn_at (*loc, _("stray `@'"));
660 loc->start = code_start;
679 loc->start = code_start;
741 adjust_location (location *loc, char const *token, size_t size)
749 loc->start = scanner_cursor;
773 loc->end = scanner_cursor;
775 if (line == INT_MAX && loc->start.line != INT_MAX)
776 warn_at (*loc, _("line number overflow"));
777 if (column == INT_MAX && loc->start.column != INT_MAX)
778 warn_at (*loc, _("column number overflow"));
838 handle_action_dollar (char *text, location loc)
859 type_name = symbol_list_n_type_name_get (current_rule, loc, 0);
861 complain_at (loc, _("$$ of `%s' has no declared type"),
879 type_name = symbol_list_n_type_name_get (current_rule, loc, n);
881 complain_at (loc, _("$%d of `%s' has no declared type"),
891 complain_at (loc, _("integer out of range: %s"), quote (text));
904 handle_dollar (int token_type, char *text, location loc)
909 if (handle_action_dollar (text, loc))
927 complain_at (loc, _("invalid value: %s"), quote (text));
937 handle_action_at (char *text, location loc)
958 complain_at (loc, _("integer out of range: %s"), quote (text));
971 handle_at (int token_type, char *text, location loc)
976 handle_action_at (text, loc);
993 complain_at (loc, _("invalid value: %s"), quote (text));
1002 scan_integer (char const *number, int base, location loc)
1009 complain_at (loc, _("integer out of range: %s"), quote (number));
1079 handle_syncline (char *args, location loc)
1087 warn_at (loc, _("line number overflow"));
1101 rule_length_overflow (location loc)
1103 fatal_at (loc, _("rule is too long"));
1116 location loc;
1117 loc.start = start;
1118 loc.end = scanner_cursor;
1119 complain_at (loc, _(msgid), token_end);