falcon(1)
πΈ NAME πΈ
okay bestie, meet falcon β The Falcon Programming Language command line interpreter. That's the whole falcon(1) manual-name vibe from Falcon User Manuals, and we're about to make it make sense π
β¨ SYNOPSIS β¨
falcon [options] [main_script] [script_options]
π¦ DESCRIPTION π¦
The falcon command line interpreter is used to launch, compile, assemble or debug scripts written in the Falcon Programming Language. The command line interpreter pushes the core module and the rtl module in the script load table, so they are available by default to all the scripts.
The default operation is that of launching the given script, or reading it from standard input if the script name is not given. By default, falcon saves also the compiled module of the script in the same directory where it is found, changing the extension to .fam.
The main_script can be a βlogicalβ module name, a relative path or an absolute path. In case it's a logical module name, that is, a script name without extension nor leading path, it is searched through the load path. The default load path is determined by the compilation options of the interpreter, and usually it includes the current directory. The environment variable FALCON_LOAD_PATH and the command line option -L can change the default module search path.
When the main module is found, its path is added to the module search path; in other words, there isn't any need to specify the path containing the main module to have other modules in its same directory to get loaded. The main module and other source Falcon module it loads can be stored in a directory that is not listed in the module search path; indicating an absolute or relative path as the main_script parameter will add that path on top of the active search path.
If not differently specified, falcon will search for .fam modules newer than the relative .fal source scripts and will load those ones instead of compiling the sources.
Options past the script name will be directly passed in the args[] global variable of the script.
The interpreter is compatible with the UNIX script execution directive #!. A main script can have on the very first line of the code the directive
#!/path/to/falcon
to declare to the shell that the falcon command line is to be loaded. If falcon command line interpreter is also in the system PATH environment variable, which is usually the case of a normal installation, then the interpreter directive may also be simply
#!/bin/env falcon
It is then simply necessary to make the main script executable with
chmod 744 script_name
to be able to call the script directly.
Scripts executed in this way will add their path to the falcon module load path as soon as they are loaded, so other modules referenced by them will be searched in the directory where they reside before being searched elsewhere.
Options to the falcon compiler may be passed normally by writing them after the execution directive in the main script.
Since version 0.8.12, the falcon command line interpreter has also an interactive mode which accepts statements and provide results as the expressions are evaluated.
π OPTIONS π
-cβ Compile but do not execute. This makesfalconcompile the given module into a.famfile and then terminate. By default, the.famfile is written to a file with the same name as the input one, with the.famextension.-Cβ Check for memory leaks in VM execution. Like the-Moption offaltest, this function sets the falcon engine memory allocators to slower functions that checks for memory to be allocated and deallocated correctly during the execution of a module. If the script is executed, before Falcon exits it writes a small report to the standard output.-d <directive>=<value>β Sets the given directive to the desired value. Compilation directives and their values are the ones that scripts can set through thedirectivestatement.-D <constant>=<value>β Sets the given constant to the desired value. Constants are made available at compile time, and can be employed in macro and meta compilation.-e <enc>β Set given encoding as default for VM I/O. Unless the scripts select a different I/O encoding, the streams that are provided to the falcon VM (like the output stream forprintf) are encoded using the given ISO encoding. This overrides the default encoding that is detected by reading the environment settings. In example, if your system usesiso-8859-1encoding by default, but you want your script to read and writeutf-8files, use the option-e utf-8.
The -e option also determines the default encoding of the source files. To override this, use -E.
-E <enc>β Set source script encoding. As-e, but this determines only the encoding used by falcon when loading the source scripts. This options overrides-evalues, so it can be used to set the script encoding when they have to read and write from different encodings.-fβ Force recompilation of modules even when.famare found.-hor-?β Prints a brief help on stdout and exits.-iβ Interactive mode. Falcon interpreter reads language statements from a prompt and present evaluation results to the user.-l <lang_code>β Select a different language code for internationalized programs. This option loads an alternate string table for all the modules loaded. If the table doesn't exist or if the modules doesn't have a.ftrfile containing the translation, the operation silently files and the original strings are used instead. Language codes should be in the international ISO format of five characters with a language name, an underscore and the regional code, like inen_US.-L <path>β Changes the default load path. This overrides both the internal built in settings and the contents of environment variableFALCON_LOAD_PATH. Each directory in the path should be separated by;and use forward slashes, like this:
falcon -L
-mβ Use temporary files for intermediate steps. By default compilation is completely performed in memory; this option makes falcon to use temporary files instead.-Mβ Do NOT save the compiled modules in.famfiles.-o <fn>β Redirects output to<fn>. This is useful to control the output of falcon when using options as-c,-a,-Setc. If<fn>is a dash (-) the output is sent to stdout.-p <module>β Preloads the given module as if it were loaded by the main script.-Pβ Ignore default load paths and uses only the paths set via the-Lswitch.-rβ Ignore source files and only use available.fam. This does not affects the main script; use the-xoption if also the main script is a pre-compiled.fammodule and source script must be ignored.-Sβ Produce an assembly output. Writes an assembly representation of the given script to the standard output and the exit. Use-oto change file destination.-tβ Generates a syntactic tree of the source and writes it to the standard output, then exits. The syntactic tree is a representation of the script that is known by the compiler and used by the generators to create the final code. This option is useful when debugging the compiler and to test for the correct working of optimization algorithm.-Tβ Force input parsing as.ftd(Falcon Template Document). Normally, only files ending with.ftd(case sensitive) are parsed as template document; when this switch is selected, the input is treated as a template document regardless of its name.-vβ Prints copyright notice and version and exits.-wβ After execution, requires the user to confirm program termination by pressing Enter (<enter>in the page). This helps in point & click environments, where Falcon window is closed as soon as the program terminates.-xβ Executes a pre-compiled.fammodule.-yβ Creates a template file for internationalization. This option creates a single.fttfile from a single source,.fammodule or binary module. By default, the name of the template is the same as the module plus.temp.fttadded at the end; it is possible to change the destination template file using the-ooption.
π FILES π
/usr/lib/libfalcon_engine.soβ Default location of the Falcon Engine loadable module./usr/lib/falconβ Default directory containing Falcon binary modules.
π ENVIRONMENT π
FALCON_LOAD_PATHβ Default search path for modules loaded by the scripts.FALCON_SRC_ENCODINGβ Default encoding for the source scripts loaded by falcon (when different from the system default).FALCON_VM_ENCODINGβ Default encoding for the VM I/O streams (when different from system default).
π AUTHOR π
Giancarlo Niccolai <gc@falconpl.org>
π₯ SEE ALSO π₯
falrun(1) faldisass(1) fallc.fal(1)
π LICENSE π
This document is released under the βGNU Free Documentation License, version 1.2β. On Debian systems, the complete text of the Free Documentation License, version 1.2, can be found in /usr/share/common-licenses/.
xoxo bestie, that's the whole page π
β source/version: Falcon toolset; date: April 2007; manual: falcon(1). Now go launch something iconic β¨
π¦ where this page comes from
- nixos 26.05: falcon 0-unstable-2023-11-19
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms