-
Notifications
You must be signed in to change notification settings - Fork 8
Command Line Options
arden2bytecode [OPTIONS] [FILE]...
Modes (mutually exclusive)
-
-h, -?, --help
Display help to command line options. -
-c, --compile
Compile the input files (must be of.mlmtype) and write output of compiler to.classfiles. See -d for output options. -
-r, --run
Run the input files directly. The input files must be either.mlmfiles which will be compiled in-memory or already compiled.classMLMs. See -a for providing arguments to the MLMs. -
-e, --engine
Run an evoke engine that waits for events or evoke triggers and executes the input MLMs when they are scheduled. It can be terminated viactrl+c. See Scheduling for more information about triggers and events. See -p on how to listen to external events.
Control options
-
-v, --verbose
Verbose output mode. For example the input files or received events will be explicitly listed in this mode. -
-n, --nologo
Don't display the header with program name and licensing information. -
-d directory, --directory directory
Output directory into which compiled MLM class files are placed, when compiling with -c. -
-a argument…, --arguments argument…
Specify arguments to the MLM when running with -r. Arguments must be valid Arden Syntax constants, separated by spaces, and must be properly escaped by your command line interpreter. See Arguments for more information about passing arguments to MLMs. -
-p number, --port number
If specified will start a server that listens for event strings on the given port. Intended to be used when running the evoke engine with -e.
See Scheduling for more information.
Execution Context
-
--cp classpath, --classpath classpath
An additional classpath from where other MLMs may be called. Also allows specifying where the database driver may be loaded from. See Using Databases for more. -
--db classname, --dbdriver classname
The class name of the database driver. See Using Databases for more. -
--env text, --environment text
Specify an argument for the execution environment. A JDBC database connection string implies that a JDBC environment will be used. Otherwise a stdio environment handles data input and output via the command line. See Using Databases for more.
All further command line arguments will be regarded as input files.
-
Compile
module1.mlmandmodule2.mlmand save the.classfiles to themodulesdirectory:arden2bytecode -d my_modules -c module1.mlm module2.mlm
-
Run already compiled MLM
hello_world.class:arden2bytecode -r hello_world.class
-
Compile and run
hello_world.mlmwithout saving to.classfile:arden2bytecode -r hello_world.mlm
-
Run two MLMs, first
module1.mlmthenmodule2.mlm:arden2bytecode -r module1.mlm module2.mlm
-
Run MLM without displaying logo:
arden2bytecode -nr hello_world.mlm
-
Run the MLM with a list, string, number and duration as arguments:
arden2bytecode -a '(3.5,2)' '"Jane Doe"' 123 '5 WEEKS' -r arguments.mlm
-
Compile all MLMs in one directory verbosely. Don't display logo. This will only work if your command line interpreter supports expansion of
*arguments.arden2bytecode -nvc *.mlm -
Start the evoke engine for multiple MLMs, and listen verbosely for incoming events on port 9701:
arden2bytecode -v -p 9701 -e *.mlm -
Run an MLM which queries an SQLite database:
arden2bytecode --cp lib/sqlite-jdbc-3.7.2.jar --dbdriver org.sqlite.JDBC --environment jdbc:sqlite:person.sqlite -r sql-example.mlm
-
Start the evoke engine, listen for events on a port, and use a database to handle MLM queries. Verbosely, no logo.
arden2bytecode -nv -p 9701 --cp lib/sqlite-jdbc-3.7.2.jar --db org.sqlite.JDBC --env jdbc:sqlite:person.sqlite -e sql-example.mlm
Getting Started
Arden Syntax
Development