### Navigation

- index
- modules |
- CCHR 1.0 documentation »

# `Rule Parser`

This module is responsible for creating the business rules for the CCHR conversion system.

Exported Classes:

Exported Methods:

parse_rules – This method is called during the stage and process phase to create the business rules for that phase.

Exceptions:

RuleParsingError

ConvertError – This error is raised when a value we are trying to convert can not be handled by a Crosswalk object.

DataError

FatalDataError

class `src.parse_rules.``VariableConverter`(time, segment, var, phase, **kw)
  `add_region`(region, mod, crosswalk)
  `create_func`(mod, crosswalk, add_info)
  `set_auto_id`(start_value=1)

    This modules sets the translate function to pass an id value to the conversion function. The first id will start at start_value, which has a default value of 0, and will increment by one for each row.

  `set_format`(format)
  `translate`(state_var, value, row)

`src.parse_rules.``mod_counter`()

`src.parse_rules.``parse_rules`(rule_dir, segment, **opt)

`src.``parse_rules`

  alias of `src.parse_rules`

### Navigation

- index
- modules |
- CCHR 1.0 documentation »