Netmond V2. Configuration syntaxThis document describes syntax of Netmond configuration file. IntroductionGreat potential and flexibility of Netmond can be utilized with the special language for configuration. On a first step special lexical analyzer built with flex utility scans configuration text. This analyzer produces language lexemes - keywords, numeric and string parameters, punctuation signs, etc. Second, special syntax parser built with yacc (bison) utility interprets lexemes as language constructions. This parser looks for configuration directives and its parameters. Found directives are translated to internal memory structures. Netmond use these structures to construct monitoring algorithm. So, Netmond configuration is an ordered sequence of directives. Directives consist of keywords and optional parameters separated by any combination of space chars. Space chars are blanks, tabs and carriage returns. For in-line documentation user can write comments and remarks.
Comments are not interpreted, and have no influence to Netmond work.
Syntax description agreementNetmond configuration file syntax description in this document use following visualization conventions:
Syntax description example:
Square brackets mean both keywords keyword1 and keyword2 are optional. Vertical line between keywords means variants possible: only keyword1 or only keyword2 - parameter is valid in this directive definition. If used keyword1 - no arguments expected. If used keyword2 - parameter is mandatory. Preprocessor directivesPreprocessor commands begin with percent sign % and consist of command keyword and optional parameter. Percent sign have to be first character in string. These commands are seen to parser only. Only one preprocessor directive available now. It provides nesting in configuration files. This command inserts (include) other file inside current file. Maximum nesting depth is 10. % include file
DirectivesConfiguration language directive define the operations Netmond do while running. Directives consist of keywords and parameters. Complex directives exist, with a great number of parameters.
Parameters may be grouped to blocks.
Block of parameters begins with opening brace { and
finishes with close brace }. Blocks may be nested.
Ordered directives divide configuration file to semantic sections. Parsing fall if some directives used not in order. ParametersParameters are detailing the way Netmond execute directives. Parameters consist of parameter keywords and values. There are numerical and string parameters values may appear in configuration file.
Special characters approved to use in string values:
Backslash \ in end of line can be used to divide long-long one-string value to number of strings for readability. CommentsComments enable to hide arbitrary text fragments from parser. It is very useful for inline documenting of configuration file. Two comments forms allowed:
Nested C-style comments unsupported. Shell-style comments may appear inside C-style comments block. See also: © 1998-2002, Rinet Software
|