language-oberon-0.1: Parser and pretty-printer for the Oberon programming language

Language.Oberon.Resolver

Description

This module exports functions for resolving the syntactic ambiguities in a parsed module. For example, an Oberon expression foo(bar) may be a call to function foo with a parameter bar, or it may be type guard on variable foo casting it to type bar.

Synopsis

# Documentation

data Error Source #

All possible resultion errors

Instances

 Source # MethodsshowsPrec :: Int -> Error -> ShowS #show :: Error -> String #showList :: [Error] -> ShowS #

type Predefined = Map Ident (Validation (NonEmpty Error) (DeclarationRHS Identity)) Source #

A set of Predefined declarations.

The set of Predefined types and procedures defined in the Oberon Language Report.

The set of Predefined types and procedures defined in the Oberon-2 Language Report.

Eliminate the ambiguites in the parsed syntax tree of a single module. The first argument is a set of Predefined declarations, such as predefined or predefined2. The second is a mapping of imported module names to their already resolved syntax trees.

Eliminate the ambiguites in the given map of module names to their parsed syntax trees. The first argument is a set of Predefined declarations, such as predefined or predefined2.