NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
flowctrl.cpp File Reference
#include "flowctrl.hpp"
#include "../ui/error.hpp"
#include "../../kernel.hpp"
#include "../maths/parser_functions.hpp"
#include "../built-in.hpp"
#include "../utils/tools.hpp"
Include dependency graph for flowctrl.cpp:

Go to the source code of this file.

Macros

#define FLOWCTRL_ERROR   -1
 
#define FLOWCTRL_RETURN   -2
 
#define FLOWCTRL_BREAK   -3
 
#define FLOWCTRL_CONTINUE   -4
 
#define FLOWCTRL_NO_CMD   -5
 
#define FLOWCTRL_OK   1
 
#define NO_FLOW_COMMAND   -1
 
#define BLOCK_END   0
 
#define BLOCK_MIDDLE   1
 
#define PROCEDURE_INTERFACE   2
 
#define JUMP_TABLE_ELEMENTS   3
 

Enumerations

enum  RangeForVarType {
  DECLARE_NEW_VAR = -1 , DETECT_VAR_TYPE , NUMVAR , STRINGVAR ,
  CLUSTERVAR
}
 Simple enum to make the variable types of the range based for loop more readable. More...
 

Functions

static std::string extractHeaderExpression (const std::string &sExpr)
 A simple helper function to extract the header expression of control flow statements. More...
 

Variables

value_type vAns
 

Macro Definition Documentation

◆ BLOCK_END

#define BLOCK_END   0

Definition at line 38 of file flowctrl.cpp.

◆ BLOCK_MIDDLE

#define BLOCK_MIDDLE   1

Definition at line 39 of file flowctrl.cpp.

◆ FLOWCTRL_BREAK

#define FLOWCTRL_BREAK   -3

Definition at line 31 of file flowctrl.cpp.

◆ FLOWCTRL_CONTINUE

#define FLOWCTRL_CONTINUE   -4

Definition at line 32 of file flowctrl.cpp.

◆ FLOWCTRL_ERROR

#define FLOWCTRL_ERROR   -1

Definition at line 29 of file flowctrl.cpp.

◆ FLOWCTRL_NO_CMD

#define FLOWCTRL_NO_CMD   -5

Definition at line 33 of file flowctrl.cpp.

◆ FLOWCTRL_OK

#define FLOWCTRL_OK   1

Definition at line 34 of file flowctrl.cpp.

◆ FLOWCTRL_RETURN

#define FLOWCTRL_RETURN   -2

Definition at line 30 of file flowctrl.cpp.

◆ JUMP_TABLE_ELEMENTS

#define JUMP_TABLE_ELEMENTS   3

Definition at line 41 of file flowctrl.cpp.

◆ NO_FLOW_COMMAND

#define NO_FLOW_COMMAND   -1

Definition at line 37 of file flowctrl.cpp.

◆ PROCEDURE_INTERFACE

#define PROCEDURE_INTERFACE   2

Definition at line 40 of file flowctrl.cpp.

Enumeration Type Documentation

◆ RangeForVarType

Simple enum to make the variable types of the range based for loop more readable.

Enumerator
DECLARE_NEW_VAR 
DETECT_VAR_TYPE 
NUMVAR 
STRINGVAR 
CLUSTERVAR 

Definition at line 355 of file flowctrl.cpp.

Function Documentation

◆ extractHeaderExpression()

static std::string extractHeaderExpression ( const std::string &  sExpr)
static

A simple helper function to extract the header expression of control flow statements.

Parameters
sExprconst std::string&
Returns
std::string

Definition at line 56 of file flowctrl.cpp.

Referenced by FlowCtrl::if_fork(), FlowCtrl::switch_fork(), and FlowCtrl::while_loop().

Variable Documentation

◆ vAns

value_type vAns
extern

Definition at line 24 of file parser_functions.cpp.

Referenced by FlowCtrl::calc(), and FlowCtrl::compile().