Classes | Macros | Typedefs | Functions | Variables
code.cpp File Reference
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <assert.h>
#include <ctype.h>
#include <qregexp.h>
#include <qdir.h>
#include "entry.h"
#include "doxygen.h"
#include "message.h"
#include "outputlist.h"
#include "util.h"
#include "membername.h"
#include "searchindex.h"
#include "arguments.h"
#include "config.h"
#include "groupdef.h"
#include "classlist.h"
#include "filedef.h"
#include "filename.h"
#include "namespacedef.h"
#include "tooltip.h"

Go to the source code of this file.

Classes

struct  yy_buffer_state
 
struct  yy_trans_info
 
struct  ObjCCallCtx
 
class  VariableContext
 
class  VariableContext::Scope
 
class  CallContext
 
struct  CallContext::Ctx
 

Macros

#define YY_INT_ALIGNED   short int
 
#define yy_create_buffer   codeYY_create_buffer
 
#define yy_delete_buffer   codeYY_delete_buffer
 
#define yy_flex_debug   codeYY_flex_debug
 
#define yy_init_buffer   codeYY_init_buffer
 
#define yy_flush_buffer   codeYY_flush_buffer
 
#define yy_load_buffer_state   codeYY_load_buffer_state
 
#define yy_switch_to_buffer   codeYY_switch_to_buffer
 
#define yyin   codeYYin
 
#define yyleng   codeYYleng
 
#define yylex   codeYYlex
 
#define yylineno   codeYYlineno
 
#define yyout   codeYYout
 
#define yyrestart   codeYYrestart
 
#define yytext   codeYYtext
 
#define yywrap   codeYYwrap
 
#define yyalloc   codeYYalloc
 
#define yyrealloc   codeYYrealloc
 
#define yyfree   codeYYfree
 
#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   codeYYrestart(codeYYin )
 
#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   codeYY_flush_buffer(YY_CURRENT_BUFFER )
 
#define yy_new_buffer   codeYY_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 codeYYwrap(n)   1
 
#define YY_SKIP_YYWRAP
 
#define yytext_ptr   codeYYtext
 
#define YY_DO_BEFORE_ACTION
 
#define YY_NUM_RULES   214
 
#define YY_END_OF_BUFFER   215
 
#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 DBG_CTX(x)   do { } while(0)
 
#define YY_NO_UNISTD_H   1
 
#define CLASSBLOCK   (int *)4
 
#define SCOPEBLOCK   (int *)8
 
#define INNERBLOCK   (int *)12
 
#define YY_INPUT(buf, result, max_size)   result=yyread(buf,max_size);
 
#define INITIAL   0
 
#define SkipString   1
 
#define SkipStringS   2
 
#define SkipVerbString   3
 
#define SkipCPP   4
 
#define SkipComment   5
 
#define SkipCxxComment   6
 
#define RemoveSpecialCComment   7
 
#define StripSpecialCComment   8
 
#define Body   9
 
#define FuncCall   10
 
#define MemberCall   11
 
#define MemberCall2   12
 
#define SkipInits   13
 
#define ClassName   14
 
#define AlignAs   15
 
#define AlignAsEnd   16
 
#define PackageName   17
 
#define ClassVar   18
 
#define CppCliTypeModifierFollowup   19
 
#define Bases   20
 
#define SkipSharp   21
 
#define ReadInclude   22
 
#define TemplDecl   23
 
#define TemplCast   24
 
#define CallEnd   25
 
#define ObjCMethod   26
 
#define ObjCParams   27
 
#define ObjCParamType   28
 
#define ObjCCall   29
 
#define ObjCMName   30
 
#define ObjCSkipStr   31
 
#define OldStyleArgs   32
 
#define UsingName   33
 
#define RawString   34
 
#define InlineInit   35
 
#define YY_EXTRA_TYPE   void *
 
#define YY_READ_BUF_SIZE   8192
 
#define ECHO   do { if (fwrite( codeYYtext, codeYYleng, 1, codeYYout )) {} } 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 codeYYlex (void)
 
#define YY_USER_ACTION
 
#define YY_BREAK   break;
 
#define YY_RULE_SETUP
 
#define YY_EXIT_FAILURE   2
 
#define yyless(n)
 
#define YYTABLES_NAME   "yytables"
 

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 codeYYrestart (FILE *input_file)
 
void codeYY_switch_to_buffer (YY_BUFFER_STATE new_buffer)
 
YY_BUFFER_STATE codeYY_create_buffer (FILE *file, int size)
 
void codeYY_delete_buffer (YY_BUFFER_STATE b)
 
void codeYY_flush_buffer (YY_BUFFER_STATE b)
 
void codeYYpush_buffer_state (YY_BUFFER_STATE new_buffer)
 
void codeYYpop_buffer_state (void)
 
static void codeYYensure_buffer_stack (void)
 
static void codeYY_load_buffer_state (void)
 
static void codeYY_init_buffer (YY_BUFFER_STATE b, FILE *file)
 
YY_BUFFER_STATE codeYY_scan_buffer (char *base, yy_size_t size)
 
YY_BUFFER_STATE codeYY_scan_string (yyconst char *yy_str)
 
YY_BUFFER_STATE codeYY_scan_bytes (yyconst char *bytes, int len)
 
void * codeYYalloc (yy_size_t)
 
void * codeYYrealloc (void *, yy_size_t)
 
