gwenhywfar  5.10.1
Macros | Typedefs | Functions
parser.h File Reference
#include "gwenbuild/types/context.h"
#include "gwenbuild/types/project.h"
#include <gwenhywfar/xml.h>
#include <gwenhywfar/db.h>
#include <gwenhywfar/stringlist.h>
Include dependency graph for parser.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GWB_PARSER_FILENAME   "0BUILD"
 
#define GWB_PARSER_SRCFILEFLAGS_ALWAYSDIST   0x00000001
 
#define GWB_PARSER_SRCFILEFLAGS_ISSOURCE   0x00000002
 

Typedefs

typedef int(* GWB_PARSER_PARSE_ELEMENT_FN) (GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode)
 

Functions

GWB_TARGETGWB_Parser_AddTargetForSourceFile (GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWBUILD_TARGETTYPE targetType, const char *fileName, const char *fileType, const char *builderName, const char *installPath)
 
GWB_CONTEXTGWB_Parser_CopyContextForSubdir (const GWB_CONTEXT *sourceContext, const char *folder)
 
GWB_CONTEXTGWB_Parser_CopyContextForTarget (const GWB_CONTEXT *sourceContext)
 
int GWB_Parser_ParseSourcesOrHeaders (GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode, uint32_t fileFlags, const char *defaultTypeName, const char *defaultBuilder)
 
int GWB_Parser_ParseSubdirs (GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode, GWB_PARSER_PARSE_ELEMENT_FN fn)
 
int GWB_Parser_ParseWellKnownElements (GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *n, GWB_PARSER_PARSE_ELEMENT_FN fn)
 
int GWB_Parser_ParseWriteFile (GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode)
 
GWEN_XMLNODEGWB_Parser_ReadBuildFile (GWENBUILD *gwbuild, const GWB_CONTEXT *currentContext, const char *fileName)
 
GWB_PROJECTGWB_Parser_ReadBuildTree (GWENBUILD *gwbuild, GWB_CONTEXT *currentContext, const char *srcDir, GWB_KEYVALUEPAIR_LIST *givenOptionList)
 
GWEN_BUFFERGWB_Parser_ReadNamedXmlDataIntoBufferAndExpand (GWEN_DB_NODE *db, GWEN_XMLNODE *xmlNode, const char *elem)
 
GWEN_BUFFERGWB_Parser_ReadXmlDataIntoBufferAndExpand (GWEN_DB_NODE *db, GWEN_XMLNODE *xmlNode)
 
GWEN_STRINGLISTGWB_Parser_ReadXmlDataIntoStringList (GWEN_DB_NODE *db, GWEN_XMLNODE *xmlNode)
 
int GWB_Parser_ReplaceVarsBetweenAtSigns (const char *s, GWEN_BUFFER *dbuf, GWEN_DB_NODE *db)
 
void GWB_Parser_SetItemValue (GWEN_DB_NODE *db, const char *sId, const char *suffix, const char *value)
 

Macro Definition Documentation

◆ GWB_PARSER_FILENAME

#define GWB_PARSER_FILENAME   "0BUILD"

Definition at line 21 of file parser.h.

Referenced by _parseSubdir(), and GWB_Parser_ReadBuildTree().

◆ GWB_PARSER_SRCFILEFLAGS_ALWAYSDIST

#define GWB_PARSER_SRCFILEFLAGS_ALWAYSDIST   0x00000001

Definition at line 25 of file parser.h.

Referenced by _parseChildNodes(), and GWB_Parser_ParseSourcesOrHeaders().

◆ GWB_PARSER_SRCFILEFLAGS_ISSOURCE

#define GWB_PARSER_SRCFILEFLAGS_ISSOURCE   0x00000002

Definition at line 26 of file parser.h.

Referenced by _parseChildNodes(), and GWB_Parser_ParseSourcesOrHeaders().

Typedef Documentation

◆ GWB_PARSER_PARSE_ELEMENT_FN

typedef int(* GWB_PARSER_PARSE_ELEMENT_FN) (GWB_PROJECT *project, GWB_CONTEXT *currentContext, GWEN_XMLNODE *xmlNode)

Definition at line 47 of file parser.h.

Function Documentation

◆ GWB_Parser_AddTargetForSourceFile()

GWB_TARGET* GWB_Parser_AddTargetForSourceFile ( GWB_PROJECT project,
GWB_CONTEXT currentContext,
GWBUILD_TARGETTYPE  targetType,
const char *  fileName,
const char *  fileType,
const char *  builderName,
const char *  installPath 
)

◆ GWB_Parser_CopyContextForSubdir()

GWB_CONTEXT* GWB_Parser_CopyContextForSubdir ( const GWB_CONTEXT sourceContext,
const char *  folder 
)

◆ GWB_Parser_CopyContextForTarget()

