Constrained Dynamic Parser
From Event-B
{TOCright}} This page describes the requirements for a generic parser for the Event-B Mathematical Language. It will also draft a first design proposal.
Requirements
In order to be usable mathematical extensions require the event-b mathematical language syntax to be extendable by the final user.
Thus, the lexical analyser and the syntaxic parser have to be extendable in a simple enough way (from a user point of vue).
Requirements exported by the current language design
Operator Priority
- operator are defined by group,
- group of operator have a defined precedences,
- there may be precedences defined inside groups.
Operator Associativity
- a compatibility table defines allowed associativity inside a group,
- a compatibility tables defines allowed associativity between groups (it allows to forbid a syntaxic construction like
- nota: this requirement was added afterwards with consistency in mind.