plcopen 0.22.0
载入中...
搜索中...
未找到
plcopen::core::st::l2b_detail 命名空间参考

类

struct  Var
struct  Pou
struct  TypeUnit
struct  Project
struct  Actual
struct  Expansion
struct  TypeLayout

类型定义

using TypeLayouts = std::map<std::string, TypeLayout>

枚举

enum class  PouKind : std::uint8_t { function_ , function_block , program }
enum class  VarKind : std::uint8_t {
  input , output , inout , local ,
  temp , external , global
}

函数

char lower_char (char c)
std::string lower_copy (std::string_view text)
std::string canonical_type_spelling (std::string_view text)
bool ident_char (char c)
std::string trim (std::string_view text)
bool word_at (std::string_view source, std::size_t at, std::string_view word)
std::size_t find_word (std::string_view source, std::string_view word, std::size_t from=0)
std::size_t skip_space (std::string_view text, std::size_t at)
std::string read_ident (std::string_view text, std::size_t &at)
std::vector< std::string > split_top (std::string_view text, char delimiter)
std::size_t find_top_operator (std::string_view text, std::string_view op)
void parse_declarations (std::string_view block, VarKind kind, std::vector< Var > &out)
VarKind declaration_kind (std::string_view keyword)
void parse_unit_body (std::string_view content, Pou &pou)
bool parse_project (std::string_view source, Project &project, std::vector< Diagnostic > &diagnostics)
void normalize_project_order (Project &project, const CompileOptions &options)
bool contains_word (std::string_view source, std::string_view word)
void add_diag (std::vector< Diagnostic > &diagnostics, DiagCode code)
const Var * find_var (const std::vector< Var > &vars, std::string_view name)
const Pou * find_pou (const Project &project, std::string_view name, PouKind kind)
std::vector< std::string > called_functions (const Project &project, const Pou &pou)
int call_depth (const Project &project, const Pou &pou, std::set< std::string > &visiting, bool &cycle)
int instance_type_depth (const Project &project, const Pou &pou, std::set< std::string > &visiting, bool &cycle)
std::vector< Actual > parse_actuals (std::string_view text)
bool lvalue (std::string_view text)
std::string default_value (std::string_view type)
bool builtin_value_type (std::string_view type)
bool add_layout_type (const Project &project, const std::string &type, std::map< std::string, std::string > &types)
bool build_type_layouts (const Project &project, const CompileOptions &options, TypeLayouts &layouts, std::vector< Diagnostic > &diagnostics)
bool append_layout (std::uint64_t &offset, TypeLayout layout)
bool finish_layout (std::uint64_t &bytes)
const TypeLayout * find_layout (const TypeLayouts &layouts, std::string_view type)
bool exact_declared_type (const TypeLayouts &layouts, std::string_view left, std::string_view right)
bool pou_frame_bytes (const Project &project, const Pou &pou, const TypeLayouts &layouts, std::uint32_t &bytes, std::set< std::string > &visiting)
bool pou_frame_bytes (const Project &project, const Pou &pou, const TypeLayouts &layouts, std::uint32_t &bytes)
bool instance_own_bytes (const Project &project, const Pou &pou, const TypeLayouts &layouts, std::uint32_t &bytes)
std::string declaration_text (const Var &var)
bool compile_pou_report_image (const Project &project, const Pou &pou, const CompileOptions &options, std::vector< Diagnostic > &diagnostics, Program &report)
bool project_semantics (const Project &project, const CompileOptions &options, const TypeLayouts &layouts, std::vector< Diagnostic > &diagnostics, std::uint16_t &max_calls, std::uint16_t &max_instances)
CompileResult compile_project (std::string_view source, const CompileOptions &options)

类型定义说明

◆ TypeLayouts

在文件 l2b.h 第 1545 行定义.

枚举类型说明

◆ PouKind

enum class plcopen::core::st::l2b_detail::PouKind : std::uint8_t
strong
枚举值
function_ 
function_block 
program 

在文件 l2b.h 第 24 行定义.

◆ VarKind

enum class plcopen::core::st::l2b_detail::VarKind : std::uint8_t
strong
枚举值
input 
output 
inout 
local 
temp 
external 
global 

