Home
last modified time | relevance | path

Searched +hist:1 +hist:d7763d7 (Results 1 - 21 of 21) sorted by relevance

/flex/src/
H A Dlibyywrap.cdiff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
H A Dlibmain.cdiff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
H A Dmkskel.shdiff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
H A Decs.cdiff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
H A Dsym.cdiff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff f7983859 Tue Jun 20 09:38:27 MDT 1989 Vern Paxson <vern@ee.lbl.gov> 2.0.1 beta
H A Dnfa.cdiff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff f7983859 Tue Jun 20 09:38:27 MDT 1989 Vern Paxson <vern@ee.lbl.gov> 2.0.1 beta
H A Dccl.cdiff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
H A Dtblcmp.cdiff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
H A Dyylex.cdiff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
H A DFlexLexer.hdiff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
H A Ddfa.cdiff 1c8a5f9d Fri Sep 13 15:54:02 MDT 2002 John Millaway <john43@users.sourceforge.net> Created test for reject.
Handled reject-triggered tables in serialization.
diff 1cb69bc4 Thu Aug 29 13:02:17 MDT 2002 Will Estes <wlestes@users.sourceforge.net> eat a blank line
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1a3efb8e Sat Jun 12 07:40:15 MDT 1993 Vern Paxson <vern@ee.lbl.gov> Got rid of code needed for %t
H A Dgen.cdiff 1e9c3627 Thu Oct 08 14:03:03 MDT 2020 Eric S. Raymond <esr@thyrsus.com> Do consistent optimal packing of arrays.

Flex has a strategy of packing its arrays with in32 or imt32 depending
on length, but it wasn't applied consistently. While I don't thinlk this
kind of space optimization matters a lot in 2020, if we're going to do it at
all we should do it thoroughly.
diff 0fc45ce9 Fri Oct 02 08:48:21 MDT 2020 Eric S. Raymond <esr@thyrsus.com> Clean up various sporadic symbol definitions that weren't going through ctrl.

Includes handling of --nounistd, --always_interactive, --never_interactive, --stack,
their corresponding lexer items, and and noinput.

An unavoidable side effect is that the place where "#define
YY_NO_INPUT 1" is inserted, if it's inserted. has to move because it's
done by a different route - m4 expansion rather than the action_define
function (which is now gone - this was the last use). I have put the
new insertion point just iin time for the first reference to the macro.

Otherwise the only diffs in generarted test code are symbol
definitions becoming visible.

#56 in the retargeting patch series
diff 01f4aadd Tue Sep 22 04:41:54 MDT 2020 Eric S. Raymond <esr@thyrsus.com> gen_next_state(true) becomes m4 code.

As with patch #20 in this series, the changes in generated code fall in the classes:

1. Addition of comments. I elected to copy the comments from the
generator functions into their corresponding m4 macros in hopes of
making the generated code less nasty to read.

2. Lines like "if ( yy_current_state >= 12 )" changing so the numeric
literal is replaced by YY_JAMSTATE + 1. This was a consequence of the
change in #15 to simplify the C code generators so they could be
translated into static nacros.

3. "YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : YY_NUL_EC);:
being replaced by "YY_CHAR yy_c = (*yy_cp ?
*(yy_ec+YY_SC_TO_UI(*yy_cp)) : YY_NUL_EC);" The strange way of
indexing yy_ec avoids a syntactic collision with the use of [] as
m4 quotes.

The gen_next_state(false) case was translated to m4 at patch #20

#22 in the retargeting patch series
diff 01f4aadd Tue Sep 22 04:41:54 MDT 2020 Eric S. Raymond <esr@thyrsus.com> gen_next_state(true) becomes m4 code.

As with patch #20 in this series, the changes in generated code fall in the classes:

1. Addition of comments. I elected to copy the comments from the
generator functions into their corresponding m4 macros in hopes of
making the generated code less nasty to read.

2. Lines like "if ( yy_current_state >= 12 )" changing so the numeric
literal is replaced by YY_JAMSTATE + 1. This was a consequence of the
change in #15 to simplify the C code generators so they could be
translated into static nacros.

3. "YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : YY_NUL_EC);:
being replaced by "YY_CHAR yy_c = (*yy_cp ?
*(yy_ec+YY_SC_TO_UI(*yy_cp)) : YY_NUL_EC);" The strange way of
indexing yy_ec avoids a syntactic collision with the use of [] as
m4 quotes.

The gen_next_state(false) case was translated to m4 at patch #20

#22 in the retargeting patch series
diff 30788806 Tue Sep 22 02:35:57 MDT 2020 Eric S. Raymond <esr@thyrsus.com> gen_next_match() becomes m4 code.

To verify this patch, notice that the non-whitespace changes in the
generated C from the tests are of only three kinds:

1. Addition of comments. I elected to copy the comments from the
generator functions into their corresponding m4 macros in hopes of
making the generated code less nasty to read.

2. Lines like "if ( yy_current_state >= 12 )" changing so the numeric
literal is replaced by YY_JAMSTATE + 1. This was a consequence of the
change in #15 to simplify the C code generators so they could be
translated into static nacros.

3. "YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]" being replaced by
"YY_CHAR yy_c = *(yy_ec+YY_SC_TO_UI(*yy_cp));". The strange way of indexing yy_ec
avoids a syntactic collision with the use of [] as m4 quotes.

#20 in the retargeting patch series
diff 30788806 Tue Sep 22 02:35:57 MDT 2020 Eric S. Raymond <esr@thyrsus.com> gen_next_match() becomes m4 code.

To verify this patch, notice that the non-whitespace changes in the
generated C from the tests are of only three kinds:

1. Addition of comments. I elected to copy the comments from the
generator functions into their corresponding m4 macros in hopes of
making the generated code less nasty to read.

2. Lines like "if ( yy_current_state >= 12 )" changing so the numeric
literal is replaced by YY_JAMSTATE + 1. This was a consequence of the
change in #15 to simplify the C code generators so they could be
translated into static nacros.

3. "YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]" being replaced by
"YY_CHAR yy_c = *(yy_ec+YY_SC_TO_UI(*yy_cp));". The strange way of indexing yy_ec
avoids a syntactic collision with the use of [] as m4 quotes.

#20 in the retargeting patch series
diff 1da19feb Mon Mar 14 09:48:15 MDT 2016 Bastian Köcher <git@kchr.de> Fixes yyl compare with unsigned warning
diff 1c8a5f9d Fri Sep 13 15:54:02 MDT 2002 John Millaway <john43@users.sourceforge.net> Created test for reject.
Handled reject-triggered tables in serialization.
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
H A Dmisc.cdiff 0fc45ce9 Fri Oct 02 08:48:21 MDT 2020 Eric S. Raymond <esr@thyrsus.com> Clean up various sporadic symbol definitions that weren't going through ctrl.

Includes handling of --nounistd, --always_interactive, --never_interactive, --stack,
their corresponding lexer items, and and noinput.

An unavoidable side effect is that the place where "#define
YY_NO_INPUT 1" is inserted, if it's inserted. has to move because it's
done by a different route - m4 expansion rather than the action_define
function (which is now gone - this was the last use). I have put the
new insertion point just iin time for the first reference to the macro.

Otherwise the only diffs in generarted test code are symbol
definitions becoming visible.

#56 in the retargeting patch series
diff 1a946879 Sun Jan 22 10:30:51 MST 2017 Christos Zoulas <christos@zoulas.com> scanner: Use array instead of pointer
diff 1d5b34b5 Sun Feb 28 08:49:53 MST 2016 rlar <rlar> change return type and rename int htoi()/otoi() --> unsigned int htoui()/otoui()
diff 6fa7ed04 Fri Dec 25 12:15:15 MST 2015 Michael Reed <m.reed@mykolab.com> Cleaned up __STDC__ #ifdefs.

Assuming a compiler conforming to the ISO C standard is used, i.e.,
__STDC__ is defined to 1, YY_USE_CONST is always defined and can be
eliminated.
diff 1cc5d870 Tue Dec 08 19:12:21 MST 2015 Michael McConville <mmcconville@mykolab.com> Removed flex_realloc().

As with flex_alloc(), replace calls to flex_realloc(), which was just a
wrapper around realloc().
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff cbe0e6b4 Mon Nov 29 09:40:41 MST 1993 Vern Paxson <vern@ee.lbl.gov> Fixed to buffer section 1 definitions
diff 1d4525a8 Sat Nov 20 08:03:48 MST 1993 Vern Paxson <vern@ee.lbl.gov> K&R declaration for check_char()
diff 1d59e0b1 Tue Jan 16 03:39:51 MST 1990 Vern Paxson <vern@ee.lbl.gov> Added missing ',' in error message.
2.2 Release, second try.
H A Dparse.ydiff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff f7983859 Tue Jun 20 09:38:27 MDT 1989 Vern Paxson <vern@ee.lbl.gov> 2.0.1 beta
H A Dmain.cdiff efed8275 Wed Oct 14 03:20:05 MDT 2020 Eric S. Raymond <esr@thyrsus.com> Replace all conditional markup in the skeleton with macro conditionals.

Because having two different consitionalization syntaxes was ugly
and conducive to error. After this change there are %% breakpoints
and %# comments and nothing else. Comments on %if lines have been
preserved.

I used the following script:

========================================================================

import sys

flagstack = []
for line in sys.stdin:
if (not line.startswith("%if")) and (not line.startswith("%endif")) and (not line.startswith("%ok-for")) and (not line.startswith("%not-for")):
sys.stdout.write(line)
continue
elif line.startswith("%endif"):
if flagstack.pop():
sys.stdout.write("]])\n")
continue
fields = line.strip().split()
trailer = " ".join(fields[1:]) + "\n"
if line.startswith("%if-bison-bridge"):
sys.stdout.write("m4_ifdef([[M4_YY_BISON_LVAL]], [[\n")
flagstack.append(True)
elif line.startswith("%if-c++-only"):
sys.stdout.write("m4_ifdef([[M4_MODE_CXX_ONLY]], [[\n")
flagstack.append(True)
elif line.startswith("%if-c-only"):
sys.stdout.write("m4_ifdef([[M4_MODE_C_ONLY]], [[\n")
flagstack.append(True)
elif line.startswith("%if-c-or-c++"):
flagstack.append(False)
elif line.startswith("%if-not-reentrant"):
sys.stdout.write("m4_ifdef([[M4_YY_NOT_REENTRANT]], [[\n")
flagstack.append(True)
elif line.startswith("%if-reentrant"):
sys.stdout.write("m4_ifdef([[M4_YY_REENTRANT]], [[\n")
flagstack.append(True)
elif line.startswith("%if-tables-serialization"):
sys.stdout.write("m4_ifdef([[M4_MODE_TABLESEXT]], [[\n")
flagstack.append(True)
elif line.startswith("%not-for-header"):
sys.stdout.write("m4_ifdef( [[M4_YY_IN_HEADER]],,[[m4_dnl\n")
elif line.startswith("%ok-for-header"):
sys.stdout.write("]])\n")
else:
sys.stderr.write("depercent: unrecognized %r\n" % line)
raise SystemExit(1)
if trailer.strip():
sys.stdout.write("%# " + trailer)

========================================================================

One nasty little abuse if markup around yyread_r had to be fixed up by hand.
diff efed8275 Wed Oct 14 03:20:05 MDT 2020 Eric S. Raymond <esr@thyrsus.com> Replace all conditional markup in the skeleton with macro conditionals.

Because having two different consitionalization syntaxes was ugly
and conducive to error. After this change there are %% breakpoints
and %# comments and nothing else. Comments on %if lines have been
preserved.

I used the following script:

========================================================================

import sys

flagstack = []
for line in sys.stdin:
if (not line.startswith("%if")) and (not line.startswith("%endif")) and (not line.startswith("%ok-for")) and (not line.startswith("%not-for")):
sys.stdout.write(line)
continue
elif line.startswith("%endif"):
if flagstack.pop():
sys.stdout.write("]])\n")
continue
fields = line.strip().split()
trailer = " ".join(fields[1:]) + "\n"
if line.startswith("%if-bison-bridge"):
sys.stdout.write("m4_ifdef([[M4_YY_BISON_LVAL]], [[\n")
flagstack.append(True)
elif line.startswith("%if-c++-only"):
sys.stdout.write("m4_ifdef([[M4_MODE_CXX_ONLY]], [[\n")
flagstack.append(True)
elif line.startswith("%if-c-only"):
sys.stdout.write("m4_ifdef([[M4_MODE_C_ONLY]], [[\n")
flagstack.append(True)
elif line.startswith("%if-c-or-c++"):
flagstack.append(False)
elif line.startswith("%if-not-reentrant"):
sys.stdout.write("m4_ifdef([[M4_YY_NOT_REENTRANT]], [[\n")
flagstack.append(True)
elif line.startswith("%if-reentrant"):
sys.stdout.write("m4_ifdef([[M4_YY_REENTRANT]], [[\n")
flagstack.append(True)
elif line.startswith("%if-tables-serialization"):
sys.stdout.write("m4_ifdef([[M4_MODE_TABLESEXT]], [[\n")
flagstack.append(True)
elif line.startswith("%not-for-header"):
sys.stdout.write("m4_ifdef( [[M4_YY_IN_HEADER]],,[[m4_dnl\n")
elif line.startswith("%ok-for-header"):
sys.stdout.write("]])\n")
else:
sys.stderr.write("depercent: unrecognized %r\n" % line)
raise SystemExit(1)
if trailer.strip():
sys.stdout.write("%# " + trailer)

========================================================================

One nasty little abuse if markup around yyread_r had to be fixed up by hand.
diff 0fc45ce9 Fri Oct 02 08:48:21 MDT 2020 Eric S. Raymond <esr@thyrsus.com> Clean up various sporadic symbol definitions that weren't going through ctrl.

Includes handling of --nounistd, --always_interactive, --never_interactive, --stack,
their corresponding lexer items, and and noinput.

An unavoidable side effect is that the place where "#define
YY_NO_INPUT 1" is inserted, if it's inserted. has to move because it's
done by a different route - m4 expansion rather than the action_define
function (which is now gone - this was the last use). I have put the
new insertion point just iin time for the first reference to the macro.

Otherwise the only diffs in generarted test code are symbol
definitions becoming visible.

#56 in the retargeting patch series
diff f0161f21 Fri Sep 04 18:19:05 MDT 2020 Eric S. Raymond <esr@thyrsus.com> Refactoring step - separate output generation from option processing.

#1 in the retargeting patch series.
diff babe9a1e Thu Mar 31 02:09:57 MDT 2016 Tobias Klauser <tklauser@distanz.ch> Fix potential buffer overflow in strncat()

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.
diff 145968f5 Fri Dec 25 12:49:33 MST 2015 Michael Reed <m.reed@mykolab.com> Replace basename2() with basename(3).

Given the following program:

\#include <libgen.h>
\#include <stdio.h>

/* extracts basename from path, optionally stripping the extension "\.*"
* (same concept as /bin/sh `basename`, but different handling of extension). */
static char *basename2 (char *path)
{
char *b;

for (b = path; *path; path++)
if (*path == '/')
b = path + 1;
return b;
}

static void basename_compare(char *path)
{
printf("basename: %s\n", basename(path));
printf("basename2: %s\n\n", basename2(path));
}

int main (int argc, char *argv[])
{
// From http://pubs.opengroup.org/onlinepubs/9699919799/
// ``Sample Input and Output Strings''
basename_compare("/usr/lib");
basename_compare("/usr/");
basename_compare("/");
basename_compare("///");
basename_compare("//usr//lib//");
return 0;
}

... and the program's output:

basename: lib
basename2: lib

basename: usr
basename2:

basename: /
basename2:

basename: /
basename2:

basename: lib
basename2:

... we can see that basename2() behaves the same as basename(3) in the
average use case, but messes up pretty severely in others. Besides
that, basename(3) is mandated by POSIX so should be present on modern
Unix-like systems, so we shouldn't define it ourselves.

Some notes:
- it doesn't appear to be mentioned in POSIX, but OpenBSD's basename(3)
returns NULL if the returned path componenet is > PATH_MAX, so add a
check for that
- basename(3) shouldn't return an empty string, so remove the
program_name[0] != '\0' check
diff c918627e Tue Dec 15 12:47:33 MST 2015 Michael Reed <m.reed@mykolab.com> Removed prototype for main().

It's not called anywhere else so the prototype is not needed.
See the C99 standard [1], section 5.1.2.2.1 for more info.

[1]: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
diff c918627e Tue Dec 15 12:47:33 MST 2015 Michael Reed <m.reed@mykolab.com> Removed prototype for main().

It's not called anywhere else so the prototype is not needed.
See the C99 standard [1], section 5.1.2.2.1 for more info.

[1]: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
diff c918627e Tue Dec 15 12:47:33 MST 2015 Michael Reed <m.reed@mykolab.com> Removed prototype for main().

It's not called anywhere else so the prototype is not needed.
See the C99 standard [1], section 5.1.2.2.1 for more info.

[1]: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
diff 1f3013d1 Sun Mar 31 10:17:13 MST 2002 John Millaway <john43@users.sourceforge.net> Documented the header file kludge, (in anticipation of buffering Section 1.)
diff 1f3013d1 Sun Mar 31 10:17:13 MST 2002 John Millaway <john43@users.sourceforge.net> Documented the header file kludge, (in anticipation of buffering Section 1.)
H A Dscan.ldiff 0fc45ce9 Fri Oct 02 08:48:21 MDT 2020 Eric S. Raymond <esr@thyrsus.com> Clean up various sporadic symbol definitions that weren't going through ctrl.

Includes handling of --nounistd, --always_interactive, --never_interactive, --stack,
their corresponding lexer items, and and noinput.

An unavoidable side effect is that the place where "#define
YY_NO_INPUT 1" is inserted, if it's inserted. has to move because it's
done by a different route - m4 expansion rather than the action_define
function (which is now gone - this was the last use). I have put the
new insertion point just iin time for the first reference to the macro.

Otherwise the only diffs in generarted test code are symbol
definitions becoming visible.

#56 in the retargeting patch series
diff 1cc5d870 Tue Dec 08 19:12:21 MST 2015 Michael McConville <mmcconville@mykolab.com> Removed flex_realloc().

As with flex_alloc(), replace calls to flex_realloc(), which was just a
wrapper around realloc().
diff b5d7837b Thu Sep 05 07:26:03 MDT 2002 Will Estes <wlestes@users.sourceforge.net> s/exit(1)/exit(EXIT_FAILURE)
diff 0dab517d Mon Mar 18 00:50:28 MST 2002 John Millaway <john43@users.sourceforge.net> Removed CFront 1.2 -specific code from skeleton, because CFront now defines __cplusplus properly.
Removed TurboC-specific code from skeleton.
Skeleton now includes proper C++ standard headers.
Relocated "unistd.h" code after user section 1 to allow user to overrid it.
New option "nounistd" to suppress unistd.h from being included.
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1d5a8e25 Mon Mar 20 07:01:16 MST 1995 Vern Paxson <vern@ee.lbl.gov> added %option yylineno
diff a2e08280 Mon Jan 09 05:10:57 MST 1995 Vern Paxson <vern@ee.lbl.gov> #line in section 1
diff cbe0e6b4 Mon Nov 29 09:40:41 MST 1993 Vern Paxson <vern@ee.lbl.gov> Fixed to buffer section 1 definitions
diff 1b2e2671 Tue Mar 20 06:15:30 MST 1990 Vern Paxson <vern@ee.lbl.gov> cast added to malloc() call to keep lint happy.
H A Dcpp-flex.skldiff efed8275 Wed Oct 14 03:20:05 MDT 2020 Eric S. Raymond <esr@thyrsus.com> Replace all conditional markup in the skeleton with macro conditionals.

Because having two different consitionalization syntaxes was ugly
and conducive to error. After this change there are %% breakpoints
and %# comments and nothing else. Comments on %if lines have been
preserved.

I used the following script:

========================================================================

import sys

flagstack = []
for line in sys.stdin:
if (not line.startswith("%if")) and (not line.startswith("%endif")) and (not line.startswith("%ok-for")) and (not line.startswith("%not-for")):
sys.stdout.write(line)
continue
elif line.startswith("%endif"):
if flagstack.pop():
sys.stdout.write("]])\n")
continue
fields = line.strip().split()
trailer = " ".join(fields[1:]) + "\n"
if line.startswith("%if-bison-bridge"):
sys.stdout.write("m4_ifdef([[M4_YY_BISON_LVAL]], [[\n")
flagstack.append(True)
elif line.startswith("%if-c++-only"):
sys.stdout.write("m4_ifdef([[M4_MODE_CXX_ONLY]], [[\n")
flagstack.append(True)
elif line.startswith("%if-c-only"):
sys.stdout.write("m4_ifdef([[M4_MODE_C_ONLY]], [[\n")
flagstack.append(True)
elif line.startswith("%if-c-or-c++"):
flagstack.append(False)
elif line.startswith("%if-not-reentrant"):
sys.stdout.write("m4_ifdef([[M4_YY_NOT_REENTRANT]], [[\n")
flagstack.append(True)
elif line.startswith("%if-reentrant"):
sys.stdout.write("m4_ifdef([[M4_YY_REENTRANT]], [[\n")
flagstack.append(True)
elif line.startswith("%if-tables-serialization"):
sys.stdout.write("m4_ifdef([[M4_MODE_TABLESEXT]], [[\n")
flagstack.append(True)
elif line.startswith("%not-for-header"):
sys.stdout.write("m4_ifdef( [[M4_YY_IN_HEADER]],,[[m4_dnl\n")
elif line.startswith("%ok-for-header"):
sys.stdout.write("]])\n")
else:
sys.stderr.write("depercent: unrecognized %r\n" % line)
raise SystemExit(1)
if trailer.strip():
sys.stdout.write("%# " + trailer)

========================================================================

One nasty little abuse if markup around yyread_r had to be fixed up by hand.
diff efed8275 Wed Oct 14 03:20:05 MDT 2020 Eric S. Raymond <esr@thyrsus.com> Replace all conditional markup in the skeleton with macro conditionals.

Because having two different consitionalization syntaxes was ugly
and conducive to error. After this change there are %% breakpoints
and %# comments and nothing else. Comments on %if lines have been
preserved.

I used the following script:

========================================================================

import sys

flagstack = []
for line in sys.stdin:
if (not line.startswith("%if")) and (not line.startswith("%endif")) and (not line.startswith("%ok-for")) and (not line.startswith("%not-for")):
sys.stdout.write(line)
continue
elif line.startswith("%endif"):
if flagstack.pop():
sys.stdout.write("]])\n")
continue
fields = line.strip().split()
trailer = " ".join(fields[1:]) + "\n"
if line.startswith("%if-bison-bridge"):
sys.stdout.write("m4_ifdef([[M4_YY_BISON_LVAL]], [[\n")
flagstack.append(True)
elif line.startswith("%if-c++-only"):
sys.stdout.write("m4_ifdef([[M4_MODE_CXX_ONLY]], [[\n")
flagstack.append(True)
elif line.startswith("%if-c-only"):
sys.stdout.write("m4_ifdef([[M4_MODE_C_ONLY]], [[\n")
flagstack.append(True)
elif line.startswith("%if-c-or-c++"):
flagstack.append(False)
elif line.startswith("%if-not-reentrant"):
sys.stdout.write("m4_ifdef([[M4_YY_NOT_REENTRANT]], [[\n")
flagstack.append(True)
elif line.startswith("%if-reentrant"):
sys.stdout.write("m4_ifdef([[M4_YY_REENTRANT]], [[\n")
flagstack.append(True)
elif line.startswith("%if-tables-serialization"):
sys.stdout.write("m4_ifdef([[M4_MODE_TABLESEXT]], [[\n")
flagstack.append(True)
elif line.startswith("%not-for-header"):
sys.stdout.write("m4_ifdef( [[M4_YY_IN_HEADER]],,[[m4_dnl\n")
elif line.startswith("%ok-for-header"):
sys.stdout.write("]])\n")
else:
sys.stderr.write("depercent: unrecognized %r\n" % line)
raise SystemExit(1)
if trailer.strip():
sys.stdout.write("%# " + trailer)

========================================================================

One nasty little abuse if markup around yyread_r had to be fixed up by hand.
diff 0fc45ce9 Fri Oct 02 08:48:21 MDT 2020 Eric S. Raymond <esr@thyrsus.com> Clean up various sporadic symbol definitions that weren't going through ctrl.

Includes handling of --nounistd, --always_interactive, --never_interactive, --stack,
their corresponding lexer items, and and noinput.

An unavoidable side effect is that the place where "#define
YY_NO_INPUT 1" is inserted, if it's inserted. has to move because it's
done by a different route - m4 expansion rather than the action_define
function (which is now gone - this was the last use). I have put the
new insertion point just iin time for the first reference to the macro.

Otherwise the only diffs in generarted test code are symbol
definitions becoming visible.

#56 in the retargeting patch series
diff 01f4aadd Tue Sep 22 04:41:54 MDT 2020 Eric S. Raymond <esr@thyrsus.com> gen_next_state(true) becomes m4 code.

As with patch #20 in this series, the changes in generated code fall in the classes:

1. Addition of comments. I elected to copy the comments from the
generator functions into their corresponding m4 macros in hopes of
making the generated code less nasty to read.

