|
| Language.Gnumeric.Formula | | Portability | portable
| | Stability | experimental
| | Maintainer | Cupertino Miranda and Joost Visser
|
|
|
|
|
|
| Description |
| Syntax for spreadsheet formulas.
|
|
| Synopsis |
|
|
|
|
| Abstract syntax |
|
| data Formula |
| The type of formulas. | | Constructors | | Var String | Variables | | Fun String [Formula] | Function applications | | Ref CellRef (Maybe CellRef) | Cell or cell block reference |
| | Instances | |
|
|
| data CellRef |
| Type of cell references | | Constructors | | CellRef | | | sheet :: String | Sheet name | | colNr :: Int | Column index | | rowNr :: Int | Row index |
|
| | Instances | |
|
|
| showCellRef :: CellRef -> String |
| Print a cell reference to a String. |
|
| addSheetName :: String -> Formula -> Formula |
| Add sheetname to all CellRef elements on Formula |
|
| Parsers, based on Parsec. |
|
| parseFormula :: String -> String -> String -> Formula |
| Top-level invocation of parser. |
|
| formula :: Parser Formula |
| Formulas. |
|
| expr :: Parser Formula |
| Expressions. |
|
| table :: OperatorTable Char () Formula |
| Table to build expression grammar. |
|
| binary :: String -> Assoc -> Operator Char () Formula |
| Helper. |
|
| prefix :: String -> Operator Char () Formula |
| Helper. |
|
| postfix :: String -> Operator Char () Formula |
| Helper. |
|
| term :: Parser Formula |
| Terms (leafs of expressions). |
|
| word :: Parser String |
|
| separator :: Parser () |
|
| sheetCellReference :: Parser CellRef |
|
| singleCellReference :: Parser CellRef |
|
| cellReference :: Parser Formula |
|
| functionApplication :: Parser Formula |
| Function application. |
|
| Lexical issues. |
|
| lexer :: TokenParser () |
|
| columns :: [String] |
| Infinite sequence of letter combinations that identify spreadsheet columns. |
|
| toColNr :: String -> Int |
| Convert a column name into a column number. For instance, A becomes
0 and AA becomes 26. |
|
| toRowNr :: String -> Int |
| Convert a row name into a row number. For instance, 1 becomes
0 and 10 becomes 9. |
|
| fromColNr :: Int -> String |
| Convert a column number into a column name. Inverse of toColNr. |
|
| fromRowNr :: Int -> String |
| Convert a row number into a row name. Inverse of toRowNr. |
|
| Produced by Haddock version 0.6 |