Architecture

sanity edited this page Mar 18, 2012 · 14 revisions

I'll structure the description of LastCalc's architecture by going through a typical user interaction with LastCalc, and describe the parts of the code involved at each stage. This documentation assumes familiarity with Java.

  1. Initial Page Render - What happens when the user visits the lastcalc website
  2. Help Panel - Creates the tutorial to the right of the page
  3. Tokenizer - Turning a string into a set of tokens
  4. Parsing
    1. Parsing Overview - The basic principles behind LastCalc's parsing mechanism
    2. Sequential Parser - The nice-and-simple high level interface to LastCalc's parser
    3. Parsers - So what exactly figures out that 2+2=4?
    4. Parser Pickers - Efficiently finding the appropriate parser for a given list of tokens
    5. Backtracking Parse Engine - The heart of LastCalc
  5. JavaScript user interface
    1. Syntax highlighting
    2. AJAX worksheet refresh