| Commit message (Collapse) | Author | Age |
| |
|
|\
| |
| |
| |
| |
| | |
version 2.6.4
Signed-off-by: Manoj Srivastava <srivasta@debian.org>
|
| | |
|
| |
| |
| |
| |
| | |
The user may have defined the yy_* macros themselves. In that case,
don't clobber them.
|
| |
| |
| |
| |
| |
| |
| | |
This allowed unnamespaced definitions to leak into header files,
breaking client code.
Fixes #142
|
| |
| |
| |
| |
| | |
This can happen in the case of // comments (which Flex doesn't handle
specially).
|
| |
| |
| |
| |
| | |
This really should never happen, but this at least fixes the
breakage on Verilator.
|
| |
| |
| |
| |
| |
| | |
Since the comments in flex.skl are, by hypothesis, not needed in
skel.c, we remove them. THis reduces the size of the resulting
executable somewhat.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Don't call isascii() here. It's deprecated in POSIX and not needed
for myesc's case.
* The check of the character class and range here should match what's
defined as {ESCSEQ} in scan.l, so for [[:xdigit:]] we use isxdigit();
for [0-7] we check '0' <= c <= '7' (not isdigit(c) because isdigit is
locale-dependant in standard's sense)
* Add missing length limit for "\x<hex>" (<hex> is at most 2 digits)
|
| |
| |
| |
| |
| | |
No sense to keep these two function when libc's strtoul() can do the
same job, but better.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Check for cross compiling. If cross compiling, build stage1flex using a
custom link command.
We also override LDADD since that adds the replacement implementations
that are cross compiled, and instead always use the replacement library
implementations.
We don't use BUILD_OBJEXT and BUILD_EXEEXT since it seems that automake
does not support these.
Fixes #78.
|
| |
| |
| |
| |
| |
| | |
strings.h (not string.h) is the standard-defined include header for
strcasecmp(). Include <strings.h> for portability (even though glibc
exposes strcasecmp() declaration also in <string.h> by default).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`configure` will now error if a required header or function is not
found on the system.
Also add comments on optional functions checks.
Add sys/stats.h and sys/wait.h to list of required headers in
configure.
This fixes issue #180.
|
| |
| |
| |
| |
| |
| | |
Replace the naive "for" loop in determining power of two with a clever
bitwise solution. This code is around the Internet already and is in
Public Domain.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Revert change to copy scan.c when building the distribution
archive. Move it instead. This satisfies automake's notions of what
should be clean and ensures that the distribution archive contains a
just-built copy of scan.c.
Fixes #186
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This will ensure the flex scanner included in release tarball being
generated by exactly the flex version to be released.
Here's one catch after this change: You may not run "make dist" or
"make distdir" if you configure the flex source to be cross-compiled.
|
| |
| |
| |
| |
| | |
Makefile shouldn't overwrite the 'localedir' variable, because that's
what '--localedir' option in 'configure' is for.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Revert commit e02c3d27eeb6b53ec82532ab080c23ce26813fd4
("include the intl/ subdirectory when searching for include files")
Flex doesn't come with libintl source code, so inclusion of
$(top_srcdir)/intl subdirectory during compiling is unnecessary.
This flag seems to be left after "remove intl from dist"
(commit 8f45da06adbd7dbcdfdbdd5c20ff4c47fc504f35) without someone
cleaning this up.
Users who need to build with gettext functionality from libintl would
use the '--with-libintl-prefix' configure option.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fix unneeded double malloc - let regerror(). Write its message after
our "regcomp for (regex) failed: " string.
Also, errbuf cannot be free()'d because of flexfatal containing a
longjmp.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The current clauses stating "main.c: parse.h" and "yylex.c: parse.h" do
not work as expected. Make did not try to build parse.h upon building
flex-main.o as it would think main.c exist already and ignore the
clause. Fix this by explicitly stating that the .o files depend on
parse.h instead.
This dependency bug only happens if user builds flex from a
checked-out repository.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use reallocarray() when we have it (i.e. in OpenBSD system). When we
don't, use equivalent overflow detection for our allocate_array and
reallocate_array functions.
Remove lib/reallocarray.c from our LIBOBJS as we no longer need it.
Provide a fallback SIZE_MAX macro definition in flexint.h (not
preprocessor friendly, but enough for our reallocate_array use case).
|
| |
| |
| |
| |
| |
| | |
BSD make doesn't like $< with more than one source
specified. Additionally, make sure to specify srcdir when referring to
source files since vpath builds depend on this.
|
| | |
|
| |
| |
| |
| |
| | |
Fix the reentrant part; don't "#define yyfoo yyfoo" because it breaks
code that does #ifndef yywrap ..
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Avoid alloca() for SSP; it is better anyway; since we don't need to
strdup the path.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Fixes regression introduced in v2.6.3.
|
| | |
|
| |
| |
| |
| | |
This avoids a naming conflict in NetBSD's libc.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This 'make indent' target has not been working since the directories
reorganization in flex 2.6.0. Now make it work again.
Note that the current indent profile breaks many styles of existing
code. The indent target should not be used until the .indent.pro
options are reviewed for desireability.
|
| |
| |
| |
| |
| |
| | |
One place emitting a #line directive to the generated header was
missed in commit 647a92b9f4 when resolving #55. Fix it to respect
gen_line_dirs as well.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Binding a reference to a dereferenced null pointer is invalid and
compilers optimise away the &file == 0 check. We need a real stream.
yyin is available already, and yyrestart(NULL) is only supported when
yyin will not be used, so there is no harm in just passing in that.
Since we now always have a valid stream, we can skip the null check
too.
Fixes #98.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Removed a newline that caused a problem building the scanner in some
circumstances. Specifically:
'bad character' error when executing
/bin/sh ../build-aux/ylwrap scan.l lex.yy.c scan.c -- flex
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If configure is run with '--disable-bootstrap', then stage1flex won't
be built and stage1scan.c will be generated by sed'ing scan.c.
This option is intended to workaround bootstrap bugs rather than to
fix the bootstrapping issues which are proving subtler and harder to
fix than anyone would like.
|
| | |
|
| |
| |
| |
| |
| |
| | |
For various reasons, we may wish to build libfl explicitly even when
configure has been run with the --disable-libfl option. This is
possible, now, via 'make -C src libfl.la'.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Flex did not check the length of the m4 path which could lead to a
buffer overflow in some cases. Additionally, not all platforms believe
in PATH_MAX, so stop relying on it.
Fixes #138
|
| |
| |
| |
| |
| |
| | |
The libcompat.la library was small and less friendly to bootstrapping
and cross compilation. Now, we will simply link individual object
files as needed, which is simpler.
|
| | |
|