Source UI grammar#
Source UI grammar is the compatibility module for source-authored UI declarations imported by the root grammar.
Source#
| Property | Value |
|---|---|
| Grammar file | packages/business/language/grammar/source_ui.g4 |
| Grammar name | source_ui |
| Grammar kind | parser |
| Imports | common, expression, literal |
| Imported by | BusinessLanguage, class, table |
| Direct rule or token count | 10 |
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: sourceUiGroupDeclaration, sourceUiGroupRowDeclaration.
- Declarations:
sourceUiGroupDeclaration,sourceUiGroupRowDeclaration
Key grammar excerpts#
sourceUiGroupDeclaration#
sourceUiGroupDeclaration
: GROUP sourceUiGroupIdentifier OPEN_BRACE sourceUiGroupMember* CLOSE_BRACE
;sourceUiGroupRowDeclaration#
sourceUiGroupRowDeclaration
: ROW sourceUiRowBlock
;Complete rule and token inventory#
sourceUiFieldLayoutEntry, sourceUiGroupDeclaration, sourceUiGroupFieldOperation, sourceUiGroupIdentifier, sourceUiGroupMember, sourceUiGroupProperty, sourceUiGroupRowDeclaration, sourceUiGroupRowOperation
sourceUiLayoutBlock, sourceUiRowBlockExamples#
Layout block as a table member value#
ui: {
group main {
title: "Main";
row {
field company_code;
field document_type;
}
}
}Row operation#
group main {
add row after field document_type {
field requires_approval;
}
}Field operation#
group main {
hide field approval_limit with field requires_approval;
}Common authoring mistakes#
- Do not copy examples without checking the rule inventory for the exact grammar boundary.
- Do not add behavior that depends on missing configuration or undeclared user-facing errors.
Related guides#
- /language/source-ui-layouts/
- /language/apps-forms-controls/
Authoring notes#
- 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.