]> granicus.if.org Git - flex/log
flex
7 years agodoc: document NetBSD build crash fix
Will Estes [Fri, 19 May 2017 12:05:51 +0000 (08:05 -0400)]
doc: document NetBSD build crash fix

7 years agobuild: remove automake check-news
Will Estes [Fri, 19 May 2017 12:03:48 +0000 (08:03 -0400)]
build: remove automake check-news

7 years agoscanner: Use reallocarr() when available.
Thomas Klausner [Fri, 19 May 2017 08:22:44 +0000 (10:22 +0200)]
scanner: Use reallocarr() when available.

NetBSD had a crash during build. Since the provided substitute for
reallocarray() wasn't working, use NetBSD's reallocarr(). Let
configure choose that function whenever it is available. Use
reallocarray if available. Still fallback if neither is available.

Fixes #219

7 years agodoc: list line number directives in NEWS
Will Estes [Sun, 14 May 2017 11:15:36 +0000 (07:15 -0400)]
doc: list line number directives in NEWS

7 years agofilter: Output correct #line value for current file.
Jeff Smith [Sat, 1 Apr 2017 06:18:12 +0000 (01:18 -0500)]
filter: Output correct #line value for current file.

A #line pre-processor directive specifies the line number and source
file of the following lines. If the source file _is_ the current file,
the line number should be that of the line following the directive. So
the specified line number should be the current line number plus 1.

7 years agoscanner: corrected typo
Will Estes [Sat, 13 May 2017 21:24:55 +0000 (17:24 -0400)]
scanner: corrected typo

7 years agodoc: noyyget/set_column options documented
Will Estes [Sat, 13 May 2017 21:23:18 +0000 (17:23 -0400)]
doc: noyyget/set_column options documented

7 years agoscanner: finish support for noyy{get,set}_column.
Will Estes [Sat, 13 May 2017 19:15:45 +0000 (15:15 -0400)]
scanner: finish support for noyy{get,set}_column.

Unattributed patch carried over from sourceforge bug tracker.

7 years agobuild: .mailmap for cleaning up shortlog
Will Estes [Sat, 13 May 2017 18:24:17 +0000 (14:24 -0400)]
build: .mailmap for cleaning up shortlog

7 years agotest: rename some files for non-case-sensitive filesystems.
Hans-Bernhard Broeker [Sat, 6 May 2017 22:17:33 +0000 (00:17 +0200)]
test: rename some files for non-case-sensitive filesystems.

-C*f and -C*F option-specific test files collide on case-insensitive
file systems, and cause tests to either not be run at all, or to
overwrite each other's files at build time.  So rename -C*F ones to
-C*_F.

7 years agobuild: 2.6.4 is previous version
Will Estes [Sun, 7 May 2017 00:26:28 +0000 (20:26 -0400)]
build: 2.6.4 is previous version

7 years agobuild: ignore .sig files.
Will Estes [Sat, 6 May 2017 20:54:54 +0000 (16:54 -0400)]
build: ignore .sig files.

We generate gpg signatures in place for releases. Since these should
not be tracked in the flex repo itself, we tell git to ignore them.

7 years agobuild: no longer ignore *.tar.bz2
Will Estes [Sat, 6 May 2017 20:53:14 +0000 (16:53 -0400)]
build: no longer ignore *.tar.bz2

Since we no longer generate *.tar.bz2 archives, we do not need to tell
git to ignore them.

7 years agogettext: pulled latest translations; recompiled against current sources v2.6.4
Will Estes [Sat, 6 May 2017 19:10:08 +0000 (15:10 -0400)]
gettext: pulled latest translations; recompiled against current sources

7 years agoversion 2.6.4
Will Estes [Sat, 6 May 2017 17:06:59 +0000 (13:06 -0400)]
version 2.6.4

* NEWS: Record release date.

7 years agonote previous version
Will Estes [Sat, 6 May 2017 16:58:44 +0000 (12:58 -0400)]
note previous version

7 years agodoc: update NEWS for upcoming release
Will Estes [Sat, 6 May 2017 16:57:58 +0000 (12:57 -0400)]
doc: update NEWS for upcoming release

7 years agodoc: Correct typo in C code sample in manual
viktor.shepel [Thu, 4 May 2017 11:55:27 +0000 (14:55 +0300)]
doc: Correct typo in C code sample in manual