void codeYYfree (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 saveObjCContext ()
 
static void restoreObjCContext ()
 
static void pushScope (const char *s)
 
static void popScope ()
 
static void setCurrentDoc (const QCString &anchor)
 
static void addToSearchIndex (const char *text)
 
static void setClassScope (const QCString &name)
 
static void startCodeLine ()
 
static void endFontClass ()
 
static void startFontClass (const char *s)
 
static void endCodeLine ()
 
static void nextCodeLine ()
 
static void codifyLines (const char *text)
 
static void writeMultiLineCodeLink (CodeOutputInterface &ol, Definition *d, const char *text)
 
static void addType ()
 
static void addParmType ()
 
static void addUsingDirective (const char *name)
 
static void setParameterList (MemberDef *md)
 
static ClassDefstripClassName (const char *s, Definition *d=g_currentDefinition)
 
static MemberDefsetCallContextForVar (const QCString &name)
 
static void updateCallContextForSmartPointer ()
 
static bool getLinkInScope (const QCString &c, const QCString &m, const char *memberText, CodeOutputInterface &ol, const char *text, bool varOnly=FALSE)
 
static bool getLink (const char *className, const char *memberName, CodeOutputInterface &ol, const char *text=0, bool varOnly=FALSE)
 
static void generateClassOrGlobalLink (CodeOutputInterface &ol, const char *clName, bool typeOnly=FALSE, bool varOnly=FALSE)
 
static bool generateClassMemberLink (CodeOutputInterface &ol, MemberDef *xmd, const char *memName)
 
static bool generateClassMemberLink (CodeOutputInterface &ol, Definition *def, const char *memName)
 
static void generateMemberLink (CodeOutputInterface &ol, const QCString &varName, char *memName)
 
static void generatePHPVariableLink (CodeOutputInterface &ol, const char *varName)
 
static void generateFunctionLink (CodeOutputInterface &ol, const char *funcName)
 
static int countLines ()
 
static void writeObjCMethodCall (ObjCCallCtx *ctx)
 
static QCString escapeName (const char *s)
 
static QCString escapeObject (const char *s)
 
static QCString escapeWord (const char *s)
 
static int yyread (char *buf, int max_size)
 
static int yy_init_globals (void)
 
int codeYYlex_destroy (void)
 
int codeYYget_debug (void)
 
void codeYYset_debug (int debug_flag)
 
YY_EXTRA_TYPE codeYYget_extra (void)
 
void codeYYset_extra (YY_EXTRA_TYPE user_defined)
 
FILE * codeYYget_in (void)
 
void codeYYset_in (FILE *in_str)
 
FILE * codeYYget_out (void)
 
void codeYYset_out (FILE *out_str)
 
int codeYYget_leng (void)
 
char * codeYYget_text (void)
 
int codeYYget_lineno (void)
 
void codeYYset_lineno (int line_number)
 
static void yyunput (int c, char *buf_ptr)
 
static int input (void)
 
int codeYYlex (void)
 
 if (!(yy_init))
 
 while (1)
 
static void yyunput (int c, register char *yy_bp)
 
static void yy_fatal_error (yyconst char *msg)
 
void resetCCodeParserState ()
 
void parseCCode (CodeOutputInterface &od, const char *className, const QCString &s, SrcLangExt lang, bool exBlock, const char *exName, FileDef *fd, int startLine, int endLine, bool inlineFragment, MemberDef *memberDef, bool showLineNumbers, Definition *searchCtx, bool collectXRefs)
 
void codeFreeScanner ()
 

Variables

int codeYYleng
 
FILE * codeYYin = (FILE *) 0
 
FILE * codeYYout = (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 codeYYlineno = 1
 
char * codeYYtext
 
static yyconst flex_int16_t yy_acclist [6690]
 
static yyconst flex_int16_t yy_accept [3538]
 
static yyconst flex_int32_t yy_ec [256]
 
static yyconst flex_int32_t yy_meta [85]
 
static yyconst flex_int32_t yy_base [4112]
 
static yyconst flex_int16_t yy_def [4112]
 
static yyconst flex_int16_t yy_nxt [36458]
 
static yyconst flex_int16_t yy_chk [36458]
 
int codeYY_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 CodeOutputInterfaceg_code
 
static ClassSDictg_codeClassSDict = 0
 
static QCString g_curClassName
 
static QStrList g_curClassBases
 
static QCString g_parmType
 
static QCString g_parmName
 
static const char * g_inputString
 the code fragment as text More...
 
static int g_inputPosition
 read offset during parsing More...
 
static int g_inputLines
 number of line in the code fragment More...
 
static int g_yyLineNr
 current line number More...
 
static int g_yyColNr
 current column number More...
 
static bool g_needsTermination
 
static bool g_exampleBlock
 
static QCString g_exampleName
 
static QCString g_exampleFile
 
static bool g_insideTemplate = FALSE
 
static QCString g_type
 
static QCString g_name
 
static QCString g_args
 
static QCString g_classScope
 
static QCString g_realScope
 
static QStack< int > g_scopeStack
 1 if bracket starts a scope, More...
 
static int g_anchorCount
 
static FileDefg_sourceFileDef
 
static bool g_lineNumbers
 
static Definitiong_currentDefinition
 
static MemberDefg_currentMemberDef
 
static bool g_includeCodeFragment
 
static const char * g_currentFontClass
 
static bool g_searchingForBody
 
static bool g_insideBody
 
static int g_bodyCurlyCount
 
static QCString g_saveName
 
static QCString g_saveType
 
static QCString g_delimiter
 
static int g_bracketCount = 0
 
static int g_curlyCount = 0
 
static int g_sharpCount = 0
 
static bool g_inFunctionTryBlock = FALSE
 
static bool g_inForEachExpression = FALSE
 
static int g_lastTemplCastContext
 
static int g_lastSpecialCContext
 
static int g_lastStringContext
 
static int g_lastSkipCppContext
 
static int g_lastVerbStringContext
 
static int g_memCallContext
 
static int g_lastCContext
 
static int g_skipInlineInitContext
 
static bool g_insideObjC
 
static bool g_insideJava
 
static bool g_insideCS
 
static bool g_insidePHP
 
static bool g_insideProtocolList
 
static bool g_lexInit = FALSE
 
static QStack< int > g_classScopeLengthStack
 
static Definitiong_searchCtx
 
static bool g_collectXRefs
 
static ObjCCallCtxg_currentCtx =0
 
static int g_currentCtxId =0
 
static int g_currentNameId =0
 
static int g_currentObjId =0
 
static int g_currentWordId =0
 
static QStack< ObjCCallCtxg_contextStack
 
static QIntDict< ObjCCallCtxg_contextDict
 
static QIntDict< QCStringg_nameDict
 
static QIntDict< QCStringg_objectDict
 
static QIntDict< QCStringg_wordDict
 
static int g_braceCount =0
 
static QCString g_forceTagReference
 
static VariableContext g_theVarContext
 
static CallContext g_theCallContext
 
 YY_DECL
 
register char * yy_cp
 
register char * yy_bp
 
register int yy_act
 

Macro Definition Documentation

#define AlignAs   15

Definition at line 12363 of file code.cpp.

#define AlignAsEnd   16

Definition at line 12364 of file code.cpp.

#define Bases   20

Definition at line 12368 of file code.cpp.

#define BEGIN   (yy_start) = 1 + 2 *

Definition at line 144 of file code.cpp.

#define Body   9

Definition at line 12357 of file code.cpp.

#define CallEnd   25

Definition at line 12373 of file code.cpp.

#define CLASSBLOCK   (int *)4

Definition at line 10589 of file code.cpp.

#define ClassName   14

Definition at line 12362 of file code.cpp.

#define ClassVar   18

Definition at line 12366 of file code.cpp.

#define codeYYwrap (   n)    1

Definition at line 354 of file code.cpp.

#define CppCliTypeModifierFollowup   19

Definition at line 12367 of file code.cpp.

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

Definition at line 10585 of file code.cpp.

#define ECHO   do { if (fwrite( codeYYtext, codeYYleng, 1, codeYYout )) {} } while (0)

Definition at line 12470 of file code.cpp.

#define EOB_ACT_CONTINUE_SCAN   0

Definition at line 179 of file code.cpp.

#define EOB_ACT_END_OF_FILE   1

Definition at line 180 of file code.cpp.

#define EOB_ACT_LAST_MATCH   2

Definition at line 181 of file code.cpp.

#define FLEX_BETA

Definition at line 33 of file code.cpp.

#define FLEX_SCANNER

Definition at line 28 of file code.cpp.

#define FLEXINT_H

Definition at line 49 of file code.cpp.

#define FuncCall   10

Definition at line 12358 of file code.cpp.

#define INITIAL   0

Definition at line 12348 of file code.cpp.

#define InlineInit   35

Definition at line 12383 of file code.cpp.

#define INNERBLOCK   (int *)12

Definition at line 10591 of file code.cpp.

#define INT16_MAX   (32767)

Definition at line 92 of file code.cpp.

#define INT16_MIN   (-32767-1)

Definition at line 83 of file code.cpp.

#define INT32_MAX   (2147483647)

Definition at line 95 of file code.cpp.

#define INT32_MIN   (-2147483647-1)

Definition at line 86 of file code.cpp.

#define INT8_MAX   (127)

Definition at line 89 of file code.cpp.

#define INT8_MIN   (-128)

Definition at line 80 of file code.cpp.

#define MemberCall   11

Definition at line 12359 of file code.cpp.

#define MemberCall2   12

Definition at line 12360 of file code.cpp.

#define ObjCCall   29

Definition at line 12377 of file code.cpp.

#define ObjCMethod   26

Definition at line 12374 of file code.cpp.

#define ObjCMName   30

Definition at line 12378 of file code.cpp.

#define ObjCParams   27

Definition at line 12375 of file code.cpp.

#define ObjCParamType   28

Definition at line 12376 of file code.cpp.

#define ObjCSkipStr   31

Definition at line 12379 of file code.cpp.

#define OldStyleArgs   32

Definition at line 12380 of file code.cpp.

#define PackageName   17

Definition at line 12365 of file code.cpp.

#define RawString   34

Definition at line 12382 of file code.cpp.

#define ReadInclude   22

Definition at line 12370 of file code.cpp.

#define REJECT
Value:
{ \
*yy_cp = (yy_hold_char); /* undo effects of setting up codeYYtext */ \
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 char yy_hold_char
Definition: code.cpp:292
static int yy_full_lp
Definition: code.cpp:10520
static char * yy_full_match
Definition: code.cpp:10517
static int * yy_full_state
Definition: code.cpp:10521
register char * yy_cp
Definition: code.cpp:12563
static int yy_lp
Definition: code.cpp:10518
static yy_state_type * yy_state_ptr
Definition: code.cpp:10516

Definition at line 10524 of file code.cpp.

#define RemoveSpecialCComment   7

Definition at line 12355 of file code.cpp.

#define SCOPEBLOCK   (int *)8

Definition at line 10590 of file code.cpp.

#define SkipComment   5

Definition at line 12353 of file code.cpp.

#define SkipCPP   4

Definition at line 12352 of file code.cpp.

#define SkipCxxComment   6

Definition at line 12354 of file code.cpp.

#define SkipInits   13

Definition at line 12361 of file code.cpp.

#define SkipSharp   21

Definition at line 12369 of file code.cpp.

#define SkipString   1

Definition at line 12349 of file code.cpp.

#define SkipStringS   2

Definition at line 12350 of file code.cpp.

#define SkipVerbString   3

Definition at line 12351 of file code.cpp.

#define StripSpecialCComment   8

Definition at line 12356 of file code.cpp.

#define TemplCast   24

Definition at line 12372 of file code.cpp.

#define TemplDecl   23

Definition at line 12371 of file code.cpp.

#define UINT16_MAX   (65535U)

Definition at line 101 of file code.cpp.

#define UINT32_MAX   (4294967295U)

Definition at line 104 of file code.cpp.

#define UINT8_MAX   (255U)

Definition at line 98 of file code.cpp.

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

Definition at line 199 of file code.cpp.

#define UsingName   33

Definition at line 12381 of file code.cpp.

#define YY_AT_BOL ( )    (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Definition at line 350 of file code.cpp.

#define YY_BREAK   break;

Definition at line 12549 of file code.cpp.

#define YY_BUF_SIZE   16384

Definition at line 163 of file code.cpp.

#define YY_BUFFER_EOF_PENDING   2

Definition at line 266 of file code.cpp.

#define YY_BUFFER_NEW   0

Definition at line 254 of file code.cpp.

#define YY_BUFFER_NORMAL   1

Definition at line 255 of file code.cpp.

#define yy_create_buffer   codeYY_create_buffer

Definition at line 9 of file code.cpp.

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

Definition at line 282 of file code.cpp.

#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]

Definition at line 289 of file code.cpp.

#define YY_DECL   int codeYYlex (void)

Definition at line 12537 of file code.cpp.

#define YY_DECL_IS_OURS   1

Definition at line 12533 of file code.cpp.

#define yy_delete_buffer   codeYY_delete_buffer

Definition at line 10 of file code.cpp.

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

Definition at line 378 of file code.cpp.

#define YY_END_OF_BUFFER   215

Definition at line 386 of file code.cpp.

#define YY_END_OF_BUFFER_CHAR   0

Definition at line 159 of file code.cpp.

#define YY_EXIT_FAILURE   2

Definition at line 16117 of file code.cpp.

#define YY_EXTRA_TYPE   void *

Definition at line 12394 of file code.cpp.

#define YY_FATAL_ERROR (   msg)    yy_fatal_error( msg )

Definition at line 12524 of file code.cpp.

#define yy_flex_debug   codeYY_flex_debug

Definition at line 11 of file code.cpp.

#define YY_FLEX_MAJOR_VERSION   2

Definition at line 29 of file code.cpp.

#define YY_FLEX_MINOR_VERSION   5

Definition at line 30 of file code.cpp.

#define YY_FLEX_SUBMINOR_VERSION   35

Definition at line 31 of file code.cpp.

#define yy_flush_buffer   codeYY_flush_buffer

Definition at line 13 of file code.cpp.

#define YY_FLUSH_BUFFER   codeYY_flush_buffer(YY_CURRENT_BUFFER )

Definition at line 318 of file code.cpp.

#define yy_init_buffer   codeYY_init_buffer

Definition at line 12 of file code.cpp.

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

Definition at line 12298 of file code.cpp.

#define YY_INT_ALIGNED   short int

Definition at line 5 of file code.cpp.

#define YY_LESS_LINENO (   n)

Definition at line 183 of file code.cpp.

#define yy_load_buffer_state   codeYY_load_buffer_state

Definition at line 14 of file code.cpp.

#define YY_MORE_ADJ   0

Definition at line 10536 of file code.cpp.

#define yy_new_buffer   codeYY_create_buffer

Definition at line 328 of file code.cpp.

#define YY_NEW_FILE   codeYYrestart(codeYYin )

Definition at line 157 of file code.cpp.

#define YY_NO_UNISTD_H   1

Definition at line 10587 of file code.cpp.

#define YY_NULL   0

Definition at line 131 of file code.cpp.

#define YY_NUM_RULES   214

Definition at line 385 of file code.cpp.

#define YY_READ_BUF_SIZE   8192

Definition at line 12462 of file code.cpp.

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 10537 of file code.cpp.

#define YY_RULE_SETUP
Value:
if ( codeYYleng > 0 ) \
(codeYYtext[codeYYleng - 1] == '\n'); \
int codeYYleng
Definition: code.cpp:294
#define YY_USER_ACTION
Definition: code.cpp:12544
char * codeYYtext
Definition: code.cpp:10538
#define YY_CURRENT_BUFFER_LVALUE
Definition: code.cpp:289

Definition at line 12552 of file code.cpp.

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

Definition at line 138 of file code.cpp.

#define yy_set_bol (   at_bol)
Value:
{ \
codeYYensure_buffer_stack (); \
codeYY_create_buffer(codeYYin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
#define YY_BUF_SIZE
Definition: code.cpp:163
if(!(yy_init))
Definition: code.cpp:12571
FILE * codeYYin
Definition: code.cpp:359
#define YY_CURRENT_BUFFER_LVALUE
Definition: code.cpp:289
#define YY_CURRENT_BUFFER
Definition: code.cpp:282

Definition at line 340 of file code.cpp.

#define yy_set_interactive (   is_interactive)
Value:
{ \
codeYYensure_buffer_stack (); \
codeYY_create_buffer(codeYYin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
#define YY_BUF_SIZE
Definition: code.cpp:163
if(!(yy_init))
Definition: code.cpp:12571
FILE * codeYYin
Definition: code.cpp:359
#define YY_CURRENT_BUFFER_LVALUE
Definition: code.cpp:289
#define YY_CURRENT_BUFFER
Definition: code.cpp:282

Definition at line 330 of file code.cpp.

#define YY_SKIP_YYWRAP

Definition at line 355 of file code.cpp.

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

Definition at line 150 of file code.cpp.

#define YY_START_STACK_INCR   25

Definition at line 12519 of file code.cpp.

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

Definition at line 168 of file code.cpp.

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

Definition at line 154 of file code.cpp.

#define YY_STRUCT_YY_BUFFER_STATE

Definition at line 207 of file code.cpp.

#define yy_switch_to_buffer   codeYY_switch_to_buffer

Definition at line 15 of file code.cpp.

#define YY_TRAILING_HEAD_MASK   0x4000

Definition at line 10523 of file code.cpp.

#define YY_TRAILING_MASK   0x2000

Definition at line 10522 of file code.cpp.

#define YY_TYPEDEF_YY_BUFFER_STATE

Definition at line 171 of file code.cpp.

#define YY_TYPEDEF_YY_SIZE_T

Definition at line 202 of file code.cpp.

#define YY_USER_ACTION

Definition at line 12544 of file code.cpp.

#define yyalloc   codeYYalloc

Definition at line 24 of file code.cpp.

#define yyconst

Definition at line 127 of file code.cpp.

#define yyfree   codeYYfree

Definition at line 26 of file code.cpp.

#define yyin   codeYYin

Definition at line 16 of file code.cpp.

#define yyleng   codeYYleng

Definition at line 17 of file code.cpp.

#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up codeYYtext. */ \
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 codeYYtext again */ \
} \
while ( 0 )
static char yy_hold_char
Definition: code.cpp:292
while(1)
Definition: code.cpp:12603
#define YY_DO_BEFORE_ACTION
Definition: code.cpp:378
std::void_t< T > n
register char * yy_cp
Definition: code.cpp:12563
#define YY_MORE_ADJ
Definition: code.cpp:10536
static char * yy_c_buf_p
Definition: code.cpp:297
register char * yy_bp
Definition: code.cpp:12563
#define YY_RESTORE_YY_MORE_OFFSET
Definition: code.cpp:10537

Definition at line 16129 of file code.cpp.

#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up codeYYtext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
(yy_c_buf_p) = codeYYtext + yyless_macro_arg; \
*(yy_c_buf_p) = '\0'; \
codeYYleng = yyless_macro_arg; \
} \
while ( 0 )
int codeYYleng
Definition: code.cpp:294
static char yy_hold_char
Definition: code.cpp:292
while(1)
Definition: code.cpp:12603
char * codeYYtext
Definition: code.cpp:10538
std::void_t< T > n
static char * yy_c_buf_p
Definition: code.cpp:297

Definition at line 16129 of file code.cpp.

#define yylex   codeYYlex

Definition at line 18 of file code.cpp.

#define yylineno   codeYYlineno

Definition at line 19 of file code.cpp.

#define yymore ( )    yymore_used_but_not_detected

Definition at line 10535 of file code.cpp.

#define yyout   codeYYout

Definition at line 20 of file code.cpp.

#define yyrealloc   codeYYrealloc

Definition at line 25 of file code.cpp.

#define yyrestart   codeYYrestart

Definition at line 21 of file code.cpp.

#define YYSTATE   YY_START

Definition at line 151 of file code.cpp.

#define YYTABLES_NAME   "yytables"

Definition at line 16327 of file code.cpp.

#define yyterminate ( )    return YY_NULL

Definition at line 12514 of file code.cpp.

#define yytext   codeYYtext

Definition at line 22 of file code.cpp.

#define yytext_ptr   codeYYtext

Definition at line 368 of file code.cpp.

#define yywrap   codeYYwrap

Definition at line 23 of file code.cpp.

Typedef Documentation

typedef short int flex_int16_t

Definition at line 71 of file code.cpp.

typedef int flex_int32_t

Definition at line 72 of file code.cpp.

typedef signed char flex_int8_t

Definition at line 70 of file code.cpp.

typedef unsigned short int flex_uint16_t

Definition at line 74 of file code.cpp.

typedef unsigned int flex_uint32_t

Definition at line 75 of file code.cpp.

typedef unsigned char flex_uint8_t

Definition at line 73 of file code.cpp.

Definition at line 172 of file code.cpp.

typedef unsigned char YY_CHAR

Definition at line 357 of file code.cpp.

typedef size_t yy_size_t

Definition at line 203 of file code.cpp.

typedef int yy_state_type

Definition at line 361 of file code.cpp.

Function Documentation

static void addParmType ( )
static

Definition at line 11186 of file code.cpp.

11187 {
11188  if (g_parmName=="const") { g_parmName.resize(0); return; }
11189  if (!g_parmType.isEmpty()) g_parmType += ' ' ;
11190  g_parmType += g_parmName ;
11191  g_parmName.resize(0) ;
11192 }
bool resize(uint newlen)
Definition: qcstring.h:225
bool isEmpty() const
Definition: qcstring.h:189
static QCString g_parmName
Definition: code.cpp:10604
static QCString g_parmType
Definition: code.cpp:10603
static void addToSearchIndex ( const char *  text)
static

Definition at line 10981 of file code.cpp.

10982 {
10984  {
10985  g_code->addWord(text,FALSE);
10986  }
10987 }
const bool FALSE
Definition: qglobal.h:370
static SearchIndexIntf * searchIndex
Definition: doxygen.h:133
virtual void addWord(const char *word, bool hiPriority)=0
static CodeOutputInterface * g_code
Definition: code.cpp:10597
static void addType ( )
static

Definition at line 11175 of file code.cpp.

11176 {
11177  if (g_name=="const") { g_name.resize(0); return; }
11178  if (!g_type.isEmpty()) g_type += ' ' ;
11179  g_type += g_name ;
11180  g_name.resize(0) ;
11181  if (!g_type.isEmpty()) g_type += ' ' ;
11182  g_type += g_args ;
11183  g_args.resize(0) ;
11184 }
bool resize(uint newlen)
Definition: qcstring.h:225
bool isEmpty() const
Definition: qcstring.h:189
static QCString g_args
Definition: code.cpp:10620
static QCString g_name
Definition: code.cpp:10619
static QCString g_type
Definition: code.cpp:10618
static void addUsingDirective ( const char *  name)
static

Definition at line 11194 of file code.cpp.

11195 {
11196  if (g_sourceFileDef && name)
11197  {
11199  if (nd)
11200  {
11202  }
11203  }
11204 }
static QCString name
Definition: declinfo.cpp:673
static FileDef * g_sourceFileDef
Definition: code.cpp:10626
static NamespaceSDict * namespaceSDict
Definition: doxygen.h:120
void addUsingDirective(NamespaceDef *nd)
Definition: filedef.cpp:1238
T * find(const char *key)
Definition: sortdict.h:232
void codeFreeScanner ( )

Definition at line 16505 of file code.cpp.

16506 {
16507 #if defined(YY_FLEX_SUBMINOR_VERSION)
16508  if (g_lexInit)
16509  {
16511  }
16512 #endif
16513 }
static bool g_lexInit
Definition: code.cpp:10660
int codeYYlex_destroy(void)
Definition: code.cpp:16257
YY_BUFFER_STATE codeYY_create_buffer ( FILE *  file,
int  size 
)

Allocate and initialize an input buffer state.

Parameters
fileA readable stream.
sizeThe character buffer size in bytes. When in doubt, use YY_BUF_SIZE.
Returns
the allocated buffer state.

Definition at line 15834 of file code.cpp.

15835 {
15837 
15838  b = (YY_BUFFER_STATE) codeYYalloc(sizeof( struct yy_buffer_state ) );
15839  if ( ! b )
15840  YY_FATAL_ERROR( "out of dynamic memory in codeYY_create_buffer()" );
15841 
15842  b->yy_buf_size = size;
15843 
15844  /* yy_ch_buf has to be 2 characters longer than the size given because
15845  * we need to put in 2 end-of-buffer characters.
15846  */
15847  b->yy_ch_buf = (char *) codeYYalloc(b->yy_buf_size + 2 );
15848  if ( ! b->yy_ch_buf )
15849  YY_FATAL_ERROR( "out of dynamic memory in codeYY_create_buffer()" );
15850 
15851  b->yy_is_our_buffer = 1;
15852 
15854 
15855  return b;
15856 }
#define YY_FATAL_ERROR(msg)
Definition: code.cpp:12524
struct yy_buffer_state * YY_BUFFER_STATE
Definition: code.cpp:172
yy_size_t yy_buf_size
Definition: code.cpp:218
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
void * codeYYalloc(yy_size_t)
Definition: code.cpp:16305
char * yy_ch_buf
Definition: code.cpp:212
int yy_is_our_buffer
Definition: code.cpp:229
static bool * b
Definition: config.cpp:1043
static void codeYY_init_buffer(YY_BUFFER_STATE b, FILE *file)
Definition: code.cpp:15881
void codeYY_delete_buffer ( YY_BUFFER_STATE  b)

Destroy the buffer.

Parameters
ba buffer created with codeYY_create_buffer()

Definition at line 15862 of file code.cpp.

15863 {
15864 
15865  if ( ! b )
15866  return;
15867 
15868  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
15870 
15871  if ( b->yy_is_our_buffer )
15872  codeYYfree((void *) b->yy_ch_buf );
15873 
15874  codeYYfree((void *) b );
15875 }
struct yy_buffer_state * YY_BUFFER_STATE
Definition: code.cpp:172
char * yy_ch_buf
Definition: code.cpp:212
int yy_is_our_buffer
Definition: code.cpp:229
#define YY_CURRENT_BUFFER_LVALUE
Definition: code.cpp:289
#define YY_CURRENT_BUFFER
Definition: code.cpp:282
void codeYYfree(void *)
Definition: code.cpp:16322
void codeYY_flush_buffer ( YY_BUFFER_STATE  b)

Discard all buffered characters. On the next scan, YY_INPUT will be called.

Parameters
bthe buffer state to be flushed, usually YY_CURRENT_BUFFER.

Definition at line 15909 of file code.cpp.

15910 {
15911  if ( ! b )
15912  return;
15913 
15914  b->yy_n_chars = 0;
15915 
15916  /* We always need two end-of-buffer characters. The first causes
15917  * a transition to the end-of-buffer state. The second causes
15918  * a jam in that state.
15919  */
15922 
15923  b->yy_buf_pos = &b->yy_ch_buf[0];
15924 
15925  b->yy_at_bol = 1;
15927 
15928  if ( b == YY_CURRENT_BUFFER )
15930 }
char * yy_buf_pos
Definition: code.cpp:213
int yy_n_chars
Definition: code.cpp:223
#define YY_BUFFER_NEW
Definition: code.cpp:254
#define YY_END_OF_BUFFER_CHAR
Definition: code.cpp:159
static void codeYY_load_buffer_state(void)
Definition: code.cpp:15820
char * yy_ch_buf
Definition: code.cpp:212
#define YY_CURRENT_BUFFER
Definition: code.cpp:282
int yy_buffer_status
Definition: code.cpp:252
static void codeYY_init_buffer ( YY_BUFFER_STATE  b,
FILE *  file 
)
static

Definition at line 15881 of file code.cpp.

15883 {
15884  int oerrno = errno;
15885 
15886  codeYY_flush_buffer(b );
15887 
15888  b->yy_input_file = file;
15889  b->yy_fill_buffer = 1;
15890 
15891  /* If b is the current buffer, then codeYY_init_buffer was _probably_
15892  * called from codeYYrestart() or through yy_get_next_buffer.
15893  * In that case, we don't want to reset the lineno or column.
15894  */
15895  if (b != YY_CURRENT_BUFFER){
15896  b->yy_bs_lineno = 1;
15897  b->yy_bs_column = 0;
15898  }
15899 
15900  b->yy_is_interactive = 0;
15901 
15902  errno = oerrno;
15903 }
FILE * yy_input_file
Definition: code.cpp:210
int yy_fill_buffer
Definition: code.cpp:250
int yy_bs_lineno
Definition: code.cpp:244
int errno
Contains the last error code.
Definition: structcmd.h:53
int yy_bs_column
Definition: code.cpp:245
#define YY_CURRENT_BUFFER
Definition: code.cpp:282
void codeYY_flush_buffer(YY_BUFFER_STATE b)
Definition: code.cpp:15909
int yy_is_interactive
Definition: code.cpp:236
static void codeYY_load_buffer_state ( void  )
static

Definition at line 15820 of file code.cpp.

15821 {
15822  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
15823  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
15824  codeYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
15825  (yy_hold_char) = *(yy_c_buf_p);
15826 }
static char yy_hold_char
Definition: code.cpp:292
#define yytext_ptr
Definition: code.cpp:368
FILE * codeYYin
Definition: code.cpp:359
static char * yy_c_buf_p
Definition: code.cpp:297
#define YY_CURRENT_BUFFER_LVALUE
Definition: code.cpp:289
static int yy_n_chars
Definition: code.cpp:293
YY_BUFFER_STATE codeYY_scan_buffer ( char *  base,
yy_size_t  size 
)

Setup the input buffer state to scan directly from a user-specified character buffer.

Parameters
basethe character buffer
sizethe size in bytes of the character buffer
Returns
the newly allocated buffer state object.

Definition at line 16036 of file code.cpp.

16037 {
16039 
16040  if ( size < 2 ||
16043  /* They forgot to leave room for the EOB's. */
16044  return 0;
16045 
16046  b = (YY_BUFFER_STATE) codeYYalloc(sizeof( struct yy_buffer_state ) );
16047  if ( ! b )
16048  YY_FATAL_ERROR( "out of dynamic memory in codeYY_scan_buffer()" );
16049 
16050  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
16051  b->yy_buf_pos = b->yy_ch_buf = base;
16052  b->yy_is_our_buffer = 0;
16053  b->yy_input_file = 0;
16054  b->yy_n_chars = b->yy_buf_size;
16055  b->yy_is_interactive = 0;
16056  b->yy_at_bol = 1;
16057  b->yy_fill_buffer = 0;
16059 
16061 
16062  return b;
16063 }
char * yy_buf_pos
Definition: code.cpp:213
FILE * yy_input_file
Definition: code.cpp:210
int yy_n_chars
Definition: code.cpp:223
#define YY_FATAL_ERROR(msg)
Definition: code.cpp:12524
int yy_fill_buffer
Definition: code.cpp:250
struct yy_buffer_state * YY_BUFFER_STATE
Definition: code.cpp:172
yy_size_t yy_buf_size
Definition: code.cpp:218
#define YY_BUFFER_NEW
Definition: code.cpp:254
#define YY_END_OF_BUFFER_CHAR
Definition: code.cpp:159
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
void codeYY_switch_to_buffer(YY_BUFFER_STATE new_buffer)
Definition: code.cpp:15789
void * codeYYalloc(yy_size_t)
Definition: code.cpp:16305
char * yy_ch_buf
Definition: code.cpp:212
int yy_is_our_buffer
Definition: code.cpp:229
static bool * b
Definition: config.cpp:1043
int yy_is_interactive
Definition: code.cpp:236
int yy_buffer_status
Definition: code.cpp:252
YY_BUFFER_STATE codeYY_scan_bytes ( yyconst char *  yybytes,
int  _yybytes_len 
)

Setup the input buffer state to scan the given bytes. The next call to codeYYlex() will scan from a copy of bytes.

Parameters
bytesthe byte buffer to scan
lenthe number of bytes in the buffer pointed to by bytes.
Returns
the newly allocated buffer state object.

Definition at line 16086 of file code.cpp.

16087 {
16089  char *buf;
16090  yy_size_t n;
16091  int i;
16092 
16093  /* Get memory for full buffer, including space for trailing EOB's. */
16094  n = _yybytes_len + 2;
16095  buf = (char *) codeYYalloc(n );
16096  if ( ! buf )
16097  YY_FATAL_ERROR( "out of dynamic memory in codeYY_scan_bytes()" );
16098 
16099  for ( i = 0; i < _yybytes_len; ++i )
16100  buf[i] = yybytes[i];
16101 
16102  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
16103 
16104  b = codeYY_scan_buffer(buf,n );
16105  if ( ! b )
16106  YY_FATAL_ERROR( "bad buffer in codeYY_scan_bytes()" );
16107 
16108  /* It's okay to grow etc. this buffer, and we should throw it
16109  * away when we're done.
16110  */
16111  b->yy_is_our_buffer = 1;
16112 
16113  return b;
16114 }
#define YY_FATAL_ERROR(msg)
Definition: code.cpp:12524
YY_BUFFER_STATE codeYY_scan_buffer(char *base, yy_size_t size)
Definition: code.cpp:16036
#define YY_END_OF_BUFFER_CHAR
Definition: code.cpp:159
std::void_t< T > n
void * codeYYalloc(yy_size_t)
Definition: code.cpp:16305
int yy_is_our_buffer
Definition: code.cpp:229
static bool * b
Definition: config.cpp:1043
size_t yy_size_t
Definition: code.cpp:203
YY_BUFFER_STATE codeYY_scan_string ( yyconst char *  yystr)

Setup the input buffer state to scan a string. The next call to codeYYlex() will scan from a copy of str.

Parameters
yystra NUL-terminated string to scan
Returns
the newly allocated buffer state object.
Note
If you want to scan bytes that may contain NUL values, then use codeYY_scan_bytes() instead.

Definition at line 16073 of file code.cpp.

16074 {
16075 
16076  return codeYY_scan_bytes(yystr,strlen(yystr) );
16077 }
YY_BUFFER_STATE codeYY_scan_bytes(yyconst char *bytes, int len)
Definition: code.cpp:16086
void codeYY_switch_to_buffer ( YY_BUFFER_STATE  new_buffer)

Switch to a different input buffer.

Parameters
new_bufferThe new input buffer.

Definition at line 15789 of file code.cpp.

15790 {
15791 
15792  /* TODO. We should be able to replace this entire function body
15793  * with
15794  * codeYYpop_buffer_state();
15795  * codeYYpush_buffer_state(new_buffer);
15796  */
15798  if ( YY_CURRENT_BUFFER == new_buffer )
15799  return;
15800 
15801  if ( YY_CURRENT_BUFFER )
15802  {
15803  /* Flush out information for old buffer. */
15804  *(yy_c_buf_p) = (yy_hold_char);
15805  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
15806  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
15807  }
15808 
15809  YY_CURRENT_BUFFER_LVALUE = new_buffer;
15811 
15812  /* We don't actually know whether we did this switch during
15813  * EOF (codeYYwrap()) processing, but the only time this flag
15814  * is looked at is after codeYYwrap() is called, so it's safe
15815  * to go ahead and always set it.
15816  */
15818 }
static int yy_did_buffer_switch_on_eof
Definition: code.cpp:304
static char yy_hold_char
Definition: code.cpp:292
static void codeYY_load_buffer_state(void)
Definition: code.cpp:15820
static char * yy_c_buf_p
Definition: code.cpp:297
#define YY_CURRENT_BUFFER_LVALUE
Definition: code.cpp:289
#define YY_CURRENT_BUFFER
Definition: code.cpp:282
static int yy_n_chars
Definition: code.cpp:293
static void codeYYensure_buffer_stack(void)
Definition: code.cpp:15987
void * codeYYalloc ( yy_size_t  size)

Definition at line 16305 of file code.cpp.

16306 {
16307  return (void *) malloc( size );
16308 }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
static void codeYYensure_buffer_stack ( void  )
static

Definition at line 15987 of file code.cpp.

15988 {
15989  int num_to_alloc;
15990 
15991  if (!(yy_buffer_stack)) {
15992 
15993  /* First allocation is just for 2 elements, since we don't know if this
15994  * scanner will even need a stack. We use 2 instead of 1 to avoid an
15995  * immediate realloc on the next call.
15996  */
15997  num_to_alloc = 1;
15999  (num_to_alloc * sizeof(struct yy_buffer_state*)
16000  );
16001  if ( ! (yy_buffer_stack) )
16002  YY_FATAL_ERROR( "out of dynamic memory in codeYYensure_buffer_stack()" );
16003 
16004  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
16005 
16006  (yy_buffer_stack_max) = num_to_alloc;
16007  (yy_buffer_stack_top) = 0;
16008  return;
16009  }
16010 
16011  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
16012 
16013  /* Increase the buffer to prepare for a possible push. */
16014  int grow_size = 8 /* arbitrary grow size */;
16015 
16016  num_to_alloc = (yy_buffer_stack_max) + grow_size;
16018  ((yy_buffer_stack),
16019  num_to_alloc * sizeof(struct yy_buffer_state*)
16020  );
16021  if ( ! (yy_buffer_stack) )
16022  YY_FATAL_ERROR( "out of dynamic memory in codeYYensure_buffer_stack()" );
16023 
16024  /* zero only the new slots.*/
16025  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
16026  (yy_buffer_stack_max) = num_to_alloc;
16027  }
16028 }
#define YY_FATAL_ERROR(msg)
Definition: code.cpp:12524
static size_t yy_buffer_stack_max
Definition: code.cpp:273
static YY_BUFFER_STATE * yy_buffer_stack
Definition: code.cpp:274
void * codeYYrealloc(void *, yy_size_t)
Definition: code.cpp:16310
void * codeYYalloc(yy_size_t)
Definition: code.cpp:16305
static size_t yy_buffer_stack_top
Definition: code.cpp:272
void codeYYfree ( void *  ptr)

Definition at line 16322 of file code.cpp.

16323 {
16324  free( (char *) ptr ); /* see codeYYrealloc() for (char *) cast */
16325 }
int codeYYget_debug ( void  )

Definition at line 16213 of file code.cpp.

16214 {
16215  return codeYY_flex_debug;
16216 }
int codeYY_flex_debug
Definition: code.cpp:10514
YY_EXTRA_TYPE codeYYget_extra ( void  )
FILE * codeYYget_in ( void  )

Get the input stream.

Definition at line 16157 of file code.cpp.

16158 {
16159  return codeYYin;
16160 }
FILE * codeYYin
Definition: code.cpp:359
int codeYYget_leng ( void  )

Get the length of the current token.

Definition at line 16173 of file code.cpp.

16174 {
16175  return codeYYleng;
16176 }
int codeYYleng
Definition: code.cpp:294
int codeYYget_lineno ( void  )

Get the current line number.

Definition at line 16148 of file code.cpp.

16149 {
16150 
16151  return codeYYlineno;
16152 }
int codeYYlineno
Definition: code.cpp:365
FILE * codeYYget_out ( void  )

Get the output stream.

Definition at line 16165 of file code.cpp.

16166 {
16167  return codeYYout;
16168 }
FILE * codeYYout
Definition: code.cpp:359
char * codeYYget_text ( void  )

Get the current token.

Definition at line 16182 of file code.cpp.

16183 {
16184  return codeYYtext;
16185 }
char * codeYYtext
Definition: code.cpp:10538
int codeYYlex ( void  )
int codeYYlex_destroy ( void  )

Definition at line 16257 of file code.cpp.

16258 {
16259 
16260  /* Pop the buffer stack, destroying each element. */
16261  while(YY_CURRENT_BUFFER){
16263  YY_CURRENT_BUFFER_LVALUE = NULL;
16265  }
16266 
16267  /* Destroy the stack itself. */
16269  (yy_buffer_stack) = NULL;
16270 
16271  codeYYfree ( (yy_state_buf) );
16272  (yy_state_buf) = NULL;
16273 
16274  /* Reset the globals. This is important in a non-reentrant scanner so the next time
16275  * codeYYlex() is called, initialization will occur. */
16276  yy_init_globals( );
16277 
16278  return 0;
16279 }
static yy_state_type * yy_state_buf
Definition: code.cpp:10516
static int yy_init_globals(void)
Definition: code.cpp:16223
void codeYYpop_buffer_state(void)
Definition: code.cpp:15968
static YY_BUFFER_STATE * yy_buffer_stack
Definition: code.cpp:274
#define YY_CURRENT_BUFFER_LVALUE
Definition: code.cpp:289
void codeYY_delete_buffer(YY_BUFFER_STATE b)
Definition: code.cpp:15862
#define YY_CURRENT_BUFFER
Definition: code.cpp:282
void codeYYfree(void *)
Definition: code.cpp:16322
void codeYYpop_buffer_state ( void  )

Removes and deletes the top of the stack, if present. The next element becomes the new top.

Definition at line 15968 of file code.cpp.

15969 {
15970  if (!YY_CURRENT_BUFFER)
15971  return;
15972 
15974  YY_CURRENT_BUFFER_LVALUE = NULL;
15975  if ((yy_buffer_stack_top) > 0)
15976  --(yy_buffer_stack_top);
15977 
15978  if (YY_CURRENT_BUFFER) {
15981  }
15982 }
static int yy_did_buffer_switch_on_eof
Definition: code.cpp:304
static void codeYY_load_buffer_state(void)
Definition: code.cpp:15820
static size_t yy_buffer_stack_top
Definition: code.cpp:272
#define YY_CURRENT_BUFFER_LVALUE
Definition: code.cpp:289
void codeYY_delete_buffer(YY_BUFFER_STATE b)
Definition: code.cpp:15862
#define YY_CURRENT_BUFFER
Definition: code.cpp:282
void codeYYpush_buffer_state ( YY_BUFFER_STATE  new_buffer)

Pushes the new state onto the stack. The new state becomes the current state. This function will allocate the stack if necessary.

Parameters
new_bufferThe new state.

Definition at line 15938 of file code.cpp.

15939 {
15940  if (new_buffer == NULL)
15941  return;
15942 
15944 
15945  /* This block is copied from codeYY_switch_to_buffer. */
15946  if ( YY_CURRENT_BUFFER )
15947  {
15948  /* Flush out information for old buffer. */
15949  *(yy_c_buf_p) = (yy_hold_char);
15950  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
15951  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
15952  }
15953 
15954  /* Only push if top exists. Otherwise, replace top. */
15955  if (YY_CURRENT_BUFFER)
15956  (yy_buffer_stack_top)++;
15957  YY_CURRENT_BUFFER_LVALUE = new_buffer;
15958 
15959  /* copied from codeYY_switch_to_buffer. */
15962 }
static int yy_did_buffer_switch_on_eof
Definition: code.cpp:304
static char yy_hold_char
Definition: code.cpp:292
static void codeYY_load_buffer_state(void)
Definition: code.cpp:15820
static char * yy_c_buf_p
Definition: code.cpp:297
static size_t yy_buffer_stack_top
Definition: code.cpp:272
#define YY_CURRENT_BUFFER_LVALUE
Definition: code.cpp:289
#define YY_CURRENT_BUFFER
Definition: code.cpp:282
static int yy_n_chars
Definition: code.cpp:293
static void codeYYensure_buffer_stack(void)
Definition: code.cpp:15987
void * codeYYrealloc ( void *  ptr,
yy_size_t  size 
)

Definition at line 16310 of file code.cpp.

16311 {
16312  /* The cast to (char *) in the following accommodates both
16313  * implementations that use char* generic pointers, and those
16314  * that use void* generic pointers. It works with the latter
16315  * because both ANSI C and C++ allow castless assignment from
16316  * any pointer type to void*, and deal with argument conversions
16317  * as though doing an assignment.
16318  */
16319  return (void *) realloc( (char *) ptr, size );
16320 }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
void codeYYrestart ( FILE *  input_file)

Immediately switch to a different input stream.

Parameters
input_fileA readable stream.
Note
This function does not reset the start condition to INITIAL .

Definition at line 15772 of file code.cpp.

15773 {
15774 
15775  if ( ! YY_CURRENT_BUFFER ){
15779  }
15780 
15783 }
#define YY_BUF_SIZE
Definition: code.cpp:163
static void codeYY_load_buffer_state(void)
Definition: code.cpp:15820
FILE * codeYYin
Definition: code.cpp:359
#define YY_CURRENT_BUFFER_LVALUE
Definition: code.cpp:289
#define YY_CURRENT_BUFFER
Definition: code.cpp:282
YY_BUFFER_STATE codeYY_create_buffer(FILE *file, int size)
Definition: code.cpp:15834
static void codeYY_init_buffer(YY_BUFFER_STATE b, FILE *file)
Definition: code.cpp:15881
static void codeYYensure_buffer_stack(void)
Definition: code.cpp:15987
void codeYYset_debug ( int  debug_flag)

Definition at line 16218 of file code.cpp.

16219 {
16220  codeYY_flex_debug = bdebug ;
16221 }
int codeYY_flex_debug
Definition: code.cpp:10514
void codeYYset_extra ( YY_EXTRA_TYPE  user_defined)
void codeYYset_in ( FILE *  in_str)

Set the input stream. This does not discard the current input buffer.

Parameters
in_strA readable stream.
See also
codeYY_switch_to_buffer

Definition at line 16203 of file code.cpp.

16204 {
16205  codeYYin = in_str ;
16206 }
FILE * codeYYin
Definition: code.cpp:359
void codeYYset_lineno ( int  line_number)

Set the current line number.

Parameters
line_number

Definition at line 16191 of file code.cpp.

16192 {
16193 
16194  codeYYlineno = line_number;
16195 }
int codeYYlineno
Definition: code.cpp:365
void codeYYset_out ( FILE *  out_str)

Definition at line 16208 of file code.cpp.

16209 {
16210  codeYYout = out_str ;
16211 }
FILE * codeYYout
Definition: code.cpp:359
static void codifyLines ( const char *  text)
static

write a code fragment `text' that may span multiple lines, inserting line numbers for each line.

Definition at line 11102 of file code.cpp.

11103 {
11104  //printf("codifyLines(%d,\"%s\")\n",g_yyLineNr,text);
11105  const char *p=text,*sp=p;
11106  char c;
11107  bool done=FALSE;
11108  while (!done)
11109  {
11110  sp=p;
11111  while ((c=*p++) && c!='\n') { g_yyColNr++; }
11112  if (c=='\n')
11113  {
11114  g_yyLineNr++;
11115  g_yyColNr=1;
11116  //*(p-1)='\0';
11117  int l = (int)(p-sp-1);
11118  char *tmp = (char*)malloc(l+1);
11119  memcpy(tmp,sp,l);
11120  tmp[l]='\0';
11121  g_code->codify(tmp);
11122  free(tmp);
11123  nextCodeLine();
11124  }
11125  else
11126  {
11127  g_code->codify(sp);
11128  done=TRUE;
11129  }
11130  }
11131 }
const bool FALSE
Definition: qglobal.h:370
static QStrList * l
Definition: config.cpp:1044
static int g_yyColNr
current column number
Definition: code.cpp:10610
static int g_yyLineNr
current line number
Definition: code.cpp:10609
p
Definition: test.py:223
string tmp
Definition: languages.py:63
static void nextCodeLine()
Definition: code.cpp:11088
virtual void codify(const char *s)=0
static CodeOutputInterface * g_code
Definition: code.cpp:10597
const bool TRUE
Definition: qglobal.h:371
static int countLines ( )
static

counts the number of lines in the input

Definition at line 11943 of file code.cpp.

11944 {
11945  const char *p=g_inputString;
11946  char c;
11947  int count=1;
11948  while ((c=*p))
11949  {
11950  p++ ;
11951  if (c=='\n') count++;
11952  }
11953  if (p>g_inputString && *(p-1)!='\n')
11954  { // last line does not end with a \n, so we add an extra
11955  // line and explicitly terminate the line after parsing.
11956  count++,
11958  }
11959  return count;
11960 }
static const char * g_inputString
the code fragment as text
Definition: code.cpp:10606
static bool g_needsTermination
Definition: code.cpp:10611
p
Definition: test.py:223
const bool TRUE
Definition: qglobal.h:371
static void endCodeLine ( )
static

Definition at line 11081 of file code.cpp.

11082 {
11083  DBG_CTX((stderr,"endCodeLine(%d)\n",g_yyLineNr));
11084  endFontClass();
11085  g_code->endCodeLine();
11086 }
static void endFontClass()
Definition: code.cpp:11962
static int g_yyLineNr
current line number
Definition: code.cpp:10609
#define DBG_CTX(x)
Definition: code.cpp:10585
static CodeOutputInterface * g_code
Definition: code.cpp:10597
virtual void endCodeLine()=0
static void endFontClass ( )
static

Definition at line 11962 of file code.cpp.

11963 {
11964  if (g_currentFontClass)
11965  {
11966  g_code->endFontClass();
11968  }
11969 }
virtual void endFontClass()=0
static CodeOutputInterface * g_code
Definition: code.cpp:10597
static const char * g_currentFontClass
Definition: code.cpp:10631
static QCString escapeName ( const char *  s)
static

Definition at line 12268 of file code.cpp.

12269 {
12270  QCString result;
12271  result.sprintf("$n%d",g_currentNameId);
12272  g_nameDict.insert(g_currentNameId,new QCString(s));
12273  g_currentNameId++;
12274  return result;
12275 }
static QCString result
static QIntDict< QCString > g_nameDict
Definition: code.cpp:10689
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:27
static int g_currentNameId
Definition: code.cpp:10684
static QCString * s
Definition: config.cpp:1042
static QCString escapeObject ( const char *  s)
static

Definition at line 12277 of file code.cpp.

12278 {
12279  QCString result;
12280  result.sprintf("$o%d",g_currentObjId);
12281  g_objectDict.insert(g_currentObjId,new QCString(s));
12282  g_currentObjId++;
12283  return result;
12284 }
static int g_currentObjId
Definition: code.cpp:10685
static QCString result
static QIntDict< QCString > g_objectDict
Definition: code.cpp:10690
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:27
static QCString * s
Definition: config.cpp:1042
static QCString escapeWord ( const char *  s)
static

Definition at line 12286 of file code.cpp.

12287 {
12288  QCString result;
12289  result.sprintf("$w%d",g_currentWordId);
12290  g_wordDict.insert(g_currentWordId,new QCString(s));
12291  g_currentWordId++;
12292  return result;
12293 }
static QCString result
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:27
static int g_currentWordId
Definition: code.cpp:10686
static QIntDict< QCString > g_wordDict
Definition: code.cpp:10691
static QCString * s
Definition: config.cpp:1042
static bool generateClassMemberLink ( CodeOutputInterface ol,
MemberDef xmd,
const char *  memName 
)
static

Definition at line 11638 of file code.cpp.

11639 {
11640  // extract class definition of the return type in order to resolve
11641  // a->b()->c() like call chains
11642 
11643  //printf("type=`%s' args=`%s' class=%s\n",
11644  // xmd->typeString(),xmd->argsString(),
11645  // xmd->getClassDef()->name().data());
11646 
11647  if (g_exampleBlock)
11648  {
11649  QCString anchor;
11650  anchor.sprintf("a%d",g_anchorCount);
11651  //printf("addExampleFile(%s,%s,%s)\n",anchor.data(),g_exampleName.data(),
11652  // g_exampleFile.data());
11653  if (xmd->addExample(anchor,g_exampleName,g_exampleFile))
11654  {
11655  ol.writeCodeAnchor(anchor);
11656  g_anchorCount++;
11657  }
11658  }
11659 
11661  DBG_CTX((stderr,"%s -> typeName=%p\n",xmd->typeString(),typeClass));
11662  g_theCallContext.setScope(typeClass);
11663 
11665  xmd->getFileDef() : xmd->getOuterScope();
11666  if (xmd->getGroupDef()) xd = xmd->getGroupDef();
11667  if (xd && xd->isLinkable())
11668  {
11669 
11670  //printf("g_currentDefiniton=%p g_currentMemberDef=%p xmd=%p g_insideBody=%d\n",g_currentDefinition,g_currentMemberDef,xmd,g_insideBody);
11671 
11672  if (xmd->templateMaster()) xmd = xmd->templateMaster();
11673 
11674  if (xmd->isLinkable())
11675  {
11676  // add usage reference
11678  /*xmd!=g_currentMemberDef &&*/ g_insideBody && g_collectXRefs)
11679  {
11681  }
11682 
11683  // write the actual link
11684  writeMultiLineCodeLink(ol,xmd,memName);
11685  addToSearchIndex(memName);
11686  return TRUE;
11687  }
11688  }
11689 
11690  return FALSE;
11691 }
static void addToSearchIndex(const char *text)
Definition: code.cpp:10981
virtual bool isLinkable() const =0
static bool g_insideBody
Definition: code.cpp:10633
static bool g_collectXRefs
Definition: code.cpp:10665
static CallContext g_theCallContext
Definition: code.cpp:10930
static QCString g_exampleName
Definition: code.cpp:10614
const bool FALSE
Definition: qglobal.h:370
MemberDef * templateMaster() const
Definition: memberdef.cpp:4567
static void writeMultiLineCodeLink(CodeOutputInterface &ol, Definition *d, const char *text)
Definition: code.cpp:11137
static bool g_exampleBlock
Definition: code.cpp:10613
QCString removeAnonymousScopes(const QCString &s)
Definition: util.cpp:164
FileDef * getFileDef() const
Definition: memberdef.cpp:4075
static NamespaceDef * globalScope
Definition: doxygen.h:128
const char * typeString() const
Definition: memberdef.cpp:4035
static MemberDef * g_currentMemberDef
Definition: code.cpp:10629
virtual void writeCodeAnchor(const char *name)=0
static QCString g_exampleFile
Definition: code.cpp:10615
#define DBG_CTX(x)
Definition: code.cpp:10585
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:27
static int g_anchorCount
Definition: code.cpp:10625
virtual Definition * getOuterScope() const
GroupDef * getGroupDef() const
Definition: memberdef.cpp:4095
void addDocCrossReference(MemberDef *src, MemberDef *dst)
Definition: util.cpp:8189
void setScope(Definition *d)
Definition: code.cpp:10882
bool addExample(const char *anchor, const char *name, const char *file)
Definition: memberdef.cpp:915
static ClassDef * stripClassName(const char *s, Definition *d=g_currentDefinition)
Definition: code.cpp:11227
bool isLinkable() const
Definition: memberdef.cpp:1161
const bool TRUE
Definition: qglobal.h:371
static Definition * g_currentDefinition
Definition: code.cpp:10628
static bool generateClassMemberLink ( CodeOutputInterface ol,
Definition def,
const char *  memName 
)
static

Definition at line 11693 of file code.cpp.

11694 {
11695  if (def && def->definitionType()==Definition::TypeClass)
11696  {
11697  ClassDef *cd = (ClassDef*)def;
11698  MemberDef *xmd = cd->getMemberByName(memName);
11699  //printf("generateClassMemberLink(class=%s,member=%s)=%p\n",def->name().data(),memName,xmd);
11700  if (xmd)
11701  {
11702  return generateClassMemberLink(ol,xmd,memName);
11703  }
11704  else
11705  {
11706  Definition *innerDef = cd->findInnerCompound(memName);
11707  if (innerDef)
11708  {
11709  g_theCallContext.setScope(innerDef);
11710  addToSearchIndex(memName);
11711  writeMultiLineCodeLink(*g_code,innerDef,memName);
11712  return TRUE;
11713  }
11714  }
11715  }
11716  else if (def && def->definitionType()==Definition::TypeNamespace)
11717  {
11718  NamespaceDef *nd = (NamespaceDef*)def;
11719  //printf("Looking for %s inside namespace %s\n",memName,nd->name().data());
11720  Definition *innerDef = nd->findInnerCompound(memName);
11721  if (innerDef)
11722  {
11723  g_theCallContext.setScope(innerDef);
11724  addToSearchIndex(memName);
11725  writeMultiLineCodeLink(*g_code,innerDef,memName);
11726  return TRUE;
11727  }
11728  }
11729  return FALSE;
11730 }
static void addToSearchIndex(const char *text)
Definition: code.cpp:10981
static CallContext g_theCallContext
Definition: code.cpp:10930
const bool FALSE
Definition: qglobal.h:370
static bool generateClassMemberLink(CodeOutputInterface &ol, MemberDef *xmd, const char *memName)
Definition: code.cpp:11638
static void writeMultiLineCodeLink(CodeOutputInterface &ol, Definition *d, const char *text)
Definition: code.cpp:11137
MemberDef * getMemberByName(const QCString &) const
Definition: classdef.cpp:3968
virtual DefType definitionType() const =0
virtual Definition * findInnerCompound(const char *name)
void setScope(Definition *d)
Definition: code.cpp:10882
static CodeOutputInterface * g_code
Definition: code.cpp:10597
const bool TRUE
Definition: qglobal.h:371
virtual Definition * findInnerCompound(const char *name)
Definition: classdef.cpp:3651
static void generateClassOrGlobalLink ( CodeOutputInterface ol,
const char *  clName,
bool  typeOnly = FALSE,
bool  varOnly = FALSE 
)
static

Definition at line 11461 of file code.cpp.

11463 {
11464  int i=0;
11465  if (*clName=='~') // correct for matching negated values i.s.o. destructors.
11466  {
11467  g_code->codify("~");
11468  clName++;
11469  }
11470  QCString className=clName;
11471  if (className.isEmpty()) return;
11472  if (g_insideProtocolList) // for Obj-C
11473  {
11474  className+="-p";
11475  }
11476  if (g_insidePHP)
11477  {
11478  className = substitute(className,"\\","::"); // for PHP namespaces
11479  }
11480  else if (g_insideCS || g_insideJava)
11481  {
11482  className = substitute(className,".","::"); // for PHP namespaces
11483  }
11484  ClassDef *cd=0,*lcd=0;
11485  MemberDef *md=0;
11486  bool isLocal=FALSE;
11487 
11488  //printf("generateClassOrGlobalLink(className=%s)\n",className.data());
11489  if ((lcd=g_theVarContext.findVariable(className))==0) // not a local variable
11490  {
11492  //printf("d=%s g_sourceFileDef=%s\n",d?d->name().data():"<none>",g_sourceFileDef?g_sourceFileDef->name().data():"<none>");
11493  cd = getResolvedClass(d,g_sourceFileDef,className,&md);
11494  DBG_CTX((stderr,"non-local variable name=%s context=%d cd=%s md=%s!\n",
11495  className.data(),g_theVarContext.count(),cd?cd->name().data():"<none>",
11496  md?md->name().data():"<none>"));
11497  if (cd==0 && md==0 && (i=className.find('<'))!=-1)
11498  {
11499  QCString bareName = className.left(i); //stripTemplateSpecifiersFromScope(className);
11500  DBG_CTX((stderr,"bareName=%s\n",bareName.data()));
11501  if (bareName!=className)
11502  {
11503  cd=getResolvedClass(d,g_sourceFileDef,bareName,&md); // try unspecialized version
11504  }
11505  }
11506  NamespaceDef *nd = getResolvedNamespace(className);
11507  if (nd)
11508  {
11510  addToSearchIndex(className);
11511  writeMultiLineCodeLink(*g_code,nd,clName);
11512  return;
11513  }
11514  //printf("md=%s\n",md?md->name().data():"<none>");
11515  DBG_CTX((stderr,"is found as a type cd=%s nd=%s\n",
11516  cd?cd->name().data():"<null>",
11517  nd?nd->name().data():"<null>"));
11518  if (cd==0 && md==0) // also see if it is variable or enum or enum value
11519  {
11520  if (getLink(g_classScope,clName,ol,clName,varOnly))
11521  {
11522  return;
11523  }
11524  }
11525  }
11526  else
11527  {
11528  //printf("local variable!\n");
11530  {
11531  //printf("non-dummy context lcd=%s!\n",lcd->name().data());
11533 
11534  // to following is needed for links to a global variable, but is
11535  // no good for a link to a local variable that is also a global symbol.
11536 
11537  //if (getLink(g_classScope,clName,ol,clName))
11538  //{
11539  //return;
11540  //}
11541  }
11542  isLocal=TRUE;
11543  DBG_CTX((stderr,"is a local variable cd=%p!\n",cd));
11544  }
11545  if (cd && cd->isLinkable()) // is it a linkable class
11546  {
11547  DBG_CTX((stderr,"is linkable class %s\n",clName));
11548  if (g_exampleBlock)
11549  {
11550  QCString anchor;
11551  anchor.sprintf("_a%d",g_anchorCount);
11552  //printf("addExampleClass(%s,%s,%s)\n",anchor.data(),g_exampleName.data(),
11553  // g_exampleFile.data());
11554  if (cd->addExample(anchor,g_exampleName,g_exampleFile))
11555  {
11556  ol.writeCodeAnchor(anchor);
11557  g_anchorCount++;
11558  }
11559  }
11560  writeMultiLineCodeLink(ol,cd,clName);
11561  addToSearchIndex(className);
11563  if (md)
11564  {
11566  md->getFileDef() : md->getOuterScope();
11567  if (md->getGroupDef()) d = md->getGroupDef();
11568  if (d && d->isLinkable() && md->isLinkable() &&
11570  {
11572  }
11573  }
11574  }
11575  else // not a class, maybe a global member
11576  {
11577  DBG_CTX((stderr,"class %s not linkable! cd=%p md=%p typeOnly=%d\n",clName,cd,md,typeOnly));
11578  if (!isLocal && (md!=0 || (cd==0 && !typeOnly))) // not a class, see if it is a global enum/variable/typedef.
11579  {
11580  if (md==0) // not found as a typedef
11581  {
11582  md = setCallContextForVar(clName);
11583  //printf("setCallContextForVar(%s) md=%p g_currentDefinition=%p\n",clName,md,g_currentDefinition);
11584  if (md && g_currentDefinition)
11585  {
11586  DBG_CTX((stderr,"%s accessible from %s? %d md->getOuterScope=%s\n",
11587  md->name().data(),g_currentDefinition->name().data(),
11589  md->getOuterScope()->name().data()));
11590  }
11591 
11592  if (md && g_currentDefinition &&
11594  {
11595  md=0; // variable not accessible
11596  }
11597  }
11598  if (md && (!varOnly || md->isVariable()))
11599  {
11600  DBG_CTX((stderr,"is a global md=%p g_currentDefinition=%s linkable=%d\n",md,g_currentDefinition?g_currentDefinition->name().data():"<none>",md->isLinkable()));
11601  if (md->isLinkable())
11602  {
11603  QCString text;
11604  if (!g_forceTagReference.isEmpty()) // explicit reference to symbol in tag file
11605  {
11606  text=g_forceTagReference;
11607  if (text.right(4)==".tag") // strip .tag if present
11608  {
11609  text=text.left(text.length()-4);
11610  }
11612  text+=clName;
11613  md->setName(text);
11614  md->setLocalName(text);
11615  }
11616  else // normal reference
11617  {
11618  text=clName;
11619  }
11620  writeMultiLineCodeLink(ol,md,text);
11621  addToSearchIndex(clName);
11623  {
11625  }
11626  return;
11627  }
11628  }
11629  }
11630 
11631  // nothing found, just write out the word
11632  DBG_CTX((stderr,"not found!\n"));
11633  codifyLines(clName);
11634  addToSearchIndex(clName);
11635  }
11636 }
static void addToSearchIndex(const char *text)
Definition: code.cpp:10981
bool addExample(const char *anchor, const char *name, const char *file)
Definition: classdef.cpp:2500
virtual bool isLinkable() const =0
int isAccessibleFrom(Definition *scope, FileDef *fileScope, Definition *item)
Definition: util.cpp:948
static bool g_insideProtocolList
Definition: code.cpp:10658
bool isEmpty() const
Definition: qcstring.h:189
static QCString g_classScope
Definition: code.cpp:10621
uint length() const
Definition: qcstring.h:195
virtual void setName(const char *name)
Definition: definition.cpp:396
static bool g_collectXRefs
Definition: code.cpp:10665
static CallContext g_theCallContext
Definition: code.cpp:10930
static QCString g_exampleName
Definition: code.cpp:10614
const bool FALSE
Definition: qglobal.h:370
ClassDef * findVariable(const QCString &name)
Definition: code.cpp:10837
static QCString className
Definition: declinfo.cpp:669
QCString left(uint len) const
Definition: qcstring.cpp:213
static void writeMultiLineCodeLink(CodeOutputInterface &ol, Definition *d, const char *text)
Definition: code.cpp:11137
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
bool isVariable() const
Definition: memberdef.cpp:4140
static bool g_exampleBlock
Definition: code.cpp:10613
static VariableContext g_theVarContext
Definition: code.cpp:10860
static bool getLink(const char *className, const char *memberName, CodeOutputInterface &ol, const char *text=0, bool varOnly=FALSE)
Definition: code.cpp:11439
static FileDef * g_sourceFileDef
Definition: code.cpp:10626
FileDef * getFileDef() const
Definition: memberdef.cpp:4075
static void codifyLines(const char *text)
Definition: code.cpp:11102
static MemberDef * setCallContextForVar(const QCString &name)
Definition: code.cpp:11255
static NamespaceDef * globalScope
Definition: doxygen.h:128
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Definition: util.cpp:8065
const QCString & name() const
Definition: definition.h:114
int count() const
Definition: code.cpp:10760
QCString right(uint len) const
Definition: qcstring.cpp:231
SrcLangExt getLanguage() const
static MemberDef * g_currentMemberDef
Definition: code.cpp:10629
void setLocalName(const QCString name)
static bool g_insideJava
Definition: code.cpp:10655
static QCString g_forceTagReference
Definition: code.cpp:10697
const char * data() const
Definition: qcstring.h:207
bool isLinkable() const
Definition: classdef.cpp:2729
virtual void writeCodeAnchor(const char *name)=0
static QCString g_exampleFile
Definition: code.cpp:10615
#define DBG_CTX(x)
Definition: code.cpp:10585
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:27
static int g_anchorCount
Definition: code.cpp:10625
virtual void codify(const char *s)=0
virtual Definition * getOuterScope() const
GroupDef * getGroupDef() const
Definition: memberdef.cpp:4095
void addDocCrossReference(MemberDef *src, MemberDef *dst)
Definition: util.cpp:8189
NamespaceDef * getResolvedNamespace(const char *name)
Definition: util.cpp:489
void setScope(Definition *d)
Definition: code.cpp:10882
static CodeOutputInterface * g_code
Definition: code.cpp:10597
static const ClassDef * dummyContext
Definition: code.cpp:10710
ClassDef * getResolvedClass(Definition *scope, FileDef *fileScope, const char *n, MemberDef **pTypeDef, QCString *pTemplSpec, bool mayBeUnlinkable, bool mayBeHidden, QCString *pResolvedType)
Definition: util.cpp:1563
bool isLinkable() const
Definition: memberdef.cpp:1161
static bool g_insideCS
Definition: code.cpp:10656
static bool g_insidePHP
Definition: code.cpp:10657
const bool TRUE
Definition: qglobal.h:371
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition: util.cpp:5088
static Definition * g_currentDefinition
Definition: code.cpp:10628
static void generateFunctionLink ( CodeOutputInterface ol,
const char *  funcName 
)
static

Definition at line 11841 of file code.cpp.

11842 {
11843  //CodeClassDef *ccd=0;
11844  ClassDef *ccd=0;
11845  QCString locScope=g_classScope;
11846  QCString locFunc=removeRedundantWhiteSpace(funcName);
11847  QCString funcScope;
11848  QCString funcWithScope=locFunc;
11849  QCString funcWithFullScope=locFunc;
11850  QCString fullScope=locScope;
11851  DBG_CTX((stdout,"*** locScope=%s locFunc=%s\n",locScope.data(),locFunc.data()));
11852  int len=2;
11853  int i=locFunc.findRev("::");
11855  funcName==g_currentMemberDef->localName() &&
11858  )
11859  {
11860  // special case where funcName is the name of a method that is also
11861  // defined on this line. In this case we can directly link to
11862  // g_currentMemberDef, which is not only faster, but
11863  // in case of overloaded methods, this will make sure that we link to
11864  // the correct method, and thereby get the correct reimplemented relations.
11865  // See also bug 549022.
11866  goto exit;
11867  }
11868  if (i==-1) i=locFunc.findRev("."),len=1;
11869  if (i==-1) i=locFunc.findRev("\\"),len=1; // for PHP
11870  if (i>0)
11871  {
11872  funcScope=locFunc.left(i);
11873  locFunc=locFunc.right(locFunc.length()-i-len).stripWhiteSpace();
11874  int ts=locScope.find('<'); // start of template
11875  int te=locScope.findRev('>'); // end of template
11876  //printf("ts=%d te=%d\n",ts,te);
11877  if (ts!=-1 && te!=-1 && te>ts)
11878  {
11879  // remove template from scope
11880  locScope=locScope.left(ts)+locScope.right(locScope.length()-te-1);
11881  }
11882  ts=funcScope.find('<'); // start of template
11883  te=funcScope.findRev('>'); // end of template
11884  //printf("ts=%d te=%d\n",ts,te);
11885  if (ts!=-1 && te!=-1 && te>ts)
11886  {
11887  // remove template from scope
11888  funcScope=funcScope.left(ts)+funcScope.right(funcScope.length()-te-1);
11889  }
11890  if (!funcScope.isEmpty())
11891  {
11892  funcWithScope = funcScope+"::"+locFunc;
11893  if (!locScope.isEmpty())
11894  {
11895  fullScope=locScope+"::"+funcScope;
11896  }
11897  }
11898  if (!locScope.isEmpty())
11899  {
11900  funcWithFullScope = locScope+"::"+funcWithScope;
11901  }
11902  }
11903  if (!fullScope.isEmpty() && (ccd=g_codeClassSDict->find(fullScope)))
11904  {
11905  //printf("using classScope %s\n",g_classScope.data());
11906  if (ccd->baseClasses())
11907  {
11908  BaseClassListIterator bcli(*ccd->baseClasses());
11909  for ( ; bcli.current() ; ++bcli)
11910  {
11911  if (getLink(bcli.current()->classDef->name(),locFunc,ol,funcName))
11912  {
11913  goto exit;
11914  }
11915  }
11916  }
11917  }
11918  if (!locScope.isEmpty() && fullScope!=locScope && (ccd=g_codeClassSDict->find(locScope)))
11919  {
11920  //printf("using classScope %s\n",g_classScope.data());
11921  if (ccd->baseClasses())
11922  {
11923  BaseClassListIterator bcli(*ccd->baseClasses());
11924  for ( ; bcli.current() ; ++bcli)
11925  {
11926  if (getLink(bcli.current()->classDef->name(),funcWithScope,ol,funcName))
11927  {
11928  goto exit;
11929  }
11930  }
11931  }
11932  }
11933  if (!getLink(locScope,funcWithScope,ol,funcName))
11934  {
11935  generateClassOrGlobalLink(ol,funcName);
11936  }
11937 exit:
11939  return;
11940 }
bool resize(uint newlen)
Definition: qcstring.h:225
static ClassSDict * g_codeClassSDict
Definition: code.cpp:10599
static void generateClassOrGlobalLink(CodeOutputInterface &ol, const char *clName, bool typeOnly=FALSE, bool varOnly=FALSE)
Definition: code.cpp:11461
bool isEmpty() const
Definition: qcstring.h:189
static QCString g_classScope
Definition: code.cpp:10621
uint length() const
Definition: qcstring.h:195
static bool generateClassMemberLink(CodeOutputInterface &ol, MemberDef *xmd, const char *memName)
Definition: code.cpp:11638
QCString left(uint len) const
Definition: qcstring.cpp:213
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
static bool getLink(const char *className, const char *memberName, CodeOutputInterface &ol, const char *text=0, bool varOnly=FALSE)
Definition: code.cpp:11439
int getDefLine() const
Definition: definition.h:188
QCString right(uint len) const
Definition: qcstring.cpp:231
static int g_yyLineNr
current line number
Definition: code.cpp:10609
static MemberDef * g_currentMemberDef
Definition: code.cpp:10629
static QCString g_forceTagReference
Definition: code.cpp:10697
const char * data() const
Definition: qcstring.h:207
ClassDef * getClassDef() const
Definition: memberdef.cpp:4070
#define DBG_CTX(x)
Definition: code.cpp:10585
QCString removeRedundantWhiteSpace(const QCString &s)
Definition: util.cpp:1655
T * find(const char *key)
Definition: sortdict.h:232
QCString localName() const
BaseClassList * baseClasses() const
Definition: classdef.cpp:4399
static void generateMemberLink ( CodeOutputInterface ol,
const QCString varName,
char *  memName 
)
static

Definition at line 11732 of file code.cpp.

11734 {
11735  //printf("generateMemberLink(object=%s,mem=%s) classScope=%s\n",
11736  // varName.data(),memName,g_classScope.data());
11737 
11738  if (varName.isEmpty()) return;
11739 
11740  // look for the variable in the current context
11741  ClassDef *vcd = g_theVarContext.findVariable(varName);
11742  if (vcd)
11743  {
11745  {
11746  //printf("Class found!\n");
11747  if (getLink(vcd->name(),memName,ol))
11748  {
11749  //printf("Found result!\n");
11750  return;
11751  }
11752  if (vcd->baseClasses())
11753  {
11754  BaseClassListIterator bcli(*vcd->baseClasses());
11755  for ( ; bcli.current() ; ++bcli)
11756  {
11757  if (getLink(bcli.current()->classDef->name(),memName,ol))
11758  {
11759  //printf("Found result!\n");
11760  return;
11761  }
11762  }
11763  }
11764  }
11765  }
11766  else // variable not in current context, maybe it is in a parent context
11767  {
11769  if (vcd && vcd->isLinkable())
11770  {
11771  //printf("Found class %s for variable `%s'\n",g_classScope.data(),varName.data());
11772  MemberName *vmn=Doxygen::memberNameSDict->find(varName);
11773  if (vmn==0)
11774  {
11775  int vi;
11776  QCString vn=varName;
11777  if ((vi=vn.findRev("::"))!=-1 || (vi=vn.findRev('.'))!=-1) // explicit scope A::b(), probably static member
11778  {
11779  ClassDef *jcd = getClass(vn.left(vi));
11780  vn=vn.right(vn.length()-vi-2);
11781  vmn=Doxygen::memberNameSDict->find(vn);
11782  //printf("Trying name `%s' scope=%s\n",vn.data(),scope.data());
11783  if (vmn)
11784  {
11785  MemberNameIterator vmni(*vmn);
11786  MemberDef *vmd;
11787  for (;(vmd=vmni.current());++vmni)
11788  {
11789  if (/*(vmd->isVariable() || vmd->isFunction()) && */
11790  vmd->getClassDef()==jcd)
11791  {
11792  //printf("Found variable type=%s\n",vmd->typeString());
11793  ClassDef *mcd=stripClassName(vmd->typeString(),vmd->getOuterScope());
11794  if (mcd && mcd->isLinkable())
11795  {
11796  if (generateClassMemberLink(ol,mcd,memName)) return;
11797  }
11798  }
11799  }
11800  }
11801  }
11802  }
11803  if (vmn)
11804  {
11805  //printf("There is a variable with name `%s'\n",varName);
11806  MemberNameIterator vmni(*vmn);
11807  MemberDef *vmd;
11808  for (;(vmd=vmni.current());++vmni)
11809  {
11810  if (/*(vmd->isVariable() || vmd->isFunction()) && */
11811  vmd->getClassDef()==vcd)
11812  {
11813  //printf("Found variable type=%s\n",vmd->typeString());
11814  ClassDef *mcd=stripClassName(vmd->typeString(),vmd->getOuterScope());
11815  if (mcd && mcd->isLinkable())
11816  {
11817  if (generateClassMemberLink(ol,mcd,memName)) return;
11818  }
11819  }
11820  }
11821  }
11822  }
11823  }
11824  // nothing found -> write result as is
11825  codifyLines(memName);
11826  addToSearchIndex(memName);
11827  return;
11828 }
static void addToSearchIndex(const char *text)
Definition: code.cpp:10981
static QCString varName
bool isEmpty() const
Definition: qcstring.h:189
static QCString g_classScope
Definition: code.cpp:10621
ClassDef * findVariable(const QCString &name)
Definition: code.cpp:10837
static bool generateClassMemberLink(CodeOutputInterface &ol, MemberDef *xmd, const char *memName)
Definition: code.cpp:11638
QCString left(uint len) const
Definition: qcstring.cpp:213
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
static VariableContext g_theVarContext
Definition: code.cpp:10860
ClassDef * getClass(const char *n)
Definition: util.cpp:472
static bool getLink(const char *className, const char *memberName, CodeOutputInterface &ol, const char *text=0, bool varOnly=FALSE)
Definition: code.cpp:11439
static FileDef * g_sourceFileDef
Definition: code.cpp:10626
static void codifyLines(const char *text)
Definition: code.cpp:11102
const char * typeString() const
Definition: memberdef.cpp:4035
const QCString & name() const
Definition: definition.h:114
QCString right(uint len) const
Definition: qcstring.cpp:231
bool isLinkable() const
Definition: classdef.cpp:2729
ClassDef * getClassDef() const
Definition: memberdef.cpp:4070
virtual Definition * getOuterScope() const
static MemberNameSDict * memberNameSDict
Definition: doxygen.h:115
static const ClassDef * dummyContext
Definition: code.cpp:10710
T * find(const char *key)
Definition: sortdict.h:232
ClassDef * getResolvedClass(Definition *scope, FileDef *fileScope, const char *n, MemberDef **pTypeDef, QCString *pTemplSpec, bool mayBeUnlinkable, bool mayBeHidden, QCString *pResolvedType)
Definition: util.cpp:1563
static ClassDef * stripClassName(const char *s, Definition *d=g_currentDefinition)
Definition: code.cpp:11227
BaseClassList * baseClasses() const
Definition: classdef.cpp:4399
static Definition * g_currentDefinition
Definition: code.cpp:10628
static void generatePHPVariableLink ( CodeOutputInterface ol,
const char *  varName 
)
static

Definition at line 11830 of file code.cpp.

11831 {
11832  QCString name = varName+7; // strip $this->
11833  name.prepend("$");
11834  //printf("generatePHPVariableLink(%s) name=%s scope=%s\n",varName,name.data(),g_classScope.data());
11835  if (!getLink(g_classScope,name,ol,varName))
11836  {
11838  }
11839 }
static QCString name
Definition: declinfo.cpp:673
static QCString varName
static QCString g_classScope
Definition: code.cpp:10621
static bool getLink(const char *className, const char *memberName, CodeOutputInterface &ol, const char *text=0, bool varOnly=FALSE)
Definition: code.cpp:11439
static void codifyLines(const char *text)
Definition: code.cpp:11102
QCString & prepend(const char *s)
Definition: qcstring.cpp:387
static bool getLink ( const char *  className,
const char *  memberName,
CodeOutputInterface ol,
const char *  text = 0,
bool  varOnly = FALSE 
)
static

Definition at line 11439 of file code.cpp.

11444 {
11445  //printf("getLink(%s,%s) g_curClassName=%s\n",className,memberName,g_curClassName.data());
11446  QCString m=removeRedundantWhiteSpace(memberName);
11448  if (!getLinkInScope(c,m,memberName,ol,text,varOnly))
11449  {
11450  if (!g_curClassName.isEmpty())
11451  {
11452  if (!c.isEmpty()) c.prepend("::");
11454  return getLinkInScope(c,m,memberName,ol,text,varOnly);
11455  }
11456  return FALSE;
11457  }
11458  return TRUE;
11459 }
bool isEmpty() const
Definition: qcstring.h:189
const bool FALSE
Definition: qglobal.h:370
static QCString className
Definition: declinfo.cpp:669
static QCString g_curClassName
Definition: code.cpp:10600
static bool getLinkInScope(const QCString &c, const QCString &m, const char *memberText, CodeOutputInterface &ol, const char *text, bool varOnly=FALSE)
Definition: code.cpp:11384
QCString & prepend(const char *s)
Definition: qcstring.cpp:387
QCString removeRedundantWhiteSpace(const QCString &s)
Definition: util.cpp:1655
const bool TRUE
Definition: qglobal.h:371
static bool getLinkInScope ( const QCString c,
const QCString m,
const char *  memberText,
CodeOutputInterface ol,
const char *  text,
bool  varOnly = FALSE 
)
static

Definition at line 11384 of file code.cpp.

11391 {
11392  MemberDef *md;
11393  ClassDef *cd;
11394  FileDef *fd;
11395  NamespaceDef *nd;
11396  GroupDef *gd;
11397  DBG_CTX((stderr,"getLinkInScope: trying `%s'::`%s' varOnly=%d\n",c.data(),m.data(),varOnly));
11398  if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,g_sourceFileDef,FALSE,g_forceTagReference) &&
11399  md->isLinkable() && (!varOnly || md->isVariable()))
11400  {
11401  //printf("found it %s!\n",md->qualifiedName().data());
11402  if (g_exampleBlock)
11403  {
11404  QCString anchor;
11405  anchor.sprintf("a%d",g_anchorCount);
11406  //printf("addExampleFile(%s,%s,%s)\n",anchor.data(),g_exampleName.data(),
11407  // g_exampleFile.data());
11408  if (md->addExample(anchor,g_exampleName,g_exampleFile))
11409  {
11410  ol.writeCodeAnchor(anchor);
11411  g_anchorCount++;
11412  }
11413  }
11414 
11416  md->getFileDef() : md->getOuterScope();
11417  if (md->getGroupDef()) d = md->getGroupDef();
11418  if (d && d->isLinkable())
11419  {
11421  //printf("g_currentDefinition=%p g_currentMemberDef=%p g_insideBody=%d\n",
11422  // g_currentDefinition,g_currentMemberDef,g_insideBody);
11423 
11426  {
11428  }
11429  //printf("d->getReference()=`%s' d->getOutputBase()=`%s' name=`%s' member name=`%s'\n",d->getReference().data(),d->getOutputFileBase().data(),d->name().data(),md->name().data());
11430 
11431  writeMultiLineCodeLink(ol,md, text ? text : memberText);
11432  addToSearchIndex(text ? text : memberText);
11433  return TRUE;
11434  }
11435  }
11436  return FALSE;
11437 }
static void addToSearchIndex(const char *text)
Definition: code.cpp:10981
virtual bool isLinkable() const =0
static bool g_insideBody
Definition: code.cpp:10633
static bool g_collectXRefs
Definition: code.cpp:10665
static CallContext g_theCallContext
Definition: code.cpp:10930
static QCString g_exampleName
Definition: code.cpp:10614
const bool FALSE
Definition: qglobal.h:370
static void writeMultiLineCodeLink(CodeOutputInterface &ol, Definition *d, const char *text)
Definition: code.cpp:11137
bool isVariable() const
Definition: memberdef.cpp:4140
static bool g_exampleBlock
Definition: code.cpp:10613
static FileDef * g_sourceFileDef
Definition: code.cpp:10626
FileDef * getFileDef() const
Definition: memberdef.cpp:4075
static NamespaceDef * globalScope
Definition: doxygen.h:128
const char * typeString() const
Definition: memberdef.cpp:4035
bool getDefs(const QCString &scName, const QCString &mbName, const char *args, MemberDef *&md, ClassDef *&cd, FileDef *&fd, NamespaceDef *&nd, GroupDef *&gd, bool forceEmptyScope, FileDef *currentFile, bool checkCV, const char *forceTagFile)
Definition: util.cpp:3932
static MemberDef * g_currentMemberDef
Definition: code.cpp:10629
static QCString g_forceTagReference
Definition: code.cpp:10697
const char * data() const
Definition: qcstring.h:207
virtual void writeCodeAnchor(const char *name)=0
static QCString g_exampleFile
Definition: code.cpp:10615
#define DBG_CTX(x)
Definition: code.cpp:10585
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:27
static int g_anchorCount
Definition: code.cpp:10625
virtual Definition * getOuterScope() const
GroupDef * getGroupDef() const
Definition: memberdef.cpp:4095
void addDocCrossReference(MemberDef *src, MemberDef *dst)
Definition: util.cpp:8189
void setScope(Definition *d)
Definition: code.cpp:10882
bool addExample(const char *anchor, const char *name, const char *file)
Definition: memberdef.cpp:915
static ClassDef * stripClassName(const char *s, Definition *d=g_currentDefinition)
Definition: code.cpp:11227
bool isLinkable() const
Definition: memberdef.cpp:1161
const bool TRUE
Definition: qglobal.h:371
static Definition * g_currentDefinition
Definition: code.cpp:10628
if ( yy_init)

Definition at line 12571 of file code.cpp.

12572  {
12573  (yy_init) = 1;
12574 
12575 #ifdef YY_USER_INIT
12576  YY_USER_INIT;
12577 #endif
12578 
12579  /* Create the reject buffer large enough to save one state per allowed character. */
12580  if ( ! (yy_state_buf) )
12582  if ( ! (yy_state_buf) )
12583  YY_FATAL_ERROR( "out of dynamic memory in codeYYlex()" );
12584 
12585  if ( ! (yy_start) )
12586  (yy_start) = 1; /* first start state */
12587 
12588  if ( ! codeYYin )
12589  codeYYin = stdin;
12590 
12591  if ( ! codeYYout )
12592  codeYYout = stdout;
12593 
12594  if ( ! YY_CURRENT_BUFFER ) {
12598  }
12599 
12601  }
static yy_state_type * yy_state_buf
Definition: code.cpp:10516
#define YY_FATAL_ERROR(msg)
Definition: code.cpp:12524
static int yy_start
Definition: code.cpp:299
#define YY_BUF_SIZE
Definition: code.cpp:163
int yy_state_type
Definition: code.cpp:361
static void codeYY_load_buffer_state(void)
Definition: code.cpp:15820
void * codeYYalloc(yy_size_t)
Definition: code.cpp:16305
FILE * codeYYin
Definition: code.cpp:359
#define YY_STATE_BUF_SIZE
Definition: code.cpp:168
FILE * codeYYout
Definition: code.cpp:359
#define YY_CURRENT_BUFFER_LVALUE
Definition: code.cpp:289
#define YY_CURRENT_BUFFER
Definition: code.cpp:282
static int yy_init
Definition: code.cpp:298
YY_BUFFER_STATE codeYY_create_buffer(FILE *file, int size)
Definition: code.cpp:15834
static void codeYYensure_buffer_stack(void)
Definition: code.cpp:15987
static int input ( void  )
static

Definition at line 15695 of file code.cpp.

15698 {
15699  int c;
15700 
15701  *(yy_c_buf_p) = (yy_hold_char);
15702 
15703  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
15704  {
15705  /* yy_c_buf_p now points to the character we want to return.
15706  * If this occurs *before* the EOB characters, then it's a
15707  * valid NUL; if not, then we've hit the end of the buffer.
15708  */
15709  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
15710  /* This was really a NUL. */
15711  *(yy_c_buf_p) = '\0';
15712 
15713  else
15714  { /* need more input */
15715  int offset = (yy_c_buf_p) - (yytext_ptr);
15716  ++(yy_c_buf_p);
15717 
15718  switch ( yy_get_next_buffer( ) )
15719  {
15720  case EOB_ACT_LAST_MATCH:
15721  /* This happens because yy_g_n_b()
15722  * sees that we've accumulated a
15723  * token and flags that we need to
15724  * try matching the token before
15725  * proceeding. But for input(),
15726  * there's no matching to consider.
15727  * So convert the EOB_ACT_LAST_MATCH
15728  * to EOB_ACT_END_OF_FILE.
15729  */
15730 
15731  /* Reset buffer status. */
15733 
15734  /*FALLTHROUGH*/
15735 
15736  case EOB_ACT_END_OF_FILE:
15737  {
15738  if ( codeYYwrap( ) )
15739  return EOF;
15740 
15741  if ( ! (yy_did_buffer_switch_on_eof) )
15742  YY_NEW_FILE;
15743 #ifdef __cplusplus
15744  return yyinput();
15745 #else
15746  return input();
15747 #endif
15748  }
15749 
15750  case EOB_ACT_CONTINUE_SCAN:
15751  (yy_c_buf_p) = (yytext_ptr) + offset;
15752  break;
15753  }
15754  }
15755  }
15756 
15757  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
15758  *(yy_c_buf_p) = '\0'; /* preserve codeYYtext */
15759  (yy_hold_char) = *++(yy_c_buf_p);
15760 
15761  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
15762 
15763  return c;
15764 }
#define EOB_ACT_END_OF_FILE
Definition: code.cpp:180
void codeYYrestart(FILE *input_file)
Definition: code.cpp:15772
static int yy_did_buffer_switch_on_eof
Definition: code.cpp:304
static char yy_hold_char
Definition: code.cpp:292
static int yy_get_next_buffer(void)
Definition: code.cpp:15498
#define yytext_ptr
Definition: code.cpp:368
#define YY_END_OF_BUFFER_CHAR
Definition: code.cpp:159
#define EOB_ACT_LAST_MATCH
Definition: code.cpp:181
static int input(void)
Definition: code.cpp:15695
#define codeYYwrap(n)
Definition: code.cpp:354
FILE * codeYYin
Definition: code.cpp:359
static char * yy_c_buf_p
Definition: code.cpp:297
#define YY_CURRENT_BUFFER_LVALUE
Definition: code.cpp:289
#define YY_NEW_FILE
Definition: code.cpp:157
#define EOB_ACT_CONTINUE_SCAN
Definition: code.cpp:179
static int yy_n_chars
Definition: code.cpp:293
static void nextCodeLine ( )
static

Definition at line 11088 of file code.cpp.

11089 {
11090  const char * fc = g_currentFontClass;
11091  endCodeLine();
11092  if (g_yyLineNr<g_inputLines)
11093  {
11094  g_currentFontClass = fc;
11095  startCodeLine();
11096  }
11097 }
static int g_inputLines
number of line in the code fragment
Definition: code.cpp:10608
static void startCodeLine()
Definition: code.cpp:11021
static int g_yyLineNr
current line number
Definition: code.cpp:10609
static void endCodeLine()
Definition: code.cpp:11081
static const char * g_currentFontClass
Definition: code.cpp:10631
void parseCCode ( CodeOutputInterface od,
const char *  className,
const QCString s,
SrcLangExt  lang,
bool  exBlock,
const char *  exName,
FileDef fd,
int  startLine,
int  endLine,
bool  inlineFragment,
MemberDef memberDef,
bool  showLineNumbers,
Definition searchCtx,
bool  collectXRefs 
)

Definition at line 16397 of file code.cpp.

16402 {
16403  //printf("***parseCode() exBlock=%d exName=%s fd=%p className=%s searchCtx=%s\n",
16404  // exBlock,exName,fd,className,searchCtx?searchCtx->name().data():"<none>");
16405 
16406  if (s.isEmpty()) return;
16407 
16408  printlex(codeYY_flex_debug, TRUE, __FILE__, fd ? fd->fileName().data(): NULL);
16409 
16411  if (g_codeClassSDict==0)
16412  {
16414  }
16415  g_code = &od;
16416  g_inputString = s;
16417  g_inputPosition = 0;
16418  g_currentFontClass = 0;
16420  g_searchCtx = searchCtx;
16423  if (endLine!=-1)
16424  g_inputLines = endLine+1;
16425  else
16427 
16428  if (startLine!=-1)
16429  g_yyLineNr = startLine;
16430  else
16431  g_yyLineNr = 1;
16432 
16433  g_curlyCount = 0;
16434  g_bodyCurlyCount = 0;
16435  g_bracketCount = 0;
16436  g_sharpCount = 0;
16439  g_scopeStack.clear();
16441  //printf("parseCCode %s\n",className);
16442  g_exampleBlock = exBlock;
16443  g_exampleName = exName;
16444  g_sourceFileDef = fd;
16445  g_lineNumbers = fd!=0 && showLineNumbers;
16446  bool cleanupSourceDef = FALSE;
16447  if (fd==0)
16448  {
16449  // create a dummy filedef for the example
16450  g_sourceFileDef = new FileDef("",(exName?exName:"generated"));
16451  cleanupSourceDef = TRUE;
16452  }
16453  g_insideObjC = lang==SrcLangExt_ObjC;
16454  g_insideJava = lang==SrcLangExt_Java;
16455  g_insideCS = lang==SrcLangExt_CSharp;
16456  g_insidePHP = lang==SrcLangExt_PHP;
16457  if (g_sourceFileDef)
16458  {
16459  setCurrentDoc("l00001");
16460  }
16461  g_currentDefinition = 0;
16462  g_currentMemberDef = 0;
16463  g_searchingForBody = exBlock;
16464  g_insideBody = FALSE;
16465  g_bracketCount = 0;
16466  if (!g_exampleName.isEmpty())
16467  {
16469  //printf("g_exampleFile=%s\n",g_exampleFile.data());
16470  }
16471  g_includeCodeFragment = inlineFragment;
16472  //printf("** exBlock=%d exName=%s include=%d\n",exBlock,exName,inlineFragment);
16473  startCodeLine();
16474  g_type.resize(0);
16475  g_name.resize(0);
16476  g_args.resize(0);
16477  g_parmName.resize(0);
16478  g_parmType.resize(0);
16479  if (memberDef) setParameterList(memberDef);
16481  BEGIN( Body );
16482  codeYYlex();
16483  g_lexInit=TRUE;
16484  if (g_needsTermination)
16485  {
16486  endFontClass();
16487  DBG_CTX((stderr,"endCodeLine(%d)\n",g_yyLineNr));
16488  g_code->endCodeLine();
16489  }
16490  if (fd)
16491  {
16493  }
16494  if (cleanupSourceDef)
16495  {
16496  // delete the temporary file definition used for this example
16497  delete g_sourceFileDef;
16498  g_sourceFileDef=0;
16499  }
16500 
16501  printlex(codeYY_flex_debug, FALSE, __FILE__, fd ? fd->fileName().data(): NULL);
16502  return;
16503 }
void codeYYrestart(FILE *input_file)
Definition: code.cpp:15772
bool resize(uint newlen)
Definition: qcstring.h:225
static const char * g_inputString
the code fragment as text
Definition: code.cpp:10606
static int g_sharpCount
Definition: code.cpp:10641
static ClassSDict * g_codeClassSDict
Definition: code.cpp:10599
static int g_curlyCount
Definition: code.cpp:10640
int codeYY_flex_debug
Definition: code.cpp:10514
bool isEmpty() const
Definition: qcstring.h:189
static QCString g_classScope
Definition: code.cpp:10621
void printlex(int dbg, bool enter, const char *lexName, const char *fileName)
Definition: message.cpp:242
static int g_inputLines
number of line in the code fragment
Definition: code.cpp:10608
static bool g_insideBody
Definition: code.cpp:10633
static int g_bracketCount
Definition: code.cpp:10639
static void endFontClass()
Definition: code.cpp:11962
int codeYYlex(void)
static bool g_collectXRefs
Definition: code.cpp:10665
static void startCodeLine()
Definition: code.cpp:11021
static CallContext g_theCallContext
Definition: code.cpp:10930
static QCString g_exampleName
Definition: code.cpp:10614
const bool FALSE
Definition: qglobal.h:370
static QCString className
Definition: declinfo.cpp:669
static bool g_lexInit
Definition: code.cpp:10660
void clearTooltips()
Definition: tooltip.cpp:54
#define Body
Definition: code.cpp:12357
void resetCCodeParserState()
Definition: code.cpp:16382
static bool g_exampleBlock
Definition: code.cpp:10613
static int g_inputPosition
read offset during parsing
Definition: code.cpp:10607
static QCString g_parmName
Definition: code.cpp:10604
static int countLines()
Definition: code.cpp:11943
static bool g_needsTermination
Definition: code.cpp:10611
static FileDef * g_sourceFileDef
Definition: code.cpp:10626
static QCString g_parmType
Definition: code.cpp:10603
static Definition * g_searchCtx
Definition: code.cpp:10664
static QStack< int > g_scopeStack
1 if bracket starts a scope,
Definition: code.cpp:10623
void clear()
Definition: code.cpp:10914
static void setParameterList(MemberDef *md)
Definition: code.cpp:11206
static QCString g_args
Definition: code.cpp:10620
static int g_yyLineNr
current line number
Definition: code.cpp:10609
static bool g_insideTemplate
Definition: code.cpp:10617
static bool g_inFunctionTryBlock
Definition: code.cpp:10642
static MemberDef * g_currentMemberDef
Definition: code.cpp:10629
static bool g_insideJava
Definition: code.cpp:10655
static QCString g_name
Definition: code.cpp:10619
const char * data() const
Definition: qcstring.h:207
static QCString g_exampleFile
Definition: code.cpp:10615
#define DBG_CTX(x)
Definition: code.cpp:10585
#define BEGIN
Definition: code.cpp:144
FILE * codeYYin
Definition: code.cpp:359
static bool g_lineNumbers
Definition: code.cpp:10627
void writeTooltips(CodeOutputInterface &ol)
Definition: tooltip.cpp:93
static bool g_searchingForBody
Definition: code.cpp:10632
static TooltipManager * instance()
Definition: tooltip.cpp:45
QCString fileName() const
Definition: filedef.h:81
static bool g_insideObjC
Definition: code.cpp:10654
QCString convertNameToFile(const char *name, bool allowDots, bool allowUnderscore)
Definition: util.cpp:5354
static int g_bodyCurlyCount
Definition: code.cpp:10634
static void setCurrentDoc(const QCString &anchor)
Definition: code.cpp:10966
static CodeOutputInterface * g_code
Definition: code.cpp:10597
virtual void endCodeLine()=0
static bool g_insideCS
Definition: code.cpp:10656
static const char * g_currentFontClass
Definition: code.cpp:10631
static bool g_insidePHP
Definition: code.cpp:10657
static bool g_includeCodeFragment
Definition: code.cpp:10630
static QCString g_type
Definition: code.cpp:10618
static QCString * s
Definition: config.cpp:1042
const bool TRUE
Definition: qglobal.h:371
bool collectXRefs
static Definition * g_currentDefinition
Definition: code.cpp:10628
static void popScope ( )
static

remove the top class/namespace name from the scope

Definition at line 10951 of file code.cpp.

10952 {
10953  if (!g_classScopeLengthStack.isEmpty())
10954  {
10955  int *pLength = g_classScopeLengthStack.pop();
10956  g_classScope.truncate(*pLength);
10957  delete pLength;
10958  }
10959  else
10960  {
10961  //err("Too many end of scopes found!\n");
10962  }
10963  //printf("popScope() result: `%s'\n",g_classScope.data());
10964 }
static QCString g_classScope
Definition: code.cpp:10621
static QStack< int > g_classScopeLengthStack
Definition: code.cpp:10662
bool truncate(uint pos)
Definition: qcstring.h:232
static void pushScope ( const char *  s)
static

add class/namespace name s to the scope

Definition at line 10935 of file code.cpp.

10936 {
10937  g_classScopeLengthStack.push(new int(g_classScope.length()));
10939  {
10940  g_classScope = s;
10941  }
10942  else
10943  {
10944  g_classScope += "::";
10945  g_classScope += s;
10946  }
10947  //printf("pushScope(%s) result: `%s'\n",s,g_classScope.data());
10948 }
bool isEmpty() const
Definition: qcstring.h:189
static QCString g_classScope
Definition: code.cpp:10621
uint length() const
Definition: qcstring.h:195
bool leftScopeMatch(const QCString &scope, const QCString &name)
Definition: util.cpp:1904
static QStack< int > g_classScopeLengthStack
Definition: code.cpp:10662
static QCString * s
Definition: config.cpp:1042
void resetCCodeParserState ( )

Definition at line 16382 of file code.cpp.

16383 {
16384  //printf("***initParseCodeContext()\n");
16387  g_classScopeLengthStack.setAutoDelete(TRUE);
16388  g_classScopeLengthStack.clear();
16389  delete g_codeClassSDict;
16390  g_codeClassSDict = new ClassSDict(17);
16394  g_anchorCount = 0;
16395 }
bool resize(uint newlen)
Definition: qcstring.h:225
void clear()
Definition: sortdict.h:276
static ClassSDict * g_codeClassSDict
Definition: code.cpp:10599
void clear()
Definition: code.cpp:10745
static VariableContext g_theVarContext
Definition: code.cpp:10860
void setAutoDelete(bool val)
Definition: sortdict.h:222
static QCString g_forceTagReference
Definition: code.cpp:10697
static QStrList g_curClassBases
Definition: code.cpp:10601
static int g_anchorCount
Definition: code.cpp:10625
static QStack< int > g_classScopeLengthStack
Definition: code.cpp:10662
const bool TRUE
Definition: qglobal.h:371
static void restoreObjCContext ( )
static

Definition at line 16366 of file code.cpp.

16367 {
16368  //printf("restore state=%d->%d\n",YY_START,g_currentCtx->lexState);
16371  if (!g_contextStack.isEmpty())
16372  {
16373  g_currentCtx = g_contextStack.pop();
16374  }
16375  else
16376  {
16377  g_currentCtx = 0;
16378  //printf("Trying to pop context while g_contextStack is empty!\n");
16379  }
16380 }
static ObjCCallCtx * g_currentCtx
Definition: code.cpp:10682
int braceCount
Definition: code.cpp:10678
static int g_braceCount
Definition: code.cpp:10692
#define BEGIN
Definition: code.cpp:144
int lexState
Definition: code.cpp:10677
static QStack< ObjCCallCtx > g_contextStack
Definition: code.cpp:10687
static void saveObjCContext ( )
static

Definition at line 16336 of file code.cpp.

16337 {
16338  if (g_currentCtx)
16339  {
16341  if (g_braceCount==0 && YY_START==ObjCCall)
16342  {
16344  //printf("new type=%s\n",g_currentCtx->objectTypeOrName.data());
16345  }
16347  }
16348  else
16349  {
16350  //printf("Trying to save NULL context!\n");
16351  }
16352  ObjCCallCtx *newCtx = new ObjCCallCtx;
16353  newCtx->id = g_currentCtxId;
16354  newCtx->lexState = YY_START;
16355  newCtx->braceCount = g_braceCount;
16356  newCtx->objectType = 0;
16357  newCtx->objectVar = 0;
16358  newCtx->method = 0;
16359  //printf("save state=%d\n",YY_START);
16360  g_contextDict.insert(g_currentCtxId,newCtx);
16361  g_currentCtx = newCtx;
16362  g_braceCount = 0;
16363  g_currentCtxId++;
16364 }
#define YY_START
Definition: code.cpp:150
QCString objectTypeOrName
Definition: code.cpp:10672
QCString format
Definition: code.cpp:10676
static ObjCCallCtx * g_currentCtx
Definition: code.cpp:10682
int braceCount
Definition: code.cpp:10678
MemberDef * method
Definition: code.cpp:10675
static int g_braceCount
Definition: code.cpp:10692
#define ObjCCall
Definition: code.cpp:12377
static int g_currentCtxId
Definition: code.cpp:10683
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:27
MemberDef * objectVar
Definition: code.cpp:10674
ClassDef * objectType
Definition: code.cpp:10673
int lexState
Definition: code.cpp:10677
static QIntDict< ObjCCallCtx > g_contextDict
Definition: code.cpp:10688
static QStack< ObjCCallCtx > g_contextStack
Definition: code.cpp:10687
static MemberDef* setCallContextForVar ( const QCString name)
static

Definition at line 11255 of file code.cpp.

11256 {
11257  if (name.isEmpty()) return 0;
11258  DBG_CTX((stderr,"setCallContextForVar(%s) g_classScope=%s\n",name.data(),g_classScope.data()));
11259 
11260  int scopeEnd = name.findRev("::");
11261  if (scopeEnd!=-1) // name with explicit scope
11262  {
11263  QCString scope = name.left(scopeEnd);
11264  QCString locName = name.right(name.length()-scopeEnd-2);
11265  //printf("explicit scope: name=%s scope=%s\n",locName.data(),scope.data());
11266  ClassDef *mcd = getClass(scope);
11267  if (mcd && !locName.isEmpty())
11268  {
11269  MemberDef *md=mcd->getMemberByName(locName);
11270  if (md)
11271  {
11272  //printf("name=%s scope=%s\n",locName.data(),scope.data());
11274  return md;
11275  }
11276  }
11277  else // check namespace as well
11278  {
11279  NamespaceDef *mnd = getResolvedNamespace(scope);
11280  if (mnd && !locName.isEmpty())
11281  {
11282  MemberDef *md=mnd->getMemberByName(locName);
11283  if (md)
11284  {
11285  //printf("name=%s scope=%s\n",locName.data(),scope.data());
11287  return md;
11288  }
11289  }
11290  }
11291  }
11292 
11293  MemberName *mn;
11294  ClassDef *mcd = g_theVarContext.findVariable(name);
11295  if (mcd) // local variable
11296  {
11297  DBG_CTX((stderr,"local variable?\n"));
11299  {
11300  DBG_CTX((stderr,"local var `%s' mcd=%s\n",name.data(),mcd->name().data()));
11302  }
11303  }
11304  else
11305  {
11306  DBG_CTX((stderr,"class member? scope=%s\n",g_classScope.data()));
11307  // look for a class member
11308  mcd = getClass(g_classScope);
11309  if (mcd)
11310  {
11311  DBG_CTX((stderr,"Inside class %s\n",mcd->name().data()));
11312  MemberDef *md=mcd->getMemberByName(name);
11313  if (md)
11314  {
11315  DBG_CTX((stderr,"Found member %s\n",md->name().data()));
11316  if (g_scopeStack.top()!=CLASSBLOCK)
11317  {
11318  DBG_CTX((stderr,"class member `%s' mcd=%s\n",name.data(),mcd->name().data()));
11320  }
11321  return md;
11322  }
11323  }
11324  }
11325 
11326  // look for a global member
11327  if ((mn=Doxygen::functionNameSDict->find(name)))
11328  {
11329  //printf("global var `%s'\n",name.data());
11330  if (mn->count()==1) // global defined only once
11331  {
11332  MemberDef *md=mn->getFirst();
11333  if (!md->isStatic() || md->getBodyDef()==g_sourceFileDef)
11334  {
11336  return md;
11337  }
11338  return 0;
11339  }
11340  else if (mn->count()>1) // global defined more than once
11341  {
11342  MemberNameIterator it(*mn);
11343  MemberDef *md;
11344  for (;(md=it.current());++it)
11345  {
11346  //printf("mn=%p md=%p md->getBodyDef()=%p g_sourceFileDef=%p\n",
11347  // mn,md,
11348  // md->getBodyDef(),g_sourceFileDef);
11349 
11350  // in case there are multiple members we could link to, we
11351  // only link to members if defined in the same file or
11352  // defined as external.
11353  if ((!md->isStatic() || md->getBodyDef()==g_sourceFileDef) &&
11355  )
11356  {
11358  //printf("returning member %s in source file %s\n",md->name().data(),g_sourceFileDef->name().data());
11359  return md;
11360  }
11361  }
11362  return 0;
11363  }
11364  }
11365  return 0;
11366 }
static MemberNameSDict * functionNameSDict
Definition: doxygen.h:116
#define CLASSBLOCK
Definition: code.cpp:10589
static QCString scope
Definition: declinfo.cpp:668
MemberDef * getMemberByName(const QCString &) const
bool isEmpty() const
Definition: qcstring.h:189
QCString getReference() const
Definition: memberdef.cpp:1001
static QCString g_classScope
Definition: code.cpp:10621
uint length() const
Definition: qcstring.h:195
FileDef * getBodyDef() const
static CallContext g_theCallContext
Definition: code.cpp:10930
ClassDef * findVariable(const QCString &name)
Definition: code.cpp:10837
QCString left(uint len) const
Definition: qcstring.cpp:213
MemberDef * getMemberByName(const QCString &) const
Definition: classdef.cpp:3968
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
static VariableContext g_theVarContext
Definition: code.cpp:10860
ClassDef * getClass(const char *n)
Definition: util.cpp:472
static FileDef * g_sourceFileDef
Definition: code.cpp:10626
const char * typeString() const
Definition: memberdef.cpp:4035
uint count() const
Definition: qlist.h:66
static QStack< int > g_scopeStack
1 if bracket starts a scope,
Definition: code.cpp:10623
const QCString & name() const
Definition: definition.h:114
QCString right(uint len) const
Definition: qcstring.cpp:231
static QCString g_forceTagReference
Definition: code.cpp:10697
const char * data() const
Definition: qcstring.h:207
type * getFirst() const
Definition: qlist.h:95
#define DBG_CTX(x)
Definition: code.cpp:10585
virtual Definition * getOuterScope() const
NamespaceDef * getResolvedNamespace(const char *name)
Definition: util.cpp:489
void setScope(Definition *d)
Definition: code.cpp:10882
bool isStatic() const
Definition: memberdef.cpp:4205
static const ClassDef * dummyContext
Definition: code.cpp:10710
static ClassDef * stripClassName(const char *s, Definition *d=g_currentDefinition)
Definition: code.cpp:11227
static void setClassScope ( const QCString name)
static

Definition at line 10989 of file code.cpp.

10990 {
10991  //printf("setClassScope(%s)\n",name.data());
10992  QCString n=name;
10993  n=n.simplifyWhiteSpace();
10994  int ts=n.find('<'); // start of template
10995  int te=n.findRev('>'); // end of template
10996  //printf("ts=%d te=%d\n",ts,te);
10997  if (ts!=-1 && te!=-1 && te>ts)
10998  {
10999  // remove template from scope
11000  n=n.left(ts)+n.right(n.length()-te-1);
11001  }
11002  while (!g_classScopeLengthStack.isEmpty())
11003  {
11004  popScope();
11005  }
11006  g_classScope.resize(0);
11007  int i;
11008  while ((i=n.find("::"))!=-1)
11009  {
11010  pushScope(n.left(i));
11011  n = n.mid(i+2);
11012  }
11013  pushScope(n);
11014  //printf("--->New class scope `%s'\n",g_classScope.data());
11015 }
static QCString name
Definition: declinfo.cpp:673
bool resize(uint newlen)
Definition: qcstring.h:225
static QCString g_classScope
Definition: code.cpp:10621
uint length() const
Definition: qcstring.h:195
static void popScope()
Definition: code.cpp:10951
static void pushScope(const char *s)
Definition: code.cpp:10935
QCString left(uint len) const
Definition: qcstring.cpp:213
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
QCString right(uint len) const
Definition: qcstring.cpp:231
std::void_t< T > n
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
static QStack< int > g_classScopeLengthStack
Definition: code.cpp:10662
QCString simplifyWhiteSpace() const
Definition: qcstring.cpp:323
static void setCurrentDoc ( const QCString anchor)
static

Definition at line 10966 of file code.cpp.

10967 {
10969  {
10970  if (g_searchCtx)
10971  {
10973  }
10974  else
10975  {
10977  }
10978  }
10979 }
const bool FALSE
Definition: qglobal.h:370
virtual void setCurrentDoc(Definition *context, const char *anchor, bool isSourceFile)=0
static FileDef * g_sourceFileDef
Definition: code.cpp:10626
static Definition * g_searchCtx
Definition: code.cpp:10664
static SearchIndexIntf * searchIndex
Definition: doxygen.h:133
static CodeOutputInterface * g_code
Definition: code.cpp:10597
const bool TRUE
Definition: qglobal.h:371
virtual QCString anchor() const =0
static void setParameterList ( MemberDef md)
static

Definition at line 11206 of file code.cpp.

11207 {
11208  g_classScope = md->getClassDef() ? md->getClassDef()->name().data() : "";
11209  ArgumentList *al = md->argumentList();
11210  if (al==0) return;
11211  ArgumentListIterator it(*al);
11212  Argument *a;
11213  for (;(a=it.current());++it)
11214  {
11215  g_parmName = a->name.copy();
11216  g_parmType = a->type.copy();
11217  int i = g_parmType.find('*');
11218  if (i!=-1) g_parmType = g_parmType.left(i);
11219  i = g_parmType.find('&');
11220  if (i!=-1) g_parmType = g_parmType.left(i);
11221  g_parmType.stripPrefix("const ");
11224  }
11225 }
void addVariable(const QCString &type, const QCString &name)
Definition: code.cpp:10767
QCString type
Definition: arguments.h:67
This class represents an function or template argument list.
Definition: arguments.h:82
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
static QCString g_classScope
Definition: code.cpp:10621
QCString left(uint len) const
Definition: qcstring.cpp:213
bool stripPrefix(const char *prefix)
Definition: qcstring.cpp:201
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
static QCString g_parmName
Definition: code.cpp:10604
static VariableContext g_theVarContext
Definition: code.cpp:10860
QCString copy() const
Definition: qcstring.h:250
static QCString g_parmType
Definition: code.cpp:10603
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
const QCString & name() const
Definition: definition.h:114
const double a
const char * data() const
Definition: qcstring.h:207
ClassDef * getClassDef() const
Definition: memberdef.cpp:4070
ArgumentList * argumentList() const
Definition: memberdef.cpp:4512
QCString name
Definition: arguments.h:69
static void startCodeLine ( )
static

start a new line of code, inserting a line number if g_sourceFileDef is TRUE. If a definition starts at the current line, then the line number is linked to the documentation of that definition.

Definition at line 11021 of file code.cpp.

11022 {
11023  //if (g_currentFontClass) { g_code->endFontClass(); }
11025  {
11026  //QCString lineNumber,lineAnchor;
11027  //lineNumber.sprintf("%05d",g_yyLineNr);
11028  //lineAnchor.sprintf("l%05d",g_yyLineNr);
11029 
11031  //printf("%s:startCodeLine(%d)=%p\n",g_sourceFileDef->name().data(),g_yyLineNr,d);
11032  if (!g_includeCodeFragment && d)
11033  {
11036  g_insideBody = FALSE;
11038  g_realScope = d->name();
11039  //g_classScope = "";
11040  g_type.resize(0);
11041  g_name.resize(0);
11042  g_args.resize(0);
11043  g_parmType.resize(0);
11044  g_parmName.resize(0);
11045  //printf("Real scope: `%s'\n",g_realScope.data());
11046  g_bodyCurlyCount = 0;
11047  QCString lineAnchor;
11048  lineAnchor.sprintf("l%05d",g_yyLineNr);
11049  if (g_currentMemberDef)
11050  {
11054  setCurrentDoc(lineAnchor);
11055  }
11056  else if (d->isLinkableInProject())
11057  {
11059  d->getOutputFileBase(),
11060  0,g_yyLineNr);
11061  setCurrentDoc(lineAnchor);
11062  }
11063  }
11064  else
11065  {
11067  }
11068  }
11069  DBG_CTX((stderr,"startCodeLine(%d)\n",g_yyLineNr));
11071  if (g_currentFontClass)
11072  {
11074  }
11075 }
bool resize(uint newlen)
Definition: qcstring.h:225
virtual QCString getReference() const
QCString getReference() const
Definition: memberdef.cpp:1001
virtual void writeLineNumber(const char *ref, const char *file, const char *anchor, int lineNumber)=0
MemberDef * getSourceMember(int lineNr) const
Definition: filedef.cpp:1226
static bool g_insideBody
Definition: code.cpp:10633
virtual bool isLinkableInProject() const =0
const bool FALSE
Definition: qglobal.h:370
virtual void startFontClass(const char *clsName)=0
virtual QCString getOutputFileBase() const =0
static QCString g_parmName
Definition: code.cpp:10604
static FileDef * g_sourceFileDef
Definition: code.cpp:10626
static QCString g_parmType
Definition: code.cpp:10603
const QCString & name() const
Definition: definition.h:114
static QCString g_args
Definition: code.cpp:10620
static int g_yyLineNr
current line number
Definition: code.cpp:10609
Definition * getSourceDefinition(int lineNr) const
Definition: filedef.cpp:1215
static MemberDef * g_currentMemberDef
Definition: code.cpp:10629
static QCString g_name
Definition: code.cpp:10619
QCString anchor() const
Definition: memberdef.cpp:1031
#define DBG_CTX(x)
Definition: code.cpp:10585
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:27
static bool g_lineNumbers
Definition: code.cpp:10627
static QCString g_realScope
Definition: code.cpp:10622
virtual void startCodeLine(bool hasLineNumbers)=0
static bool g_searchingForBody
Definition: code.cpp:10632
static int g_bodyCurlyCount
Definition: code.cpp:10634
static void setCurrentDoc(const QCString &anchor)
Definition: code.cpp:10966
QCString getOutputFileBase() const
Definition: memberdef.cpp:941
static CodeOutputInterface * g_code
Definition: code.cpp:10597
static const char * g_currentFontClass
Definition: code.cpp:10631
static bool g_includeCodeFragment
Definition: code.cpp:10630
static QCString g_type
Definition: code.cpp:10618
const bool TRUE
Definition: qglobal.h:371
static Definition * g_currentDefinition
Definition: code.cpp:10628
static void startFontClass ( const char *  s)
static

Definition at line 11971 of file code.cpp.

11972 {
11973  endFontClass();
11976 }
static void endFontClass()
Definition: code.cpp:11962
virtual void startFontClass(const char *clsName)=0
static CodeOutputInterface * g_code
Definition: code.cpp:10597
static const char * g_currentFontClass
Definition: code.cpp:10631
static QCString * s
Definition: config.cpp:1042
static ClassDef* stripClassName ( const char *  s,
Definition d = g_currentDefinition 
)
static

Definition at line 11227 of file code.cpp.

11228 {
11229  int pos=0;
11230  QCString type = s;
11232  QCString templSpec;
11233  while (extractClassNameFromType(type,pos,className,templSpec)!=-1)
11234  {
11235  QCString clName=className+templSpec;
11236  ClassDef *cd=0;
11237  if (!g_classScope.isEmpty())
11238  {
11239  cd=getResolvedClass(d,g_sourceFileDef,g_classScope+"::"+clName);
11240  }
11241  if (cd==0)
11242  {
11243  cd=getResolvedClass(d,g_sourceFileDef,clName);
11244  }
11245  //printf("stripClass trying `%s' = %p\n",clName.data(),cd);
11246  if (cd)
11247  {
11248  return cd;
11249  }
11250  }
11251 
11252  return 0;
11253 }
bool isEmpty() const
Definition: qcstring.h:189
static QCString g_classScope
Definition: code.cpp:10621
static QCString className
Definition: declinfo.cpp:669
static FileDef * g_sourceFileDef
Definition: code.cpp:10626
int extractClassNameFromType(const QCString &type, int &pos, QCString &name, QCString &templSpec, SrcLangExt lang)
Definition: util.cpp:5963
ClassDef * getResolvedClass(Definition *scope, FileDef *fileScope, const char *n, MemberDef **pTypeDef, QCString *pTemplSpec, bool mayBeUnlinkable, bool mayBeHidden, QCString *pResolvedType)
Definition: util.cpp:1563
static QCString * s
Definition: config.cpp:1042
static void updateCallContextForSmartPointer ( )
static

Definition at line 11368 of file code.cpp.

11369 {
11371  //printf("updateCallContextForSmartPointer() cd=%s\n",cd ? d->name().data() : "<none>");
11372  MemberDef *md;
11373  if (d && d->definitionType()==Definition::TypeClass && (md=((ClassDef*)d)->isSmartPointer()))
11374  {
11375  ClassDef *ncd = stripClassName(md->typeString(),md->getOuterScope());
11376  if (ncd)
11377  {
11379  //printf("Found smart pointer call %s->%s!\n",cd->name().data(),ncd->name().data());
11380  }
11381  }
11382 }
static CallContext g_theCallContext
Definition: code.cpp:10930
virtual DefType definitionType() const =0
Definition * getScope() const
Definition: code.cpp:10920
void setScope(Definition *d)
Definition: code.cpp:10882
static ClassDef * stripClassName(const char *s, Definition *d=g_currentDefinition)
Definition: code.cpp:11227
while ( )

Definition at line 12603 of file code.cpp.

12604  {
12605  yy_cp = (yy_c_buf_p);
12606 
12607  /* Support of codeYYtext. */
12608  *yy_cp = (yy_hold_char);
12609 
12610  /* yy_bp points to the position in yy_ch_buf of the start of
12611  * the current run.
12612  */
12613  yy_bp = yy_cp;
12614 
12615  yy_current_state = (yy_start);
12616  yy_current_state += YY_AT_BOL();
12617 
12618  (yy_state_ptr) = (yy_state_buf);
12619  *(yy_state_ptr)++ = yy_current_state;
12620 
12621 yy_match:
12622  do
12623  {
12624  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
12625  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
12626  {
12627  yy_current_state = (int) yy_def[yy_current_state];
12628  if ( yy_current_state >= 3537 )
12629  yy_c = yy_meta[(unsigned int) yy_c];
12630  }
12631  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
12632  *(yy_state_ptr)++ = yy_current_state;
12633  ++yy_cp;
12634  }
12635  while ( yy_current_state != 3536 );
12636 
12637 yy_find_action:
12638  yy_current_state = *--(yy_state_ptr);
12639  (yy_lp) = yy_accept[yy_current_state];
12640 find_rule: /* we branch to this label when backing up */
12641  for ( ; ; ) /* until we find what rule we matched */
12642  {
12643  if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
12644  {
12645  yy_act = yy_acclist[(yy_lp)];
12646  if ( yy_act & YY_TRAILING_HEAD_MASK ||
12648  {
12650  {
12653  break;
12654  }
12655  }
12656  else if ( yy_act & YY_TRAILING_MASK )
12657  {
12658  (yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;
12660  (yy_full_match) = yy_cp;
12662  (yy_full_lp) = (yy_lp);
12663  }
12664  else
12665  {
12666  (yy_full_match) = yy_cp;
12668  (yy_full_lp) = (yy_lp);
12669  break;
12670  }
12671  ++(yy_lp);
12672  goto find_rule;
12673  }
12674  --yy_cp;
12675  yy_current_state = *--(yy_state_ptr);
12676  (yy_lp) = yy_accept[yy_current_state];
12677  }
12678 
12680 
12681 do_action: /* This label is used only to access EOF actions. */
12682 
12683  switch ( yy_act )
12684  { /* beginning of action switch */
12685 case 1:
12687 #line 1837 "code.l"
12688 
12689  YY_BREAK
12690 case 2:
12692 #line 1838 "code.l"
12693 {
12694  startFontClass("preprocessor");
12696  BEGIN( ReadInclude );
12697  }
12698  YY_BREAK
12699 case 3:
12700 /* rule 3 can match eol */
12702 #line 1843 "code.l"
12703 {
12705  startFontClass("keyword");
12707  endFontClass();
12708  if (!g_insideTemplate)
12709  BEGIN( ClassName );
12710  }
12711  YY_BREAK
12712 case 4:
12714 #line 1851 "code.l"
12715 {
12716  if (g_insideTemplate) REJECT;
12717  startFontClass("keyword");
12719  endFontClass();
12720  BEGIN( ClassName );
12721  }
12722  YY_BREAK
12723 case 5:
12724 /* rule 5 can match eol */
12726 #line 1858 "code.l"
12727 {
12728  if (g_insideTemplate) REJECT;
12729  startFontClass("keyword");
12731  endFontClass();
12732  }
12733  YY_BREAK
12734 case 6:
12736 #line 1864 "code.l"
12737 {
12738  startFontClass("keyword");
12740  endFontClass();
12741  if (!g_insideTemplate)
12742  BEGIN( ClassName );
12743  }
12744  YY_BREAK
12745 case 7:
12746 /* rule 7 can match eol */
12748 #line 1871 "code.l"
12749 {
12750  startFontClass("keyword");
12752  endFontClass();
12753  BEGIN( PackageName );
12754  }
12755  YY_BREAK
12756 case 8:
12757 /* rule 8 can match eol */
12759 #line 1877 "code.l"
12760 {
12761  if (!g_insideObjC) REJECT;
12763  BEGIN(Body);
12764  }
12765  YY_BREAK
12766 case 9:
12768 #line 1882 "code.l"
12769 {
12770  if (!g_insideObjC || g_insideBody)
12771  {
12773  }
12774  else // Start of Objective-C method
12775  {
12776  //printf("Method!\n");
12778  BEGIN(ObjCMethod);
12779  }
12780  }
12781  YY_BREAK
12782 case 10:
12784 #line 1894 "code.l"
12785 {
12787  BEGIN(ObjCParams);
12788  }
12789  YY_BREAK
12790 case 11:
12792 #line 1898 "code.l"
12793 {
12796  }
12797  YY_BREAK
12798 case 12:
12800 #line 1902 "code.l"
12801 {
12803  if (*codeYYtext=='{')
12804  {
12805  g_curlyCount++;
12806  if (g_searchingForBody)
12807  {
12810  }
12812  if (!g_curClassName.isEmpty()) // valid class name
12813  {
12815  DBG_CTX((stderr,"** scope stack push SCOPEBLOCK\n"));
12816  g_scopeStack.push(SCOPEBLOCK);
12817  }
12818  }
12819  g_type.resize(0);
12820  g_name.resize(0);
12821  BEGIN(Body);
12822  }
12823  YY_BREAK
12824 case 13:
12826 #line 1924 "code.l"
12827 {
12829  }
12830  YY_BREAK
12831 case 14:
12833 #line 1927 "code.l"
12834 {
12835  startFontClass("keywordtype");
12837  endFontClass();
12839  }
12840  YY_BREAK
12841 case 15:
12843 #line 1933 "code.l"
12844 {
12847  }
12848  YY_BREAK
12849 case 16:
12851 #line 1937 "code.l"
12852 {
12854  BEGIN(ObjCParams);
12855  }
12856  YY_BREAK
12857 case 17:
12859 #line 1941 "code.l"
12860 {
12865  }
12866  YY_BREAK
12867 case 18:
12869 #line 1947 "code.l"
12870 {
12872  }
12873  YY_BREAK
12874 case 19:
12876 #line 1950 "code.l"
12877 {
12879  }
12880  YY_BREAK
12881 case 20:
12882 /* rule 20 can match eol */
12884 #line 1953 "code.l"
12885 {
12887  }
12888  YY_BREAK
12889 case 21:
12891 #line 1956 "code.l"
12892 {
12893  //FileInfo *f;
12894  bool ambig;
12895  bool found=FALSE;
12896  //QCString absPath = codeYYtext;
12897  //if (g_sourceFileDef && QDir::isRelativePath(absPath))
12898  //{
12899  // absPath = QDir::cleanDirPath(g_sourceFileDef->getPath()+"/"+absPath);
12900  //}
12901 
12903  //printf("looking for include %s -> %s fd=%p\n",codeYYtext,absPath.data(),fd);
12904  if (fd && fd->isLinkable())
12905  {
12906  if (ambig) // multiple input files match the name
12907  {
12908  //printf("===== yes %s is ambiguous\n",codeYYtext);
12910  if (!name.isEmpty() && g_sourceFileDef)
12911  {
12912  FileName *fn = Doxygen::inputNameDict->find(name);
12913  if (fn)
12914  {
12915  FileNameIterator fni(*fn);
12916  // for each include name
12917  for (fni.toFirst();!found && (fd=fni.current());++fni)
12918  {
12919  // see if this source file actually includes the file
12920  found = g_sourceFileDef->isIncluded(fd->absFilePath());
12921  //printf(" include file %s found=%d\n",fd->absFilePath().data(),found);
12922  }
12923  }
12924  }
12925  }
12926  else // not ambiguous
12927  {
12928  found = TRUE;
12929  }
12930  }
12931  //printf(" include file %s found=%d\n",fd ? fd->absFilePath().data() : "<none>",found);
12932  if (found)
12933  {
12935  }
12936  else
12937  {
12939  }
12940  char c=yyinput();
12941  QCString text;
12942  text+=c;
12943  g_code->codify(text);
12944  endFontClass();
12945  BEGIN( Body );
12946  }
12947  YY_BREAK
12948 case 22:
12950 #line 2011 "code.l"
12951 {
12952  startFontClass("preprocessor");
12955  BEGIN( SkipCPP ) ;
12956  }
12957  YY_BREAK
12958 case 23:
12960 #line 2017 "code.l"
12961 {
12963  }
12964  YY_BREAK
12965 case 24:
12967 #line 2020 "code.l"
12968 {
12970  }
12971  YY_BREAK
12972 case 25:
12973 /* rule 25 can match eol */
12975 #line 2023 "code.l"
12976 {
12978  }
12979  YY_BREAK
12980 case 26:
12982 #line 2026 "code.l"
12983 {
12985  }
12986  YY_BREAK
12987 case 27:
12989 #line 2029 "code.l"
12990 {
12992  g_yyColNr++;
12994  }
12995  YY_BREAK
12996 case 28:
12998 #line 2034 "code.l"
12999 {
13001 
13002  DBG_CTX((stderr,"** scope stack push INNERBLOCK\n"));
13003  g_scopeStack.push(INNERBLOCK);
13004 
13005  if (g_searchingForBody)
13006  {
13009  }
13011  g_curlyCount++;
13012  if (g_insideBody)
13013  {
13014  g_bodyCurlyCount++;
13015  }
13016  g_type.resize(0);
13017  g_name.resize(0);
13018  BEGIN( Body );
13019  }
13020  YY_BREAK
13021 case 29:
13023 #line 2055 "code.l"
13024 {
13026  g_type.resize(0);
13027  g_name.resize(0);
13028 
13029  int *scope = g_scopeStack.pop();
13030  DBG_CTX((stderr,"** scope stack pop SCOPEBLOCK=%d\n",scope==SCOPEBLOCK));
13031  if (scope==SCOPEBLOCK || scope==CLASSBLOCK)
13032  {
13033  popScope();
13034  }
13035 
13037 
13038  DBG_CTX((stderr,"g_bodyCurlyCount=%d\n",g_bodyCurlyCount));
13039  if (--g_bodyCurlyCount<=0)
13040  {
13043  if (g_currentDefinition)
13045  }
13046  BEGIN(Body);
13047  }
13048  YY_BREAK
13049 case 30:
13051 #line 2079 "code.l"
13052 {
13053  //printf("End of objc scope fd=%s\n",g_sourceFileDef->name().data());
13054  if (g_sourceFileDef)
13055  {
13057  g_insideObjC = fd->name().lower().right(2)==".m" ||
13058  fd->name().lower().right(3)==".mm";
13059  //printf("insideObjC=%d\n",g_insideObjC);
13060  }
13061  else
13062  {
13063  g_insideObjC = FALSE;
13064  }
13065  if (g_insideBody)
13066  {
13068 
13069  int *scope = g_scopeStack.pop();
13070  DBG_CTX((stderr,"** scope stack pop SCOPEBLOCK=%d\n",scope==SCOPEBLOCK));
13071  if (scope==SCOPEBLOCK || scope==CLASSBLOCK)
13072  {
13073  popScope();
13074  }
13076  }
13077 
13078  startFontClass("keyword");
13080  endFontClass();
13081 
13083  if (g_currentDefinition)
13085  BEGIN(Body);
13086  }
13087  YY_BREAK
13088 case 31:
13090 #line 2114 "code.l"
13091 {
13094  BEGIN( Body );
13095  }
13096  YY_BREAK
13097 case 32:
13099 #line 2119 "code.l"
13100 {
13102  g_name.resize(0);
13104  BEGIN( Body ); // variable of type struct *
13105  }
13106  YY_BREAK
13107 case 33:
13109 #line 2125 "code.l"
13110 {
13111  startFontClass("keyword");
13113  endFontClass();
13114  }
13115  YY_BREAK
13116 case 34:
13118 #line 2130 "code.l"
13119 {
13121  addType();
13122  if (g_curClassName=="alignas")
13123  {
13124  startFontClass("keyword");
13126  endFontClass();
13127  BEGIN( AlignAs );
13128  }
13129  else
13130  {
13132  BEGIN( ClassVar );
13133  }
13134  }
13135  YY_BREAK
13136 case 35:
13138 #line 2146 "code.l"
13139 {
13140  g_bracketCount=1;
13142  BEGIN( AlignAsEnd );
13143  }
13144  YY_BREAK
13145 case 36:
13146 /* rule 36 can match eol */
13148 #line 2151 "code.l"
13149 { g_yyLineNr++;
13151  }
13152  YY_BREAK
13153 case 37:
13155 #line 2154 "code.l"
13156 { g_code->codify(codeYYtext); }
13157  YY_BREAK
13158 case 38:
13160 #line 2155 "code.l"
13162  g_bracketCount++;
13163  }
13164  YY_BREAK
13165 case 39:
13167 #line 2158 "code.l"
13168 {
13170  if (--g_bracketCount<=0)
13171  {
13172  BEGIN(ClassName);
13173  }
13174  }
13175  YY_BREAK
13176 case 40:
13177 /* rule 40 can match eol */
13179 #line 2165 "code.l"
13180 { g_yyLineNr++;
13182  }
13183  YY_BREAK
13184 case 41:
13186 #line 2168 "code.l"
13187 { g_code->codify(codeYYtext); }
13188  YY_BREAK
13189 case 42:
13191 #line 2169 "code.l"
13192 { // PHP namespace
13194  g_scopeStack.push(CLASSBLOCK);
13196  addType();
13198  BEGIN( ClassVar );
13199  }
13200  YY_BREAK
13201 case 43:
13203 #line 2177 "code.l"
13204 { // Obj-C category
13206  g_scopeStack.push(CLASSBLOCK);
13208  addType();
13210  BEGIN( ClassVar );
13211  }
13212  YY_BREAK
13213 case 44:
13215 #line 2185 "code.l"
13216 {
13218  //printf("found package: %s\n",g_curClassName.data());
13219  addType();
13221  }
13222  YY_BREAK
13223 case 45:
13225 #line 2191 "code.l"
13226 {
13227  unput(*codeYYtext);
13228  BEGIN( Body );
13229  }
13230  YY_BREAK
13231 case 46:
13233 #line 2195 "code.l"
13234 { // Java
13235  startFontClass("keyword");
13237  endFontClass();
13239  BEGIN( Bases );
13240  }
13241  YY_BREAK
13242 case 47:
13243 /* rule 47 can match eol */
13245 #line 2202 "code.l"
13246 {
13247  DBG_CTX((stderr,"***** C++/CLI modifier %s on g_curClassName=%s\n",codeYYtext,g_curClassName.data()));
13248  startFontClass("keyword");
13250  endFontClass();
13252  }
13253  YY_BREAK
13254 case 48:
13256 #line 2209 "code.l"
13257 {
13259  g_name = codeYYtext;
13260  if (g_insideBody)
13261  {
13263  }
13265  }
13266  YY_BREAK
13267 case 49:
13269 #line 2218 "code.l"
13270 {
13273  BEGIN( Bases );
13274  }
13275  YY_BREAK
13276 case 50:
13277 #line 2224 "code.l"
13278 case 51:
13279 #line 2225 "code.l"
13280 case 52:
13282 #line 2225 "code.l"
13283 {
13286  g_curlyCount++;
13288  {
13290  }
13291  if (g_searchingForBody)
13292  {
13295  }
13297  if (!g_curClassName.isEmpty()) // valid class name
13298  {
13299  DBG_CTX((stderr,"** scope stack push CLASSBLOCK\n"));
13300  g_scopeStack.push(CLASSBLOCK);
13302  DBG_CTX((stderr,"***** g_curClassName=%s\n",g_curClassName.data()));
13304  {
13305  DBG_CTX((stderr,"Adding new class %s\n",g_curClassName.data()));
13306  ClassDef *ncd=new ClassDef("<code>",1,1,
13309  // insert base classes.
13310  char *s=g_curClassBases.first();
13311  while (s)
13312  {
13313  ClassDef *bcd;
13314  bcd=g_codeClassSDict->find(s);
13316  if (bcd && bcd!=ncd)
13317  {
13318  ncd->insertBaseClass(bcd,s,Public,Normal);
13319  }
13320  s=g_curClassBases.next();
13321  }
13322  }
13323  //printf("g_codeClassList.count()=%d\n",g_codeClassList.count());
13324  }
13325  else // not a class name -> assume inner block
13326  {
13327  DBG_CTX((stderr,"** scope stack push INNERBLOCK\n"));
13328  g_scopeStack.push(INNERBLOCK);
13329  }
13332  BEGIN( Body );
13333  }
13334  YY_BREAK
13335 case 53:
13337 #line 2276 "code.l"
13338 {
13339  startFontClass("keyword");
13341  endFontClass();
13342  }
13343  YY_BREAK
13344 case 54:
13346 #line 2281 "code.l"
13347 {
13348  DBG_CTX((stderr,"%s:addBase(%s)\n",g_curClassName.data(),codeYYtext));
13351  }
13352  YY_BREAK
13353 case 55:
13355 #line 2286 "code.l"
13356 {
13358  if (!g_insideObjC)
13359  {
13360  g_sharpCount=1;
13361  BEGIN ( SkipSharp );
13362  }
13363  else
13364  {
13366  }
13367  }
13368  YY_BREAK
13369 case 56:
13371 #line 2298 "code.l"
13372 {
13375  }
13376  YY_BREAK
13377 case 57:
13379 #line 2302 "code.l"
13380 {
13382  ++g_sharpCount;
13383  }
13384  YY_BREAK
13385 case 58:
13387 #line 2306 "code.l"
13388 {
13390  if (--g_sharpCount<=0)
13391  BEGIN ( Bases );
13392  }
13393  YY_BREAK
13394 case 59:
13396 #line 2311 "code.l"
13397 {
13399  g_sharpCount=1;
13400  BEGIN ( SkipSharp );
13401  }
13402  YY_BREAK
13403 case 60:
13405 #line 2316 "code.l"
13406 {
13408  ++g_sharpCount;
13409  }
13410  YY_BREAK
13411 case 61:
13413 #line 2320 "code.l"
13414 {
13416  if (--g_sharpCount<=0)
13417  BEGIN ( Bases );
13418  }
13419  YY_BREAK
13420 case 62:
13422 #line 2327 "code.l"
13423 {
13425  }
13426  YY_BREAK
13427 case 63:
13428 /* rule 63 can match eol */
13429 *yy_cp = (yy_hold_char); /* undo effects of setting up codeYYtext */
13430 (yy_c_buf_p) = yy_cp -= 1;
13431 YY_DO_BEFORE_ACTION; /* set up codeYYtext again */
13433 #line 2332 "code.l"
13434 {
13435  addType();
13437  g_bracketCount=0;
13438  g_args.resize(0);
13439  g_name+=codeYYtext;
13440  BEGIN( FuncCall );
13441  }
13442  YY_BREAK
13443 case 64:
13444 /* rule 64 can match eol */
13445 *yy_cp = (yy_hold_char); /* undo effects of setting up codeYYtext */
13446 (yy_c_buf_p) = yy_cp -= 1;
13447 YY_DO_BEFORE_ACTION; /* set up codeYYtext again */
13449 #line 2340 "code.l"
13450 {
13451  addType();
13453  g_bracketCount=0;
13454  g_args.resize(0);
13455  g_name+=codeYYtext;
13456  BEGIN( FuncCall );
13457  }
13458  YY_BREAK
13459 case 65:
13460 /* rule 65 can match eol */
13461 *yy_cp = (yy_hold_char); /* undo effects of setting up codeYYtext */
13462 (yy_c_buf_p) = yy_cp -= 1;
13463 YY_DO_BEFORE_ACTION; /* set up codeYYtext again */
13465 #line 2348 "code.l"
13466 {
13467  addType();
13469  g_bracketCount=0;
13470  g_args.resize(0);
13471  g_name+=codeYYtext;
13472  BEGIN( FuncCall );
13473  }
13474  YY_BREAK
13475 case 66:
13476 /* rule 66 can match eol */
13477 *yy_cp = (yy_hold_char); /* undo effects of setting up codeYYtext */
13478 (yy_c_buf_p) = yy_cp -= 1;
13479 YY_DO_BEFORE_ACTION; /* set up codeYYtext again */
13481 #line 2356 "code.l"
13482 {
13483  startFontClass("keyword");
13485  endFontClass();
13487  g_sharpCount=0;
13488  }
13489  YY_BREAK
13490 case 67:
13491 /* rule 67 can match eol */
13493 #line 2363 "code.l"
13494 {
13495  startFontClass("keyword");
13497  endFontClass();
13498  BEGIN(UsingName);
13499  }
13500  YY_BREAK
13501 case 68:
13503 #line 2369 "code.l"
13506  DBG_CTX((stderr,"** scope stack push CLASSBLOCK\n"));
13507  g_scopeStack.push(CLASSBLOCK);
13509  BEGIN(Body);
13510  }
13511  YY_BREAK
13512 case 69:
13513 /* rule 69 can match eol */
13515 #line 2376 "code.l"
13517  YY_BREAK
13518 case 70:
13520 #line 2377 "code.l"
13522  YY_BREAK
13523 case 71:
13525 #line 2378 "code.l"
13526 { g_code->codify(codeYYtext); // this-> for C++, this. for C#
13527  }
13528  YY_BREAK
13529 case 72:
13530 /* rule 72 can match eol */
13531 *yy_cp = (yy_hold_char); /* undo effects of setting up codeYYtext */
13532 (yy_c_buf_p) = yy_cp -= 1;
13533 YY_DO_BEFORE_ACTION; /* set up codeYYtext again */
13535 #line 2380 "code.l"
13536 {
13537  startFontClass("keyword");
13539  if (QCString(codeYYtext)=="typedef")
13540  {
13541  addType();
13542  g_name+=codeYYtext;
13543  }
13544  endFontClass();
13545  }
13546  YY_BREAK
13547 case 73:
13549 #line 2390 "code.l"
13550 {
13551  startFontClass("keyword");
13553  endFontClass();
13554  }
13555  YY_BREAK
13556 case 74:
13557 /* rule 74 can match eol */
13559 #line 2395 "code.l"
13560 {
13561  startFontClass("keyword");
13563  endFontClass();
13564  g_name.resize(0);g_type.resize(0);
13565  }
13566  YY_BREAK
13567 case 75:
13568 /* rule 75 can match eol */
13569 *yy_cp = (yy_hold_char); /* undo effects of setting up codeYYtext */
13570 (yy_c_buf_p) = yy_cp = yy_bp + 2;
13571 YY_DO_BEFORE_ACTION; /* set up codeYYtext again */
13573 #line 2401 "code.l"
13574 {
13576  startFontClass("keywordflow");
13578  endFontClass();
13579  // insert the variable in the parent scope, see bug 546158
13583  g_name.resize(0);g_type.resize(0);
13584  }
13585  YY_BREAK
13586 case 76:
13587 /* rule 76 can match eol */
13589 #line 2412 "code.l"
13590 {
13591  startFontClass("keywordflow");
13593  endFontClass();
13594  g_name.resize(0);g_type.resize(0);
13595  g_inForEachExpression = (qstrcmp(codeYYtext,"for each")==0 || qstrcmp(codeYYtext, "foreach")==0);
13596  BEGIN(FuncCall);
13597  }
13598  YY_BREAK
13599 case 77:
13600 /* rule 77 can match eol */
13601 *yy_cp = (yy_hold_char); /* undo effects of setting up codeYYtext */
13602 (yy_c_buf_p) = yy_cp -= 1;
13603 YY_DO_BEFORE_ACTION; /* set up codeYYtext again */
13605 #line 2420 "code.l"
13606 {
13607  startFontClass("keywordflow");
13609  endFontClass();
13610  if (g_inFunctionTryBlock && (qstrcmp(codeYYtext,"catch")==0 || qstrcmp(codeYYtext,"finally")==0))
13611  {
13613  }
13614  }
13615  YY_BREAK
13616 case 78:
13618 #line 2429 "code.l"
13619 {
13620  startFontClass("keywordflow");
13622  endFontClass();
13623  }
13624  YY_BREAK
13625 case 79:
13627 #line 2434 "code.l"
13628 { // end of cast?
13631  g_bracketCount--;
13632  g_parmType = g_name;
13633  BEGIN(FuncCall);
13634  }
13635  YY_BREAK
13636 case 80:
13638 #line 2441 "code.l"
13639 {
13641  g_name.resize(0);g_type.resize(0);
13642  if (*codeYYtext==')')
13643  {
13645  g_bracketCount--;
13646  BEGIN(FuncCall);
13647  }
13648  }
13649  YY_BREAK
13650 case 81:
13652 #line 2451 "code.l"
13653 {
13654  startFontClass("keywordtype");
13656  endFontClass();
13657  addType();
13658  g_name+=codeYYtext;
13659  }
13660  YY_BREAK
13661 case 82:
13662 *yy_cp = (yy_hold_char); /* undo effects of setting up codeYYtext */
13663 (yy_c_buf_p) = yy_cp = yy_bp + 7;
13664 YY_DO_BEFORE_ACTION; /* set up codeYYtext again */
13666 #line 2458 "code.l"
13667 {
13668  startFontClass("keyword");
13670  endFontClass();
13671  g_sharpCount=0;
13672  BEGIN(TemplDecl);
13673  }
13674  YY_BREAK
13675 case 83:
13676 *yy_cp = (yy_hold_char); /* undo effects of setting up codeYYtext */
13677 (yy_c_buf_p) = yy_cp = yy_bp + 8;
13678 YY_DO_BEFORE_ACTION; /* set up codeYYtext again */
13680 #line 2465 "code.l"
13681 { // template<...>
13682  startFontClass("keyword");
13684  endFontClass();
13685  g_sharpCount=0;
13686  BEGIN(TemplDecl);
13687  }
13688  YY_BREAK
13689 case 84:
13691 #line 2472 "code.l"
13692 {
13693  startFontClass("keyword");
13695  endFontClass();
13696  }
13697  YY_BREAK
13698 case 85:
13700 #line 2477 "code.l"
13701 {
13703  g_sharpCount++;
13704  }
13705  YY_BREAK
13706 case 86:
13708 #line 2481 "code.l"
13709 {
13711  g_sharpCount--;
13712  if (g_sharpCount<=0)
13713  {
13714  BEGIN(Body);
13715  }
13716  }
13717  YY_BREAK
13718 case 87:
13720 #line 2489 "code.l"
13721 {
13722  startFontClass("keyword");
13724  endFontClass();
13726  }
13727  YY_BREAK
13728 case 88:
13730 #line 2495 "code.l"
13731 {
13733  }
13734  YY_BREAK
13735 case 89:
13737 #line 2498 "code.l"
13738 {
13739  startFontClass("keyword");
13741  endFontClass();
13742  }
13743  YY_BREAK
13744 case 90:
13746 #line 2503 "code.l"
13747 {
13749  }
13750  YY_BREAK
13751 case 91:
13753 #line 2506 "code.l"
13754 { // static_cast<T>(
13755  startFontClass("keyword");
13757  endFontClass();
13759  BEGIN(TemplCast);
13760  }
13761  YY_BREAK
13762 case 92:
13763 /* rule 92 can match eol */
13765 #line 2513 "code.l"
13766 { // PHP member variable
13767  addType();
13769  g_name+=codeYYtext+7;
13770  }
13771  YY_BREAK
13772 case 93:
13773 /* rule 93 can match eol */
13775 #line 2518 "code.l"
13776 { // A<T> *pt;
13777  int i=QCString(codeYYtext).find('<');
13779  if (kw.right(5)=="_cast" && YY_START==Body)
13780  {
13781  REJECT;
13782  }
13783  addType();
13785  g_name+=codeYYtext;
13786  }
13787  YY_BREAK
13788 case 94:
13789 /* rule 94 can match eol */
13791 #line 2529 "code.l"
13792 { // "int var;" or "var, var2" or "debug(f) macro"
13793  addType();
13794  // changed this to generateFunctionLink, see bug 624514
13795  //generateClassOrGlobalLink(*g_code,codeYYtext,FALSE,TRUE);
13797  g_name+=codeYYtext;
13798  }
13799  YY_BREAK
13800 case 95:
13801 /* rule 95 can match eol */
13803 #line 2536 "code.l"
13804 { // p->func()
13805  addType();
13807  g_name+=codeYYtext;
13808  }
13809  YY_BREAK
13810 case 96:
13811 /* rule 96 can match eol */
13813 #line 2541 "code.l"
13814 { // (*p)->func() but not "if (p) ..."
13816  int s=0;while (s<(int)codeYYleng && !isId(codeYYtext[s])) s++;
13817  int e=(int)codeYYleng-1;while (e>=0 && !isId(codeYYtext[e])) e--;
13818  QCString varname = ((QCString)codeYYtext).mid(s,e-s+1);
13819  addType();
13820  g_name=varname;
13821  }
13822  YY_BREAK
13823 case 97:
13824 /* rule 97 can match eol */
13826 #line 2549 "code.l"
13827 { // a() or c::a() or t<A,B>::a() or A\B\foo()
13828  addType();
13830  g_bracketCount=0;
13831  g_args.resize(0);
13832  g_name+=codeYYtext;
13833  BEGIN( FuncCall );
13834  }
13835  YY_BREAK
13836 case 98:
13837 /* rule 98 can match eol */
13839 #line 2557 "code.l"
13840 {
13841  QCString text=codeYYtext;
13842  int i=text.find('R');
13843  g_code->codify(text.left(i+1));
13844  startFontClass("stringliteral");
13845  g_code->codify(codeYYtext+i+1);
13848  g_delimiter = codeYYtext+i+2;
13850  BEGIN( RawString );
13851  }
13852  YY_BREAK
13853 case 99:
13855 #line 2569 "code.l"
13856 {
13857  startFontClass("stringliteral");
13861  BEGIN( SkipString );
13862  }
13863  YY_BREAK
13864 case 100:
13866 #line 2576 "code.l"
13867 {
13868  startFontClass("stringliteral");
13872  BEGIN( SkipStringS );
13873  }
13874  YY_BREAK
13875 case 101:
13877 #line 2583 "code.l"
13878 {
13880  }
13881  YY_BREAK
13882 case 102:
13884 #line 2586 "code.l"
13885 {
13887  }
13888  YY_BREAK
13889 case 103:
13891 #line 2589 "code.l"
13892 {
13894  }
13895  YY_BREAK
13896 case 104:
13898 #line 2592 "code.l"
13899 {
13901  endFontClass();
13903  }
13904  YY_BREAK
13905 case 105:
13907 #line 2597 "code.l"
13908 {
13910  endFontClass();
13912  }
13913  YY_BREAK
13914 case 106:
13916 #line 2602 "code.l"
13917 {
13919  }
13920  YY_BREAK
13921 case 107:
13922 /* rule 107 can match eol */
13924 #line 2605 "code.l"
13925 {
13927  QCString delimiter = codeYYtext+1;
13928  delimiter=delimiter.left(delimiter.length()-1);
13929  if (delimiter==g_delimiter)
13930  {
13932  }
13933  }
13934  YY_BREAK
13935 case 108:
13937 #line 2614 "code.l"
13938 { g_code->codify(codeYYtext); }
13939  YY_BREAK
13940 case 109:
13942 #line 2615 "code.l"
13943 { g_code->codify(codeYYtext); }
13944  YY_BREAK
13945 case 110:
13946 /* rule 110 can match eol */
13948 #line 2616 "code.l"
13949 { codifyLines(codeYYtext); }
13950  YY_BREAK
13951 case 111:
13953 #line 2617 "code.l"
13954 {
13956  }
13957  YY_BREAK
13958 case 112:
13960 #line 2620 "code.l"
13961 { // escaped quote
13963  }
13964  YY_BREAK
13965 case 113:
13967 #line 2623 "code.l"
13968 { // end of string
13970  endFontClass();
13972  }
13973  YY_BREAK
13974 case 114:
13976 #line 2628 "code.l"
13977 {
13979  }
13980  YY_BREAK
13981 case 115:
13982 /* rule 115 can match eol */
13984 #line 2631 "code.l"
13985 {
13987  }
13988  YY_BREAK
13989 case 116:
13991 #line 2634 "code.l"
13992 {
13994  g_name.resize(0);g_type.resize(0);
13995  }
13996  YY_BREAK
13997 case 117:
13999 #line 2638 "code.l"
14000 {
14001  if (g_insideTemplate)
14002  {
14003  g_sharpCount++;
14004  }
14006  }
14007  YY_BREAK
14008 case 118:
14010 #line 2645 "code.l"
14011 {
14012  if (g_insideTemplate)
14013  {
14014  if (--g_sharpCount<=0)
14015  {
14017  }
14018  }
14020  }
14021  YY_BREAK
14022 case 119:
14024 #line 2655 "code.l"
14025 {
14026  startFontClass("charliteral");
14028  endFontClass();
14029  }
14030  YY_BREAK
14031 case 120:
14033 #line 2660 "code.l"
14034 {
14035  if (codeYYtext[0]=='-') // -> could be overloaded
14036  {
14038  }
14041  BEGIN( MemberCall );
14042  }
14043  YY_BREAK
14044 case 121:
14045 /* rule 121 can match eol */
14047 #line 2669 "code.l"
14048 {
14049  if (g_theCallContext.getScope())
14050  {
14052  {
14055  }
14056  g_name.resize(0);
14057  }
14058  else
14059  {
14062  g_name.resize(0);
14063  }
14064  g_type.resize(0);
14065  g_bracketCount=0;
14066  if (g_memCallContext==Body)
14067  {
14068  BEGIN(FuncCall);
14069  }
14070  else
14071  {
14073  }
14074  }
14075  YY_BREAK
14076 case 122:
14077 /* rule 122 can match eol */
14079 #line 2696 "code.l"
14080 {
14081  if (g_theCallContext.getScope())
14082  {
14083  DBG_CTX((stderr,"g_theCallContext.getClass()=%p\n",g_theCallContext.getScope()));
14085  {
14088  }
14089  g_name.resize(0);
14090  }
14091  else
14092  {
14093  DBG_CTX((stderr,"no class context!\n"));
14096  g_name.resize(0);
14097  }
14098  g_type.resize(0);
14100  }
14101  YY_BREAK
14102 case 123:
14104 #line 2717 "code.l"
14105 {
14106  if (g_insideObjC && *codeYYtext=='[')
14107  {
14108  //printf("Found start of ObjC call!\n");
14109  // start of a method call
14110  g_contextDict.setAutoDelete(TRUE);
14111  g_nameDict.setAutoDelete(TRUE);
14112  g_objectDict.setAutoDelete(TRUE);
14113  g_wordDict.setAutoDelete(TRUE);
14114  g_contextDict.clear();
14115  g_nameDict.clear();
14116  g_objectDict.clear();
14117  g_wordDict.clear();
14118  g_currentCtxId = 0;
14119  g_currentNameId = 0;
14120  g_currentObjId = 0;
14121  g_currentCtx = 0;
14122  g_braceCount = 0;
14123  unput('[');
14124  BEGIN(ObjCCall);
14125  }
14126  else
14127  {
14129  g_saveName = g_name.copy();
14130  g_saveType = g_type.copy();
14131  if (*codeYYtext!='[' && !g_type.isEmpty())
14132  {
14133  //printf("g_scopeStack.bottom()=%p\n",g_scopeStack.bottom());
14134  //if (g_scopeStack.top()!=CLASSBLOCK) // commented out for bug731363
14135  {
14136  //printf("AddVariable: '%s' '%s' context=%d\n",
14137  // g_type.data(),g_name.data(),g_theVarContext.count());
14139  }
14140  g_name.resize(0);
14141  }
14142  if (*codeYYtext==';' || *codeYYtext=='=')
14143  {
14144  g_type.resize(0);
14145  g_name.resize(0);
14146  }
14147  else if (*codeYYtext=='[')
14148  {
14150  }
14151  g_args.resize(0);
14152  g_parmType.resize(0);
14153  g_parmName.resize(0);
14154  }
14155  }
14156  YY_BREAK
14157 /*
14158 <ObjCMemberCall>{ID} {
14159  if (qstrcmp(codeYYtext,"self")==0 || qstrcmp(codeYYtext,"super")==0)
14160  {
14161  // TODO: get proper base class for "super"
14162  g_theCallContext.setClass(getClass(g_curClassName));
14163  startFontClass("keyword");
14164  g_code->codify(codeYYtext);
14165  endFontClass();
14166  }
14167  else
14168  {
14169  generateClassOrGlobalLink(*g_code,codeYYtext);
14170  }
14171  g_name.resize(0);
14172  BEGIN(ObjCMemberCall2);
14173  }
14174 <ObjCMemberCall>"[" {
14175  g_code->codify(codeYYtext);
14176  g_theCallContext.pushScope();
14177  }
14178 <ObjCMemberCall2>{ID}":"? {
14179  g_name+=codeYYtext;
14180  if (g_theCallContext.getClass())
14181  {
14182  //printf("Calling method %s\n",g_name.data());
14183  if (!generateClassMemberLink(*g_code,g_theCallContext.getClass(),g_name))
14184  {
14185  g_code->codify(codeYYtext);
14186  addToSearchIndex(g_name);
14187  }
14188  }
14189  else
14190  {
14191  g_code->codify(codeYYtext);
14192  addToSearchIndex(g_name);
14193  }
14194  g_name.resize(0);
14195  BEGIN(ObjCMemberCall3);
14196  }
14197 <ObjCMemberCall2,ObjCMemberCall3>"]" {
14198  g_theCallContext.popScope();
14199  g_code->codify(codeYYtext);
14200  BEGIN(Body);
14201  }
14202  */
14203 case 124:
14205 #line 2814 "code.l"
14206 {
14207  saveObjCContext();
14209  BEGIN(ObjCCall);
14210  //printf("open\n");
14211  }
14212  YY_BREAK
14213 case 125:
14215 #line 2820 "code.l"
14216 {
14219  BEGIN(ObjCMName);
14220  if (g_currentCtx==0)
14221  {
14222  // end of call
14224  BEGIN(Body);
14225  }
14226  //printf("close\n");
14227  }
14228  YY_BREAK
14229 case 126:
14231 #line 2832 "code.l"
14232 {
14234  if (g_braceCount==0)
14235  {
14237  //printf("new type=%s\n",g_currentCtx->objectTypeOrName.data());
14238  BEGIN(ObjCMName);
14239  }
14240  }
14241  YY_BREAK
14242 case 127:
14243 /* rule 127 can match eol */
14245 #line 2841 "code.l"
14246 {
14247  if (g_braceCount==0 &&
14249  {
14252  }
14253  else
14254  {
14256  }
14257  }
14258  YY_BREAK
14259 case 128:
14260 /* rule 128 can match eol */
14262 #line 2853 "code.l"
14263 {
14264  if (g_braceCount==0)
14265  {
14267  g_currentCtx->methodName+=":";
14268  }
14270  }
14271  YY_BREAK
14272 case 129:
14274 #line 2861 "code.l"
14276  YY_BREAK
14277 case 130:
14279 #line 2862 "code.l"
14281  YY_BREAK
14282 case 131:
14284 #line 2863 "code.l"
14287  }
14288  YY_BREAK
14289 case 132:
14291 #line 2866 "code.l"
14293  YY_BREAK
14294 case 133:
14296 #line 2867 "code.l"
14299  BEGIN(ObjCSkipStr);
14300  }
14301  YY_BREAK
14302 case 134:
14304 #line 2871 "code.l"
14305 { g_currentCtx->format+="$$"; }
14306  YY_BREAK
14307 case 135:
14309 #line 2872 "code.l"
14311  YY_BREAK
14312 case 136:
14314 #line 2873 "code.l"
14316  YY_BREAK
14317 case 137:
14318 *yy_cp = (yy_hold_char); /* undo effects of setting up codeYYtext */
14319 (yy_c_buf_p) = yy_cp = yy_bp + 1;
14320 YY_DO_BEFORE_ACTION; /* set up codeYYtext again */
14322 #line 2874 "code.l"
14323 { // needed to prevent matching the global rule (for C#)
14325  }
14326  YY_BREAK
14327 case 138:
14329 #line 2877 "code.l"
14331  YY_BREAK
14332 case 139:
14334 #line 2878 "code.l"
14336  YY_BREAK
14337 case 140:
14338 /* rule 140 can match eol */
14340 #line 2879 "code.l"
14342  YY_BREAK
14343 case 141:
14345 #line 2881 "code.l"
14346 {
14349  // TODO: nested arrays like: a[b[0]->func()]->func()
14350  g_name = g_saveName.copy();
14351  g_type = g_saveType.copy();
14352  }
14353  YY_BREAK
14354 case 142:
14356 #line 2888 "code.l"
14357 {
14359  }
14360  YY_BREAK
14361 case 143:
14363 #line 2891 "code.l"
14364 {
14366  }
14367  YY_BREAK
14368 case 144:
14369 /* rule 144 can match eol */
14370 *yy_cp = (yy_hold_char); /* undo effects of setting up codeYYtext */
14371 (yy_c_buf_p) = yy_cp -= 1;
14372 YY_DO_BEFORE_ACTION; /* set up codeYYtext again */
14374 #line 2894 "code.l"
14375 {
14376  //addParmType();
14377  //g_parmName=codeYYtext;
14378  startFontClass("keyword");
14380  endFontClass();
14381  }
14382  YY_BREAK
14383 case 145:
14384 /* rule 145 can match eol */
14385 *yy_cp = (yy_hold_char); /* undo effects of setting up codeYYtext */
14386 (yy_c_buf_p) = yy_cp -= 1;
14387 YY_DO_BEFORE_ACTION; /* set up codeYYtext again */
14389 #line 2901 "code.l"
14390 {
14391  addParmType();
14393  startFontClass("keywordtype");
14395  endFontClass();
14396  }
14397  YY_BREAK
14398 case 146:
14399 /* rule 146 can match eol */
14400 *yy_cp = (yy_hold_char); /* undo effects of setting up codeYYtext */
14401 (yy_c_buf_p) = yy_cp -= 1;
14402 YY_DO_BEFORE_ACTION; /* set up codeYYtext again */
14404 #line 2908 "code.l"
14405 {
14406  addParmType();
14408  startFontClass("keywordflow");
14410  endFontClass();
14411  }
14412  YY_BREAK
14413 case 147:
14415 #line 2915 "code.l"
14416 {
14417  addParmType();
14420  }
14421  YY_BREAK
14422 case 148:
14424 #line 2920 "code.l"
14425 { // probably a cast, not a function call
14428  BEGIN( Body );
14429  }
14430  YY_BREAK
14431 case 149:
14433 #line 2925 "code.l"
14434 {
14438  }
14439  YY_BREAK
14440 case 150:
14442 #line 2930 "code.l"
14443 {
14444  if (g_bracketCount>0)
14445  {
14448  g_curlyCount=0;
14449  BEGIN(InlineInit);
14450  }
14451  else
14452  {
14453  REJECT;
14454  }
14455  }
14456  YY_BREAK
14457 case 151:
14459 #line 2943 "code.l"
14460 { g_curlyCount++;
14462  }
14463  YY_BREAK
14464 case 152:
14466 #line 2946 "code.l"
14467 {
14469  if (--g_curlyCount<=0)
14470  {
14472  }
14473  }
14474  YY_BREAK
14475 case 153:
14476 /* rule 153 can match eol */
14478 #line 2953 "code.l"
14479 {
14481  }
14482  YY_BREAK
14483 case 154:
14485 #line 2956 "code.l"
14486 {
14488  }
14489  YY_BREAK
14490 case 155:
14492 #line 2959 "code.l"
14493 {
14496  g_bracketCount++;
14498  if (YY_START==FuncCall && !g_insideBody)
14499  {
14501  }
14502  }
14503  YY_BREAK
14504 case 156:
14506 #line 2969 "code.l"
14507 { // operator
14508  if (qstrcmp(codeYYtext,"*") &&
14509  qstrcmp(codeYYtext,"&") &&
14510  qstrcmp(codeYYtext,"^") &&
14511  qstrcmp(codeYYtext,"%")) // typically a pointer or reference
14512  {
14513  // not a * or &, or C++/CLI's ^ or %
14515  }
14517  }
14518  YY_BREAK
14519 case 157:
14521 #line 2980 "code.l"
14522 {
14523  if (codeYYtext[0]==')') // no a pointer cast
14524  {
14525  //printf("addVariable(%s,%s)\n",g_parmType.data(),g_parmName.data());
14527  }
14528  else
14529  {
14530  g_parmType.resize(0);
14531  g_parmName.resize(0);
14532  }
14535  //g_theCallContext.setClass(0); // commented out, otherwise a()->b() does not work for b().
14537  if (--g_bracketCount<=0)
14538  {
14539  if (g_name.isEmpty())
14540  {
14541  BEGIN( Body );
14542  }
14543  else
14544  {
14545  BEGIN( CallEnd );
14546  }
14547  }
14548  }
14549  YY_BREAK
14550 case 158:
14551 /* rule 158 can match eol */
14553 #line 3007 "code.l"
14554 { codifyLines(codeYYtext); }
14555  YY_BREAK
14556 /*
14557 <MemberCall2,FuncCall>")"[ \t\n]*[;:] {
14558  */
14559 case 159:
14561 #line 3011 "code.l"
14562 {
14564  g_bracketCount=0;
14565  if (*codeYYtext==';') g_searchingForBody=FALSE;
14566  if (!g_type.isEmpty())
14567  {
14568  DBG_CTX((stderr,"add variable g_type=%s g_name=%s)\n",g_type.data(),g_name.data()));
14570  }
14573  if (*codeYYtext==';' || g_insideBody)
14574  {
14575  if (!g_insideBody)
14576  {
14578  }
14579  g_name.resize(0);g_type.resize(0);
14580  BEGIN( Body );
14581  }
14582  else
14583  {
14584  g_bracketCount=0;
14585  BEGIN( SkipInits );
14586  }
14587  }
14588  YY_BREAK
14589 case 160:
14590 /* rule 160 can match eol */
14592 #line 3037 "code.l"
14593 {
14594  startFontClass("keyword");
14596  endFontClass();
14597  }
14598  YY_BREAK
14599 case 161:
14600 /* rule 161 can match eol */
14602 #line 3042 "code.l"
14603 {
14604  if (g_insideBody)
14605  {
14607  }
14609  //g_theCallContext.popScope();
14611  int index = g_name.findRev("::");
14612  DBG_CTX((stderr,"g_name=%s\n",g_name.data()));
14613  if (index!=-1)
14614  {
14615  QCString scope = g_name.left(index);
14616  if (!g_classScope.isEmpty()) scope.prepend(g_classScope+"::");
14618  if (cd)
14619  {
14620  setClassScope(cd->name());
14621  g_scopeStack.push(SCOPEBLOCK);
14622  DBG_CTX((stderr,"** scope stack push SCOPEBLOCK\n"));
14623  }
14624  else
14625  {
14626  //setClassScope(g_realScope);
14627  g_scopeStack.push(INNERBLOCK);
14628  DBG_CTX((stderr,"** scope stack push INNERBLOCK\n"));
14629  }
14630  }
14631  else
14632  {
14633  DBG_CTX((stderr,"** scope stack push INNERBLOCK\n"));
14634  g_scopeStack.push(INNERBLOCK);
14635  }
14636  codeYYtext[codeYYleng-1]='\0';
14637  QCString cv(codeYYtext);
14638  if (!cv.stripWhiteSpace().isEmpty())
14639  {
14640  startFontClass("keyword");
14642  endFontClass();
14643  }
14644  else // just whitespace
14645  {
14647  }
14648  g_code->codify("{");
14649  if (g_searchingForBody)
14650  {
14653  }
14655  g_curlyCount++;
14656  g_type.resize(0); g_name.resize(0);
14657  BEGIN( Body );
14658  }
14659  YY_BREAK
14660 case 162:
14662 #line 3098 "code.l"
14663 { // function-try-block
14664  startFontClass("keyword");
14666  endFontClass();
14668  }
14669  YY_BREAK
14670 case 163:
14672 #line 3104 "code.l"
14673 {
14674  if (g_insideBody || !g_parmType.isEmpty())
14675  {
14676  REJECT;
14677  }
14678  // could be K&R style definition
14679  addParmType();
14683  }
14684  YY_BREAK
14685 case 164:
14687 #line 3115 "code.l"
14688 {
14689  addParmType();
14692  }
14693  YY_BREAK
14694 case 165:
14696 #line 3120 "code.l"
14697 {
14700  if (*codeYYtext==';') g_parmType.resize(0);
14701  g_parmName.resize(0);
14702  }
14703  YY_BREAK
14704 case 166:
14706 #line 3126 "code.l"
14707 {
14708  startFontClass("preprocessor");
14711  BEGIN( SkipCPP );
14712  }
14713  YY_BREAK
14714 case 167:
14716 #line 3132 "code.l"
14717 {
14718  unput(*codeYYtext);
14719  if (!g_insideBody)
14720  {
14722  }
14723  g_name.resize(0);g_args.resize(0);
14725  BEGIN( Body );
14726  }
14727  YY_BREAK
14728 case 168:
14730 #line 3142 "code.l"
14731 {
14733  g_type.resize(0); g_name.resize(0);
14734  BEGIN( Body );
14735  }
14736  YY_BREAK
14737 case 169:
14739 #line 3147 "code.l"
14740 {
14742  g_curlyCount++;
14743  if (g_searchingForBody)
14744  {
14747  }
14749  if (g_name.find("::")!=-1)
14750  {
14751  DBG_CTX((stderr,"** scope stack push SCOPEBLOCK\n"));
14752  g_scopeStack.push(SCOPEBLOCK);
14754  }
14755  else
14756  {
14757  DBG_CTX((stderr,"** scope stack push INNERBLOCK\n"));
14758  g_scopeStack.push(INNERBLOCK);
14759  }
14760  g_type.resize(0); g_name.resize(0);
14761  BEGIN( Body );
14762  }
14763  YY_BREAK
14764 case 170:
14766 #line 3170 "code.l"
14767 {
14769  }
14770  YY_BREAK
14771 case 171:
14772 *yy_cp = (yy_hold_char); /* undo effects of setting up codeYYtext */
14773 (yy_c_buf_p) = yy_cp -= 1;
14774 YY_DO_BEFORE_ACTION; /* set up codeYYtext again */
14776 #line 3173 "code.l"
14777 {
14779  }
14780  YY_BREAK
14781 case 172:
14783 #line 3176 "code.l"
14784 {
14785  g_name=codeYYtext;
14787  BEGIN( MemberCall2 );
14788  }
14789  YY_BREAK
14790 case 173:
14792 #line 3181 "code.l"
14793 {
14795  int s=0;while (!isId(codeYYtext[s])) s++;
14796  int e=(int)codeYYleng-1;while (!isId(codeYYtext[e])) e--;
14797  g_name=((QCString)codeYYtext).mid(s,e-s+1);
14798  BEGIN( MemberCall2 );
14799  }
14800  YY_BREAK
14801 case 174:
14802 /* rule 174 can match eol */
14804 #line 3188 "code.l"
14805 {
14806  if (!g_args.isEmpty())
14808  else
14810  g_args.resize(0);
14811  BEGIN( FuncCall );
14812  }
14813  YY_BREAK
14814 case 175:
14815 /* rule 175 can match eol */
14817 #line 3196 "code.l"
14818 {
14819  //g_code->codify(codeYYtext);
14820  g_name=codeYYtext;
14822  BEGIN( MemberCall2 );
14823  }
14824  YY_BREAK
14825 case 176:
14827 #line 3202 "code.l"
14828 {
14829  if (codeYYtext[0]=='-') // -> could be overloaded
14830  {
14832  }
14835  BEGIN( MemberCall );
14836  }
14837  YY_BREAK
14838 case 177:
14840 #line 3211 "code.l"
14841 {
14843  endFontClass();
14844  BEGIN( g_lastCContext ) ;
14845  }
14846  YY_BREAK
14847 case 178:
14849 #line 3216 "code.l"
14850 {
14852  }
14853  YY_BREAK
14854 case 179:
14856 #line 3219 "code.l"
14857 {
14859  }
14860  YY_BREAK
14861 case 180:
14863 #line 3222 "code.l"
14864 {
14866  endFontClass();
14867  if (g_lastCContext==SkipCPP)
14868  {
14869  startFontClass("preprocessor");
14870  }
14871  BEGIN( g_lastCContext ) ;
14872  }
14873  YY_BREAK
14874 case 181:
14875 /* rule 181 can match eol */
14877 #line 3231 "code.l"
14878 { // line continuation
14880  }
14881  YY_BREAK
14882 case 182:
14884 #line 3234 "code.l"
14885 {
14887  }
14888  YY_BREAK
14889 case 183:
14891 #line 3237 "code.l"
14892 
14893  YY_BREAK
14894 case 184:
14895 /* rule 184 can match eol */
14897 #line 3238 "code.l"
14898 {
14899  unput('\n');
14900  endFontClass();
14901  BEGIN( g_lastCContext ) ;
14902  }
14903  YY_BREAK
14904 case 185:
14906 #line 3243 "code.l"
14907 {
14909  }
14910  YY_BREAK
14911 case 186:
14912 /* rule 186 can match eol */
14913 *yy_cp = (yy_hold_char); /* undo effects of setting up codeYYtext */
14914 (yy_c_buf_p) = yy_cp -= 1;
14915 YY_DO_BEFORE_ACTION; /* set up codeYYtext again */
14917 #line 3246 "code.l"
14918 {
14920  }
14921  YY_BREAK
14922 case 187:
14923 /* rule 187 can match eol */
14925 #line 3249 "code.l"
14926 {
14928  nextCodeLine();
14930  { // force end of C++ comment here
14931  endFontClass();
14932  BEGIN( g_lastCContext ) ;
14933  }
14934  else
14935  {
14937  }
14938  }
14939  YY_BREAK
14940 case 188:
14942 #line 3262 "code.l"
14943 {
14945  }
14946  YY_BREAK
14947 case 189:
14949 #line 3265 "code.l"
14950 
14951  YY_BREAK
14952 case 190:
14954 #line 3266 "code.l"
14955 
14956  YY_BREAK
14957 case 191:
14958 /* rule 191 can match eol */
14960 #line 3267 "code.l"
14961 { g_yyLineNr++; }
14962  YY_BREAK
14963 case 192:
14965 #line 3268 "code.l"
14966 
14967  YY_BREAK
14968 case 193:
14970 #line 3269 "code.l"
14971 {
14973  g_type.resize(0);
14974  g_name.resize(0);
14976  }
14977  YY_BREAK
14978 case 194:
14979 /* rule 194 can match eol */
14981 #line 3275 "code.l"
14982 { // remove special one-line comment
14983  if (YY_START==SkipCPP) REJECT;
14984  if (Config_getBool("STRIP_CODE_COMMENTS"))
14985  {
14986  g_yyLineNr+=((QCString)codeYYtext).contains('\n');
14987  nextCodeLine();
14988  }
14989  else
14990  {
14991  startFontClass("comment");
14993  endFontClass();
14994  }
14995  if (YY_START==SkipCxxComment)
14996  {
14997  endFontClass();
14998  BEGIN( g_lastCContext ) ;
14999  }
15000  }
15001  YY_BREAK
15002 case 195:
15003 /* rule 195 can match eol */
15004 *yy_cp = (yy_hold_char); /* undo effects of setting up codeYYtext */
15005 (yy_c_buf_p) = yy_cp = yy_bp + 1;
15006 YY_DO_BEFORE_ACTION; /* set up codeYYtext again */
15008 #line 3294 "code.l"
15009 {
15010  endFontClass();
15013  }
15014  YY_BREAK
15015 case 196:
15016 /* rule 196 can match eol */
15018 #line 3299 "code.l"
15019 { // remove one-line group marker
15020  if (Config_getBool("STRIP_CODE_COMMENTS"))
15021  {
15022  g_yyLineNr+=2;
15023  nextCodeLine();
15024  }
15025  else
15026  {
15027  startFontClass("comment");
15029  endFontClass();
15030  }
15031  if (YY_START==SkipCxxComment)
15032  {
15033  endFontClass();
15034  BEGIN( g_lastCContext ) ;
15035  }
15036  }
15037  YY_BREAK
15038 case 197:
15039 /* rule 197 can match eol */
15041 #line 3317 "code.l"
15042 { // remove one-line group marker
15043  if (Config_getBool("STRIP_CODE_COMMENTS"))
15044  {
15046  g_yyLineNr++;
15048  }
15049  else
15050  {
15051  // check is to prevent getting stuck in skipping C++ comments
15052  if (YY_START != SkipCxxComment)
15053  {
15055  }
15056  startFontClass("comment");
15058  BEGIN(SkipComment);
15059  }
15060  }
15061  YY_BREAK
15062 case 198:
15063 /* rule 198 can match eol */
15065 #line 3336 "code.l"
15066 { // remove one-line group marker
15067  if (Config_getBool("STRIP_CODE_COMMENTS"))
15068  {
15069  g_yyLineNr++;
15070  nextCodeLine();
15071  }
15072  else
15073  {
15074  startFontClass("comment");
15076  endFontClass();
15077  }
15078  }
15079  YY_BREAK
15080 case 199:
15082 #line 3349 "code.l"
15083 { // remove multi-line group marker
15084  if (Config_getBool("STRIP_CODE_COMMENTS"))
15085  {
15088  }
15089  else
15090  {
15091  // check is to prevent getting stuck in skipping C++ comments
15092  if (YY_START != SkipCxxComment)
15093  {
15095  }
15096  startFontClass("comment");
15098  BEGIN(SkipComment);
15099  }
15100  }
15101  YY_BREAK
15102 case 200:
15103 /* rule 200 can match eol */
15105 #line 3367 "code.l"
15106 { // remove special one-line comment
15107  if (Config_getBool("STRIP_CODE_COMMENTS"))
15108  {
15109  g_yyLineNr++;
15110  //nextCodeLine();
15111  }
15112  else
15113  {
15114  startFontClass("comment");
15116  endFontClass();
15117  }
15118  }
15119  YY_BREAK
15120 case 201:
15121 /* rule 201 can match eol */
15123 #line 3380 "code.l"
15124 { // strip special one-line comment
15126  if (Config_getBool("STRIP_CODE_COMMENTS"))
15127  {
15128  char c[2]; c[0]='\n'; c[1]=0;
15129  codifyLines(c);
15130  }
15131  else
15132  {
15133  startFontClass("comment");
15135  endFontClass();
15136  }
15137  }
15138  YY_BREAK
15139 case 202:
15141 #line 3394 "code.l"
15142 { // special pattern /*[tag:filename]*/ to force linking to a tag file
15144  int s=g_forceTagReference.find(':');
15145  int e=g_forceTagReference.findRev(']');
15147  }
15148  YY_BREAK
15149 case 203:
15150 /* rule 203 can match eol */
15151 *yy_cp = (yy_hold_char); /* undo effects of setting up codeYYtext */
15152 (yy_c_buf_p) = yy_cp -= 1;
15153 YY_DO_BEFORE_ACTION; /* set up codeYYtext again */
15155 #line 3400 "code.l"
15156 {
15157  if (Config_getBool("STRIP_CODE_COMMENTS"))
15158  {
15160  g_yyLineNr++;
15162  }
15163  else
15164  {
15165  // check is to prevent getting stuck in skipping C++ comments
15166  if (YY_START != SkipCxxComment)
15167  {
15169  }
15170  startFontClass("comment");
15172  BEGIN(SkipComment);
15173  }
15174  }
15175  YY_BREAK
15176 case 204:
15177 /* rule 204 can match eol */
15178 *yy_cp = (yy_hold_char); /* undo effects of setting up codeYYtext */
15179 (yy_c_buf_p) = yy_cp -= 1;
15180 YY_DO_BEFORE_ACTION; /* set up codeYYtext again */
15182 #line 3419 "code.l"
15183 { // special C comment block at a new line
15184  if (Config_getBool("STRIP_CODE_COMMENTS"))
15185  {
15188  }
15189  else
15190  {
15191  // check is to prevent getting stuck in skipping C++ comments
15192  if (YY_START != SkipCxxComment)
15193  {
15195  }
15196  startFontClass("comment");
15198  BEGIN(SkipComment);
15199  }
15200  }
15201  YY_BREAK
15202 case 205:
15203 /* rule 205 can match eol */
15204 *yy_cp = (yy_hold_char); /* undo effects of setting up codeYYtext */
15205 (yy_c_buf_p) = yy_cp = yy_bp + 3;
15206 YY_DO_BEFORE_ACTION; /* set up codeYYtext again */
15208 #line 3437 "code.l"
15209 { // special C comment block half way a line
15210  if (YY_START==SkipString) REJECT;
15211  if (Config_getBool("STRIP_CODE_COMMENTS"))
15212  {
15215  }
15216  else
15217  {
15218  // check is to prevent getting stuck in skipping C++ comments
15219  if (YY_START != SkipCxxComment)
15220  {
15222  }
15223  startFontClass("comment");
15225  BEGIN(SkipComment);
15226  }
15227  }
15228  YY_BREAK
15229 case 206:
15231 #line 3456 "code.l"
15232 {
15233  if (YY_START==SkipString) REJECT;
15234  if (!Config_getBool("STRIP_CODE_COMMENTS"))
15235  {
15236  startFontClass("comment");
15238  endFontClass();
15239  }
15240  }
15241  YY_BREAK
15242 case 207:
15244 #line 3465 "code.l"
15245 {
15246  startFontClass("comment");
15248  // check is to prevent getting stuck in skipping C++ comments
15249  if (YY_START != SkipCxxComment)
15250  {
15252  }
15253  BEGIN( SkipComment ) ;
15254  }
15255  YY_BREAK
15256 case 208:
15258 #line 3475 "code.l"
15259 { // C# verbatim string
15260  startFontClass("stringliteral");
15264  }
15265  YY_BREAK
15266 case 209:
15268 #line 3481 "code.l"
15269 {
15270  startFontClass("comment");
15273  BEGIN( SkipCxxComment ) ;
15274  }
15275  YY_BREAK
15276 case 210:
15278 #line 3487 "code.l"
15279 {
15282  }
15283  YY_BREAK
15284 case 211:
15286 #line 3491 "code.l"
15287 {
15290  }
15291  YY_BREAK
15292 case 212:
15293 /* rule 212 can match eol */
15295 #line 3495 "code.l"
15296 {
15297  g_yyColNr++;
15299  }
15300  YY_BREAK
15301 case 213:
15303 #line 3499 "code.l"
15304 {
15305  g_yyColNr++;
15307  }
15308  YY_BREAK
15309 /*
15310 <*>([ \t\n]*"\n"){2,} { // combine multiple blank lines
15311  //QCString sepLine=codeYYtext;
15312  //g_code->codify("\n\n");
15313  //g_yyLineNr+=sepLine.contains('\n');
15314  //char sepLine[3]="\n\n";
15315  codifyLines(codeYYtext);
15316  }
15317  */
15318 case 214:
15320 #line 3513 "code.l"
15321 ECHO;
15322  YY_BREAK
15323 #line 15324 "/nova/app/home/novasoft/doxygen/doxygen-1.8.11/build/generated_src/code.cpp"
15324  case YY_STATE_EOF(INITIAL):
15325  case YY_STATE_EOF(SkipString):
15326  case YY_STATE_EOF(SkipStringS):
15327  case YY_STATE_EOF(SkipVerbString):
15328  case YY_STATE_EOF(SkipCPP):
15329  case YY_STATE_EOF(SkipComment):
15330  case YY_STATE_EOF(SkipCxxComment):
15331  case YY_STATE_EOF(RemoveSpecialCComment):
15332  case YY_STATE_EOF(StripSpecialCComment):
15333  case YY_STATE_EOF(Body):
15334  case YY_STATE_EOF(FuncCall):
15335  case YY_STATE_EOF(MemberCall):
15336  case YY_STATE_EOF(MemberCall2):
15337  case YY_STATE_EOF(SkipInits):
15338  case YY_STATE_EOF(ClassName):
15339  case YY_STATE_EOF(AlignAs):
15340  case YY_STATE_EOF(AlignAsEnd):
15341  case YY_STATE_EOF(PackageName):
15342  case YY_STATE_EOF(ClassVar):
15343  case YY_STATE_EOF(CppCliTypeModifierFollowup):
15344  case YY_STATE_EOF(Bases):
15345  case YY_STATE_EOF(SkipSharp):
15346  case YY_STATE_EOF(ReadInclude):
15347  case YY_STATE_EOF(TemplDecl):
15348  case YY_STATE_EOF(TemplCast):
15349  case YY_STATE_EOF(CallEnd):
15350  case YY_STATE_EOF(ObjCMethod):
15351  case YY_STATE_EOF(ObjCParams):
15352  case YY_STATE_EOF(ObjCParamType):
15353  case YY_STATE_EOF(ObjCCall):
15354  case YY_STATE_EOF(ObjCMName):
15355  case YY_STATE_EOF(ObjCSkipStr):
15356  case YY_STATE_EOF(OldStyleArgs):
15357  case YY_STATE_EOF(UsingName):
15358  case YY_STATE_EOF(RawString):
15359  case YY_STATE_EOF(InlineInit):
15360  yyterminate();
15361 
15362  case YY_END_OF_BUFFER:
15363  {
15364  /* Amount of text matched not including the EOB char. */
15365  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
15366 
15367  /* Undo the effects of YY_DO_BEFORE_ACTION. */
15368  *yy_cp = (yy_hold_char);
15370 
15371  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
15372  {
15373  /* We're scanning a new file or input source. It's
15374  * possible that this happened because the user
15375  * just pointed codeYYin at a new source and called
15376  * codeYYlex(). If so, then we have to assure
15377  * consistency between YY_CURRENT_BUFFER and our
15378  * globals. Here is the right place to do so, because
15379  * this is the first action (other than possibly a
15380  * back-up) that will match for the new input source.
15381  */
15382  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
15383  YY_CURRENT_BUFFER_LVALUE->yy_input_file = codeYYin;
15384  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
15385  }
15386 
15387  /* Note that here we test for yy_c_buf_p "<=" to the position
15388  * of the first EOB in the buffer, since yy_c_buf_p will
15389  * already have been incremented past the NUL character
15390  * (since all states make transitions on EOB to the
15391  * end-of-buffer state). Contrast this with the test
15392  * in input().
15393  */
15394  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
15395  { /* This was really a NUL. */
15396  yy_state_type yy_next_state;
15397 
15398  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
15399 
15400  yy_current_state = yy_get_previous_state( );
15401 
15402  /* Okay, we're now positioned to make the NUL
15403  * transition. We couldn't have
15404  * yy_get_previous_state() go ahead and do it
15405  * for us because it doesn't know how to deal
15406  * with the possibility of jamming (and we don't
15407  * want to build jamming into it because then it
15408  * will run more slowly).
15409  */
15410 
15411  yy_next_state = yy_try_NUL_trans( yy_current_state );
15412 
15414 
15415  if ( yy_next_state )
15416  {
15417  /* Consume the NUL. */
15418  yy_cp = ++(yy_c_buf_p);
15419  yy_current_state = yy_next_state;
15420  goto yy_match;
15421  }
15422 
15423  else
15424  {
15425  yy_cp = (yy_c_buf_p);
15426  goto yy_find_action;
15427  }
15428  }
15429 
15430  else switch ( yy_get_next_buffer( ) )
15431  {
15432  case EOB_ACT_END_OF_FILE:
15433  {
15435 
15436  if ( codeYYwrap( ) )
15437  {
15438  /* Note: because we've taken care in
15439  * yy_get_next_buffer() to have set up
15440  * codeYYtext, we can now set up
15441  * yy_c_buf_p so that if some total
15442  * hoser (like flex itself) wants to
15443  * call the scanner after we return the
15444  * YY_NULL, it'll still work - another
15445  * YY_NULL will get returned.
15446  */
15448 
15450  goto do_action;
15451  }
15452 
15453  else
15454  {
15455  if ( ! (yy_did_buffer_switch_on_eof) )
15456  YY_NEW_FILE;
15457  }
15458  break;
15459  }
15460 
15461  case EOB_ACT_CONTINUE_SCAN:
15462  (yy_c_buf_p) =
15463  (yytext_ptr) + yy_amount_of_matched_text;
15464 
15465  yy_current_state = yy_get_previous_state( );
15466 
15467  yy_cp = (yy_c_buf_p);
15469  goto yy_match;
15470 
15471  case EOB_ACT_LAST_MATCH:
15472  (yy_c_buf_p) =
15473  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
15474 
15475  yy_current_state = yy_get_previous_state( );
15476 
15477  yy_cp = (yy_c_buf_p);
15479  goto yy_find_action;
15480  }
15481  break;
15482  }
15483 
15484  default:
15486  "fatal flex scanner internal error--no action found" );
15487  } /* end of action switch */
15488  } /* end of scanning one token */
void addVariable(const QCString &type, const QCString &name)
Definition: code.cpp:10767
static QCString name
Definition: declinfo.cpp:673
#define EOB_ACT_END_OF_FILE
Definition: code.cpp:180
static void addToSearchIndex(const char *text)
Definition: code.cpp:10981
#define FuncCall
Definition: code.cpp:12358
static QString cleanDirPath(const QString &dirPath)
Definition: qdir.cpp:1077
bool resize(uint newlen)
Definition: qcstring.h:225
#define CLASSBLOCK
Definition: code.cpp:10589
#define SkipSharp
Definition: code.cpp:12369
static int g_sharpCount
Definition: code.cpp:10641
int codeYYleng
Definition: code.cpp:294
#define SkipString
Definition: code.cpp:12349
static ClassSDict * g_codeClassSDict
Definition: code.cpp:10599
static yy_state_type * yy_state_buf
Definition: code.cpp:10516
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
static int yy_did_buffer_switch_on_eof
Definition: code.cpp:304
static QCString scope
Definition: declinfo.cpp:668
#define AlignAs
Definition: code.cpp:12363
static char yy_hold_char
Definition: code.cpp:292
static void generateClassOrGlobalLink(CodeOutputInterface &ol, const char *clName, bool typeOnly=FALSE, bool varOnly=FALSE)
Definition: code.cpp:11461
#define MemberCall
Definition: code.cpp:12359
static bool g_insideProtocolList
Definition: code.cpp:10658
static int g_curlyCount
Definition: code.cpp:10640
static int g_currentObjId
Definition: code.cpp:10685
bool isLinkable() const
Definition: filedef.h:117
void popScope()
Definition: code.cpp:10732
static yyconst flex_int16_t yy_acclist[6690]
Definition: code.cpp:394
#define YY_FATAL_ERROR(msg)
Definition: code.cpp:12524
static int yy_start
Definition: code.cpp:299
#define ObjCMName
Definition: code.cpp:12378
#define YY_START
Definition: code.cpp:150
bool isEmpty() const
Definition: qcstring.h:189
#define UsingName
Definition: code.cpp:12381
#define RemoveSpecialCComment
Definition: code.cpp:12355
#define YY_SC_TO_UI(c)
Definition: code.cpp:138
static int g_lastStringContext
Definition: code.cpp:10647
static QCString g_classScope
Definition: code.cpp:10621
QCString objectTypeOrName
Definition: code.cpp:10672
static QCString g_saveType
Definition: code.cpp:10636
static bool g_insideBody
Definition: code.cpp:10633
uint length() const
Definition: qcstring.h:195
static int g_bracketCount
Definition: code.cpp:10639
int contains(char c, bool cs=TRUE) const
Definition: qcstring.cpp:153
#define SkipVerbString
Definition: code.cpp:12351
#define RawString
Definition: code.cpp:12382
#define InlineInit
Definition: code.cpp:12383
Definition: types.h:26
static void endFontClass()
Definition: code.cpp:11962
static int yy_get_next_buffer(void)
Definition: code.cpp:15498
type * first()
Definition: qinternallist.h:87
static CallContext g_theCallContext
Definition: code.cpp:10930
#define SkipInits
Definition: code.cpp:12361
static void startFontClass(const char *s)
Definition: code.cpp:11971
QCString format
Definition: code.cpp:10676
static int yy_full_lp
Definition: code.cpp:10520
#define yyterminate()
Definition: code.cpp:12514
const bool FALSE
Definition: qglobal.h:370
static yyconst flex_int16_t yy_nxt[36458]
Definition: code.cpp:2485
#define Bases
Definition: code.cpp:12368
#define YY_BUFFER_NORMAL
Definition: code.cpp:255
#define unput(c)
Definition: code.cpp:199
#define TemplCast
Definition: code.cpp:12372
char * codeYYtext
Definition: code.cpp:10538
static int g_lastTemplCastContext
Definition: code.cpp:10645
static void popScope()
Definition: code.cpp:10951
static void pushScope(const char *s)
Definition: code.cpp:10935
#define SCOPEBLOCK
Definition: code.cpp:10590
static yyconst flex_int32_t yy_ec[256]
Definition: code.cpp:1526
static bool generateClassMemberLink(CodeOutputInterface &ol, MemberDef *xmd, const char *memName)
Definition: code.cpp:11638
static ObjCCallCtx * g_currentCtx
Definition: code.cpp:10682
static FileNameDict * inputNameDict
Definition: doxygen.h:108
QCString left(uint len) const
Definition: qcstring.cpp:213
static int yy_looking_for_trail_begin
Definition: code.cpp:10519
static void writeMultiLineCodeLink(CodeOutputInterface &ol, Definition *d, const char *text)
Definition: code.cpp:11137
static yy_state_type yy_get_previous_state(void)
Definition: code.cpp:15603
#define YY_DO_BEFORE_ACTION
Definition: code.cpp:378
static char * yy_full_match
Definition: code.cpp:10517
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
QCString methodName
Definition: code.cpp:10671
static yyconst flex_int16_t yy_chk[36458]
Definition: code.cpp:6499
#define Body
Definition: code.cpp:12357
void append(const char *key, const T *d)
Definition: sortdict.h:135
int yy_state_type
Definition: code.cpp:361
static void addParmType()
Definition: code.cpp:11186
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
#define yytext_ptr
Definition: code.cpp:368
Definition: types.h:29
#define ECHO
Definition: code.cpp:12470
#define YY_BUFFER_NEW
Definition: code.cpp:254
static QCString g_parmName
Definition: code.cpp:10604
static QIntDict< QCString > g_objectDict
Definition: code.cpp:10690
static int g_memCallContext
Definition: code.cpp:10650
static VariableContext g_theVarContext
Definition: code.cpp:10860
QCString copy() const
Definition: qcstring.h:250
#define YY_AT_BOL()
Definition: code.cpp:350
static QCString g_curClassName
Definition: code.cpp:10600
static FileDef * g_sourceFileDef
Definition: code.cpp:10626
static QCString g_parmType
Definition: code.cpp:10603
static void addType()
Definition: code.cpp:11175
#define INNERBLOCK
Definition: code.cpp:10591
static void codifyLines(const char *text)
Definition: code.cpp:11102
#define INITIAL
Definition: code.cpp:12348
#define SkipComment
Definition: code.cpp:12353
static NamespaceDef * globalScope
Definition: doxygen.h:128
#define CppCliTypeModifierFollowup
Definition: code.cpp:12367
#define YY_END_OF_BUFFER
Definition: code.cpp:386
register int yy_act
Definition: code.cpp:12564
#define EOB_ACT_LAST_MATCH
Definition: code.cpp:181
#define MemberCall2
Definition: code.cpp:12360
static QStack< int > g_scopeStack
1 if bracket starts a scope,
Definition: code.cpp:10623
#define YY_TRAILING_HEAD_MASK
Definition: code.cpp:10523
static int g_lastSkipCppContext
Definition: code.cpp:10648
static int * yy_full_state
Definition: code.cpp:10521
QAsciiDict< Entry > fn
static int g_yyColNr
current column number
Definition: code.cpp:10610
static int g_lastVerbStringContext
Definition: code.cpp:10649
#define ClassName
Definition: code.cpp:12362
const QCString & name() const
Definition: definition.h:114
const double e
#define TemplDecl
Definition: code.cpp:12371
#define ReadInclude
Definition: code.cpp:12370
static QIntDict< QCString > g_nameDict
Definition: code.cpp:10689
QCString name() const
Definition: filedef.cpp:1193
static QCString g_args
Definition: code.cpp:10620
static QCString escapeName(const char *s)
Definition: code.cpp:12268
QCString right(uint len) const
Definition: qcstring.cpp:231
static int g_yyLineNr
current line number
Definition: code.cpp:10609
static int g_braceCount
Definition: code.cpp:10692
static yyconst flex_int32_t yy_meta[85]
Definition: code.cpp:1558
static bool g_insideTemplate
Definition: code.cpp:10617
#define AlignAsEnd
Definition: code.cpp:12364
register char * yy_cp
Definition: code.cpp:12563
FileDef * findFileDef(const FileNameDict *fnDict, const char *n, bool &ambig)
Definition: util.cpp:4963
static bool g_inFunctionTryBlock
Definition: code.cpp:10642
static MemberDef * g_currentMemberDef
Definition: code.cpp:10629
static bool g_inForEachExpression
Definition: code.cpp:10643
void inSort(const type *d)
Definition: qinternallist.h:59
QCString & prepend(const char *s)
Definition: qcstring.cpp:387
static void setClassScope(const QCString &name)
Definition: code.cpp:10989
static QCString g_delimiter
Definition: code.cpp:10637
static QCString g_forceTagReference
Definition: code.cpp:10697
#define ObjCCall
Definition: code.cpp:12377
static int g_currentCtxId
Definition: code.cpp:10683
static QCString g_name
Definition: code.cpp:10619
const char * data() const
Definition: qcstring.h:207
#define codeYYwrap(n)
Definition: code.cpp:354
#define Config_getBool(val)
Definition: config.cpp:664
static void nextCodeLine()
Definition: code.cpp:11088
static yyconst flex_int32_t yy_base[4112]
Definition: code.cpp:1571
unsigned char YY_CHAR
Definition: code.cpp:357
static int g_lastCContext
Definition: code.cpp:10651
#define YY_MORE_ADJ
Definition: code.cpp:10536
static void updateCallContextForSmartPointer()
Definition: code.cpp:11368
type * next()
Definition: qinternallist.h:89
#define DBG_CTX(x)
Definition: code.cpp:10585
#define BEGIN
Definition: code.cpp:144
FILE * codeYYin
Definition: code.cpp:359
static QStrList g_curClassBases
Definition: code.cpp:10601
#define StripSpecialCComment
Definition: code.cpp:12356
#define SkipCxxComment
Definition: code.cpp:12354
QCString removeRedundantWhiteSpace(const QCString &s)
Definition: util.cpp:1655
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
#define SkipStringS
Definition: code.cpp:12350
virtual void codify(const char *s)=0
void insertBaseClass(ClassDef *, const char *name, Protection p, Specifier s, const char *t=0)
Definition: classdef.cpp:358
virtual Definition * getOuterScope() const
static int g_skipInlineInitContext
Definition: code.cpp:10652
static void saveObjCContext()
Definition: code.cpp:16336
static QCString g_realScope
Definition: code.cpp:10622
#define YY_TRAILING_MASK
Definition: code.cpp:10522
#define YY_STATE_EOF(state)
Definition: code.cpp:154
static yyconst flex_int16_t yy_accept[3538]
Definition: code.cpp:1133
static char * yy_c_buf_p
Definition: code.cpp:297
#define SkipCPP
Definition: code.cpp:12352
#define REJECT
Definition: code.cpp:10524
register char * yy_bp
Definition: code.cpp:12563
void pushScope()
Definition: code.cpp:10726
#define YY_CURRENT_BUFFER_LVALUE
Definition: code.cpp:289
static bool g_searchingForBody
Definition: code.cpp:10632
#define YY_RESTORE_YY_MORE_OFFSET
Definition: code.cpp:10537
#define ObjCMethod
Definition: code.cpp:12374
#define YY_BREAK
Definition: code.cpp:12549
static void generateMemberLink(CodeOutputInterface &ol, const QCString &varName, char *memName)
Definition: code.cpp:11732
static void addUsingDirective(const char *name)
Definition: code.cpp:11194
static bool g_insideObjC
Definition: code.cpp:10654
Definition * getScope() const
Definition: code.cpp:10920
static int g_currentNameId
Definition: code.cpp:10684
static int g_bodyCurlyCount
Definition: code.cpp:10634
void setScope(Definition *d)
Definition: code.cpp:10882
static QCString escapeWord(const char *s)
Definition: code.cpp:12286
static QCString g_saveName
Definition: code.cpp:10635
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
Definition: code.cpp:15635
bool isId(int c)
Definition: util.h:224
#define ObjCParams
Definition: code.cpp:12375
#define YY_NEW_FILE
Definition: code.cpp:157
#define EOB_ACT_CONTINUE_SCAN
Definition: code.cpp:179
static CodeOutputInterface * g_code
Definition: code.cpp:10597
#define PackageName
Definition: code.cpp:12365
static yyconst flex_int16_t yy_def[4112]
Definition: code.cpp:2028
QCString lower() const
Definition: qcstring.cpp:263
Q_EXPORT int qstrcmp(const char *str1, const char *str2)
Definition: qcstring.h:95
T * find(const char *key)
Definition: sortdict.h:232
static QCString escapeObject(const char *s)
Definition: code.cpp:12277
QCString utf8() const
Definition: qstring.cpp:14507
ClassDef * getResolvedClass(Definition *scope, FileDef *fileScope, const char *n, MemberDef **pTypeDef, QCString *pTemplSpec, bool mayBeUnlinkable, bool mayBeHidden, QCString *pResolvedType)
Definition: util.cpp:1563
#define ClassVar
Definition: code.cpp:12366
static QIntDict< QCString > g_wordDict
Definition: code.cpp:10691
#define ObjCParamType
Definition: code.cpp:12376
static QCString g_type
Definition: code.cpp:10618
static QCString * s
Definition: config.cpp:1042
#define OldStyleArgs
Definition: code.cpp:12380
#define YY_RULE_SETUP
Definition: code.cpp:12552
const bool TRUE
Definition: qglobal.h:371
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition: util.cpp:5088
static int g_lastSpecialCContext
Definition: code.cpp:10646
static int yy_lp
Definition: code.cpp:10518
static int yy_n_chars
Definition: code.cpp:293
static void restoreObjCContext()
Definition: code.cpp:16366
bool isIncluded(const QCString &name) const
Definition: filedef.cpp:1390
#define ObjCSkipStr
Definition: code.cpp:12379
void pushScope()
Definition: code.cpp:10891
static void generateFunctionLink(CodeOutputInterface &ol, const char *funcName)
Definition: code.cpp:11841
void popScope()
Definition: code.cpp:10896
#define CallEnd
Definition: code.cpp:12373
static void writeObjCMethodCall(ObjCCallCtx *ctx)
Definition: code.cpp:11981
static void generatePHPVariableLink(CodeOutputInterface &ol, const char *varName)
Definition: code.cpp:11830
static Definition * g_currentDefinition
Definition: code.cpp:10628
static QIntDict< ObjCCallCtx > g_contextDict
Definition: code.cpp:10688
static yy_state_type * yy_state_ptr
Definition: code.cpp:10516
static void writeMultiLineCodeLink ( CodeOutputInterface ol,
Definition d,
const char *  text 
)
static

