Grammar file reference#
These pages are generated from the .g4 files in packages/business/language/grammar. Each page keeps the source file, imports, complete rule or token inventory, grammar excerpts, examples, and authoring notes together.
| Grammar source | Documentation page | Scope |
|---|---|---|
annotation.g4 | Annotation grammar | Annotation grammar describes metadata blocks and attribute lists that attach compiler-facing information to declarations. |
api.g4 | API grammar | API grammar describes HTTP-style integration declarations, endpoint methods, request and response shapes, and route bindings. |
app.g4 | App grammar | App grammar describes application declarations, pages, navigation, actions, layouts, and UI wiring at the application level. |
BusinessLanguage.g4 | Business Language grammar | The root parser composes every imported grammar module and defines the top-level program, declaration, statement, package, namespace, workspace, and configuration entry flow. |
BusinessLanguageLexer.g4 | Business Language Lexer grammar | The lexer defines the token vocabulary shared by every parser grammar, including keywords, operators, delimiters, identifiers, strings, numbers, comments, and whitespace. |
class.g4 | Class grammar | Class grammar describes object-style declarations, constructors, methods, fields, access modifiers, inheritance, and class members. |
common.g4 | Common grammar | Common grammar provides reusable identifiers, modifiers, blocks, simple statements, and shared punctuation patterns used by the rest of the parser. |
configuration.g4 | Configuration grammar | Configuration grammar describes minimal named configuration declarations used when policy values must be supplied as data instead of hardcoded logic. |
controls.g4 | Controls grammar | Controls grammar describes reusable UI controls and control properties that forms and app pages can compose. |
entity.g4 | Entity grammar | Entity grammar describes business entities, entity fields, keys, indexes, relations, and data lifecycle blocks. |
enum.g4 | Enum grammar | Enum grammar describes invariant named value sets used only when values should not vary by tenant, company, country, process, or time. |
error.g4 | Error grammar | Error grammar is the compatibility module for error declarations and imported error handling behavior. |
errorHandling.g4 | Error Handling grammar | Error handling grammar describes try, catch, finally, throw, raise, recover, and attempt flows for declared operational failures. |
expression.g4 | Expression grammar | Expression grammar describes precedence, assignment, calls, member access, conditions, lambdas, collection expressions, and other executable expressions. |
field.g4 | Field grammar | Field grammar describes reusable scalar fields, constraints, defaults, validation hooks, formatting hints, and field-level metadata. |
form.g4 | Form grammar | Form grammar describes form declarations, sections, fields, actions, validation bindings, and layout-oriented form members. |
function.g4 | Function grammar | Function grammar describes function signatures, parameters, return types, block bodies, expression bodies, and query bodies. |
iac.g4 | IaC grammar | Infrastructure grammar describes program, resource, and deployment declarations used to model deployable runtime resources. |
interface.g4 | Interface grammar | Interface grammar describes contracts, method signatures, properties, events, type parameters, and interface inheritance. |
literal.g4 | Literal grammar | Literal grammar describes strings, numbers, booleans, nulls, arrays, maps, date-like values, money values, and structured literals. |
message.g4 | Message grammar | Message grammar describes declared user-facing messages, severities, parameters, localization blocks, and message catalogs. |
module.g4 | Module grammar | Module grammar describes imports, exports, aliases, packages, namespaces, and module-level dependency boundaries. |
program.g4 | Program grammar | Program grammar is the compatibility module for program-level declarations imported by the root grammar. |
query.g4 | Query grammar | Query grammar describes SQL-like select, insert, update, delete, save, merge, joins, grouping, ordering, and DDL statements. |
rule.g4 | Rule grammar | Rule grammar describes executable business rules with typed parameters, return types, and block bodies. |
service.g4 | Service grammar | Service grammar describes service declarations, operations, endpoints, dependencies, and service-level configuration. |
source_ui.g4 | Source UI grammar | Source UI grammar is the compatibility module for source-authored UI declarations imported by the root grammar. |
struct.g4 | Struct grammar | Struct grammar is the compatibility module for structured type declarations imported by the root grammar. |
subscription.g4 | Subscription grammar | Subscription grammar is the compatibility module for lifecycle subscription declarations imported by the root grammar. |
table.g4 | Table grammar | Table grammar describes tables, table fields, keys, indexes, relations, storage metadata, audit policy, and constraints. |
test.g4 | Test grammar | Test grammar describes test declarations, fixtures, setup blocks, assertions, and expected error paths. |
type.g4 | Type grammar | Type grammar describes primitive types, references, generics, optionals, arrays, maps, unions, intersections, and function types. |
validation.g4 | Validation grammar | Validation grammar describes validation declarations, validation rules, conditions, severity, targets, and declared message use. |