[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bison 1.49a released
From: |
Akim Demaille |
Subject: |
Re: Bison 1.49a released |
Date: |
03 Jun 2002 09:30:02 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter) |
| - File muscle_tab.c, lines 75, 91:
| Error : illegal constant expression
| muscle_tab.c line muscle_entry_t pair = { key, NULL };
| I don't think is (pre-C99 at least) ISO C. I think you have to write
| muscle_entry_t pair = { NULL, NULL };
| ...
| pair.key = key;
Thanks, done.
| - File "output.c": Should probably
| #include "muscle_tab.h"
| somewhere.
It does in CVS.
| - Same file, some syntactic errors:
| Error : undefined identifier 'PKGDATADIR'
| output.c line 1041 bison_pkgdatadir = PKGDATADIR;
Defined in config.h.
| Error : undefined identifier 'skel_in'
| output.c line 1046 skel_in = readpipe (m4,
Defined in scan-skel.l.
| Error : undefined identifier 'skel_in'
| output.c line 1052 if (!skel_in)
|
| Error : function has no prototype
| output.c line 1054 skel_lex ();
Prototyped in CVS.
| PKGDATADIR is perhaps written by config, which my system does not invoke
| (it's not in config.hin, though). For readpipe(), skel_in & skel_lex(),
| perhaps you compile with some C option on, not checking that labels are
| defined, or "output.c" should include "scan-skel.c" or something (or write
| a header "scan-skel.h" and compile "scan-skel.c" separately).
|
| - File scan-skel.c:
| Error : undefined identifier 'EINTR'
| line 985 num_to_read, skel_in))==0 && ((skel_in)->state.error)) { if(
| errno != EINTR) { yy_fatal_error( "input in flex scanner fail
|
| This means that your Flex file does not #include "errno.h" as it should.
It is included.
| Error : function has no prototype
| scan-skel.c line 1344 b->yy_is_interactive = file ? (isatty( fileno(file)
| ) > 0) : 0;
|
| I think that this error happens, because you have not set
| YY_NEVER_INTERACTIVE; then,
So you did read the sources and missed errno.h?
| I do not have fileno() on my system,
Really!?!
| causing
| the error. But an interactive scanner is much slower than one that is not,
| I recall, so it should probably be changed anyhow.
Thanks, I'm applying this patch:
Index: ChangeLog
from Akim Demaille <address@hidden>
* src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
structs with non literals.
* src/scan-skel.l: never-interactive.
* src/conflicts.c (enum conflict_resolution_e): No trailing
comma.
* src/getargs.c (usage): Split long literal strings.
Reported by Hans Aberg.
Index: src/conflicts.c
===================================================================
RCS file: /cvsroot/bison/bison/src/conflicts.c,v
retrieving revision 1.77
diff -u -u -r1.77 conflicts.c
--- src/conflicts.c 27 May 2002 20:55:43 -0000 1.77
+++ src/conflicts.c 3 Jun 2002 07:29:36 -0000
@@ -48,7 +48,7 @@
reduce_resolution,
left_resolution,
right_resolution,
- nonassoc_resolution,
+ nonassoc_resolution
};
Index: src/getargs.c
===================================================================
RCS file: /cvsroot/bison/bison/src/getargs.c,v
retrieving revision 1.36
diff -u -u -r1.36 getargs.c
--- src/getargs.c 26 May 2002 20:25:52 -0000 1.36
+++ src/getargs.c 3 Jun 2002 07:29:37 -0000
@@ -137,7 +137,10 @@
-b, --file-prefix=PREFIX specify a PREFIX for output files\n\
-o, --output=FILE leave output to FILE\n\
-g, --graph also produce a VCG description of the automaton\n\
-\n\
+"), stream);
+ putc ('\n', stream);
+
+ fputs (_("\
THINGS is a list of comma separated words that can include:\n\
`state' describe the states\n\
`itemset' complete the core item sets with their closure\n\
Index: src/muscle_tab.c
===================================================================
RCS file: /cvsroot/bison/bison/src/muscle_tab.c,v
retrieving revision 1.16
diff -u -u -r1.16 muscle_tab.c
--- src/muscle_tab.c 6 May 2002 08:23:54 -0000 1.16
+++ src/muscle_tab.c 3 Jun 2002 07:29:37 -0000
@@ -72,7 +72,8 @@
void
muscle_insert (const char *key, const char *value)
{
- muscle_entry_t pair = { key, NULL };
+ muscle_entry_t pair;
+ pair.key = key;
muscle_entry_t *entry = hash_lookup (muscle_table, &pair);
if (!entry)
@@ -88,7 +89,8 @@
const char*
muscle_find (const char *key)
{
- muscle_entry_t pair = { key, NULL };
+ muscle_entry_t pair;
+ pair.key = key;
muscle_entry_t *result = hash_lookup (muscle_table, &pair);
return result ? result->value : NULL;
}
Index: src/scan-skel.l
===================================================================
RCS file: /cvsroot/bison/bison/src/scan-skel.l,v
retrieving revision 1.10
diff -u -u -r1.10 scan-skel.l
--- src/scan-skel.l 13 May 2002 00:44:52 -0000 1.10
+++ src/scan-skel.l 3 Jun 2002 07:29:37 -0000
@@ -18,7 +18,7 @@
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-%option nodefault noyywrap nounput
+%option nodefault noyywrap nounput never-interactive
%option prefix="skel_" outfile="lex.yy.c"
%{