writes a link to a fragment text that may span multiple lines, inserting line numbers for each line. If text contains newlines, the link will be split into multiple links with the same destination, one for each line.

Definition at line 11137 of file code.cpp.

11140 {
11141  static bool sourceTooltips = Config_getBool("SOURCE_TOOLTIPS");
11143  QCString ref = d->getReference();
11145  QCString anchor = d->anchor();
11146  QCString tooltip;
11147  if (!sourceTooltips) // fall back to simple "title" tooltips
11148  {
11149  tooltip = d->briefDescriptionAsTooltip();
11150  }
11151  bool done=FALSE;
11152  char *p=(char *)text;
11153  while (!done)
11154  {
11155  char *sp=p;
11156  char c;
11157  while ((c=*p++) && c!='\n') { }
11158  if (c=='\n')
11159  {
11160  g_yyLineNr++;
11161  *(p-1)='\0';
11162  //printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp);
11163  ol.writeCodeLink(ref,file,anchor,sp,tooltip);
11164  nextCodeLine();
11165  }
11166  else
11167  {
11168  //printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp);
11169  ol.writeCodeLink(ref,file,anchor,sp,tooltip);
11170  done=TRUE;
11171  }
11172  }
11173 }
virtual QCString getReference() const
void addTooltip(Definition *d)
Definition: tooltip.cpp:71
const bool FALSE
Definition: qglobal.h:370
virtual QCString getOutputFileBase() const =0
virtual void writeCodeLink(const char *ref, const char *file, const char *anchor, const char *name, const char *tooltip)=0
static int g_yyLineNr
current line number
Definition: code.cpp:10609
p
Definition: test.py:223
static void nextCodeLine()
Definition: code.cpp:11088
#define Config_getBool(val)
Definition: config.cpp:664
static TooltipManager * instance()
Definition: tooltip.cpp:45
QCString briefDescriptionAsTooltip() const
const bool TRUE
Definition: qglobal.h:371
virtual QCString anchor() const =0
static void writeObjCMethodCall ( ObjCCallCtx ctx)
static

