History log of /freebsd/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l (Results 1 – 13 of 13)
Revision Date Author Comments
# 4bddff08 01-Jun-2024 Mark Johnston <markj@FreeBSD.org>

libdtrace: Work around a warning from flex

When compiling dt_lex.l, flex produces warnings of the form:

dt_lex.l:413: warning, trailing context made variable due to preceding '|' action
dt_lex.

libdtrace: Work around a warning from flex

When compiling dt_lex.l, flex produces warnings of the form:

dt_lex.l:413: warning, trailing context made variable due to preceding '|' action
dt_lex.l:412: warning, dangerous trailing context
dt_lex.l:412: warning, dangerous trailing context

Here, trailing context refers to the use of "$", which expands to "/\n".

The meaning behind these warnings is described in the first two
paragraphs of the flex manual's DEFICIENCIES/BUGS section:

Some trailing context patterns cannot be properly matched and generate
warning messages ("dangerous trailing context"). These are patterns
where the ending of the first part of the rule matches the beginning of
the second part, such as "zx*/xy*", where the 'x*' matches the 'x' at
the beginning of the trailing context. (Note that the POSIX draft
states that the text matched by such patterns is undefined.)

For some trailing context rules, parts which are actually fixed-length
are not recognized as such, leading to the above mentioned performance
loss. In particular, parts using '|' or {n} (such as "foo{3}") are
always considered variable-length.

Here, the warnings appear to be bogus in this case. The lexer has no
problem matching either of the referenced patterns, e.g.,

printf("foobar

or

# 1 "asdfasdf

Introduce a small amount of code duplication to silence the warning.

MFC after: 2 weeks

show more ...


# ad3174ec 31-Dec-2023 Mark Johnston <markj@FreeBSD.org>

libdtrace: Fix line number reporting in error messages

MFC after: 1 week


# 150fc89a 20-Feb-2021 Mark Johnston <markj@FreeBSD.org>

libdtrace: Trivial style fixes to force dt_lex.c to be regenerated

After commit 8ba333e02e ("libdtrace: Stop relying on lex
compatibility"), there have been several reports of incremental
buildworld

libdtrace: Trivial style fixes to force dt_lex.c to be regenerated

After commit 8ba333e02e ("libdtrace: Stop relying on lex
compatibility"), there have been several reports of incremental
buildworlds failing since make does not know that dt_lex.c needs to be
regenerated, and I want to avoid this when merging to stable/13.

MFC with: 8ba333e02e

show more ...


# f65e699c 17-May-2015 Mark Johnston <markj@FreeBSD.org>

As dtrace(1) processes D libraries under /usr/lib/dtrace, the compiler may
return an error if one of the depends_on directives in a library is not
satisfied. In this case, libdtrace is supposed to ig

As dtrace(1) processes D libraries under /usr/lib/dtrace, the compiler may
return an error if one of the depends_on directives in a library is not
satisfied. In this case, libdtrace is supposed to ignore the library and
carry on. However, the remainder of the library may still be buffered by
the lexer, causing libdtrace to erroneously continue processing it on the
next call to yyparse(). Fix this by explicitly flushing the input buffer
each time the compiler state is reset.

MFC after: 3 weeks

show more ...


# bc96366c 17-Jan-2015 Steven Hartland <smh@FreeBSD.org>

Mechanically convert cddl sun #ifdef's to illumos

Since the upstream for cddl code is now illumos not sun, mechanically
convert all sun #ifdef's to illumos #ifdef's which have been used in all
newer

Mechanically convert cddl sun #ifdef's to illumos

Since the upstream for cddl code is now illumos not sun, mechanically
convert all sun #ifdef's to illumos #ifdef's which have been used in all
newer code for some time.

Also do a manual pass to correct the use if #ifdef comments as per style(9)
as well as few uses of #if defined(__FreeBSD__) vs #ifndef illumos.

MFC after: 1 month
Sponsored by: Multiplay

show more ...


# 8e648814 26-Jun-2014 Rui Paulo <rpaulo@FreeBSD.org>

MFV illumos

4474 DTrace Userland CTF Support
4475 DTrace userland Keyword
4476 DTrace tests should be better citizens
4479 pid provider types
4480 dof emulation is missing checks

MFC after: 2 weeks


# 1670a1c2 02-Aug-2010 Rui Paulo <rpaulo@FreeBSD.org>

MFV OpenSolaris DTrace userland bits.


# 33ae3dfe 20-Jun-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Unbreak platforms with char unsigned by default. Oddly enough, GCC isn't
satisfied with a simple cast to int in the check against EOF, so the fix
is a bit involved by actually having to go through a

Unbreak platforms with char unsigned by default. Oddly enough, GCC isn't
satisfied with a simple cast to int in the check against EOF, so the fix
is a bit involved by actually having to go through a temporary variable.

show more ...


# 283bcf71 18-Jun-2010 Alexander Kabaev <kan@FreeBSD.org>

Do not allow EOF token to be put back into input buffer.

This reimplements previous change from r20930 in more generic way.

MFC after: 1 week


# e9bc68ba 11-Jun-2010 Alexander Kabaev <kan@FreeBSD.org>

In dtrace lexer, do not unput token if it is EOF.

This is harmless with OpenSolaris fex and yacc, but with FreeBSD
causes '\xff' symbol to be physically put into input buffer, causing
subsequent syn

In dtrace lexer, do not unput token if it is EOF.

This is harmless with OpenSolaris fex and yacc, but with FreeBSD
causes '\xff' symbol to be physically put into input buffer, causing
subsequent syntax error.

MFC after: 1 week

show more ...


# 51e031e8 26-Apr-2008 John Birrell <jb@FreeBSD.org>

* Define YY_INPUT for flex since input() can't be re-defined.
* On FreeBSD define both LITTLE_ENDIAN and BIG_ENDIAN and then set the
BYTE_ORDER to the one we are using. On Solaris they define one o

* Define YY_INPUT for flex since input() can't be re-defined.
* On FreeBSD define both LITTLE_ENDIAN and BIG_ENDIAN and then set the
BYTE_ORDER to the one we are using. On Solaris they define one or
the other but not both. For us to keep using FreeBSD header files,
we need to use endian definitions the same way we do in pure BSD
code.

show more ...


# 20594ebf 26-Apr-2008 John Birrell <jb@FreeBSD.org>

This commit was generated by cvs2svn to compensate for changes in r178528,
which included commits to RCS files with non-trunk default branches.


# 6ff6d951 25-Apr-2008 John Birrell <jb@FreeBSD.org>

This commit was generated by cvs2svn to compensate for changes in r178479,
which included commits to RCS files with non-trunk default branches.