forked from dgrunwald/arden2bytecode
-
Notifications
You must be signed in to change notification settings - Fork 2
Arden2ByteCode Command Line Reference
hflicka edited this page Mar 14, 2012
·
9 revisions
arden2bytecode [OPTIONS] [FILE] [FILE...]
-
-h, -?, --help
Display help to command line options. -
-c, --compile
Compile the input files (must be of .mlm type) and write output of compiler to .class files. -
-o FILE, --output FILE
Output .class file to write compiled MLM to. This is intended to be used in conjunction with -c. -
-r, --run
Run the input files directly. The input files must be either .mlm files which will be compiled in-memory or already compiled .class MLMs. -
-v, --verbose
Verbose output mode.
For example the input files will be explicitly listed in this mode. -
-n, --nologo
Don't display the header with program name and licensing information. -
-a, --arguments
Specify arguments to the MLM. These are available in the MLM data slot via theargumentidentifier.
Arguments that are formatted as floating-point numbers (e.g.12.34e+5or1234000) are passed as numbers while all other arguments are passed as strings.
Setting up the MLM environment/context
-
-p, --classpath
An additional classpath from where the database driver may be loaded.
For SQLite-JDBC, this might be<path>/sqlite-jdbc-3.7.2.jar, depending on the version.
For MySQL, it is<path>/mysql-connector-java-5.1.18-bin.jar -
-d, --dbdriver
The class name of the database driver.
For SQLite, I useorg.sqlite.JDBC.
For MySQL, this iscom.mysql.jdbc.Driver. -
-e, --environment
The environment string used in the Arden2ByteCode runtime environment. JDBC connection strings imply that a JDBC environment is set up.
For SQLite, I set this to:jdbc:sqlite:<dbfile>. You can also use a blank<dbfile>to use a in-memory DB.
For MySQL, things are more complicated. Read Connector/J docs for more information.
All further command line arguments will be regarded as input files.
-
arden2bytecode -r hello_world.mlm
Will compile and runhello_world.mlmwithout saving to .class file. -
arden2bytecode -o hello_world.class -c hello_world.mlm
Compilehello_world.mlmand save tohello_world.class. The MLM will not be run. -
arden2bytecode -r hello_world.class
Run already compiled MLMhello_world.class. -
arden2bytecode -nr hello_world.mlm
Run MLM without displaying logo. -
arden2bytecode -nvc *.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.