Ambiguity diagnosis suggests changes to syntax definitions to make them non-ambiguous.
Ambiguity library, a.k.a. DrAmbiguity, contains a diagnosis tool that can help you find the causes of ambiguous
parse trees and possible Disambiguations to solve them in a Syntax Definition.
DrAmbiguity is a library that processes any parse forest produced by a parser generated from Rascal's Syntax Definitions.
Please read Disambiguation first.
diagnose(t); // for any t of which you know it contains an ambiguity
- DrAmbiguity automatically proposes Disambiguations that will work
- DrAmbiguity does not scale to large parse trees, so please first make your example smaller.
- DrAmbiguity proposes several Disambiguations for each ambiguity, only few of which make sense from a language design point of view!
- DrAmbiguity is now only a library function, while it should be integrated into the Rascal IDE