# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

cf_gramatical.cpp File Reference

#include <stdio.h>
#include <vector>
#include <string>
#include "nel/misc/config_file.h"
#include "nel/misc/common.h"
#include "nel/misc/debug.h"

Go to the source code of this file.

Compounds

struct  cf_value
union  YYSTYPE

Defines

#define YYBISON   1
#define yyparse   cfparse
#define yylex   cflex
#define yyerror   cferror
#define yylval   cflval
#define yychar   cfchar
#define yydebug   cfdebug
#define yynerrs   cfnerrs
#define ADD_ASSIGN   257
#define ASSIGN   258
#define VARIABLE   259
#define STRING   260
#define SEMICOLON   261
#define PLUS   262
#define MINUS   263
#define MULT   264
#define DIVIDE   265
#define RPAREN   266
#define LPAREN   267
#define RBRACE   268
#define LBRACE   269
#define COMMA   270
#define INT   271
#define REAL   272
#define YYPARSE_PARAM   pvararray
#define DEBUG_PRINTF
#define DEBUG_PRINT(a)
#define const
#define YYFINAL   44
#define YYFLAG   -32768
#define YYNTBASE   19
#define YYTRANSLATE(x)   ((unsigned)(x) <= 272 ? yytranslate[x] : 30)
#define YYLAST   44
#define YYSTACK_ALLOC   malloc
#define yyerrok   (yyerrstatus = 0)
#define yyclearin   (yychar = YYEMPTY)
#define YYEMPTY   -2
#define YYEOF   0
#define YYACCEPT   goto yyacceptlab
#define YYABORT   goto yyabortlab
#define YYERROR   goto yyerrlab1
#define YYFAIL   goto yyerrlab
#define YYRECOVERING()   (!!yyerrstatus)
#define YYBACKUP(token, value)
#define YYTERROR   1
#define YYERRCODE   256
#define YYLEX   yylex()
#define YYINITDEPTH   200
#define YYMAXDEPTH   10000
#define YYPARSE_PARAM_ARG   YYPARSE_PARAM
#define YYPARSE_PARAM_DECL   void *YYPARSE_PARAM;
#define YYPOPSTACK   (yyvsp--, yyssp--)

Enumerations

enum  cf_operation {
  OP_PLUS, OP_MINUS, OP_MULT, OP_DIVIDE,
  OP_NEG
}

Functions

int yylex (void)
cf_value cf_op (cf_value a, cf_value b, cf_operation op)
void cf_print (cf_value Val)
void cf_setVar (NLMISC::CConfigFile::CVar &Var, cf_value Val)
int yyerror (const char *)
void __yy_memcpy (to, from, count) char *to

Variables

bool cf_Ignore
FILE * yyin
NLMISC::CConfigFile::CVar cf_CurrentVar
int cf_CurrentLine
bool cf_OverwriteExistingVariable
const char yytranslate []
const short yyr1 []
const short yyr2 []
const short yydefact []
const short yydefgoto []
const short yypact []
const short yypgoto []
const short yytable []
const short yycheck []
int yychar
YYSTYPE yylval
int yynerrs
char * from
unsigned int count


Define Documentation

#define ADD_ASSIGN   257
 

Definition at line 14 of file cf_gramatical.cpp.

#define ASSIGN   258
 

Definition at line 15 of file cf_gramatical.cpp.

#define COMMA   270
 

Definition at line 27 of file cf_gramatical.cpp.

#define const
 

Definition at line 117 of file cf_gramatical.cpp.

#define DEBUG_PRINT  
 

Definition at line 66 of file cf_gramatical.cpp.

#define DEBUG_PRINTF
 

Definition at line 61 of file cf_gramatical.cpp.

#define DIVIDE   265
 

Definition at line 22 of file cf_gramatical.cpp.

#define INT   271
 

Definition at line 28 of file cf_gramatical.cpp.

#define LBRACE   269
 

Definition at line 26 of file cf_gramatical.cpp.

#define LPAREN   267
 

Definition at line 24 of file cf_gramatical.cpp.

#define MINUS   263
 

Definition at line 20 of file cf_gramatical.cpp.

#define MULT   264
 

Definition at line 21 of file cf_gramatical.cpp.

#define PLUS   262
 

Definition at line 19 of file cf_gramatical.cpp.

#define RBRACE   268
 

Definition at line 25 of file cf_gramatical.cpp.

#define REAL   272
 

Definition at line 29 of file cf_gramatical.cpp.

