| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
From-state actions now execute on EOF, but we don't check for their presence
when deciding if we should test against EOF. This led to from-state actions
executing only if other conditions necessitating EOF-testing are present. Added
the check.
refs adrian-thurston/ragel#80
|
|
|
|
|
|
|
|
|
|
|
| |
The canonical identity of a file on Unix is the combination of device
and inode numbers. This code checks both possible paths for the
colm executable: directly in the build directory (when colm is linked
against libcolm statically) or in libtool's `objdir` subdirectory (when
colm is linked against libcolm dynamically).
This fails in two situations I can see: when /proc is not mounted or
doesn't exist, or when colm is installed using a hard link.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When running from the build directory, if one forgets to give -B, and colm was
previously installed at the current prefix, colm programs will build against
the installed version, not the local source tree. This won't be immediately
obvious and could lead to confusion during development.
To prevent this, try to find the buildDir if one is not given. The tests can
continue to specify the buildDir with -B, which is the most safe way.
The buildDir is defaulted by testing the buildDir known at compile time against
LD_LIBRARY_PATH. Libtool on ubuntu 20.04 will place the buildDir at the head of
LD_LIBRARY_PATH. It seems likely that it would do this on all systems, making
it a seemingly good test.
|
| |
|
| |
|
|\
| |
| | |
Some build system fixes
|
| |
| |
| |
| |
| | |
They are usually direct subdirectories of the prefix, but they can be
different, for example in Debian's multiarch scheme.
|
| |
| |
| |
| | |
This makes it easier to use a cross-compiler, for example.
|
| |
| |
| |
| |
| | |
Everything built by make should be cleaned up by make clean,
according to the automake manual.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
The list of linked headers comes from RUNTIME_HDR in src/Makefile.am.
Also don't delete it in clean, but do delete it in distclean, like any
file configured by config.status.
|
| |
| |
| |
| |
| | |
This header has been empty since 2010. It is not installed, so it
does not change the installation.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This means that automake makes sure it's remade when configure{,.ac} or
version.h.in change.
Also don't delete it in clean, but do delete it in distclean, like any
file configured by config.status.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This cannot work reliably when using a separate build dir.
Instead, add a new switch to specify the build directory
explicitly. Use libtool to build the output, defaulting
to statically linking libcolm.
|
|/
|
|
| |
Helps with adrian-thurston/ragel#3.
|
|
|
|
|
| |
memcpy in string_alloc_full was copying 32 bytes, while the string
is only 25 bytes including the terminating null byte.
|
|
|
|
|
|
| |
If --disable-static or --disable-shared is used, then pass this info to
compilation of main.cc and link with libcolm appropriately. Default to a static
as has been done for some time. refs adrian-thurston/ragel#70.
|
|
|
|
|
| |
Was using data_DATA, which lands in PREFIX/share. This is a nuisance for
packaging. refs #134
|
| |
|
|
|
|
| |
This includes output filter, file name functions, and line directive generation
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Write statement belongs in ragel, but can't yet move out CodeGenData. It's at
the base of many codegen classes that will live in colm. The functionality here
needs to be lifted up out of the base.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Decide signedness of "char" on at runtime (probably compile time) using a check
on CHAR_MIN. This should work with cross compiling setups.
With this approach, if you plan to use "char" on ARM you cannot literally
specify outside the range 0-127 using decimal/hex. If you need that you can use
"signed char" or "unsigned char".
|
|
|
|
|
|
| |
Previously allowed only identifier as the base. This is necessary to use the
generated DATA() as the base in these expressions, which can be modified by
access and therefore must be an expression.
|
| |
|
| |
|
|
|
|
|
| |
Still running into issues on gentoo with BUILT_SOURCES. Instead make all the
necessary dependencies explicit, using the source code files.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the pop to cast the pointer and take the value using a pointer to the
requested type, then return that tmp.
Previously we were taking the value using the tree type, then casting the
value. During the cast of the value the high bits are dropped, and that's where
the value actually lives, when on a big-endian system. Didn't notice the
problem on little-endian systems because it happens to work fine there.
Fixes #126.
|
|
|
|
|
|
| |
- added downref when undoing a tree push
- using correct opcode for undoing pushing stream
- added an upref when sending back ignored trees
|
|
|
|
|
| |
This was left over from the time colm and ragel were in one repos. Now just use
VERSION and PUBDATE.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is identical to the basic tree iterator, except it visits ignore tokens.
This makes it possible to rewrite comments, albeit, primitively. Constructors
for tokens don't work right. Though we can set the data field.
The following code can be used to turn comments into newlines:
for I1: comment in with_ignore(Flux) {
I1.data = "\n"
}
|
| |
|
|
|
|
|
|
|
| |
More recent compilers will now warn about moving and copying non-trivial types,
due to the potential for internal pointers. This is a risk the libraries always
had, and it is expected to not put those things into the containers. Casting to
void* removes the new warnings and better expresses what the code is doing.
|
| |
|
| |
|
|
|
|
|
|
|
| |
If we use fdopen for stdin/out/err we cannot close it to free the file struct
without also closing the file descriptor. If fopencookie is available, use that
to wrap the file descriptor, but allow closing without closing the fd. This is
useful when embedding in long running programs.
|
|
|
|
| |
Wrap dump_contents in #ifdef DEBUG.
|
| |
|
| |
|
|
|
|
|
|
| |
Elimintates associated ambiguity between extending statements and starting a
new one. Bare send was a nice idea, but it is too much for the language to
bear.
|
|
|
|
| |
Don't try and compute the path to the command when it is already specified.
|
|
|
|
| |
refs #112
|
| |
|
|
|
|
|
|
|
|
| |
Redefine happens during declaration. The existing langEl is removed from the
map and a newly-declared lel replaces it. If the new list of productions
references [...] the productions from the previous lel are moved into the new
one, in its place. A copy would be preferrable, as move may require some fixup,
but move gives an initial functional implementation. refs #112
|