PrimitiveArray-0.5.2.0: Efficient multidimensional arrays

Safe HaskellNone

Data.Array.Repa.Index.Points

Contents

Description

Index structures for left- and right-linear grammars. Do not use this index for general linear- or context-free grammars.

Internally, both PointL and PointR work a lot like Subwords, but in non-terminals we only store the left- or right part.

Synopsis

Documentation

newtype PointL Source

A point in left-linear grammars. In (i:.j), j is the non-terminal storage point, i==0 always for the non-terminal, while i>=0 for terminals, which are on the right of the non-terminal. (This is why left-linear grammars are called left-linear: they recurse on the left).

PS: all this left/right talk deals with the RHS of a production rule, the LHS is always a non-terminal ;-)

Constructors

PointL (Int :. Int) 

newtype PointR Source

A point in right-linear grammars.

Constructors

PointR (Int :. Int) 

Instances