Configuration grammar#
Configuration grammar describes minimal named configuration declarations used when policy values must be supplied as data instead of hardcoded logic.
Source#
| Property | Value |
|---|---|
| Grammar file | packages/business/language/grammar/configuration.g4 |
| Grammar name | configuration |
| Grammar kind | parser |
| Imports | common |
| Imported by | BusinessLanguage, module |
| Direct rule or token count | 1 |
How to use this page#
Read the examples first when authoring Business Language. Use the rule inventory when checking exact grammar coverage or when updating parser, lowering, editor, or documentation behavior.
Entry rules and syntax families#
Start with these rules when reading this grammar: configurationDeclaration.
- Declarations:
configurationDeclaration
Key grammar excerpts#
configurationDeclaration#
configurationDeclaration
: CONFIG identifier OPEN_BRACE CLOSE_BRACE
| CONFIG identifier SEMICOLON
;Complete rule and token inventory#
configurationDeclarationExamples#
Named configuration shell#
config approval_policy;Empty required configuration shell#
config tax_policy;Common authoring mistakes#
- Do not put tenant, company, process, or time-varying ERP policy values in generic config blocks.
- Use configuration declarations for named package/runtime/tool configuration shells; store business policy in tables and resolve it fail-closed.
Related guides#
- /language/configuration-declarations/
- /language/configuration-resolver-patterns/
Authoring notes#
- Represent tenant, company, country, process, and time-varying policy as configuration data.
- Keep examples aligned with the grammar source, not with inferred syntax from another language.
- Use declared messages for user-facing failures, and fail closed when required configuration is absent.