7 years agoscanner: Mention %# comments are removed when building skel.c
Explorer09 [Thu, 4 May 2017 02:52:37 +0000 (10:52 +0800)]
scanner: Mention %# comments are removed when building skel.c

7 years agoHonor user definitions of yy_* macros
Demi Obenour [Wed, 3 May 2017 00:05:14 +0000 (20:05 -0400)]
Honor user definitions of yy_* macros

The user may have defined the yy_* macros themselves.  In that case,
don't clobber them.

7 years agoDon't leak macro definitions into header files
Demi Obenour [Tue, 2 May 2017 23:18:14 +0000 (19:18 -0400)]
Don't leak macro definitions into header files

This allowed unnamespaced definitions to leak into header files,
breaking client code.

Fixes #142

7 years agoscanner: Check for 0 bracecount when EOL ends quoted literal.
Demi Obenour [Wed, 3 May 2017 17:45:11 +0000 (13:45 -0400)]
scanner: Check for 0 bracecount when EOL ends quoted literal.

This can happen in the case of // comments (which Flex doesn't handle
specially).

7 years agoscanner: when bracelevel is negative, treat as zero.
Demi Obenour [Wed, 3 May 2017 13:34:34 +0000 (09:34 -0400)]
scanner: when bracelevel is negative, treat as zero.

This really should never happen, but this at least fixes the
breakage on Verilator.

7 years agotest: enable more silent building of tests.
Jeff Smith [Sun, 2 Apr 2017 22:44:29 +0000 (17:44 -0500)]
test: enable more silent building of tests.

When running 'make V=0 check', some compile and link steps are made
less verbose and some are not.  This cleans up most steps that are
not.

These have no effect if V=0 is not specified.

7 years agobuild: Delete comments from skeleton file.
Demi Obenour [Wed, 3 May 2017 14:29:01 +0000 (10:29 -0400)]
build: Delete comments from skeleton file.

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.

7 years agobuild: do not generate lib/Makefile.in.
Explorer09 [Wed, 3 May 2017 03:48:06 +0000 (11:48 +0800)]
build: do not generate lib/Makefile.in.

Files in lib/ are picked up and built using makefile directives in
src/Makefile.am. Remove the need to generate lib/Makefile.in and the
stub lib/Makefile.am.

7 years agogettext: revert listing generated .c files
Will Estes [Wed, 3 May 2017 00:39:15 +0000 (20:39 -0400)]
gettext: revert listing generated .c files

7 years agoFLEX_EXIT() is the preferred way to exit flex
Jeff Smith [Mon, 10 Apr 2017 15:01:36 +0000 (10:01 -0500)]
FLEX_EXIT() is the preferred way to exit flex

7 years agoFix myesc() 'sptr' conditionals
Explorer09 [Mon, 10 Apr 2017 18:16:22 +0000 (02:16 +0800)]
Fix myesc() 'sptr' conditionals

* 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)

7 years agoObsolete htoui() and otoui(); use strtoul().
Explorer09 [Mon, 10 Apr 2017 18:10:29 +0000 (02:10 +0800)]
Obsolete htoui() and otoui(); use strtoul().

No sense to keep these two function when libc's strtoul() can do the
same job, but better.

7 years agoscanner: update yy_buf_size after yyrealloc()
Todd C. Miller [Wed, 12 Apr 2017 15:38:29 +0000 (09:38 -0600)]
scanner: update yy_buf_size after yyrealloc()

7 years agobuild: use lowest versions for gettext, automake.
Simon Sobisch [Tue, 2 May 2017 15:38:16 +0000 (17:38 +0200)]
build: use lowest versions for gettext, automake.

7 years agogettext: more recent makevars; new script to update po files.
Simon Sobisch [Tue, 2 May 2017 15:26:07 +0000 (17:26 +0200)]
gettext: more recent makevars; new script to update po files.

Previously, "make dist" and similar commands would cause the po files
to be updated, which is incorrect. The more recent version now used
should not do this.

Replaced Rules-getpo by extra script to manually update and rebuild all po files.

7 years agogettext: list generated files instead of flex, bison sources in POTFILES.in.
Simon Sobisch [Tue, 2 May 2017 15:15:45 +0000 (17:15 +0200)]
gettext: list generated files instead of flex, bison sources in POTFILES.in.

Listing the flex and bison sources -- as the gettext manual suggests
-- causes warnings. Listing the generated C files for the lexer and
parser removes the warnings. Since both files contain line directives,
any translator who needs to refer back to those files should be able
to find the context in which strings are needed.

7 years agobuild: only touch ChangeLog if it does not exist
Simon Sobisch [Tue, 2 May 2017 16:07:27 +0000 (18:07 +0200)]
build: only touch ChangeLog if it does not exist

7 years agobuild: list earliest useable versions for automake
Simon Sobisch [Tue, 2 May 2017 10:30:28 +0000 (12:30 +0200)]
build: list earliest useable versions for automake

7 years agobuild: check for how to call libtoolize.
Simon Sobisch [Tue, 2 May 2017 10:04:00 +0000 (12:04 +0200)]
build: check for how to call libtoolize.

Previously, we would call libtoolize and if that failed, we would call
glibtoolize since some platforms have the libtoolize program under
that name.

Instead, we check to see if the environment variable LIBTOOLIZE is set
and use that if so. Otherwise, we try to find a program "libtoolize"
on the path and failing that glibtoolize. We alert the user if no
suitable program can be found.

7 years agobuild: support cross compiling.
Alastair Hughes [Fri, 6 Jan 2017 06:06:03 +0000 (19:06 +1300)]
build: support cross compiling.

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.

7 years agobuild: Include <strings.h>; add strcasecmp() check to configure.
Explorer09 [Fri, 17 Feb 2017 15:19:10 +0000 (23:19 +0800)]
build: Include <strings.h>; add strcasecmp() check to configure.

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).

7 years agobuild: Let configure error if missing required functions, headers..
Explorer09 [Fri, 17 Feb 2017 15:17:23 +0000 (23:17 +0800)]
build: Let configure error if missing required functions, headers..