在文件 l2b.h 第 25 行定义.

函数说明

◆ add_diag()

void plcopen::core::st::l2b_detail::add_diag ( std::vector< Diagnostic > & diagnostics,
DiagCode code )
inline

在文件 l2b.h 第 525 行定义.

◆ add_layout_type()

bool plcopen::core::st::l2b_detail::add_layout_type ( const Project & project,
const std::string & type,
std::map< std::string, std::string > & types )
inline

在文件 l2b.h 第 1547 行定义.

◆ append_layout()

bool plcopen::core::st::l2b_detail::append_layout ( std::uint64_t & offset,
TypeLayout layout )
inline

在文件 l2b.h 第 1633 行定义.

◆ build_type_layouts()

bool plcopen::core::st::l2b_detail::build_type_layouts ( const Project & project,
const CompileOptions & options,
TypeLayouts & layouts,
std::vector< Diagnostic > & diagnostics )
inline

在文件 l2b.h 第 1557 行定义.

◆ builtin_value_type()

bool plcopen::core::st::l2b_detail::builtin_value_type ( std::string_view type)
inline

在文件 l2b.h 第 676 行定义.

◆ call_depth()

int plcopen::core::st::l2b_detail::call_depth ( const Project & project,
const Pou & pou,
std::set< std::string > & visiting,
bool & cycle )
inline

在文件 l2b.h 第 573 行定义.

◆ called_functions()

std::vector< std::string > plcopen::core::st::l2b_detail::called_functions ( const Project & project,
const Pou & pou )
inline

在文件 l2b.h 第 550 行定义.

◆ canonical_type_spelling()

std::string plcopen::core::st::l2b_detail::canonical_type_spelling ( std::string_view text)
inline

在文件 l2b.h 第 82 行定义.

◆ compile_pou_report_image()

bool plcopen::core::st::l2b_detail::compile_pou_report_image ( const Project & project,
const Pou & pou,
const CompileOptions & options,
std::vector< Diagnostic > & diagnostics,
Program & report )
inline

在文件 l2b.h 第 1759 行定义.

◆ compile_project()

CompileResult plcopen::core::st::l2b_detail::compile_project ( std::string_view source,
const CompileOptions & options )
inline

在文件 l2b.h 第 1959 行定义.

◆ contains_word()

bool plcopen::core::st::l2b_detail::contains_word ( std::string_view source,
std::string_view word )
inline

在文件 l2b.h 第 520 行定义.

◆ declaration_kind()

VarKind plcopen::core::st::l2b_detail::declaration_kind ( std::string_view keyword)
inline

在文件 l2b.h 第 278 行定义.

◆ declaration_text()

std::string plcopen::core::st::l2b_detail::declaration_text ( const Var & var)
inline

在文件 l2b.h 第 1749 行定义.

◆ default_value()

std::string plcopen::core::st::l2b_detail::default_value ( std::string_view type)
inline

在文件 l2b.h 第 667 行定义.

◆ exact_declared_type()

bool plcopen::core::st::l2b_detail::exact_declared_type ( const TypeLayouts & layouts,
std::string_view left,
std::string_view right )
inline

在文件 l2b.h 第 1664 行定义.

◆ find_layout()

const TypeLayout * plcopen::core::st::l2b_detail::find_layout ( const TypeLayouts & layouts,
std::string_view type )
inline

在文件 l2b.h 第 1657 行定义.

◆ find_pou()

const Pou * plcopen::core::st::l2b_detail::find_pou ( const Project & project,
std::string_view name,
PouKind kind )
inline

在文件 l2b.h 第 541 行定义.

◆ find_top_operator()

std::size_t plcopen::core::st::l2b_detail::find_top_operator ( std::string_view text,
std::string_view op )
inline

在文件 l2b.h 第 205 行定义.

◆ find_var()

const Var * plcopen::core::st::l2b_detail::find_var ( const std::vector< Var > & vars,
std::string_view name )
inline

在文件 l2b.h 第 533 行定义.

◆ find_word()

std::size_t plcopen::core::st::l2b_detail::find_word ( std::string_view source,
std::string_view word,
std::size_t from = 0 )
inline

在文件 l2b.h 第 134 行定义.