#define RPAREN   266
 

Definition at line 23 of file cf_gramatical.cpp.

#define SEMICOLON   261
 

Definition at line 18 of file cf_gramatical.cpp.

#define STRING   260
 

Definition at line 17 of file cf_gramatical.cpp.

#define VARIABLE   259
 

Definition at line 16 of file cf_gramatical.cpp.

#define YYABORT   goto yyabortlab
 

Definition at line 342 of file cf_gramatical.cpp.

#define YYACCEPT   goto yyacceptlab
 

Definition at line 341 of file cf_gramatical.cpp.

#define YYBACKUP token,
value   
 

Value:

do                                                              \
  if (yychar == YYEMPTY && yylen == 1)                          \
    { yychar = (token), yylval = (value);                       \
      yychar1 = YYTRANSLATE (yychar);                           \
      YYPOPSTACK;                                               \
      goto yybackup;                                            \
    }                                                           \
  else                                                          \
    { yyerror ("syntax error: cannot back up"); YYERROR; }      \
while (0)

Definition at line 350 of file cf_gramatical.cpp.

#define YYBISON   1
 

Definition at line 5 of file cf_gramatical.cpp.

#define yychar   cfchar
 

Definition at line 11 of file cf_gramatical.cpp.

#define yyclearin   (yychar = YYEMPTY)
 

Definition at line 338 of file cf_gramatical.cpp.

#define yydebug   cfdebug
 

Definition at line 12 of file cf_gramatical.cpp.

#define YYEMPTY   -2
 

Definition at line 339 of file cf_gramatical.cpp.

#define YYEOF   0
 

Definition at line 340 of file cf_gramatical.cpp.

#define YYERRCODE   256
 

Definition at line 363 of file cf_gramatical.cpp.

#define yyerrok   (yyerrstatus = 0)
 

Definition at line 337 of file cf_gramatical.cpp.

#define YYERROR   goto yyerrlab1
 

Definition at line 343 of file cf_gramatical.cpp.

#define yyerror   cferror
 

Definition at line 9 of file cf_gramatical.cpp.

#define YYFAIL   goto yyerrlab
 

Definition at line 348 of file cf_gramatical.cpp.

#define YYFINAL   44
 

Definition at line 123 of file cf_gramatical.cpp.

#define YYFLAG   -32768
 

Definition at line 124 of file cf_gramatical.cpp.

#define YYINITDEPTH   200
 

Definition at line 410 of file cf_gramatical.cpp.

#define YYLAST   44
 

Definition at line 235 of file cf_gramatical.cpp.

#define YYLEX   yylex()
 

Definition at line 366 of file cf_gramatical.cpp.

#define yylex   cflex
 

Definition at line 8 of file cf_gramatical.cpp.

#define yylval   cflval
 

Definition at line 10 of file cf_gramatical.cpp.

#define YYMAXDEPTH   10000
 

Definition at line 421 of file cf_gramatical.cpp.

#define yynerrs   cfnerrs
 

Definition at line 13 of file cf_gramatical.cpp.

#define YYNTBASE   19
 

Definition at line 125 of file cf_gramatical.cpp.

#define yyparse   cfparse
 

Definition at line 7 of file cf_gramatical.cpp.

#define YYPARSE_PARAM   pvararray
 

Definition at line 53 of file cf_gramatical.cpp.

#define YYPARSE_PARAM_ARG   YYPARSE_PARAM
 

#define YYPARSE_PARAM_DECL   void *YYPARSE_PARAM;
 

#define YYPOPSTACK   (yyvsp--, yyssp--)
 

 
#define YYRECOVERING      (!!yyerrstatus)
 

Definition at line 349 of file cf_gramatical.cpp.

#define YYSTACK_ALLOC   malloc
 

Definition at line 330 of file cf_gramatical.cpp.

#define YYTERROR   1
 

Definition at line 362 of file cf_gramatical.cpp.

#define YYTRANSLATE x       ((unsigned)(x) <= 272 ? yytranslate[x] : 30)
 

Definition at line 127 of file cf_gramatical.cpp.


Enumeration Type Documentation

enum cf_operation
 

Enumeration values:
OP_PLUS 
OP_MINUS 
OP_MULT 
OP_DIVIDE 
OP_NEG 

Definition at line 70 of file cf_gramatical.cpp.


Function Documentation

void __yy_memcpy to   ,
from   ,
count   
[static]
 

cf_value cf_op cf_value    a,
cf_value    b,
cf_operation    op
 

void cf_print cf_value    Val
 

void cf_setVar NLMISC::CConfigFile::CVar   Var,
cf_value    Val
 

int yyerror const char *   
 

int yylex void   
 


Variable Documentation

int cf_CurrentLine
 

Definition at line 90 of file cf_gramatical.cpp.

NLMISC::CConfigFile::CVar cf_CurrentVar
 

Definition at line 88 of file cf_gramatical.cpp.

bool cf_Ignore
 

Definition at line 82 of file cf_gramatical.cpp.

bool cf_OverwriteExistingVariable
 

Definition at line 92 of file cf_gramatical.cpp.

unsigned int count
 

Definition at line 440 of file cf_gramatical.cpp.

Referenced by NLSOUND::CBackgroundSoundManager::addSound.

char* from
 

Definition at line 439 of file cf_gramatical.cpp.

int yychar
 

Definition at line 389 of file cf_gramatical.cpp.

const short yycheck[] [static]
 

Initial value:

 {    13,
    10,    11,     5,     6,     0,     8,     9,     6,     8,     9,
    13,     5,    15,    12,    17,    18,    16,     3,     4,    12,
    30,    31,    10,    11,     5,     6,    40,     8,     9,     8,
     9,     7,    13,    28,    29,     7,    17,    18,    16,    14,
     0,     0,     3,    40
}

Definition at line 246 of file cf_gramatical.cpp.

const short yydefact[] [static]
 

Initial value:

 {     1,
     0,     0,     2,     5,     0,     0,     4,    27,    25,     0,
     0,     0,    13,    23,    24,     0,     8,    14,    17,    26,
     0,    20,    21,     0,     0,    10,     7,     0,     0,     0,
     0,     6,    22,     9,     0,    15,    16,    18,    19,    13,
    12,     0,     0,     0
}

Definition at line 210 of file cf_gramatical.cpp.

const short yydefgoto[] [static]
 

Initial value:

 {    42,
     1,     3,     4,    16,    25,    35,    17,    18,    19,    20
}

Definition at line 218 of file cf_gramatical.cpp.

FILE* yyin
 

Definition at line 84 of file cf_gramatical.cpp.

YYSTYPE yylval
 

Definition at line 390 of file cf_gramatical.cpp.

int yynerrs
 

Definition at line 398 of file cf_gramatical.cpp.

const short yypact[] [static]
 

Initial value:

 {     5,
     7,    15,     7,-32768,    -2,    -2,-32768,-32768,-32768,    20,
    20,    -2,    20,-32768,-32768,    25,    22,    13,-32768,-32768,
    29,-32768,-32768,     8,    26,     1,-32768,    20,    20,    20,
    20,-32768,-32768,-32768,    23,    13,    13,-32768,-32768,    20,
-32768,    41,    42,-32768
}

Definition at line 222 of file cf_gramatical.cpp.

const short yypgoto[] [static]
 

Initial value:

 {-32768,
-32768,-32768,    40,     2,     4,-32768,   -13,     6,    -9,-32768
}

Definition at line 230 of file cf_gramatical.cpp.

const short yyr1[] [static]
 

Initial value:

 {     0,
    20,    19,    19,    21,    21,    22,    22,    23,    23,    24,
    25,    24,    24,    26,    26,    26,    27,    27,    27,    28,
    28,    28,    28,    28,    28,    28,    29
}

Definition at line 198 of file cf_gramatical.cpp.

const short yyr2[] [static]
 

Initial value:

 {     0,
     0,     2,     0,     2,     1,     4,     4,     1,     3,     1,
     0,     4,     0,     1,     3,     3,     1,     3,     3,     2,
     2,     3,     1,     1,     1,     1,     1
}

Definition at line 204 of file cf_gramatical.cpp.

const short yytable[] [static]
 

Initial value:

 {    26,
    22,    23,     8,     9,    -3,    10,    11,    21,    28,    29,
    12,     2,    13,    24,    14,    15,   -11,     5,     6,    33,
    38,    39,    30,    31,     8,     9,    26,    10,    11,    28,
    29,    27,    12,    36,    37,    32,    14,    15,    40,    34,
    43,    44,     7,    41
}

Definition at line 238 of file cf_gramatical.cpp.

const char yytranslate[] [static]
 

Initial value:

 {     0,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     1,     3,     4,     5,     6,
     7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
    17,    18
}

Definition at line 129 of file cf_gramatical.cpp.