Definition at line 11981 of file code.cpp.

11982 {
11983  if (ctx==0) return;
11984  char c;
11985  const char *p = ctx->format.data();
11986  if (!ctx->methodName.isEmpty())
11987  {
11988  //printf("writeObjCMethodCall(%s) obj=%s method=%s\n",
11989  // ctx->format.data(),ctx->objectTypeOrName.data(),ctx->methodName.data());
11990  if (!ctx->objectTypeOrName.isEmpty() && ctx->objectTypeOrName.at(0)!='$')
11991  {
11992  //printf("Looking for object=%s method=%s\n",ctx->objectTypeOrName.data(),
11993  // ctx->methodName.data());
11995  if (cd==0) // not a local variable
11996  {
11997  if (ctx->objectTypeOrName=="self")
11998  {
11999  if (g_currentDefinition &&
12001  {
12003  }
12004  }
12005  else
12006  {
12010  ctx->objectTypeOrName,
12011  &ctx->method);
12012  }
12013  //printf(" object is class? %p\n",ctx->objectType);
12014  if (ctx->objectType) // found class
12015  {
12016  ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
12017  //printf(" yes->method=%s\n",ctx->method?ctx->method->name().data():"<none>");
12018  }
12019  else if (ctx->method==0) // search for class variable with the same name
12020  {
12021  //printf(" no\n");
12022  //printf("g_currentDefinition=%p\n",g_currentDefinition);
12023  if (g_currentDefinition &&
12025  {
12026  ctx->objectVar = ((ClassDef *)g_currentDefinition)->getMemberByName(ctx->objectTypeOrName);
12027  //printf(" ctx->objectVar=%p\n",ctx->objectVar);
12028  if (ctx->objectVar)
12029  {
12031  //printf(" ctx->objectType=%p\n",ctx->objectType);
12032  if (ctx->objectType)
12033  {
12034  ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
12035  //printf(" ctx->method=%p\n",ctx->method);
12036  }
12037  }
12038  }
12039  }
12040  }
12041  else // local variable
12042  {
12043  //printf(" object is local variable\n");
12045  {
12046  ctx->method = cd->getMemberByName(ctx->methodName);
12047  //printf(" class=%p method=%p\n",cd,ctx->method);
12048  }
12049  }
12050  }
12051  }
12052 
12053  //printf("[");
12054  while ((c=*p++)) // for each character in ctx->format
12055  {
12056  if (c=='$')
12057  {
12058  char nc=*p++;
12059  if (nc=='$') // escaped $
12060  {
12061  g_code->codify("$");
12062  }
12063  else // name fragment or reference to a nested call
12064  {
12065  if (nc=='n') // name fragment
12066  {
12067  nc=*p++;
12068  QCString refIdStr;
12069  while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
12070  p--;
12071  int refId=refIdStr.toInt();
12072  QCString *pName = g_nameDict.find(refId);
12073  if (pName)
12074  {
12075  if (ctx->method && ctx->method->isLinkable())
12076  {
12077  writeMultiLineCodeLink(*g_code,ctx->method,pName->data());
12079  {
12081  }
12082  }
12083  else
12084  {
12085  codifyLines(pName->data());
12086  }
12087  }
12088  else
12089  {
12090  //printf("Invalid name: id=%d\n",refId);
12091  }
12092  }
12093  else if (nc=='o') // reference to potential object name
12094  {
12095  nc=*p++;
12096  QCString refIdStr;
12097  while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
12098  p--;
12099  int refId=refIdStr.toInt();
12100  QCString *pObject = g_objectDict.find(refId);
12101  if (pObject)
12102  {
12103  if (*pObject=="self")
12104  {
12105  if (g_currentDefinition &&
12107  {
12109  if (ctx->objectType->categoryOf())
12110  {
12111  ctx->objectType = ctx->objectType->categoryOf();
12112  }
12113  if (ctx->objectType)
12114  {
12115  ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
12116  }
12117  }
12118  startFontClass("keyword");
12119  codifyLines(pObject->data());
12120  endFontClass();
12121  }
12122  else if (*pObject=="super")
12123  {
12124  if (g_currentDefinition &&
12126  {
12128  if (cd->categoryOf())
12129  {
12130  cd = cd->categoryOf();
12131  }
12132  BaseClassList *bcd = cd->baseClasses();
12133  if (bcd) // get direct base class (there should be only one)
12134  {
12135  BaseClassListIterator bli(*bcd);
12136  BaseClassDef *bclass;
12137  for (bli.toFirst();(bclass=bli.current());++bli)
12138  {
12139  if (bclass->classDef->compoundType()!=ClassDef::Protocol)
12140  {
12141  ctx->objectType = bclass->classDef;
12142  if (ctx->objectType)
12143  {
12144  ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
12145  }
12146  }
12147  }
12148  }
12149  }
12150  startFontClass("keyword");
12151  codifyLines(pObject->data());
12152  endFontClass();
12153  }
12154  else if (ctx->objectVar && ctx->objectVar->isLinkable()) // object is class variable
12155  {
12156  writeMultiLineCodeLink(*g_code,ctx->objectVar,pObject->data());
12158  {
12160  }
12161  }
12162  else if (ctx->objectType &&
12164  ctx->objectType->isLinkable()
12165  ) // object is class name
12166  {
12167  ClassDef *cd = ctx->objectType;
12168  writeMultiLineCodeLink(*g_code,cd,pObject->data());
12169  }
12170  else // object still needs to be resolved
12171  {
12173  g_sourceFileDef, *pObject);
12174  if (cd && cd->isLinkable())
12175  {
12176  if (ctx->objectType==0) ctx->objectType=cd;
12177  writeMultiLineCodeLink(*g_code,cd,pObject->data());
12178  }
12179  else
12180  {
12181  codifyLines(pObject->data());
12182  }
12183  }
12184  }
12185  else
12186  {
12187  //printf("Invalid object: id=%d\n",refId);
12188  }
12189  }
12190  else if (nc=='c') // reference to nested call
12191  {
12192  nc=*p++;
12193  QCString refIdStr;
12194  while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
12195  p--;
12196  int refId=refIdStr.toInt();
12197  ObjCCallCtx *ictx = g_contextDict.find(refId);
12198  if (ictx) // recurse into nested call
12199  {
12200  writeObjCMethodCall(ictx);
12201  if (ictx->method) // link to nested call successfully
12202  {
12203  // get the ClassDef representing the method's return type
12204  if (QCString(ictx->method->typeString())=="id")
12205  {
12206  // see if the method name is unique, if so we link to it
12208  //printf("mn->count=%d ictx->method=%s ctx->methodName=%s\n",
12209  // mn==0?-1:(int)mn->count(),
12210  // ictx->method->name().data(),
12211  // ctx->methodName.data());
12212  if (mn && mn->count()==1) // member name unique
12213  {
12214  ctx->method = mn->getFirst();
12215  }
12216  }
12217  else
12218  {
12219  ctx->objectType = stripClassName(ictx->method->typeString());
12220  if (ctx->objectType)
12221  {
12222  ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
12223  }
12224  }
12225  //printf(" ***** method=%s -> object=%p\n",ictx->method->name().data(),ctx->objectType);
12226  }
12227  }
12228  else
12229  {
12230  //printf("Invalid context: id=%d\n",refId);
12231  }
12232  }
12233  else if (nc=='w') // some word
12234  {
12235  nc=*p++;
12236  QCString refIdStr;
12237  while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
12238  p--;
12239  int refId=refIdStr.toInt();
12240  QCString *pWord = g_wordDict.find(refId);
12241  if (pWord)
12242  {
12243  codifyLines(pWord->data());
12244  }
12245  }
12246  else // illegal marker
12247  {
12248  ASSERT(!"invalid escape sequence");
12249  }
12250  }
12251  }
12252  else // normal non-marker character
12253  {
12254  char s[2];
12255  s[0]=c;s[1]=0;
12256  codifyLines(s);
12257  }
12258  }
12259  //printf("%s %s]\n",ctx->objectTypeOrName.data(),ctx->methodName.data());
12260  //printf("}=(type='%s',name='%s')",
12261  // ctx->objectTypeOrName.data(),
12262  // ctx->methodName.data());
12263 }
ClassDef * classDef
Definition: classdef.h:520
CompoundType compoundType() const
Definition: classdef.cpp:4394
bool isEmpty() const
Definition: qcstring.h:189
QCString objectTypeOrName
Definition: code.cpp:10672
static void endFontClass()
Definition: code.cpp:11962
static bool g_collectXRefs
Definition: code.cpp:10665
char & at(uint i) const
Definition: qcstring.h:326
static void startFontClass(const char *s)
Definition: code.cpp:11971
QCString format
Definition: code.cpp:10676
ClassDef * findVariable(const QCString &name)
Definition: code.cpp:10837
static void writeMultiLineCodeLink(CodeOutputInterface &ol, Definition *d, const char *text)
Definition: code.cpp:11137
MemberDef * getMemberByName(const QCString &) const
Definition: classdef.cpp:3968
QCString methodName
Definition: code.cpp:10671
static QIntDict< QCString > g_objectDict
Definition: code.cpp:10690
static VariableContext g_theVarContext
Definition: code.cpp:10860
static FileDef * g_sourceFileDef
Definition: code.cpp:10626
static void codifyLines(const char *text)
Definition: code.cpp:11102
virtual DefType definitionType() const =0
const char * typeString() const
Definition: memberdef.cpp:4035
uint count() const
Definition: qlist.h:66
static QIntDict< QCString > g_nameDict
Definition: code.cpp:10689
MemberDef * method
Definition: code.cpp:10675
int toInt(bool *ok=0) const
Definition: qcstring.cpp:439
static MemberDef * g_currentMemberDef
Definition: code.cpp:10629
p
Definition: test.py:223
const char * data() const
Definition: qcstring.h:207
bool isLinkable() const
Definition: classdef.cpp:2729
type * getFirst() const
Definition: qlist.h:95
ClassDef * categoryOf() const
Definition: classdef.cpp:4514
virtual void codify(const char *s)=0
void addDocCrossReference(MemberDef *src, MemberDef *dst)
Definition: util.cpp:8189
static MemberNameSDict * memberNameSDict
Definition: doxygen.h:115
MemberDef * objectVar
Definition: code.cpp:10674
ClassDef * objectType
Definition: code.cpp:10673
static CodeOutputInterface * g_code
Definition: code.cpp:10597
static const ClassDef * dummyContext
Definition: code.cpp:10710
T * find(const char *key)
Definition: sortdict.h:232
ClassDef * getResolvedClass(Definition *scope, FileDef *fileScope, const char *n, MemberDef **pTypeDef, QCString *pTemplSpec, bool mayBeUnlinkable, bool mayBeHidden, QCString *pResolvedType)
Definition: util.cpp:1563
static ClassDef * stripClassName(const char *s, Definition *d=g_currentDefinition)
Definition: code.cpp:11227
static QIntDict< QCString > g_wordDict
Definition: code.cpp:10691
bool isLinkable() const
Definition: memberdef.cpp:1161
static QCString * s
Definition: config.cpp:1042
BaseClassList * baseClasses() const
Definition: classdef.cpp:4399
#define ASSERT(x)
Definition: qglobal.h:590
static void writeObjCMethodCall(ObjCCallCtx *ctx)
Definition: code.cpp:11981
static Definition * g_currentDefinition
Definition: code.cpp:10628
static QIntDict< ObjCCallCtx > g_contextDict
Definition: code.cpp:10688
static void yy_fatal_error ( yyconst char  msg[])
static
static void yy_fatal_error ( yyconst char *  msg)
static

Definition at line 16120 of file code.cpp.

16121 {
16122  (void) fprintf( stderr, "%s\n", msg );
16123  exit( YY_EXIT_FAILURE );
16124 }
void msg(const char *fmt,...)
Definition: message.cpp:107
#define YY_EXIT_FAILURE
Definition: code.cpp:16117
static int yy_get_next_buffer ( void  )
static

Definition at line 15498 of file code.cpp.

15499 {
15500  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
15501  register char *source = (yytext_ptr);
15502  register int number_to_move, i;
15503  int ret_val;
15504 
15505  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
15507  "fatal flex scanner internal error--end of buffer missed" );
15508 
15509  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
15510  { /* Don't try to fill the buffer, so this is an EOF. */
15511  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
15512  {
15513  /* We matched a single character, the EOB, so
15514  * treat this as a final EOF.
15515  */
15516  return EOB_ACT_END_OF_FILE;
15517  }
15518 
15519  else
15520  {
15521  /* We matched some text prior to the EOB, first
15522  * process it.
15523  */
15524  return EOB_ACT_LAST_MATCH;
15525  }
15526  }
15527 
15528  /* Try to read more data. */
15529 
15530  /* First move last chars to start of buffer. */
15531  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
15532 
15533  for ( i = 0; i < number_to_move; ++i )
15534  *(dest++) = *(source++);
15535 
15536  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
15537  /* don't do the read, it's not guaranteed to return an EOF,
15538  * just force an EOF
15539  */
15540  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
15541 
15542  else
15543  {
15544  int num_to_read =
15545  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
15546 
15547  while ( num_to_read <= 0 )
15548  { /* Not enough room in the buffer - grow it. */
15549 
15551 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
15552 
15553  }
15554 
15555  if ( num_to_read > YY_READ_BUF_SIZE )
15556  num_to_read = YY_READ_BUF_SIZE;
15557 
15558  /* Read in more data. */
15559  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
15560  (yy_n_chars), (size_t) num_to_read );
15561 
15562  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
15563  }
15564 
15565  if ( (yy_n_chars) == 0 )
15566  {
15567  if ( number_to_move == YY_MORE_ADJ )
15568  {
15569  ret_val = EOB_ACT_END_OF_FILE;
15571  }
15572 
15573  else
15574  {
15575  ret_val = EOB_ACT_LAST_MATCH;
15576  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
15578  }
15579  }
15580 
15581  else
15582  ret_val = EOB_ACT_CONTINUE_SCAN;
15583 
15584  if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
15585  /* Extend the array by 50%, plus the number we really need. */
15586  yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
15587  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) codeYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
15588  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
15589  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
15590  }
15591 
15592  (yy_n_chars) += number_to_move;
15595 
15596  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
15597 
15598  return ret_val;
15599 }
#define EOB_ACT_END_OF_FILE
Definition: code.cpp:180
void codeYYrestart(FILE *input_file)
Definition: code.cpp:15772
#define YY_READ_BUF_SIZE
Definition: code.cpp:12462
#define YY_FATAL_ERROR(msg)
Definition: code.cpp:12524
#define YY_INPUT(buf, result, max_size)
Definition: code.cpp:12298
#define yytext_ptr
Definition: code.cpp:368
#define YY_END_OF_BUFFER_CHAR
Definition: code.cpp:159
#define EOB_ACT_LAST_MATCH
Definition: code.cpp:181
void * codeYYrealloc(void *, yy_size_t)
Definition: code.cpp:16310
#define YY_BUFFER_EOF_PENDING
Definition: code.cpp:266
#define YY_MORE_ADJ
Definition: code.cpp:10536
FILE * codeYYin
Definition: code.cpp:359
static char * yy_c_buf_p
Definition: code.cpp:297
#define YY_CURRENT_BUFFER_LVALUE
Definition: code.cpp:289
#define EOB_ACT_CONTINUE_SCAN
Definition: code.cpp:179
size_t yy_size_t
Definition: code.cpp:203
static int yy_n_chars
Definition: code.cpp:293
static yy_state_type yy_get_previous_state ( void  )
static