2. Lines like "if ( yy_current_state >= 12 )" changing so the numeric
literal is replaced by YY_JAMSTATE + 1. This was a consequence of the
change in #15 to simplify the C code generators so they could be
translated into static nacros.

3. "YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : YY_NUL_EC);:
being replaced by "YY_CHAR yy_c = (*yy_cp ?
*(yy_ec+YY_SC_TO_UI(*yy_cp)) : YY_NUL_EC);" The strange way of
indexing yy_ec avoids a syntactic collision with the use of [] as
m4 quotes.

The gen_next_state(false) case was translated to m4 at patch #20

#22 in the retargeting patch series
diff 01f4aadd Tue Sep 22 04:41:54 MDT 2020 Eric S. Raymond <esr@thyrsus.com> gen_next_state(true) becomes m4 code.

As with patch #20 in this series, the changes in generated code fall in the classes:

1. Addition of comments. I elected to copy the comments from the
generator functions into their corresponding m4 macros in hopes of
making the generated code less nasty to read.

2. Lines like "if ( yy_current_state >= 12 )" changing so the numeric
literal is replaced by YY_JAMSTATE + 1. This was a consequence of the
change in #15 to simplify the C code generators so they could be
translated into static nacros.

3. "YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : YY_NUL_EC);:
being replaced by "YY_CHAR yy_c = (*yy_cp ?
*(yy_ec+YY_SC_TO_UI(*yy_cp)) : YY_NUL_EC);" The strange way of
indexing yy_ec avoids a syntactic collision with the use of [] as
m4 quotes.

The gen_next_state(false) case was translated to m4 at patch #20

#22 in the retargeting patch series
diff 30788806 Tue Sep 22 02:35:57 MDT 2020 Eric S. Raymond <esr@thyrsus.com> gen_next_match() becomes m4 code.

To verify this patch, notice that the non-whitespace changes in the
generated C from the tests are of only three kinds:

1. Addition of comments. I elected to copy the comments from the
generator functions into their corresponding m4 macros in hopes of
making the generated code less nasty to read.

2. Lines like "if ( yy_current_state >= 12 )" changing so the numeric
literal is replaced by YY_JAMSTATE + 1. This was a consequence of the
change in #15 to simplify the C code generators so they could be
translated into static nacros.

3. "YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]" being replaced by
"YY_CHAR yy_c = *(yy_ec+YY_SC_TO_UI(*yy_cp));". The strange way of indexing yy_ec
avoids a syntactic collision with the use of [] as m4 quotes.

#20 in the retargeting patch series
diff 30788806 Tue Sep 22 02:35:57 MDT 2020 Eric S. Raymond <esr@thyrsus.com> gen_next_match() becomes m4 code.

To verify this patch, notice that the non-whitespace changes in the
generated C from the tests are of only three kinds:

1. Addition of comments. I elected to copy the comments from the
generator functions into their corresponding m4 macros in hopes of
making the generated code less nasty to read.

2. Lines like "if ( yy_current_state >= 12 )" changing so the numeric
literal is replaced by YY_JAMSTATE + 1. This was a consequence of the
change in #15 to simplify the C code generators so they could be
translated into static nacros.

3. "YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]" being replaced by
"YY_CHAR yy_c = *(yy_ec+YY_SC_TO_UI(*yy_cp));". The strange way of indexing yy_ec
avoids a syntactic collision with the use of [] as m4 quotes.

#20 in the retargeting patch series
diff 4081efa0 Wed Mar 07 19:04:36 MST 2018 Explorer09 <explorer09@gmail.com> scanner: Fix glibc features.h dependency in skeleton.

Commit a17d79e9c722a6735b6d2a8f152287404f27df32 defines _POSIX_C_SOURCE
to the minimum of 1 if it's not defined in the user's scanner code or
the compiling environment. However in glibc the macros are not yet set
up until one of the libc headers is included. This unfortunately have
made us overwrite the default _POSIX_C_SOURCE value that would be
defined by glibc (200809L at the time of writing), causing regressions
in user code.

Now in this patch:
1. Ensure feature test macros have been set up in glibc before checking
or defining any of them in our skeleton code.
2. Have a more conservative logic when determining the need to define
_POSIX_C_SOURCE (required for fileno()).

Fixes: #313

Note:
It could be tricky for application code to ensure feature test macros
have been set up in glibc, since <features.h> is no portable header and
not meant to be included directly by applications. The way to do it is
to include a libc header which in turn includes <features.h>. However,
many of the glibc headers check __USE_POSIX (a glibc internal macro
defined if _POSIX_C_SOURCE is defined) and determine which interfaces
to expose already, making the headers inappropriate for our goal.
Those which don't depend on _POSIX_C_SOURCE, and are also available
since ANSI C89, are only <assert.h>, <errno.h> and <math.h>.

