Chapter 11. Rules

A rule is a named collection of alternative productions. There are three kinds of rules: syntax, token, and interleave. A text value conforms to a rule if it conforms to any one of the productions in the rule. If a text value conforms to more than one production in the rule, then the rule is ambiguous. The three different kinds of rules differ in how they treat ambiguity and how they handle their output.

RuleDeclaration:  Attributesopt MemberModifiersopt Kind Name RuleParametersopt RuleBodyopt ;Kind:  token  syntax  interleaveMemberModifiers:  MemberModifier  MemberModifiers MemberModiferMemberModifier:  final  identifierRuleBody:  = ProductionDeclarationsProductionDeclarations:  ProductionDeclaration  ProductionDeclarations ...

Get The “Oslo” Modeling Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.