Nina: automata description language


Reference Top - PREV: program comment - NEXT: Automaton describing part

Definition part

Definitions should be started with the character '#' in the beginning of the program. You can definitions as comments because unknown definitions should be ignored.
A program fragment between "%{" and "%}" is embedded in the generated source.
#machine name specifies the generated graph. Available graphs are:
  1. NFABuilder: describes a nondeterministic finite automaton(NFA)
  2. DFABuilder: describes a deterministic finite automaton(DFA)
#package name specifies the package.
This will be ignored by JavaScript as a target language.
#type name specifies a type of labels of edges. Available types are:
  1. char: characters
  2. string: strings
  3. class: classes
#option name=value specifies options shown as follows.
optiondescription
abstract makes the generated class abstract
extends=classname specifies the superclass of the generated class
implements=classnames specifies the implemented interfaces of the generated class
targetLanguage=language specifies the target language.
Java, CSharp and JavaScript are available as language
APIAccessModifier=modifier specifies the access modifier of the generated class
enableLog enables log output
streammode=binary|text specifies the newline mode. If the mode is binary, distigunish CR and LF. If the mode is text, CRLF is identical with LR.
useImmediateFunction If this option is enabled, the generated JavaScript class will be enclosed by IIFE. This is available only when targetLanguage=JavaScript
customReader Nina translator generates a method which reads from the input named readFromStream(Java)/ReadFromStream(C#)/_readFromStream(JavaScript), This option supresses generation of the method.
#label name=body defines an alias of the label.
You can use the defined label by ${name}.
#comment type-of-comment skips the specified type of comment. You can use styles shows as follows.
styledescription
Java skips Java styled comment.
/* ... */ will transform to one space and // ... will transform to one newline
shell skips the input from the specified comment character to a newline character.
The comment character can define #commentHeader, the default is '#'.
If you do not want to skip comments, the COMMENT property in the generated class set to false.
#commentHeader comment character When you specify #comment=shell, specifies the comment character


Reference Top - PREV: program comment - NEXT: Automaton describing part
Yuichiro Moriguchi
yuichiro-moriguchi´╝ánifty.com
SourceForge.JP