Definition at line 15603 of file code.cpp.

15604 {
15605  register yy_state_type yy_current_state;
15606  register char *yy_cp;
15607 
15608  yy_current_state = (yy_start);
15609  yy_current_state += YY_AT_BOL();
15610 
15611  (yy_state_ptr) = (yy_state_buf);
15612  *(yy_state_ptr)++ = yy_current_state;
15613 
15614  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
15615  {
15616  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
15617  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
15618  {
15619  yy_current_state = (int) yy_def[yy_current_state];
15620  if ( yy_current_state >= 3537 )
15621  yy_c = yy_meta[(unsigned int) yy_c];
15622  }
15623  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
15624  *(yy_state_ptr)++ = yy_current_state;
15625  }
15626 
15627  return yy_current_state;
15628 }
static yy_state_type * yy_state_buf
Definition: code.cpp:10516
static int yy_start
Definition: code.cpp:299
#define YY_SC_TO_UI(c)
Definition: code.cpp:138
static yyconst flex_int16_t yy_nxt[36458]
Definition: code.cpp:2485
static yyconst flex_int32_t yy_ec[256]
Definition: code.cpp:1526
static yyconst flex_int16_t yy_chk[36458]
Definition: code.cpp:6499
int yy_state_type
Definition: code.cpp:361
#define yytext_ptr
Definition: code.cpp:368
#define YY_AT_BOL()
Definition: code.cpp:350
static yyconst flex_int32_t yy_meta[85]
Definition: code.cpp:1558
register char * yy_cp
Definition: code.cpp:12563
static yyconst flex_int32_t yy_base[4112]
Definition: code.cpp:1571
unsigned char YY_CHAR
Definition: code.cpp:357
#define YY_MORE_ADJ
Definition: code.cpp:10536
static char * yy_c_buf_p
Definition: code.cpp:297
static yyconst flex_int16_t yy_def[4112]
Definition: code.cpp:2028
static yy_state_type * yy_state_ptr
Definition: code.cpp:10516
static int yy_init_globals ( void  )
static