`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.

7 years agoscanner: compute powers of two faster.
Explorer09 [Sun, 12 Feb 2017 11:59:52 +0000 (19:59 +0800)]
scanner: compute powers of two faster.

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.

7 years agotest: skip pthread test when needed files missing.
Explorer09 [Tue, 7 Feb 2017 13:14:04 +0000 (21:14 +0800)]
test: skip pthread test when needed files missing.

"Unlisting" the pthread test when libpthread is not available is never
a good idea. Should let it compile into a stub program that returns
the "skip" status.

configure.ac and tests/Makefile.am are edited so that pthread test can
be built anyway, but only works (not as the stub) when both pthread.h
and libpthread are detected on the system.

Also fix a small typo in tests/pthread.l comments.

7 years agobuild: mv scan.c when building dist.
Will Estes [Thu, 16 Feb 2017 14:27:22 +0000 (09:27 -0500)]
build: mv scan.c when building dist.

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

7 years agobuild: don't assume distdir/scan.c is writeable
Will Estes [Mon, 6 Feb 2017 17:04:03 +0000 (12:04 -0500)]
build: don't assume distdir/scan.c is writeable

7 years agobuild: Add dist-hook to force remake scan.c.
Explorer09 [Mon, 2 Jan 2017 12:10:58 +0000 (20:10 +0800)]
build: Add dist-hook to force remake scan.c.

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.

7 years agobuild: respect '--localedir' from configure.
Explorer09 [Mon, 2 Jan 2017 10:10:37 +0000 (18:10 +0800)]
build: respect '--localedir' from configure.

Makefile shouldn't overwrite the 'localedir' variable, because that's
what '--localedir' option in 'configure' is for.

7 years agobuild: Remove "-I$(top_srcdir)/intl" from CPPFLAGS.
Explorer09 [Mon, 2 Jan 2017 08:13:42 +0000 (16:13 +0800)]
build: Remove "-I$(top_srcdir)/intl" from CPPFLAGS.

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.

7 years agoscanner: fix regcomp's error reporting, double malloc.
Explorer09 [Fri, 3 Feb 2017 12:53:24 +0000 (20:53 +0800)]
scanner: fix regcomp's error reporting, double malloc.

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.

7 years agotest: Skip bison tests if bison is not available
Explorer09 [Tue, 3 Jan 2017 12:44:59 +0000 (20:44 +0800)]
test: Skip bison tests if bison is not available

7 years agobuild: remove repeated bison detection from configure.
Explorer09 [Tue, 3 Jan 2017 12:44:17 +0000 (20:44 +0800)]
build: remove repeated bison detection from configure.

AC_PROG_YACC already detects the bison program. We can just use it,
and make notice if [ $YACC != 'bison -y' ]

Remove unused AC_SUBST([BISON], ...).

Add AM_CONDITIONAL([HAVE_BISON], ...) so that we can skip bison tests
in testsuite when bison is absent.

We don't make any attempt to detect other yacc implementations since
flex is developed with bison. While it would be possible, the need
isn't there right now. It would be possible to add a --with-parser
option that defaulted to bison if such a need cropped up.

7 years agobuild: fix Makefile parse.h dependency clauses.
Explorer09 [Sun, 1 Jan 2017 07:41:29 +0000 (15:41 +0800)]
build: fix Makefile parse.h dependency clauses.

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.

7 years agotest: Remake *_scanner.c if *_scanner.h is missing.
Explorer09 [Tue, 3 Jan 2017 12:42:49 +0000 (20:42 +0800)]
test: Remake *_scanner.c if *_scanner.h is missing.

If a ${foo}_scanner.c exists but the respective ${foo}_scanner.h is
missing, then 'make' can halt. Fix this by deleting the
${foo}_scanner.c file and then remake it. This rule is the same as the
automake-generated rule for .c files that require LEX or YACC (except
automake will use ylwrap).

7 years agotest: remove BUILT_SOURCES; add missing dependencies.
Explorer09 [Sat, 31 Dec 2016 07:12:29 +0000 (15:12 +0800)]
test: remove BUILT_SOURCES; add missing dependencies.

Without BUILT_SOURCES in Makefile, no test sources in tests/ will be
built when using the default "make all" target. This is desireable for
people who are just building flex but who do not want to run, and
therefore, build any part of the test suite.

Also fix missing sources dependencies:

    bison_nr_scanner.$(OBJEXT): bison_nr_parser.h
    bison_yylloc_scanner.$(OBJEXT): bison_yylloc_parser.h
    bison_yylval_scanner.$(OBJEXT): bison_yylval_parser.h

7 years agobuild: detect overflow for [re]allocate_array.
Explorer09 [Thu, 19 Jan 2017 08:04:13 +0000 (16:04 +0800)]
build: detect overflow for [re]allocate_array.

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).

7 years agodoc: v2.6.4
Will Estes [Mon, 23 Jan 2017 19:25:11 +0000 (14:25 -0500)]
doc: v2.6.4

7 years agobuild: more BSD make and vpath build fixes.
Thomas Klausner [Mon, 23 Jan 2017 07:46:48 +0000 (08:46 +0100)]
build: more BSD make and vpath build fixes.

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.

7 years agobuild: Fix skel.c generation with BSD make
Thomas Klausner [Sun, 22 Jan 2017 17:41:52 +0000 (18:41 +0100)]
build: Fix skel.c generation with BSD make

7 years agoAdd more defines in the non-reentrant part.
Christos Zoulas [Sun, 22 Jan 2017 17:34:30 +0000 (18:34 +0100)]
Add more defines in the non-reentrant part.

Fix the reentrant part; don't "#define yyfoo yyfoo" because it breaks
code that does #ifndef yywrap ..

7 years agoscanner: Add yyparse prototype
Christos Zoulas [Sun, 22 Jan 2017 17:33:58 +0000 (18:33 +0100)]
scanner: Add yyparse prototype

7 years agoscanner: move comment for consistency
Thomas Klausner [Sun, 22 Jan 2017 17:32:46 +0000 (18:32 +0100)]
scanner: move comment for consistency

7 years agoscanner: Use array instead of pointer
Christos Zoulas [Sun, 22 Jan 2017 17:30:51 +0000 (18:30 +0100)]
scanner: Use array instead of pointer

7 years agoscanner: manage path to m4 better.
Christos Zoulas [Sun, 22 Jan 2017 17:28:46 +0000 (18:28 +0100)]
scanner: manage path to m4 better.

Avoid alloca() for SSP; it is better anyway; since we don't need to
strdup the path.

7 years agoscanner: Avoid creating unused label
Christos Zoulas [Sun, 22 Jan 2017 17:28:08 +0000 (18:28 +0100)]
scanner: Avoid creating unused label

7 years agoCast argument to avoid arithmetic on void *.
Christos Zoulas [Sun, 22 Jan 2017 17:25:07 +0000 (18:25 +0100)]
Cast argument to avoid arithmetic on void *.

7 years agoscanner: Use strncpy
Christos Zoulas [Sun, 22 Jan 2017 17:22:26 +0000 (18:22 +0100)]
scanner: Use strncpy

7 years agoscanner: Use prefix when defining yywrap to avoid redefinition.
Christos Zoulas [Sun, 22 Jan 2017 17:20:44 +0000 (18:20 +0100)]
scanner: Use prefix when defining yywrap to avoid redefinition.

Fixes regression introduced in v2.6.3.

7 years agoscanner: Include stdarg.h for va_list
Christos Zoulas [Sun, 22 Jan 2017 17:23:40 +0000 (18:23 +0100)]
scanner: Include stdarg.h for va_list

7 years agoscanner: Rename warn to lwarn.
Christos Zoulas [Sun, 22 Jan 2017 17:18:47 +0000 (18:18 +0100)]
scanner: Rename warn to lwarn.

This avoids a naming conflict in NetBSD's  libc.

7 years agotest: document automake convention for skipped exit status.
Explorer09 [Sun, 1 Jan 2017 13:49:07 +0000 (21:49 +0800)]
test: document automake convention for skipped exit status.

7 years agotest: let testwrapper scripts be run by ${SHELL}.
Explorer09 [Tue, 3 Jan 2017 13:00:15 +0000 (21:00 +0800)]
test: let testwrapper scripts be run by ${SHELL}.

This allows user to use a different shell if /bin/sh has problems.
The use of $SHELL (variable) to run scripts is already an Automake
convention. All shell scripts in build-aux are run by $SHELL.

7 years agotest: Remove test scripts bashisms.
Explorer09 [Mon, 2 Jan 2017 01:03:12 +0000 (09:03 +0800)]
test: Remove test scripts bashisms.

They now all work under a POSIX compliant sh. Specifically, 'dash' can
now be used for running "make check" tests.

Note that none of these scripts has ever been using a pipe, so
`set -o pipefail` is unnecessary and removed.

7 years agotest: exit on '-1' test non-zero status.
Explorer09 [Sun, 1 Jan 2017 16:43:50 +0000 (00:43 +0800)]
test: exit on '-1' test non-zero status.

If a '-1' test program returns a non-zero status, don't go further and
compare it's (numeric) output values. This allows a '-1' test to
indicate a "skip" status or an otherwise error. (Currently no such '-1'
test would skip like this, though.)

Shell syntax note: `set -e` will not exit with the syntax like this
`test $(false) = $(false);`. The exit statuses of `false` in the
example will be ignored instead. But putting the output in a variable,
such as `VAR=$(false)`, DOES exit.

7 years agobuild: Fix 'make indent' target
Explorer09 [Sun, 1 Jan 2017 16:38:37 +0000 (00:38 +0800)]
build: Fix 'make indent' target

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.

7 years agobuild: Simplify indent program detection
Explorer09 [Sun, 1 Jan 2017 04:37:37 +0000 (12:37 +0800)]
build: Simplify indent program detection

7 years agofilter: Don't emit #line if %option noline set
Tobias Klauser [Thu, 12 Jan 2017 09:49:32 +0000 (10:49 +0100)]
filter: Don't emit #line if %option noline set

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.

7 years agotranslation: refresh po files from translation project
Will Estes [Thu, 12 Jan 2017 18:22:02 +0000 (13:22 -0500)]
translation: refresh po files from translation project

7 years agoc++: Fix yyrestart(NULL) SEGV.
Harald van Dijk [Tue, 10 Jan 2017 21:37:49 +0000 (22:37 +0100)]
c++: Fix yyrestart(NULL) SEGV.

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.

7 years agoscanner: join symbol list.
luistung [Mon, 9 Jan 2017 12:18:41 +0000 (20:18 +0800)]
scanner: join symbol list.

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

7 years agoscanner: remove void cast before fprintf
Will Estes [Wed, 11 Jan 2017 14:05:18 +0000 (09:05 -0500)]
scanner: remove void cast before fprintf

7 years agodoc: update NEWS for 2.6.3 release v2.6.3
Will Estes [Fri, 30 Dec 2016 17:48:24 +0000 (12:48 -0500)]
doc: update NEWS for 2.6.3 release

7 years agobuild: New configure option '--disable-bootstrap'.
Explorer09 [Sat, 26 Nov 2016 15:47:12 +0000 (23:47 +0800)]
build: New configure option '--disable-bootstrap'.

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.

7 years agobuild: "make clean" deletes stage1scan.c, stage1flex
Explorer09 [Sat, 26 Nov 2016 15:03:24 +0000 (23:03 +0800)]
build: "make clean" deletes stage1scan.c, stage1flex

7 years agobuild: allow building libfl even with --disable-libfl.
Explorer09 [Sat, 26 Nov 2016 09:21:25 +0000 (17:21 +0800)]
build: allow building libfl even with --disable-libfl.

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'.

7 years agoscanner: remove trailing whitespace in skeleton
Alexis La Goutte [Mon, 19 Dec 2016 08:31:18 +0000 (09:31 +0100)]
scanner: remove trailing whitespace in skeleton

7 years agoscanner: Disallow, overquote '[' and ']' in prefix
Demi Obenour [Thu, 1 Dec 2016 23:13:51 +0000 (18:13 -0500)]
scanner: Disallow, overquote '[' and ']' in prefix

7 years agoscanner: allocate correct buffer size for m4 path.
Samuel Thibault [Thu, 29 Dec 2016 13:44:22 +0000 (08:44 -0500)]
scanner: allocate correct buffer size for m4 path.

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

8 years agodoc: note no more libcompat in NEWS
Will Estes [Thu, 24 Nov 2016 23:43:24 +0000 (18:43 -0500)]
doc: note no more libcompat in NEWS

8 years agobuild: explain empty lib/Makefile.am
Will Estes [Thu, 24 Nov 2016 23:35:50 +0000 (18:35 -0500)]
build: explain empty lib/Makefile.am

8 years agobuild: warn about cross compiling with *alloc
Explorer09 [Sun, 20 Nov 2016 02:19:36 +0000 (10:19 +0800)]
build: warn about cross compiling with *alloc

8 years agobuild: Link $(LIBOBJS) from src/ dir, remove libcompat.la.
Explorer09 [Fri, 18 Nov 2016 18:37:04 +0000 (02:37 +0800)]
build: Link $(LIBOBJS) from src/ dir, remove libcompat.la.

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.

8 years agobuild: Let stage1flex respect LFLAGS
Explorer09 [Wed, 16 Nov 2016 00:17:05 +0000 (08:17 +0800)]
build: Let stage1flex respect LFLAGS

8 years agodoc: describe --disable-libfl in NEWS
Will Estes [Mon, 14 Nov 2016 19:26:48 +0000 (14:26 -0500)]
doc: describe --disable-libfl in NEWS

8 years agobuild: Add --disable-libfl configure option.
Explorer09 [Mon, 31 Oct 2016 13:15:41 +0000 (21:15 +0800)]
build: Add --disable-libfl configure option.

Disabling libfl is useful when building flex for a cross-toolchain.

Fixes: GH-99
8 years agofix backwards incompatible changes in 2.6.2.
Demi Obenour [Wed, 9 Nov 2016 16:38:32 +0000 (11:38 -0500)]
fix backwards incompatible changes in 2.6.2.

This patch addscompatibility `#defines` for all macros affected by
`%prefix`.

