How 8ored/calculator_suite works
Calc-Suite is an interactive, in-memory command-line calculator. The user enters commands; the CLI dispatches variable, expression, and polynomial operations, records calculations in a bounded history queue, and can encode that history with Huffman coding for display or decoding. The main workflow and major README capabilities are represented. The excerpts show expression, polynomial, queue, and codec implementations; some CLI handlers are omitted, so capability links for those handlers rely on README documentation rather than unseen source details.
Main entry points: main.cpp CLI dispatcher · data_storage.cpp Polynomial arithmetic · expression_engine.cpp Expression evaluation · symbol_table.cpp AVL symbol table
Components 15
Command interface
- CLI dispatcher
main.cpp
Variables
- Variable commands
main.cpp - AVL symbol table
symbol_table.cpp - Variable substitution
main.cpp
Calculations
- Expression conversion
expression_engine.cpp - Expression evaluation
expression_engine.cpp - Polynomial input
data_storage.cpp - Polynomial arithmetic
data_storage.cpp
History and compression
- History queue
data_storage.cpp - History display
data_storage.cpp - History text
main.cpp - Huffman codec
huffman.cpp - Code table
huffman.cpp - Decoded output
main.cpp
Other components
- User
Connections 19
- User → CLI dispatcher: enters commands
README.md - CLI dispatcher → Variable commands: dispatches
README.md - Variable commands → AVL symbol table: updates or lists
- CLI dispatcher → Variable substitution: routes expressions
README.md - Variable substitution → AVL symbol table: looks up variables
main.cpp - CLI dispatcher → Expression conversion: converts expressions
main.cpp - CLI dispatcher → Expression evaluation: evaluates expressions
main.cpp - Expression evaluation → Expression conversion: uses converted form
expression_engine.cpp - CLI dispatcher → Polynomial input: builds polynomials
main.cpp - CLI dispatcher → Polynomial arithmetic: requests add or multiply
main.cpp - CLI dispatcher → History queue: records results
main.cpp - CLI dispatcher → History display: shows history
README.md - CLI dispatcher → History text: reads history snapshot
main.cpp - CLI dispatcher → Huffman codec: encodes or decodes
main.cpp - CLI dispatcher → Code table: shows codes
README.md - CLI dispatcher → Decoded output: prints decoded text
main.cpp - History text → History queue: dequeues snapshot
main.cpp - Polynomial input → Polynomial arithmetic: supplies operands
data_storage.cpp - Polynomial arithmetic → History queue: records operation
data_storage.cpp