|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Example frontend for a tiny line-oriented language built on reusable contracts. More...
#include <charconv>#include <cctype>#include <cstdlib>#include <sstream>#include <string>#include <string_view>#include <utility>#include <Compiler_Frontend.H>#include <Compiler_HIR_Builder.H>#include <Compiler_Module_Name_Diagnostics.H>#include <Compiler_Module_Name_Resolver.H>#include <Compiler_Module_Semantic_Environment.H>#include <Compiler_Module_Resolver.H>#include <Compiler_IR_Builder.H>#include <Compiler_Symbol_Bindings.H>Go to the source code of this file.
Classes | |
| class | Aleph::Compiler_Line_Frontend |
| Small example frontend for a line-oriented language. More... | |
| struct | Aleph::Compiler_Line_Frontend::Operand |
| struct | Aleph::Compiler_Line_Frontend::Function_Definition |
| struct | Aleph::Compiler_Line_Frontend::Let_Definition |
| struct | Aleph::Compiler_Line_Frontend::Parsed_Source |
Namespaces | |
| namespace | Aleph |
| Main namespace for Aleph-w library functions. | |
Example frontend for a tiny line-oriented language built on reusable contracts.
This header provides a deliberately small second frontend that does not use the MVP lexer or parser. It exists to validate that the reusable driver, HIR builder, and IR builder can support another language frontend with its own surface syntax.
The accepted language is line-based and intentionally tiny:
import <source-name>func <name> <x> <y> = <op> <lhs> <rhs>let <name> = int <value>let <name> = call <func> <arg1> <arg2>where <op> is one of add, sub, mul, or div. Function operands may refer to the two parameter names or to integer literals.
Definition in file Compiler_Line_Frontend.H.