Fixes #113.

8 years agogit: ignore quote_in_comment artifacts
Will Estes [Tue, 8 Nov 2016 17:53:21 +0000 (12:53 -0500)]
git: ignore quote_in_comment artifacts

8 years agoFixes a major bug in Flex's own lexing of literals.
Demi Obenour [Tue, 8 Nov 2016 15:05:49 +0000 (10:05 -0500)]
Fixes a major bug in Flex's own lexing of literals.

My changes caused Flex to mishandle string and character literals in
line comments.  This commit fixes them.

Fixes #113.

8 years agoFix unportable test(1) operator.
Thomas Klausner [Sun, 6 Nov 2016 21:32:43 +0000 (22:32 +0100)]
Fix unportable test(1) operator.

"==" is only supported by bash, "=" is the standard comparison
operator.

8 years agoAdd more escaping tests
Demi Obenour [Wed, 2 Nov 2016 17:22:02 +0000 (13:22 -0400)]
Add more escaping tests

8 years agoFix another escaping bug
Demi Obenour [Wed, 2 Nov 2016 00:20:46 +0000 (20:20 -0400)]
Fix another escaping bug

in non-indented verbatim section 2 code.

I also did some reformatting.

8 years agobuild: fix false negatives for help2man and texi2dvi
Alastair Hughes [Thu, 27 Oct 2016 22:19:31 +0000 (11:19 +1300)]
build: fix false negatives for help2man and texi2dvi

HELP2MAN and TEXI2DVI (or the corresponding ac_prog variables) will
never be zero length as they fall back to the missing script; check for
the fall back and warn on that instead of always warning.