program_name);
else
{
+ /* For ../build-aux/cross-options.pl to work, use the format:
+ ^ -S, --long[=ARGS] (whitespace)
+ A --long option is required.
+ Otherwise, add exceptions to ../build-aux/cross-options.pl. */
+
printf (_("Usage: %s [OPTION]... FILE\n"), program_name);
fputs (_("\
Generate LALR(1) and GLR parsers.\n\
`--------------------------------------*/
void
-skeleton_arg (char const *arg, int prio, location const *loc)
+skeleton_arg (char const *arg, int prio, location loc)
{
if (prio < skeleton_prio)
{
{
char const *msg =
_("multiple skeleton declarations are invalid");
- if (loc)
- complain_at (*loc, msg);
- else
- complain (msg);
+ complain_at (loc, msg);
}
}
void
-language_argmatch (char const *arg, int prio, location const *loc)
+language_argmatch (char const *arg, int prio, location loc)
{
char const *msg;
else
return;
- if (loc)
- complain_at (*loc, msg, arg);
- else
- complain (msg, arg);
+ complain_at (loc, msg, arg);
}
/*----------------------.
/* Build a location for the current command line argument. */
static
location
-command_line_location()
+command_line_location (void)
{
location res;
/* "<command line>" is used in GCC's messages about -D. */
char* value = strchr (optarg, '=');
if (value)
*value++ = 0;
- else
- value = "";
- muscle_percent_define_insert (name, command_line_location (), value);
+ muscle_percent_define_insert (name, command_line_location (),
+ value ? value : "");
}
break;
break;
case 'L':
- language_argmatch (optarg, command_line_prio, NULL);
+ language_argmatch (optarg, command_line_prio,
+ command_line_location ());
break;
case 'S':
- skeleton_arg (AS_FILE_NAME (optarg), command_line_prio, NULL);
+ skeleton_arg (AS_FILE_NAME (optarg), command_line_prio,
+ command_line_location ());
break;
case 'T':