| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
| |
"Flex used to" was written twice at the beginning of Chapter 9, paragraph 2.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Previously, `[[` and `]]` were not escaped in strings, which led
to bad interactions with m4.
Also, don't break strings on newline, as GCC et al support whitespace
between a backslash and the subsequent newline.
|
| |
|
|
|
| |
This function was not used and always triggered a fatal error when run.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, every call to sf_push() realloc()'s _sf_stack, even if the
maximum size _sf_max wasn't changed. As the indentation beneath the
"if" clause already indicates, the realloc() should only be executed
if _sf_max was increased.
Found by compiling flex with the -Wmisleading-indentation flags of gcc,
which leads to the following warning:
scanflags.c: In function ‘sf_push’:
scanflags.c:42:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (_sf_top_ix + 1 >= _sf_max)
^~
scanflags.c:44:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
_sf_stk = realloc(_sf_stk, sizeof(scanflags_t) * _sf_max);
^~~~~~~
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
polish build rule
Also remove references to srcdir since skel.c is no longer mentioned in po/POTFILES.in.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
git clean -fdx && ./autogen.sh && \
mkdir -p ../build && cd ../build && ../flex/configure && make -j10 && \
make dist
failed with:
> help2man: can't get `--help' info from ../../flex/src/flex
Note:
There is no dependency except for the flex binary.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
git clean -fdx && ./autogen.sh && \
mkdir -p ../build && cd ../build && ../flex/configure && make -j10
failed with:
> ../src/stage1flex -o stage1scan.c stage1scan.l
> stage1flex: can't open stage1scan.l
Note:
stage1scan.c is not necessairy in the "make dist" generated tar.gz file.
stage1flex will be build from scan.c (which is distributed),
and this will then generate stage1scan.c from scan.l
|
| |
|
|
|
|
| |
warning: conversion to 'yy_state_type' from 'flex_uint32_t' may change the sign of the result [-Wsign-conversion]
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
`WARNINGFLAGS' can be passed when invoking `configure'
and when invoking `make'
if configure switch `--enable-warnings' was given
then default to something useful if we have `GCC'
`WARNINGFLAGS' is not used when compiling `stage1flex'
to avoid unnecessary clutter
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using clang/llvm 3.8 to compile flex, the following warning is
emitted:
main.c:378:27: warning: the value of the size argument in 'strncat' is too large, might lead to a buffer overflow [-Wstrncat-size]
strncat(m4_path, m4, sizeof(m4_path));
^~~~~~~~~~~~~~~
main.c:378:27: note: change the argument to be the free space in the destination buffer minus the terminating null byte
strncat(m4_path, m4, sizeof(m4_path));
^~~~~~~~~~~~~~~
sizeof(m4_path) - strlen(m4_path) - 1
Fix it up by using the solution proposed by the warning message.
|
| |
|
|
|
|
| |
warning: conversion to 'unsigned int' from 'int' may change the sign of the result [-Wsign-conversion]
|
| |
|
| |
|
|
|
|
| |
[-Wsign-conversion]
|
|
|
|
| |
the result [-Wsign-conversion]
|
|
|
|
|
|
| |
its value [-Wconversion]
struct yytbl_reader, member bread is of type flex_uint32_t
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|