How daryanechaeva/csv-reader works
CSV reader is a command-line evaluator: a user supplies a file, the program loads and validates its rows and columns, resolves formula dependencies and arithmetic, then prints the evaluated table. The main routine orchestrates loading, computation and output. The Table holds source cells and computed state; hash maps index row IDs and column names. README capabilities are reflected in the evaluator label; relationships follow sampled source, while broader error cases are documented rather than separately modeled.
Main entry points: parser.c CSV loader · main.c Workflow entry · table.c Table lifecycle and output · calculate.c Formula evaluator
Components 9
CLI workflow
- Workflow entry
src/main.c
CSV and table
- CSV loader
src/parser.c - Table state
include/table.h - Table lifecycle and output
src/table.c
Evaluation and indexing
- Formula evaluator
src/calculate.c - Row and column maps
src/hashmap.c
Other components
- CLI user
- CSV file
- Standard output
Connections 12
- CLI user → Workflow entry: runs with file
- Workflow entry → CSV loader: calls load
- CSV loader → CSV file: reads
- CSV loader → Table state: populates
- CSV loader → Row and column maps: looks up and inserts
- CSV loader → Table lifecycle and output: initializes and frees
- Workflow entry → Formula evaluator: calls compute
- Formula evaluator → Table state: reads and updates
- Formula evaluator → Row and column maps: resolves references
- Workflow entry → Table lifecycle and output: calls print and free
- Table lifecycle and output → Table state: reads and frees
- Table lifecycle and output → Standard output: prints CSV