OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4AulParse.cpp File Reference
#include "C4Include.h"
#include "script/C4AulParse.h"
#include "object/C4Def.h"
#include "script/C4AulDebug.h"
#include "script/C4AulExec.h"
#include <iomanip>
#include "C4AulWarnings.h"
Include dependency graph for C4AulParse.cpp:

Go to the source code of this file.

Macros

#define DEBUG_BYTECODE_DUMP   0
 
#define C4AUL_Include   "#include"
 
#define C4AUL_Append   "#appendto"
 
#define C4AUL_Warning   "#warning"
 
#define C4Aul_Warning_enable   "enable"
 
#define C4Aul_Warning_disable   "disable"
 
#define C4AUL_Func   "func"
 
#define C4AUL_Private   "private"
 
#define C4AUL_Protected   "protected"
 
#define C4AUL_Public   "public"
 
#define C4AUL_Global   "global"
 
#define C4AUL_Const   "const"
 
#define C4AUL_If   "if"
 
#define C4AUL_Else   "else"
 
#define C4AUL_Do   "do"
 
#define C4AUL_While   "while"
 
#define C4AUL_For   "for"
 
#define C4AUL_In   "in"
 
#define C4AUL_Return   "return"
 
#define C4AUL_Var   "Var"
 
#define C4AUL_Par   "Par"
 
#define C4AUL_Break   "break"
 
#define C4AUL_Continue   "continue"
 
#define C4AUL_this   "this"
 
#define C4AUL_GlobalNamed   "static"
 
#define C4AUL_LocalNamed   "local"
 
#define C4AUL_VarNamed   "var"
 
#define C4AUL_TypeInt   "int"
 
#define C4AUL_TypeBool   "bool"
 
#define C4AUL_TypeC4ID   "id"
 
#define C4AUL_TypeDef   "def"
 
#define C4AUL_TypeEffect   "effect"
 
#define C4AUL_TypeC4Object   "object"
 
#define C4AUL_TypePropList   "proplist"
 
#define C4AUL_TypeString   "string"
 
#define C4AUL_TypeArray   "array"
 
#define C4AUL_TypeFunction   "func"
 
#define C4AUL_True   "true"
 
#define C4AUL_False   "false"
 
#define C4AUL_Nil   "nil"
 
#define C4AUL_New   "new"
 
#define DIAG(id, text, enabled)   warnings.set(static_cast<size_t>(C4AulWarningId::id), enabled);
 
#define DIAG(id, text, enabled)   pOrgScript->EnableWarning(TokenSPos, C4AulWarningId::id, enable_warning);
 
#define DIAG(id, text, enabled)   std::make_pair(#id, C4AulWarningId::id),
 

Enumerations

enum  C4AulTokenType : int {
  ATT_INVALID, ATT_DIR, ATT_IDTF, ATT_INT,
  ATT_STRING, ATT_DOT, ATT_COMMA, ATT_COLON,
  ATT_SCOLON, ATT_BOPEN, ATT_BCLOSE, ATT_BOPEN2,
  ATT_BCLOSE2, ATT_BLOPEN, ATT_BLCLOSE, ATT_CALL,
  ATT_CALLFS, ATT_LDOTS, ATT_SET, ATT_OPERATOR,
  ATT_EOF
}
 

Variables

const C4ScriptOpDef C4ScriptOpMap []
 

Macro Definition Documentation

#define C4AUL_Append   "#appendto"

Definition at line 31 of file C4AulParse.cpp.

Referenced by C4AulParse::Parse_Script().

#define C4AUL_Break   "break"

Definition at line 54 of file C4AulParse.cpp.

Referenced by C4AulParse::Parse_Statement().

#define C4AUL_Const   "const"

Definition at line 43 of file C4AulParse.cpp.

Referenced by C4AulParse::Parse_Var().

#define C4AUL_Continue   "continue"

Definition at line 55 of file C4AulParse.cpp.

Referenced by C4AulParse::Parse_Statement().

#define C4AUL_Do   "do"

Definition at line 47 of file C4AulParse.cpp.

Referenced by C4AulParse::Parse_Expression(), and C4AulParse::Parse_Statement().

#define C4AUL_Else   "else"
#define C4AUL_False   "false"

Definition at line 74 of file C4AulParse.cpp.

Referenced by C4AulParse::Parse_Expression().

#define C4AUL_For   "for"

Definition at line 49 of file C4AulParse.cpp.

Referenced by C4AulParse::Parse_Expression(), and C4AulParse::Parse_Statement().

#define C4AUL_Func   "func"
#define C4AUL_Global   "global"
#define C4AUL_GlobalNamed   "static"
#define C4AUL_If   "if"

Definition at line 45 of file C4AulParse.cpp.

Referenced by C4AulParse::Parse_Expression(), and C4AulParse::Parse_Statement().

#define C4AUL_In   "in"

Definition at line 50 of file C4AulParse.cpp.

Referenced by C4AulParse::Parse_ForEach(), and C4AulParse::Parse_Statement().

#define C4AUL_Include   "#include"

Definition at line 30 of file C4AulParse.cpp.

Referenced by C4AulParse::Parse_Script().

#define C4AUL_LocalNamed   "local"
#define C4AUL_New   "new"

Definition at line 76 of file C4AulParse.cpp.

Referenced by C4AulParse::Parse_Expression(), and C4AulParse::Parse_PropList().

#define C4AUL_Nil   "nil"

Definition at line 75 of file C4AulParse.cpp.

Referenced by C4AulParse::Parse_Expression().

#define C4AUL_Par   "Par"

Definition at line 53 of file C4AulParse.cpp.

Referenced by C4AulParse::Parse_Expression().

#define C4AUL_Private   "private"
#define C4AUL_Protected   "protected"
#define C4AUL_Public   "public"
#define C4AUL_Return   "return"

Definition at line 51 of file C4AulParse.cpp.

Referenced by C4AulParse::Parse_Expression(), and C4AulParse::Parse_Statement().

#define C4AUL_this   "this"

Definition at line 56 of file C4AulParse.cpp.

Referenced by C4AulParse::Parse_Expression().

#define C4AUL_True   "true"

Definition at line 73 of file C4AulParse.cpp.

Referenced by C4AulParse::Parse_Expression().

#define C4AUL_TypeArray   "array"

Definition at line 70 of file C4AulParse.cpp.

#define C4AUL_TypeBool   "bool"

Definition at line 63 of file C4AulParse.cpp.

#define C4AUL_TypeC4ID   "id"

Definition at line 64 of file C4AulParse.cpp.

#define C4AUL_TypeC4Object   "object"

Definition at line 67 of file C4AulParse.cpp.

#define C4AUL_TypeDef   "def"

Definition at line 65 of file C4AulParse.cpp.

#define C4AUL_TypeEffect   "effect"

Definition at line 66 of file C4AulParse.cpp.

#define C4AUL_TypeFunction   "func"

Definition at line 71 of file C4AulParse.cpp.

#define C4AUL_TypeInt   "int"

Definition at line 62 of file C4AulParse.cpp.

#define C4AUL_TypePropList   "proplist"

Definition at line 68 of file C4AulParse.cpp.

#define C4AUL_TypeString   "string"

Definition at line 69 of file C4AulParse.cpp.

#define C4AUL_Var   "Var"

Definition at line 52 of file C4AulParse.cpp.

#define C4AUL_VarNamed   "var"
#define C4AUL_Warning   "#warning"

Definition at line 32 of file C4AulParse.cpp.

#define C4Aul_Warning_disable   "disable"

Definition at line 35 of file C4AulParse.cpp.

#define C4Aul_Warning_enable   "enable"

Definition at line 34 of file C4AulParse.cpp.

#define C4AUL_While   "while"
#define DEBUG_BYTECODE_DUMP   0

Definition at line 26 of file C4AulParse.cpp.

Referenced by C4AulScriptFunc::DumpByteCode().

#define DIAG (   id,
  text,
  enabled 
)    warnings.set(static_cast<size_t>(C4AulWarningId::id), enabled);
#define DIAG (   id,
  text,
  enabled 
)    pOrgScript->EnableWarning(TokenSPos, C4AulWarningId::id, enable_warning);
#define DIAG (   id,
  text,
  enabled 
)    std::make_pair(#id, C4AulWarningId::id),

Enumeration Type Documentation

enum C4AulTokenType : int
Enumerator
ATT_INVALID 
ATT_DIR 
ATT_IDTF 
ATT_INT 
ATT_STRING 
ATT_DOT 
ATT_COMMA 
ATT_COLON 
ATT_SCOLON 
ATT_BOPEN 
ATT_BCLOSE 
ATT_BOPEN2 
ATT_BCLOSE2 
ATT_BLOPEN 
ATT_BLCLOSE 
ATT_CALL 
ATT_CALLFS 
ATT_LDOTS 
ATT_SET 
ATT_OPERATOR 
ATT_EOF 

Definition at line 79 of file C4AulParse.cpp.

79  : int
80 {
81  ATT_INVALID,// invalid token
82  ATT_DIR, // directive
83  ATT_IDTF, // identifier
84  ATT_INT, // integer constant
85  ATT_STRING, // string constant
86  ATT_DOT, // "."
87  ATT_COMMA, // ","
88  ATT_COLON, // ":"
89  ATT_SCOLON, // ";"
90  ATT_BOPEN, // "("
91  ATT_BCLOSE, // ")"
92  ATT_BOPEN2, // "["
93  ATT_BCLOSE2,// "]"
94  ATT_BLOPEN, // "{"
95  ATT_BLCLOSE,// "}"
96  ATT_CALL, // "->"
97  ATT_CALLFS, // "->~"
98  ATT_LDOTS, // '...'
99  ATT_SET, // '='
100  ATT_OPERATOR,// operator
101  ATT_EOF // end of file
102 };

Variable Documentation

const C4ScriptOpDef C4ScriptOpMap[]