<assert.h> is finally favored due to other considerations:
- <math.h> check for __USE_XOPEN in glibc, making a dependency on
_XOPEN_SOURCE, besides it exposes much more interfaces than we need.
- In djgpp, <errno.h> depends on _POSIX_SOURCE to hide definitions of
some errno values when it's defined.
- <assert.h> exposes the fewest interfaces among the 3 headers and, at
the time of writing, checks for only C99 (for __func__), C11 (for
_Static_assert), and _GNU_SOURCE when needed.

Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
diff 4081efa0 Wed Mar 07 19:04:36 MST 2018 Explorer09 <explorer09@gmail.com> scanner: Fix glibc features.h dependency in skeleton.

Commit a17d79e9c722a6735b6d2a8f152287404f27df32 defines _POSIX_C_SOURCE
to the minimum of 1 if it's not defined in the user's scanner code or
the compiling environment. However in glibc the macros are not yet set
up until one of the libc headers is included. This unfortunately have
made us overwrite the default _POSIX_C_SOURCE value that would be
defined by glibc (200809L at the time of writing), causing regressions
in user code.

Now in this patch:
1. Ensure feature test macros have been set up in glibc before checking
or defining any of them in our skeleton code.
2. Have a more conservative logic when determining the need to define
_POSIX_C_SOURCE (required for fileno()).

Fixes: #313

Note:
It could be tricky for application code to ensure feature test macros
have been set up in glibc, since <features.h> is no portable header and
not meant to be included directly by applications. The way to do it is
to include a libc header which in turn includes <features.h>. However,
many of the glibc headers check __USE_POSIX (a glibc internal macro
defined if _POSIX_C_SOURCE is defined) and determine which interfaces
to expose already, making the headers inappropriate for our goal.
Those which don't depend on _POSIX_C_SOURCE, and are also available
since ANSI C89, are only <assert.h>, <errno.h> and <math.h>.

<assert.h> is finally favored due to other considerations:
- <math.h> check for __USE_XOPEN in glibc, making a dependency on
_XOPEN_SOURCE, besides it exposes much more interfaces than we need.
- In djgpp, <errno.h> depends on _POSIX_SOURCE to hide definitions of
some errno values when it's defined.
- <assert.h> exposes the fewest interfaces among the 3 headers and, at
the time of writing, checks for only C99 (for __func__), C11 (for
_Static_assert), and _GNU_SOURCE when needed.

Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
diff 1cc6c871 Fri Jan 29 06:31:54 MST 2016 Tobias Klauser <tklauser@distanz.ch> Used NULL constant instead of plain integer for NULL pointer.

The sparse static checker warns about using plain integer 0 as NULL
pointers in the generated lexer code. Fix this by using NULL
consistently for pointers.
H A Dflexdef.hdiff 0fc45ce9 Fri Oct 02 08:48:21 MDT 2020 Eric S. Raymond <esr@thyrsus.com> Clean up various sporadic symbol definitions that weren't going through ctrl.

Includes handling of --nounistd, --always_interactive, --never_interactive, --stack,
their corresponding lexer items, and and noinput.

An unavoidable side effect is that the place where "#define
YY_NO_INPUT 1" is inserted, if it's inserted. has to move because it's
done by a different route - m4 expansion rather than the action_define
function (which is now gone - this was the last use). I have put the
new insertion point just iin time for the first reference to the macro.

Otherwise the only diffs in generarted test code are symbol
definitions becoming visible.

#56 in the retargeting patch series
diff 01f4aadd Tue Sep 22 04:41:54 MDT 2020 Eric S. Raymond <esr@thyrsus.com> gen_next_state(true) becomes m4 code.

As with patch #20 in this series, the changes in generated code fall in the classes:

1. Addition of comments. I elected to copy the comments from the
generator functions into their corresponding m4 macros in hopes of
making the generated code less nasty to read.

2. Lines like "if ( yy_current_state >= 12 )" changing so the numeric
literal is replaced by YY_JAMSTATE + 1. This was a consequence of the
change in #15 to simplify the C code generators so they could be
translated into static nacros.

3. "YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : YY_NUL_EC);:
being replaced by "YY_CHAR yy_c = (*yy_cp ?
*(yy_ec+YY_SC_TO_UI(*yy_cp)) : YY_NUL_EC);" The strange way of
indexing yy_ec avoids a syntactic collision with the use of [] as
m4 quotes.

The gen_next_state(false) case was translated to m4 at patch #20

#22 in the retargeting patch series
diff 01f4aadd Tue Sep 22 04:41:54 MDT 2020 Eric S. Raymond <esr@thyrsus.com> gen_next_state(true) becomes m4 code.

As with patch #20 in this series, the changes in generated code fall in the classes:

1. Addition of comments. I elected to copy the comments from the
generator functions into their corresponding m4 macros in hopes of
making the generated code less nasty to read.

2. Lines like "if ( yy_current_state >= 12 )" changing so the numeric
literal is replaced by YY_JAMSTATE + 1. This was a consequence of the
change in #15 to simplify the C code generators so they could be
translated into static nacros.

3. "YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : YY_NUL_EC);:
being replaced by "YY_CHAR yy_c = (*yy_cp ?
*(yy_ec+YY_SC_TO_UI(*yy_cp)) : YY_NUL_EC);" The strange way of
indexing yy_ec avoids a syntactic collision with the use of [] as
m4 quotes.

The gen_next_state(false) case was translated to m4 at patch #20

