Classes | Macros | Typedefs | Functions | Variables
pre.cpp File Reference
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <assert.h>
#include <ctype.h>
#include <qarray.h>
#include <qstack.h>
#include <qfile.h>
#include <qstrlist.h>
#include <qdict.h>
#include <qregexp.h>
#include <qfileinfo.h>
#include <qdir.h>
#include "pre.h"
#include "constexp.h"
#include "define.h"
#include "doxygen.h"
#include "message.h"
#include "util.h"
#include "defargs.h"
#include "debug.h"
#include "bufstr.h"
#include "portable.h"
#include "arguments.h"
#include "entry.h"
#include "condparser.h"
#include "config.h"
#include "filedef.h"
#include "memberdef.h"
#include "membername.h"

Go to the source code of this file.

Classes

struct  yy_buffer_state
 
struct  yy_trans_info
 
struct  CondCtx
 
struct  FileState
 
class  DefineManager
 Singleton that manages the defines available while proprocessing files. More...
 
class  DefineManager::DefinesPerFile
 

Macros

#define YY_INT_ALIGNED   short int
 
#define yy_create_buffer   preYY_create_buffer
 
#define yy_delete_buffer   preYY_delete_buffer
 
#define yy_flex_debug   preYY_flex_debug
 
#define yy_init_buffer   preYY_init_buffer
 
#define yy_flush_buffer   preYY_flush_buffer
 
#define yy_load_buffer_state   preYY_load_buffer_state
 
#define yy_switch_to_buffer   preYY_switch_to_buffer
 
#define yyin   preYYin
 
#define yyleng   preYYleng
 
#define yylex   preYYlex
 
#define yylineno   preYYlineno
 
#define yyout   preYYout
 
#define yyrestart   preYYrestart
 
#define yytext   preYYtext
 
#define yywrap   preYYwrap
 
#define yyalloc   preYYalloc
 
#define yyrealloc   preYYrealloc
 
#define yyfree   preYYfree
 
#define FLEX_SCANNER
 
#define YY_FLEX_MAJOR_VERSION   2
 
#define YY_FLEX_MINOR_VERSION   5
 
#define YY_FLEX_SUBMINOR_VERSION   35
 
#define FLEX_BETA
 
#define FLEXINT_H
 
#define INT8_MIN   (-128)
 
#define INT16_MIN   (-32767-1)
 
#define INT32_MIN   (-2147483647-1)
 
#define INT8_MAX   (127)
 
#define INT16_MAX   (32767)
 
#define INT32_MAX   (2147483647)
 
#define UINT8_MAX   (255U)
 
#define UINT16_MAX   (65535U)
 
#define UINT32_MAX   (4294967295U)
 
#define yyconst
 
#define YY_NULL   0
 
#define YY_SC_TO_UI(c)   ((unsigned int) (unsigned char) c)
 
#define BEGIN   (yy_start) = 1 + 2 *
 
#define YY_START   (((yy_start) - 1) / 2)
 
#define YYSTATE   YY_START
 
#define YY_STATE_EOF(state)   (YY_END_OF_BUFFER + state + 1)
 
#define YY_NEW_FILE   preYYrestart(preYYin )
 
#define YY_END_OF_BUFFER_CHAR   0
 
#define YY_BUF_SIZE   16384
 
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
 
#define YY_TYPEDEF_YY_BUFFER_STATE
 
#define EOB_ACT_CONTINUE_SCAN   0
 
#define EOB_ACT_END_OF_FILE   1
 
#define EOB_ACT_LAST_MATCH   2
 
#define YY_LESS_LINENO(n)
 
#define yyless(n)
 
#define unput(c)   yyunput( c, (yytext_ptr) )
 
#define YY_TYPEDEF_YY_SIZE_T
 
#define YY_STRUCT_YY_BUFFER_STATE
 
#define YY_BUFFER_NEW   0
 
#define YY_BUFFER_NORMAL   1
 
#define YY_BUFFER_EOF_PENDING   2
 
#define YY_CURRENT_BUFFER
 
#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]
 
#define YY_FLUSH_BUFFER   preYY_flush_buffer(YY_CURRENT_BUFFER )
 
#define yy_new_buffer   preYY_create_buffer
 
#define yy_set_interactive(is_interactive)
 
#define yy_set_bol(at_bol)
 
#define YY_AT_BOL()   (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
 
#define preYYwrap(n)   1
 
#define YY_SKIP_YYWRAP
 
#define yytext_ptr   preYYtext
 
#define YY_DO_BEFORE_ACTION
 
#define YY_NUM_RULES   187
 
#define YY_END_OF_BUFFER   188
 
#define YY_TRAILING_MASK   0x2000
 
#define YY_TRAILING_HEAD_MASK   0x4000
 
#define REJECT
 
#define yymore()   yymore_used_but_not_detected
 
#define YY_MORE_ADJ   0
 
#define YY_RESTORE_YY_MORE_OFFSET
 
#define YY_NO_UNISTD_H   1
 
#define DBG_CTX(x)   do { } while(0)
 
#define YY_INPUT(buf, result, max_size)   result=yyread(buf,max_size);
 
#define INITIAL   0
 
#define Start   1
 
#define Command   2
 
#define SkipCommand   3
 
#define SkipLine   4
 
#define SkipString   5
 
#define CopyLine   6
 
#define CopyString   7
 
#define Include   8
 
#define IncludeID   9
 
#define EndImport   10
 
#define DefName   11
 
#define DefineArg   12
 
#define DefineText   13
 
#define SkipCPPBlock   14
 
#define Ifdef   15
 
#define Ifndef   16
 
#define SkipCComment   17
 
#define ArgCopyCComment   18
 
#define CopyCComment   19
 
#define SkipVerbatim   20
 
#define SkipCPPComment   21
 
#define RemoveCComment   22
 
#define RemoveCPPComment   23
 
#define Guard   24
 
#define DefinedExpr1   25
 
#define DefinedExpr2   26
 
#define SkipDoubleQuote   27
 
#define SkipSingleQuote   28
 
#define UndefName   29
 
#define IgnoreLine   30
 
#define FindDefineArgs   31
 
#define ReadString   32
 
#define CondLineC   33
 
#define CondLineCpp   34
 
#define SkipCond   35
 
#define YY_EXTRA_TYPE   void *
 
#define YY_READ_BUF_SIZE   8192
 
#define ECHO   do { if (fwrite( preYYtext, preYYleng, 1, preYYout )) {} } while (0)
 
#define yyterminate()   return YY_NULL
 
#define YY_START_STACK_INCR   25
 
#define YY_FATAL_ERROR(msg)   yy_fatal_error( msg )
 
#define YY_DECL_IS_OURS   1
 
#define YY_DECL   int preYYlex (void)
 
#define YY_USER_ACTION
 
#define YY_BREAK   break;
 
#define YY_RULE_SETUP
 

Typedefs

typedef signed char flex_int8_t
 
typedef short int flex_int16_t
 
typedef int flex_int32_t
 
typedef unsigned char flex_uint8_t
 
typedef unsigned short int flex_uint16_t
 
typedef unsigned int flex_uint32_t
 
typedef struct yy_buffer_stateYY_BUFFER_STATE
 
typedef size_t yy_size_t
 
typedef unsigned char YY_CHAR
 
typedef int yy_state_type
 

Functions

void preYYrestart (FILE *input_file)
 
void preYY_switch_to_buffer (YY_BUFFER_STATE new_buffer)
 
YY_BUFFER_STATE preYY_create_buffer (FILE *file, int size)
 
void preYY_delete_buffer (YY_BUFFER_STATE b)
 
void preYY_flush_buffer (YY_BUFFER_STATE b)
 
void preYYpush_buffer_state (YY_BUFFER_STATE new_buffer)
 
void preYYpop_buffer_state (void)
 
static void preYYensure_buffer_stack (void)
 
static void preYY_load_buffer_state (void)
 
static void preYY_init_buffer (YY_BUFFER_STATE b, FILE *file)
 
YY_BUFFER_STATE preYY_scan_buffer (char *base, yy_size_t size)
 
YY_BUFFER_STATE preYY_scan_string (yyconst char *yy_str)
 
YY_BUFFER_STATE preYY_scan_bytes (yyconst char *bytes, int len)
 
void * preYYalloc (yy_size_t)
 
void * preYYrealloc (void *, yy_size_t)
 
void preYYfree (void *)
 
static yy_state_type yy_get_previous_state (void)
 
static yy_state_type yy_try_NUL_trans (yy_state_type current_state)
 
static int yy_get_next_buffer (void)
 
static void yy_fatal_error (yyconst char msg[])
 
static void setFileName (const char *name)
 
static void incrLevel ()
 
static void decrLevel ()
 
static bool otherCaseDone ()
 
static void setCaseDone (bool value)
 
static QDict< void > g_allIncludes (10009)
 
static FileStatecheckAndOpenFile (const QCString &fileName, bool &alreadyIncluded)
 
static FileStatefindFile (const char *fileName, bool localInclude, bool &alreadyIncluded)
 
static QCString extractTrailingComment (const char *s)
 
static int getNextChar (const QCString &expr, QCString *rest, uint &pos)
 
static int getCurrentChar (const QCString &expr, QCString *rest, uint pos)
 
static void unputChar (const QCString &expr, QCString *rest, uint &pos, char c)
 
static void expandExpression (QCString &expr, QCString *rest, int pos)
 
static QCString stringize (const QCString &s)
 
static void processConcatOperators (QCString &expr)
 
static void yyunput (int c, char *buf_ptr)
 
static void returnCharToStream (char c)
 
static void addTillEndOfString (const QCString &expr, QCString *rest, uint &pos, char term, QCString &arg)
 
static bool replaceFunctionMacro (const QCString &expr, QCString *rest, int pos, int &len, const Define *def, QCString &result)
 
static int getNextId (const QCString &expr, int p, int *l)
 
QCString removeIdsAndMarkers (const char *s)
 
QCString removeMarkers (const char *s)
 
bool computeExpression (const QCString &expr)
 
QCString expandMacro (const QCString &name)
 
DefinenewDefine ()
 
void addDefine ()
 
static void outputChar (char c)
 
static void outputArray (const char *a, int len)
 
static void readIncludeFile (const QCString &inc)
 
static void startCondSection (const char *sectId)
 
static void endCondSection ()
 
static void forceEndCondSection ()
 
static QCString escapeAt (const char *text)
 
static char resolveTrigraph (char c)
 
static int yyread (char *buf, int max_size)
 
static int yy_init_globals (void)
 
int preYYlex_destroy (void)
 
int preYYget_debug (void)
 
void preYYset_debug (int debug_flag)
 
YY_EXTRA_TYPE preYYget_extra (void)
 
void preYYset_extra (YY_EXTRA_TYPE user_defined)
 
FILE * preYYget_in (void)
 
void preYYset_in (FILE *in_str)
 
FILE * preYYget_out (void)
 
void preYYset_out (FILE *out_str)
 
int preYYget_leng (void)
 
char * preYYget_text (void)
 
int preYYget_lineno (void)
 
void preYYset_lineno (int line_number)
 
static int input (void)
 
int preYYlex (void)
 
 if (!(yy_init))
 
 while (1)
 

Variables

int preYYleng
 
FILE * preYYin = (FILE *) 0
 
FILE * preYYout = (FILE *) 0
 
static size_t yy_buffer_stack_top = 0
 
static size_t yy_buffer_stack_max = 0
 
static YY_BUFFER_STATEyy_buffer_stack = 0
 
static char yy_hold_char
 
static int yy_n_chars
 
static char * yy_c_buf_p = (char *) 0
 
static int yy_init = 0
 
static int yy_start = 0
 
static int yy_did_buffer_switch_on_eof
 
int preYYlineno = 1
 
char * preYYtext
 
static yyconst flex_int16_t yy_acclist [1399]
 
static yyconst flex_int16_t yy_accept [1317]
 
static yyconst flex_int32_t yy_ec [256]
 
static yyconst flex_int32_t yy_meta [61]
 
static yyconst flex_int16_t yy_base [1438]
 
static yyconst flex_int16_t yy_def [1438]
 
static yyconst flex_int16_t yy_nxt [6394]
 
static yyconst flex_int16_t yy_chk [6394]
 
int preYY_flex_debug = 0
 
static yy_state_typeyy_state_buf =0
 
static yy_state_typeyy_state_ptr =0
 
static char * yy_full_match
 
static int yy_lp
 
static int yy_looking_for_trail_begin = 0
 
static int yy_full_lp
 
static int * yy_full_state
 
static int g_yyLineNr = 1
 
static int g_yyMLines = 1
 
static int g_yyColNr = 1
 
