Skip to content

Instantly share code, notes, and snippets.

@ridiculousfish
Created September 24, 2022 02:02
Show Gist options
  • Save ridiculousfish/63449ca95d3f957f53a85b2c3e115378 to your computer and use it in GitHub Desktop.
Save ridiculousfish/63449ca95d3f957f53a85b2c3e115378 to your computer and use it in GitHub Desktop.
#pragma once
#include "langcc_rt.hpp"
namespace lang::calc::lexer {
rc_ptr<lang_rt::DFALabelIdVec> label_ids_ascii();
rc_ptr<lang_rt::DFALabelIdMap> label_ids_unicode();
}
namespace lang::calc::lexer::body {
lang_rt::DFAVertexId step(lang_rt::DFAVertexId v, lang_rt::DFALabelId lbl);
__attribute__((always_inline)) lang_rt::DFAActionWithToken acc(lang_rt::DFAVertexId v);
__attribute__((always_inline)) IntPair step_exec(ptr<lang_rt::LexerState> st, ptr<lang_rt::SymItemVec> emit_dst, ptr<lang_rt::LexWhitespaceState> ws_state, lang_rt::DFAActionId acc, lang_rt::TokenId tok, Int& in_i, Int& tok_lo, Int& tok_hi);
Int proc_mode_loop(ptr<lang_rt::LexerState> st, ptr<lang_rt::SymItemVec> emit_dst, Int mode_start_pos, Int mode_buf_pos);
}
namespace lang::calc::lexer::comment_single {
lang_rt::DFAVertexId step(lang_rt::DFAVertexId v, lang_rt::DFALabelId lbl);
__attribute__((always_inline)) lang_rt::DFAActionWithToken acc(lang_rt::DFAVertexId v);
__attribute__((always_inline)) IntPair step_exec(ptr<lang_rt::LexerState> st, ptr<lang_rt::SymItemVec> emit_dst, ptr<lang_rt::LexWhitespaceState> ws_state, lang_rt::DFAActionId acc, lang_rt::TokenId tok, Int& in_i, Int& tok_lo, Int& tok_hi);
Int proc_mode_loop(ptr<lang_rt::LexerState> st, ptr<lang_rt::SymItemVec> emit_dst, Int mode_start_pos, Int mode_buf_pos);
}
#pragma once
#include "langcc_util.hpp"
namespace lang::calc::Node::Stmt::Assign {
struct _T;
}
namespace lang::calc::Node::Stmt {
using Assign_T = rc_ptr<lang::calc::Node::Stmt::Assign::_T>;
}
namespace lang::calc::Node::Stmt::Expr {
struct _T;
}
namespace lang::calc::Node::Stmt {
using Expr_T = rc_ptr<lang::calc::Node::Stmt::Expr::_T>;
}
namespace lang::calc::Node::Expr::Id {
struct _T;
}
namespace lang::calc::Node::Expr {
using Id_T = rc_ptr<lang::calc::Node::Expr::Id::_T>;
}
namespace lang::calc::Node::Expr::Lit::Int_ {
struct _T;
}
namespace lang::calc::Node::Expr::Lit {
using Int__T = rc_ptr<lang::calc::Node::Expr::Lit::Int_::_T>;
}
namespace lang::calc::Node::Expr::UnaryPre::op::Neg {
struct _T;
}
namespace lang::calc::Node::Expr::UnaryPre::op {
using Neg_T = rc_ptr<lang::calc::Node::Expr::UnaryPre::op::Neg::_T>;
}
namespace lang::calc::Node::Expr::UnaryPre::op {
struct _T;
}
namespace lang::calc::Node::Expr::UnaryPre {
using op_T = rc_ptr<lang::calc::Node::Expr::UnaryPre::op::_T>;
}
namespace lang::calc::Node::Expr::UnaryPre {
struct _T;
}
namespace lang::calc::Node::Expr {
using UnaryPre_T = rc_ptr<lang::calc::Node::Expr::UnaryPre::_T>;
}
namespace lang::calc::Node::Expr::BinOp1::op::Add {
struct _T;
}
namespace lang::calc::Node::Expr::BinOp1::op {
using Add_T = rc_ptr<lang::calc::Node::Expr::BinOp1::op::Add::_T>;
}
namespace lang::calc::Node::Expr::BinOp1::op::Sub {
struct _T;
}
namespace lang::calc::Node::Expr::BinOp1::op {
using Sub_T = rc_ptr<lang::calc::Node::Expr::BinOp1::op::Sub::_T>;
}
namespace lang::calc::Node::Expr::BinOp1::op {
struct _T;
}
namespace lang::calc::Node::Expr::BinOp1 {
using op_T = rc_ptr<lang::calc::Node::Expr::BinOp1::op::_T>;
}
namespace lang::calc::Node::Expr::BinOp1 {
struct _T;
}
namespace lang::calc::Node::Expr {
using BinOp1_T = rc_ptr<lang::calc::Node::Expr::BinOp1::_T>;
}
namespace lang::calc::Node::Expr::BinOp2::op::Mul {
struct _T;
}
namespace lang::calc::Node::Expr::BinOp2::op {
using Mul_T = rc_ptr<lang::calc::Node::Expr::BinOp2::op::Mul::_T>;
}
namespace lang::calc::Node::Expr::BinOp2::op::Div {
struct _T;
}
namespace lang::calc::Node::Expr::BinOp2::op {
using Div_T = rc_ptr<lang::calc::Node::Expr::BinOp2::op::Div::_T>;
}
namespace lang::calc::Node::Expr::BinOp2::op {
struct _T;
}
namespace lang::calc::Node::Expr::BinOp2 {
using op_T = rc_ptr<lang::calc::Node::Expr::BinOp2::op::_T>;
}
namespace lang::calc::Node::Expr::BinOp2 {
struct _T;
}
namespace lang::calc::Node::Expr {
using BinOp2_T = rc_ptr<lang::calc::Node::Expr::BinOp2::_T>;
}
namespace lang::calc::Node::Expr::BinOp3::op::Pow {
struct _T;
}
namespace lang::calc::Node::Expr::BinOp3::op {
using Pow_T = rc_ptr<lang::calc::Node::Expr::BinOp3::op::Pow::_T>;
}
namespace lang::calc::Node::Expr::BinOp3::op {
struct _T;
}
namespace lang::calc::Node::Expr::BinOp3 {
using op_T = rc_ptr<lang::calc::Node::Expr::BinOp3::op::_T>;
}
namespace lang::calc::Node::Expr::BinOp3 {
struct _T;
}
namespace lang::calc::Node::Expr {
using BinOp3_T = rc_ptr<lang::calc::Node::Expr::BinOp3::_T>;
}
namespace lang::calc::Node::Expr::Paren {
struct _T;
}
namespace lang::calc::Node::Expr {
using Paren_T = rc_ptr<lang::calc::Node::Expr::Paren::_T>;
}
namespace lang::calc::Node::Stmt {
struct _T;
}
namespace lang::calc::Node {
using Stmt_T = rc_ptr<lang::calc::Node::Stmt::_T>;
}
namespace lang::calc::Node::Expr {
struct _T;
}
namespace lang::calc::Node {
using Expr_T = rc_ptr<lang::calc::Node::Expr::_T>;
}
namespace lang::calc::Node::Expr::Lit {
struct _T;
}
namespace lang::calc::Node::Expr {
using Lit_T = rc_ptr<lang::calc::Node::Expr::Lit::_T>;
}
namespace lang::calc::Node {
struct _T;
}
namespace lang::calc {
using Node_T = rc_ptr<lang::calc::Node::_T>;
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node_T x);
namespace lang::calc::Node {
enum struct _W {
Expr__UnaryPre__op,
Expr__BinOp1__op,
Expr__BinOp2__op,
Expr__BinOp3__op,
Stmt,
Expr,
};
}
namespace lang::calc::Node {
struct _T: hash_obj, enable_rc_from_this_poly {
void write(ostream& os, FmtFlags flags);
lang::calc::Node::_W w_;
virtual ~_T();
Int id_;
lang_rt::TokenBounds bounds_;
bool is_top_;
lang_rt::ParserSymId sym_;
lang_rt::ParserAttrMask attr_;
lang_rt::ParserLookahead first_k_;
_T(lang::calc::Node::_W w);
bool is_Expr__UnaryPre__op();
bool is_Expr__BinOp1__op();
bool is_Expr__BinOp2__op();
bool is_Expr__BinOp3__op();
bool is_Stmt();
bool is_Expr();
lang::calc::Node::Expr::UnaryPre::op_T as_Expr__UnaryPre__op();
lang::calc::Node::Expr::BinOp1::op_T as_Expr__BinOp1__op();
lang::calc::Node::Expr::BinOp2::op_T as_Expr__BinOp2__op();
lang::calc::Node::Expr::BinOp3::op_T as_Expr__BinOp3__op();
lang::calc::Node::Stmt_T as_Stmt();
lang::calc::Node::Expr_T as_Expr();
void hash_ser_acc_lang_calc_Node(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const = 0;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Stmt_T x);
namespace lang::calc::Node::Stmt {
enum struct _W {
Assign,
Expr,
};
}
namespace lang::calc::Node::Stmt {
struct _T: lang::calc::Node::_T {
void write(ostream& os, FmtFlags flags);
lang::calc::Node::Stmt::_W w_;
virtual ~_T();
_T(lang::calc::Node::Stmt::_W w);
bool is_Assign();
bool is_Expr();
lang::calc::Node::Stmt::Assign_T as_Assign();
lang::calc::Node::Stmt::Expr_T as_Expr();
void hash_ser_acc_lang_calc_Node_Stmt(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const = 0;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Expr_T x);
namespace lang::calc::Node::Expr {
enum struct _W {
Id,
UnaryPre,
BinOp1,
BinOp2,
BinOp3,
Paren,
Lit,
};
}
namespace lang::calc::Node::Expr {
struct _T: lang::calc::Node::_T {
void write(ostream& os, FmtFlags flags);
lang::calc::Node::Expr::_W w_;
virtual ~_T();
_T(lang::calc::Node::Expr::_W w);
bool is_Id();
bool is_UnaryPre();
bool is_BinOp1();
bool is_BinOp2();
bool is_BinOp3();
bool is_Paren();
bool is_Lit();
lang::calc::Node::Expr::Id_T as_Id();
lang::calc::Node::Expr::UnaryPre_T as_UnaryPre();
lang::calc::Node::Expr::BinOp1_T as_BinOp1();
lang::calc::Node::Expr::BinOp2_T as_BinOp2();
lang::calc::Node::Expr::BinOp3_T as_BinOp3();
lang::calc::Node::Expr::Paren_T as_Paren();
lang::calc::Node::Expr::Lit_T as_Lit();
void hash_ser_acc_lang_calc_Node_Expr(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const = 0;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Stmt::Assign_T x);
namespace lang::calc::Node::Stmt::Assign {
__attribute__((always_inline)) lang::calc::Node::Stmt::Assign_T make(Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k, lang::calc::Node::Expr_T x, lang::calc::Node::Expr_T y);
}
namespace lang::calc::Node::Stmt::Assign {
__attribute__((always_inline)) lang::calc::Node::Stmt::Assign_T make_ext(ArenaPtr arena, Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k, lang::calc::Node::Expr_T x, lang::calc::Node::Expr_T y);
}
namespace lang::calc::Node::Stmt::Assign {
struct _T: lang::calc::Node::Stmt::_T {
void write(ostream& os, FmtFlags flags);
lang::calc::Node::Expr_T x_;
lang::calc::Node::Expr_T y_;
_T();
lang::calc::Node::Stmt::Assign_T with_id(Int id);
lang::calc::Node::Stmt::Assign_T with_bounds(lang_rt::TokenBounds bounds);
lang::calc::Node::Stmt::Assign_T with_is_top(bool is_top);
lang::calc::Node::Stmt::Assign_T with_sym(lang_rt::ParserSymId sym);
lang::calc::Node::Stmt::Assign_T with_attr(lang_rt::ParserAttrMask attr);
lang::calc::Node::Stmt::Assign_T with_first_k(lang_rt::ParserLookahead first_k);
lang::calc::Node::Stmt::Assign_T with_x(lang::calc::Node::Expr_T x);
lang::calc::Node::Stmt::Assign_T with_y(lang::calc::Node::Expr_T y);
void hash_ser_acc_lang_calc_Node_Stmt_Assign(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Stmt::Expr_T x);
namespace lang::calc::Node::Stmt::Expr {
__attribute__((always_inline)) lang::calc::Node::Stmt::Expr_T make(Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k, lang::calc::Node::Expr_T x);
}
namespace lang::calc::Node::Stmt::Expr {
__attribute__((always_inline)) lang::calc::Node::Stmt::Expr_T make_ext(ArenaPtr arena, Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k, lang::calc::Node::Expr_T x);
}
namespace lang::calc::Node::Stmt::Expr {
struct _T: lang::calc::Node::Stmt::_T {
void write(ostream& os, FmtFlags flags);
lang::calc::Node::Expr_T x_;
_T();
lang::calc::Node::Stmt::Expr_T with_id(Int id);
lang::calc::Node::Stmt::Expr_T with_bounds(lang_rt::TokenBounds bounds);
lang::calc::Node::Stmt::Expr_T with_is_top(bool is_top);
lang::calc::Node::Stmt::Expr_T with_sym(lang_rt::ParserSymId sym);
lang::calc::Node::Stmt::Expr_T with_attr(lang_rt::ParserAttrMask attr);
lang::calc::Node::Stmt::Expr_T with_first_k(lang_rt::ParserLookahead first_k);
lang::calc::Node::Stmt::Expr_T with_x(lang::calc::Node::Expr_T x);
void hash_ser_acc_lang_calc_Node_Stmt_Expr(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Expr::Id_T x);
namespace lang::calc::Node::Expr::Id {
__attribute__((always_inline)) lang::calc::Node::Expr::Id_T make(Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k, StrSlice name);
}
namespace lang::calc::Node::Expr::Id {
__attribute__((always_inline)) lang::calc::Node::Expr::Id_T make_ext(ArenaPtr arena, Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k, StrSlice name);
}
namespace lang::calc::Node::Expr::Id {
struct _T: lang::calc::Node::Expr::_T {
void write(ostream& os, FmtFlags flags);
StrSlice name_;
_T();
lang::calc::Node::Expr::Id_T with_id(Int id);
lang::calc::Node::Expr::Id_T with_bounds(lang_rt::TokenBounds bounds);
lang::calc::Node::Expr::Id_T with_is_top(bool is_top);
lang::calc::Node::Expr::Id_T with_sym(lang_rt::ParserSymId sym);
lang::calc::Node::Expr::Id_T with_attr(lang_rt::ParserAttrMask attr);
lang::calc::Node::Expr::Id_T with_first_k(lang_rt::ParserLookahead first_k);
lang::calc::Node::Expr::Id_T with_name(StrSlice name);
void hash_ser_acc_lang_calc_Node_Expr_Id(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Expr::UnaryPre_T x);
namespace lang::calc::Node::Expr::UnaryPre {
__attribute__((always_inline)) lang::calc::Node::Expr::UnaryPre_T make(Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k, lang::calc::Node::Expr::UnaryPre::op_T op, lang::calc::Node::Expr_T x);
}
namespace lang::calc::Node::Expr::UnaryPre {
__attribute__((always_inline)) lang::calc::Node::Expr::UnaryPre_T make_ext(ArenaPtr arena, Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k, lang::calc::Node::Expr::UnaryPre::op_T op, lang::calc::Node::Expr_T x);
}
namespace lang::calc::Node::Expr::UnaryPre {
struct _T: lang::calc::Node::Expr::_T {
void write(ostream& os, FmtFlags flags);
lang::calc::Node::Expr::UnaryPre::op_T op_;
lang::calc::Node::Expr_T x_;
_T();
lang::calc::Node::Expr::UnaryPre_T with_id(Int id);
lang::calc::Node::Expr::UnaryPre_T with_bounds(lang_rt::TokenBounds bounds);
lang::calc::Node::Expr::UnaryPre_T with_is_top(bool is_top);
lang::calc::Node::Expr::UnaryPre_T with_sym(lang_rt::ParserSymId sym);
lang::calc::Node::Expr::UnaryPre_T with_attr(lang_rt::ParserAttrMask attr);
lang::calc::Node::Expr::UnaryPre_T with_first_k(lang_rt::ParserLookahead first_k);
lang::calc::Node::Expr::UnaryPre_T with_op(lang::calc::Node::Expr::UnaryPre::op_T op);
lang::calc::Node::Expr::UnaryPre_T with_x(lang::calc::Node::Expr_T x);
void hash_ser_acc_lang_calc_Node_Expr_UnaryPre(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Expr::BinOp1_T x);
namespace lang::calc::Node::Expr::BinOp1 {
__attribute__((always_inline)) lang::calc::Node::Expr::BinOp1_T make(Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k, lang::calc::Node::Expr_T x, lang::calc::Node::Expr::BinOp1::op_T op, lang::calc::Node::Expr_T y);
}
namespace lang::calc::Node::Expr::BinOp1 {
__attribute__((always_inline)) lang::calc::Node::Expr::BinOp1_T make_ext(ArenaPtr arena, Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k, lang::calc::Node::Expr_T x, lang::calc::Node::Expr::BinOp1::op_T op, lang::calc::Node::Expr_T y);
}
namespace lang::calc::Node::Expr::BinOp1 {
struct _T: lang::calc::Node::Expr::_T {
void write(ostream& os, FmtFlags flags);
lang::calc::Node::Expr_T x_;
lang::calc::Node::Expr::BinOp1::op_T op_;
lang::calc::Node::Expr_T y_;
_T();
lang::calc::Node::Expr::BinOp1_T with_id(Int id);
lang::calc::Node::Expr::BinOp1_T with_bounds(lang_rt::TokenBounds bounds);
lang::calc::Node::Expr::BinOp1_T with_is_top(bool is_top);
lang::calc::Node::Expr::BinOp1_T with_sym(lang_rt::ParserSymId sym);
lang::calc::Node::Expr::BinOp1_T with_attr(lang_rt::ParserAttrMask attr);
lang::calc::Node::Expr::BinOp1_T with_first_k(lang_rt::ParserLookahead first_k);
lang::calc::Node::Expr::BinOp1_T with_x(lang::calc::Node::Expr_T x);
lang::calc::Node::Expr::BinOp1_T with_op(lang::calc::Node::Expr::BinOp1::op_T op);
lang::calc::Node::Expr::BinOp1_T with_y(lang::calc::Node::Expr_T y);
void hash_ser_acc_lang_calc_Node_Expr_BinOp1(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Expr::BinOp2_T x);
namespace lang::calc::Node::Expr::BinOp2 {
__attribute__((always_inline)) lang::calc::Node::Expr::BinOp2_T make(Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k, lang::calc::Node::Expr_T x, lang::calc::Node::Expr::BinOp2::op_T op, lang::calc::Node::Expr_T y);
}
namespace lang::calc::Node::Expr::BinOp2 {
__attribute__((always_inline)) lang::calc::Node::Expr::BinOp2_T make_ext(ArenaPtr arena, Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k, lang::calc::Node::Expr_T x, lang::calc::Node::Expr::BinOp2::op_T op, lang::calc::Node::Expr_T y);
}
namespace lang::calc::Node::Expr::BinOp2 {
struct _T: lang::calc::Node::Expr::_T {
void write(ostream& os, FmtFlags flags);
lang::calc::Node::Expr_T x_;
lang::calc::Node::Expr::BinOp2::op_T op_;
lang::calc::Node::Expr_T y_;
_T();
lang::calc::Node::Expr::BinOp2_T with_id(Int id);
lang::calc::Node::Expr::BinOp2_T with_bounds(lang_rt::TokenBounds bounds);
lang::calc::Node::Expr::BinOp2_T with_is_top(bool is_top);
lang::calc::Node::Expr::BinOp2_T with_sym(lang_rt::ParserSymId sym);
lang::calc::Node::Expr::BinOp2_T with_attr(lang_rt::ParserAttrMask attr);
lang::calc::Node::Expr::BinOp2_T with_first_k(lang_rt::ParserLookahead first_k);
lang::calc::Node::Expr::BinOp2_T with_x(lang::calc::Node::Expr_T x);
lang::calc::Node::Expr::BinOp2_T with_op(lang::calc::Node::Expr::BinOp2::op_T op);
lang::calc::Node::Expr::BinOp2_T with_y(lang::calc::Node::Expr_T y);
void hash_ser_acc_lang_calc_Node_Expr_BinOp2(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Expr::BinOp3_T x);
namespace lang::calc::Node::Expr::BinOp3 {
__attribute__((always_inline)) lang::calc::Node::Expr::BinOp3_T make(Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k, lang::calc::Node::Expr_T x, lang::calc::Node::Expr::BinOp3::op_T op, lang::calc::Node::Expr_T y);
}
namespace lang::calc::Node::Expr::BinOp3 {
__attribute__((always_inline)) lang::calc::Node::Expr::BinOp3_T make_ext(ArenaPtr arena, Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k, lang::calc::Node::Expr_T x, lang::calc::Node::Expr::BinOp3::op_T op, lang::calc::Node::Expr_T y);
}
namespace lang::calc::Node::Expr::BinOp3 {
struct _T: lang::calc::Node::Expr::_T {
void write(ostream& os, FmtFlags flags);
lang::calc::Node::Expr_T x_;
lang::calc::Node::Expr::BinOp3::op_T op_;
lang::calc::Node::Expr_T y_;
_T();
lang::calc::Node::Expr::BinOp3_T with_id(Int id);
lang::calc::Node::Expr::BinOp3_T with_bounds(lang_rt::TokenBounds bounds);
lang::calc::Node::Expr::BinOp3_T with_is_top(bool is_top);
lang::calc::Node::Expr::BinOp3_T with_sym(lang_rt::ParserSymId sym);
lang::calc::Node::Expr::BinOp3_T with_attr(lang_rt::ParserAttrMask attr);
lang::calc::Node::Expr::BinOp3_T with_first_k(lang_rt::ParserLookahead first_k);
lang::calc::Node::Expr::BinOp3_T with_x(lang::calc::Node::Expr_T x);
lang::calc::Node::Expr::BinOp3_T with_op(lang::calc::Node::Expr::BinOp3::op_T op);
lang::calc::Node::Expr::BinOp3_T with_y(lang::calc::Node::Expr_T y);
void hash_ser_acc_lang_calc_Node_Expr_BinOp3(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Expr::Paren_T x);
namespace lang::calc::Node::Expr::Paren {
__attribute__((always_inline)) lang::calc::Node::Expr::Paren_T make(Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k, lang::calc::Node::Expr_T x);
}
namespace lang::calc::Node::Expr::Paren {
__attribute__((always_inline)) lang::calc::Node::Expr::Paren_T make_ext(ArenaPtr arena, Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k, lang::calc::Node::Expr_T x);
}
namespace lang::calc::Node::Expr::Paren {
struct _T: lang::calc::Node::Expr::_T {
void write(ostream& os, FmtFlags flags);
lang::calc::Node::Expr_T x_;
_T();
lang::calc::Node::Expr::Paren_T with_id(Int id);
lang::calc::Node::Expr::Paren_T with_bounds(lang_rt::TokenBounds bounds);
lang::calc::Node::Expr::Paren_T with_is_top(bool is_top);
lang::calc::Node::Expr::Paren_T with_sym(lang_rt::ParserSymId sym);
lang::calc::Node::Expr::Paren_T with_attr(lang_rt::ParserAttrMask attr);
lang::calc::Node::Expr::Paren_T with_first_k(lang_rt::ParserLookahead first_k);
lang::calc::Node::Expr::Paren_T with_x(lang::calc::Node::Expr_T x);
void hash_ser_acc_lang_calc_Node_Expr_Paren(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Expr::Lit_T x);
namespace lang::calc::Node::Expr::Lit {
enum struct _W {
Int_,
};
}
namespace lang::calc::Node::Expr::Lit {
struct _T: lang::calc::Node::Expr::_T {
void write(ostream& os, FmtFlags flags);
lang::calc::Node::Expr::Lit::_W w_;
virtual ~_T();
_T(lang::calc::Node::Expr::Lit::_W w);
bool is_Int_();
lang::calc::Node::Expr::Lit::Int__T as_Int_();
void hash_ser_acc_lang_calc_Node_Expr_Lit(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const = 0;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Expr::Lit::Int__T x);
namespace lang::calc::Node::Expr::Lit::Int_ {
__attribute__((always_inline)) lang::calc::Node::Expr::Lit::Int__T make(Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k, StrSlice val);
}
namespace lang::calc::Node::Expr::Lit::Int_ {
__attribute__((always_inline)) lang::calc::Node::Expr::Lit::Int__T make_ext(ArenaPtr arena, Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k, StrSlice val);
}
namespace lang::calc::Node::Expr::Lit::Int_ {
struct _T: lang::calc::Node::Expr::Lit::_T {
void write(ostream& os, FmtFlags flags);
StrSlice val_;
_T();
lang::calc::Node::Expr::Lit::Int__T with_id(Int id);
lang::calc::Node::Expr::Lit::Int__T with_bounds(lang_rt::TokenBounds bounds);
lang::calc::Node::Expr::Lit::Int__T with_is_top(bool is_top);
lang::calc::Node::Expr::Lit::Int__T with_sym(lang_rt::ParserSymId sym);
lang::calc::Node::Expr::Lit::Int__T with_attr(lang_rt::ParserAttrMask attr);
lang::calc::Node::Expr::Lit::Int__T with_first_k(lang_rt::ParserLookahead first_k);
lang::calc::Node::Expr::Lit::Int__T with_val(StrSlice val);
void hash_ser_acc_lang_calc_Node_Expr_Lit_Int_(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Expr::UnaryPre::op_T x);
namespace lang::calc::Node::Expr::UnaryPre::op {
enum struct _W {
Neg,
};
}
namespace lang::calc::Node::Expr::UnaryPre::op {
struct _T: lang::calc::Node::_T {
void write(ostream& os, FmtFlags flags);
lang::calc::Node::Expr::UnaryPre::op::_W w_;
virtual ~_T();
_T(lang::calc::Node::Expr::UnaryPre::op::_W w);
bool is_Neg();
lang::calc::Node::Expr::UnaryPre::op::Neg_T as_Neg();
void hash_ser_acc_lang_calc_Node_Expr_UnaryPre_op(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const = 0;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Expr::BinOp1::op_T x);
namespace lang::calc::Node::Expr::BinOp1::op {
enum struct _W {
Add,
Sub,
};
}
namespace lang::calc::Node::Expr::BinOp1::op {
struct _T: lang::calc::Node::_T {
void write(ostream& os, FmtFlags flags);
lang::calc::Node::Expr::BinOp1::op::_W w_;
virtual ~_T();
_T(lang::calc::Node::Expr::BinOp1::op::_W w);
bool is_Add();
bool is_Sub();
lang::calc::Node::Expr::BinOp1::op::Add_T as_Add();
lang::calc::Node::Expr::BinOp1::op::Sub_T as_Sub();
void hash_ser_acc_lang_calc_Node_Expr_BinOp1_op(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const = 0;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Expr::BinOp2::op_T x);
namespace lang::calc::Node::Expr::BinOp2::op {
enum struct _W {
Mul,
Div,
};
}
namespace lang::calc::Node::Expr::BinOp2::op {
struct _T: lang::calc::Node::_T {
void write(ostream& os, FmtFlags flags);
lang::calc::Node::Expr::BinOp2::op::_W w_;
virtual ~_T();
_T(lang::calc::Node::Expr::BinOp2::op::_W w);
bool is_Mul();
bool is_Div();
lang::calc::Node::Expr::BinOp2::op::Mul_T as_Mul();
lang::calc::Node::Expr::BinOp2::op::Div_T as_Div();
void hash_ser_acc_lang_calc_Node_Expr_BinOp2_op(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const = 0;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Expr::BinOp3::op_T x);
namespace lang::calc::Node::Expr::BinOp3::op {
enum struct _W {
Pow,
};
}
namespace lang::calc::Node::Expr::BinOp3::op {
struct _T: lang::calc::Node::_T {
void write(ostream& os, FmtFlags flags);
lang::calc::Node::Expr::BinOp3::op::_W w_;
virtual ~_T();
_T(lang::calc::Node::Expr::BinOp3::op::_W w);
bool is_Pow();
lang::calc::Node::Expr::BinOp3::op::Pow_T as_Pow();
void hash_ser_acc_lang_calc_Node_Expr_BinOp3_op(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const = 0;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Expr::UnaryPre::op::Neg_T x);
namespace lang::calc::Node::Expr::UnaryPre::op::Neg {
__attribute__((always_inline)) lang::calc::Node::Expr::UnaryPre::op::Neg_T make(Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k);
}
namespace lang::calc::Node::Expr::UnaryPre::op::Neg {
__attribute__((always_inline)) lang::calc::Node::Expr::UnaryPre::op::Neg_T make_ext(ArenaPtr arena, Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k);
}
namespace lang::calc::Node::Expr::UnaryPre::op::Neg {
struct _T: lang::calc::Node::Expr::UnaryPre::op::_T {
void write(ostream& os, FmtFlags flags);
_T();
lang::calc::Node::Expr::UnaryPre::op::Neg_T with_id(Int id);
lang::calc::Node::Expr::UnaryPre::op::Neg_T with_bounds(lang_rt::TokenBounds bounds);
lang::calc::Node::Expr::UnaryPre::op::Neg_T with_is_top(bool is_top);
lang::calc::Node::Expr::UnaryPre::op::Neg_T with_sym(lang_rt::ParserSymId sym);
lang::calc::Node::Expr::UnaryPre::op::Neg_T with_attr(lang_rt::ParserAttrMask attr);
lang::calc::Node::Expr::UnaryPre::op::Neg_T with_first_k(lang_rt::ParserLookahead first_k);
void hash_ser_acc_lang_calc_Node_Expr_UnaryPre_op_Neg(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Expr::BinOp1::op::Add_T x);
namespace lang::calc::Node::Expr::BinOp1::op::Add {
__attribute__((always_inline)) lang::calc::Node::Expr::BinOp1::op::Add_T make(Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k);
}
namespace lang::calc::Node::Expr::BinOp1::op::Add {
__attribute__((always_inline)) lang::calc::Node::Expr::BinOp1::op::Add_T make_ext(ArenaPtr arena, Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k);
}
namespace lang::calc::Node::Expr::BinOp1::op::Add {
struct _T: lang::calc::Node::Expr::BinOp1::op::_T {
void write(ostream& os, FmtFlags flags);
_T();
lang::calc::Node::Expr::BinOp1::op::Add_T with_id(Int id);
lang::calc::Node::Expr::BinOp1::op::Add_T with_bounds(lang_rt::TokenBounds bounds);
lang::calc::Node::Expr::BinOp1::op::Add_T with_is_top(bool is_top);
lang::calc::Node::Expr::BinOp1::op::Add_T with_sym(lang_rt::ParserSymId sym);
lang::calc::Node::Expr::BinOp1::op::Add_T with_attr(lang_rt::ParserAttrMask attr);
lang::calc::Node::Expr::BinOp1::op::Add_T with_first_k(lang_rt::ParserLookahead first_k);
void hash_ser_acc_lang_calc_Node_Expr_BinOp1_op_Add(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Expr::BinOp1::op::Sub_T x);
namespace lang::calc::Node::Expr::BinOp1::op::Sub {
__attribute__((always_inline)) lang::calc::Node::Expr::BinOp1::op::Sub_T make(Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k);
}
namespace lang::calc::Node::Expr::BinOp1::op::Sub {
__attribute__((always_inline)) lang::calc::Node::Expr::BinOp1::op::Sub_T make_ext(ArenaPtr arena, Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k);
}
namespace lang::calc::Node::Expr::BinOp1::op::Sub {
struct _T: lang::calc::Node::Expr::BinOp1::op::_T {
void write(ostream& os, FmtFlags flags);
_T();
lang::calc::Node::Expr::BinOp1::op::Sub_T with_id(Int id);
lang::calc::Node::Expr::BinOp1::op::Sub_T with_bounds(lang_rt::TokenBounds bounds);
lang::calc::Node::Expr::BinOp1::op::Sub_T with_is_top(bool is_top);
lang::calc::Node::Expr::BinOp1::op::Sub_T with_sym(lang_rt::ParserSymId sym);
lang::calc::Node::Expr::BinOp1::op::Sub_T with_attr(lang_rt::ParserAttrMask attr);
lang::calc::Node::Expr::BinOp1::op::Sub_T with_first_k(lang_rt::ParserLookahead first_k);
void hash_ser_acc_lang_calc_Node_Expr_BinOp1_op_Sub(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Expr::BinOp2::op::Mul_T x);
namespace lang::calc::Node::Expr::BinOp2::op::Mul {
__attribute__((always_inline)) lang::calc::Node::Expr::BinOp2::op::Mul_T make(Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k);
}
namespace lang::calc::Node::Expr::BinOp2::op::Mul {
__attribute__((always_inline)) lang::calc::Node::Expr::BinOp2::op::Mul_T make_ext(ArenaPtr arena, Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k);
}
namespace lang::calc::Node::Expr::BinOp2::op::Mul {
struct _T: lang::calc::Node::Expr::BinOp2::op::_T {
void write(ostream& os, FmtFlags flags);
_T();
lang::calc::Node::Expr::BinOp2::op::Mul_T with_id(Int id);
lang::calc::Node::Expr::BinOp2::op::Mul_T with_bounds(lang_rt::TokenBounds bounds);
lang::calc::Node::Expr::BinOp2::op::Mul_T with_is_top(bool is_top);
lang::calc::Node::Expr::BinOp2::op::Mul_T with_sym(lang_rt::ParserSymId sym);
lang::calc::Node::Expr::BinOp2::op::Mul_T with_attr(lang_rt::ParserAttrMask attr);
lang::calc::Node::Expr::BinOp2::op::Mul_T with_first_k(lang_rt::ParserLookahead first_k);
void hash_ser_acc_lang_calc_Node_Expr_BinOp2_op_Mul(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Expr::BinOp2::op::Div_T x);
namespace lang::calc::Node::Expr::BinOp2::op::Div {
__attribute__((always_inline)) lang::calc::Node::Expr::BinOp2::op::Div_T make(Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k);
}
namespace lang::calc::Node::Expr::BinOp2::op::Div {
__attribute__((always_inline)) lang::calc::Node::Expr::BinOp2::op::Div_T make_ext(ArenaPtr arena, Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k);
}
namespace lang::calc::Node::Expr::BinOp2::op::Div {
struct _T: lang::calc::Node::Expr::BinOp2::op::_T {
void write(ostream& os, FmtFlags flags);
_T();
lang::calc::Node::Expr::BinOp2::op::Div_T with_id(Int id);
lang::calc::Node::Expr::BinOp2::op::Div_T with_bounds(lang_rt::TokenBounds bounds);
lang::calc::Node::Expr::BinOp2::op::Div_T with_is_top(bool is_top);
lang::calc::Node::Expr::BinOp2::op::Div_T with_sym(lang_rt::ParserSymId sym);
lang::calc::Node::Expr::BinOp2::op::Div_T with_attr(lang_rt::ParserAttrMask attr);
lang::calc::Node::Expr::BinOp2::op::Div_T with_first_k(lang_rt::ParserLookahead first_k);
void hash_ser_acc_lang_calc_Node_Expr_BinOp2_op_Div(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const;
};
}
void pr_debug(ostream& os, FmtFlags flags, lang::calc::Node::Expr::BinOp3::op::Pow_T x);
namespace lang::calc::Node::Expr::BinOp3::op::Pow {
__attribute__((always_inline)) lang::calc::Node::Expr::BinOp3::op::Pow_T make(Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k);
}
namespace lang::calc::Node::Expr::BinOp3::op::Pow {
__attribute__((always_inline)) lang::calc::Node::Expr::BinOp3::op::Pow_T make_ext(ArenaPtr arena, Int id, lang_rt::TokenBounds bounds, bool is_top, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr, lang_rt::ParserLookahead first_k);
}
namespace lang::calc::Node::Expr::BinOp3::op::Pow {
struct _T: lang::calc::Node::Expr::BinOp3::op::_T {
void write(ostream& os, FmtFlags flags);
_T();
lang::calc::Node::Expr::BinOp3::op::Pow_T with_id(Int id);
lang::calc::Node::Expr::BinOp3::op::Pow_T with_bounds(lang_rt::TokenBounds bounds);
lang::calc::Node::Expr::BinOp3::op::Pow_T with_is_top(bool is_top);
lang::calc::Node::Expr::BinOp3::op::Pow_T with_sym(lang_rt::ParserSymId sym);
lang::calc::Node::Expr::BinOp3::op::Pow_T with_attr(lang_rt::ParserAttrMask attr);
lang::calc::Node::Expr::BinOp3::op::Pow_T with_first_k(lang_rt::ParserLookahead first_k);
void hash_ser_acc_lang_calc_Node_Expr_BinOp3_op_Pow(SerBuf& buf) const;
virtual void hash_ser_acc(SerBuf& buf) const;
};
}
void visit_lang_calc_Node(lang::calc::Node::Expr::UnaryPre::op::Neg_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Expr::UnaryPre::op_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Expr::BinOp1::op::Add_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Expr::BinOp1::op::Sub_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Expr::BinOp1::op_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Expr::BinOp2::op::Mul_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Expr::BinOp2::op::Div_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Expr::BinOp2::op_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Expr::BinOp3::op::Pow_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Expr::BinOp3::op_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Expr::Id_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Expr::UnaryPre_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Expr::BinOp1_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Expr::BinOp2_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Expr::BinOp3_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Expr::Paren_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Expr::Lit::Int__T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Expr::Lit_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Expr_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Stmt::Assign_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Stmt::Expr_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node::Stmt_T x, function<void(lang::calc::Node_T)> f);
void visit_lang_calc_Node(lang::calc::Node_T x, function<void(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Expr::UnaryPre::op::Neg_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Expr::UnaryPre::op_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Expr::BinOp1::op::Add_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Expr::BinOp1::op::Sub_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Expr::BinOp1::op_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Expr::BinOp2::op::Mul_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Expr::BinOp2::op::Div_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Expr::BinOp2::op_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Expr::BinOp3::op::Pow_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Expr::BinOp3::op_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Expr::Id_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Expr::UnaryPre_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Expr::BinOp1_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Expr::BinOp2_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Expr::BinOp3_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Expr::Paren_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Expr::Lit::Int__T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Expr::Lit_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Expr_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Stmt::Assign_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Stmt::Expr_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node::Stmt_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xformT_lang_calc_Node(lang::calc::Node_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node_T xform_lang_calc_Node(lang::calc::Node_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Expr::UnaryPre::op_T xform_lang_calc_Node(lang::calc::Node::Expr::UnaryPre::op_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Expr::UnaryPre::op::Neg_T xform_lang_calc_Node(lang::calc::Node::Expr::UnaryPre::op::Neg_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Expr::BinOp1::op_T xform_lang_calc_Node(lang::calc::Node::Expr::BinOp1::op_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Expr::BinOp1::op::Add_T xform_lang_calc_Node(lang::calc::Node::Expr::BinOp1::op::Add_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Expr::BinOp1::op::Sub_T xform_lang_calc_Node(lang::calc::Node::Expr::BinOp1::op::Sub_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Expr::BinOp2::op_T xform_lang_calc_Node(lang::calc::Node::Expr::BinOp2::op_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Expr::BinOp2::op::Mul_T xform_lang_calc_Node(lang::calc::Node::Expr::BinOp2::op::Mul_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Expr::BinOp2::op::Div_T xform_lang_calc_Node(lang::calc::Node::Expr::BinOp2::op::Div_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Expr::BinOp3::op_T xform_lang_calc_Node(lang::calc::Node::Expr::BinOp3::op_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Expr::BinOp3::op::Pow_T xform_lang_calc_Node(lang::calc::Node::Expr::BinOp3::op::Pow_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Stmt_T xform_lang_calc_Node(lang::calc::Node::Stmt_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Stmt::Assign_T xform_lang_calc_Node(lang::calc::Node::Stmt::Assign_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Expr_T xform_lang_calc_Node(lang::calc::Node::Expr_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Expr::Id_T xform_lang_calc_Node(lang::calc::Node::Expr::Id_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Expr::UnaryPre_T xform_lang_calc_Node(lang::calc::Node::Expr::UnaryPre_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Expr::BinOp1_T xform_lang_calc_Node(lang::calc::Node::Expr::BinOp1_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Expr::BinOp2_T xform_lang_calc_Node(lang::calc::Node::Expr::BinOp2_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Expr::BinOp3_T xform_lang_calc_Node(lang::calc::Node::Expr::BinOp3_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Expr::Paren_T xform_lang_calc_Node(lang::calc::Node::Expr::Paren_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Expr::Lit_T xform_lang_calc_Node(lang::calc::Node::Expr::Lit_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Expr::Lit::Int__T xform_lang_calc_Node(lang::calc::Node::Expr::Lit::Int__T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
lang::calc::Node::Stmt::Expr_T xform_lang_calc_Node(lang::calc::Node::Stmt::Expr_T x, function<lang::calc::Node_T(lang::calc::Node_T)> f);
namespace lang::calc::parser {
__attribute__((always_inline)) IntPair action_by_vertex(lang_rt::ParserVertexId v, lang_rt::ParserLookahead la);
}
namespace lang::calc::parser {
__attribute__((always_inline)) lang_rt::ParserVertexId vertex_dfa_step(lang_rt::ParserVertexId v, lang_rt::ParserSymId sym, lang_rt::ParserAttrMask attr);
}
namespace lang::calc::parser {
lang_rt::ParserProcXforms proc_xform_by_prod_id();
}
namespace lang::calc::parser {
lang_rt::ParserSymByName start_marker_by_name();
}
namespace lang::calc::parser {
lang_rt::ParserSymId term_tok_to_sym(lang_rt::TokenId tok);
}
namespace lang::calc::parser {
lang_rt::ParserSymId sym_to_recur_step(lang_rt::ParserSymId sym);
}
namespace lang::calc::parser {
string sym_to_debug_string(lang_rt::ParserSymId sym);
}
namespace lang::calc::parser {
Int sym_to_num_attrs(lang_rt::ParserSymId sym);
}
namespace lang::calc::parser {
string attr_to_debug_string(lang_rt::ParserSymId sym, Int attr_ind);
}
namespace lang::calc {
using LangDesc = lang_rt::LangDesc<Node::_T, parser::action_by_vertex, parser::vertex_dfa_step>;
}
namespace lang::calc {
using LangDesc_T = lang_rt::LangDesc_T<Node::_T, parser::action_by_vertex, parser::vertex_dfa_step>;
}
namespace lang::calc {
using QuoteEnv = lang_rt::QuoteEnv<Node::_T, parser::action_by_vertex, parser::vertex_dfa_step>;
}
namespace lang::calc {
using QuoteEnv_T = lang_rt::QuoteEnv_T<Node::_T, parser::action_by_vertex, parser::vertex_dfa_step>;
}
namespace lang::calc {
lang::calc::LangDesc_T init();
}
namespace lang::calc::lexer::body {
inline __attribute__((always_inline)) Int proc_mode_loop_opt(ptr<lang_rt::LexerModeDesc> mode, ptr<lang_rt::LexerState> st, ptr<lang_rt::SymItemVec> emit_dst, Int mode_start_pos, Int mode_buf_pos);
}
namespace lang::calc::lexer::comment_single {
inline __attribute__((always_inline)) Int proc_mode_loop_opt(ptr<lang_rt::LexerModeDesc> mode, ptr<lang_rt::LexerState> st, ptr<lang_rt::SymItemVec> emit_dst, Int mode_start_pos, Int mode_buf_pos);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment