Leonardus
Loading...
Searching...
No Matches
Macros | Enumerations
dry.h File Reference

Don't Repeat Yourself. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EC_SUCCESS_STR   "0"
 EC_SUCCESS string literal waiting for C++26.
 
#define EC_OPERATOR_STR   "1"
 EC_OPERATOR string literal waiting for C++26.
 
#define EC_INTERPRETER_STR   "2"
 EC_INTERPRETER string literal waiting for C++26.
 
#define EC_CMDLINE_STR   "3"
 EC_CMDLINE string literal waiting for C++26.
 
#define EC_PANIC_STR   "4"
 EC_PANIC string literal waiting for C++26.
 
#define P1X   "parser"
 Pass 1 executable name.
 
#define P2X   "leon"
 Pass 2 executable name.
 
#define INT128_MAXMAG_STR   "170141183460469231731687303715884105728"
 -MIN_INT as string.
 
#define INT128_MIN_STR   "-170141183460469231731687303715884105728"
 MIN_INT as string.
 
#define INT128_MINSUB1_STR   "-170141183460469231731687303715884105729"
 MIN_INT-1 as string.
 
#define INT128_MAX_STR   "170141183460469231731687303715884105727"
 MAX_INT as string.
 

Enumerations

enum  ExitCode : int {
  EC_SUCCESS = 0 , EC_ERROR = 1 , EC_OPERATOR = 1 , EC_INTERPRETER = 2 ,
  EC_CMDLINE = 3 , EC_PANIC = 4 , EC_TESTFAIL = 5 , EC_UNUSED = 42
}
 Program exit codes. More...
 

Detailed Description

Don't Repeat Yourself.

Definitions of values shared between C compiler, C++ compiler and Bash scripts.
dry.h is for C and C++.

Synchronisation has to be done manually.

Enumeration Type Documentation

◆ ExitCode

enum ExitCode : int

Program exit codes.

Used by artifacts and unit tests.
Some codes are shared between pass 1 (parser), pass 2 (interpreter) and shell scripts.

See also
Bash include file Tools/dry.inc and README.md
Enumerator
EC_SUCCESS 

Success.

EC_ERROR 

General error for directory "Tools/" scripts.

EC_OPERATOR 

pass 2: operator error.

EC_INTERPRETER 

pass 2: parser, semantics or internal error;
pass 1: parsing error;
scripts: environment and setup issues.

EC_CMDLINE 

command line issues

EC_PANIC 

pass 2: panic exit due to memory restrictions.

EC_TESTFAIL 

Errors from test harnisch or found by test harnish.

EC_UNUSED 

This code represents an unused value in the unit test.