Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sestoft's spreadsheet implementation #2

Open
jennybc opened this issue Apr 7, 2016 · 0 comments
Open

Sestoft's spreadsheet implementation #2

jennybc opened this issue Apr 7, 2016 · 0 comments

Comments

@jennybc
Copy link
Member

jennybc commented Apr 7, 2016

From Peter Sestoft's book Spreadsheet Implementation. Section 2.1.1, p28.

A subset of the core concepts that seem immediately relevant to us:

  • A workbook of class Workbook is a collection of sheets
  • A sheet of class Sheet is a rectangular array (ok, not how we are thinking of it?), each element could contain null or a cell
  • A (non-null) cell of class Cell which could be a constant (he's got more classes here), a formula (that's got its own class, see below), an array formula (I'm trying to pretend these don't exist right now). (This is where he says a cell could also contain info about formatting but in his world it does not.)
  • A formula of class Formula consists of an expression (that's got a class), a cached value (again, a class), a workbook reference of class Workbook, a state (I think this has to do with recalculation and cell-to-cell depedencies).
  • An expression of class Expr could be a constant (number, text), a static error, an object of class CellRef, an object of class CellArea, or a call to a function or operator (of class FunCall)
  • A raref of class RARef, which is a cell reference. A four-tuple: (colAbs, colRef, rowAbs, rowRef) where colAbs and rowAbs are logical indicators whether the column and row references coRefl and rowRef are absolute vs. relative.
  • A cell address of class CellAddr is an absolute location of a cell within a sheetl, i.e. (row, col). For Sestoft, it's zero-based.
  • A single cell reference of class CellRef is an object of class RARef and, optionally, a worksheet reference.
  • A cell area reference of class CellArea consists of two objects of class RARef (upper left, lower right of a rectangle) and, optionally, a common worksheet reference.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant