N NezamDocumentation

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 sourceDocumentation pageScope
annotation.g4Annotation grammarAnnotation grammar describes metadata blocks and attribute lists that attach compiler-facing information to declarations.
api.g4API grammarAPI grammar describes HTTP-style integration declarations, endpoint methods, request and response shapes, and route bindings.
app.g4App grammarApp grammar describes application declarations, pages, navigation, actions, layouts, and UI wiring at the application level.
BusinessLanguage.g4Business Language grammarThe root parser composes every imported grammar module and defines the top-level program, declaration, statement, package, namespace, workspace, and configuration entry flow.
BusinessLanguageLexer.g4Business Language Lexer grammarThe lexer defines the token vocabulary shared by every parser grammar, including keywords, operators, delimiters, identifiers, strings, numbers, comments, and whitespace.
class.g4Class grammarClass grammar describes object-style declarations, constructors, methods, fields, access modifiers, inheritance, and class members.
common.g4Common grammarCommon grammar provides reusable identifiers, modifiers, blocks, simple statements, and shared punctuation patterns used by the rest of the parser.
configuration.g4Configuration grammarConfiguration grammar describes minimal named configuration declarations used when policy values must be supplied as data instead of hardcoded logic.
controls.g4Controls grammarControls grammar describes reusable UI controls and control properties that forms and app pages can compose.
entity.g4Entity grammarEntity grammar describes business entities, entity fields, keys, indexes, relations, and data lifecycle blocks.
enum.g4Enum grammarEnum grammar describes invariant named value sets used only when values should not vary by tenant, company, country, process, or time.
error.g4Error grammarError grammar is the compatibility module for error declarations and imported error handling behavior.
errorHandling.g4Error Handling grammarError handling grammar describes try, catch, finally, throw, raise, recover, and attempt flows for declared operational failures.
expression.g4Expression grammarExpression grammar describes precedence, assignment, calls, member access, conditions, lambdas, collection expressions, and other executable expressions.
field.g4Field grammarField grammar describes reusable scalar fields, constraints, defaults, validation hooks, formatting hints, and field-level metadata.
form.g4Form grammarForm grammar describes form declarations, sections, fields, actions, validation bindings, and layout-oriented form members.
function.g4Function grammarFunction grammar describes function signatures, parameters, return types, block bodies, expression bodies, and query bodies.
iac.g4IaC grammarInfrastructure grammar describes program, resource, and deployment declarations used to model deployable runtime resources.
interface.g4Interface grammarInterface grammar describes contracts, method signatures, properties, events, type parameters, and interface inheritance.
literal.g4Literal grammarLiteral grammar describes strings, numbers, booleans, nulls, arrays, maps, date-like values, money values, and structured literals.
message.g4Message grammarMessage grammar describes declared user-facing messages, severities, parameters, localization blocks, and message catalogs.
module.g4Module grammarModule grammar describes imports, exports, aliases, packages, namespaces, and module-level dependency boundaries.
program.g4Program grammarProgram grammar is the compatibility module for program-level declarations imported by the root grammar.
query.g4Query grammarQuery grammar describes SQL-like select, insert, update, delete, save, merge, joins, grouping, ordering, and DDL statements.
rule.g4Rule grammarRule grammar describes executable business rules with typed parameters, return types, and block bodies.
service.g4Service grammarService grammar describes service declarations, operations, endpoints, dependencies, and service-level configuration.
source_ui.g4Source UI grammarSource UI grammar is the compatibility module for source-authored UI declarations imported by the root grammar.
struct.g4Struct grammarStruct grammar is the compatibility module for structured type declarations imported by the root grammar.
subscription.g4Subscription grammarSubscription grammar is the compatibility module for lifecycle subscription declarations imported by the root grammar.
table.g4Table grammarTable grammar describes tables, table fields, keys, indexes, relations, storage metadata, audit policy, and constraints.
test.g4Test grammarTest grammar describes test declarations, fixtures, setup blocks, assertions, and expected error paths.
type.g4Type grammarType grammar describes primitive types, references, generics, optionals, arrays, maps, unions, intersections, and function types.
validation.g4Validation grammarValidation grammar describes validation declarations, validation rules, conditions, severity, targets, and declared message use.
Source: packages/business/language/grammar-files/index.md