◆ finish_layout()

bool plcopen::core::st::l2b_detail::finish_layout ( std::uint64_t & bytes)
inline

在文件 l2b.h 第 1648 行定义.

◆ ident_char()

bool plcopen::core::st::l2b_detail::ident_char ( char c)
inline

在文件 l2b.h 第 94 行定义.

◆ instance_own_bytes()

bool plcopen::core::st::l2b_detail::instance_own_bytes ( const Project & project,
const Pou & pou,
const TypeLayouts & layouts,
std::uint32_t & bytes )
inline

在文件 l2b.h 第 1729 行定义.

◆ instance_type_depth()

int plcopen::core::st::l2b_detail::instance_type_depth ( const Project & project,
const Pou & pou,
std::set< std::string > & visiting,
bool & cycle )
inline

在文件 l2b.h 第 592 行定义.

◆ lower_char()

char plcopen::core::st::l2b_detail::lower_char ( char c)
inline

在文件 l2b.h 第 67 行定义.

◆ lower_copy()

std::string plcopen::core::st::l2b_detail::lower_copy ( std::string_view text)
inline

在文件 l2b.h 第 72 行定义.

◆ lvalue()

bool plcopen::core::st::l2b_detail::lvalue ( std::string_view text)
inline

在文件 l2b.h 第 648 行定义.

◆ normalize_project_order()

void plcopen::core::st::l2b_detail::normalize_project_order ( Project & project,
const CompileOptions & options )
inline

在文件 l2b.h 第 424 行定义.

◆ parse_actuals()

std::vector< Actual > plcopen::core::st::l2b_detail::parse_actuals ( std::string_view text)
inline

在文件 l2b.h 第 621 行定义.

◆ parse_declarations()

void plcopen::core::st::l2b_detail::parse_declarations ( std::string_view block,
VarKind kind,
std::vector< Var > & out )
inline

在文件 l2b.h 第 238 行定义.

◆ parse_project()

bool plcopen::core::st::l2b_detail::parse_project ( std::string_view source,
Project & project,
std::vector< Diagnostic > & diagnostics )
inline

在文件 l2b.h 第 313 行定义.

◆ parse_unit_body()

void plcopen::core::st::l2b_detail::parse_unit_body ( std::string_view content,
Pou & pou )
inline

在文件 l2b.h 第 289 行定义.

◆ pou_frame_bytes() [1/2]

bool plcopen::core::st::l2b_detail::pou_frame_bytes ( const Project & project,
const Pou & pou,
const TypeLayouts & layouts,
std::uint32_t & bytes )
inline

在文件 l2b.h 第 1721 行定义.

◆ pou_frame_bytes() [2/2]

bool plcopen::core::st::l2b_detail::pou_frame_bytes ( const Project & project,
const Pou & pou,
const TypeLayouts & layouts,
std::uint32_t & bytes,
std::set< std::string > & visiting )
inline

在文件 l2b.h 第 1687 行定义.

◆ project_semantics()

bool plcopen::core::st::l2b_detail::project_semantics ( const Project & project,
const CompileOptions & options,
const TypeLayouts & layouts,
std::vector< Diagnostic > & diagnostics,
std::uint16_t & max_calls,
std::uint16_t & max_instances )
inline

在文件 l2b.h 第 1838 行定义.

◆ read_ident()

std::string plcopen::core::st::l2b_detail::read_ident ( std::string_view text,
std::size_t & at )
inline

在文件 l2b.h 第 155 行定义.

◆ skip_space()

std::size_t plcopen::core::st::l2b_detail::skip_space ( std::string_view text,
std::size_t at )
inline

在文件 l2b.h 第 145 行定义.

◆ split_top()

std::vector< std::string > plcopen::core::st::l2b_detail::split_top ( std::string_view text,
char delimiter )
inline

在文件 l2b.h 第 165 行定义.

◆ trim()

std::string plcopen::core::st::l2b_detail::trim ( std::string_view text)
inline

在文件 l2b.h 第 100 行定义.

◆ word_at()

bool plcopen::core::st::l2b_detail::word_at ( std::string_view source,
std::size_t at,
std::string_view word )
inline

在文件 l2b.h 第 117 行定义.