Configuration grammar

Configuration resources require a specific syntax.

These various sources can be identified as input_units. In fact, the syntax of the configuration file shares many common features with the ILOG® Rule Language.

Unicode escapes

The configuration reader recognizes the Unicode escapes in the input. You can use the following sequence of three Chinese characters \u67ef\u6ca7\u6d77 as a property name.

Comments

The comments are the same in Java™ and in the ILOG Rule Language.

// This is a single-line comment.
/* This is a multiline
   comment.
*/

Input unit

An input unit contains 0, 1, or several node definitions.

Input unit

input_unit:

nodes opt

nodes:

node

nodes node

Node

A node is a block containing elements and subnodes. The ending semicolon is optional.

Node

node:

node Name

{ node_or_element_list opt } ; opt

node_or_element_list:

node_or_element

node_or_element_list node_or_element

node_or_element: one of

node element

Element

An element is a name associated with a value. The ending semicolon is mandatory.

Element

element:

element Name = Value ;

Name

A name is either an identifier or a sequence of identifiers separated by a period (.), like a Java package name. You can use any valid Java identifier as an identifier in the configuration file.

Name

Name:

Identifier

Name . Identifier

Value

A value is a literal. You can use any literal that is valid in the ILOG Rule Language as a value in engine configurations. Engine configurations also support a syntax for specifying arrays.

Value

Value: one of

Boolean_literal Character_literal String_literal Integer_literal

Float_literal Array_literal

Boolean_literal: one of

true false

Array_literal:

{ Values opt }

Values:

Value

Values , Value

The other kinds of literals are specified in the same way as in the ILOG Rule Language. Here are a few examples:

"\tThis is \na string"

'a'

12345L

0xffff

0342

3.14d

1.7e-2