How yassine-jemi01/ylang works
YLang is a compiled language toolchain: a programmer invokes its CLI to check or fix source, emit C, or build a native executable. The principal build flow is source loading, lexing and parsing, semantic checking, C generation, then native compilation. The graph also retains the documented language/runtime capabilities, optional SDL GUI API, and VS Code support. Stage handoffs are documented in the README; several implementation details and editor wiring are not excerpted, so uncertain links are omitted or marked unverified.
Main entry points: driver.c Compiler driver · codegen.c C code generator · parser.c Parser and AST · internal.h Compiler state and utilities
Components 18
CLI and orchestration
- Compiler CLI
src/main.c - Compiler driver
src/driver.c - Compiler state and utilities
src/internal.h
Language frontend
- Lexer
src/lexer.c - Token model
include/ylang/lexer.h - Parser and AST
src/parser.c - Compiler AST types
include/ylang/compiler.h - Semantic checker
src/sema.c
Code generation and runtime
- C code generator
src/codegen.c - Language built-ins
src/sema.c
Editor and GUI
- GUI API
include/ylang/gui.h - SDL GUI runtime
stdlib/gui/gui.c - VS Code support
editors/vscode/extension.js
Other components
- Programmer
- YLang source
- GCC or Clang
- Native executable
- SDL2
Connections 23
- Programmer → Compiler CLI: invokes
src/main.c - Compiler CLI → Compiler driver: dispatches
src/main.c - Compiler driver → YLang source: reads
src/driver.c - Compiler driver → Lexer: starts compilation
- Lexer → Token model: produces
src/lexer.c - Parser and AST → Lexer: requests tokens
src/parser.c - Parser and AST → Compiler AST types: builds
include/ylang/compiler.h - Compiler driver → Parser and AST: parses source
README.md - Compiler driver → Semantic checker: checks program
README.md - Compiler driver → C code generator: generates C
README.md - Semantic checker → Compiler AST types: checks
src/sema.c - C code generator → Compiler AST types: emits from
src/codegen.c - Compiler driver → Compiler state and utilities: uses state
src/driver.c - Parser and AST → Compiler state and utilities: uses utilities
src/parser.c - Semantic checker → Compiler state and utilities: uses compiler state
src/sema.c - C code generator → Compiler state and utilities: uses compiler state
src/codegen.c - C code generator → Language built-ins: emits runtime helpers
- Compiler driver → GCC or Clang: invokes
README.md - GCC or Clang → Native executable: compiles
README.md - Programmer → VS Code support: edits source
- VS Code support → Compiler CLI: checks files
- GUI API → SDL GUI runtime: implemented by
stdlib/gui/gui.c - SDL GUI runtime → SDL2: uses
stdlib/gui/gui.c