Difference between revisions of "Constrained Dynamic Parser"

From Event-B
Jump to navigationJump to search
imported>Mathieu
m (first content)
 
imported>Mathieu
m
Line 1: Line 1:
 +
{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 ==
+
=== Requirements exported by the current language design ===
=== Exported by the current language design ===
 
 
==== Operator Priority ====
 
==== Operator Priority ====
 +
* operator are defined by group,
 +
* group of operator have a defined precedences,
 +
* there may be precedences defined inside groups.
 +
 
==== Operator Associativity ====
 
==== 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 <math>f(x)^{-1}\;</math>
 +
: nota: this requirement was added afterwards with consistency in mind.
  
=== Exported by the dynamic feature ===
+
=== Requirements exported by the dynamic feature ===
  
 
== Limitations ==
 
== Limitations ==

Revision as of 12:55, 30 January 2010

{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 f(x)^{-1}\;
nota: this requirement was added afterwards with consistency in mind.

Requirements exported by the dynamic feature

Limitations

Design Alternatives

Design Proposal