Skip to content

shrumo/owl-cmake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

owl-cmake

Build Status

This provides convenient wrapper for owl parser generator.

Example

You can have the following file structure:

├── CMakeLists.txt
├── extern
│   └── owl-cmake (e.g. as a git submodule)
├── face.owl
└── run.c

With this cmake:

cmake_minimum_required(VERSION 3.11.4)
  
project(face-grammar)

add_subdirectory(extern/owl-cmake)

owl_generate_header(face.owl)

add_executable(run run.c face.owl.h)

When building with this cmake, a face.owl.h is created:

├── CMakeLists.txt
├── extern
│   └── owl-cmake (e.g. as a git submodule)
├── face.owl
├── face.owl.h (this gets created)
└── run.c

And it can be used from your sources:

#define OWL_PARSER_IMPLEMENTATION
#include "face.owl.h"

int main()
{
    struct owl_tree *tree;
    tree = owl_tree_create_from_string(":)");
    owl_tree_print(tree);
    owl_tree_destroy(tree);
    return 0;
}

About

Unofficial cmake wrapper for owl parser.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published