static QCString g_yyFileName
 
static FileDefg_yyFileDef
 
static FileDefg_inputFileDef
 
static int g_ifcount = 0
 
static QStrListg_pathList = 0
 
static QStack< FileStateg_includeStack
 
static QDict< int > * g_argDict
 
static int g_defArgs = -1
 
static QCString g_defName
 
static QCString g_defText
 
static QCString g_defLitText
 
static QCString g_defArgsStr
 
static QCString g_defExtraSpacing
 
static bool g_defVarArgs
 
static int g_level
 
static int g_lastCContext
 
static int g_lastCPPContext
 
static QArray< int > g_levelGuard
 
static BufStrg_inputBuf
 
static int g_inputBufPos
 
static BufStrg_outputBuf
 
static int g_roundCount
 
static bool g_quoteArg
 
static DefineDictg_expandedDict
 
static int g_findDefArgContext
 
static bool g_expectGuard
 
static QCString g_guardName
 
static QCString g_lastGuardName
 
static QCString g_incName
 
static QCString g_guardExpr
 
static int g_curlyCount
 
static bool g_nospaces
 
static bool g_macroExpansion
 
static bool g_expandOnlyPredef
 
static int g_commentCount
 
static bool g_insideComment
 
static bool g_isImported
 
static QCString g_blockName
 
static int g_condCtx
 
static bool g_skip
 
static QStack< CondCtxg_condStack
 
static bool g_insideCS
 
static bool g_isSource
 
static bool g_lexInit = FALSE
 
static int g_fenceSize = 0
 
static bool g_ccomment
 
 YY_DECL
 
register char * yy_cp
 
register char * yy_bp
 
register int yy_act
 

Macro Definition Documentation

#define ArgCopyCComment   18

Definition at line 4287 of file pre.cpp.

#define BEGIN   (yy_start) = 1 + 2 *

Definition at line 144 of file pre.cpp.

#define Command   2

Definition at line 4271 of file pre.cpp.

#define CondLineC   33

Definition at line 4302 of file pre.cpp.

#define CondLineCpp   34

Definition at line 4303 of file pre.cpp.

#define CopyCComment   19

Definition at line 4288 of file pre.cpp.

#define CopyLine   6

Definition at line 4275 of file pre.cpp.

#define CopyString   7

Definition at line 4276 of file pre.cpp.

#define DBG_CTX (   x)    do { } while(0)

Definition at line 2569 of file pre.cpp.

#define DefineArg   12

Definition at line 4281 of file pre.cpp.

#define DefinedExpr1   25

Definition at line 4294 of file pre.cpp.

#define DefinedExpr2   26

Definition at line 4295 of file pre.cpp.

#define DefineText   13

Definition at line 4282 of file pre.cpp.

#define DefName   11

Definition at line 4280 of file pre.cpp.

#define ECHO   do { if (fwrite( preYYtext, preYYleng, 1, preYYout )) {} } while (0)

Definition at line 4391 of file pre.cpp.

#define EndImport   10

Definition at line 4279 of file pre.cpp.

#define EOB_ACT_CONTINUE_SCAN   0

Definition at line 179 of file pre.cpp.

#define EOB_ACT_END_OF_FILE   1

Definition at line 180 of file pre.cpp.

#define EOB_ACT_LAST_MATCH   2

Definition at line 181 of file pre.cpp.

#define FindDefineArgs   31

Definition at line 4300 of file pre.cpp.

#define FLEX_BETA

Definition at line 33 of file pre.cpp.

#define FLEX_SCANNER

Definition at line 28 of file pre.cpp.

#define FLEXINT_H

Definition at line 49 of file pre.cpp.

#define Guard   24

Definition at line 4293 of file pre.cpp.

#define Ifdef   15

Definition at line 4284 of file pre.cpp.

#define Ifndef   16

Definition at line 4285 of file pre.cpp.

#define IgnoreLine   30

Definition at line 4299 of file pre.cpp.

#define Include   8

Definition at line 4277 of file pre.cpp.

#define IncludeID   9

Definition at line 4278 of file pre.cpp.

#define INITIAL   0

Definition at line 4269 of file pre.cpp.

#define INT16_MAX   (32767)

Definition at line 92 of file pre.cpp.

#define INT16_MIN   (-32767-1)

Definition at line 83 of file pre.cpp.

#define INT32_MAX   (2147483647)

Definition at line 95 of file pre.cpp.

#define INT32_MIN   (-2147483647-1)

Definition at line 86 of file pre.cpp.

#define INT8_MAX   (127)

Definition at line 89 of file pre.cpp.

#define INT8_MIN   (-128)

Definition at line 80 of file pre.cpp.

#define preYYwrap (   n)    1

Definition at line 354 of file pre.cpp.

#define ReadString   32

Definition at line 4301 of file pre.cpp.

#define REJECT
Value:
{ \
*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ \
yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
(yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \
(yy_state_ptr) = (yy_full_state); /* restore orig. state */ \
yy_current_state = *(yy_state_ptr); /* restore curr. state */ \
++(yy_lp); \
goto find_rule; \
}
static yy_state_type * yy_state_ptr
Definition: pre.cpp:2486
register char * yy_cp
Definition: pre.cpp:4484
static int yy_lp
Definition: pre.cpp:2488
static char * yy_full_match
Definition: pre.cpp:2487
static int yy_full_lp
Definition: pre.cpp:2490
static int * yy_full_state
Definition: pre.cpp:2491
static char yy_hold_char
Definition: pre.cpp:292

Definition at line 2494 of file pre.cpp.

#define RemoveCComment   22

Definition at line 4291 of file pre.cpp.

#define RemoveCPPComment   23

Definition at line 4292 of file pre.cpp.

#define SkipCComment   17

Definition at line 4286 of file pre.cpp.

#define SkipCommand   3

Definition at line 4272 of file pre.cpp.

#define SkipCond   35

Definition at line 4304 of file pre.cpp.

#define SkipCPPBlock   14

Definition at line 4283 of file pre.cpp.

#define SkipCPPComment   21

Definition at line 4290 of file pre.cpp.

#define SkipDoubleQuote   27

Definition at line 4296 of file pre.cpp.

#define SkipLine   4

Definition at line 4273 of file pre.cpp.

#define SkipSingleQuote   28

Definition at line 4297 of file pre.cpp.

#define SkipString   5

Definition at line 4274 of file pre.cpp.

#define SkipVerbatim   20

Definition at line 4289 of file pre.cpp.

#define Start   1

Definition at line 4270 of file pre.cpp.

#define UINT16_MAX   (65535U)

Definition at line 101 of file pre.cpp.

#define UINT32_MAX   (4294967295U)

Definition at line 104 of file pre.cpp.

#define UINT8_MAX   (255U)

Definition at line 98 of file pre.cpp.

#define UndefName   29

Definition at line 4298 of file pre.cpp.

#define unput (   c)    yyunput( c, (yytext_ptr) )

Definition at line 199 of file pre.cpp.

#define YY_AT_BOL ( )    (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Definition at line 350 of file pre.cpp.

#define YY_BREAK   break;

Definition at line 4470 of file pre.cpp.

#define YY_BUF_SIZE   16384

Definition at line 163 of file pre.cpp.

#define YY_BUFFER_EOF_PENDING   2

Definition at line 266 of file pre.cpp.

#define YY_BUFFER_NEW   0

Definition at line 254 of file pre.cpp.

#define YY_BUFFER_NORMAL   1

Definition at line 255 of file pre.cpp.

#define yy_create_buffer   preYY_create_buffer

Definition at line 9 of file pre.cpp.

#define YY_CURRENT_BUFFER
Value:
: NULL)
static size_t yy_buffer_stack_top
Definition: pre.cpp:272
static YY_BUFFER_STATE * yy_buffer_stack
Definition: pre.cpp:274

Definition at line 282 of file pre.cpp.

#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]

Definition at line 289 of file pre.cpp.

#define YY_DECL   int preYYlex (void)

Definition at line 4458 of file pre.cpp.

#define YY_DECL_IS_OURS   1

Definition at line 4454 of file pre.cpp.

#define yy_delete_buffer   preYY_delete_buffer

Definition at line 10 of file pre.cpp.

#define YY_DO_BEFORE_ACTION
Value:
preYYleng = (size_t) (yy_cp - yy_bp); \
*yy_cp = '\0'; \
static char * yy_c_buf_p
Definition: pre.cpp:297
register char * yy_cp
Definition: pre.cpp:4484
int preYYleng
Definition: pre.cpp:294
register char * yy_bp
Definition: pre.cpp:4484
static char yy_hold_char
Definition: pre.cpp:292
#define yytext_ptr
Definition: pre.cpp:368

Definition at line 378 of file pre.cpp.

#define YY_END_OF_BUFFER   188

Definition at line 386 of file pre.cpp.

#define YY_END_OF_BUFFER_CHAR   0

Definition at line 159 of file pre.cpp.

#define YY_EXTRA_TYPE   void *

Definition at line 4315 of file pre.cpp.

#define YY_FATAL_ERROR (   msg)    yy_fatal_error( msg )

Definition at line 4445 of file pre.cpp.

#define yy_flex_debug   preYY_flex_debug

Definition at line 11 of file pre.cpp.

#define YY_FLEX_MAJOR_VERSION   2

Definition at line 29 of file pre.cpp.

#define YY_FLEX_MINOR_VERSION   5

Definition at line 30 of file pre.cpp.

#define YY_FLEX_SUBMINOR_VERSION   35

Definition at line 31 of file pre.cpp.

#define yy_flush_buffer   preYY_flush_buffer

Definition at line 13 of file pre.cpp.

#define YY_FLUSH_BUFFER   preYY_flush_buffer(YY_CURRENT_BUFFER )

Definition at line 318 of file pre.cpp.

#define yy_init_buffer   preYY_init_buffer

Definition at line 12 of file pre.cpp.

#define YY_INPUT (   buf,
  result,
  max_size 
)    result=yyread(buf,max_size);

Definition at line 4219 of file pre.cpp.

#define YY_INT_ALIGNED   short int

Definition at line 5 of file pre.cpp.

#define YY_LESS_LINENO (   n)

Definition at line 183 of file pre.cpp.

#define yy_load_buffer_state   preYY_load_buffer_state

Definition at line 14 of file pre.cpp.

#define YY_MORE_ADJ   0

Definition at line 2506 of file pre.cpp.

#define yy_new_buffer   preYY_create_buffer

Definition at line 328 of file pre.cpp.

#define YY_NEW_FILE   preYYrestart(preYYin )

Definition at line 157 of file pre.cpp.

#define YY_NO_UNISTD_H   1

Definition at line 2565 of file pre.cpp.

#define YY_NULL   0

Definition at line 131 of file pre.cpp.

#define YY_NUM_RULES   187

Definition at line 385 of file pre.cpp.

#define YY_READ_BUF_SIZE   8192

Definition at line 4383 of file pre.cpp.

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 2507 of file pre.cpp.

#define YY_RULE_SETUP
Value:
if ( preYYleng > 0 ) \
(preYYtext[preYYleng - 1] == '\n'); \
int preYYleng
Definition: pre.cpp:294
#define YY_USER_ACTION
Definition: pre.cpp:4465
char * preYYtext
Definition: pre.cpp:2508
#define YY_CURRENT_BUFFER_LVALUE
Definition: pre.cpp:289

Definition at line 4473 of file pre.cpp.

#define YY_SC_TO_UI (   c)    ((unsigned int) (unsigned char) c)

Definition at line 138 of file pre.cpp.

