N NezamDocumentation

Source UI grammar#

Source UI grammar is the compatibility module for source-authored UI declarations imported by the root grammar.

Source#

PropertyValue
Grammar filepackages/business/language/grammar/source_ui.g4
Grammar namesource_ui
Grammar kindparser
Importscommon, expression, literal
Imported byBusinessLanguage, class, table
Direct rule or token count10

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#

antlr
sourceUiGroupDeclaration
    : GROUP sourceUiGroupIdentifier OPEN_BRACE sourceUiGroupMember* CLOSE_BRACE
    ;

sourceUiGroupRowDeclaration#

antlr
sourceUiGroupRowDeclaration
    : ROW sourceUiRowBlock
    ;

Complete rule and token inventory#

text
sourceUiFieldLayoutEntry, sourceUiGroupDeclaration, sourceUiGroupFieldOperation, sourceUiGroupIdentifier, sourceUiGroupMember, sourceUiGroupProperty, sourceUiGroupRowDeclaration, sourceUiGroupRowOperation
sourceUiLayoutBlock, sourceUiRowBlock

Examples#

Layout block as a table member value#

bl
ui: {
  group main {
    title: "Main";

    row {
      field company_code;
      field document_type;
    }
  }
}

Row operation#

bl
group main {
  add row after field document_type {
    field requires_approval;
  }
}

Field operation#

bl
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.
  • /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.
Source: packages/business/language/grammar-files/source-ui.md