Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/inanyan/lisp-cpp-project-generator
C++ project generator
https://github.com/inanyan/lisp-cpp-project-generator
Last synced: about 2 months ago
JSON representation
C++ project generator
- Host: GitHub
- URL: https://github.com/inanyan/lisp-cpp-project-generator
- Owner: InAnYan
- Created: 2023-10-27T19:39:45.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-08T20:39:29.000Z (about 1 year ago)
- Last Synced: 2023-11-08T22:50:00.987Z (about 1 year ago)
- Language: Common Lisp
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# C++ project generator
A simple program written in Lisp that generates C++ project files.## Usage:
```sh
sbcl --script cpp-project-generator.lisp path
```
Where: `path` - path to the description of the project.## Grammar of description file
```
node
```
Where `node` is one of the following:
```
(namespace NAME ; NAME is a string.
node*)
```
or
```
(klass NAME) ; NAME is a string.
```
or
```
(exception NAME ; NAME is a string.
var*)
```
Where `var` is:
```
(TYPE NAME) ; TYPE and NAME are strings.
```## Generation of project tree
- Every `namespace` corresponds to a new folder and a C++ namespace.
- Every `klass` corresponds to two files in the same directory: header (`.hpp`) and implementation (`.cpp`). The class will have namespaces as specified in the description.
- Every `exception` is like a `klass` but it is tuned to exception. It generates appropriate getters and setters for user-defined fields. For more information try running `example.lisp` file.## Files:
- `cpp-project-generator.lisp`: main executable.
- `files-generator.lisp`: functions that generate files.
- `macro-reader.lisp`: transforms description files into correct Lisp program that calls functions from `files-generator.lisp`.## Extra
This repository contatins file `start-project.lisp` which initializes an empty C++ project.