yrunner − run libbzdev Java code using YAML for
scripting [OPTION]... LAUNCHERS
[FILE]...
[OPTION]...
[OPTION]...
[OPTION]...
YRUNNER (YAML Runner) uses a stylized YAML file to run an
application, typically a simulation or animation. For the
first form of the command, the argument is a comma-separated
list whose first entry is the name of a provider for a
launcher and whose remaining entries are the names for
providers of configuration data for additional classes that
may be returned or may appear as arguments in expressions.
The option will list the available names. Each input file is
the name of a file in YAML format describing the input for
the application. When "−" is used to
denote standard input, the options should be terminated with
"−−". Input files are processed
in the order in and use the YAML syntax described in the
manual page Expressions and related statements in the file
are evaluated once and in lexical order. Expressions use the
syntax recognized by the Java class
org.bzdev.util.ExpressionParser. The API documentation for
that class has the full syntax. The program configures
expression parsers so that scripting mode, import mode, and
global mode are disabled. In this case, an expression can be
a variable definition, a function definition, or an
expression that starts with the character "=".
Expressions can define variables, but two are predefined:
and which by default are bound to instances of the class
java.io.PrintWriter that use standard output and standard
error respectively. Options described below can alter these
variables and set up additional IO streams. End of options.
List all the URLs provided in and/or options and then exit.
List the names for launchers and launcher-data additions
available and then exit. The names listed depend on the
and/or options. If the option is added, each name will be
paired with a description. For each launcher or
launcher-data name, there is a corresponding set of Java
classes that indicate the types of the values that methods
and constructors can return, the types of arguments, the
whose static methods are treated as functions, the classes
whose instance methods are available, and the classes that
provide constants (static, final fields or enumeration
types). Modify the behavior of the option so that each
launcher and launcher-data name will be followed by a dash
and a description of the launcher or launcher data. Generate
documentation for classes, functions, methods, and constants
that can be used in ESP statements embedded in YAML files.
This is dependent on the specified at the end of the command
line. One or more options will be required to point to the
appropriate API documentation. At a minimum, the URLs must
reference the documentation for the standard Java class
libraries and the documentation for the BZDev class library.
The and/or options are also needed: otherwise the launchers
may not be found. will exit after the documentation is
generated. The documentation will be sent to standard
output, and will be an HTML file. Classes whose API
documentation is not available will not be shown. Add a
common-separated list of module names to any existing list,
or create a new list if there is no existing list. The
option is needed when there are no module dependencies that
would make the specified modules accessible. An example is a
module that is used in a script but that does not provide
implementations of the class
org.bzdev.obnaming.NamedObjectFactory. Specifies directories
and jar files for the class path (for the option) and the
module path (for the option). may be a URL giving the
location of the classes or a path name in the local file
system. The character "|" is used as a path
separator, with the sequence "||" interpreted as a
literal "|", so that for an odd number of
"|" characters in a row, only the final one is
treated as a path separator. If file name must start with
"|", use a "file" URL and encode the
"|" as %7C. If the starting sequence of a path
component contains a ":" (the first one if there
are more than one), and that sequence of characters is
syntactically valid at the start of a URL, the path
component is treated as a URL. Otherwise it is a file name.
This rule implies that Windows file names such as
C:mycode.jar will be confused with a URL, so a URL should be
used instead. If a file name is not absolute, it is
interpreted relative to the current working directory. The
directory "..." refers the directory in which the
BZDev library’s JAR files resides (on Debian Linux
systems, this directory is /usr/share/java, the standard
location for Java libraries.) Multiple and options are
allowed. For file names, a leading "~" followed by
the name separator ("/" for Unix) is expanded to
the user´s home directory, a file name consisting of
only "~" is replaced with the user´s home
directory, a leading "~~" is replaced with
"~", and a leading "..." followed by the
name separator ("/" for Unix) is replaced by the
directory in which the BZDev class library’s JAR file
is located. For the case, a component can be any could
appear in a Java option, with the exception that a
’|’ has to be escaped. If a codebase has classes
in the unnamed package, the option must be used as all code
bases on the module path must contain classes in named
packages. Define the name of a Java property and give it a
value. See the java command for details. The syntax for this
argument is the same as that defined for the similarly named
option for the command. The properties
"java.system.class.loader",
"scrunner.sysconf", and
"scrunner.usrconf" cannot be altered by this
option (or the corresponding option). If those must be
changed, add a option before the option in the shell script
(or alternatively, create a new script). Binds a scripting
language variable named to a directory accessor (an instance
of org.bzdev.io.DirectoryAccessor) for the directory The
directory accessor allows one to read and create files in or
a subdirectory of using methods described in the
DirectoryAccessor documentation. may not be or
Prints the java command that would be executed but does not actually execute it. When the scripts provided as arguments to yrunner have been run and if there are no exceptions that have not been caught, yrunner will exit with a status of 0. Without this option, yrunner will not exit if currently running threads have not run to completion. Opens for reading and defines a script variable bound to the input stream for that file. may not be or Causes a single-argument option to be used by the java launcher that invokes (there is an analogous option used by Add a colon-separated list of directories or modular JAR files to the module path. This option may appear multiple times. While the path separator is a colon on Linux/Unix systems, it is a semicolon on Windows systems. Unlike the option, a component of the path may not be a URL. Whether to use a option or a B. −−codebase option is a matter of style. One might prefer the option when the module path contains directories. Unlike Java, multiple or options may be provided. If so, the paths are combined. Specify a file for output from scripts. A value of "−" indicates standard output, which is the default. Standard output can be specified only once for the "−o" and "−o:" options. The name of the output file in expressions is so that each line is flushed. Opens for writing and defines a script variable bound to the output stream for that file. If is "−", standard output is used. Standard output can be specified only once for the "−o" and "−o:" options with one exception: the variable can also be set to either standard output or to a file This option may not be used to specify the value for the variable The variable will be set to an instance of the Java class PrintWriter and configured so that each line is automatically flushed. Maximize the quality of the random number generator provided by org.bzdev.util.StaticRandom. Assign a random access file to the scripting-language variable The object created will be an instance of java.io.RandomAccessFile, constructed using a file and a mode that is either or may not be or Print a stack trace if an error occurs when running scripts. Set the variable to the string may not be or Set the variable to the boolean which must have the values or may not be or Set the variable to the number which is treated as an integer. may be followed (with no intermediate spaces) by the letters ’h’ (hecto), ’k’ (kilo), ’M’ (mega), or ’G’ (giga), which multiply the value by 1000, 1,000,000, or 1,000,000,000 respectively. may not be or Set the variable to the number which is treated as a long integer. may be followed (with no intermediate spaces) by the letters ’h’ (hecto) ’k’ (kilo), ’M’ (mega), ’G’ (giga), ’T’ (tera), ’P’ (peta), or ’E’ (exa), which multiply by 100, 1000, 1,000,000, 1e9, 1e12, 1e15, 1e18 respectively. may not be or Set the variable to the number which is treated as a double-precision floating-point number. may be followed (with no intermediate spaces) by the letters ’y’ (yocto), ’z’ (zepto), ’a’ (atto), ’f’ (femto), ’p’ (pica), ’n’ (nano), ’u’ (micro), ’m’ (milli), ’c’ (centi), ’h’ (hecto), ’k’ (kilo), ’M’ (mega), ’G’ (giga), ’T’ (tera), ’P’ (peta), ’E’ (exa), ’Z’ (zetta), or ’Y’ (yotta), which multiply by 1.0e−24, 1.0e−21, 1.0e−18, 1.0e−15, 1.0e−12, 1.0e−9, 1.0e−6, 1.0e−3, 1.0e−3, 1.0e2, 1.0e3, 1.0e6, 1.0e9, 1.0e12, 1.0e15, 1.0e18, 1.0e21, or 1.e24 respectively. may not be or Print the URL of each JAR file in class path, including entries added via the option, followed by an indented line containing the specification version for the JAR file and then the implementation version. If either is missing, a "−" is printed in its place. Provide URLs for API documentation. The are a ’|’ separated list for which each URL must point to the directory containing this documentation. On Linux systems, typical values for the mandatory URLs (the ones for Java libraries that are always provided) are and Pairs of the character ’|’ are replaced with single ’|’ in order to allow the character ’|’ to appear in a URL. If a URL does not have a protocol, it is assumed to be a file name. The option will use these to set up links to API documentation included in these directories and their subdirectories. When an error occurs, will try to indicate the line at which the error occurred. The line number will be closest when the error is a YAML syntax error. For some errors (for example, an inappropriate use of an alias), the text of the error message is the best guide as to what failed. When the error is due to the evaluation of an expression, the error message may include some of the source code surrounding the error and a caret ("^") pointing to the location where the error was detected. If a line number cannot be determined, will try to provide a location represented as a sequence of numbers and property keys. The numbers represent list elements, indexed from 1, and the keys are the keywords preceding a colon in some YAML statement. The sequence is in the order in which YAML statements are nested. Some errors that appear to be syntax errors are actually caught when expressions are evaluated. For example - create: - var: foo, factory f, ... would actually create a variable named "foo," and reference a factory whose "f," instead of the desired value "f" because YAML’s syntax does not require quotation marks around strings in this case.
System configuration file that
allows a specific Java launcher, class-path entries, and
property definitions to be used. The form starting with
/etc/opt may be used on some systems (e.g. Solaria). User
configuration file that allows a specific Java launcher,
class-path entries, and property definitions to be used.
property definitions in this file override those in the
system configuration file.
https://en.wikipedia.org/wiki/YAML
https://yaml.org/spec/1.2/spec.html