mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
s/return (foo)/return foo/
This commit is contained in:
12
ChangeLog
12
ChangeLog
@@ -1,6 +1,16 @@
|
||||
2000-03-31 Akim Demaille <akim@epita.fr>
|
||||
|
||||
Clean the error reporting functions.
|
||||
* allocate.c: s/return (foo)/return foo/.
|
||||
* lalr.c: Likewise.
|
||||
* LR0.c: Likewise.
|
||||
* output.c: Likewise.
|
||||
* reader.c: Likewise.
|
||||
* symtab.c: Likewise.
|
||||
* vmsgetargs.c: Likewise.
|
||||
|
||||
2000-03-31 Akim Demaille <akim@epita.fr>
|
||||
|
||||
Clean up the error reporting functions.
|
||||
|
||||
* src/report.c: New file.
|
||||
* src/report.h: Likewise.
|
||||
|
||||
2
po/de.po
2
po/de.po
@@ -5,7 +5,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bison 1.25\n"
|
||||
"POT-Creation-Date: 2000-03-31 15:40+0200\n"
|
||||
"POT-Creation-Date: 2000-03-31 16:02+0200\n"
|
||||
"PO-Revision-Date: 1996-10-10 17:54 MET DST\n"
|
||||
"Last-Translator: Ulrich Drepper <drepper@gnu.ai.mit.edu>\n"
|
||||
"Language-Team: German <de@li.org>\n"
|
||||
|
||||
2
po/es.po
2
po/es.po
@@ -30,7 +30,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GNU bison 1.25\n"
|
||||
"POT-Creation-Date: 2000-03-31 15:40+0200\n"
|
||||
"POT-Creation-Date: 2000-03-31 16:02+0200\n"
|
||||
"PO-Revision-Date: 1998-09-21 10:19+0200\n"
|
||||
"Last-Translator: Nicolás García-Pedrajas <ngarcia-pedrajas@acm.org>\n"
|
||||
"Language-Team: Spanish <es@li.org>\n"
|
||||
|
||||
2
po/fr.po
2
po/fr.po
@@ -5,7 +5,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bison 1.25\n"
|
||||
"POT-Creation-Date: 2000-03-31 15:40+0200\n"
|
||||
"POT-Creation-Date: 2000-03-31 16:02+0200\n"
|
||||
"PO-Revision-Date: 1996-03-19 20:05 EST\n"
|
||||
"Last-Translator: Dominique Boucher <boucherd@IRO.UMontreal.CA>\n"
|
||||
"Language-Team: French <fr@li.org>\n"
|
||||
|
||||
2
po/nl.po
2
po/nl.po
@@ -5,7 +5,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bison 1.25\n"
|
||||
"POT-Creation-Date: 2000-03-31 15:40+0200\n"
|
||||
"POT-Creation-Date: 2000-03-31 16:02+0200\n"
|
||||
"PO-Revision-Date: 1996-08-27 15:34 MET DST\n"
|
||||
"Last-Translator: Erick Branderhorst <branderh@debian.org>\n"
|
||||
"Language-Team: Dutch <nl@li.org>\n"
|
||||
|
||||
2
po/ru.po
2
po/ru.po
@@ -5,7 +5,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bison 1.25\n"
|
||||
"POT-Creation-Date: 2000-03-31 15:40+0200\n"
|
||||
"POT-Creation-Date: 2000-03-31 16:02+0200\n"
|
||||
"PO-Revision-Date: 1999-07-12 12:18\n"
|
||||
"Last-Translator: Dmitry S. Sivachenko <dima@Chg.RU>\n"
|
||||
"Language-Team: Russian <ru@li.org>\n"
|
||||
|
||||
@@ -353,7 +353,7 @@ get_state (int symbol)
|
||||
state_table[key] = sp = new_state(symbol);
|
||||
}
|
||||
|
||||
return (sp->number);
|
||||
return sp->number;
|
||||
}
|
||||
|
||||
|
||||
@@ -394,7 +394,7 @@ new_state (int symbol)
|
||||
|
||||
nstates++;
|
||||
|
||||
return (p);
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ xmalloc (register unsigned n)
|
||||
done (1);
|
||||
}
|
||||
|
||||
return (block);
|
||||
return block;
|
||||
}
|
||||
|
||||
char *
|
||||
@@ -76,5 +76,5 @@ xrealloc (register char *block, register unsigned n)
|
||||
done (1);
|
||||
}
|
||||
|
||||
return (block);
|
||||
return block;
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ map_goto (int state, int symbol)
|
||||
middle = (low + high) / 2;
|
||||
s = from_state[middle];
|
||||
if (s == state)
|
||||
return (middle);
|
||||
return middle;
|
||||
else if (s < state)
|
||||
low = middle + 1;
|
||||
else
|
||||
@@ -617,7 +617,7 @@ transpose (short **R_arg, int n)
|
||||
|
||||
FREE(temp_R);
|
||||
|
||||
return (new_R);
|
||||
return new_R;
|
||||
}
|
||||
|
||||
|
||||
|
||||
50
src/lex.c
50
src/lex.c
@@ -158,7 +158,7 @@ skip_white_space (void)
|
||||
break;
|
||||
|
||||
default:
|
||||
return (c);
|
||||
return c;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -314,7 +314,7 @@ lex (void)
|
||||
symval = unlexed_symval;
|
||||
c = unlexed;
|
||||
unlexed = -1;
|
||||
return (c);
|
||||
return c;
|
||||
}
|
||||
|
||||
c = skip_white_space();
|
||||
@@ -325,7 +325,7 @@ lex (void)
|
||||
{
|
||||
case EOF:
|
||||
strcpy(token_buffer, "EOF");
|
||||
return (ENDFILE);
|
||||
return ENDFILE;
|
||||
|
||||
case 'A': case 'B': case 'C': case 'D': case 'E':
|
||||
case 'F': case 'G': case 'H': case 'I': case 'J':
|
||||
@@ -353,7 +353,7 @@ lex (void)
|
||||
*p = 0;
|
||||
ungetc(c, finput);
|
||||
symval = getsym(token_buffer);
|
||||
return (IDENTIFIER);
|
||||
return IDENTIFIER;
|
||||
|
||||
case '0': case '1': case '2': case '3': case '4':
|
||||
case '5': case '6': case '7': case '8': case '9':
|
||||
@@ -372,7 +372,7 @@ lex (void)
|
||||
}
|
||||
*p = 0;
|
||||
ungetc(c, finput);
|
||||
return (NUMBER);
|
||||
return NUMBER;
|
||||
}
|
||||
|
||||
case '\'':
|
||||
@@ -405,7 +405,7 @@ lex (void)
|
||||
symval->class = STOKEN;
|
||||
if (! symval->user_token_number)
|
||||
symval->user_token_number = code;
|
||||
return (IDENTIFIER);
|
||||
return IDENTIFIER;
|
||||
}
|
||||
|
||||
case '\"':
|
||||
@@ -427,23 +427,23 @@ lex (void)
|
||||
symval = getsym(token_buffer);
|
||||
symval->class = STOKEN;
|
||||
|
||||
return (IDENTIFIER);
|
||||
return IDENTIFIER;
|
||||
}
|
||||
|
||||
case ',':
|
||||
return (COMMA);
|
||||
return COMMA;
|
||||
|
||||
case ':':
|
||||
return (COLON);
|
||||
return COLON;
|
||||
|
||||
case ';':
|
||||
return (SEMICOLON);
|
||||
return SEMICOLON;
|
||||
|
||||
case '|':
|
||||
return (BAR);
|
||||
return BAR;
|
||||
|
||||
case '{':
|
||||
return (LEFT_CURLY);
|
||||
return LEFT_CURLY;
|
||||
|
||||
case '=':
|
||||
do
|
||||
@@ -456,12 +456,12 @@ lex (void)
|
||||
if (c == '{')
|
||||
{
|
||||
strcpy(token_buffer, "={");
|
||||
return(LEFT_CURLY);
|
||||
return LEFT_CURLY;
|
||||
}
|
||||
else
|
||||
{
|
||||
ungetc(c, finput);
|
||||
return(ILLEGAL);
|
||||
return ILLEGAL;
|
||||
}
|
||||
|
||||
case '<':
|
||||
@@ -485,14 +485,14 @@ lex (void)
|
||||
c = getc(finput);
|
||||
}
|
||||
*p = 0;
|
||||
return (TYPENAME);
|
||||
return TYPENAME;
|
||||
|
||||
|
||||
case '%':
|
||||
return (parse_percent_token());
|
||||
return parse_percent_token();
|
||||
|
||||
default:
|
||||
return (ILLEGAL);
|
||||
return ILLEGAL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -570,28 +570,28 @@ parse_percent_token (void)
|
||||
switch (c)
|
||||
{
|
||||
case '%':
|
||||
return (TWO_PERCENTS);
|
||||
return TWO_PERCENTS;
|
||||
|
||||
case '{':
|
||||
return (PERCENT_LEFT_CURLY);
|
||||
return PERCENT_LEFT_CURLY;
|
||||
|
||||
case '<':
|
||||
return (LEFT);
|
||||
return LEFT;
|
||||
|
||||
case '>':
|
||||
return (RIGHT);
|
||||
return RIGHT;
|
||||
|
||||
case '2':
|
||||
return (NONASSOC);
|
||||
return NONASSOC;
|
||||
|
||||
case '0':
|
||||
return (TOKEN);
|
||||
return TOKEN;
|
||||
|
||||
case '=':
|
||||
return (PREC);
|
||||
return PREC;
|
||||
}
|
||||
if (!isalpha(c))
|
||||
return (ILLEGAL);
|
||||
return ILLEGAL;
|
||||
|
||||
p = token_buffer;
|
||||
*p++ = '%';
|
||||
|
||||
97
src/output.c
97
src/output.c
@@ -656,10 +656,11 @@ output_actions (void)
|
||||
|
||||
|
||||
|
||||
/* figure out the actions for the specified state, indexed by lookahead token type.
|
||||
/* Figure out the actions for the specified state, indexed by
|
||||
lookahead token type.
|
||||
|
||||
The yydefact table is output now. The detailed info
|
||||
is saved for putting into yytable later. */
|
||||
The yydefact table is output now. The detailed info is saved for
|
||||
putting into yytable later. */
|
||||
|
||||
void
|
||||
token_actions (void)
|
||||
@@ -700,16 +701,17 @@ token_actions (void)
|
||||
|
||||
|
||||
|
||||
/* Decide what to do for each type of token if seen as the lookahead token in specified state.
|
||||
The value returned is used as the default action (yydefact) for the state.
|
||||
In addition, actrow is filled with what to do for each kind of token,
|
||||
index by symbol number, with zero meaning do the default action.
|
||||
The value MINSHORT, a very negative number, means this situation
|
||||
is an error. The parser recognizes this value specially.
|
||||
/* Decide what to do for each type of token if seen as the lookahead
|
||||
token in specified state. The value returned is used as the
|
||||
default action (yydefact) for the state. In addition, actrow is
|
||||
filled with what to do for each kind of token, index by symbol
|
||||
number, with zero meaning do the default action. The value
|
||||
MINSHORT, a very negative number, means this situation is an error.
|
||||
The parser recognizes this value specially.
|
||||
|
||||
This is where conflicts are resolved. The loop over lookahead rules
|
||||
considered lower-numbered rules last, and the last rule considered that likes
|
||||
a token gets to handle it. */
|
||||
This is where conflicts are resolved. The loop over lookahead
|
||||
rules considered lower-numbered rules last, and the last rule
|
||||
considered that likes a token gets to handle it. */
|
||||
|
||||
int
|
||||
action_row (int state)
|
||||
@@ -746,7 +748,8 @@ action_row (int state)
|
||||
|
||||
if (nreds >= 1)
|
||||
{
|
||||
/* loop over all the rules available here which require lookahead */
|
||||
/* loop over all the rules available here which require
|
||||
lookahead */
|
||||
m = lookaheads[state];
|
||||
n = lookaheads[state + 1];
|
||||
|
||||
@@ -756,10 +759,12 @@ action_row (int state)
|
||||
wordp = LA + i * tokensetsize;
|
||||
mask = 1;
|
||||
|
||||
/* and find each token which the rule finds acceptable to come next */
|
||||
/* and find each token which the rule finds acceptable
|
||||
to come next */
|
||||
for (j = 0; j < ntokens; j++)
|
||||
{
|
||||
/* and record this rule as the rule to use if that token follows. */
|
||||
/* and record this rule as the rule to use if that
|
||||
token follows. */
|
||||
if (mask & *wordp)
|
||||
actrow[j] = rule;
|
||||
|
||||
@@ -776,8 +781,9 @@ action_row (int state)
|
||||
|
||||
shiftp = shift_table[state];
|
||||
|
||||
/* now see which tokens are allowed for shifts in this state.
|
||||
For them, record the shift as the thing to do. So shift is preferred to reduce. */
|
||||
/* Now see which tokens are allowed for shifts in this state. For
|
||||
them, record the shift as the thing to do. So shift is preferred
|
||||
to reduce. */
|
||||
|
||||
if (shiftp)
|
||||
{
|
||||
@@ -795,16 +801,17 @@ action_row (int state)
|
||||
|
||||
actrow[symbol] = shift_state;
|
||||
|
||||
/* do not use any default reduction if there is a shift for error */
|
||||
|
||||
if (symbol == error_token_number) nodefault = 1;
|
||||
/* Do not use any default reduction if there is a shift for
|
||||
error */
|
||||
if (symbol == error_token_number)
|
||||
nodefault = 1;
|
||||
}
|
||||
}
|
||||
|
||||
errp = err_table[state];
|
||||
|
||||
/* See which tokens are an explicit error in this state
|
||||
(due to %nonassoc). For them, record MINSHORT as the action. */
|
||||
/* See which tokens are an explicit error in this state (due to
|
||||
%nonassoc). For them, record MINSHORT as the action. */
|
||||
|
||||
if (errp)
|
||||
{
|
||||
@@ -817,7 +824,8 @@ action_row (int state)
|
||||
}
|
||||
}
|
||||
|
||||
/* now find the most common reduction and make it the default action for this state. */
|
||||
/* Now find the most common reduction and make it the default action
|
||||
for this state. */
|
||||
|
||||
if (nreds >= 1 && ! nodefault)
|
||||
{
|
||||
@@ -870,7 +878,7 @@ action_row (int state)
|
||||
actrow[j] = 0;
|
||||
}
|
||||
|
||||
return (default_rule);
|
||||
return default_rule;
|
||||
}
|
||||
|
||||
|
||||
@@ -970,7 +978,7 @@ default_goto (int symbol)
|
||||
n = goto_map[symbol + 1];
|
||||
|
||||
if (m == n)
|
||||
return (-1);
|
||||
return -1;
|
||||
|
||||
for (i = 0; i < nstates; i++)
|
||||
state_count[i] = 0;
|
||||
@@ -990,7 +998,7 @@ default_goto (int symbol)
|
||||
}
|
||||
}
|
||||
|
||||
return (default_state);
|
||||
return default_state;
|
||||
}
|
||||
|
||||
|
||||
@@ -1140,7 +1148,7 @@ matching_state (int vector)
|
||||
|
||||
i = order[vector];
|
||||
if (i >= nstates)
|
||||
return (-1);
|
||||
return -1;
|
||||
|
||||
t = tally[i];
|
||||
w = width[i];
|
||||
@@ -1149,7 +1157,7 @@ matching_state (int vector)
|
||||
{
|
||||
j = order[prev];
|
||||
if (width[j] != w || tally[j] != t)
|
||||
return (-1);
|
||||
return -1;
|
||||
|
||||
match = 1;
|
||||
for (k = 0; match && k < t; k++)
|
||||
@@ -1159,10 +1167,10 @@ matching_state (int vector)
|
||||
}
|
||||
|
||||
if (match)
|
||||
return (j);
|
||||
return j;
|
||||
}
|
||||
|
||||
return (-1);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1223,7 +1231,7 @@ pack_vector (int vector)
|
||||
if (loc > high)
|
||||
high = loc;
|
||||
|
||||
return (j);
|
||||
return j;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1455,10 +1463,11 @@ free_itemsets (void)
|
||||
|
||||
FREE(state_table);
|
||||
|
||||
for (cp = first_state; cp; cp = cptmp) {
|
||||
cptmp=cp->next;
|
||||
FREE(cp);
|
||||
}
|
||||
for (cp = first_state; cp; cp = cptmp)
|
||||
{
|
||||
cptmp=cp->next;
|
||||
FREE(cp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1469,10 +1478,11 @@ free_shifts (void)
|
||||
|
||||
FREE(shift_table);
|
||||
|
||||
for (sp = first_shift; sp; sp = sptmp) {
|
||||
sptmp=sp->next;
|
||||
FREE(sp);
|
||||
}
|
||||
for (sp = first_shift; sp; sp = sptmp)
|
||||
{
|
||||
sptmp=sp->next;
|
||||
FREE(sp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1483,8 +1493,9 @@ free_reductions (void)
|
||||
|
||||
FREE(reduction_table);
|
||||
|
||||
for (rp = first_reduction; rp; rp = rptmp) {
|
||||
rptmp=rp->next;
|
||||
FREE(rp);
|
||||
}
|
||||
for (rp = first_reduction; rp; rp = rptmp)
|
||||
{
|
||||
rptmp=rp->next;
|
||||
FREE(rp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1027,7 +1027,7 @@ get_type_name (int n, symbol_list *rule)
|
||||
i++;
|
||||
}
|
||||
|
||||
return (rp->sym->type_name);
|
||||
return rp->sym->type_name;
|
||||
}
|
||||
|
||||
|
||||
@@ -1332,7 +1332,7 @@ gensym (void)
|
||||
sym = getsym(token_buffer);
|
||||
sym->class = SNTERM;
|
||||
sym->value = nvars++;
|
||||
return (sym);
|
||||
return sym;
|
||||
}
|
||||
|
||||
/* Parse the input grammar into a one symbol_list structure.
|
||||
@@ -1685,7 +1685,7 @@ get_type (void)
|
||||
switch (t)
|
||||
{
|
||||
case SEMICOLON:
|
||||
return (lex());
|
||||
return lex();
|
||||
|
||||
case COMMA:
|
||||
break;
|
||||
@@ -1699,7 +1699,7 @@ get_type (void)
|
||||
break;
|
||||
|
||||
default:
|
||||
return (t);
|
||||
return t;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ hash (char *key)
|
||||
while (*cp)
|
||||
k = ((k << 1) ^ (*cp++)) & 0x3fff;
|
||||
|
||||
return (k % TABSIZE);
|
||||
return k % TABSIZE;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ copys (char *s)
|
||||
|
||||
result = xmalloc((unsigned int)i);
|
||||
strcpy(result, s);
|
||||
return (result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ getsym (char *key)
|
||||
symtab[hashval] = bp;
|
||||
}
|
||||
|
||||
return (bp);
|
||||
return bp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ getargs(argc,argv)
|
||||
*/
|
||||
if (cli_present("BISON$FILE_PREFIX"))
|
||||
{
|
||||
cli_get_value("BISON$FILE_PREFIX", file_prefix_spec,
|
||||
cli_get_value("BISON$FILE_PREFIX", file_prefix_spec,
|
||||
sizeof(file_prefix_spec));
|
||||
for (cp = spec_file_prefix = file_prefix_spec; *cp; cp++)
|
||||
if (isupper(*cp))
|
||||
@@ -135,7 +135,7 @@ getargs(argc,argv)
|
||||
*/
|
||||
if (cli_present("BISON$NAME_PREFIX"))
|
||||
{
|
||||
cli_get_value("BISON$NAME_PREFIX", name_prefix_spec,
|
||||
cli_get_value("BISON$NAME_PREFIX", name_prefix_spec,
|
||||
sizeof(name_prefix_spec));
|
||||
for (cp = spec_name_prefix = name_prefix_spec; *cp; cp++)
|
||||
if (isupper(*cp))
|
||||
@@ -156,7 +156,7 @@ cli_present(Name)
|
||||
|
||||
Descr.Ptr = Name;
|
||||
Descr.Size = strlen(Name);
|
||||
return((cli$present(&Descr) & 1) ? 1 : 0);
|
||||
return (cli$present(&Descr) & 1) ? 1 : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -175,7 +175,7 @@ cli_get_value(Name,Buffer,Size)
|
||||
Descr2.Size = Size-1;
|
||||
if (cli$get_value(&Descr1,&Descr2,&Descr2.Size) & 1) {
|
||||
Buffer[Descr2.Size] = 0;
|
||||
return(1);
|
||||
return 1;
|
||||
}
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user