roup/
lib.rs

1//! # Rust-based OpenMP/OpenACC Unified Parser (ROUP)
2//!
3//! ROUP is a standalone, unified parser for OpenMP and OpenACC, designed as an
4//! extensible framework for directive-based programming interfaces.
5//!
6//! ## Learning from This Project
7//!
8//! This codebase is organized to teach Rust programming concepts step-by-step:
9//!
10//! 1. **Basics**: Structs, enums, lifetimes, pattern matching
11//! 2. **Intermediate**: Modules, traits, HashMap/Option, builder pattern
12//! 3. **Advanced**: Parser combinators using nom, function pointers, registries
13//! 4. **IR Layer**: Semantic representation, enums for polymorphism, FFI design
14//!
15//! Study the git history to see how the project evolved!
16
17// ============================================================================
18// Module Organization
19// ============================================================================
20//
21// This library is organized into focused modules:
22//
23// - `lexer`: Tokenization using nom parser combinators
24// - `parser`: Directive and clause parsing infrastructure
25// - `ir`: Intermediate representation (semantic layer)
26// - `c_api`: C FFI with minimal unsafe code (production API)
27//
28// Each module teaches different Rust concepts while building a working parser.
29
30pub mod c_api; // Minimal unsafe C FFI (production API)
31pub mod ir;
32pub mod lexer;
33pub mod parser;
34
35// Re-export C API for convenience
36pub use c_api::*;