Definition at line 16223 of file code.cpp.

16224 {
16225  /* Initialization is the same as for the non-reentrant scanner.
16226  * This function is called from codeYYlex_destroy(), so don't allocate here.
16227  */
16228 
16229  (yy_buffer_stack) = 0;
16230  (yy_buffer_stack_top) = 0;
16231  (yy_buffer_stack_max) = 0;
16232  (yy_c_buf_p) = (char *) 0;
16233  (yy_init) = 0;
16234  (yy_start) = 0;
16235 
16236  (yy_state_buf) = 0;
16237  (yy_state_ptr) = 0;
16238  (yy_full_match) = 0;
16239  (yy_lp) = 0;
16240 
16241 /* Defined in main.c */
16242 #ifdef YY_STDINIT
16243  codeYYin = stdin;
16244  codeYYout = stdout;
16245 #else
16246  codeYYin = (FILE *) 0;
16247  codeYYout = (FILE *) 0;
16248 #endif
16249 
16250  /* For future reference: Set errno on error, since we are called by
16251  * codeYYlex_init()
16252  */
16253  return 0;
16254 }
static yy_state_type * yy_state_buf
Definition: code.cpp:10516
static int yy_start
Definition: code.cpp:299
static char * yy_full_match
Definition: code.cpp:10517
static size_t yy_buffer_stack_max
Definition: code.cpp:273
static YY_BUFFER_STATE * yy_buffer_stack
Definition: code.cpp:274
FILE * codeYYin
Definition: code.cpp:359
FILE * codeYYout
Definition: code.cpp:359
static char * yy_c_buf_p
Definition: code.cpp:297
static size_t yy_buffer_stack_top
Definition: code.cpp:272
static int yy_init
Definition: code.cpp:298
static int yy_lp
Definition: code.cpp:10518
static yy_state_type * yy_state_ptr
Definition: code.cpp:10516
static yy_state_type yy_try_NUL_trans ( yy_state_type  current_state)
static

