Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Compiler_Operator.H File Reference

Reusable operator vocabulary shared by HIR, IR, and backend layers. More...

#include <Compiler_Token.H>
Include dependency graph for Compiler_Operator.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Aleph
 Main namespace for Aleph-w library functions.
 

Enumerations

enum class  Aleph::Compiler_Operator_Kind {
  Aleph::Invalid , Aleph::Assign , Aleph::Plus , Aleph::Minus ,
  Aleph::Star , Aleph::Slash , Aleph::Percent , Aleph::EqEq ,
  Aleph::NotEq , Aleph::Less , Aleph::LessEq , Aleph::Greater ,
  Aleph::GreaterEq , Aleph::AndAnd , Aleph::OrOr , Aleph::Bang ,
  Aleph::Amp , Aleph::Pipe , Aleph::Caret , Aleph::Tilde ,
  Aleph::PlusEq , Aleph::MinusEq , Aleph::StarEq , Aleph::SlashEq ,
  Aleph::PercentEq , Aleph::PlusPlus , Aleph::MinusMinus
}
 Stable operator kinds shared by reusable compiler layers. More...
 

Functions

const char * Aleph::compiler_operator_name (const Compiler_Operator_Kind kind) noexcept
 Returns a stable debug name for one operator kind.
 
Compiler_Operator_Kind Aleph::compiler_operator_from_token_kind (const Compiler_Token_Kind kind) noexcept
 Maps one reference-frontend token kind into a reusable operator kind.
 
Compiler_Token_Kind Aleph::compiler_operator_to_token_kind (const Compiler_Operator_Kind kind) noexcept
 Maps one reusable operator kind back into the MVP token kind.
 
bool Aleph::compiler_operator_is_compound_assignment (const Compiler_Operator_Kind kind) noexcept
 Returns whether kind is one compound-assignment operator.
 
Compiler_Operator_Kind Aleph::compiler_operator_compound_base (const Compiler_Operator_Kind kind) noexcept
 Returns the arithmetic operator underlying one compound assignment.
 

Detailed Description

Reusable operator vocabulary shared by HIR, IR, and backend layers.

The reference frontend still parses operators from Compiler_Token.H, but middle-end and backend layers should not need to model operators in terms of lexer token categories. This header provides a stable operator enum plus compatibility helpers to translate to and from the current token kinds.

Definition in file Compiler_Operator.H.