summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| | * scanner: update yy_buf_size after yyrealloc()Todd C. Miller2017-05-02
| | |
| | * build: support cross compiling.Alastair Hughes2017-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * build: Include <strings.h>; add strcasecmp() check to configure.Explorer092017-02-17
| | | | | | | | | | | | | | | | | | 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).
| | * build: Let configure error if missing required functions, headers..Explorer092017-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `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.
| | * scanner: compute powers of two faster.Explorer092017-02-16
| | | | | | | | | | | | | | | | | | 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.
| | * build: mv scan.c when building dist.Will Estes2017-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * build: don't assume distdir/scan.c is writeableWill Estes2017-02-06
| | |
| | * build: Add dist-hook to force remake scan.c.Explorer092017-02-06
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * build: respect '--localedir' from configure.Explorer092017-02-06
| | | | | | | | | | | | | | | Makefile shouldn't overwrite the 'localedir' variable, because that's what '--localedir' option in 'configure' is for.
| | * build: Remove "-I$(top_srcdir)/intl" from CPPFLAGS.Explorer092017-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * scanner: fix regcomp's error reporting, double malloc.Explorer092017-02-06
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * build: fix Makefile parse.h dependency clauses.Explorer092017-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * build: detect overflow for [re]allocate_array.Explorer092017-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
| | * build: more BSD make and vpath build fixes.Thomas Klausner2017-01-23
| | | | | | | | | | | | | | | | | | 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.
| | * build: Fix skel.c generation with BSD makeThomas Klausner2017-01-23
| | |
| | * Add more defines in the non-reentrant part.Christos Zoulas2017-01-23
| | | | | | | | | | | | | | | Fix the reentrant part; don't "#define yyfoo yyfoo" because it breaks code that does #ifndef yywrap ..
| | * scanner: Add yyparse prototypeChristos Zoulas2017-01-23
| | |
| | * scanner: move comment for consistencyThomas Klausner2017-01-23
| | |
| | * scanner: Use array instead of pointerChristos Zoulas2017-01-23
| | |
| | * scanner: manage path to m4 better.Christos Zoulas2017-01-23
| | | | | | | | | | | | | | | Avoid alloca() for SSP; it is better anyway; since we don't need to strdup the path.
| | * scanner: Avoid creating unused labelChristos Zoulas2017-01-23
| | |
| | * Cast argument to avoid arithmetic on void *.Christos Zoulas2017-01-23
| | |
| | * scanner: Use strncpyChristos Zoulas2017-01-23
| | |
| | * scanner: Use prefix when defining yywrap to avoid redefinition.Christos Zoulas2017-01-23
| | | | | | | | | | | | Fixes regression introduced in v2.6.3.
| | * scanner: Include stdarg.h for va_listChristos Zoulas2017-01-23
| | |
| | * scanner: Rename warn to lwarn.Christos Zoulas2017-01-23
| | | | | | | | | | | | This avoids a naming conflict in NetBSD's libc.
| | * build: Fix 'make indent' targetExplorer092017-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * filter: Don't emit #line if %option noline setTobias Klauser2017-01-12
| | | | | | | | | | | | | | | | | | 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.
| | * c++: Fix yyrestart(NULL) SEGV.Harald van Dijk2017-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * scanner: join symbol list.luistung2017-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * scanner: remove void cast before fprintfWill Estes2017-01-11
| | |
| | * build: New configure option '--disable-bootstrap'.Explorer092016-12-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * build: "make clean" deletes stage1scan.c, stage1flexExplorer092016-12-29
| | |
| | * build: allow building libfl even with --disable-libfl.Explorer092016-12-29
| | | | | | | | | | | | | | | | | | 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'.
| | * scanner: remove trailing whitespace in skeletonAlexis La Goutte2016-12-29
| | |
| | * scanner: Disallow, overquote '[' and ']' in prefixDemi Obenour2016-12-29
| | |
| | * scanner: allocate correct buffer size for m4 path.Samuel Thibault2016-12-29
| | | | | | | | | | | | | | | | | | | | | | | | 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
| | * build: Link $(LIBOBJS) from src/ dir, remove libcompat.la.Explorer092016-11-24
| | | | | | | | | | | | | | | | | | 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.
| | * build: Let stage1flex respect LFLAGSExplorer092016-11-15
| | |
| | * build: Add --disable-libfl configure option.Explorer092016-11-14
| | | | | | | | | | | | | | | | | | Disabling libfl is useful when building flex for a cross-toolchain. Fixes: GH-99
| | * fix backwards incompatible changes in 2.6.2.Demi Obenour2016-11-12
| | | | | | | | | | | | | | | | | | | | | This patch addscompatibility `#defines` for all macros affected by `%prefix`. Fixes #113.
| | * Fixes a major bug in Flex's own lexing of literals.Demi Obenour2016-11-08
| | | | | | | | | | | | | | | | | | | | | My changes caused Flex to mishandle string and character literals in line comments. This commit fixes them. Fixes #113.
| | * Fix another escaping bugDemi Obenour2016-11-01
| | | | | | | | | | | | | | | | | | in non-indented verbatim section 2 code. I also did some reformatting.
| | * build: no longer build PIC version of libfl.Will Estes2016-10-26
| | | | | | | | | | | | | | | | | | | | | The PIC version of libfl was not being built correctly. From the lack of bug reports around this problem, we conclude that the PIC version of libfl is not used and so we drop it from the build build targets for flex.
| | * Fix M4 quotation in section 2 prologue and refactor duplicated codeDemi Obenour2016-10-23
| | |
| | * Improved M4 quotationDemi Obenour2016-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes M4 quotation of certain strings beginning with `yy` (in section 3 of the input file only) and character literals. The new quotation method is also less brittle and faster. Tests that relied on the old behavior were fixed. Also, `yyconst` is no longer defined; use `const` (which it unconditionally was defined to) instead.
| | * Fix M4 quoting of section 3.Demi Obenour2016-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes M4 quoting of section 3 of the input file, including escape sequences and character constants. Tests were added to verify the behavior in section 3 with respect to quoting. Both escaping of quotes and quoting of potential macro-start characters are tested. Existing tests were also fixed to account for the new -- and now correct -- behavior. Many tests relied on the old behavior of expanding M4 macros in section 3. They needed to be updated for the new behavior.
| | * Fix yyrestart(NULL) SEGV.Mightyjo2016-10-05
| | |
| | * scanner: M4 quoting fixesDemi Obenour2016-09-25
| | |
| | * Support `make indent` for out of source buildsDemi Obenour2016-09-25
| | |