#define yy_set_bol (   at_bol)
Value:
{ \
preYYensure_buffer_stack (); \
preYY_create_buffer(preYYin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
FILE * preYYin
Definition: pre.cpp:359
#define YY_CURRENT_BUFFER_LVALUE
Definition: pre.cpp:289
#define YY_CURRENT_BUFFER
Definition: pre.cpp:282
if(!(yy_init))
Definition: pre.cpp:4492
#define YY_BUF_SIZE
Definition: pre.cpp:163

Definition at line 340 of file pre.cpp.

#define yy_set_interactive (   is_interactive)
Value:
{ \
preYYensure_buffer_stack (); \
preYY_create_buffer(preYYin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
FILE * preYYin
Definition: pre.cpp:359
#define YY_CURRENT_BUFFER_LVALUE
Definition: pre.cpp:289
#define YY_CURRENT_BUFFER
Definition: pre.cpp:282
if(!(yy_init))
Definition: pre.cpp:4492
#define YY_BUF_SIZE
Definition: pre.cpp:163

Definition at line 330 of file pre.cpp.

#define YY_SKIP_YYWRAP

Definition at line 355 of file pre.cpp.

#define YY_START   (((yy_start) - 1) / 2)

Definition at line 150 of file pre.cpp.

#define YY_START_STACK_INCR   25

Definition at line 4440 of file pre.cpp.

#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

Definition at line 168 of file pre.cpp.

#define YY_STATE_EOF (   state)    (YY_END_OF_BUFFER + state + 1)

Definition at line 154 of file pre.cpp.

#define YY_STRUCT_YY_BUFFER_STATE

Definition at line 207 of file pre.cpp.

#define yy_switch_to_buffer   preYY_switch_to_buffer

Definition at line 15 of file pre.cpp.

#define YY_TRAILING_HEAD_MASK   0x4000

Definition at line 2493 of file pre.cpp.

#define YY_TRAILING_MASK   0x2000

Definition at line 2492 of file pre.cpp.

#define YY_TYPEDEF_YY_BUFFER_STATE

Definition at line 171 of file pre.cpp.

#define YY_TYPEDEF_YY_SIZE_T

Definition at line 202 of file pre.cpp.

#define YY_USER_ACTION

Definition at line 4465 of file pre.cpp.

#define yyalloc   preYYalloc

Definition at line 24 of file pre.cpp.

#define yyconst

Definition at line 127 of file pre.cpp.

#define yyfree   preYYfree

Definition at line 26 of file pre.cpp.

#define yyin   preYYin

Definition at line 16 of file pre.cpp.

#define yyleng   preYYleng

Definition at line 17 of file pre.cpp.

#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up preYYtext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up preYYtext again */ \
} \
while ( 0 )
static char * yy_c_buf_p
Definition: pre.cpp:297
#define YY_DO_BEFORE_ACTION
Definition: pre.cpp:378
register char * yy_cp
Definition: pre.cpp:4484
#define YY_MORE_ADJ
Definition: pre.cpp:2506
std::void_t< T > n
register char * yy_bp
Definition: pre.cpp:4484
static char yy_hold_char
Definition: pre.cpp:292
#define YY_RESTORE_YY_MORE_OFFSET
Definition: pre.cpp:2507
while(1)
Definition: pre.cpp:4524

Definition at line 186 of file pre.cpp.

#define yylex   preYYlex

Definition at line 18 of file pre.cpp.

#define yylineno   preYYlineno

Definition at line 19 of file pre.cpp.

#define yymore ( )    yymore_used_but_not_detected

Definition at line 2505 of file pre.cpp.

#define yyout   preYYout

Definition at line 20 of file pre.cpp.

#define yyrealloc   preYYrealloc

Definition at line 25 of file pre.cpp.

#define yyrestart   preYYrestart

Definition at line 21 of file pre.cpp.

#define YYSTATE   YY_START

Definition at line 151 of file pre.cpp.

#define yyterminate ( )    return YY_NULL

Definition at line 4435 of file pre.cpp.

#define yytext   preYYtext

Definition at line 22 of file pre.cpp.

#define yytext_ptr   preYYtext

Definition at line 368 of file pre.cpp.

#define yywrap   preYYwrap

Definition at line 23 of file pre.cpp.

Typedef Documentation

typedef short int flex_int16_t

Definition at line 71 of file pre.cpp.

typedef int flex_int32_t

Definition at line 72 of file pre.cpp.

typedef signed char flex_int8_t

Definition at line 70 of file pre.cpp.

typedef unsigned short int flex_uint16_t

Definition at line 74 of file pre.cpp.

typedef unsigned int flex_uint32_t

Definition at line 75 of file pre.cpp.

typedef unsigned char flex_uint8_t

Definition at line 73 of file pre.cpp.

Definition at line 172 of file pre.cpp.

typedef unsigned char YY_CHAR

Definition at line 357 of file pre.cpp.

typedef size_t yy_size_t

Definition at line 203 of file pre.cpp.

typedef int yy_state_type

Definition at line 361 of file pre.cpp.

Function Documentation

void addDefine ( )

Definition at line 3902 of file pre.cpp.

3903 {
3904  if (g_skip) return; // do not add this define as it is inside a
3905  // conditional section (cond command) that is disabled.
3906  if (!Doxygen::gatherDefines) return;
3907 
3908  //printf("addDefine %s %s\n",g_defName.data(),g_defArgsStr.data());
3909  //ArgumentList *al = new ArgumentList;
3910  //stringToArgumentList(g_defArgsStr,al);
3911  MemberDef *md=new MemberDef(
3913  "#define",g_defName,g_defArgsStr,0,
3915  if (!g_defArgsStr.isEmpty())
3916  {
3917  ArgumentList *argList = new ArgumentList;
3918  //printf("addDefine() g_defName=`%s' g_defArgsStr=`%s'\n",g_defName.data(),g_defArgsStr.data());
3920  md->setArgumentList(argList);
3921  }
3922  //printf("Setting initializer for `%s' to `%s'\n",g_defName.data(),g_defText.data());
3923  int l=g_defLitText.find('\n');
3924  if (l>0 && g_defLitText.left(l).stripWhiteSpace()=="\\")
3925  {
3926  // strip first line if it only contains a slash
3928  }
3929  else if (l>0)
3930  {
3931  // align the items on the first line with the items on the second line
3932  int k=l+1;
3933  const char *p=g_defLitText.data()+k;
3934  char c;
3935  while ((c=*p++) && (c==' ' || c=='\t')) k++;
3937  }
3939 
3940  //printf("pre.l: md->setFileDef(%p)\n",g_inputFileDef);
3942  md->setDefinition("#define "+g_defName);
3943 
3945  if (mn==0)
3946  {
3947  mn = new MemberName(g_defName);
3949  }
3950  mn->append(md);
3951  if (g_yyFileDef)
3952  {
3954  }
3955 
3956  //Define *d;
3957  //if ((d=defineDict[g_defName])==0) defineDict.insert(g_defName,newDefine());
3958 }
static FileDef * g_inputFileDef
Definition: pre.cpp:2845
static MemberNameSDict * functionNameSDict
Definition: doxygen.h:116
void setArgumentList(ArgumentList *al)
Definition: memberdef.cpp:3876
void setDefinition(const char *d)
Definition: memberdef.cpp:4619
This class represents an function or template argument list.
Definition: arguments.h:82
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
static bool gatherDefines
Definition: doxygen.h:147
void insertMember(MemberDef *md)
Definition: filedef.cpp:1100
static QCString g_yyFileName
Definition: pre.cpp:2843
bool isEmpty() const
Definition: qcstring.h:189
static QCString g_defLitText
Definition: pre.cpp:2853
static QCString g_defArgsStr
Definition: pre.cpp:2854
static FileDef * g_yyFileDef
Definition: pre.cpp:2844
uint length() const
Definition: qcstring.h:195
void append(const type *d)
Definition: qlist.h:73
Definition: types.h:26
const bool FALSE
Definition: qglobal.h:370
QCString left(uint len) const
Definition: qcstring.cpp:213
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
void append(const char *key, const T *d)
Definition: sortdict.h:135
static QStrList * l
Definition: config.cpp:1044
Definition: types.h:29
static bool g_skip
Definition: pre.cpp:2883
static int g_yyColNr
Definition: pre.cpp:2842
static QCString g_defName
Definition: pre.cpp:2851
QCString right(uint len) const
Definition: qcstring.cpp:231
void stringToArgumentList(const char *argsString, ArgumentList *al, QCString *extraTypeChars)
Definition: defargs.cpp:2922
p
Definition: test.py:223
const char * data() const
Definition: qcstring.h:207
static int g_yyMLines
Definition: pre.cpp:2841
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
Definition: types.h:38
void setInitializer(const char *i)
Definition: memberdef.cpp:3470
void setFileDef(FileDef *fd)
Definition: memberdef.cpp:4624
T * find(const char *key)
Definition: sortdict.h:232
static int g_yyLineNr
Definition: pre.cpp:2840
static void addTillEndOfString ( const QCString expr,
QCString rest,
uint pos,
char  term,
QCString arg 
)
inlinestatic

Definition at line 3247 of file pre.cpp.

3249 {
3250  int cc;
3251  while ((cc=getNextChar(expr,rest,pos))!=EOF && cc!=0)
3252  {
3253  if (cc=='\\') arg+=(char)cc,cc=getNextChar(expr,rest,pos);
3254  else if (cc==term) return;
3255  arg+=(char)cc;
3256  }
3257 }
static int getNextChar(const QCString &expr, QCString *rest, uint &pos)
static FileState* checkAndOpenFile ( const QCString fileName,
bool alreadyIncluded 
)
static

Definition at line 2957 of file pre.cpp.

2958 {
2959  alreadyIncluded = FALSE;
2960  FileState *fs = 0;
2961  //printf("checkAndOpenFile(%s)\n",fileName.data());
2962  QFileInfo fi(fileName);
2963  if (fi.exists() && fi.isFile())
2964  {
2965  static QStrList &exclPatterns = Config_getList("EXCLUDE_PATTERNS");
2966  if (patternMatch(fi,&exclPatterns)) return 0;
2967 
2968  QCString absName = fi.absFilePath().utf8();
2969 
2970  // global guard
2971  if (g_curlyCount==0) // not #include inside { ... }
2972  {
2973  if (g_allIncludes.find(absName)!=0)
2974  {
2975  alreadyIncluded = TRUE;
2976  //printf(" already included 1\n");
2977  return 0; // already done
2978  }
2979  g_allIncludes.insert(absName,(void *)0x8);
2980  }
2981  // check include stack for absName
2982 
2983  QStack<FileState> tmpStack;
2984  g_includeStack.setAutoDelete(FALSE);
2985  while ((fs=g_includeStack.pop()))
2986  {
2987  if (fs->fileName==absName) alreadyIncluded=TRUE;
2988  tmpStack.push(fs);
2989  }
2990  while ((fs=tmpStack.pop()))
2991  {
2992  g_includeStack.push(fs);
2993  }
2994  g_includeStack.setAutoDelete(TRUE);
2995 
2996  if (alreadyIncluded)
2997  {
2998  //printf(" already included 2\n");
2999  return 0;
3000  }
3001  //printf("#include %s\n",absName.data());
3002 
3003  fs = new FileState(fi.size()+4096);
3004  alreadyIncluded = FALSE;
3005  if (!readInputFile(absName,fs->fileBuf))
3006  { // error
3007  //printf(" error reading\n");
3008  delete fs;
3009  fs=0;
3010  }
3011  else
3012  {
3013  fs->oldFileBuf = g_inputBuf;
3015  }
3016  }
3017  return fs;
3018 }
BufStr fileBuf
Definition: pre.cpp:2585
bool readInputFile(const char *fileName, BufStr &inBuf, bool filter, bool isSourceCode)
read a file name fileName and optionally filter and transcode it
Definition: util.cpp:7673
const bool FALSE
Definition: qglobal.h:370
static constexpr double fs
Definition: Units.h:100
Definition: qstack.h:46
#define Config_getList(val)
Definition: config.cpp:662
void push(const type *d)
Definition: qstack.h:58
QCString fileName
Definition: pre.cpp:2589
int oldFileBufPos
Definition: pre.cpp:2587
static QStack< FileState > g_includeStack
Definition: pre.cpp:2848
static QDict< void > g_allIncludes(10009)
BufStr * oldFileBuf
Definition: pre.cpp:2586
type * pop()
Definition: qstack.h:59
static BufStr * g_inputBuf
Definition: pre.cpp:2861
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:51
bool patternMatch(const QFileInfo &fi, const QStrList *patList)
Definition: util.cpp:7784
static int g_curlyCount
Definition: pre.cpp:2873
const bool TRUE
Definition: qglobal.h:371
static int g_inputBufPos
Definition: pre.cpp:2862
bool computeExpression ( const QCString expr)

compute the value of the expression in string expr. If needed the function may read additional characters from the input.

Definition at line 3857 of file pre.cpp.

3858 {
3859  QCString e=expr;
3860  expandExpression(e,0,0);
3861  //printf("after expansion `%s'\n",e.data());
3862  e = removeIdsAndMarkers(e);
3863  if (e.isEmpty()) return FALSE;
3864  //printf("parsing `%s'\n",e.data());
3866 }
static QCString g_yyFileName
Definition: pre.cpp:2843
bool isEmpty() const
Definition: qcstring.h:189
static void expandExpression(QCString &expr, QCString *rest, int pos)
Definition: pre.cpp:3565
const bool FALSE
Definition: qglobal.h:370
const double e
bool parseconstexp(const char *fileName, int lineNr, const QCString &s)
Definition: constexp.cpp:1986
QCString removeIdsAndMarkers(const char *s)
Definition: pre.cpp:3660
static int g_yyLineNr
Definition: pre.cpp:2840
static void decrLevel ( )
static

Definition at line 2923 of file pre.cpp.

2924 {
2925  //printf("%s line %d: decrLevel %d\n",g_yyFileName.data(),g_yyLineNr,g_level);
2926  if (g_level > 0)
2927  {
2928  g_level--;
2929  g_levelGuard.resize(g_level);
2930  }
2931  else
2932  {
2933  warn(g_yyFileName,g_yyLineNr,"More #endif's than #if's found.\n");
2934  }
2935 }
static QCString g_yyFileName
Definition: pre.cpp:2843
static int g_level
Definition: pre.cpp:2857
void warn(const char *file, int line, const char *fmt,...)
Definition: message.cpp:183
static QArray< int > g_levelGuard
Definition: pre.cpp:2860
static int g_yyLineNr
Definition: pre.cpp:2840
static void endCondSection ( )
static

Definition at line 4160 of file pre.cpp.

4161 {
4162  if (g_condStack.isEmpty())
4163  {
4164  g_skip=FALSE;
4165  }
4166  else
4167  {
4168  CondCtx *ctx = g_condStack.pop();
4169  g_skip=ctx->skip;
4170  delete ctx;
4171  }
4172  //printf("endCondSection: skip=%d stack=%d\n",g_skip,g_condStack.count());
4173 }
const bool FALSE
Definition: qglobal.h:370
static bool g_skip
Definition: pre.cpp:2883
static QStack< CondCtx > g_condStack
Definition: pre.cpp:2884
static QCString escapeAt ( const char *  text)
static

Definition at line 4184 of file pre.cpp.

4185 {
4186  QCString result;
4187  if (text)
4188  {
4189  char c;
4190  const char *p=text;
4191  while ((c=*p++))
4192  {
4193  if (c=='@') result+="@@"; else result+=c;
4194  }
4195  }
4196  return result;
4197 }
static QCString result
p
Definition: test.py:223
static void expandExpression ( QCString expr,
QCString rest,
int  pos 
)
static

preforms recursive macro expansion on the string expr starting at position pos. May read additional characters from the input while re-scanning! If expandAll is TRUE then all macros in the expression are expanded, otherwise only the first is expanded.

Definition at line 3565 of file pre.cpp.

3566 {
3567  //printf("expandExpression(%s,%s)\n",expr.data(),rest ? rest->data() : 0);
3568  QCString macroName;
3569  QCString expMacro;
3570  bool definedTest=FALSE;
3571  int i=pos,l,p,len;
3572  while ((p=getNextId(expr,i,&l))!=-1) // search for an macro name
3573  {
3574  bool replaced=FALSE;
3575  macroName=expr.mid(p,l);
3576  //printf("macroName=%s\n",macroName.data());
3577  if (p<2 || !(expr.at(p-2)=='@' && expr.at(p-1)=='-')) // no-rescan marker?
3578  {
3579  if (g_expandedDict->find(macroName)==0) // expand macro
3580  {
3581  Define *def=DefineManager::instance().isDefined(macroName);
3582  if (definedTest) // macro name was found after defined
3583  {
3584  if (def) expMacro = " 1 "; else expMacro = " 0 ";
3585  replaced=TRUE;
3586  len=l;
3587  definedTest=FALSE;
3588  }
3589  else if (def && def->nargs==-1) // simple macro
3590  {
3591  // substitute the definition of the macro
3592  //printf("macro `%s'->`%s'\n",macroName.data(),def->definition.data());
3593  if (g_nospaces)
3594  {
3595  expMacro=def->definition.stripWhiteSpace();
3596  }
3597  else
3598  {
3599  expMacro=" "+def->definition.stripWhiteSpace()+" ";
3600  }
3601  //expMacro=def->definition.stripWhiteSpace();
3602  replaced=TRUE;
3603  len=l;
3604  //printf("simple macro expansion=`%s'->`%s'\n",macroName.data(),expMacro.data());
3605  }
3606  else if (def && def->nargs>=0) // function macro
3607  {
3608  replaced=replaceFunctionMacro(expr,rest,p+l,len,def,expMacro);
3609  len+=l;
3610  }
3611  else if (macroName=="defined")
3612  {
3613  //printf("found defined inside macro definition '%s'\n",expr.right(expr.length()-p).data());
3614  definedTest=TRUE;
3615  }
3616 
3617  if (replaced) // expand the macro and rescan the expression
3618  {
3619 
3620  //printf("replacing `%s'->`%s'\n",expr.mid(p,len).data(),expMacro.data());
3621  QCString resultExpr=expMacro;
3622  QCString restExpr=expr.right(expr.length()-len-p);
3623  processConcatOperators(resultExpr);
3624  if (def && !def->nonRecursive)
3625  {
3626  g_expandedDict->insert(macroName,def);
3627  expandExpression(resultExpr,&restExpr,0);
3628  g_expandedDict->remove(macroName);
3629  }
3630  expr=expr.left(p)+resultExpr+restExpr;
3631  i=p;
3632  //printf("new expression: %s\n",expr.data());
3633  }
3634  else // move to the next macro name
3635  {
3636  //printf("moving to the next macro old=%d new=%d\n",i,p+l);
3637  i=p+l;
3638  }
3639  }
3640  else // move to the next macro name
3641  {
3642  expr=expr.left(p)+"@-"+expr.right(expr.length()-p);
3643  //printf("macro already expanded, moving to the next macro expr=%s\n",expr.data());
3644  i=p+l+2;
3645  //i=p+l;
3646  }
3647  }
3648  else // no re-scan marker found, skip the macro name
3649  {
3650  //printf("skipping marked macro\n");
3651  i=p+l;
3652  }
3653  }
3654 }
static bool replaceFunctionMacro(const QCString &expr, QCString *rest, int pos, int &len, const Define *def, QCString &result)
Definition: pre.cpp:3266
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
Define * isDefined(const char *name) const
Definition: pre.cpp:2742
static void expandExpression(QCString &expr, QCString *rest, int pos)
Definition: pre.cpp:3565
uint length() const
Definition: qcstring.h:195
static DefineDict * g_expandedDict
Definition: pre.cpp:2866
static void processConcatOperators(QCString &expr)
Definition: pre.cpp:3211
char & at(uint i) const
Definition: qcstring.h:326
bool nonRecursive
Definition: define.h:48
const bool FALSE
Definition: qglobal.h:370
static DefineManager & instance()
Definition: pre.cpp:2639
QCString left(uint len) const
Definition: qcstring.cpp:213
static int getNextId(const QCString &expr, int p, int *l)
Definition: pre.cpp:3505
static QStrList * l
Definition: config.cpp:1044
Definition: define.h:27
QCString right(uint len) const
Definition: qcstring.cpp:231
p
Definition: test.py:223
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
static bool g_nospaces
Definition: pre.cpp:2874
QCString definition
Definition: define.h:35
const bool TRUE
Definition: qglobal.h:371
int nargs
Definition: define.h:44
QCString expandMacro ( const QCString name)

expands the macro definition in name If needed the function may read additional characters from the input

Definition at line 3872 of file pre.cpp.

3873 {
3874  QCString n=name;
3875  expandExpression(n,0,0);
3876  n=removeMarkers(n);
3877  //printf("expandMacro `%s'->`%s'\n",name.data(),n.data());
3878  return n;
3879 }
static QCString name
Definition: declinfo.cpp:673
static void expandExpression(QCString &expr, QCString *rest, int pos)
Definition: pre.cpp:3565
std::void_t< T > n
QCString removeMarkers(const char *s)
Definition: pre.cpp:3774
static QCString extractTrailingComment ( const char *  s)
static

Definition at line 3083 of file pre.cpp.

3084 {
3085  if (s==0) return "";
3086  int i=strlen(s)-1;
3087  while (i>=0)
3088  {
3089  char c=s[i];
3090  switch (c)
3091  {
3092  case '/':
3093  {
3094  i--;
3095  if (i>=0 && s[i]=='*') // end of a comment block
3096  {
3097  i--;
3098  while (i>0 && !(s[i-1]=='/' && s[i]=='*')) i--;
3099  if (i==0)
3100  {
3101  i++;
3102  }
3103  // only /*!< or /**< are treated as a comment for the macro name,
3104  // otherwise the comment is treated as part of the macro definition
3105  return ((s[i+1]=='*' || s[i+1]=='!') && s[i+2]=='<') ? &s[i-1] : "";
3106  }
3107  else
3108  {
3109  return "";
3110  }
3111  }
3112  break;
3113  // whitespace or line-continuation
3114  case ' ':
3115  case '\t':
3116  case '\r':
3117  case '\n':
3118  case '\\':
3119  break;
3120  default:
3121  return "";
3122  }
3123  i--;
3124  }
3125  return "";
3126 }
static QCString * s
Definition: config.cpp:1042
static FileState* findFile ( const char *  fileName,
bool  localInclude,
bool alreadyIncluded 
)
static

Definition at line 3020 of file pre.cpp.

3021 {
3022  //printf("** findFile(%s,%d) g_yyFileName=%s\n",fileName,localInclude,g_yyFileName.data());
3024  {
3025  FileState *fs = checkAndOpenFile(fileName,alreadyIncluded);
3026  if (fs)
3027  {
3029  g_yyLineNr=1;
3030  return fs;
3031  }
3032  else if (alreadyIncluded)
3033  {
3034  return 0;
3035  }
3036  }
3037  if (localInclude && !g_yyFileName.isEmpty())
3038  {
3039  QFileInfo fi(g_yyFileName);
3040  if (fi.exists())
3041  {
3042  QCString absName = QCString(fi.dirPath(TRUE).data())+"/"+fileName;
3043  FileState *fs = checkAndOpenFile(absName,alreadyIncluded);
3044  if (fs)
3045  {
3046  setFileName(absName);
3047  g_yyLineNr=1;
3048  return fs;
3049  }
3050  else if (alreadyIncluded)
3051  {
3052  return 0;
3053  }
3054  }
3055  }
3056  if (g_pathList==0)
3057  {
3058  return 0;
3059  }
3060  char *s=g_pathList->first();
3061  while (s)
3062  {
3063  QCString absName = (QCString)s+"/"+fileName;
3064  //printf(" Looking for %s in %s\n",fileName,s);
3065  FileState *fs = checkAndOpenFile(absName,alreadyIncluded);
3066  if (fs)
3067  {
3068  setFileName(absName);
3069  g_yyLineNr=1;
3070  //printf(" -> found it\n");
3071  return fs;
3072  }
3073  else if (alreadyIncluded)
3074  {
3075  return 0;
3076  }
3077 
3078  s=g_pathList->next();
3079  }
3080  return 0;
3081 }
bool portable_isAbsolutePath(const char *fileName)
Definition: portable.cpp:434
static QCString g_yyFileName
Definition: pre.cpp:2843
bool isEmpty() const
Definition: qcstring.h:189
static QStrList * g_pathList
Definition: pre.cpp:2847
type * first()
Definition: qinternallist.h:87
static constexpr double fs
Definition: Units.h:100
fileName
Definition: dumpTree.py:9
static void setFileName(const char *name)
Definition: pre.cpp:2897
type * next()
Definition: qinternallist.h:89
static FileState * checkAndOpenFile(const QCString &fileName, bool &alreadyIncluded)
Definition: pre.cpp:2957
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:51
static QCString * s
Definition: config.cpp:1042
const bool TRUE
Definition: qglobal.h:371
static int g_yyLineNr
Definition: pre.cpp:2840
static void forceEndCondSection ( )
static

Definition at line 4175 of file pre.cpp.

4176 {
4177  while (!g_condStack.isEmpty())
4178  {
4179  delete g_condStack.pop();
4180  }
4181  g_skip=FALSE;
4182 }
const bool FALSE
Definition: qglobal.h:370
static bool g_skip
Definition: pre.cpp:2883
static QStack< CondCtx > g_condStack
Definition: pre.cpp:2884
static QDict<void> g_allIncludes ( 10009  )
static
static int getCurrentChar ( const QCString expr,
QCString rest,
uint  pos 
)
static
static int getNextChar ( const QCString expr,
QCString rest,
uint pos 
)
static
static int getNextId ( const QCString expr,
int  p,
int *  l 
)
static

returns the next identifier in string expr by starting at position p. The position of the identifier is returned (or -1 if nothing is found) and l is its length. Any quoted strings are skipping during the search.

Definition at line 3505 of file pre.cpp.

3506 {
3507  int n;
3508  while (p<(int)expr.length())
3509  {
3510  char c=expr.at(p++);
3511  if (isdigit(c)) // skip number
3512  {
3513  while (p<(int)expr.length() && isId(expr.at(p))) p++;
3514  }
3515  else if (isalpha(c) || c=='_') // read id
3516  {
3517  n=p-1;
3518  while (p<(int)expr.length() && isId(expr.at(p))) p++;
3519  *l=p-n;
3520  return n;
3521  }
3522  else if (c=='"') // skip string
3523  {
3524  char ppc=0,pc=c;
3525  if (p<(int)expr.length()) c=expr.at(p);
3526  while (p<(int)expr.length() && (c!='"' || (pc=='\\' && ppc!='\\')))
3527  // continue as long as no " is found, but ignoring \", but not \\"
3528  {
3529  ppc=pc;
3530  pc=c;
3531  c=expr.at(p);
3532  p++;
3533  }
3534  if (p<(int)expr.length()) ++p; // skip closing quote
3535  }
3536  else if (c=='/') // skip C Comment
3537  {
3538  //printf("Found C comment at p=%d\n",p);
3539  char pc=c;
3540  if (p<(int)expr.length())
3541  {
3542  c=expr.at(p);
3543  if (c=='*') // Start of C comment
3544  {
3545  p++;
3546  while (p<(int)expr.length() && !(pc=='*' && c=='/'))
3547  {
3548  pc=c;
3549  c=expr.at(p++);
3550  }
3551  }
3552  }
3553  //printf("Found end of C comment at p=%d\n",p);
3554  }
3555  }
3556  return -1;
3557 }
uint length() const
Definition: qcstring.h:195
char & at(uint i) const
Definition: qcstring.h:326
static QStrList * l
Definition: config.cpp:1044
std::void_t< T > n
p
Definition: test.py:223
bool isId(int c)
Definition: util.h:224
if ( yy_init)

Definition at line 4492 of file pre.cpp.

4493  {
4494  (yy_init) = 1;
4495 
4496 #ifdef YY_USER_INIT
4497  YY_USER_INIT;
4498 #endif
4499 
4500  /* Create the reject buffer large enough to save one state per allowed character. */
4501  if ( ! (yy_state_buf) )
4503  if ( ! (yy_state_buf) )
4504  YY_FATAL_ERROR( "out of dynamic memory in preYYlex()" );
4505 
4506  if ( ! (yy_start) )
4507  (yy_start) = 1; /* first start state */
4508 
4509  if ( ! preYYin )
4510  preYYin = stdin;
4511 
4512  if ( ! preYYout )
4513  preYYout = stdout;
4514 
4515  if ( ! YY_CURRENT_BUFFER ) {
4519  }
4520 
4522  }
FILE * preYYout
Definition: pre.cpp:359
YY_BUFFER_STATE preYY_create_buffer(FILE *file, int size)
#define YY_FATAL_ERROR(msg)
Definition: pre.cpp:4445
static yy_state_type * yy_state_buf
Definition: pre.cpp:2486
void * preYYalloc(yy_size_t)
int yy_state_type
Definition: code.cpp:361
static void preYY_load_buffer_state(void)
FILE * preYYin
Definition: pre.cpp:359
#define YY_STATE_BUF_SIZE
Definition: pre.cpp:168
static int yy_start
Definition: pre.cpp:299
#define YY_CURRENT_BUFFER_LVALUE
Definition: pre.cpp:289
static void preYYensure_buffer_stack(void)
static int yy_init
Definition: pre.cpp:298
#define YY_CURRENT_BUFFER
Definition: pre.cpp:282
#define YY_BUF_SIZE
Definition: pre.cpp:163
static void incrLevel ( )
static

Definition at line 2915 of file pre.cpp.

2916 {
2917  g_level++;
2918  g_levelGuard.resize(g_level);
2920  //printf("%s line %d: incrLevel %d\n",g_yyFileName.data(),g_yyLineNr,g_level);
2921 }
static int g_level
Definition: pre.cpp:2857
const bool FALSE
Definition: qglobal.h:370
static QArray< int > g_levelGuard
Definition: pre.cpp:2860
static int input ( void  )
static
Define* newDefine ( )

Definition at line 3881 of file pre.cpp.

3882 {
3883  Define *def=new Define;
3884  def->name = g_defName;
3886  def->nargs = g_defArgs;
3887  def->fileName = g_yyFileName;
3888  def->fileDef = g_yyFileDef;
3889  def->lineNr = g_yyLineNr-g_yyMLines;
3890  def->columnNr = g_yyColNr;
3891  def->varArgs = g_defVarArgs;
3892  //printf("newDefine: %s %s file: %s\n",def->name.data(),def->definition.data(),
3893  // def->fileDef ? def->fileDef->name().data() : def->fileName.data());
3894  //printf("newDefine: `%s'->`%s'\n",def->name.data(),def->definition.data());
3895  if (!def->name.isEmpty() && Doxygen::expandAsDefinedDict[def->name])
3896  {
3897  def->isPredefined=TRUE;
3898  }
3899  return def;
3900 }
int lineNr
Definition: define.h:42
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
static int g_defArgs
Definition: pre.cpp:2850
static QCString g_yyFileName
Definition: pre.cpp:2843
bool isEmpty() const
Definition: qcstring.h:189
static FileDef * g_yyFileDef
Definition: pre.cpp:2844
#define Define
Definition: scanner.cpp:11520
int columnNr
Definition: define.h:43
bool isPredefined
Definition: define.h:47
static QCString g_defText
Definition: pre.cpp:2852
static bool g_defVarArgs
Definition: pre.cpp:2856
static int g_yyColNr
Definition: pre.cpp:2842
static QCString g_defName
Definition: pre.cpp:2851
Definition: define.h:27
bool varArgs
Definition: define.h:46
QCString fileName
Definition: define.h:36
static int g_yyMLines
Definition: pre.cpp:2841
FileDef * fileDef
Definition: define.h:41
static QDict< void > expandAsDefinedDict
Definition: doxygen.h:127
QCString definition
Definition: define.h:35
const bool TRUE
Definition: qglobal.h:371
int nargs
Definition: define.h:44
QCString name
Definition: define.h:34
static int g_yyLineNr
Definition: pre.cpp:2840
static bool otherCaseDone ( )
static

Definition at line 2937 of file pre.cpp.

2938 {
2939  if (g_level==0)
2940  {
2941  warn(g_yyFileName,g_yyLineNr,"Found an #else without a preceding #if.\n");
2942  return TRUE;
2943  }
2944  else
2945  {
2946  return g_levelGuard[g_level-1];
2947  }
2948 }
static QCString g_yyFileName
Definition: pre.cpp:2843
static int g_level
Definition: pre.cpp:2857
void warn(const char *file, int line, const char *fmt,...)
Definition: message.cpp:183
static QArray< int > g_levelGuard
Definition: pre.cpp:2860
const bool TRUE
Definition: qglobal.h:371
static int g_yyLineNr
Definition: pre.cpp:2840
static void outputArray ( const char *  a,
int  len 
)
inlinestatic

Definition at line 3965 of file pre.cpp.

3966 {
3967  if (g_includeStack.isEmpty() || g_curlyCount>0) g_outputBuf->addArray(a,len);
3968 }
static BufStr * g_outputBuf
Definition: pre.cpp:2863
void addArray(const char *a, int len)
Definition: bufstr.h:47
const double a
static QStack< FileState > g_includeStack
Definition: pre.cpp:2848
static int g_curlyCount
Definition: pre.cpp:2873
static void outputChar ( char  c)
inlinestatic

Definition at line 3960 of file pre.cpp.

3961 {
3962  if (g_includeStack.isEmpty() || g_curlyCount>0) g_outputBuf->addChar(c);
3963 }
static BufStr * g_outputBuf
Definition: pre.cpp:2863
void addChar(char c)
Definition: bufstr.h:42
static QStack< FileState > g_includeStack
Definition: pre.cpp:2848
static int g_curlyCount
Definition: pre.cpp:2873
YY_BUFFER_STATE preYY_create_buffer ( FILE *  file,
int  size 
)
void preYY_delete_buffer ( YY_BUFFER_STATE  b)
void preYY_flush_buffer ( YY_BUFFER_STATE  b)
static void preYY_init_buffer ( YY_BUFFER_STATE  b,
FILE *  file 
)
static
static void preYY_load_buffer_state ( void  )
static
YY_BUFFER_STATE preYY_scan_buffer ( char *  base,
yy_size_t  size 
)
YY_BUFFER_STATE preYY_scan_bytes ( yyconst char *  bytes,
int  len 
)
YY_BUFFER_STATE preYY_scan_string ( yyconst char *  yy_str)
void preYY_switch_to_buffer ( YY_BUFFER_STATE  new_buffer)
void* preYYalloc ( yy_size_t  )
static void preYYensure_buffer_stack ( void  )
static
void preYYfree ( void *  )
int preYYget_debug ( void  )
YY_EXTRA_TYPE preYYget_extra ( void  )
FILE* preYYget_in ( void  )
int preYYget_leng ( void  )
int preYYget_lineno ( void  )
FILE* preYYget_out ( void  )
char* preYYget_text ( void  )
int preYYlex ( void  )
int preYYlex_destroy ( void  )
void preYYpop_buffer_state ( void  )
void preYYpush_buffer_state ( YY_BUFFER_STATE  new_buffer)
void* preYYrealloc ( void *  ,
yy_size_t   
)
void preYYrestart ( FILE *  input_file)
void preYYset_debug ( int  debug_flag)
void preYYset_extra ( YY_EXTRA_TYPE  user_defined)
void preYYset_in ( FILE *  in_str)
void preYYset_lineno ( int  line_number)
void preYYset_out ( FILE *  out_str)
static void processConcatOperators ( QCString expr)
static

Execute all ## operators in expr. If the macro name before or after the operator contains a no-rescan marker (-) then this is removed (before the concatenated macro name may be expanded again.

Definition at line 3211 of file pre.cpp.

3212 {
3213  //printf("processConcatOperators: in=`%s'\n",expr.data());
3214  QRegExp r("[ \\t\\n]*##[ \\t\\n]*");
3215  int l,n,i=0;
3216  if (expr.isEmpty()) return;
3217  while ((n=r.match(expr,i,&l))!=-1)
3218  {
3219  //printf("Match: `%s'\n",expr.data()+i);
3220  if (n+l+1<(int)expr.length() && expr.at(n+l)=='@' && expr.at(n+l+1)=='-')
3221  {
3222  // remove no-rescan marker after ID
3223  l+=2;
3224  }
3225  //printf("found `%s'\n",expr.mid(n,l).data());
3226  // remove the ## operator and the surrounding whitespace
3227  expr=expr.left(n)+expr.right(expr.length()-n-l);
3228  int k=n-1;
3229  while (k>=0 && isId(expr.at(k))) k--;
3230  if (k>0 && expr.at(k)=='-' && expr.at(k-1)=='@')
3231  {
3232  // remove no-rescan marker before ID
3233  expr=expr.left(k-1)+expr.right(expr.length()-k-1);
3234  n-=2;
3235  }
3236  i=n;
3237  }
3238  //printf("processConcatOperators: out=`%s'\n",expr.data());
3239 }
bool isEmpty() const
Definition: qcstring.h:189
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
uint length() const
Definition: qcstring.h:195
char & at(uint i) const
Definition: qcstring.h:326
QCString left(uint len) const
Definition: qcstring.cpp:213
static QStrList * l
Definition: config.cpp:1044
QCString right(uint len) const
Definition: qcstring.cpp:231
std::void_t< T > n
bool isId(int c)
Definition: util.h:224
static void readIncludeFile ( const QCString inc)
static

Definition at line 3970 of file pre.cpp.

3971 {
3972  static bool searchIncludes = Config_getBool("SEARCH_INCLUDES");
3973  uint i=0;
3974 
3975  // find the start of the include file name
3976  while (i<inc.length() &&
3977  (inc.at(i)==' ' || inc.at(i)=='"' || inc.at(i)=='<')
3978  ) i++;
3979  uint s=i;
3980 
3981  // was it a local include?
3982  bool localInclude = s>0 && inc.at(s-1)=='"';
3983 
3984  // find the end of the include file name
3985  while (i<inc.length() && inc.at(i)!='"' && inc.at(i)!='>') i++;
3986 
3987  if (s<inc.length() && i>s) // valid include file name found
3988  {
3989  // extract include path+name
3990  QCString incFileName=inc.mid(s,i-s).stripWhiteSpace();
3991 
3992  QCString dosExt = incFileName.right(4);
3993  if (dosExt==".exe" || dosExt==".dll" || dosExt==".tlb")
3994  {
3995  // skip imported binary files (e.g. M$ type libraries)
3996  return;
3997  }
3998 
3999  QCString oldFileName = g_yyFileName;
4000  FileDef *oldFileDef = g_yyFileDef;
4001  int oldLineNr = g_yyLineNr;
4002  //printf("Searching for `%s'\n",incFileName.data());
4003 
4004  // absIncFileName avoids difficulties for incFileName starting with "../" (bug 641336)
4005  QCString absIncFileName = incFileName;
4006  {
4007  QFileInfo fi(g_yyFileName);
4008  if (fi.exists())
4009  {
4010  QCString absName = QCString(fi.dirPath(TRUE).data())+"/"+incFileName;
4011  QFileInfo fi2(absName);
4012  if (fi2.exists())
4013  {
4014  absIncFileName=fi2.absFilePath().utf8();
4015  }
4016  else if (searchIncludes) // search in INCLUDE_PATH as well
4017  {
4018  QStrList &includePath = Config_getList("INCLUDE_PATH");
4019  char *s=includePath.first();
4020  while (s)
4021  {
4022  QFileInfo fi(s);
4023  if (fi.exists() && fi.isDir())
4024  {
4025  QCString absName = QCString(fi.absFilePath().utf8())+"/"+incFileName;
4026  //printf("trying absName=%s\n",absName.data());
4027  QFileInfo fi2(absName);
4028  if (fi2.exists())
4029  {
4030  absIncFileName=fi2.absFilePath().utf8();
4031  break;
4032  }
4033  //printf( "absIncFileName = %s\n", absIncFileName.data() );
4034  }
4035  s=includePath.next();
4036  }
4037  }
4038  //printf( "absIncFileName = %s\n", absIncFileName.data() );
4039  }
4040  }
4042  DefineManager::instance().addFileToContext(absIncFileName);
4043 
4044  // findFile will overwrite g_yyFileDef if found
4045  FileState *fs;
4046  bool alreadyIncluded = FALSE;
4047  //printf("calling findFile(%s)\n",incFileName.data());
4048  if ((fs=findFile(incFileName,localInclude,alreadyIncluded))) // see if the include file can be found
4049  {
4050  //printf("Found include file!\n");
4052  {
4053  for (i=0;i<g_includeStack.count();i++)
4054  {
4056  }
4057  //msg("#include %s: parsing...\n",incFileName.data());
4058  }
4059  if (oldFileDef)
4060  {
4061  // add include dependency to the file in which the #include was found
4062  bool ambig;
4063  // change to absolute name for bug 641336
4064  FileDef *incFd = findFileDef(Doxygen::inputNameDict,absIncFileName,ambig);
4065  oldFileDef->addIncludeDependency(ambig ? 0 : incFd,incFileName,localInclude,g_isImported,FALSE);
4066  // add included by dependency
4067  if (g_yyFileDef)
4068  {
4069  //printf("Adding include dependency %s->%s\n",oldFileDef->name().data(),incFileName.data());
4070  g_yyFileDef->addIncludedByDependency(oldFileDef,oldFileDef->docName(),localInclude,g_isImported);
4071  }
4072  }
4073  else if (g_inputFileDef)
4074  {
4075  g_inputFileDef->addIncludeDependency(0,absIncFileName,localInclude,g_isImported,TRUE);
4076  }
4078  fs->lineNr = oldLineNr;
4079  fs->fileName = oldFileName;
4080  // push the state on the stack
4081  g_includeStack.push(fs);
4082  // set the scanner to the include file
4083 
4084  // Deal with file changes due to
4085  // #include's within { .. } blocks
4086  QCString lineStr(g_yyFileName.length()+20);
4087  lineStr.sprintf("# 1 \"%s\" 1\n",g_yyFileName.data());
4088  outputArray(lineStr.data(),lineStr.length());
4089 
4090  DBG_CTX((stderr,"Switching to include file %s\n",incFileName.data()));
4092  g_inputBuf = &fs->fileBuf;
4093  g_inputBufPos=0;
4095  }
4096  else
4097  {
4098  //printf(" calling findFile(%s) alreadyInc=%d\n",incFileName.data(),alreadyIncluded);
4099  if (oldFileDef)
4100  {
4101  bool ambig;
4102  //QCString absPath = incFileName;
4103  //if (QDir::isRelativePath(incFileName))
4104  //{
4105  // absPath = QDir::cleanDirPath(oldFileDef->getPath()+"/"+incFileName);
4106  // //printf("%s + %s -> resolved path %s\n",oldFileDef->getPath().data(),incFileName.data(),absPath.data());
4107  //}
4108 
4109  // change to absolute name for bug 641336
4110  FileDef *fd = findFileDef(Doxygen::inputNameDict,absIncFileName,ambig);
4111  //printf("%s::findFileDef(%s)=%p\n",oldFileDef->name().data(),incFileName.data(),fd);
4112  // add include dependency to the file in which the #include was found
4113  oldFileDef->addIncludeDependency(ambig ? 0 : fd,incFileName,localInclude,g_isImported,FALSE);
4114  // add included by dependency
4115  if (fd)
4116  {
4117  //printf("Adding include dependency (2) %s->%s ambig=%d\n",oldFileDef->name().data(),fd->name().data(),ambig);
4118  fd->addIncludedByDependency(oldFileDef,oldFileDef->docName(),localInclude,g_isImported);
4119  }
4120  }
4121  else if (g_inputFileDef)
4122  {
4123  g_inputFileDef->addIncludeDependency(0,absIncFileName,localInclude,g_isImported,TRUE);
4124  }
4126  {
4127  if (alreadyIncluded)
4128  {
4129  Debug::print(Debug::Preprocessor,0,"#include %s: already included! skipping...\n",qPrint(incFileName));
4130  }
4131  else
4132  {
4133  Debug::print(Debug::Preprocessor,0,"#include %s: not found! skipping...\n",qPrint(incFileName));
4134  }
4135  //printf("error: include file %s not found\n",preYYtext);
4136  }
4137  if (g_curlyCount>0 && !alreadyIncluded) // failed to find #include inside { ... }
4138  {
4139  warn(g_yyFileName,g_yyLineNr,"include file %s not found, perhaps you forgot to add its directory to INCLUDE_PATH?",incFileName.data());
4140  }
4141  }
4142  }
4143 }
static FileDef * g_inputFileDef
Definition: pre.cpp:2845
YY_BUFFER_STATE preYY_create_buffer(FILE *file, int size)
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
BufStr fileBuf
Definition: pre.cpp:2585
static QCString g_yyFileName
Definition: pre.cpp:2843
static FileDef * g_yyFileDef
Definition: pre.cpp:2844
uint length() const
Definition: qcstring.h:195
type * first()
Definition: qinternallist.h:87
char & at(uint i) const
Definition: qcstring.h:326
const bool FALSE
Definition: qglobal.h:370
static constexpr double fs
Definition: Units.h:100
static DefineManager & instance()
Definition: pre.cpp:2639
#define Config_getList(val)
Definition: config.cpp:662
static FileNameDict * inputNameDict
Definition: doxygen.h:108
static FileState * findFile(const char *fileName, bool localInclude, bool &alreadyIncluded)
Definition: pre.cpp:3020
QCString fileName
Definition: pre.cpp:2589
YY_BUFFER_STATE bufState
Definition: pre.cpp:2588
void preYY_switch_to_buffer(YY_BUFFER_STATE new_buffer)
QCString right(uint len) const
Definition: qcstring.cpp:231
FileDef * findFileDef(const FileNameDict *fnDict, const char *n, bool &ambig)
Definition: util.cpp:4963
void addFileToContext(const char *fileName)
Definition: pre.cpp:2680
static void print(DebugMask mask, int prio, const char *fmt,...)
Definition: debug.cpp:84
static QStack< FileState > g_includeStack
Definition: pre.cpp:2848
const char * data() const
Definition: qcstring.h:207
static bool g_expectGuard
Definition: pre.cpp:2868
#define Config_getBool(val)
Definition: config.cpp:664
type * next()
Definition: qinternallist.h:89
void warn(const char *file, int line, const char *fmt,...)
Definition: message.cpp:183
static BufStr * g_inputBuf
Definition: pre.cpp:2861
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:27
static void outputArray(const char *a, int len)
Definition: pre.cpp:3965
void addIncludedByDependency(FileDef *fd, const char *incName, bool local, bool imported)
Definition: filedef.cpp:1366
void addIncludeDependency(FileDef *fd, const char *incName, bool local, bool imported, bool indirect)
Definition: filedef.cpp:1269
int lineNr
Definition: pre.cpp:2584
static bool isFlagSet(DebugMask mask)
Definition: debug.cpp:119
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:51
#define YY_CURRENT_BUFFER
Definition: pre.cpp:282
unsigned uint
Definition: qglobal.h:351
#define YY_BUF_SIZE
Definition: pre.cpp:163
const QCString & docName() const
Definition: filedef.h:99
static int g_curlyCount
Definition: pre.cpp:2873
static QCString * s
Definition: config.cpp:1042
const char * qPrint(const char *s)
Definition: qcstring.h:797
const bool TRUE
Definition: qglobal.h:371
static int g_inputBufPos
Definition: pre.cpp:2862
#define DBG_CTX(x)
Definition: pre.cpp:2569
void addInclude(const char *fromFileName, const char *toFileName)
Definition: pre.cpp:2727
static int g_yyLineNr
Definition: pre.cpp:2840
static bool g_isImported
Definition: pre.cpp:2880
QCString removeIdsAndMarkers ( const char *  s)

replaces all occurrences of @@ in s by @ and removes all occurrences of @E. All identifiers found are replaced by 0L

Definition at line 3660 of file pre.cpp.

3661 {
3662  //printf("removeIdsAndMarkers(%s)\n",s);
3663  const char *p=s;
3664  char c;
3665  bool inNum=FALSE;
3666  QCString result;
3667  if (p)
3668  {
3669  while ((c=*p))
3670  {
3671  if (c=='@') // replace @@ with @ and remove @E
3672  {
3673  if (*(p+1)=='@')
3674  {
3675  result+=c;
3676  }
3677  else if (*(p+1)=='E')
3678  {
3679  // skip
3680  }
3681  p+=2;
3682  }
3683  else if (isdigit(c)) // number
3684  {
3685  result+=c;
3686  p++;
3687  inNum=TRUE;
3688  }
3689  else if (c=='d' && !inNum) // identifier starting with a `d'
3690  {
3691  if (qstrncmp(p,"defined ",8)==0 || qstrncmp(p,"defined(",8)==0)
3692  // defined keyword
3693  {
3694  p+=7; // skip defined
3695  }
3696  else
3697  {
3698  result+="0L";
3699  p++;
3700  while ((c=*p) && isId(c)) p++;
3701  }
3702  }
3703  else if ((isalpha(c) || c=='_') && !inNum) // replace identifier with 0L
3704  {
3705  result+="0L";
3706  p++;
3707  while ((c=*p) && isId(c)) p++;
3708  if (*p=='(') // undefined function macro
3709  {
3710  p++;
3711  int count=1;
3712  while ((c=*p++))
3713  {
3714  if (c=='(') count++;
3715  else if (c==')')
3716  {
3717  count--;
3718  if (count==0) break;
3719  }
3720  else if (c=='/')
3721  {
3722  char pc=c;
3723  c=*++p;
3724  if (c=='*') // start of C comment
3725  {
3726  while (*p && !(pc=='*' && c=='/')) // search end of comment
3727  {
3728  pc=c;
3729  c=*++p;
3730  }
3731  p++;
3732  }
3733  }
3734  }
3735  }
3736  }
3737  else if (c=='/') // skip C comments
3738  {
3739  char pc=c;
3740  c=*++p;
3741  if (c=='*') // start of C comment
3742  {
3743  while (*p && !(pc=='*' && c=='/')) // search end of comment
3744  {
3745  pc=c;
3746  c=*++p;
3747  }
3748  p++;
3749  }
3750  else // oops, not comment but division
3751  {
3752  result+=pc;
3753  goto nextChar;
3754  }
3755  }
3756  else
3757  {
3758 nextChar:
3759  result+=c;
3760  char lc=tolower(c);
3761  if (!isId(lc) && lc!='.' /*&& lc!='-' && lc!='+'*/) inNum=FALSE;
3762  p++;
3763  }
3764  }
3765  }
3766  //printf("removeIdsAndMarkers(%s)=%s\n",s,result.data());
3767  return result;
3768 }
Q_EXPORT int qstrncmp(const char *str1, const char *str2, uint len)
Definition: qcstring.h:101
static QCString result
const bool FALSE
Definition: qglobal.h:370
p
Definition: test.py:223
bool isId(int c)
Definition: util.h:224
static QCString * s
Definition: config.cpp:1042
const bool TRUE
Definition: qglobal.h:371
QCString removeMarkers ( const char *  s)

replaces all occurrences of @ in s by @

assumption:
s only contains pairs of @'s

Definition at line 3774 of file pre.cpp.

3775 {
3776  const char *p=s;
3777  char c;
3778  QCString result;
3779  if (p)
3780  {
3781  while ((c=*p))
3782  {
3783  switch(c)
3784  {
3785  case '@': // replace @@ with @
3786  {
3787  if (*(p+1)=='@')
3788  {
3789  result+=c;
3790  }
3791  p+=2;
3792  }
3793  break;
3794  case '/': // skip C comments
3795  {
3796  result+=c;
3797  char pc=c;
3798  c=*++p;
3799  if (c=='*') // start of C comment
3800  {
3801  while (*p && !(pc=='*' && c=='/')) // search end of comment
3802  {
3803  if (*p=='@' && *(p+1)=='@')
3804  result+=c,p++;
3805  else
3806  result+=c;
3807  pc=c;
3808  c=*++p;
3809  }
3810  if (*p) result+=c,p++;
3811  }
3812  }
3813  break;
3814  case '"': // skip string literals
3815  {
3816  result+=c;
3817  char pc=c;
3818  c=*++p;
3819  while (*p && (c!='"' || pc=='\\')) // no end quote
3820  {
3821  result+=c;
3822  c=*++p;
3823  }
3824  if (*p) result+=c,p++;
3825  }
3826  break;
3827  case '\'': // skip char literals
3828  {
3829  result+=c;
3830  char pc=c;
3831  c=*++p;
3832  while (*p && (c!='\'' || pc=='\\')) // no end quote
3833  {
3834  result+=c;
3835  c=*++p;
3836  }
3837  if (*p) result+=c,p++;
3838  }
3839  break;
3840  default:
3841  {
3842  result+=c;
3843  p++;
3844  }
3845  break;
3846  }
3847  }
3848  }
3849  //printf("RemoveMarkers(%s)=%s\n",s,result.data());
3850  return result;
3851 }
static QCString result
p
Definition: test.py:223
static QCString * s
Definition: config.cpp:1042
static bool replaceFunctionMacro ( const QCString expr,
QCString rest,
int  pos,
int &  len,
const Define def,
QCString result 
)
static

replaces the function macro def whose argument list starts at pos in expression expr. Notice that this routine may scan beyond the expr string if needed. In that case the characters will be read from the input file. The replacement string will be returned in result and the length of the (unexpanded) argument list is stored in len.

Definition at line 3266 of file pre.cpp.

3267 {
3268  //printf("replaceFunctionMacro(expr=%s,rest=%s,pos=%d,def=%s) level=%d\n",expr.data(),rest ? rest->data() : 0,pos,def->name.data(),g_level);
3269  uint j=pos;
3270  len=0;
3271  result.resize(0);
3272  int cc;
3273  while ((cc=getCurrentChar(expr,rest,j))!=EOF && isspace(cc))
3274  {
3275  len++;
3276  getNextChar(expr,rest,j);
3277  }
3278  if (cc!='(')
3279  {
3280  unputChar(expr,rest,j,' ');
3281  return FALSE;
3282  }
3283  getNextChar(expr,rest,j); // eat the `(' character
3284 
3285  QDict<QCString> argTable; // list of arguments
3286  argTable.setAutoDelete(TRUE);
3287  QCString arg;
3288  int argCount=0;
3289  bool done=FALSE;
3290 
3291  // PHASE 1: read the macro arguments
3292  if (def->nargs==0)
3293  {
3294  while ((cc=getNextChar(expr,rest,j))!=EOF && cc!=0)
3295  {
3296  char c = (char)cc;
3297  if (c==')') break;
3298  }
3299  }
3300  else
3301  {
3302  while (!done && (argCount<def->nargs || def->varArgs) &&
3303  ((cc=getNextChar(expr,rest,j))!=EOF && cc!=0)
3304  )
3305  {
3306  char c=(char)cc;
3307  if (c=='(') // argument is a function => search for matching )
3308  {
3309  int level=1;
3310  arg+=c;
3311  //char term='\0';
3312  while ((cc=getNextChar(expr,rest,j))!=EOF && cc!=0)
3313  {
3314  char c=(char)cc;
3315  //printf("processing %c: term=%c (%d)\n",c,term,term);
3316  if (c=='\'' || c=='\"') // skip ('s and )'s inside strings
3317  {
3318  arg+=c;
3319  addTillEndOfString(expr,rest,j,c,arg);
3320  }
3321  if (c==')')
3322  {
3323  level--;
3324  arg+=c;
3325  if (level==0) break;
3326  }
3327  else if (c=='(')
3328  {
3329  level++;
3330  arg+=c;
3331  }
3332  else
3333  arg+=c;
3334  }
3335  }
3336  else if (c==')' || c==',') // last or next argument found
3337  {
3338  if (c==',' && argCount==def->nargs-1 && def->varArgs)
3339  {
3340  arg=arg.stripWhiteSpace();
3341  arg+=',';
3342  }
3343  else
3344  {
3345  QCString argKey;
3346  argKey.sprintf("@%d",argCount++); // key name
3347  arg=arg.stripWhiteSpace();
3348  // add argument to the lookup table
3349  argTable.insert(argKey, new QCString(arg));
3350  arg.resize(0);
3351  if (c==')') // end of the argument list
3352  {
3353  done=TRUE;
3354  }
3355  }
3356  }
3357  else if (c=='\"') // append literal strings
3358  {
3359  arg+=c;
3360  bool found=FALSE;
3361  while (!found && (cc=getNextChar(expr,rest,j))!=EOF && cc!=0)
3362  {
3363  found = cc=='"';
3364  if (cc=='\\')
3365  {
3366  c=(char)cc;
3367  arg+=c;
3368  if ((cc=getNextChar(expr,rest,j))==EOF || cc==0) break;
3369  }
3370  c=(char)cc;
3371  arg+=c;
3372  }
3373  }
3374  else if (c=='\'') // append literal characters
3375  {
3376  arg+=c;
3377  bool found=FALSE;
3378  while (!found && (cc=getNextChar(expr,rest,j))!=EOF && cc!=0)
3379  {
3380  found = cc=='\'';
3381  if (cc=='\\')
3382  {
3383  c=(char)cc;
3384  arg+=c;
3385  if ((cc=getNextChar(expr,rest,j))==EOF || cc==0) break;
3386  }
3387  c=(char)cc;
3388  arg+=c;
3389  }
3390  }
3391  else // append other characters
3392  {
3393  arg+=c;
3394  }
3395  }
3396  }
3397 
3398  // PHASE 2: apply the macro function
3399  if (argCount==def->nargs || // same number of arguments
3400  (argCount>=def->nargs-1 && def->varArgs)) // variadic macro with at least as many
3401  // params as the non-variadic part (see bug731985)
3402  {
3403  uint k=0;
3404  // substitution of all formal arguments
3405  QCString resExpr;
3406  const QCString d=def->definition.stripWhiteSpace();
3407  //printf("Macro definition: %s\n",d.data());
3408  bool inString=FALSE;
3409  while (k<d.length())
3410  {
3411  if (d.at(k)=='@') // maybe a marker, otherwise an escaped @
3412  {
3413  if (d.at(k+1)=='@') // escaped @ => copy it (is unescaped later)
3414  {
3415  k+=2;
3416  resExpr+="@@"; // we unescape these later
3417  }
3418  else if (d.at(k+1)=='-') // no-rescan marker
3419  {
3420  k+=2;
3421  resExpr+="@-";
3422  }
3423  else // argument marker => read the argument number
3424  {
3425  QCString key="@";
3426  QCString *subst=0;
3427  bool hash=FALSE;
3428  int l=k-1;
3429  // search for ## backward
3430  if (l>=0 && d.at(l)=='"') l--;
3431  while (l>=0 && d.at(l)==' ') l--;
3432  if (l>0 && d.at(l)=='#' && d.at(l-1)=='#') hash=TRUE;
3433  k++;
3434  // scan the number
3435  while (k<d.length() && d.at(k)>='0' && d.at(k)<='9') key+=d.at(k++);
3436  if (!hash)
3437  {
3438  // search for ## forward
3439  l=k;
3440  if (l<(int)d.length() && d.at(l)=='"') l++;
3441  while (l<(int)d.length() && d.at(l)==' ') l++;
3442  if (l<(int)d.length()-1 && d.at(l)=='#' && d.at(l+1)=='#') hash=TRUE;
3443  }
3444  //printf("request key %s result %s\n",key.data(),argTable[key]->data());
3445  if (key.length()>1 && (subst=argTable[key]))
3446  {
3447  QCString substArg=*subst;
3448  //printf("substArg=`%s'\n",substArg.data());
3449  // only if no ## operator is before or after the argument
3450  // marker we do macro expansion.
3451  if (!hash) expandExpression(substArg,0,0);
3452  if (inString)
3453  {
3454  //printf("`%s'=stringize(`%s')\n",stringize(*subst).data(),subst->data());
3455 
3456  // if the marker is inside a string (because a # was put
3457  // before the macro name) we must escape " and \ characters
3458  resExpr+=stringize(substArg);
3459  }
3460  else
3461  {
3462  if (hash && substArg.isEmpty())
3463  {
3464  resExpr+="@E"; // empty argument will be remove later on
3465  }
3466  else if (g_nospaces)
3467  {
3468  resExpr+=substArg;
3469  }
3470  else
3471  {
3472  resExpr+=" "+substArg+" ";
3473  }
3474  }
3475  }
3476  }
3477  }
3478  else // no marker, just copy
3479  {
3480  if (!inString && d.at(k)=='\"')
3481  {
3482  inString=TRUE; // entering a literal string
3483  }
3484  else if (inString && d.at(k)=='\"' && (d.at(k-1)!='\\' || d.at(k-2)=='\\'))
3485  {
3486  inString=FALSE; // leaving a literal string
3487  }
3488  resExpr+=d.at(k++);
3489  }
3490  }
3491  len=j-pos;
3492  result=resExpr;
3493  //printf("result after substitution `%s' expr=`%s'\n",
3494  // result.data(),expr.mid(pos,len).data());
3495  return TRUE;
3496  }
3497  return FALSE;
3498 }
bool resize(uint newlen)
Definition: qcstring.h:225
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
bool isEmpty() const
Definition: qcstring.h:189
static QCString stringize(const QCString &s)
Definition: pre.cpp:3133
static void expandExpression(QCString &expr, QCString *rest, int pos)
Definition: pre.cpp:3565
uint length() const
Definition: qcstring.h:195
char & at(uint i) const
Definition: qcstring.h:326
const bool FALSE
Definition: qglobal.h:370
static QStrList * l
Definition: config.cpp:1044
def key(type, name=None)
Definition: graph.py:13
static int getNextChar(const QCString &expr, QCString *rest, uint &pos)
static void addTillEndOfString(const QCString &expr, QCString *rest, uint &pos, char term, QCString &arg)
Definition: pre.cpp:3247
bool varArgs
Definition: define.h:46
QCString & insert(uint index, const char *s)
Definition: qcstring.cpp:355
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:27
static void unputChar(const QCString &expr, QCString *rest, uint &pos, char c)
static bool g_nospaces
Definition: pre.cpp:2874
unsigned uint
Definition: qglobal.h:351
QCString definition
Definition: define.h:35
const bool TRUE
Definition: qglobal.h:371
static int getCurrentChar(const QCString &expr, QCString *rest, uint pos)
int nargs
Definition: define.h:44
static char resolveTrigraph ( char  c)
static

Definition at line 4199 of file pre.cpp.

4200 {
4201  switch (c)
4202  {
4203  case '=': return '#';
4204  case '/': return '\\';
4205  case '\'': return '^';
4206  case '(': return '[';
4207  case ')': return ']';
4208  case '!': return '|';
4209  case '<': return '{';
4210  case '>': return '}';
4211  case '-': return '~';
4212  }
4213  return '?';
4214 }
static void returnCharToStream ( char  c)
static

Definition at line 3242 of file pre.cpp.

3243 {
3244  unput(c);
3245 }
#define unput(c)
Definition: pre.cpp:199
static void setCaseDone ( bool  value)
static

Definition at line 2950 of file pre.cpp.

2951 {
2953 }
static int g_level
Definition: pre.cpp:2857
static QArray< int > g_levelGuard
Definition: pre.cpp:2860
static void setFileName ( const char *  name)
static

Definition at line 2897 of file pre.cpp.

2898 {
2899  bool ambig;
2900  QFileInfo fi(name);
2901  g_yyFileName=fi.absFilePath().utf8();
2903  if (g_yyFileDef==0) // if this is not an input file check if it is an
2904  // include file
2905  {
2907  }
2908  //printf("setFileName(%s) g_yyFileName=%s g_yyFileDef=%p\n",
2909  // name,g_yyFileName.data(),g_yyFileDef);
2913 }
static QCString name
Definition: declinfo.cpp:673
static QCString g_yyFileName
Definition: pre.cpp:2843
static bool g_insideCS
Definition: pre.cpp:2885
static FileDef * g_yyFileDef
Definition: pre.cpp:2844
static FileNameDict * includeNameDict
Definition: doxygen.h:105
int guessSection(const char *name)
Definition: util.cpp:315
static FileNameDict * inputNameDict
Definition: doxygen.h:108
virtual bool isReference() const
FileDef * findFileDef(const FileNameDict *fnDict, const char *n, bool &ambig)
Definition: util.cpp:4963
SrcLangExt getLanguageFromFileName(const QCString fileName)
Definition: util.cpp:7061
static bool g_isSource
Definition: pre.cpp:2886
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:51
static void startCondSection ( const char *  sectId)
static

Definition at line 4147 of file pre.cpp.

4148 {
4149  //printf("startCondSection: skip=%d stack=%d\n",g_skip,g_condStack.count());
4150  CondParser prs;
4151  bool expResult = prs.parse(g_yyFileName,g_yyLineNr,sectId);
4152  g_condStack.push(new CondCtx(g_yyLineNr,sectId,g_skip));
4153  if (!expResult)
4154  {
4155  g_skip=TRUE;
4156  }
4157  //printf(" expResult=%d skip=%d\n",expResult,g_skip);
4158 }
static QCString g_yyFileName
Definition: pre.cpp:2843
static bool g_skip
Definition: pre.cpp:2883
static QStack< CondCtx > g_condStack
Definition: pre.cpp:2884
bool parse(const char *fileName, int lineNr, const char *expr)
Definition: condparser.cpp:34
const bool TRUE
Definition: qglobal.h:371
static int g_yyLineNr
Definition: pre.cpp:2840
static QCString stringize ( const QCString s)
static

Definition at line 3133 of file pre.cpp.

3134 {
3135  QCString result;
3136  uint i=0;
3137  bool inString=FALSE;
3138  bool inChar=FALSE;
3139  char c,pc;
3140  while (i<s.length())
3141  {
3142  if (!inString && !inChar)
3143  {
3144  while (i<s.length() && !inString && !inChar)
3145  {
3146  c=s.at(i++);
3147  if (c=='"')
3148  {
3149  result+="\\\"";
3150  inString=TRUE;
3151  }
3152  else if (c=='\'')
3153  {
3154  result+=c;
3155  inChar=TRUE;
3156  }
3157  else
3158  {
3159  result+=c;
3160  }
3161  }
3162  }
3163  else if (inChar)
3164  {
3165  while (i<s.length() && inChar)
3166  {
3167  c=s.at(i++);
3168  if (c=='\'')
3169  {
3170  result+='\'';
3171  inChar=FALSE;
3172  }
3173  else if (c=='\\')
3174  {
3175  result+="\\\\";
3176  }
3177  else
3178  {
3179  result+=c;
3180  }
3181  }
3182  }
3183  else
3184  {
3185  pc=0;
3186  while (i<s.length() && inString)
3187  {
3188  char c=s.at(i++);
3189  if (c=='"')
3190  {
3191  result+="\\\"";
3192  inString= pc=='\\';
3193  }
3194  else if (c=='\\')
3195  result+="\\\\";
3196  else
3197  result+=c;
3198  pc=c;
3199  }
3200  }
3201  }
3202  //printf("stringize `%s'->`%s'\n",s.data(),result.data());
3203  return result;
3204 }
static QCString result
uint length() const
Definition: qcstring.h:195
char & at(uint i) const
Definition: qcstring.h:326
const bool FALSE
Definition: qglobal.h:370
unsigned uint
Definition: qglobal.h:351
const bool TRUE
Definition: qglobal.h:371
static void unputChar ( const QCString expr,
QCString rest,
uint pos,
char  c 
)
static
while ( )

Definition at line 4524 of file pre.cpp.

static void yy_fatal_error ( yyconst char  msg[])
static
static int yy_get_next_buffer ( void  )
static
static yy_state_type yy_get_previous_state ( void  )
static
static int yy_init_globals ( void  )
static
static yy_state_type yy_try_NUL_trans ( yy_state_type  current_state)
static
static int yyread ( char *  buf,
int  max_size 
)
static

Definition at line 4221 of file pre.cpp.

4222 {
4223  int bytesInBuf = g_inputBuf->curPos()-g_inputBufPos;
4224  int bytesToCopy = QMIN(max_size,bytesInBuf);
4225  memcpy(buf,g_inputBuf->data()+g_inputBufPos,bytesToCopy);
4226  g_inputBufPos+=bytesToCopy;
4227  return bytesToCopy;
4228 }
char * data() const
Definition: bufstr.h:81
uint curPos() const
Definition: bufstr.h:97
#define QMIN(a, b)
Definition: qglobal.h:391
static BufStr * g_inputBuf
Definition: pre.cpp:2861
static int g_inputBufPos
Definition: pre.cpp:2862
static void yyunput ( int  c,
char *  buf_ptr 
)
static

Variable Documentation

QDict<int>* g_argDict
static

Definition at line 2849 of file pre.cpp.

QCString g_blockName
static

Definition at line 2881 of file pre.cpp.

bool g_ccomment
static

Definition at line 2890 of file pre.cpp.

int g_commentCount
static

Definition at line 2878 of file pre.cpp.

int g_condCtx
static

Definition at line 2882 of file pre.cpp.

QStack<CondCtx> g_condStack
static

Definition at line 2884 of file pre.cpp.

int g_curlyCount
static

Definition at line 2873 of file pre.cpp.

int g_defArgs = -1
static

Definition at line 2850 of file pre.cpp.

QCString g_defArgsStr
static

Definition at line 2854 of file pre.cpp.

QCString g_defExtraSpacing
static

Definition at line 2855 of file pre.cpp.

QCString g_defLitText
static

Definition at line 2853 of file pre.cpp.

QCString g_defName
static

Definition at line 2851 of file pre.cpp.

QCString g_defText
static

Definition at line 2852 of file pre.cpp.

bool g_defVarArgs
static

Definition at line 2856 of file pre.cpp.

DefineDict* g_expandedDict
static

Definition at line 2866 of file pre.cpp.

bool g_expandOnlyPredef
static

Definition at line 2877 of file pre.cpp.

bool g_expectGuard
static

Definition at line 2868 of file pre.cpp.

int g_fenceSize = 0
static

Definition at line 2889 of file pre.cpp.

int g_findDefArgContext
static

Definition at line 2867 of file pre.cpp.

QCString g_guardExpr
static

Definition at line 2872 of file pre.cpp.

QCString g_guardName
static

Definition at line 2869 of file pre.cpp.

int g_ifcount = 0
static

Definition at line 2846 of file pre.cpp.

QStack<FileState> g_includeStack
static

Definition at line 2848 of file pre.cpp.

QCString g_incName
static

Definition at line 2871 of file pre.cpp.

BufStr* g_inputBuf
static

Definition at line 2861 of file pre.cpp.

int g_inputBufPos
static

Definition at line 2862 of file pre.cpp.

FileDef* g_inputFileDef
static

Definition at line 2845 of file pre.cpp.

bool g_insideComment
static

Definition at line 2879 of file pre.cpp.

bool g_insideCS
static

Definition at line 2885 of file pre.cpp.

bool g_isImported
static

Definition at line 2880 of file pre.cpp.

bool g_isSource
static

Definition at line 2886 of file pre.cpp.

int g_lastCContext
static

Definition at line 2858 of file pre.cpp.

int g_lastCPPContext
static

Definition at line 2859 of file pre.cpp.

QCString g_lastGuardName
static

Definition at line 2870 of file pre.cpp.

int g_level
static

Definition at line 2857 of file pre.cpp.

QArray<int> g_levelGuard
static

Definition at line 2860 of file pre.cpp.

bool g_lexInit = FALSE
static

Definition at line 2888 of file pre.cpp.

bool g_macroExpansion
static

Definition at line 2876 of file pre.cpp.

bool g_nospaces
static

Definition at line 2874 of file pre.cpp.

BufStr* g_outputBuf
static

Definition at line 2863 of file pre.cpp.

QStrList* g_pathList = 0
static

Definition at line 2847 of file pre.cpp.

bool g_quoteArg
static

Definition at line 2865 of file pre.cpp.

int g_roundCount
static

Definition at line 2864 of file pre.cpp.

bool g_skip
static

Definition at line 2883 of file pre.cpp.

int g_yyColNr = 1
static

Definition at line 2842 of file pre.cpp.

FileDef* g_yyFileDef
static

Definition at line 2844 of file pre.cpp.

QCString g_yyFileName
static

Definition at line 2843 of file pre.cpp.

int g_yyLineNr = 1
static

Definition at line 2840 of file pre.cpp.

int g_yyMLines = 1
static

Definition at line 2841 of file pre.cpp.

int preYY_flex_debug = 0

Definition at line 2484 of file pre.cpp.

FILE * preYYin = (FILE *) 0

Definition at line 359 of file pre.cpp.

int preYYleng

Definition at line 294 of file pre.cpp.

int preYYlineno = 1

Definition at line 365 of file pre.cpp.

FILE * preYYout = (FILE *) 0

Definition at line 359 of file pre.cpp.

char * preYYtext

Definition at line 2508 of file pre.cpp.

yyconst flex_int16_t yy_accept[1317]
static

Definition at line 552 of file pre.cpp.

yyconst flex_int16_t yy_acclist[1399]
static

Definition at line 394 of file pre.cpp.

register int yy_act

Definition at line 4485 of file pre.cpp.

yyconst flex_int16_t yy_base[1438]
static

Definition at line 743 of file pre.cpp.

register char * yy_bp

Definition at line 4484 of file pre.cpp.

YY_BUFFER_STATE* yy_buffer_stack = 0
static

Stack as an array.

Definition at line 274 of file pre.cpp.

size_t yy_buffer_stack_max = 0
static

capacity of stack.

Definition at line 273 of file pre.cpp.

size_t yy_buffer_stack_top = 0
static

index of top of stack.

Definition at line 272 of file pre.cpp.

char* yy_c_buf_p = (char *) 0
static

Definition at line 297 of file pre.cpp.

yyconst flex_int16_t yy_chk[6394]
static

Definition at line 1775 of file pre.cpp.

register char* yy_cp

Definition at line 4484 of file pre.cpp.

YY_DECL
Initial value:
{
register yy_state_type yy_current_state
int yy_state_type
Definition: code.cpp:361

The main scanner function which does all the work.

Definition at line 4482 of file pre.cpp.

yyconst flex_int16_t yy_def[1438]
static

Definition at line 905 of file pre.cpp.

int yy_did_buffer_switch_on_eof
static

Definition at line 304 of file pre.cpp.

yyconst flex_int32_t yy_ec[256]
static

Definition at line 701 of file pre.cpp.

int yy_full_lp
static

Definition at line 2490 of file pre.cpp.

char* yy_full_match
static

Definition at line 2487 of file pre.cpp.

int* yy_full_state
static

Definition at line 2491 of file pre.cpp.

char yy_hold_char
static

Definition at line 292 of file pre.cpp.

int yy_init = 0
static

Definition at line 298 of file pre.cpp.

int yy_looking_for_trail_begin = 0
static

Definition at line 2489 of file pre.cpp.

int yy_lp
static

Definition at line 2488 of file pre.cpp.

yyconst flex_int32_t yy_meta[61]
static
Initial value:
=
{ 0,
1, 2, 3, 4, 5, 6, 7, 1, 1, 8,
9, 10, 11, 12, 1, 11, 13, 14, 15, 15,
15, 1, 16, 17, 17, 1, 18, 19, 19, 1,
20, 1, 21, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 1, 1, 21, 1
}

Definition at line 733 of file pre.cpp.

int yy_n_chars
static

Definition at line 293 of file pre.cpp.

yyconst flex_int16_t yy_nxt[6394]
static

Definition at line 1067 of file pre.cpp.

int yy_start = 0
static

Definition at line 299 of file pre.cpp.

yy_state_type* yy_state_buf =0
static

Definition at line 2486 of file pre.cpp.

yy_state_type * yy_state_ptr =0
static

Definition at line 2486 of file pre.cpp.