Definition at line 15635 of file code.cpp.

15636 {
15637  register int yy_is_jam;
15638 
15639  register YY_CHAR yy_c = 1;
15640  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
15641  {
15642  yy_current_state = (int) yy_def[yy_current_state];
15643  if ( yy_current_state >= 3537 )
15644  yy_c = yy_meta[(unsigned int) yy_c];
15645  }
15646  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
15647  yy_is_jam = (yy_current_state == 3536);
15648  if ( ! yy_is_jam )
15649  *(yy_state_ptr)++ = yy_current_state;
15650 
15651  return yy_is_jam ? 0 : yy_current_state;
15652 }
static yyconst flex_int16_t yy_nxt[36458]
Definition: code.cpp:2485
static yyconst flex_int16_t yy_chk[36458]
Definition: code.cpp:6499
static yyconst flex_int32_t yy_meta[85]
Definition: code.cpp:1558
static yyconst flex_int32_t yy_base[4112]
Definition: code.cpp:1571
unsigned char YY_CHAR
Definition: code.cpp:357
static yyconst flex_int16_t yy_def[4112]
Definition: code.cpp:2028
static yy_state_type * yy_state_ptr
Definition: code.cpp:10516
static int yyread ( char *  buf,
int  max_size 
)
static

Definition at line 12300 of file code.cpp.

