summaryrefslogtreecommitdiff
path: root/src/mod_ssi_exprparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mod_ssi_exprparser.c')
-rw-r--r--src/mod_ssi_exprparser.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/mod_ssi_exprparser.c b/src/mod_ssi_exprparser.c
index 65ec4dc..d049e9a 100644
--- a/src/mod_ssi_exprparser.c
+++ b/src/mod_ssi_exprparser.c
@@ -18,10 +18,10 @@
/* Next is all token values, in a form suitable for use by makeheaders.
** This section will be null unless lemon is run with the -m switch.
*/
-/*
+/*
** These constants (all generated automatically by the parser generator)
** specify the various kinds of tokens (terminals) that the parser
-** understands.
+** understands.
**
** Each symbol here is a terminal symbol in the grammar.
*/
@@ -38,7 +38,7 @@
** and nonterminals. "int" is used otherwise.
** YYNOCODE is a number of type YYCODETYPE which corresponds
** to no legal terminal or nonterminal number. This
-** number is used to fill in empty slots of the hash
+** number is used to fill in empty slots of the hash
** table.
** YYFALLBACK If defined, this indicates that one or more tokens
** have fall-back values which should be used if the
@@ -47,7 +47,7 @@
** and nonterminal numbers. "unsigned char" is
** used if there are fewer than 250 rules and
** states combined. "int" is used otherwise.
-** ssiexprparserTOKENTYPE is the data type used for minor tokens given
+** ssiexprparserTOKENTYPE is the data type used for minor tokens given
** directly to the parser from the tokenizer.
** YYMINORTYPE is the data type used for all minor tokens.
** This is typically a union of many types, one of
@@ -91,7 +91,7 @@ typedef union {
/* Next are that tables used to determine what action to take based on the
** current state and lookahead token. These tables are used to implement
** functions that take a state number and lookahead value and return an
-** action integer.
+** action integer.
**
** Suppose the action integer is N. Then the action is determined as
** follows
@@ -116,7 +116,7 @@ typedef union {
** If the index value yy_shift_ofst[S]+X is out of range or if the value
** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
-** and that yy_default[S] should be used instead.
+** and that yy_default[S] should be used instead.
**
** The formula above is for computing the action when the lookahead is
** a terminal symbol. If the lookahead is a non-terminal (as occurs after
@@ -168,7 +168,7 @@ static YYACTIONTYPE yy_default[] = {
/* The next table maps tokens into fallback tokens. If a construct
** like the following:
-**
+**
** %fallback ID X Y Z.
**
** appears in the grammer, then ID becomes a fallback token for X, Y,
@@ -219,10 +219,10 @@ static char *yyTracePrompt = 0;
#endif /* NDEBUG */
#ifndef NDEBUG
-/*
+/*
** Turn parser tracing on by giving a stream to which to write the trace
** and a prompt to preface each trace message. Tracing is turned off
-** by making either argument NULL
+** by making either argument NULL
**
** Inputs:
** <ul>
@@ -247,7 +247,7 @@ void ssiexprparserTrace(FILE *TraceFILE, char *zTracePrompt){
#ifndef NDEBUG
/* For tracing shifts, the names of all terminals and nonterminals
** are required. The following table supplies these names */
-static const char *yyTokenName[] = {
+static const char *yyTokenName[] = {
"$", "AND", "OR", "EQ",
"NE", "GT", "GE", "LT",
"LE", "NOT", "LPARAN", "RPARAN",
@@ -295,7 +295,7 @@ const char *ssiexprparserTokenName(int tokenType){
#endif
}
-/*
+/*
** This function allocates a new parser.
** The only argument is a pointer to a function which works like
** malloc.
@@ -326,7 +326,7 @@ static void yy_destructor(YYCODETYPE yymajor, YYMINORTYPE *yypminor){
/* Here is inserted the actions which take place when a
** terminal or non-terminal is destroyed. This can happen
** when the symbol is popped from the stack during a
- ** reduce or during error processing or when a parser is
+ ** reduce or during error processing or when a parser is
** being destroyed before it is finished parsing.
**
** Note: during a reduce, the only symbols destroyed are those
@@ -379,7 +379,7 @@ static int yy_pop_parser_stack(yyParser *pParser){
return yymajor;
}
-/*
+/*
** Deallocate and destroy a parser. Destructors are all called for
** all stack elements before shutting the parser down.
**
@@ -415,7 +415,7 @@ static int yy_find_shift_action(
){
int i;
int stateno = pParser->yystack[pParser->yyidx].stateno;
-
+
/* if( pParser->yyidx<0 ) return YY_NO_ACTION; */
i = yy_shift_ofst[stateno];
if( i==YY_SHIFT_USE_DFLT ){
@@ -459,7 +459,7 @@ static int yy_find_reduce_action(
){
int i;
int stateno = pParser->yystack[pParser->yyidx].stateno;
-
+
i = yy_reduce_ofst[stateno];
if( i==YY_REDUCE_USE_DFLT ){
return yy_default[stateno];
@@ -559,7 +559,7 @@ static void yy_reduce(
ssiexprparserARG_FETCH;
yymsp = &yypParser->yystack[yypParser->yyidx];
#ifndef NDEBUG
- if( yyTraceFILE && yyruleno>=0
+ if( yyTraceFILE && yyruleno>=0
&& yyruleno<sizeof(yyRuleName)/sizeof(yyRuleName[0]) ){
fprintf(yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
yyRuleName[yyruleno]);
@@ -580,7 +580,7 @@ static void yy_reduce(
{
ctx->val.bo = ssi_val_tobool(yymsp[0].minor.yy29);
ctx->val.type = SSI_TYPE_BOOL;
-
+
ssi_val_free(yymsp[0].minor.yy29);
}
#line 586 "mod_ssi_exprparser.c"
@@ -589,16 +589,16 @@ static void yy_reduce(
#line 38 "./mod_ssi_exprparser.y"
{
int cmp;
-
- if (yymsp[-2].minor.yy29->type == SSI_TYPE_STRING &&
+
+ if (yymsp[-2].minor.yy29->type == SSI_TYPE_STRING &&
yymsp[0].minor.yy29->type == SSI_TYPE_STRING) {
cmp = strcmp(yymsp[-2].minor.yy29->str->ptr, yymsp[0].minor.yy29->str->ptr);
} else {
cmp = ssi_val_tobool(yymsp[-2].minor.yy29) - ssi_val_tobool(yymsp[0].minor.yy29);
}
-
+
yygotominor.yy29 = yymsp[-2].minor.yy29;
-
+
switch(yymsp[-1].minor.yy8) {
case SSI_COND_EQ: yygotominor.yy29->bo = (cmp == 0) ? 1 : 0; break;
case SSI_COND_NE: yygotominor.yy29->bo = (cmp != 0) ? 1 : 0; break;
@@ -607,9 +607,9 @@ static void yy_reduce(
case SSI_COND_LE: yygotominor.yy29->bo = (cmp <= 0) ? 1 : 0; break;
case SSI_COND_LT: yygotominor.yy29->bo = (cmp < 0) ? 1 : 0; break;
}
-
+
yygotominor.yy29->type = SSI_TYPE_BOOL;
-
+
ssi_val_free(yymsp[0].minor.yy29);
}
#line 615 "mod_ssi_exprparser.c"
@@ -625,9 +625,9 @@ static void yy_reduce(
#line 66 "./mod_ssi_exprparser.y"
{
int e;
-
+
e = ssi_val_tobool(yymsp[-2].minor.yy29) && ssi_val_tobool(yymsp[0].minor.yy29);
-
+
yygotominor.yy29 = yymsp[-2].minor.yy29;
yygotominor.yy29->bo = e;
yygotominor.yy29->type = SSI_TYPE_BOOL;
@@ -640,9 +640,9 @@ static void yy_reduce(
#line 77 "./mod_ssi_exprparser.y"
{
int e;
-
+
e = ssi_val_tobool(yymsp[-2].minor.yy29) || ssi_val_tobool(yymsp[0].minor.yy29);
-
+
yygotominor.yy29 = yymsp[-2].minor.yy29;
yygotominor.yy29->bo = e;
yygotominor.yy29->type = SSI_TYPE_BOOL;
@@ -655,9 +655,9 @@ static void yy_reduce(
#line 88 "./mod_ssi_exprparser.y"
{
int e;
-
+
e = !ssi_val_tobool(yymsp[0].minor.yy29);
-
+
yygotominor.yy29 = yymsp[0].minor.yy29;
yygotominor.yy29->bo = e;
yygotominor.yy29->type = SSI_TYPE_BOOL;
@@ -872,7 +872,7 @@ void ssiexprparser(
#ifdef YYERRORSYMBOL
/* A syntax error has occurred.
** The response to an error depends upon whether or not the
- ** grammar defines an error token "ERROR".
+ ** grammar defines an error token "ERROR".
**
** This is what we do if the grammar does define ERROR:
**