Etch Compiler Users Guide
Name
etch - compiler for binding code into the Etch runtime environment.
Synopsis
Description
The Etch compiler processes input etch files and generates target server and/or client code for the selected binding that is integrated with the Etch runtime environment.
Source and target filename suffixes identify language bindings and the kind of processing performed:
.c C target
.cs C# target
.etch Etch source
.java Java target
.kwd Reserved words lists
.rb Ruby target
.xml XML target
.py Python Target
Options
This section describes the compiler options in details
Help Option
--help
-help
-h
?
Print a description of the command options and parameters and then exit.
Usage
Output Directory Option
-d outputDir
--outputDir outputDir
Specifies the output directory where etch files will be generated
Usage
Binding Option
-b binding
--binding binding
Specifies the target language binding to generate. For example "etch -b java" will generate the java binding. Bindings currently supported are java, csharp and xml. In future the plan is to support c, ruby, python and javascript.
Usage
What option
-w what
--who what
--what what
Selects what to generate. What can include: server, client, or both; impl, helper, main, or all; and force.
It is also possible to specify more than one option. For example, a user can specify "etch -w both,helper,main" or "etch -w all". If more than one option is specified, please make sure to separate it by a comma.
Force forces potentially modified files such as impl, main to be overwritten if they already exist in the output directory.
Usage
Ignore Global Reserved Word List Option
-g
--ignore-global
Ignore the global reserved words list for Etch.
Ignore Local Reserved Word List Option
-l
--ignore-local
Ignore the local reserved words list for the binding.
Load Reserved Word List Option
-W wordList
--word-list wordList
Specifies the file name of a reserved words list to load, either augmenting or replacing the global and local word lists.
Include Option
-I path
--include-path path
Append the specified path to the path of directories searched for include files as defined in the environment variable ETCH_INCLUDE_PATH.
Usage
Ignore Include Path Option
-i
--ignore-include-path
Ignore the path of directories searched for include files as defined in the environment variable ETCH_INCLUDE_PATH.
Suppress Mixin Artifact Option
-n
--no-mixin-artifacts
Mixin artifacts are not generated when this option is specified. By default, mixin artifacts will be generated.
Mixin Directory Option
-m outputMixinDir
--dir-Mixin
Directory where mixins will be generated. If -m option is not specified, then mixin will be generated in directory specified by -d option. If etch file contains mixin and neither -m -d and -n are specified, then compiler will throw an error
Usage
No Flatten Option (C# specific)
-f
--no-flatten
Don't flatten the package directories, but rather nest them like java requires. This option is only for C# binding
Regulate Compiler Logs Option
-q
--quiet
This option suppresses info messages in the compiler. It only report problems.
Etch Version
-v
--version
Shows the version and exits.
Detailed Examples
Include Example
To use include files in an etch file, use the .txt extention, not .etch for includes.
You can also include other include files in the etch include files.
testincl.txt
Mixin Example |