Shared parsing functions. More...
#include "defines.h"
#include "ufotypes.h"
#include "parse.h"
Go to the source code of this file.
Functions | |
void | Com_UnParseLastToken (void) |
Put back the last token into the parser The next call of Com_Parse will return the same token again. | |
qboolean | Com_ParsedTokenIsQuoted (void) |
Check if the last read token is quoted. | |
void | Com_EnableFunctionScriptToken (qboolean enable) |
Enable parsing of token '(', ')' and ','. | |
const char * | Com_Parse (const char *data_p[]) |
Parse a token out of a string. | |
Variables | |
static char | com_token [4096] |
static qboolean | isUnparsedToken |
static qboolean | isQuotedToken |
static qboolean | functionScriptTokenEnabled |
Shared parsing functions.
Definition in file parse.c.
void Com_EnableFunctionScriptToken | ( | qboolean | enable | ) |
Enable parsing of token '(', ')' and ','.
enable | If true, enable parsing of extra tokens |
Definition at line 63 of file parse.c.
References functionScriptTokenEnabled.
Referenced by testParserWithFunctionScriptToken(), UFO_InitSuiteParser(), UI_ParseEventProperty(), and UI_ParseFunction().
const char* Com_Parse | ( | const char * | data_p[] | ) |
Parse a token out of a string.
data_p | Pointer to a string which is to be parsed |
data_p
is expected to be null-terminated Definition at line 79 of file parse.c.
References com_token, data, functionScriptTokenEnabled, isQuotedToken, isUnparsedToken, len, qfalse, and qtrue.
Referenced by AIR_ParseAircraft(), B_ParseBaseTemplate(), B_ParseBuildings(), CL_DownloadUMPMap(), CL_ParseAlienTeam(), CL_ParseCampaign(), CL_ParseCities(), CL_ParseComponents(), CL_ParseCustomSkin(), CL_ParseEventMails(), CL_ParseMapDefinition(), CL_ParseMapParticle(), CL_ParseNations(), CL_ParseParticle(), CL_ParsePtlCmds(), CL_ParseRanks(), CL_ParseResearchableCampaignStates(), CL_ParseResearchedCampaignItems(), CL_ParseSalary(), CL_ParseSequence(), CL_ParseServerInfoMessage(), CL_ParseTipsOfTheDay(), CL_QueryMasterServerThread(), CL_SpawnParseEntitystring(), CM_LoadMap(), Cmd_TokenizeString(), CMod_LoadEntityString(), Com_EParse(), Com_MacroExpandString(), Com_ParseActorModels(), Com_ParseActorNames(), Com_ParseActorSounds(), Com_ParseArmourOrResistance(), Com_ParseCharacterTemplate(), Com_ParseDamageTypes(), Com_ParseEquipment(), Com_ParseFire(), Com_ParseGameTypes(), Com_ParseInventory(), Com_ParseItem(), Com_ParseTeam(), Com_ParseTerrain(), Com_ParseUGVs(), ED_CheckNumericType(), ED_GetFloatVectorFromString(), ED_GetIntVectorFromString(), ED_ParseEdict(), ED_ParseEntities(), ED_ParseType(), ED_ProcessRanges(), FS_NextScriptHeader(), FS_SkipBlock(), G_Say_f(), G_SpawnEntities(), INS_ParseInstallations(), M_ParseMusic(), MSO_ParseCategories(), MSO_ParseSettings(), R_LoadMaterials(), R_LoadObjModelFace(), R_ModBeginLoading(), R_ModLoadAnims(), R_ParseStage(), R_PreprocessShader(), RS_ParseTechnologies(), SV_ParseMapcycle(), SV_ParseUMP(), testParser(), testParserWithEntity(), testParserWithFunctionScriptToken(), testParserWithUnParse(), TUT_ParseTutorials(), UI_BuildRadarImageList(), UI_GetReferenceString(), UI_ParseComponent(), UI_ParseExpression(), UI_ParseFont(), UI_ParseIcon(), UI_ParseUIModel(), UI_ParseValueExpression(), UI_ParseWindow(), and UP_ParseChapters().
qboolean Com_ParsedTokenIsQuoted | ( | void | ) |
Check if the last read token is quoted.
Definition at line 53 of file parse.c.
References isQuotedToken.
Referenced by testParser(), testParserWithEntity(), testParserWithFunctionScriptToken(), testParserWithUnParse(), UI_ParseNode(), UI_ParseProperty(), UI_ParseValueExpression(), and UI_ParseWindow().
void Com_UnParseLastToken | ( | void | ) |
Put back the last token into the parser The next call of Com_Parse will return the same token again.
Definition at line 43 of file parse.c.
References isUnparsedToken, and qtrue.
Referenced by testParserWithUnParse(), UI_ParseCallAction(), UI_ParseComponent(), UI_ParseExpression(), and UI_ParseSetAction().
char com_token[4096] [static] |
Definition at line 32 of file parse.c.
Referenced by Cmd_TokenizeString(), and Com_Parse().
qboolean functionScriptTokenEnabled [static] |
Definition at line 35 of file parse.c.
Referenced by Com_EnableFunctionScriptToken(), and Com_Parse().
qboolean isQuotedToken [static] |
Definition at line 34 of file parse.c.
Referenced by Com_Parse(), and Com_ParsedTokenIsQuoted().
qboolean isUnparsedToken [static] |
Definition at line 33 of file parse.c.
Referenced by Com_Parse(), and Com_UnParseLastToken().