AeroC is a C-based domain-specific language (DSL) for aviation operations, modelled after a Global Distribution System (GDS). It parses flight-related commands from an input file and produces booking output.
- Search and book flights using a simple command syntax
- Auto-generates a 6-character alphanumeric PNR (Passenger Name Record)
- Manage flights, bookings, and airports in memory
- Cancel bookings by PNR
- List all current bookings and airports
Commands are written in plain text and passed via input.txt:
searchflight <flight_id> <from> to <to> book <seats> seat <date> <time>
Example:
searchflight pd123 yyz to yow book 1 seat 2025-05-25 10:00
| Field | Description | Example |
|---|---|---|
flight_id |
Flight number | pd123 |
from |
Departure airport code | yyz |
to |
Arrival airport code | yow |
seats |
Number of seats | 1 |
date |
Travel date (YYYY-MM-DD) | 2025-05-25 |
time |
Departure time (HH:MM) | 10:00 |
With CMake:
mkdir build && cd build
cmake ..
cmake --build .With MSVC (Visual Studio):
Open AeroC_GDS.sln and build.
./AeroC_GDS input.txt output.txtThe program reads one command from input.txt, processes it, and writes the booking result to output.txt.
Output example:
booked yyz to yow flight pd123 date 2025-05-25 time 10:00 seats 1 PNR: K3X9AM
AeroC defines its own type aliases for aviation concepts:
| Type | Underlying | Purpose |
|---|---|---|
aeroc_flightid |
char[32] |
Flight number |
aeroc_airport |
char[8] |
IATA airport code |
aeroc_date |
char[16] |
Date string |
aeroc_time |
char[8] |
Time string |
aeroc_pnr |
char[7] |
Booking reference |
aeroc_name |
char[70] |
Passenger name |
aeroc_class |
char[8] |
Booking class (Y/J/F) |
aeroc_farecode |
char[8] |
Fare code |
AeroC.h Type definitions, structs, and function prototypes
AeroC_Main.c Entry point — reads input, calls parser and booking writer
AeroC_Parser.c Parses DSL command string into structured fields
AeroC_Booking.c Flight/booking/airport operations (add, book, cancel, list)
input.txt Sample DSL command input
CMakeLists.txt CMake build config
AeroC_GDS.sln Visual Studio solution