12301 {
12302  int c=0;
12303  while( c < max_size && g_inputString[g_inputPosition] )
12304  {
12305  *buf = g_inputString[g_inputPosition++] ;
12306  c++; buf++;
12307  }
12308  return c;
12309 }
static const char * g_inputString
the code fragment as text
Definition: code.cpp:10606
static int g_inputPosition
read offset during parsing
Definition: code.cpp:10607
static void yyunput ( int  c,
char *  buf_ptr 
)
static
static void yyunput ( int  c,
register char *  yy_bp 
)
static

Definition at line 15654 of file code.cpp.

15655 {
15656  register char *yy_cp;
15657 
15658  yy_cp = (yy_c_buf_p);
15659 
15660  /* undo effects of setting up codeYYtext */
15661  *yy_cp = (yy_hold_char);
15662 
15663  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
15664  { /* need to shift things up to make room */
15665  /* +2 for EOB chars. */
15666  register int number_to_move = (yy_n_chars) + 2;
15667  register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
15668  YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
15669  register char *source =
15670  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
15671 
15672  while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
15673  *--dest = *--source;
15674 
15675  yy_cp += (int) (dest - source);
15676  yy_bp += (int) (dest - source);
15677  YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
15678  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
15679 
15680  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
15681  YY_FATAL_ERROR( "flex scanner push-back overflow" );
15682  }
15683 
15684  *--yy_cp = (char) c;
15685 
15686  (yytext_ptr) = yy_bp;
15687  (yy_hold_char) = *yy_cp;
15688  (yy_c_buf_p) = yy_cp;
15689 }
static char yy_hold_char
Definition: code.cpp:292
#define YY_FATAL_ERROR(msg)
Definition: code.cpp:12524
#define yytext_ptr
Definition: code.cpp:368
if(!(yy_init))
Definition: code.cpp:12571
register char * yy_cp
Definition: code.cpp:12563
static char * yy_c_buf_p
Definition: code.cpp:297
register char * yy_bp
Definition: code.cpp:12563
#define YY_CURRENT_BUFFER_LVALUE
Definition: code.cpp:289
static int yy_n_chars
Definition: code.cpp:293

Variable Documentation

int codeYY_flex_debug = 0

Definition at line 10514 of file code.cpp.

FILE * codeYYin = (FILE *) 0

Definition at line 359 of file code.cpp.

int codeYYleng

Definition at line 294 of file code.cpp.

int codeYYlineno = 1

Definition at line 365 of file code.cpp.

FILE * codeYYout = (FILE *) 0

Definition at line 359 of file code.cpp.

char * codeYYtext

Definition at line 10538 of file code.cpp.

int g_anchorCount
static

Definition at line 10625 of file code.cpp.

QCString g_args
static

Definition at line 10620 of file code.cpp.

int g_bodyCurlyCount
static

Definition at line 10634 of file code.cpp.

int g_braceCount =0
static

Definition at line 10692 of file code.cpp.

int g_bracketCount = 0
static

Definition at line 10639 of file code.cpp.

QCString g_classScope
static

Definition at line 10621 of file code.cpp.

QStack<int> g_classScopeLengthStack
static

Definition at line 10662 of file code.cpp.

CodeOutputInterface* g_code
static

Definition at line 10597 of file code.cpp.

ClassSDict* g_codeClassSDict = 0
static

Definition at line 10599 of file code.cpp.

bool g_collectXRefs
static

Definition at line 10665 of file code.cpp.

QIntDict<ObjCCallCtx> g_contextDict
static

Definition at line 10688 of file code.cpp.

QStack<ObjCCallCtx> g_contextStack
static

Definition at line 10687 of file code.cpp.

QStrList g_curClassBases
static

Definition at line 10601 of file code.cpp.

QCString g_curClassName
static

Definition at line 10600 of file code.cpp.

int g_curlyCount = 0
static

Definition at line 10640 of file code.cpp.

ObjCCallCtx* g_currentCtx =0
static

Definition at line 10682 of file code.cpp.

int g_currentCtxId =0
static

Definition at line 10683 of file code.cpp.

Definition* g_currentDefinition
static

Definition at line 10628 of file code.cpp.

const char* g_currentFontClass
static

Definition at line 10631 of file code.cpp.

MemberDef* g_currentMemberDef
static

Definition at line 10629 of file code.cpp.

int g_currentNameId =0
static

Definition at line 10684 of file code.cpp.

int g_currentObjId =0
static

Definition at line 10685 of file code.cpp.

int g_currentWordId =0
static

Definition at line 10686 of file code.cpp.

QCString g_delimiter
static

Definition at line 10637 of file code.cpp.

bool g_exampleBlock
static

Definition at line 10613 of file code.cpp.

QCString g_exampleFile
static

Definition at line 10615 of file code.cpp.

QCString g_exampleName
static

Definition at line 10614 of file code.cpp.

QCString g_forceTagReference
static

Definition at line 10697 of file code.cpp.

bool g_includeCodeFragment
static

Definition at line 10630 of file code.cpp.

bool g_inForEachExpression = FALSE
static

Definition at line 10643 of file code.cpp.

bool g_inFunctionTryBlock = FALSE
static

Definition at line 10642 of file code.cpp.

int g_inputLines
static

number of line in the code fragment

Definition at line 10608 of file code.cpp.

int g_inputPosition
static

read offset during parsing

Definition at line 10607 of file code.cpp.

const char* g_inputString
static

the code fragment as text

Definition at line 10606 of file code.cpp.

bool g_insideBody
static

Definition at line 10633 of file code.cpp.

bool g_insideCS
static

Definition at line 10656 of file code.cpp.

bool g_insideJava
static

Definition at line 10655 of file code.cpp.

bool g_insideObjC
static

Definition at line 10654 of file code.cpp.

bool g_insidePHP
static

Definition at line 10657 of file code.cpp.

bool g_insideProtocolList
static

Definition at line 10658 of file code.cpp.

bool g_insideTemplate = FALSE
static

Definition at line 10617 of file code.cpp.

int g_lastCContext
static

Definition at line 10651 of file code.cpp.

int g_lastSkipCppContext
static

Definition at line 10648 of file code.cpp.

int g_lastSpecialCContext
static

Definition at line 10646 of file code.cpp.

int g_lastStringContext
static

Definition at line 10647 of file code.cpp.

int g_lastTemplCastContext
static

Definition at line 10645 of file code.cpp.

int g_lastVerbStringContext
static

Definition at line 10649 of file code.cpp.

bool g_lexInit = FALSE
static

Definition at line 10660 of file code.cpp.

bool g_lineNumbers
static

Definition at line 10627 of file code.cpp.

int g_memCallContext
static

Definition at line 10650 of file code.cpp.

QCString g_name
static

Definition at line 10619 of file code.cpp.

QIntDict<QCString> g_nameDict
static

Definition at line 10689 of file code.cpp.

bool g_needsTermination
static

Definition at line 10611 of file code.cpp.

QIntDict<QCString> g_objectDict
static

Definition at line 10690 of file code.cpp.

QCString g_parmName
static

Definition at line 10604 of file code.cpp.

QCString g_parmType
static

Definition at line 10603 of file code.cpp.

QCString g_realScope
static

Definition at line 10622 of file code.cpp.

QCString g_saveName
static

Definition at line 10635 of file code.cpp.

QCString g_saveType
static

Definition at line 10636 of file code.cpp.

QStack<int> g_scopeStack
static

1 if bracket starts a scope,

Definition at line 10623 of file code.cpp.

Definition* g_searchCtx
static

Definition at line 10664 of file code.cpp.

bool g_searchingForBody
static

Definition at line 10632 of file code.cpp.

int g_sharpCount = 0
static

Definition at line 10641 of file code.cpp.

int g_skipInlineInitContext
static

Definition at line 10652 of file code.cpp.

FileDef* g_sourceFileDef
static

Definition at line 10626 of file code.cpp.

CallContext g_theCallContext
static

Definition at line 10930 of file code.cpp.

VariableContext g_theVarContext
static

Definition at line 10860 of file code.cpp.

QCString g_type
static

Definition at line 10618 of file code.cpp.

QIntDict<QCString> g_wordDict
static

Definition at line 10691 of file code.cpp.

int g_yyColNr
static

current column number

Definition at line 10610 of file code.cpp.

int g_yyLineNr
static

current line number

Definition at line 10609 of file code.cpp.

yyconst flex_int16_t yy_accept[3538]
static

Definition at line 1133 of file code.cpp.

yyconst flex_int16_t yy_acclist[6690]
static

Definition at line 394 of file code.cpp.

register int yy_act

Definition at line 12564 of file code.cpp.

yyconst flex_int32_t yy_base[4112]
static

Definition at line 1571 of file code.cpp.

register char * yy_bp

Definition at line 12563 of file code.cpp.

YY_BUFFER_STATE* yy_buffer_stack = 0
static

Stack as an array.

Definition at line 274 of file code.cpp.

size_t yy_buffer_stack_max = 0
static

capacity of stack.

Definition at line 273 of file code.cpp.

size_t yy_buffer_stack_top = 0
static

index of top of stack.

Definition at line 272 of file code.cpp.

char* yy_c_buf_p = (char *) 0
static

Definition at line 297 of file code.cpp.

yyconst flex_int16_t yy_chk[36458]
static

Definition at line 6499 of file code.cpp.

register char* yy_cp

Definition at line 12563 of file code.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 12561 of file code.cpp.

yyconst flex_int16_t yy_def[4112]
static

Definition at line 2028 of file code.cpp.

int yy_did_buffer_switch_on_eof
static

Definition at line 304 of file code.cpp.

yyconst flex_int32_t yy_ec[256]
static

Definition at line 1526 of file code.cpp.

int yy_full_lp
static

Definition at line 10520 of file code.cpp.

char* yy_full_match
static

Definition at line 10517 of file code.cpp.

int* yy_full_state
static

Definition at line 10521 of file code.cpp.

char yy_hold_char
static

Definition at line 292 of file code.cpp.

int yy_init = 0
static

Definition at line 298 of file code.cpp.

int yy_looking_for_trail_begin = 0
static

Definition at line 10519 of file code.cpp.

int yy_lp
static

Definition at line 10518 of file code.cpp.

yyconst flex_int32_t yy_meta[85]
static
Initial value:
=
{ 0,
1, 2, 3, 4, 5, 1, 6, 1, 7, 1,
1, 8, 9, 10, 11, 1, 12, 13, 14, 15,
16, 16, 16, 16, 17, 18, 19, 20, 1, 1,
21, 21, 21, 21, 21, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22, 23, 24,
25, 1, 26, 21, 21, 21, 21, 21, 21, 22,
22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22, 22, 27,
1, 28, 29, 30
}

Definition at line 1558 of file code.cpp.

int yy_n_chars
static

Definition at line 293 of file code.cpp.

yyconst flex_int16_t yy_nxt[36458]
static

Definition at line 2485 of file code.cpp.

int yy_start = 0
static

Definition at line 299 of file code.cpp.

yy_state_type* yy_state_buf =0
static

Definition at line 10516 of file code.cpp.

yy_state_type * yy_state_ptr =0
static

Definition at line 10516 of file code.cpp.