| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
| |
Fix the reentrant part; don't "#define yyfoo yyfoo" because it breaks
code that does #ifndef yywrap ..
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
| |
This patch addscompatibility `#defines` for all macros affected by
`%prefix`.
Fixes #113.
|
| |
|
| |
|
|
|
|
| |
warning: conversion to 'unsigned int' from 'int' may change the sign of the result [-Wsign-conversion]
|
|
|
|
|
|
| |
its value [-Wconversion]
struct yytbl_reader, member bread is of type flex_uint32_t
|
|
|
|
| |
which is exclusively used in yy_size_t context
|
|
|
|
| |
suits better, because `yy_n_chars' and `yy_buf_size' are of type `int'
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
The variable yy_n_chars had been of type yy_size_t which is incorrect
given its use in read(). While it might be adviseable to look at
defining a yy_ssize_t, there might be some issues doing this and so, for
now, at least, we'll punt back to int.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
Only the declaration of yy_fatal_error is marked with
__attribute__((__noreturn__)) in case GCC >= 3 is used, but not the
definition. This leads to the sparse static checker to complain about
function declaration mismatch.
Fix it by defining a macro yynoreturn and using it for both the
declaration and the definition of yy_fatal_error.
|
|
|
|
|
|
|
|
|
|
|
| |
The prototype declares yy_fatal_error parameter as "const char msg[]"
while the definition uses "const char* msg" (introduced by commit
e9d5fc713f61b) which causes the sparse static checkers to produce an
error.
Fix this by adjusting the definition to use "const char* msg" as well.
Also change the C++ version accordingly so it matches the declaration in
FlexLexer.hpp.
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The std:: construct exists as of C++98, so we can simply assume it is
supported.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sections of the skeleton.
Patched up a variety of expected errors caused by changing istream* to istream&.
Added a stray 'make' at line 545. Oops.
Changed the buffer_state struct to store std::streambuf* instead of std::istream* for C++ mode. Changed interfaces in FlexLexer.h to take std::istream& instead of *. Backward compatibility temporarily broken.
Patched up backward compatibility with reasonable behavior in the presence of null pointers.
Re-added backward-compatible versions of the yyFlexLexer methods that take iostream pointers. All tests passing.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
const fixes.
-Wconversion fixes for the skeleton files.
param namespace protection (add _ to inline function parameters).
unused variable/code removal.
rename warn to lwarn to avoid conflict with <err.h>.
ctype.h function argument correction.
merged the error functions lerrif and lerrsf -> lerr.
|
|
|
|
| |
clang-3.5.0 now complains about them: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
|
|
|
|
| |
Signed-off-by: Will Estes <westes575@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From the debian change entry:
> Finish fixing the ia64 buffer issue. Previous commits increased
YY_READ_BUF_SIZE (where __ia64__ is defined) but left YY_BUF_SIZE
unchanged, so that didn't fix the problem in the end. In the general
case, the latter is twice the former. Therefore set it to the same
ratio in the ia64 case.
In general, this sort of architecture specific fix is not the path we
want to take, but the cleanup should be done in a more organized way
in the future and getting it working would be preferrable now.
|
|
The *.[chly] sources are now in the src directory. This implies a
bunch of changes in Makefile.am and friends to account for the new
location. The .gitignore files are now more local to places where various object files and generated source files occur.
|