#22 in the retargeting patch series
diff 30788806 Tue Sep 22 02:35:57 MDT 2020 Eric S. Raymond <esr@thyrsus.com> gen_next_match() becomes m4 code.

To verify this patch, notice that the non-whitespace changes in the
generated C from the tests are of only three kinds:

1. Addition of comments. I elected to copy the comments from the
generator functions into their corresponding m4 macros in hopes of
making the generated code less nasty to read.

2. Lines like "if ( yy_current_state >= 12 )" changing so the numeric
literal is replaced by YY_JAMSTATE + 1. This was a consequence of the
change in #15 to simplify the C code generators so they could be
translated into static nacros.

3. "YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]" being replaced by
"YY_CHAR yy_c = *(yy_ec+YY_SC_TO_UI(*yy_cp));". The strange way of indexing yy_ec
avoids a syntactic collision with the use of [] as m4 quotes.

#20 in the retargeting patch series
diff 30788806 Tue Sep 22 02:35:57 MDT 2020 Eric S. Raymond <esr@thyrsus.com> gen_next_match() becomes m4 code.

To verify this patch, notice that the non-whitespace changes in the
generated C from the tests are of only three kinds:

1. Addition of comments. I elected to copy the comments from the
generator functions into their corresponding m4 macros in hopes of
making the generated code less nasty to read.

2. Lines like "if ( yy_current_state >= 12 )" changing so the numeric
literal is replaced by YY_JAMSTATE + 1. This was a consequence of the
change in #15 to simplify the C code generators so they could be
translated into static nacros.

3. "YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]" being replaced by
"YY_CHAR yy_c = *(yy_ec+YY_SC_TO_UI(*yy_cp));". The strange way of indexing yy_ec
avoids a syntactic collision with the use of [] as m4 quotes.

#20 in the retargeting patch series
diff 1d5b34b5 Sun Feb 28 08:49:53 MST 2016 rlar <rlar> change return type and rename int htoi()/otoi() --> unsigned int htoui()/otoui()
diff 1cc5d870 Tue Dec 08 19:12:21 MST 2015 Michael McConville <mmcconville@mykolab.com> Removed flex_realloc().

As with flex_alloc(), replace calls to flex_realloc(), which was just a
wrapper around realloc().
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1d99f7ba Tue Nov 30 06:01:09 MST 1993 Vern Paxson <vern@ee.lbl.gov> Lowered MAX_SHORT out of increased general paranoia.
Added yy_flex_xmalloc() proto
/flex/
H A Dautogen.shdiff 1ba500e9 Mon Jul 22 07:29:53 MDT 2002 Will Estes <wlestes@users.sourceforge.net> rollback on configure.in and autogen.sh because autpoint is broken
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
H A DREADME.mddiff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
diff 1d7763d7 Sun Jun 17 10:17:17 MDT 2001 Will Estes <wlestes@users.sourceforge.net> change copyright/license notices as per Vern's response to Theo
H A Dconfigure.acdiff 0af671a2 Sun Nov 06 14:32:43 MST 2016 Thomas Klausner <wiz@NetBSD.org> Fix unportable test(1) operator.

"==" is only supported by bash, "=" is the standard comparison
operator.
diff 42325b8b Fri Mar 18 13:25:10 MDT 2016 Will Estes <westes575@gmail.com> mention v2.6.2; summarize changes since 2.6.1
diff 53d5bc88 Wed Jun 04 12:52:16 MDT 2014 Will Estes <westes575@gmail.com> upgrade automake version to 1.14.1

Unfortunately, automake 1.14.1 does not play nicely with
AC_CONFIG_AUX_DIR, so upgrading the used automake version required
removing the build-aux directory and letting autoconf's installed
helper files live more over the tree.
diff 53d5bc88 Wed Jun 04 12:52:16 MDT 2014 Will Estes <westes575@gmail.com> upgrade automake version to 1.14.1

Unfortunately, automake 1.14.1 does not play nicely with
AC_CONFIG_AUX_DIR, so upgrading the used automake version required
removing the build-aux directory and letting autoconf's installed
helper files live more over the tree.
diff 1e5a73b1 Wed Jun 04 12:17:46 MDT 2014 Will Estes <westes575@gmail.com> call LT_INIT earlier in configure.ac
diff 54f041e9 Thu Feb 13 09:55:00 MST 2014 Will Estes <westes575@gmail.com> bump AM_GNU_GETTEXT_VERSION to 0.18.1
diff 1f2562d1 Tue Feb 13 10:54:04 MST 2007 Will Estes <wlestes@users.sourceforge.net> make better use of AC_INIT; clean up, simplify and make more robust the generation of the man page
diff c863276f Thu Feb 27 08:37:44 MST 2003 Will Estes <wlestes@users.sourceforge.net> move flex.texi and flex.1 to new doc/ subdirectory
diff 1c8a5f9d Fri Sep 13 15:54:02 MDT 2002 John Millaway <john43@users.sourceforge.net> Created test for reject.
Handled reject-triggered tables in serialization.
diff 1ba500e9 Mon Jul 22 07:29:53 MDT 2002 Will Estes <wlestes@users.sourceforge.net> rollback on configure.in and autogen.sh because autpoint is broken

Completed in 692 milliseconds