About | Current Release |
---|---|
Version | 5.1.1 |
Date | April 11, 2024 |
Platforms | macOS, Linux, Windows |
Output Targets | Rogue |
Author | Brom Bresenham |
- Froley is a "compiler compiler" that creates and maintains a compiler or interpreter framework.
- A
.froley
definition file contains token definitions as well as Scanner and Parser logic written in the domain-specific Froley language. The Froley language is imperative with declarative-style features. - Froley outputs a working compiler framework which includes a Scanner, a Parser, "Cmd" node definitions, and "Visitor" infrastructure for inspecting and processing the AST (Abstract Syntax Tree) output of the Parser.
- If the
.froley
definition is updated and Froley is re-run on an existing project, it will make necessary changes without overwriting developer modifications. - Froley currently only outputs compilers written in the Rogue language, which in turn is compatible with C. Other language targets may be added in the future.
- Froley is self-hosting - the Froley compiler framework is written in Froley.
- Install morlock.sh
morlock install brombres/froley
morlock update froley
Refer to the Wiki.
The Examples folder contains a number of examples of increasing scope. Run rogo
in an example folder to compile and run the example.
Because Froley is written in Froley, examine the Source folder for a look at a full project implemented in Froley.
froley [OPTIONS] language-definition.froley output-folder/
-
--create
,-c
Creates a new template project and Rogo-based build framework in the current folder. Uses the current folder name as the project name or else specify a different project name with--project=ProjectName
. -
--help
,-h
,-?
Display help text. -
--main
,-m
Creates a main application file that demonstrates how to use the scanner and parser. Does not create or modify a main file if it already exists. If the language definition is namedXYZ.froley
then the main application file will beXYZ.rogue
. -
--project=ProjectName
,-p ProjectName
If you--create
a project in the current folder, this option can be used to specify a different project name than the name of the folder.