Grammar

Below you can see the grammar used by the command line compiler. This content is printed on the screen if the built-in function GRAMMAR is used.

There are two context free grammars, one is used for the command line the other for the parameter file. The parameter file contains mainly the same argument list as the command line. The property file defines the default settings. For this a different grammar is applied.

Properties can be set for each argument, i.e. for arguments not used or arguments in overlays. Based on that, properties are set by using the path (dotted keyword list).

A property is always a 'SUPPLEMENT' for the argument list on the command line or parameter file. Thus all defined properties have the same effect as arguments on the command line. A property sets this argument to the corresponding value if it is not defined on the command line.

Grammar for argument list, parameter file or property file
--| Command Line Parser                                              
--| command        -> ['('] parameter_list [')']       (main=object) 
--|                |  ['.'] parameter                  (main=overlay)
--| parameter_list -> parameter SEP parameter_list                   
--|                |  EMPTY                                          
--| parameter      -> switch | assignment | object | overlay | array 
--| switch         -> KEYWORD                                        
--| assignment     -> KEYWORD '=' value                              
--|                |  KEYWORD '=' KEYWORD # SELECTION #              
--|                |  KEYWORD '=>' STRING # parameter file #         
--| object         -> KEYWORD ['('] parameter_list [')']             
--|                |  KEYWORD '=' STRING # parameter file #          
--|                |  KEYWORD '=>' STRING # parameter file #         
--| overlay        -> KEYWORD ['.'] parameter                        
--|                |  KEYWORD '=' STRING # parameter file #          
--|                |  KEYWORD '=>' STRING # parameter file #         
--| array          -> KEYWORD '[' value_list   ']'                   
--|                |  KEYWORD '[' object_list  ']'                   
--|                |  KEYWORD '[' overlay_list ']'                   
--|                |  KEYWORD '=' value_list # with certain limitations #
--| It is recommended to use only enclosed array lists to know the end
--|                |  KEYWORD '[=' STRING ']' # parameter file #     
--|                |  KEYWORD '[=>' STRING ']' # parameter file #    
--| value_list     -> value SEP value_list                           
--|                |  EMPTY                                          
--| object_list    -> object SEP object_list                         
--|                |  EMPTY                                          
--| overlay_list   -> overlay SEP overlay_list                       
--|                |  EMPTY                                          
--| A list of objects requires parenthesis to enclose the arguments  
--|                                                                  
--| value          -> term '+' value                                 
--|                |  term '-' value                                 
--|                |  term                                           
--| term           -> factor '*' term                                
--|                |  factor '/' term                                
--|                |  factor                                         
--| factor         -> NUMBER | FLOAT | STRING                        
--|                |  selection | variable | constant                
--|                |  '(' value ')'                                  
--| selection      -> KEYWORD # value from a selection table        #
--| variable       -> KEYWORD # value from a previous assignment    #
--|                |  KEYWORD '{' NUMBER '}' # with index for arrays#
--| constant       -> KEYWORD # see predefined constants at lexeme  #
--| For strings only the operator '+' is implemented as concatenation
--| Strings without an operator in between are also concatenated     
--| A number followed by a constant is a multiplication (4KiB=4*1024)
--|                                                                  
--| Property File Parser                                             
--| properties     -> property_list                                  
--| property_list  -> property SEP property_list                     
--|                |  EMPTY                                          
--| property       -> keyword_list '=' SUPPLEMENT                    
--| keyword_list   -> KEYWORD '.' keyword_list                       
--|                |  KEYWORD                                        
--| SUPPLEMENT is a string in double quotation marks ("property")