[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bison problems (test suite)
From: |
Boyd Lynn Gerber |
Subject: |
Re: bison problems (test suite) |
Date: |
Mon, 7 Feb 2022 07:25:24 -0700 |
Hello,
Trying to use bison built normally always results in
"bison: input/output error"
So I am trying to add CFLAGS to debug.
Adding to the resulting examples/c/bistromathic/parse.c
#define YYSYMBOL_YYEOF = 0, // END_OF_FILE
#define YYSYMBOL_YYERROR = 1, // error
#define YYSYMBOL_YYUNDEF = 2, // $undefined
#define YYSYMBOL_TEXT = 3, // TEXT
#define YYSYMBOL_NUMBER = 4, // NUMBER
#define YYSYMBOL_YYACCEPT = 5, // $accept
#define YYSYMBOL_result = 6, // result
#define YYSYMBOL_list = 7, // list
#define YYSYMBOL_item = 8 // item
resolves many of the undeclared symbols errors. but I still need to
resolve
make[3]: Entering directory '/home/build/build_bison-3.8.2'
CC examples/c/bistromathic/bistromathic-parse.o
examples/c/bistromathic/parse.c: In function 'yypstate_expected_tokens':
examples/c/bistromathic/parse.c:1180:20: error: 'YYSYMBOL_YYerror'
undeclared (first use in this function); did you mean
'YYSYMBOL_YYEMPTY'?
if (yysym != YYSYMBOL_YYerror && yysym != YYSYMBOL_YYUNDEF)
^~~~~~~~~~~~~~~~
YYSYMBOL_YYEMPTY
examples/c/bistromathic/parse.c:1180:20: note: each undeclared
identifier is reported only once for each function it appears in
examples/c/bistromathic/parse.c: In function 'yypush_parse':
examples/c/bistromathic/parse.c:1532:17: error: 'TOK_YYEOF' undeclared
(first use in this function); did you mean 'TOK_YYEMPTY'?
if (yychar <= TOK_YYEOF)
^~~~~~~~~
TOK_YYEMPTY
examples/c/bistromathic/parse.c:1538:22: error: 'TOK_YYerror' undeclared
(first use in this function); did you mean 'TOK_YYEOF'?
else if (yychar == TOK_YYerror)
^~~~~~~~~~~
TOK_YYEOF
examples/c/bistromathic/parse.c:1544:16: error: 'TOK_YYUNDEF' undeclared
(first use in this function); did you mean 'TOK_YYEOF'?
yychar = TOK_YYUNDEF;
^~~~~~~~~~~
TOK_YYEOF
examples/c/bistromathic/parse.c:1545:17: error: 'YYSYMBOL_YYerror'
undeclared (first use in this function); did you mean
'YYSYMBOL_YYEMPTY'?
yytoken = YYSYMBOL_YYerror;
YYSYMBOL_YYEMPTY
examples/c/bistromathic/parse.c:1628:41: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ printf ("%.10g\n", (yyvsp[0].TOK_exp)); }
^
examples/c/bistromathic/parse.c:1636:29: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ (yyval.TOK_exp) = (yyvsp[0].TOK_VAR)->value.var;
}
^
examples/c/bistromathic/parse.c:1636:50: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_VAR'
{ (yyval.TOK_exp) = (yyvsp[0].TOK_VAR)->value.var;
}
^
examples/c/bistromathic/parse.c:1640:29: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ (yyval.TOK_exp) = (yyvsp[0].TOK_exp);
(yyvsp[-2].TOK_VAR)->value.var = (yyvsp[0].TOK_exp); }
^
examples/c/bistromathic/parse.c:1640:50: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ (yyval.TOK_exp) = (yyvsp[0].TOK_exp);
(yyvsp[-2].TOK_VAR)->value.var = (yyvsp[0].TOK_exp); }
^
examples/c/bistromathic/parse.c:1640:71: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_VAR'
{ (yyval.TOK_exp) = (yyvsp[0].TOK_exp);
(yyvsp[-2].TOK_VAR)->value.var = (yyvsp[0].TOK_exp); }
^
examples/c/bistromathic/parse.c:1640:103: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ (yyval.TOK_exp) = (yyvsp[0].TOK_exp);
(yyvsp[-2].TOK_VAR)->value.var = (yyvsp[0].TOK_exp); }
^
examples/c/bistromathic/parse.c:1644:29: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ (yyval.TOK_exp) = (yyvsp[-3].TOK_FUN)->value.fun
((yyvsp[-1].TOK_exp)); }
^
examples/c/bistromathic/parse.c:1644:51: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_FUN'
{ (yyval.TOK_exp) = (yyvsp[-3].TOK_FUN)->value.fun
((yyvsp[-1].TOK_exp)); }
^
examples/c/bistromathic/parse.c:1644:83: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ (yyval.TOK_exp) = (yyvsp[-3].TOK_FUN)->value.fun
((yyvsp[-1].TOK_exp)); }
^
examples/c/bistromathic/parse.c:1648:29: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
^
examples/c/bistromathic/parse.c:1648:51: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ (yyval.TOK_exp) = (yyvsp[-2].TOK_exp) +
(yyvsp[0].TOK_exp); }
^
examples/c/bistromathic/parse.c:1648:72: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ (yyval.TOK_exp) = (yyvsp[-2].TOK_exp) +
(yyvsp[0].TOK_exp); }
^
examples/c/bistromathic/parse.c:1652:29: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ (yyval.TOK_exp) = (yyvsp[-2].TOK_exp) -
(yyvsp[0].TOK_exp); }
^
examples/c/bistromathic/parse.c:1652:51: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ (yyval.TOK_exp) = (yyvsp[-2].TOK_exp) -
(yyvsp[0].TOK_exp); }
^
examples/c/bistromathic/parse.c:1652:72: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ (yyval.TOK_exp) = (yyvsp[-2].TOK_exp) -
(yyvsp[0].TOK_exp); }
^
examples/c/bistromathic/parse.c:1656:29: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ (yyval.TOK_exp) = (yyvsp[-2].TOK_exp) *
(yyvsp[0].TOK_exp); }
^
examples/c/bistromathic/parse.c:1656:51: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ (yyval.TOK_exp) = (yyvsp[-2].TOK_exp) *
(yyvsp[0].TOK_exp); }
^
examples/c/bistromathic/parse.c:1656:72: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ (yyval.TOK_exp) = (yyvsp[-2].TOK_exp) *
(yyvsp[0].TOK_exp); }
^
examples/c/bistromathic/parse.c:1661:18: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
if ((yyvsp[0].TOK_exp) == 0)
^
examples/c/bistromathic/parse.c:1667:13: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
(yyval.TOK_exp) = (yyvsp[-2].TOK_exp) / (yyvsp[0].TOK_exp);
^
examples/c/bistromathic/parse.c:1667:35: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
(yyval.TOK_exp) = (yyvsp[-2].TOK_exp) / (yyvsp[0].TOK_exp);
^
examples/c/bistromathic/parse.c:1667:56: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
(yyval.TOK_exp) = (yyvsp[-2].TOK_exp) / (yyvsp[0].TOK_exp);
^
examples/c/bistromathic/parse.c:1672:30: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ (yyval.TOK_exp) = -(yyvsp[0].TOK_exp); }
^
examples/c/bistromathic/parse.c:1672:52: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ (yyval.TOK_exp) = -(yyvsp[0].TOK_exp); }
^
examples/c/bistromathic/parse.c:1676:30: error: 'YYSTYPE {aka union
YYSTYPE}' has no memb
er named 'TOK_exp'
{ (yyval.TOK_exp) = pow ((yyvsp[-2].TOK_exp),
(yyvsp[0].TOK_exp));
}
^
examples/c/bistromathic/parse.c:1676:57: error: 'YYSTYPE {aka union
YYSTYPE}' has no memb
er named 'TOK_exp'
{ (yyval.TOK_exp) = pow ((yyvsp[-2].TOK_exp),
(yyvsp[0].TOK_exp));
}
^
examples/c/bistromathic/parse.c:1676:77: error: 'YYSTYPE {aka union
YYSTYPE}' has no memb
er named 'TOK_exp'
{ (yyval.TOK_exp) = pow ((yyvsp[-2].TOK_exp),
(yyvsp[0].TOK_exp));
}
^
examples/c/bistromathic/parse.c:1680:30: error: 'YYSTYPE {aka union
YYSTYPE}' has no memb
er named 'TOK_exp'
{ (yyval.TOK_exp) = (yyvsp[-1].TOK_exp); }
^
examples/c/bistromathic/parse.c:1680:52: error: 'YYSTYPE {aka union
YYSTYPE}' has no memb
er named 'TOK_exp'
{ (yyval.TOK_exp) = (yyvsp[-1].TOK_exp); }
^
examples/c/bistromathic/parse.c:1684:30: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ (yyval.TOK_exp) = 666; }
^
examples/c/bistromathic/parse.c: In function 'init_table':
examples/c/bistromathic/parse.c:1950:43: error: 'TOK_FUN' undeclared
(first use in this function)
symrec *ptr = putsym (funs[i].name, TOK_FUN);
^~~~~~~
examples/c/bistromathic/parse.c: In function 'yylex':
examples/c/bistromathic/parse.c:2029:22: error: 'TOK_PLUS' undeclared
(first use in this function)
case '+': return TOK_PLUS;
^~~~~~~~
examples/c/bistromathic/parse.c:2030:22: error: 'TOK_MINUS' undeclared
(first use in this function); did you mean 'TOK_PLUS'?
case '-': return TOK_MINUS;
^~~~~~~~~
TOK_PLUS
examples/c/bistromathic/parse.c:2031:22: error: 'TOK_STAR' undeclared
(first use in this function); did you mean 'TOK_PLUS'?
case '*': return TOK_STAR;
^~~~~~~~
TOK_PLUS
examples/c/bistromathic/parse.c:2032:22: error: 'TOK_SLASH' undeclared
(first use in this function); did you mean 'TOK_STAR'?
case '/': return TOK_SLASH;
^~~~~~~~~
TOK_STAR
examples/c/bistromathic/parse.c:2033:22: error: 'TOK_CARET' undeclared
(first use in this function); did you mean 'TOK_STAR'?
case '^': return TOK_CARET;
^~~~~~~~~
TOK_STAR
examples/c/bistromathic/parse.c:2034:22: error: 'TOK_EQUAL' undeclared
(first use in this function); did you mean 'TOK_STAR'?
case '=': return TOK_EQUAL;
^~~~~~~~~
TOK_STAR
examples/c/bistromathic/parse.c:2035:22: error: 'TOK_LPAREN' undeclared
(first use in this function); did you mean 'TOK_CARET'?
case '(': return TOK_LPAREN;
^~~~~~~~~~
TOK_CARET
examples/c/bistromathic/parse.c:2036:22: error: 'TOK_RPAREN' undeclared
(first use in this function); did you mean 'TOK_LPAREN'?
case ')': return TOK_RPAREN;
^~~~~~~~~~
TOK_LPAREN
examples/c/bistromathic/parse.c:2038:22: error: 'TOK_YYUNDEF' undeclared
(first use in this function); did you mean 'TOK_YYEMPTY'?
case '!': return TOK_YYUNDEF;
^~~~~~~~~~~
TOK_YYEMPTY
examples/c/bistromathic/parse.c:2040:23: error: 'TOK_YYEOF' undeclared
(first use in this function); did you mean 'TOK_YYUNDEF'?
case '\0': return TOK_YYEOF;
^~~~~~~~~
TOK_YYUNDEF
examples/c/bistromathic/parse.c:2048:48: error: 'YYSTYPE {aka union
YYSTYPE}' has no memb
er named 'TOK_NUM'
if (sscanf (*line - 1, "%lf%n", &yylval->TOK_NUM, &nchars) !=
1)
^~
examples/c/bistromathic/parse.c:2052:16: error: 'TOK_NUM' undeclared
(first use in this f
unction); did you mean 'TOK_MINUS'?
return TOK_NUM;
^~~~~~~
TOK_MINUS
examples/c/bistromathic/parse.c:2070:18: error: 'TOK_EXIT' undeclared
(first use in this
function); did you mean 'TOK_NUM'?
return TOK_EXIT;
^~~~~~~~
TOK_NUM
examples/c/bistromathic/parse.c:2075:32: error: 'TOK_VAR' undeclared
(first use in this f
unction); did you mean 'TOK_STAR'?
s = putsym (buf, TOK_VAR);
^~~~~~~
TOK_STAR
examples/c/bistromathic/parse.c:2076:19: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_VAR'
yylval->TOK_VAR = s;
^~
examples/c/bistromathic/parse.c:2084:14: error: 'TOK_YYerror' undeclared
(first use in this function); did you mean 'TOK_YYEOF'?
return TOK_YYerror;
^~~~~~~~~~~
TOK_YYEOF
examples/c/bistromathic/parse.c: In function 'expected_tokens':
examples/c/bistromathic/parse.c:2252:18: error: 'TOK_YYEOF' undeclared
(first use in this function); did you mean 'TOK_YYEMPTY'?
if (token == TOK_YYEOF)
^~~~~~~~~
TOK_YYEMPTY
examples/c/bistromathic/parse.c: In function 'completion':
examples/c/bistromathic/parse.c:2300:12: error: 'YYSYMBOL_FUN'
undeclared (first use in this function); did you mean 'YYSYMBOL_TEXT'?
case YYSYMBOL_FUN:
^~~~~~~~~~~~
YYSYMBOL_TEXT
examples/c/bistromathic/parse.c:2302:26: error: 'TOK_FUN' undeclared
(first use in this function)
if (s->type == TOK_FUN && strncmp (text, s->name, len) == 0)
^~~~~~~
examples/c/bistromathic/parse.c:2305:12: error: 'YYSYMBOL_VAR'
undeclared (first use in this function); did you mean 'YYSYMBOL_FUN'?
case YYSYMBOL_VAR:
^~~~~~~~~~~~
YYSYMBOL_FUN
examples/c/bistromathic/parse.c:2307:26: error: 'TOK_VAR' undeclared
(first use in this function); did you mean 'TOK_FUN'?
if (s->type == TOK_VAR && strncmp (text, s->name, len) == 0)
^~~~~~~
TOK_FUN
make[3]: *** [Makefile:8621:
examples/c/bistromathic/bistromathic-parse.o] Error 1
On Friday 2022-02-04 07:21, Boyd Lynn Gerber wrote:
On Wednesday 2022-02-02 10:53, Boyd Lynn Gerber wrote:
I need to debug errors with bison on UnixWare 7 Definitive.
without the CFLAGS="-O0 -g"
bison builds but test tests fail with
"bison: input/output error"
trying to debug using this configure
/configure CFLAGS="-O0 -g" --disable-yacc --enable-nls \
--with-libiconv-prefix=/usr/pkg --prefix=/usr/pkg \
--build=i486-unknown-sysv5UnixWare7.1.4 \
--host=i486-unknown-sysv5UnixWare7.1.4 \
--infodir=/usr/pkg/info --mandir=/usr/pkg/man \
--enable-option-checking=yes
I see all these errors.
updating examples/c/bistromathic/parse.output
updating examples/c/bistromathic/parse.h
CC examples/c/bistromathic/bistromathic-parse.o
examples/c/bistromathic/parse.c: In function 'yy_lac':
examples/c/bistromathic/parse.c:1048:18: error: 'YYSYMBOL_YYUNDEF'
undeclared (first use in this function); did you mean 'YYSYMBOL_YYEMPTY'?
if (yytoken == YYSYMBOL_YYUNDEF)
^~~~~~~~~~~~~~~~
YYSYMBOL_YYEMPTY
examples/c/bistromathic/parse.c:1048:18: note: each undeclared identifier
is reported only once for each function it appears in
examples/c/bistromathic/parse.c: In function 'yypstate_expected_tokens':
examples/c/bistromathic/parse.c:1170:20: error: 'YYSYMBOL_YYerror'
undeclared (first use in this function); did you mean 'YYSYMBOL_YYEMPTY'?
if (yysym != YYSYMBOL_YYerror && yysym != YYSYMBOL_YYUNDEF)
^~~~~~~~~~~~~~~~
YYSYMBOL_YYEMPTY
examples/c/bistromathic/parse.c:1170:49: error: 'YYSYMBOL_YYUNDEF'
undeclared (first use in this function); did you mean 'YYSYMBOL_YYerror'?
if (yysym != YYSYMBOL_YYerror && yysym != YYSYMBOL_YYUNDEF)
^~~~~~~~~~~~~~~~
YYSYMBOL_YYerror
examples/c/bistromathic/parse.c: In function 'yypush_parse':
examples/c/bistromathic/parse.c:1522:17: error: 'TOK_YYEOF' undeclared
(first use in this function); did you mean 'TOK_YYEMPTY'?
if (yychar <= TOK_YYEOF)
^~~~~~~~~
TOK_YYEMPTY
examples/c/bistromathic/parse.c:1525:17: error: 'YYSYMBOL_YYEOF' undeclared
(first use in this function); did you mean 'YYSYMBOL_YYEMPTY'?
yytoken = YYSYMBOL_YYEOF;
^~~~~~~~~~~~~~
YYSYMBOL_YYEMPTY
examples/c/bistromathic/parse.c:1528:22: error: 'TOK_YYerror' undeclared
(first use in this function); did you mean 'TOK_YYEOF'?
else if (yychar == TOK_YYerror)
^~~~~~~~~~~
TOK_YYEOF
examples/c/bistromathic/parse.c:1534:16: error: 'TOK_YYUNDEF' undeclared
(first use in this function); did you mean 'TOK_YYEOF'?
yychar = TOK_YYUNDEF;
^~~~~~~~~~~
TOK_YYEOF
examples/c/bistromathic/parse.c:1535:17: error: 'YYSYMBOL_YYerror'
undeclared (first use in this function); did you mean 'YYSYMBOL_YYEOF'?
yytoken = YYSYMBOL_YYerror;
^~~~~~~~~~~~~~~~
YYSYMBOL_YYEOF
examples/c/bistromathic/parse.c:437:6: error: 'YYSYMBOL_YYUNDEF' undeclared
(first use in this function); did you mean 'YYSYMBOL_YYEOF'?
: YYSYMBOL_YYUNDEF)
^
examples/c/bistromathic/parse.c:1541:17: note: in expansion of macro
'YYTRANSLATE'
yytoken = YYTRANSLATE (yychar);
^~~~~~~~~~~
examples/c/bistromathic/parse.c:1618:41: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ printf ("%.10g\n", (yyvsp[0].TOK_exp)); }
^
examples/c/bistromathic/parse.c:1626:29: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ (yyval.TOK_exp) = (yyvsp[0].TOK_VAR)->value.var; }
^
examples/c/bistromathic/parse.c:1626:50: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_VAR'
{ (yyval.TOK_exp) = (yyvsp[0].TOK_VAR)->value.var; }
^
examples/c/bistromathic/parse.c:1630:29: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ (yyval.TOK_exp) = (yyvsp[0].TOK_exp);
(yyvsp[-2].TOK_VAR)->value.var = (yyvsp[0].TOK_exp); }
^
examples/c/bistromathic/parse.c:1630:50: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_exp'
{ (yyval.TOK_exp) = (yyvsp[0].TOK_exp);
(yyvsp[-2].TOK_VAR)->value.var = (yyvsp[0].TOK_exp); }
^
examples/c/bistromathic/parse.c:1630:71: error: 'YYSTYPE {aka union
YYSTYPE}' has no member named 'TOK_VAR'
{ (yyval.TOK_exp) = (yyvsp[0].TOK_exp); ...
examples/c/bistromathic/parse.c:2292:26: error: 'TOK_FUN' undeclared (first
use in this f
unction)
if (s->type == TOK_FUN && strncmp (text, s->name, len) == 0)
^~~~~~~
examples/c/bistromathic/parse.c:2295:12: error: 'YYSYMBOL_VAR' undeclared
(first use in t
his function); did you mean 'YYSYMBOL_FUN'?
case YYSYMBOL_VAR:
^~~~~~~~~~~~
YYSYMBOL_FUN
examples/c/bistromathic/parse.c:2297:26: error: 'TOK_VAR' undeclared (first
use in this function); did you mean 'TOK_FUN'?
if (s->type == TOK_VAR && strncmp (text, s->name, len) == 0)
^~~~~~~
TOK_FUN
These errors were introduced with
2020-04-10 Akim Demaille <akim.demaille@gmail.com>
c++: improvements on symbol kinds
Instead of
/// (Internal) symbol kind.
enum symbol_kind_type
{
YYNTOKENS = 5, ///< Number of tokens.
YYSYMBOL_YYEMPTY = -2,
YYSYMBOL_YYEOF = 0, // END_OF_FILE
YYSYMBOL_YYERROR = 1, // error
YYSYMBOL_YYUNDEF = 2, // $undefined
YYSYMBOL_TEXT = 3, // TEXT
YYSYMBOL_NUMBER = 4, // NUMBER
YYSYMBOL_YYACCEPT = 5, // $accept
YYSYMBOL_result = 6, // result
YYSYMBOL_list = 7, // list
YYSYMBOL_item = 8 // item
};
generate
/// Symbol kinds.
struct symbol_kind
{
enum symbol_kind_type
{
YYNTOKENS = 5, ///< Number of tokens.
S_YYEMPTY = -2,
S_YYEOF = 0, // END_OF_FILE
S_YYERROR = 1, // error
S_YYUNDEF = 2, // $undefined
S_TEXT = 3, // TEXT
S_NUMBER = 4, // NUMBER
S_YYACCEPT = 5, // $accept
S_result = 6, // result
S_list = 7, // list
S_item = 8 // item
};
};
Regards,
--
Boyd Gerber <gerberb@zenez.com> 801 849-0213
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047