Text.GridTable.Trace

gridtables-0.1.0.0: Parser for reStructuredText-style grid tables.

Copyright | © 2022 Albert Krewinkel
License | MIT
Maintainer | Albert Krewinkel <albert@zeitkraut.de>
Safe Haskell | Safe-Inferred
Language | Haskell2010

Text.GridTable.Trace

Description

Trace cells of a grid table.

Synopsis

- traceLines :: [Text] -> Maybe (ArrayTable [Text])
- data TraceInfo = TraceInfo {
  - gridRowSeps :: Set CharRow
  - gridColSeps :: Set CharCol
  - gridCorners :: Set CharIndex
  - gridCells :: Set CellTrace
  }
- initialTraceInfo :: TraceInfo
- tableFromTraceInfo :: TraceInfo -> [PartSeparator] -> Maybe [ColSpec] -> ArrayTable [Text]

# Documentation

traceLines :: [Text] -> Maybe (ArrayTable [Text]) #

Traces out the cells in the given lines and converts them to a table containing the bare cell lines.

data TraceInfo #

Info on the grid. Used to keep track of information collected while tracing a character grid. The set of cells is used as a kind of queue during parsing, while the other data is required to assemble the final table.

Constructors

TraceInfo |
Fields gridRowSeps :: Set CharRow gridColSeps :: Set CharCol gridCorners :: Set CharIndex gridCells :: Set CellTrace

initialTraceInfo :: TraceInfo #

Initial tracing info.

tableFromTraceInfo :: TraceInfo -> [PartSeparator] -> Maybe [ColSpec] -> ArrayTable [Text] #

Create a final grid table from line scanning data.