STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
fsw::script::ScriptProgram Struct Reference

A parsed script, as a flat arena. More...

#include <StateScript.hpp>

Collaboration diagram for fsw::script::ScriptProgram:
[legend]

Public Member Functions

bool empty () const

Public Attributes

std::vector< Stmt > stmts
std::vector< Expr > exprs
std::vector< int32_t > block_items
 Statement indices, grouped into contiguous [begin, end) block ranges.
int32_t top_begin = 0
int32_t top_end = 0
std::vector< SlugRef > slugs
 Every slug reference in SOURCE ORDER, with spans.
std::vector< std::string > variables
uint32_t max_depth = 0

Detailed Description

A parsed script, as a flat arena.

Children are int32_t indices, never pointers, and -1 means none. This is deliberate: the whole program copies by value into ScriptRunner::start() with no ownership question — matching HoldSpec's "a number that is passed in cannot go stale" discipline — and every size cap becomes a vector size check rather than a tree walk.

Definition at line 158 of file StateScript.hpp.

Member Function Documentation

◆ empty()

bool fsw::script::ScriptProgram::empty ( ) const
inline

Definition at line 171 of file StateScript.hpp.

References top_begin, and top_end.

Referenced by sequencer::load_dynamic_states().

Member Data Documentation

◆ block_items

std::vector<int32_t> fsw::script::ScriptProgram::block_items

Statement indices, grouped into contiguous [begin, end) block ranges.

Definition at line 162 of file StateScript.hpp.

◆ exprs

std::vector<Expr> fsw::script::ScriptProgram::exprs

Definition at line 160 of file StateScript.hpp.

◆ max_depth

uint32_t fsw::script::ScriptProgram::max_depth = 0

Definition at line 169 of file StateScript.hpp.

◆ slugs

std::vector<SlugRef> fsw::script::ScriptProgram::slugs

Every slug reference in SOURCE ORDER, with spans.

The rename path rewrites these; the pressure subscriber derives its subscribe list from the Ns::PtSensor ones.

Definition at line 167 of file StateScript.hpp.

Referenced by sequencer::load_dynamic_states(), and fsw::script::validate().

◆ stmts

std::vector<Stmt> fsw::script::ScriptProgram::stmts

Definition at line 159 of file StateScript.hpp.

Referenced by fsw::script::validate().

◆ top_begin

int32_t fsw::script::ScriptProgram::top_begin = 0

◆ top_end

int32_t fsw::script::ScriptProgram::top_end = 0

◆ variables

std::vector<std::string> fsw::script::ScriptProgram::variables

Definition at line 168 of file StateScript.hpp.

Referenced by fsw::script::validate().


The documentation for this struct was generated from the following file: