irods
4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems. Fossies Dox: irods-4.2.8.tar.gz ("unofficial" and yet experimental doxygen-generated source code documentation) 
|
Go to the documentation of this file.
17 #define RE_ERROR(cond) if(cond) { goto error; }
38 file = fopen( rulesFileName,
"r" );
41 "readRuleSetFromFile() could not open rules file %s\n",
56 if (
NULL != errnode ) {
67 for ( i = 0; i < var->
len; i++ ) {
75 if ( varName !=
NULL ) {
84 char *expr = res->
text;
89 if ( varName !=
NULL ) {
117 if ( msParamArray !=
NULL ) {
118 if ( strncmp( rule,
"@external\n", 10 ) == 0 ) {
151 if ( recclearDelayed ) {
166 if ( msParamArray !=
NULL ) {
213 if ( rescode != 0 ) {
259 snprintf(
buf, 1024,
"computExpressionWithParams: %s\n", actionName );
271 for ( k = 0; k < paramsCount; k++ ) {
280 for ( i = 0; i < paramsCount; i++ ) {
301 paramNodes[i] =
node;
307 if ( msParamArray !=
NULL ) {
313 if ( recclearDelayed ) {
332 snprintf( buf3,
ERR_MSG_LEN,
"error: the type %s of the rule condition is not supported", buf2 );
344 for ( i = 1; i <= 3; i++ ) {
363 for ( i = 0; i < ruleset->
len; i++ ) {
374 char *errbuf = (
char * ) malloc(
ERR_MSG_LEN * 1024 *
sizeof(
char ) );
394 err =
"redefinition of constructor";
397 err =
"redefinition of deconstructor";
400 err =
"redefinition of system microservice";
403 err =
"redefinition of system symbol";
410 *errnode = rule->
node;
423 *errnode = rule->
node;
462 Node **errnode = &en;
465 if ( ( errorcode =
typeNode(
node, varTypes, errmsg, errnode, r ) ) != 0 ) {
469 if ( reco !=
NULL && ( errorcode =
typeNode( reco, varTypes, errmsg, errnode, r ) ) != 0 ) {
488 res =
cpRes( res, r );
504 snprintf(
buf, 1024,
"parseAndComputeExpression: %s\n", expr );
542 if ( recoNode ==
NULL ) {
573 for ( i = 0; i < inRuleSet->
len; i++ ) {
575 if ( ruleNode ==
NULL ) {
583 for ( k = 0; k < arity; k++ ) {
634 if ( inMsParamArray !=
NULL ) {
640 if ( retOutParams ) {
641 if ( inMsParamArray !=
NULL ) {
659 if ( recclearDelayed ) {
670 for ( i = 0; i < len + 1; i++ ) {
671 if ( expr[i] == 0 ) {
void rodsLog(int level, const char *formatStr,...)
int overflow(const char *expr, int len)
int typeNode(Node *node, Hashtable *varTypes, rError_t *errmsg, Node **errnode, Region *r)
const void * lookupFromEnv(Env *env, const char *key)
Satisfiability solveConstraints(List *typingConstraints, Hashtable *typingEnv, rError_t *errmsg, Node **errnode, Region *r)
Token * nextTokenRuleGen(Pointer *expr, ParserContext *pc, int rulegen, int ext)
int parseRuleSet(Pointer *e, RuleSet *ruleSet, Env *funcDesc, int *errloc, rError_t *errmsg, Region *r)
void * region_alloc(Region *r, size_t s)
Node * createFunctionNode(const char *fn, Node **params, int paramsLen, Label *exprloc, Region *r)
void postProcessCoercion(Node *expr, Hashtable *varTypes, rError_t *errmsg, Node **errnode, Region *r)
void popExtRuleSet(int checkPoint)
int parseAndComputeRule(char *rule, Env *env, ruleExecInfo_t *rei, int reiSaveFlag, rError_t *errmsg, Region *r)
int convertEnvToMsParamArray(msParamArray_t *var, Env *env, rError_t *errmsg, Region *r)
char * typeToString(ExprType *type, Hashtable *var_types, char *buf, int bufsize)
#define RULE_NODE_NUM_PARAMS(r)
Region * make_region(size_t is, jmp_buf *label)
ExprType * typeExpression3(Node *expr, int notyping, Env *funcDesc, Hashtable *varTypes, List *typingConstraints, rError_t *errmsg, Node **errnode, Region *r)
char * getRuleBasePath(const char *ruleBaseName, char rulesFileName[(1024+64)])
#define CORE_RULE_INDEX_OFF
Env * defaultEnv(Region *r)
int generateRuleTypes(RuleSet *inRuleSet, Hashtable *symbol_type_table, Region *r)
Node * parseActionsRuleGen(Pointer *expr, int rulegn, int backwardCompatible, ParserContext *pc)
#define APP_RULE_INDEX_OFF
ExprType * newTVar(Region *r)
ParserContext * newParserContext(rError_t *errmsg, Region *r)
Pointer * newPointer2(char *buf)
Res * parseAndComputeExpression(char *expr, Env *env, ruleExecInfo_t *rei, int reiSaveFlag, rError_t *errmsg, Region *r)
void logErrMsg(rError_t *errmsg, rError_t *system)
Pointer * newPointer(FILE *buf, const char *ruleBaseName)
Res * parseAndComputeExpressionAdapter(char *inAction, msParamArray_t *inMsParamArray, int retOutParams, ruleExecInfo_t *rei, int reiSaveFlag, Region *r)
const void * deleteFromHashTable(Hashtable *h, const char *key)
char * errMsgToString(rError_t *errmsg, char *buf, int buflen)
void postProcessActions(Node *expr, Env *systemFunctionTables, rError_t *errmsg, Node **errnode, Region *r)
int parseAndComputeRuleNewEnv(char *rule, ruleExecInfo_t *rei, int reiSaveFlag, msParamArray_t *msParamArray, rError_t *errmsg, Region *r)
int clearMsParamArray(msParamArray_t *msParamArray, int freeStruct)
Hashtable * newHashTable2(int size, Region *r)
Res * newErrorRes(Region *r, int errcode)
Node * parseTermRuleGen(Pointer *expr, int rulegn, ParserContext *pc)
Res * evaluateExpression3(Node *expr, int applyAll, int force, ruleExecInfo_t *rei, int reiSaveFlag, Env *env, rError_t *errmsg, Region *r)
int isRuleGenSyntax(char *expr)
Res * execRuleNodeRes(Node *rule, Res **args, unsigned int argc, int applyAll, Env *env, ruleExecInfo_t *rei, int reiSaveFlag, rError_t *errmsg, Region *r)
ExprType * typeRule(RuleDesc *rule, Env *funcDesc, Hashtable *varTypes, List *typingConstraints, rError_t *errmsg, Node **errnode, Region *r)
void updateInEnv(Env *env, char *varname, Res *res)
Node * newNode(NodeType type, const char *text, Label *exprloc, Region *r)
Env * globalEnv(Env *env)
ExprType * newSimpType(NodeType t, Region *r)
int insertIntoHashTable(Hashtable *h, const char *key, const void *value)
Label * getFPos(Label *label, Pointer *p, ParserContext *context)
int GlobalAllRuleExecFlag
int addRErrorMsg(rError_t *myError, int status, const char *msg)
int parseAndComputeMsParamArrayToEnv(msParamArray_t *var, Env *env, ruleExecInfo_t *rei, int reiSaveFlag, rError_t *errmsg, Region *r)
int parseAndComputeRuleAdapter(char *rule, msParamArray_t *msParamArray, ruleExecInfo_t *rei, int reiSaveFlag, Region *r)
const void * lookupFromHashTable(Hashtable *h, const char *key)
#define OPTION_VARARG_ONCE
void cpEnv(Env *env, Region *r)
ExprType * typeRuleSet(RuleSet *ruleset, rError_t *errmsg, Node **errnode, Region *r)
List * newList(Region *r)
Env * newEnv(Hashtable *current, Env *previous, Env *lower, Region *r)
int readRuleSetFromFile(const char *ruleBaseName, RuleSet *ruleSet, Env *funcDesc, int *errloc, rError_t *errmsg, Region *r)
Res * evaluateActions(Node *expr, Node *reco, int applyAll, ruleExecInfo_t *rei, int reiSaveFlag, Env *env, rError_t *errmsg, Region *r)
RuleDesc * getRuleDesc(int ri)
msParamArray_t * msParamArray
void deletePointer(Pointer *buf)
char * generateErrMsg(char *msg, long errloc, char *ruleBaseName, char errbuf[1024])
Res * computeExpressionWithParams(const char *actionName, const char **params, int paramsCount, ruleExecInfo_t *rei, int reiSaveFlag, msParamArray_t *msParamArray, rError_t *errmsg, Region *r)
void region_free(Region *r)
void appendRuleIntoExtIndex(RuleDesc *rule, int i, Region *r)
ExprType * newErrorType(int errcode, Region *r)
void deleteParserContext(ParserContext *t)
int readRuleSetFromLocalFile(const char *ruleBaseName, const char *rulesFileName, RuleSet *ruleSet, Env *funcDesc, int *errloc, rError_t *errmsg, Region *r)
int convertMsParamArrayToEnv(msParamArray_t *var, Env *env, Region *r)
int writeToTmp(char *fileName, char *text)
@ RE_FUNCTION_REDEFINITION
Res * computeNode(Node *node, Node *reco, Env *env, ruleExecInfo_t *rei, int reiSaveFlag, rError_t *errmsg, Region *r)
msParamArray_t * newMsParamArray()
ExprType * newFuncTypeVarArg(int arity, int vararg, ExprType **paramTypes, ExprType *elemType, Region *r)
int freeRErrorContent(rError_t *myError)
int checkPointExtRuleSet(Region *r)
int convertMsParamToRes(msParam_t *mP, Res *res, Region *r)