# rochus-keller/interlisp architecture

> Architecture diagram of the GitHub repository rochus-keller/interlisp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rochus-keller/interlisp
- Repository: https://github.com/rochus-keller/interlisp

## Overview

- Source Files -> LispLexer -> LispReader -> LispNavigator

- LispHighlighter -> LispLexer
- Navigation Interface -> LispNavigator
- LispReader -> LispBuiltins

- Raw Source -> Tokenization -> Parsing -> Navigation Index

##### Technical Details
- Qt/LeanQt dependency
- C++ implementation
- Support for multiple Interlisp versions (Fugue, Carol, Koto)

##### The cross-referencing capabilities

Keep the abstraction level focused on the major components while showing the critical relationships between the lexer, parser, and navigation systems, as these form the core functionality of the tool.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core ["Core Analysis Layer"]
        LispLexer["LispLexer (Tokenizer)"]:::core
        LispReader["LispReader (Parser)"]:::core
        LispNavigator["LispNavigator (Navigation Engine)"]:::core
        LispBuiltins["LispBuiltins (Language Support)"]:::core
    end

    subgraph UI ["User Interface Layer"]
        LispHighlighter["LispHighlighter"]:::ui
        NavInterface["Navigation Interface"]:::ui
        QtDep["Qt/LeanQt Framework"]:::external
    end

    subgraph Support ["Support Layer"]
        LispRowCol["LispRowCol (Position Tracking)"]:::support
        BuildSystem["Build System (QMake/BUSY)"]:::support
    end

    subgraph Pipeline ["File Processing Pipeline"]
        RawSource["Raw Source Files"]:::file
        Tokens["Tokenization"]:::process
        AST["Parsing"]:::process
        NavIndex["Navigation Index"]:::process
    end

    subgraph CrossRef ["Cross-referencing System"]
        SymbolRes["Symbol Resolution"]:::xref
        DefTrack["Definition Tracking"]:::xref
        RefFind["Reference Finding"]:::xref
    end

    %% Core relationships
    RawSource --> Tokens --> AST --> NavIndex
    LispLexer --> LispReader
    LispReader --> LispNavigator
    LispReader --> LispBuiltins
    
    %% UI dependencies
    LispHighlighter -.-> LispLexer
    NavInterface -.-> LispNavigator
    NavInterface -.-> QtDep
    
    %% Support connections
    LispRowCol -.-> LispReader
    LispRowCol -.-> LispLexer
    
    %% Cross-referencing connections
    LispNavigator --> SymbolRes
    LispNavigator --> DefTrack
    LispNavigator --> RefFind

    %% Click events
    click LispReader "https://github.com/rochus-keller/Interlisp/blob/master/LispReader.h"
    click LispLexer "https://github.com/rochus-keller/Interlisp/blob/master/LispLexer.h"
    click LispNavigator "https://github.com/rochus-keller/Interlisp/blob/master/LispNavigator.h"
    click LispBuiltins "https://github.com/rochus-keller/Interlisp/blob/master/LispBuiltins.h"
    click LispHighlighter "https://github.com/rochus-keller/Interlisp/blob/master/LispHighlighter.h"
    click LispRowCol "https://github.com/rochus-keller/Interlisp/blob/master/LispRowCol.h"
    click BuildSystem "https://github.com/rochus-keller/Interlisp/blob/master/Interlisp.pro"

    %% Styling
    classDef core fill:#a8d1f0,stroke:#333
    classDef ui fill:#90EE90,stroke:#333
    classDef support fill:#D3D3D3,stroke:#333
    classDef external fill:#FFE4B5,stroke:#333
    classDef process fill:#F0F8FF,stroke:#333
    classDef file fill:#FFF0F5,stroke:#333
    classDef xref fill:#E6E6FA,stroke:#333

    %% Legend
    subgraph Legend
        L1["Core Components"]:::core
        L2["UI Components"]:::ui
        L3["Support Utilities"]:::support
        L4["External Dependencies"]:::external
        L5["Processing Steps"]:::process
        L6["Cross-referencing"]:::xref
    end
```
