How raiyanjubaerrohan/little-spiders works
Little-spiders is a small compiler front end for its own C-like language. The user supplies a source file to the CLI; the driver coordinates lexing/parsing, name and scope resolution, semantic type handling, and AST code generation, then writes LLVM IR. The README describes clang as the next step for compiling that IR, but the sampled driver only emits IR. The graph reflects the shown driver order and module references; unsampled parser and AST behavior is not inferred beyond those references.
Main entry points: main.py Compiler Driver · nodes.py AST and Codegen · parserize.py Parser · resolvistics.py Name Resolver
Components 10
Semantic Analysis
- Name Resolver
resolvistics.py - Type Semanticizer
symantics.py
IR Generation
- AST and Codegen
nodes.py
Driver and Output
- Compiler Driver
main.py - Compiler Context
utils.py - LLVM IR Output
main.py
Other components
- Source Author
- clang
Connections 14
- Source Author → Compiler Driver: provides source
README.md - Compiler Driver → Parser: configures and parses
main.py - Parser → Lexer: uses
parserize.py - Parser → AST and Codegen: constructs nodes
parserize.py - Compiler Driver → Name Resolver: resolves each node
main.py - Name Resolver → AST and Codegen: resolves symbols
resolvistics.py - Compiler Driver → Type Semanticizer: checks each node
main.py - Type Semanticizer → AST and Codegen: types and rewrites
symantics.py - Compiler Driver → Compiler Context: initializes
main.py - Name Resolver → Compiler Context: looks up functions
resolvistics.py - Compiler Driver → AST and Codegen: invokes codegen
main.py - AST and Codegen → Compiler Context: emits instructions
nodes.py - Compiler Driver → LLVM IR Output: writes module
main.py - LLVM IR Output → clang: compiled by
README.md