1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00

s/modifier/operator/

This commit is contained in:
tg(x) 2011-04-22 20:50:59 +02:00
parent 35342caced
commit 8359215d98
8 changed files with 39 additions and 44 deletions

View file

@ -43,13 +43,13 @@ typedef enum
/// from the cursor position to the end.
PSYC_PARSE_INSUFFICIENT = 1,
/// Routing variable parsing done.
/// Modifier, name & value contains the respective parts.
/// Operator, name & value contains the respective parts.
PSYC_PARSE_ROUTING = 2,
/// Entity variable parsing done.
/// Modifier, name & value contains the respective parts.
/// Operator, name & value contains the respective parts.
PSYC_PARSE_ENTITY = 3,
/// Entity variable parsing is incomplete.
/// Modifier & name are complete, value is incomplete.
/// Operator & name are complete, value is incomplete.
PSYC_PARSE_ENTITY_INCOMPLETE = 4,
/// Body parsing done, name contains method, value contains body.
PSYC_PARSE_BODY = 5,
@ -156,14 +156,14 @@ inline size_t PSYC_getContentLength (PSYC_ParseState* s);
* Generalized line-based packet parser.
*
* @param state An initialized PSYC_ParseState
* @param modifier A pointer to a character. In case of a variable, it will
* be set to the modifier of that variable
* @param operator A pointer to a character. In case of a variable, it will
* be set to the operator of that variable
* @param name A pointer to a PSYC_Array. It will point to the name of
* the variable or method and its length will be set accordingly
* @param value A pointer to a PSYC_Array. It will point to the
* value/body the variable/method and its length will be set accordingly
*/
PSYC_ParseRC PSYC_parse(PSYC_ParseState* state, char* modifier, PSYC_Array* name, PSYC_Array* value);
PSYC_ParseRC PSYC_parse(PSYC_ParseState* state, char* operator, PSYC_Array* name, PSYC_Array* value);
/**
* List value parser.

View file

@ -3,11 +3,6 @@
#include "syntax.h"
#define PSYC_FLAG_UNDEFINED 0
#define PSYC_FLAG_NOT_BINARY 1
#define PSYC_FLAG_YES_BINARY 2
#define PSYC_FLAG_CHECK_BINARY 3
typedef enum
{
PSYC_RENDER_CHECK_LENGTH = 0,
@ -47,7 +42,7 @@ inline void PSYC_initRenderState (PSYC_RenderState* state);
int PSYC_renderVar(PSYC_RenderState* render,
const char* name, size_t nlength,
const char* value, size_t vlength,
PSYC_RenderFlag flags, char modifier);
PSYC_RenderFlag flags, char operator);
int PSYC_renderBody(PSYC_RenderState* render,
const char* method, size_t mlength,

View file

@ -17,20 +17,20 @@
#define C_GLYPH_SEPARATOR_KEYWORD '_'
#define S_GLYPH_SEPARATOR_KEYWORD "_"
#define C_GLYPH_MODIFIER_SET ':'
#define S_GLYPH_MODIFIER_SET ":"
#define C_GLYPH_OPERATOR_SET ':'
#define S_GLYPH_OPERATOR_SET ":"
#define C_GLYPH_MODIFIER_ASSIGN '='
#define S_GLYPH_MODIFIER_ASSIGN "="
#define C_GLYPH_OPERATOR_ASSIGN '='
#define S_GLYPH_OPERATOR_ASSIGN "="
#define C_GLYPH_MODIFIER_AUGMENT '+'
#define S_GLYPH_MODIFIER_AUGMENT "+"
#define C_GLYPH_OPERATOR_AUGMENT '+'
#define S_GLYPH_OPERATOR_AUGMENT "+"
#define C_GLYPH_MODIFIER_DIMINISH '-'
#define S_GLYPH_MODIFIER_DIMINISH "-"
#define C_GLYPH_OPERATOR_DIMINISH '-'
#define S_GLYPH_OPERATOR_DIMINISH "-"
#define C_GLYPH_MODIFIER_QUERY '?'
#define S_GLYPH_MODIFIER_QUERY "?"
#define C_GLYPH_OPERATOR_QUERY '?'
#define S_GLYPH_OPERATOR_QUERY "?"
/* might move into routing.h or something */
#define PSYC_ROUTING 1