NAME
Felix tools
SYNOPSIS
flxl [-Iinclude-dir] filebasename
flxp [-Iinclude-dir] filebasename
flxm [-Iinclude-dir] filebasename
flxd [-Iinclude-dir] filebasename
flxb [-Iinclude-dir] filebasename
flxcc control-filename
flxg [-v] [-Iinclude-dir] filebasename
flx_run libname
flx_doc −−outdir=docidr filename ..
flx [−−version] [−−help] [−−test] [−−force] [−−echo] [−−time] [−−inline] [−−static] [−−optimise] [−−optimize] [-c] [ [−−pkg=<pkg-config pkg>] [<file>.cpp] [<file>.o] [<file>.a] [<linkops>]..] filebasename
DESCRIPTION
The filebasename specifies the felix program to run. If there is an extension it should be .flx, if not it defauts to .flx.
flxl lexes the input and prints the token list to standard output
flxp lexes and parses the input and prints the parse tree to standard output
flxm lexes, parses, folds constants and performs macro expansion of the input and prints the AST tree to standard output
flxd lexes, parses and desugars the the input and prints the desugared AST tree to standard output
flxb lexes, parses, desugars and binds identifiers and prints the bindings to standard output
flxcc reads a preprocessed C header file and writes Felix wrapper bindings to out. The command accepts an argument which specifies wrapper generation configuration parameters.
flx_doc Felix documentation generator. The −−outdir=dirname option specifies the directory into which to put documentation. Defaults to out_doc. Each of the subsequently listed filenames should be a Felix (*.flx) file, which is treated as a library. The documentation processor produces a set of HTML files documenting the interface. Comments specified with either the publish prefix or comment statement are also emitted into the documentation.
flxg lexes, parses, desugars, binds, and generates C++ code. Two files, filebase.cpp and filebase.hpp are created. Use the -v option for verbose output.
flx is a load and go test harness which compiles its argument to C++, compiles and links the C++ using gcc, then executes the resulting library using flx_run.
flx options
−−test
Forces use of the Felix system in the current directory.
Intended for use testing during development.
−−force
Forces both Felix and C++ recompilation and linking.
Normally, timestamps are checked, and compilation is skipped
if the program is up to date.
−−echo
Indicates what the flx script is doing, prints external
commands such as the C++ compilation command line. Use to
check your options are being processed correctly by the flx
script.
−−debug
Tells the flxg compiler to print extensive details of its
compilation process to help debugging.
−−inline
Enables experimental inlining features. May slow down Felix
compilation significantly. May cause significant code
bloat.
−−optimise
−−optimize
Enables inlining and passes -O3 to the C++ compiler.
−−static
Force linking of an executable instead of a shared
library.
−−version
Prints version and exits.
−−time
Times execution of the target program using the time
command. Note −− compilation time is not
included.
−−help
Runs ’man flx’ and exits.
-c
Generates but does not execute the program. Warning
−− this option is part of the felix options. It
must be given before any C++ compiler options, or it will
just be passed directly to the C++ compiler, resulting in
generation of object files without linking, but the flx
script will try to run the linked output anyhow (possibly
resulting in an old version being executed).
−−pkg=<pkg-config
pkg>
Specifies the particular C library is required. This option
causes the required flags to be added to compilation and
link steps to allow #includes to find the headers, and to
link the library to the program. This option uses the
pkg-config program to obtain this data. May be specified any
number of times.
*.cpp *.cxx
*.o *.a
Files ending in these extensions are normally recognized by
the C/C++ compiler/linker harness are passed to it during
C++ compilation and linkage steps. This allows linking Felix
to arbitrary C, C++ codes available as source, object files,
or in an archive.
<link
opts>
Various options normally recognized by the C/C++
compiler/linker harness are passed through to it
transparently.
filebasename
The name of the Felix program to run. May be given with or
without the .flx extension. This program is compiled with
the flxg driver to produce filebasename.cpp which is then
compiled and linked with other specified files. Currently
only one Felix file may be given.
USE
flxg is the compiler proper. flx[lpmdb] are provided to aid in debugging, and perform successive phases of the compilation process.
flx is a script which combines felix compilation, C++ compilation of the output, and execution using the standard program driver, for rapid prototyping in a scripting style.
flxcc is the wrapper generator for C headers.
flx_doc is the documentation generator. It can be used to create HTML pages documenting any Felix code files.
DRIVERS
flx_run is the standard prgram driver. Its argument is a shared library which is passed to dlopen (note you need to use ./lib.so on linux to preempt the stanard search path).
The driver creates a single thread from the libraries main entry point _init_ and runs the thread until it terminates, then exits. The message type here is void and the driver exists with an error diagnostic if the thread tries to read any messages.
flx_sif is like flx_run except that it reads standard input and passes lines to the single instance thread. The lines include terminating newline character. A zero length line is passed at end of file. The message types is std::basic_string<char>
FILE EXTENSIONS
*.flx
Felix input files.
*.cpp
*.hpp
Generated C++ output files.
*.par
Precompiled header file.
VERSION
1.1.1_rc1
SEE ALSO
felix(1)
for a language introduction and man page index
flx(1) for a list of the tools.
flxcc(1) for a description of the wrapper generator
tool.
flx_lit(1) for a description of literals
flx_op(1) for a list of operators
flx_cop(1) for a list of C operator precedence names
flx_key(1) for a list of keywords
flx_grammar(1) for a grammar summary
flx_lib_typ(1) for a list of library types
flx_dir(1) for a list of directives
flx_exec(1) for a list of executable statements
flx_decl(1) for a list of declarative statements
flx_bind(1) for a list of binding statements
WEB SITE
See http://felix.sourceforge.net
AUTHOR
John Maxwell Skaller, mailto:skaller [AT] users.net