GWB_CONTEXT* GWB_Parser_CopyContextForTarget ( const GWB_CONTEXT sourceContext)

Definition at line 153 of file parser.c.

References GWB_Context_ClearDefineList(), GWB_Context_ClearIncludeList(), GWB_Context_ClearSourceFileList2(), and GWB_Context_dup().

Referenced by GWB_Parser_AddTargetForSourceFile(), and GWB_ParseTarget().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWB_Parser_ParseSourcesOrHeaders()

int GWB_Parser_ParseSourcesOrHeaders ( GWB_PROJECT project,
GWB_CONTEXT currentContext,
GWEN_XMLNODE xmlNode,
uint32_t  fileFlags,
const char *  defaultTypeName,
const char *  defaultBuilder 
)

◆ GWB_Parser_ParseSubdirs()

int GWB_Parser_ParseSubdirs ( GWB_PROJECT project,
GWB_CONTEXT currentContext,
GWEN_XMLNODE xmlNode,
GWB_PARSER_PARSE_ELEMENT_FN  fn 
)

◆ GWB_Parser_ParseWellKnownElements()

int GWB_Parser_ParseWellKnownElements ( GWB_PROJECT project,
GWB_CONTEXT currentContext,
GWEN_XMLNODE n,
GWB_PARSER_PARSE_ELEMENT_FN  fn 
)

Definition at line 942 of file parser.c.

References _parseIfNotVarHasValue(), _parseIfNotVarMatches(), _parseIfVarHasValue(), _parseIfVarMatches(), _parseSetVar(), _parseWriteFile(), DBG_DEBUG, DBG_ERROR, GWEN_LOGDOMAIN, GWEN_XMLNode_GetData(), and NULL.

Referenced by _parseChildNodes().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWB_Parser_ParseWriteFile()

int GWB_Parser_ParseWriteFile ( GWB_CONTEXT currentContext,
GWEN_XMLNODE xmlNode 
)

◆ GWB_Parser_ReadBuildFile()

GWEN_XMLNODE* GWB_Parser_ReadBuildFile ( GWENBUILD gwbuild,
const GWB_CONTEXT currentContext,
const char *  fileName 
)

◆ GWB_Parser_ReadBuildTree()

GWB_PROJECT* GWB_Parser_ReadBuildTree ( GWENBUILD gwbuild,
GWB_CONTEXT currentContext,
const char *  srcDir,
GWB_KEYVALUEPAIR_LIST *  givenOptionList 
)

◆ GWB_Parser_ReadNamedXmlDataIntoBufferAndExpand()

GWEN_BUFFER* GWB_Parser_ReadNamedXmlDataIntoBufferAndExpand ( GWEN_DB_NODE db,
GWEN_XMLNODE xmlNode,
const char *  elem 
)

Definition at line 345 of file parser.c.

References GWB_Parser_ReadXmlDataIntoBufferAndExpand(), GWEN_Buffer_free(), GWEN_Buffer_GetUsedBytes(), GWEN_XMLNode_FindFirstTag(), and NULL.

Referenced by GWB_ParseOption().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWB_Parser_ReadXmlDataIntoBufferAndExpand()

GWEN_BUFFER* GWB_Parser_ReadXmlDataIntoBufferAndExpand ( GWEN_DB_NODE db,
GWEN_XMLNODE xmlNode 
)

◆ GWB_Parser_ReadXmlDataIntoStringList()

GWEN_STRINGLIST* GWB_Parser_ReadXmlDataIntoStringList ( GWEN_DB_NODE db,
GWEN_XMLNODE xmlNode 
)

◆ GWB_Parser_ReplaceVarsBetweenAtSigns()

int GWB_Parser_ReplaceVarsBetweenAtSigns ( const char *  s,
GWEN_BUFFER dbuf,
GWEN_DB_NODE db 
)

Definition at line 873 of file parser.c.

References DBG_ERROR, DBG_INFO, DBG_WARN, GWEN_Buffer_AppendByte(), GWEN_Buffer_AppendString(), GWEN_DB_Dump(), GWEN_DB_GetCharValue(), GWEN_ERROR_BAD_DATA, GWEN_LOGDOMAIN, and NULL.

Referenced by _readModifyWriteFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWB_Parser_SetItemValue()

void GWB_Parser_SetItemValue ( GWEN_DB_NODE db,
const char *  sId,
const char *  suffix,
const char *  value 
)

Definition at line 856 of file parser.c.

References GWEN_Buffer_AppendString(), GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_DB_FLAGS_OVERWRITE_VARS, and GWEN_DB_SetCharValue().

Referenced by _callPkgConfig(), _checkVersion(), _parseLib(), _parseProg(), _setVarFunctionExists(), and _setVarHeaderExists().

Here is the call graph for this function:
Here is the caller graph for this function: