Carburetta is available for download in source form. The current version is v0.8.4, available from:
Build on Linux
First retrieve the source release:
Unzip or untar it, and enter its directory.
To build carburetta, you will need to have clang or gcc installed, then enter make:
Carburetta has now been built, what remains is to install it in
Build on Windows
Windows is supported, however, there is currently no installer available, consequently, you will have to build it from source. You will need Microsoft Visual Studio 2017 for this, Community Edition is fine.
First download and extract the source. In the source directory you will see a
carburetta.sln file. This is the Microsoft Visual Studio 2017 solution file for the project.
carburetta.sln solution in visual studio, set the configuration to
x64 and build it.
After building, the carburetta executable is stored at
Command line usage
carburetta command with no arguments to see its commandline usage:
$ carburetta Error: need an input filename Carburetta parser generator (C) 2020-2021 Kinglet B.V. version 0.8.4 https://carburetta.com/ carburetta <inputfile.cbrt> [ --c [ <c_filename> [--h [h_filename] ] ] ] <inputfile.cbrt> the input file containing the grammar (mandatory) --c generate a C file (implied if ommitted) --c [<c_filename>] generate a C file and output it to c_filename. If no filename is specified, then output will be to stdout --h [<h_filename>] generate a C header file and output it to h_filename. If no filename is present, a c_filename must be present as it will then be used to derive a filename for the header file.
Carburetta always takes an explicit input file (you cannot stream the input via stdin), and generates at least a C file of the same name, but with the file extension changed to C. The
--c option indicates that a C file should be generated, and takes an optional filename for that C file. To also generate a header file, specify the
--h option. The
--h option also takes an optional filename for the header file. If the header filename is not specified, then one is generated by changing the file extension of the C filename.
If you are new to Carburetta, your best next step is to study the Documentation, it contains further examples.
Development of Carburetta occurs on github at https://github.com/kingletbv/carburetta. Please note that pull requests are not currently accepted, both due to the intricacies of the codebase making review of foreign changes complex, and the impracticality of ensuring and/or transferring code ownership.