-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Abe Pralle edited this page Apr 22, 2021
·
20 revisions
- Froley is a "compiler compiler" for creating virtual machine-based tokenizers and parsers.
- A developer programs their tokenizer and parser in two different domain-specific languages: Froley Tokenizer Language (FTL) and Froley Parser Language (FPL).
- The Froley compiler turns the Tokenizer and Parser programs into bytecode. It also generates Tokenizer and Parser VMs to run the bytecode along with supporting compiler framework in a specified target language - currently only Rogue is supported.
- Froley can update a previously-generated compiler framework. It will rewrite certain enumerations and add new command cmd (AST cmd) class definitions but it will not overwrite any custom modifications that have been made.
- Consequently the ".froley" source file serves as the master definition for a custom language's syntax, grammar, tokenizer, and parser. Changes and additions made to the language can be easily propagated to various compiler implementations in a variety of host languages.
See:
froley filename.froley [options]
| Option | Description |
|---|---|
| --language=name | Specifies the name of the language that the Froley-generated Tokenizer and Parser will parse. For example, to generate Rogue source code that will parse a language called Simple you would write froley --language=Simple. If no --language is specified then the base name of the .froley filename is used as the language name. |
| --main | Creates a main file (if it does not yet exist) to test out the tokenizer and parser. |
| --output=folder | Specifies the output folder for generated code. |