REST Service Define Rules

Here is the define rules
ClassMapper :: classmap MapName [NameSpaceName ] ‘{‘ [MapOptions] [ClassDef... ] ‘}’
MapOptions :: ‘[‘ (MapOption [';'])… ‘]’
MapOption  :: ‘target_path‘     ‘:’ <string>
:: ‘class_mgr‘       ‘:’ <identifier>
:: ‘class_http_mgr‘  ‘:’ <identifier>
:: ‘class_auth‘      ‘:’ <identifier>
:: ‘class_logic‘     ‘:’ <identifier>
:: ‘class_validator‘ ‘:’ <identifier> [ValidatorFunName [',']]…
:: ‘class_filter‘    ‘:’ <identifier> [FilterFunName [',']]…
:: ‘dispatch_method‘ ‘:’ (‘uri’ | ‘field’)
:: ‘dispatch_methodfield‘ ‘:’ <identifier>
:: ‘uri_head‘        ‘:’ <string>
:: ‘sql_connection‘  ‘:’ <string>
:: ‘error_needip‘    ‘:’ <integer>
:: ‘error_needrole‘  ‘:’ <integer>
:: ‘error_needauth‘  ‘:’ <integer>
:: ‘error_needlogin‘ ‘:’ <integer>
:: ‘error_sign‘      ‘:’ <integer>
:: ‘error_unknown‘   ‘:’ <integer>
:: ‘error_codes‘     ‘:’ ‘[‘ [ErrorCodeName  ‘=>’ ‘array’ ‘(‘ ErrorCode ‘,’ ErrorDesc ‘)’ [','] ] … ‘]’

ValidatorFunName :: <identifier>
FilterFunName :: <identifier>
ErrorCodeName :: <string>
ErrorCode     :: <integer>
ErrorDesc     :: <string>

ClassDef      :: ClassName ‘:’ TableName ‘{‘ [HttpOptions] [FieldDef...]  ‘}’
ClassName     :: <identifier>
TableName     :: <identifier>
HttpOptions   :: ‘[‘ [HttpOption [';'] ]… ‘]’
HttpOption    :: ‘http_method‘         ‘:’ MethodPrefix HttpModifiers
:: OtherHttpOptionName   ‘:’ <string>
OtherHttpOptionName :: ( ‘class_logic‘ | ‘class_db‘ | ‘update_fields‘ | ‘fields_create‘ | ‘fields_update‘ | ‘field_id‘ | ‘fields_validator‘ | ‘fields_filter‘ )
MethodPrefix  :: <string>
HttpModifiers :: (HttpModifier [ ‘[‘ [HttpOptionKey ':' HttpOptionVal] ‘]’ ] [ '(' ModifierName ')' ] )…

HttpModifier  :: ( ‘C’ | ‘U’ | ‘R’ | ‘M’ | ‘D’ | ‘L’ )
HttpOptionKey :: ( ‘loginc‘ | ‘logic_pre‘ | ‘logic_post‘ | ‘need_auths‘ | ‘need_roles‘ | ‘need_login‘ | ‘need_ips‘ | ‘fields_param‘ | ‘fields_cond‘ |’fields_filter‘ || ‘fields_validator‘ | ‘field_clientip‘ | ‘field_clientua‘ )
HttpOptionVal :: <string>

ModifierName  :: <identifier> [‘:’ RefFieldName [‘:’ RefClassName]]
RefClassName  :: <identifier>
RefFieldName  :: <identifier>

FieldDef      ::  PropertyName [ ‘[‘ JsonName ‘]’ ] [‘(‘ ParamName ‘)’] [‘,’ TableFieldName[ ‘[' FieldDefVal ']‘ ] ]  ‘:’ FieldType [‘(‘ IdxType ‘)’ ] ‘;’
PropertyName  :: <identifier>
JsonName      :: <identifier>
ParamName     :: <identifier>
TableFieldName     :: <identifier>
FieldType     :: ( ‘int‘ | ‘int64‘ | ‘string‘ | ‘date‘ | ‘idate‘ | ‘bool‘ | ‘float‘ )
IdxType       :: ( ‘id‘ | ‘key‘ )