FLEX, was Re: Return value of malloc(0)
- From: "Randall Hyde" <randyhyde@xxxxxxxxxxxxx>
- Date: Wed, 28 Jun 2006 22:40:45 -0700
Without seeing the code or the actual error message, I'm
guessing the answer is 42. Perhaps, some detail might
be appropriate.
I seriously doubt seeing the code will do much good.
Here's the offending line:
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
yy_n_chars, num_to_read );
This is from
static int yy_get_next_buffer()
Which is part of the canned code that comes with FLEX.
Compiles just fine under Linux. Linux has a slightly newer version of GCC,
but I've been compiling this code on Windows (Borland and VC++) as well as
Linux for years without a problem (i.e., older versions of GCC).
BTW, if anyone is intrested in the full FLEX source, it's part of the HLA
(High Level Assembler) source package found here:
http://webster.cs.ucr.edu/AsmTools/HLA/HLAv1.84/hlasrc.zip
I compiled the FLEX code with the command line:
flex -8 -i hla.flx
This works fine, then I compile the GCC output with
gcc -DfreeBSD -c -o lex.yy.o lex.yy.c
and it stops with "syntax error before numeric constant".
As this code is in part of the FLEX-supplied C code, I would think that this
problem would be independent of my particular flex code. BTW, I've tried
using both the FLEX I use on Linux under BSD as well as the BSD-supplied
version. I've even taken the FLEX output from freeBSD and compiled it under
Linux (it compiles successfully.
I'm using GCC 3.3.5 under Linux, 3.4.4 under BSD. Any known problems with
3.4.4 that would cause this?
cheers,
Randy Hyde
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: FLEX, was Re: Return value of malloc(0)
- From: Thomas David Rivers
- Re: FLEX, was Re: Return value of malloc(0)
- From: Peter Jeremy
- Re: FLEX, was Re: Return value of malloc(0)
- From: Steve Kargl
- Re: FLEX, was Re: Return value of malloc(0)
- References:
- Return value of malloc(0)
- From: Andre Albsmeier
- Re: Return value of malloc(0)
- From: Lowell Gilbert
- Re: Return value of malloc(0)
- From: Randall Hyde
- Re: Return value of malloc(0)
- From: Steve Kargl
- Return value of malloc(0)
- Prev by Date: Re: Return value of malloc(0)
- Next by Date: Re: Return value of malloc(0)
- Previous by thread: Re: Return value of malloc(0)
- Next by thread: Re: FLEX, was Re: Return value of malloc(0)
- Index(es):
Relevant Pages
|